X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=glib%2Fgobject.meta.lisp;h=22aab83862932692be52e262d804fdc1fe339445;hb=f6901bfb5c96100ff00e23f62237ced69c7ea015;hp=b5d3f4c818be956384faa873d66b8cc13652e701;hpb=af90ac5cff9dbb5f44677cc4726eee60ab88bc5d;p=cl-gtk2.git diff --git a/glib/gobject.meta.lisp b/glib/gobject.meta.lisp index b5d3f4c..22aab83 100644 --- a/glib/gobject.meta.lisp +++ b/glib/gobject.meta.lisp @@ -38,7 +38,7 @@ (defmethod initialize-instance :after ((object gobject-class) &key &allow-other-keys) (register-object-type (gobject-class-g-type-name object) (class-name object)) - (at-init (initialize-gobject-class-g-type object))) + (at-init (object) (initialize-gobject-class-g-type object))) (defclass gobject-direct-slot-definition (standard-direct-slot-definition) ((g-property-type :initform nil @@ -211,20 +211,22 @@ (property-unreadable-error () nil))) (defmethod slot-value-using-class ((class gobject-class) object (slot gobject-property-effective-slot-definition)) - (g-object-call-get-property object + (g-object-call-get-property (pointer object) (gobject-property-effective-slot-definition-g-property-name slot) (gobject-effective-slot-definition-g-property-type slot))) (defmethod (setf slot-value-using-class) (new-value (class gobject-class) object (slot gobject-property-effective-slot-definition)) - (g-object-call-set-property object + (g-object-call-set-property (pointer object) (gobject-property-effective-slot-definition-g-property-name slot) new-value (gobject-effective-slot-definition-g-property-type slot))) +(defmethod slot-boundp-using-class ((class gobject-class) object (slot gobject-fn-effective-slot-definition)) + (not (null (gobject-fn-effective-slot-definition-g-getter-fn slot)))) + (defmethod slot-value-using-class ((class gobject-class) object (slot gobject-fn-effective-slot-definition)) (let ((fn (gobject-fn-effective-slot-definition-g-getter-fn slot))) - (when fn - (funcall fn object)))) + (funcall fn object))) (defmethod (setf slot-value-using-class) (new-value (class gobject-class) object (slot gobject-fn-effective-slot-definition)) (funcall (gobject-fn-effective-slot-definition-g-setter-fn slot) object new-value))