To wait while callbacks are being handled, use one of:
handle_events handle_events(-ExitCond) handle_events(-ExitCond, +Context)
handle_events will enter a failure-driven loop listening for
events on all open ProXL displays, and executing callbacks. It exits
when either any of the callbacks binds its exit variable to a
value that unifies with ExitCond, or when all ProXL Windows that
have associated callbacks have been destroyed (in which case ExitCond
will be unified with
If the Displayable is omitted, the default Display is used.
If ExitCond is omitted, it defaults to
Context is passed to any callbacks that want it, and may be used to cause callbacks to behave differently in different contexts. If omitted, it defaults to an anonymous variable.
For backward compatibility,
handle_events(+Displayable, -ExitCond, +Context)
is equivalent to
handle_events(ExitCond, Context). The
Displayable is ignored.