GR_EVENT_EXPOSURE

Name

GR_EVENT_EXPOSURE -- Window exposure event structure

Synopsis

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;
  

Description

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.

Fields

TypeNameDescription
GR_EVENT_TYPEtypeThe event type will be GR_EVENT_TYPE_EXPOSURE.
GR_WINDOW_IDwidThe ID of the window that is being exposed.
GR_COORDxThe X coordinate of upper left corner of the exposed rectangle relative to the upper left corner of the window specified by wid.
GR_COORDyThe Y coordinate of upper left corner of the exposed rectangle relative to the upper left corner of the window specified by wid.
GR_SIZEwidthThe width of the exposed rectangle.
GR_SIZEheightThe height of the exposed rectangle.

See Also

GR_EVENT.