First, objects have been created for all C data types. These data types include items such as Display, Drawable, GC, and Font. These objects were named by prefixing the Xlib data type name with Cg and removing any leading X. For example, the Xlib type Display becomes the Smalltalk class CgDisplay.XDrawRectangle(display, drawable, gc, x, y, width, height);
• If the first parameter of the C function is a display and the second parameter is a graphics resource, such as a drawable or a graphics context, the second parameter indicates the receiver of the equivalent Smalltalk message. Graphics resources such as a CgDrawable know the display on which they are located, so it is not necessary to specify the display in the Smalltalk equivalent. If the second parameter is not a graphics resource, the first parameter is used to indicate the receiver.
![]() |