GR_EVENT_GENERAL

Name

GR_EVENT_GENERAL -- General purpose event structure

Synopsis

typedef struct 
{
    GR_EVENT_TYPE   type;
    GR_WINDOW_ID    wid;
    GR_WINDOW_ID    otherid;
} GR_EVENT_GENERAL;
  

Description

The GR_EVENT_GENERAL structure is used by nano-X to pass data related to the events:

Each of these events use the type and wid fields. The third field (otherid is only used for the focus events.

Fields

TypeNameDescription
GR_EVENT_TYPEtypeThe event type will be one of GR_EVENT_TYPE_TIMEOUT, GR_EVENT_TYPE_CLOSE_REQ, GR_EVENT_TYPE_MOUSE_ENTER, GR_EVENT_TYPE_MOUSE_EXIT, GR_EVENT_TYPE_FOCUS_IN, GR_EVENT_TYPE_FOCUS_OUT.
GR_WINDOW_IDwidFor GR_EVENT_TYPE_CLOSE_REQ events this is the ID of the window that is being closed. For GR_EVENT_TYPE_MOUSE_ENTER and GR_EVENT_TYPE_MOUSE_EXIT events this is the ID of the window the mouse is entering or exiting, respectively. For GR_EVENT_TYPE_FOCUS_IN events this is the ID of the window that is receiving the focus. For GR_EVENT_TYPE_FOCUS_OUT events this is the window that is loosing the focus. This field is unused for GR_EVENT_TYPE_TIMEOUT events.
GR_IDotherid For GR_EVENT_TYPE_FOCUS_IN events this is the ID of the window that is loosing the focus. For GR_EVENT_TYPE_FOCUS_OUT events this is the ID of the window that is receiving the focus. This field is unused for all other event types.

See Also

GR_EVENT.