Event Driven Programming Systems
Typical Window System Queues
X Windows
With acknowledgements to David Collins.
The Event Model
- Events, generated by devices or event handlers. In OO
terms these are messages to objects
- Event queues distribute events to event handlers. The
destination for an event may be determined by a state variable
such a mouse location or by an event handler having registered
itself as a recipient for the particular event.
- Event handlers that receive and process events. Event
handlers correspond to objects, and the processing routines to
methods or members functions. Event handlers can generate
further events.
- Templates describe the behaviour of event handlers. They
correspond to classes (as opposed to objects.
Event handlers can be specified using a combination of text and
graphics. The text describes the object and its attributes and
the graphics form a state diagram showing the event handler
transitions.
As we shall see the process of writing a GUI program is
inherently more complex that that for a tty interface. The role
of a window manager is to relieve the programmer of some of the
tasks involved in managing the presentation of windows.
Return to
GUI home page.
Last Changed: 8 May 1995