((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))))))
-(defmethod parse-g-value-for-type (gvalue-ptr (type-numeric (eql +g-type-boxed+)))
+(defmethod parse-g-value-for-type (gvalue-ptr (type-numeric (eql +g-type-boxed+)) parse-kind)
+ (declare (ignore parse-kind))
(if (g-type= (g-value-type gvalue-ptr) (g-strv-get-type))
(convert-from-foreign (g-value-get-boxed gvalue-ptr) '(glib:gstrv :free-from-foreign nil))
(parse-g-value-boxed gvalue-ptr)))
`(t ,@forms)
`((equalp ,key ,value) ,@forms)))))))
-(defgeneric parse-g-value-for-type (gvalue-ptr type-numeric))
+(defgeneric parse-g-value-for-type (gvalue-ptr type-numeric parse-kind))
-(defmethod parse-g-value-for-type (gvalue-ptr type-numeric)
+(defmethod parse-g-value-for-type (gvalue-ptr type-numeric parse-kind)
(if (g-type= type-numeric (g-type-fundamental type-numeric))
(call-next-method)
- (parse-g-value-for-type gvalue-ptr (g-type-numeric (g-type-fundamental type-numeric)))))
+ (parse-g-value-for-type gvalue-ptr (g-type-numeric (g-type-fundamental type-numeric)) parse-kind)))
-(defun parse-g-value (gvalue)
+(defun parse-g-value (gvalue &key (parse-kind :get-property))
"Parses the GValue structure and returns the corresponding Lisp object.
@arg[value]{a C pointer to the GValue structure}
(+g-type-float+ (g-value-get-float gvalue))
(+g-type-double+ (g-value-get-double gvalue))
(+g-type-string+ (g-value-get-string gvalue))
- (t (parse-g-value-for-type gvalue type)))))
+ (t (parse-g-value-for-type gvalue type parse-kind)))))
-(defmethod parse-g-value-for-type (gvalue-ptr (type-numeric (eql +g-type-pointer+)))
+(defmethod parse-g-value-for-type (gvalue-ptr (type-numeric (eql +g-type-pointer+)) parse-kind)
+ (declare (ignore parse-kind))
(g-value-get-pointer gvalue-ptr))
-(defmethod parse-g-value-for-type (gvalue-ptr (type-numeric (eql +g-type-param+)))
+(defmethod parse-g-value-for-type (gvalue-ptr (type-numeric (eql +g-type-param+)) parse-kind)
+ (declare (ignore parse-kind))
(parse-g-param-spec (g-value-get-param gvalue-ptr)))
(defgeneric set-gvalue-for-type (gvalue-ptr type-numeric value))
(defun set-gvalue-object (gvalue value)
(g-value-set-object gvalue (if value (pointer value) (null-pointer))))
-(defmethod parse-g-value-for-type (gvalue-ptr (type-numeric (eql +g-type-object+)))
+(defmethod parse-g-value-for-type (gvalue-ptr (type-numeric (eql +g-type-object+)) parse-kind)
+ (declare (ignore parse-kind))
(parse-g-value-object gvalue-ptr))
-(defmethod parse-g-value-for-type (gvalue-ptr (type-numeric (eql +g-type-interface+)))
+(defmethod parse-g-value-for-type (gvalue-ptr (type-numeric (eql +g-type-interface+)) parse-kind)
+ (declare (ignore parse-kind))
(parse-g-value-object gvalue-ptr))
(defmethod set-gvalue-for-type (gvalue-ptr (type-numeric (eql +g-type-object+)) value)