Next: The Xlib API
Up: Programming the User Interface
Previous: Input and Output
Contents
Figure 12.12:
Interaction between events, the X server, and application programs.
|
Figure 12.13:
The X Window Programming APIs.
|
- The X Window software was written at MIT as part of the Athena project. X Windows allows a program to use the display of a computer other than the computer the program is running on if the owner of that computer permits it.
- X Windows separates the display and event handling from application programs. Instead, an application program communicates with the X server via a socket interface.
- The X server handles keyboard input, mouse input, and the display screen. For example, when the user clicks the mouse, the X server detects where the mouse event occurred and sends the mouse event to the appropriate application program.
- When a window on the display is uncovered, the X server sends the appropriate application a window expose event.
- Window expose events occur when part or all of a window becomes visible and therefore needs to be redrawn.
- The application will usually respond by sending back draw operations to the X server to redraw the window contents.
- Figure 12.12 shows the interaction between actual user events, the X server event queue, and application program event queues.
- As shown in Figure 12.13, X Window applications can use any combination of the lowlevel Xlib API, the X toolkit (or the X intrinsics), the Athena Widget set, and the Motif Widget set.
- The Xlib library provides the interface between application programs and the (possibly remote) X server via a socket interface.
Subsections
Next: The Xlib API
Up: Programming the User Interface
Previous: Input and Output
Contents
Cem Ozdogan
2007-05-16