EZ
Up Prev Next Contents


4.1 X Events

Internally, event handling is based on Xlib's event queuing mechanism. EZwgl does not queue events itself. It just reads events continuousely from Xlib's event queue and processes them when they arrive. In between, it checks and processes timer events and file events.

Nevertheless, EZwgl keeps a few global variables to remember the mouse-button-state, pointer-position and last pressed-key. Furthermore, the EZwgl event dispatcher passes a symbolic name of events to all private event handlers. This feature, combined with the global variables, simplifies the complexity of writing simple event handlers. For sophisticated event handlers, unfortunately, one has to use XEvents.

The following is the event mask used to create widget windows for most of the widgets in EZwgl.

KeyPressMask|ButtonReleaseMask|ExposureMask| ButtonPressMask|StructureNotifyMask|ButtonMotionMask| EnterWindowMask|LeaveWindowMask|PointerMotionMask| KeymapStateMask

In other words, most EZ widgets accept keyboard, button, pointer motion, enter/leave Window, exposure and window configuration events.


HTML Documentation Maintainance:Arturo Espinosa <arturo@nuclecu.unam.mx>