PhWindowEvent_t

Data structure describing a window action

Synopsis:

typedef struct _Ph_window_event {
    unsigned long             event_f;
    unsigned long             state_f;
    PhRid_t             rid;
    PhPoint_t           pos;
    PhDim_t             size;
    unsigned short            event_state;
    unsigned short            input_group;
    unsigned long             rsvd[4];
} PhWindowEvent_t;

Description:

This structure defines the data that's associated with a Ph_EV_WM event of subtype Ph_EV_WM_EVENT. For more information, see PhEvent_t.

Using the PhWindowEvent_t structure, your application can determine what kind of window action just occurred, or can tell the window manager to perform a specific action on its behalf.

This structure contains at least the following members:

unsigned long event_f
The type of the window event. The flags you can set in this member are the same as those for Pt_ARG_WINDOW_MANAGED_FLAGS and Pt_ARG_WINDOW_NOTIFY_FLAGS resources of the PtWindow widget (described in the Photon Widget Reference):

Some events can have two meanings; see the description of the event_state member.

unsigned long state_f
The current state of the window:
PhRid_t rid
The ID of the affected region.
short event_state
Indicates that the Window Manager has completed or been asked to complete the requested action. If the event is emitted to the Window Manager, the event is performed by the Window Manager. If an application collects the event, the Window Manager has completed the event.

The following operations have two event states; you can OR one of these states into event_state:

PhPoint_t pos
A PhPoint_t structure that defines the position of the window. This member is valid only for Ph_WM_BACKDROP, Ph_WM_MAX, Ph_WM_MOVE, Ph_WM_RESIZE, and Ph_WM_RESTORE events.
PhDim_t size
A PhDim_t structure that indicates the width and height of the window. This member is only for Ph_WM_BACKDROP, Ph_WM_MAX, Ph_WM_RESIZE, and Ph_WM_RESTORE events.
unsigned short input_group
The input group associated with the event.

Classification:

Photon

See also:

PhDim_t, PhEvent_t, PhPoint_t, PtForwardWindowEvent(), PtForwardWindowTaskEvent()

Window Management chapter of the Photon Programmer's Guide.