#:get-flags-items
#:stable-pointer-value
#:g-value-type
- #:create-g-closure
#:g-object-call-constructor
#:g-object-call-get-property
#:g-object-call-set-property
#:g-boxed-foreign
#:boxed-related-symbols
#:define-boxed-opaque-accessor
- #:glib-defcallback)
+ #:glib-defcallback
+ #:create-signal-handler-closure
+ #:save-handler-to-object
+ #:retrieve-handler-from-object
+ #:delete-handler-from-object)
(:documentation
"CL-GTK2-GOBJECT is a binding to GObject type system.
For information on GObject, see its @a[http://library.gnome.org/devel/gobject/stable/]{documentation}.
(in-package :gobject)
+;;; Signal handler closures
+
(defcstruct lisp-signal-handler-closure
(:parent-instance g-closure)
(:object :pointer)
(let ((id (find-free-signal-handler-id object))
(handlers (g-object-signal-handlers object)))
(if id
- (setf (aref handlers id) handler)
- (vector-push-extend handler handlers))))
+ (progn (setf (aref handlers id) handler) id)
+ (progn (vector-push-extend handler handlers) (1- (length handlers))))))
(defun retrieve-handler-from-object (object handler-id)
(aref (g-object-signal-handlers object) handler-id))
(g-value-unset return-value))))
(iter (for i from 0 below (1+ params-count))
(g-value-unset (mem-aref params 'g-value i))))))))
+
+(defcfun (disconnect-signal "g_signal_handler_disconnect") :void
+ (object g-object)
+ (handler-id :ulong))
+
+(export 'disconnect-signal)