Specifying a Callback Procedure for a Window Event

A callback is a Prolog procedure that is invoked when a particular window system event occurs. Examples of window system events are key presses, mouse clicks, mouse motion and window exposure.

A common ProXL application will create and map all of its windows and register a callback with each event to which the application must respond. Whenever Prolog is waiting for input, it watches for ProXL events and executes the registered callbacks.