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


4.13.7 get-g-interface-definition

— Function: get-g-interface-definition
     get-g-interface-definition type &optional lisp-name-package) => definition
type
A string naming the GInterface type
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 *package*
definition
A Lisp form that when evaluated defines the GInterface.

Uses GObject introspection capabilities to automatically produce the definition of GInterface. The foreign library that defines the GInterface type should be loaded.

See Generating names for CLOS classes and accessors for information about used method for generating names.

Example:

     (get-g-interface-definition "GtkActivatable")
     =>
     (DEFINE-G-INTERFACE "GtkActivatable" GTK-ACTIVATABLE
                         (:EXPORT T :TYPE-INITIALIZER "gtk_activatable_get_type")
                         (USE-ACTION-APPEARANCE
                          GTK-ACTIVATABLE-USE-ACTION-APPEARANCE
                          "use-action-appearance" "gboolean" T T)
                         (RELATED-ACTION GTK-ACTIVATABLE-RELATED-ACTION
                          "related-action" "GtkAction" T T))