Next: , Previous: get-g-type-definition, Up: Generating type definitions by introspection


13.10 Specifying additional properties for CLOS classes

Some properties are not exposed through GObject introspection facilities, but are rather present as a pair of functions (class_get_property, class_set_property). 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 *additional-properties* to get this information.

Variable *additional-properties* contains a plist that maps GType names to a list of properties definitions (See define-g-object-class for syntax of properties definitions).

To supply the bindings generator with this information, bind *additional-properties* to such list when the generator is run.

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)))