29.11.2014 Views

Fast Models Reference Manual - ARM Information Center

Fast Models Reference Manual - ARM Information Center

Fast Models Reference Manual - ARM Information Center

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Peripheral and Interface Components<br />

void configureWindow(unsigned int width, unsigned int height, unsigned int bit_depth)<br />

This sets the visualization window to the requested size and bit depth. Depending<br />

on the display capabilities, the window might actually get a different bit depth<br />

from the size you requested.<br />

VisBitmap *loadImage(char const *filename)<br />

This allocates a new VisBitmap object, initialized by loading a Microsoft<br />

Windows Bitmap (.BMP) from the given file.<br />

VisBitmap *loadImageWithAlphaKey(char const *filename, unsigned int red, unsigned int<br />

green, unsigned int blue)<br />

This allocates a VisBitmap object, as with loadImage(). All pixels of the color<br />

specified by red, green, blue are converted into a transparent alpha channel.<br />

VisBitmap *cropImage(VisBitmap *source, int x, int y, unsigned int width, unsigned int<br />

height)<br />

This allocates a new VisBitmap object, by cropping a region from the source<br />

bitmap.<br />

void releaseImage(VisBitmap *)<br />

This releases the resources held by the given VisBitmap. The underlying bitmap<br />

is only be unloaded if it is not in use.<br />

void setBackground(VisBitmap *background, int x, int y)<br />

This sets the background image for the visualization window. This takes a copy<br />

of the data referenced by the VisBitmap, so it is safe for the client to call<br />

releaseImage(background) immediately after calling setBackground(). The<br />

background is not displayed until the first call to poll().<br />

VisRenderRegion *createRenderRegion()<br />

This allocates a new VisRenderRegion object that can be used to display arbitrary<br />

graphics, including LCD contents, in a rectangular region.<br />

VisPushButtonRegion *createPushButtonRegion()<br />

This allocates a new VisPushButtonRegion, which can be placed at a location on<br />

the display to provide a clickable push button.<br />

bool poll(VisEvent *event)<br />

This call allows the visualisation library to poll for GUI events. The client passes<br />

a reference to a VisEvent structure, which receives details of a single<br />

mouse/keyboard event.<br />

The method returns false if no events have occurred.<br />

Your LISA visualization implementations should call this periodically by using a<br />

GUIPoll component. On each gui_callback() event, you must ensure that the<br />

visualization component repeatedly calls poll() until it returns false.<br />

void lockMouse(VisRegion *region)<br />

This method locks the mouse to the visualization window and hides the mouse<br />

pointer.<br />

void unlockMouse()<br />

This unlocks and redisplays the mouse pointer.<br />

<strong>ARM</strong> DUI 0423J Copyright © 2008-2011 <strong>ARM</strong>. All rights reserved. 5-153<br />

ID051811<br />

Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!