X11workbench Toolkit
1.0
|
The 'Core' API for the X11workbench Toolkit identifies those functions that implement the most essential functions, such as the creation and destruction of windows, and the main event loop, All programs using the API must correctly initialize and make use of these functions in lieu of calling their X11 counterparts.
Typically, your application will need a basic event handling loop, such as:
The call to WBDispatch will process the retrieved events by passing them to the appropriate registered callback functions.
The 'WBDelay()' call is a way of ensuring that your application does not 'spin' with 100% CPU utilization while waiting for an event. This can help with battery life, and so on.
If you have no background processing to perform, you can use WBNextEvent() instead of WBCheckGetEvent(), and avoid the need of the surrounding 'if' block.