- X Window System Event Processing
- X Window System Components
- xevnts: A Sample Program
- Registering Procedures
- Where to Go from Here, and Code Listings
- Definition and Elaboration of Terms
Definition and Elaboration of Terms
Widget
A widget is an element of a graphical user interface that displays information or provides a specific way for a user to interact with the application.
A button widget is created as an instance of the commandWidget in Athena, and the xmPushButtonWidget when using Motif.
The button event structure is as follows:
typedef struct { int type; unsigned long serial; Bool send_event; Display *display; Window window; Window root; Window subwindow; Time time; int x, y; int x_root, y_root; unsigned int state; unsigned int button; Bool same_screen; } XButtonEvent;
Next, the leave and enter notify event structure is as follows:
typedef struct { int type; unsigned long serial; Bool send_event; Display *display; Window window; Window root; Window subwindow; Time time; int x, y; int x_root,y_root; int mode; int detail; Bool same_screen; Bool focus; int state; } XCrossingEvent;
Window
A window is an area of the application that provides function or output. Windows are nested (layered) in order to form buttons or message windows, for instance.
Xlib
An application based on Intrinsics (Xt) is required only to invoke X Library (Xlib) functions in order to accomplish graphic primitives.
Graphic primitives are the many drawing routines provided by Xlib:
XDrawLine XDrawLines XDrawArc XDrawArcs XDrawString XFillPolygon XFillArc
GUI
GUI stands for graphical user interface, which is how a user interacts with an application.
Registered Procedure
A registered procedure may be a callback, event handler, or translation.
Buttons
The use of the word button throughout is meant generically as either the Motif pushButtonWidget or the Athena commandWidget.
Asynchronous Communication
Asynchronous communication implies that the X Server is sending events, whether or not the client is ready to receive them.
XtNCallback
Not apparent in its name, XtNcallback corresponds to a button press action that occurs in the widget.