|
Next: Xlib And Graphics Up: Some Basic Xlib Previous: Properties And Atoms
EventsEvents are produced by the server in response to certain actions, such as a key or mouse button press, or when a window becomes visible after being obscured. Each event has a name like KeyPress, ButtonPress or Expose and some associated data specific to the type of event, such as the coordinates of the mouse pointer within the window etc. All the information regarding an event is held in an event structure. Xlib provides a mechanism for clients to select which events they wish each of their windows to receive from the server. If a window has not selected to receive a particular event, and that event has occurred in that window, the event propagates upward through the window hierarchy until it reaches a window that has either selected it or has decided that it will not propagate any further. To handle events, an application should implement an infinite loop, which awaits an event and then possibly takes some appropriate action. The loop is usually terminated by an event causing a program termination routine to be invoked.
JR Pitchers Wed May 3 16:45:04 BST 1995 |
|||||||||||||||||
With any suggestions or questions please feel free to contact us |