Listing 2. Macros

#define EnterWindowMask     GR_EVENT_MASK_MOUSE_ENTER
#define LeaveWindowMask     GR_EVENT_MASK_MOUSE_EXIT
#define ButtonPressMask     GR_EVENT_MASK_BUTTON_DOWN
#define ButtonReleaseMask   GR_EVENT_MASK_BUTTON_UP
#define KeyPressMask        GR_EVENT_MASK_KEY_DOWN
#define KeyReleaseMask      GR_EVENT_MASK_KEY_UP
#define ExposureMask        GR_EVENT_MASK_EXPOSURE
#define SubstructureNotifyMask
        
#define EnterNotify         GR_EVENT_TYPE_MOUSE_ENTER
#define LeaveNotify         GR_EVENT_TYPE_MOUSE_EXIT
#define ButtonPress         GR_EVENT_TYPE_BUTTON_DOWN
#define ButtonRelease       GR_EVENT_TYPE_BUTTON_UP
#define KeyPress            GR_EVENT_TYPE_KEY_DOWN
#define KeyRelease          GR_EVENT_TYPE_KEY_UP
#define Expose              GR_EVENT_TYPE_EXPOSURE
#define ConfigureNotify     GR_EVENT_TYPE_CHLD_UPDATE