- (defclass ,child-class (,(default-container-child-name super))
- ,(slot-definitions child-class
- (query-container-class-child-properties type) nil)
- (:metaclass container-child-class)
- (:container ,class))))))
-
+ ,(let ((child-properties (query-container-class-child-properties type t)))
+ (when child-properties
+ `(defclass ,child-class (,(default-container-child-name super))
+ ,(slot-definitions child-class child-properties nil)
+ (:metaclass container-child-class)
+ (:container ,class))))))))
+
+(defun container-dependencies (type options)
+ (delete-duplicates
+ (append
+ (gobject-dependencies type options)
+ (mapcar #'param-value-type (query-container-class-child-properties type)))))
+
+(register-derivable-type 'container "GtkContainer" 'expand-container-type 'container-dependencies)
+
+
+(defmacro define-callback-setter (name arg return-type &rest rest-args)
+ (let ((callback (gensym)))
+ (if arg
+ `(progn
+ (define-callback-marshal ,callback ,return-type
+ ,(cons arg rest-args))
+ (defbinding ,name () nil
+ ,arg
+ (,callback callback)
+ (function user-callback)
+ (user-data-destroy-callback callback)))
+ `(progn
+ (define-callback-marshal ,callback ,return-type ,rest-args)
+ (defbinding ,name () nil
+ (,callback callback)
+ (function user-callback)
+ (user-data-destroy-callback callback))))))