Data structure describing a window action
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;
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):
    
- Ph_WM_CLOSE — the window is to be closed.
        
      
 
- Ph_WM_FOCUS — the window is to gain/lose focus.
        
      
 
- Ph_WM_MENU — the window menu is requested
       or dismissed.
        
      
 
- Ph_WM_TOFRONT — the window is to be moved
       to the front.
        
      
 
- Ph_WM_TOBACK — the window is to be moved
       to the back.
        
      
 
- Ph_WM_CONSWITCH — the window is to switch
       consoles.
        
      
 
- Ph_WM_RESIZE — the window is to be resized.
        
      
 
- Ph_WM_MOVE — the window is to be moved.
        
      
 
- Ph_WM_HIDE — the window is to be hidden or unhidden.
        
      
 
- Ph_WM_MAX — the window is to be maximized.
        
      
 
- Ph_WM_BACKDROP — the window is to be made into a backdrop.
        
      
 
- Ph_WM_RESTORE — the window is to be restored.
        
      
 
- Ph_WM_HELP — the help button is pressed.
        
      
 
- Ph_WM_FFRONT — the window is to be made force-front or not force-front.
        
   
 
       Some events can have two meanings; see the description of the
   event_state member.
 
- unsigned long state_f
  
 
- The current state of the window:
    
- Ph_WM_STATE_ISNORMAL — a normal window.
        
      
 
- Ph_WM_STATE_ISHIDDEN — window is hidden.
        
      
 
- Ph_WM_STATE_ISMAX — window is maximized.
        
      
 
- Ph_WM_STATE_ISICONIFIED — window is iconified.
        
      
 
- Ph_WM_STATE_ISTASKBAR — window is a taskbar.
        
      
 
- Ph_WM_STATE_ISBACKDROP — window forms the
       workspace backdrop.
        
    
 
 
- 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:
    
- Ph_WM_FFRONT—either
        Ph_WM_EVSTATE_FFRONT or
        Ph_WM_EVSTATE_FFRONT_DISABLE.
        
        
        
      
 
- Ph_WM_FOCUS—either
        Ph_WM_EVSTATE_FOCUS or
        Ph_WM_EVSTATE_FOCUSLOST.
        
        
        
      
 
- Ph_WM_HIDE—either
        Ph_WM_EVSTATE_HIDE or
        Ph_WM_EVSTATE_UNHIDE.
        
        
        
      
 
- Ph_WM_MENU—either
        Ph_WM_EVSTATE_MENU or
        Ph_WM_EVSTATE_MENU_FINISH.
        
        
        
        
        
        
 
- Ph_WM_EVSTATE_FORCE—forces execution of 
         the requested operation irrelevant of the managed_f 
         value. For example, if the managed_f of a 
         window doesn't have Ph_WM_FOCUS set, but you need to give
         focus to the window, you must set the Ph_WM_STATE_FORCE bit
         in the event_state.
      
 
- All other toggle events—either
        Ph_WM_EVSTATE_PERFORM or
        Ph_WM_EVSTATE_INVERSE.
        
        
    
 
 
- 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.
 
Photon
PhDim_t,
PhEvent_t,
PhPoint_t,
PtForwardWindowEvent(),
PtForwardWindowTaskEvent()
Window Management
chapter of the Photon Programmer's Guide.