GR_EVENT_UPDATE

Name

GR_EVENT_UPDATE -- Window update event structure

Synopsis

typedef struct 
{
    GR_EVENT_TYPE   type;
    GR_WINDOW_ID    wid;
    GR_WINDOW_ID    subwid;
    GR_COORD        x;
    GR_COORD        y;
    GR_SIZE         width;
    GR_SIZE         height;
    GR_UPDATE_TYPE  utype;
} GR_EVENT_UPDATE;
  

Description

The GR_EVENT_UPDATE structure is used by nano-X to pass data related to the events GR_EVENT_TYPE_UPDATE and GR_EVENT_TYPE_CHILD_UPDATE.

Update events are sent to the nano-X client if they have been selected for a window. The update events are "sent to" the window that the event is selected for. GR_EVENT_TYPE_UPDATE events are sent to a window when that window is updated. GR_EVENT_TYPE_CHILD_UPDATE events are sent to a window when one of it's child windows is updated. Windows are "updated" when they are moved, resized, mapped, unmapped, activated and destroyed.

Fields

TypeNameDescription
GR_EVENT_TYPEtypeThe event type will be GR_EVENT_TYPE_UPDATE or GR_EVENT_TYPE_CHLD_UPDATE.
GR_WINDOW_IDwid This field is the ID of the window to which the event is being sent. When the event type is GR_EVENT_TYPE_UPDATE this is the window that is being updated. When the event type is GR_EVENT_TYPE_CHILD_UPDATE then this field indicates one of the updated window's ancestors. The particular ancestor is the window that the event is being sent to.
GR_WINDOW_IDsubwidThis field indicates the window that was updated. If the event type is GR_EVENT_TYPE_UPDATE then this field is the same as the wid field. Otherwise this field is a decendant of wid. In that case this is the actual window that is being updated.
GR_COORDxThe updated X position of the window. The field is unused if the update type is GR_UPDATE_UNMAP, GR_UPDATE_UNMAPTEMP or GR_UPDATE_ACTIVATE.
GR_COORDyThe updated Y position of the window. The field is unused if the update type is GR_UPDATE_UNMAP, GR_UPDATE_UNMAPTEMP or GR_UPDATE_ACTIVATE.
GR_SIZEwidthThe updated width of the window. The field is unused if the update type is GR_UPDATE_UNMAP, GR_UPDATE_UNMAPTEMP or GR_UPDATE_ACTIVATE.
GR_SIZEheightThe updated height of the window. The field is unused if the update type is GR_UPDATE_UNMAP, GR_UPDATE_UNMAPTEMP or GR_UPDATE_ACTIVATE.
GR_UPDATE_TYPEutypeThis field indicates the type of update that triggered the event. The update type may be one of: GR_UPDATE_MAP, GR_UPDATE_UNMAP, GR_UPDATE_MOVE, GR_UPDATE_SIZE, GR_UPDATE_UNMAPTEMP, GR_UPDATE_ACTIVATE, GR_UPDATE_DESTROY.

See Also

GR_EVENT.