typedef struct { GR_EVENT_TYPE type; GR_WINDOW_ID wid; GR_COORD x; GR_COORD y; GR_SIZE width; GR_SIZE height; } GR_EVENT_EXPOSURE;
The GR_EVENT_EXPOSURE structure is used by nano-X to tell the application that a portion of a window has just become visible and must be redrawn. This event is sent immediately after a window is mapped or after an obstructing window is moved.
The event structure contains an exposure rectangle. Only the contents of this rectangle need to be redrawn. It does not generally hurt to redraw the entire window, but a performance boost may be achieved by limiting the amount of redrawing that the application performs.
Type | Name | Description |
---|---|---|
GR_EVENT_TYPE | type | The event type will be GR_EVENT_TYPE_EXPOSURE. |
GR_WINDOW_ID | wid | The ID of the window that is being exposed. |
GR_COORD | x | The X coordinate of upper left corner of the exposed rectangle relative to the upper left corner of the window specified by wid. |
GR_COORD | y | The Y coordinate of upper left corner of the exposed rectangle relative to the upper left corner of the window specified by wid. |
GR_SIZE | width | The width of the exposed rectangle. |
GR_SIZE | height | The height of the exposed rectangle. |