LibGII expose events

Name

gii_expose_event : LibGII expose events

Synopsis

#include <ggi/events.h>

typedef struct gii_expose_event {

    COMMON_DATA;

    uint32  x,y;
    uint32  h,w;

} gii_expose_event;

Description

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.

Generated Events

The gii_expose_event is used for the evExpose event.

Structure Members

The fields describe the region which needs to be redrawn.

Examples

evExpose handling skeleton:

ggi_visual_t vis;
ggi_event ev;

/* ... wait and get the event... */

if (ev.any.type == evExpose) {
    /* We might not be able to render partially ... */
    render_screen(vis);
              
    /* but flush only the region needed */
    ggiFlushRegion(vis, ev.expose.x, ev.expose.y,
                        ev.expose.w, ev.expose.h);
}

/* ... etc ... */

See Also