Package: gobject

Class gobject:object

Superclasses

common-lisp:standard-object, common-lisp:t

Documented Subclasses

gdk-pixbuf:pixbuf, gdk-pixbuf:pixbuf-animation, gdk-pixbuf:pixbuf-animation-iter, gdk-pixbuf:pixbuf-loader, gdk:cicp-params, gdk:clipboard, gdk:content-provider, gdk:cursor, gdk:device, gdk:device-tool, gdk:display, gdk:display-manager, gdk:dmabuf-texture-builder, gdk:drag, gdk:drag-surface, gdk:draw-context, gdk:drop, gdk:frame-clock, gdk:monitor, gdk:paintable, gdk:seat, gdk:snapshot, gdk:surface, gdk:toplevel, gio:action, gio:action-group, gio:action-map, gio:app-info, gio:app-launch-context, gio:application-command-line, gio:async-result, gio:cancellable, gio:file, gio:file-info, gio:icon, gio:list-model, gio:loadable-icon, gio:menu-attribute-iter, gio:menu-item, gio:menu-link-iter, gio:menu-model, gio:notification, gio:permission, gobject:binding, gobject:initially-unowned, gsk:renderer, gtk:accessible, gtk:actionable, gtk:alert-dialog, gtk:app-chooser, gtk:assistant-page, gtk:at-context, gtk:buildable, gtk:builder, gtk:builder-scope, gtk:cell-area-context, gtk:cell-editable, gtk:cell-layout, gtk:color-chooser, gtk:color-dialog, gtk:column-view-column, gtk:column-view-row, gtk:constraint, gtk:constraint-guide, gtk:constraint-target, gtk:editable, gtk:entry-buffer, gtk:event-controller, gtk:file-chooser, gtk:file-dialog, gtk:file-launcher, gtk:filter, gtk:font-chooser, gtk:font-dialog, gtk:icon-theme, gtk:im-context, gtk:layout-child, gtk:layout-manager, gtk:list-header, gtk:list-item, gtk:list-item-factory, gtk:native, gtk:native-dialog, gtk:notebook-page, gtk:orientable, gtk:page-setup, gtk:print-backend, gtk:print-context, gtk:print-dialog, gtk:print-job, gtk:print-operation-preview, gtk:print-settings, gtk:printer, gtk:recent-manager, gtk:root, gtk:scrollable, gtk:section-model, gtk:shortcut, gtk:shortcut-action, gtk:shortcut-manager, gtk:shortcut-trigger, gtk:sorter, gtk:string-object, gtk:style-context, gtk:style-provider, gtk:symbolic-paintable, gtk:text-buffer, gtk:text-child-anchor, gtk:text-mark, gtk:text-tag, gtk:tooltip, gtk:tree-drag-dest, gtk:tree-drag-source, gtk:tree-list-row, gtk:tree-model, gtk:tree-selection, gtk:tree-sortable, gtk:uri-launcher, gtk:window-group, pango:cairo-font, pango:cairo-font-map, pango:context, pango:coverage, pango:font, pango:font-face, pango:font-map, pango:fontset, pango:layout, pango:renderer

Direct Slots

has-reference
Holds the true value when the instance is successfully registered.
pointer
Holds a foreign pointer to the C instance of a GObject.

Details

The g:object class is the fundamental type providing the common attributes and methods for all object types in GTK, Pango and other libraries. The g:object class provides methods for object construction and destruction, property access methods, and signal support.

Lisp Implementation

In the Lisp implementation two slots are added. The pointer slot holds the foreign pointer to the C instance of the object. The has-reference slot is initialized to the true value during creation of an object. See the slot access functions for examples.

Signal Details

The "notify" signal
lambda (object pspec)    :no-hooks    
object
The g:object instance which received the signal.
pspec
The g:param-spec instance of the property which changed.
The signal is emitted on an object when one of its properties has been changed. Note that getting this signal does not guarantee that the value of the property has actually changed, it may also be emitted when the setter for the property is called to reinstate the previous value. This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g:signal-connect function call, like this:
(g:signal-connect switch "notify::active"
   (lambda (widget pspec)
     (declare (ignore pspec))
     (if (gtk:switch-active widget)
         (setf (gtk:label-label label) "The Switch is ON")
         (setf (gtk:label-label label) "The Switch is OFF"))))    
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
 

Returned by

Slot Access Functions

See also

2024-12-14