LibGII API Manual | ||
---|---|---|
Prev | Chapter 5. Event Structures |
If an application loses the focus and is not physically displayed (e.g. console switching, iconifying), it may be stopped. Some targets may implement a backbuffer and allow continuing, though.
After reactivation, the application will receive a redraw event, evExpose. This is its structure, describing the region which needs to be redrawn:
typedef struct gii_expose_event { COMMON_DATA; uint32 x,y; uint32 h,w; } gii_expose_event;
Example 5-1. How to use
ggi_event ev; /* ... wait and get the event... */ if (ev.any.type == evExpose) { /* redraw part of screen... */ redraw_screen(ev.expose.x, ev.expose.y, ev.expose.w, ev.expose.h); } /* ... etc ... */