(define-g-object-class g-type-name name (&key (superclass 'g-object) (export t) interfaces type-initializer) (&rest property*)) property ::= (name accessor gname type readable writable) property ::= (:cffi name acessor type reader writer)
Parameters of define-g-object-class
class_get_type
.
Parameters of property
:
gobject-class
metaclass for information.
gobject-class
metaclass for information.
Macro that expands to defclass
for specified class. Additionally, if export
is true, it exports accessor names and name of a class.
Example:
(define-g-object-class "GtkContainer" container
(:superclass widget :export t :interfaces
("AtkImplementorIface" "GtkBuildable")
:type-initializer "gtk_container_get_type")
((border-width container-border-width "border-width" "guint" t t)
(resize-mode container-resize-mode "resize-mode" "GtkResizeMode" t t)
(child container-child "child" "GtkWidget" nil t)
(:cffi focus-child container-focus-child g-object "gtk_container_get_focus_child" "gtk_container_set_focus_child")
(:cffi focus-vadjustment container-focus-vadjustment (g-object adjustment) "gtk_container_get_focus_vadjustment" "gtk_container_set_focus_vadjustment")
(:cffi focus-hadjustment container-focus-hadjustment (g-object adjustment) "gtk_container_get_focus_hadjustment" "gtk_container_set_focus_hadjustment")))