Previous: , Up: Top   [Contents]


10 Summary of differences with CLM

X objects (e.g. windows, fonts, pixmaps) are represented as CLX objects rather than the home-brewed representations of CLM. As a consequence, this requires that CLX be present in the core. If this were to cause unacceptable core bloat, a skeletal CLX could be built which only supported the required functionality.

Stricter naming conventions are used, in particular for enumerated types. A value named XmFOO_BAR in C will be called :foo-bar in Lisp, consistently. Abbreviations such as :form (for :attach-form) are not allowed since they are often ambiguous. Where CLM abbreviates callback names (e.g. XmNactivateCallback becomes :activate), we do not (e.g. :activate-callback).

Some differently named functions which can be resolved without undo hassle.

Passing of information to callbacks and event handlers. In CLM, callback handlers are defined as:

(defun handler (widget client-data &rest call-data) .... )

The CLIENT-DATA argument is some arbitrary data which was stashed with the callback when it was registered by the application. The call-data represents the call-data information provided by Motif to the callback handler. Each data item of the callback information is passed as a separate argument. In our world, callback handlers are defined as:

(defun handler (widget call-data &rest client-data) .... )

The call-data is packaged into a structure and passed as a single argument and the user is allowed to register any number of items to be passed to the callback as client-data. Being able to pass several items of client-data is more convenient for the programmer and the packaging of the call-data information is more appealing than splitting it apart into separate arguments. Also, CLM only transports a limited subset of the available callback information. We transport all information. Event handlers differ in the same way. The client-data is the &rest arg and the event info is packaged as a single object. Accessing the generating event in a callback handler is done in the following manner:

(defun handler (widget call-data &rest client-data)
  (with-callback-event (event call-data)
    ;; Access slots of event such as:
    ;;  (event-window event) or
    ;;  (button-event-x event)
  ))

Previous: , Up: Top   [Contents]