-(defbinding %container-child-get-property () nil
- (container container)
- (child widget)
- (property-name string)
- (value gvalue))
-
-(defbinding %container-child-set-property () nil
- (container container)
- (child widget)
- (property-name string)
- (value gvalue))
-
-(defmethod compute-virtual-slot-accessors
- ((class child-class) (slotd effective-child-slot-definition) direct-slotds)
- (with-slots (type) slotd
- (let ((pname (slot-definition-pname (first direct-slotds)))
- (type-number (find-type-number type)))
- (list
- #'(lambda (object)
- (with-slots (parent child) object
- (with-gc-disabled
- (let ((gvalue (gvalue-new type-number)))
- (%container-child-get-property parent child pname gvalue)
- (unwind-protect
- (funcall
- (intern-reader-function type)
- gvalue +gvalue-value-offset+)
- (gvalue-free gvalue t))))))
- #'(lambda (value object)
- (with-slots (parent child) object
- (with-gc-disabled
- (let ((gvalue (gvalue-new type-number)))
- (funcall
- (intern-writer-function type)
- value gvalue +gvalue-value-offset+)
- (%container-child-set-property parent child pname gvalue)
- (funcall
- (intern-destroy-function type)
- gvalue +gvalue-value-offset+)
- (gvalue-free gvalue nil)
- value))))))))
-
-
-(defmethod pcl::add-reader-method ((class child-class) generic-function slot-name)
+(defmethod compute-effective-slot-definition-initargs ((class container-child-class) direct-slotds)
+ (if (eq (slot-definition-allocation (first direct-slotds)) :property)
+ (nconc
+ (list :pname (most-specific-slot-value direct-slotds 'pname))
+ (call-next-method))
+ (call-next-method)))
+
+(defmethod slot-readable-p ((slotd effective-child-slot-definition))
+ (declare (ignore slotd))
+ t)
+
+(defmethod compute-slot-reader-function ((slotd effective-child-slot-definition) &optional signal-unbound-p)
+ (declare (ignore signal-unbound-p))
+ (let* ((type (slot-definition-type slotd))
+ (pname (slot-definition-pname slotd))
+ (reader (reader-function type :ref :get)))
+ #'(lambda (object)
+ (with-slots (parent child) object
+ (with-memory (gvalue +gvalue-size+)
+ (glib::%gvalue-init gvalue (find-type-number type))
+ (%container-child-get-property parent child pname gvalue)
+ (funcall reader gvalue +gvalue-value-offset+))))))
+
+(defmethod slot-writable-p ((slotd effective-child-slot-definition))
+ (declare (ignore slotd))
+ t)
+
+(defmethod compute-slot-writer-function ((slotd effective-child-slot-definition))
+ (let* ((type (slot-definition-type slotd))
+ (pname (slot-definition-pname slotd))
+ (writer (writer-function type :temp t))
+ (destroy (destroy-function type :temp t)))
+ #'(lambda (value object)
+ (with-slots (parent child) object
+ (with-memory (gvalue +gvalue-size+)
+ (glib::%gvalue-init gvalue (find-type-number type))
+ (funcall writer value gvalue +gvalue-value-offset+)
+ (%container-child-set-property parent child pname gvalue)
+ (funcall destroy gvalue +gvalue-value-offset+))
+ value))))
+
+
+(defmethod add-reader-method ((class container-child-class) generic-function slot-name #?(sbcl>= 1 0 2)slot-documentation)