+
+@code{get-g-class-definition type &optional lisp-name-package) @result{} definition}
+
+@table @var
+@item @var{type}
+A string naming the GObject type
+@item @var{lisp-name-package}
+A package that will be used as a package for generated symbols (type name, accessor names). If not specified, symbols are interned in @code{*package*}
+@item @var{definition}
+A Lisp form that when evaluated defines the GObject.
+@end table
+
+Uses GObject introspection capabilities to automatically produce the definition of GClass. The foreign library that defines the GObject type should be loaded.
+
+See @ref{Generating names for CLOS classes and accessors} for information about used method for generating names.
+
+Example:
+@example
+(get-g-class-definition "GtkButton")
+@result{}
+(DEFINE-G-OBJECT-CLASS "GtkButton" GTK-BUTTON
+ (:SUPERCLASS GTK-BIN :EXPORT T :INTERFACES
+ ("AtkImplementorIface" "GtkActivatable" "GtkBuildable")
+ :TYPE-INITIALIZER "gtk_button_get_type")
+ ((LABEL GTK-BUTTON-LABEL "label" "gchararray" T T)
+ (IMAGE GTK-BUTTON-IMAGE "image" "GtkWidget" T T)
+ (RELIEF GTK-BUTTON-RELIEF "relief" "GtkReliefStyle" T
+ T)
+ (USE-UNDERLINE GTK-BUTTON-USE-UNDERLINE "use-underline"
+ "gboolean" T T)
+ (USE-STOCK GTK-BUTTON-USE-STOCK "use-stock" "gboolean"
+ T T)
+ (FOCUS-ON-CLICK GTK-BUTTON-FOCUS-ON-CLICK
+ "focus-on-click" "gboolean" T T)
+ (XALIGN GTK-BUTTON-XALIGN "xalign" "gfloat" T T)
+ (YALIGN GTK-BUTTON-YALIGN "yalign" "gfloat" T T)
+ (IMAGE-POSITION GTK-BUTTON-IMAGE-POSITION
+ "image-position" "GtkPositionType" T T)))
+@end example
+
+@node Specifying additional properties for CLOS classes
+@section Specifying additional properties for CLOS classes
+
+Some properties are not exposed through GObject introspection facilities, but are rather present as a pair of functions (@code{class_get_property}, @code{class_set_property}). @code{gobject-class} metaclass supports such properties. For these properties to be included in automatically generated class definitions, they should be made known to the generator.
+
+Definitions generator uses variable @code{*additional-properties*} to get this information.
+
+Variable @code{*additional-properties*} contains a plist that maps GType names to a list of properties definitions (See @ref{define-g-object-class} for syntax of properties definitions).
+
+To supply the bindings generator with this information, bind @code{*additional-properties*} to such list when the generator is run.
+
+Example:
+@example
+(("GtkTreeViewColumn"
+ (:cffi gtk::tree-view
+ gtk::tree-view-column-tree-view
+ g-object "gtk_tree_view_column_get_tree_view" nil)
+ (:cffi gtk::sort-column-id
+ gtk::tree-view-column-sort-column-id
+ :int "gtk_tree_view_column_get_sort_column_id" "gtk_tree_view_column_set_sort_column_id")
+ (:cffi gtk::cell-renderers
+ gtk::tree-view-column-cell-renderers
+ (glist g-object :free-from-foreign t) "gtk_tree_view_column_get_cell_renderers" nil))
+ ("GtkTreeSelection"
+ (:cffi gtk::mode
+ gtk::tree-selection-mode
+ gtk::selection-mode "gtk_tree_selection_get_mode" "gtk_tree_selection_set_mode")
+ (:cffi gtk::select-function
+ gtk::tree-selection-select-function
+ nil gtk::tree-selection-get-selection-function gtk::tree-selection-set-select-function)))
+@end example
+
+@node Generating names for CLOS classes and accessors
+@section Generating names for CLOS classes and accessors
+
+Names of types are generated by mapping @code{CamelCaseNames} to @code{dash-separated-names} and interning them in specified package. Additionally, prefix from beginning of the name may be stripped (@code{"GtkWidget"} has prefix @code{"Gtk"}, after stripping it maps to @code{widget}). Some names may require special processing (e.g., @code{"GObject"}, @code{"GInitiallyUnowned"} should map to class names in @code{gobject} package; @code{"GtkWindow"} and @code{"GdkWindow"} should receive different @code{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 @code{class-slot}: @code{container-child}, @code{button-label}, etc.
+
+Name generation affected by following variables:
+@itemize
+@item @var{*strip-prefix*}
+A string variable specifying the prefix that should to be stripped from the names to generate symbols (e.g., if @code{(equal "Gtk" *strip-prefix*)}, then type named @code{"GtkWidget"} will map to class named @code{widget}.
+@item @var{*lisp-name-exceptions*}
+A plist mapping from strings (type names) to symbols (class names) that have special name processing.
+Example:
+@example
+`(("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))))
+@end example
+@end itemize
+