- (defclass param (ginstance)
- ((name
- :allocation :alien
- :reader param-name
- :type string)
- (nickname
- :allocation :alien
- :reader param-nickname
- :type string)
- (documentation
- :allocation :alien
- :reader param-documentation
- :type string)
- (flags
- :allocation :alien
- :reader param-flags
- :type param-flag-type)
- (type
- :allocation :alien
- :reader param-type
- :type type-number))
- (:metaclass ginstance-class)
- (:ref "g_param_spec_ref")
- (:unref "g_param_spec_unref")))
+ (defclass param-spec-class (ginstance-class)
+ ())
+
+ (defmethod shared-initialize ((class param-spec-class) names &rest initargs)
+ (declare (ignore names initargs))
+ (call-next-method)
+ (unless (slot-boundp class 'ref)
+ (setf (slot-value class 'ref) '%param-spec-ref))
+ (unless (slot-boundp class 'unref)
+ (setf (slot-value class 'unref) '%param-spec-unref)))
+
+ (defmethod validate-superclass ((class param-spec-class) (super standard-class))
+ t ;(subtypep (class-name super) 'param)
+))
+
+
+(defbinding %param-spec-ref () pointer
+ (location pointer))
+
+(defbinding %param-spec-unref () nil
+ (location pointer))
+
+
+;; TODO: rename to param-spec
+(defclass param (ginstance)
+ ((name
+ :allocation :alien
+ :reader param-name
+ :type string)
+ (flags
+ :allocation :alien
+ :reader param-flags
+ :type param-flag-type)
+ (value-type
+ :allocation :alien
+ :reader param-value-type
+ :type type-number)
+ (owner-type
+ :allocation :alien
+ :reader param-owner-type
+ :type type-number)
+ (nickname
+ :allocation :virtual
+ :getter "g_param_spec_get_nick"
+ :reader param-nickname
+ :type (copy-of string))
+ (documentation
+ :allocation :virtual
+ :getter "g_param_spec_get_blurb"
+ :reader param-documentation
+ :type (copy-of string)))
+ (:metaclass param-spec-class)
+ (:gtype "GParam"))