Window server events

Window server events are an important part of the application framework. They allow applications to receive information regarding key presses, pointer activities, application switches, and focus transitions.

Every application has at least a UI controller, which is the root for all other controls owned by the application. When an event occurs under the window server, the window server passes the event to the UI controller and possible other controls, depending on the event and the architecture of your application.

For more information on the window server, see Introduction to the window server.

The framework provides different functions to handle each type of event separately. You must implement these functions for the events to be handled by your application.

All the window server event types are defined in the w32std.h header, and are as follows:

enum TEventCode 
    { 
    EEventNull, 
    EEventKey, 
    EEventKeyUp, 
    EEventKeyDown, 
    EEventModifiersChanged, 
    EEventPointer, 
    EEventPointerEnter, 
    EEventPointerExit, 
    EEventPointerBufferReady, 
    EEventDragDrop, 
    EEventFocusLost, 
    EEventFocusGained, 
    EEventSwitchOn, 
    EEventWindowGroupsChanged, 
    EEventErrorMessage, 
    EEventMessageReady, 
    EEventMarkInvalid, 
    EEventSwitchOff, 
    EEventKeySwitchOff, 
    EEventScreenDeviceChanged, 
    EEventFocusGroupChanged, 
    EEventCaseOpened, 
    EEventCaseClosed, 
    EEventWindowGroupListChanged, 
    EEventWindowVisibilityChanged, 
    EEventKeyRepeat=100, 
    EEventDirectScreenAccessBegin = 200, 
    EEventDirectScreenAccessEnd, 
    EEventHeartbeatTimerStateChange, 
    EEventUser = 1000, 
    }; 

The following window server events have a special function: