Smalltalk classes have been created for most C data types. These classes are named by prefixing the Motif data structure name with 'Cw' (after first removing any X, Xt, or Xm prefix). For example, the Motif data structure Widget is represented by the Smalltalk class CwWidget.Motif functions have corresponding Smalltalk methods. To understand this mapping, consider the following function XmListSelectItem:void XmListSelectItem (widget, item, notify)In the Common Widgets subsystem, the XmListSelectItem call has been mapped to an instance method of the class CwList:selectItem: item notify: notifyThe C type Widget, in this case, is mapped to the Smalltalk class CwList because the XmListSelectItem function applies only to list widgets. The XmList prefix has been stripped off, because such C-specific prefixing is unnecessary in Smalltalk.Where C types have appropriate corresponding Smalltalk base classes, C types are mapped to these. For example, the C type XmString is mapped to the Smalltalk class String, and the C type Boolean is mapped to the Smalltalk class Boolean.
|