Next: generate-types-hierarchy-to-file, Previous: Specifying additional properties for CLOS classes, Up: Generating type definitions by introspection
Names of types are generated by mapping CamelCaseNames
to dash-separated-names
and interning them in specified package. Additionally, prefix from beginning of the name may be stripped ("GtkWidget"
has prefix "Gtk"
, after stripping it maps to widget
). Some names may require special processing (e.g., "GObject"
, "GInitiallyUnowned"
should map to class names in gobject
package; "GtkWindow"
and "GdkWindow"
should receive different symbol-name
s so that they can both be imported in one package).
Accessors for slots are generated by concatenating class name, dash and slot name, producing names like class-slot
: container-child
, button-label
, etc.
Name generation affected by following variables:
(equal "Gtk" *strip-prefix*)
, then type named "GtkWidget"
will map to class named widget
.
`(("GObject" gobject:g-object) ("GtkObject" ,(intern "GTK-OBJECT" (find-package :gtk))) ("GInitiallyUnowned" gobject::g-initially-unowned) ("GtkWindow" ,(intern "GTK-WINDOW" (find-package :gtk))) ("GtkUIManager" ,(intern "UI-MANAGER" (find-package :gtk))) ("GtkUIManagerItemType" ,(intern "UI-MANAGER-ITEM-TYPE" (find-package :gtk))))