A callback handler is defined as:
(defun handler (widget call-data &rest client-data) ....)
The WIDGET argument is the widget for which the callback is
being invoked.
The CLIENT-DATA &rest argument allows the
programmer to pass an
arbitrary number of Lisp objects to the callback
procedure1.
The CALL-DATA argument provides the information passed by Motif
regarding the reason for the callback and any other relevant
information.
The XEvent which generated the event may be accessed by:
(with-callback-event (event call-data) ....)
Action procedures are used in translation tables as:
<Key> q: Lisp(SOME-PACKAGE:MY-FUNCTION)\n
Action procedures may access their event information by:
(with-action-event (event call-data) ....)
Where callback data is passed in structures, XEvents are represented as aliens. This is because XEvents are rather large. This saves the consing of large structures for each event processed.
Actions to be taken after the callback handler terminates the server's callback loop can be registered by:
(with-callback-deferred-actions <forms>)