(unless (null-pointer-p (g-value-get-boxed gvalue))
(cond
((subtypep boxed-type 'g-boxed-ref) (convert-g-boxed-ref-from-pointer (g-value-get-boxed gvalue) boxed-type (make-instance 'g-boxed-ref-type :class-name boxed-type :owner :foreign)))
- (t (parse-g-boxed (g-value-get-boxed gvalue) boxed-type))))))
\ No newline at end of file
+ (t (parse-g-boxed (g-value-get-boxed gvalue) boxed-type))))))
+
+(defmethod parse-gvalue-for-type (gvalue-ptr (type-numeric (eql +g-type-boxed+)))
+ (if (= (g-type-numeric (gvalue-type gvalue-ptr)) type-numeric)
+ (convert-from-foreign (g-value-get-boxed gvalue-ptr) '(glib:gstrv :free-from-foreign nil))
+ (parse-gvalue-boxed gvalue-ptr)))
+
+(defmethod set-gvalue-for-type (gvalue-ptr (type-numeric (eql +g-type-boxed+)) value)
+ (if (= (g-type-numeric (gvalue-type gvalue-ptr)) type-numeric)
+ (g-value-set-boxed gvalue-ptr (convert-to-foreign value '(glib:gstrv :free-from-foreign nil)))
+ (set-gvalue-boxed gvalue-ptr value)))
+
(unwind-protect
(g-object-set-property (ensure-object-pointer object)
property-name value)
- (g-value-unset value))))
\ No newline at end of file
+ (g-value-unset value))))
+
+(defmethod parse-gvalue-for-type (gvalue-ptr (type-numeric (eql +g-type-object+)))
+ (parse-gvalue-object gvalue-ptr))
+
+(defmethod parse-gvalue-for-type (gvalue-ptr (type-numeric (eql +g-type-interface+)))
+ (parse-gvalue-object gvalue-ptr))
+
+(defmethod set-gvalue-for-type (gvalue-ptr (type-numeric (eql +g-type-object+)) value)
+ (set-gvalue-object gvalue-ptr value))
+
+(defmethod set-gvalue-for-type (gvalue-ptr (type-numeric (eql +g-type-interface+)) value)
+ (set-gvalue-object gvalue-ptr value))
+
(defmethod parse-gvalue-for-type (gvalue-ptr (type-numeric (eql +g-type-pointer+)))
(g-value-get-pointer gvalue-ptr))
-(defmethod parse-gvalue-for-type (gvalue-ptr (type-numeric (eql +g-type-boxed+)))
- (if (= (g-type-numeric (gvalue-type gvalue-ptr)) type-numeric)
- (convert-from-foreign (g-value-get-boxed gvalue-ptr) '(glib:gstrv :free-from-foreign nil))
- (parse-gvalue-boxed gvalue-ptr)))
-
(defmethod parse-gvalue-for-type (gvalue-ptr (type-numeric (eql +g-type-param+)))
(parse-g-param-spec (g-value-get-param gvalue-ptr)))
-(defmethod parse-gvalue-for-type (gvalue-ptr (type-numeric (eql +g-type-object+)))
- (parse-gvalue-object gvalue-ptr))
-
-(defmethod parse-gvalue-for-type (gvalue-ptr (type-numeric (eql +g-type-interface+)))
- (parse-gvalue-object gvalue-ptr))
-
(defgeneric set-gvalue-for-type (gvalue-ptr type-numeric value))
(defmethod set-gvalue-for-type (gvalue-ptr type-numeric value)
(defmethod set-gvalue-for-type (gvalue-ptr (type-numeric (eql +g-type-pointer+)) value)
(g-value-set-pointer gvalue-ptr value))
-(defmethod set-gvalue-for-type (gvalue-ptr (type-numeric (eql +g-type-boxed+)) value)
- (if (= (g-type-numeric (gvalue-type gvalue-ptr)) type-numeric)
- (g-value-set-boxed gvalue-ptr (convert-to-foreign value '(glib:gstrv :free-from-foreign nil)))
- (set-gvalue-boxed gvalue-ptr value)))
-
(defmethod set-gvalue-for-type (gvalue-ptr (type-numeric (eql +g-type-param+)) value)
(error "Setting of GParam is not implemented"))
-(defmethod set-gvalue-for-type (gvalue-ptr (type-numeric (eql +g-type-object+)) value)
- (set-gvalue-object gvalue-ptr value))
-
-(defmethod set-gvalue-for-type (gvalue-ptr (type-numeric (eql +g-type-interface+)) value)
- (set-gvalue-object gvalue-ptr value))
-
;;Enums
(defvar *registered-enum-types* (make-hash-table :test 'equal))