+(defbinding button-released () nil
+ (button button))
+
+(defbinding button-clicked () nil
+ (button button))
+
+(defbinding button-enter () nil
+ (button button))
+
+(defbinding button-leave () nil
+ (button button))
+
+
+
+;;; Calendar
+
+(defbinding calendar-select-month () int
+ (calendar calendar)
+ (month unsigned-int)
+ (year unsigned-int))
+
+(defbinding calendar-select-day () nil
+ (calendar calendar)
+ (day unsigned-int))
+
+(defbinding calendar-mark-day () int
+ (calendar calendar)
+ (day unsigned-int))
+
+(defbinding calendar-unmark-day () int
+ (calendar calendar)
+ (day unsigned-int))
+
+(defbinding calendar-clear-marks () nil
+ (calendar calendar))
+
+(defbinding calendar-display-options () nil
+ (calendar calendar)
+ (options calendar-display-options))
+
+(defbinding (calendar-date "gtk_calendar_get_date") () nil
+ (calendar calendar)
+ (year unsigned-int :out)
+ (month unsigned-int :out)
+ (day unsigned-int :out))
+
+(defbinding calendar-freeze () nil
+ (calendar calendar))
+
+(defbinding calendar-thaw () nil
+ (calendar calendar))
+
+
+
+;;; Cell editable
+
+
+
+;;; Cell renderer
+
+
+
+;;; Cell renderer pixbuf -- no functions
+
+
+
+;;; Cell renderer text
+
+
+
+;;; Cell renderer toggle -- no functions
+
+
+
+;;; Check button -- no functions
+
+
+
+;;; Check menu item
+
+(defbinding check-menu-item-toggled () nil
+ (check-menu-item check-menu-item))
+
+
+
+;;; Clipboard
+
+
+;;; Color selection
+
+(defbinding (color-selection-is-adjusting-p
+ "gtk_color_selection_is_adjusting") () boolean
+ (colorsel color-selection))
+
+
+
+;;; Color selection dialog -- no functions
+
+
+
+;;; Combo
+
+(defbinding combo-set-value-in-list () nil
+ (combo combo)
+ (value boolean)
+ (ok-if-empty boolean))
+
+(defbinding combo-set-item-string () nil
+ (combo combo)
+ (item item)
+ (item-value string))
+
+(defbinding combo-set-popdown-strings () nil
+ (combo combo)
+ (strings (glist string)))
+
+(defbinding combo-disable-activate () nil
+ (combo combo))
+
+
+
+;;; Dialog
+
+(defmethod initialize-instance ((dialog dialog) &rest initargs)
+ (apply #'call-next-method dialog (plist-remove initargs :child))
+ (dolist (button-definition (get-all initargs :button))
+ (apply #'dialog-add-button dialog button-definition))
+ (dolist (child (get-all initargs :child))
+ (apply #'dialog-add-child dialog (mklist child))))
+
+
+(defvar %*response-id-key* (gensym))
+
+(defun %dialog-find-response-id-num (dialog response-id create-p)
+ (or
+ (cadr (assoc response-id (rest (type-expand-1 'response-type))))
+ (let* ((response-ids (object-data dialog %*response-id-key*))
+ (response-id-num (position response-id response-ids)))
+ (cond
+ (response-id-num)
+ (create-p
+ (cond
+ (response-ids
+ (setf (cdr (last response-ids)) (list response-id))
+ (1- (length response-ids)))
+ (t
+ (setf (object-data dialog %*response-id-key*) (list response-id))
+ 0)))
+ (t
+ (error "Invalid response id: ~A" response-id))))))
+
+(defun %dialog-find-response-id (dialog response-id-num)
+ (if (< response-id-num 0)
+ (car
+ (rassoc
+ (list response-id-num)
+ (rest (type-expand-1 'response-type)) :test #'equalp))
+ (nth response-id-num (object-data dialog %*response-id-key*))))
+
+
+(defmethod signal-connect ((dialog dialog) signal function &key object)
+ (case signal
+ (response
+ #'(lambda (dialog response-id-num)
+ (let ((response-id (%dialog-find-response-id dialog response-id-num)))
+ (cond
+ ((eq object t) (funcall function dialog response-id))
+ (object (funcall function object response-id))
+ (t (funcall function response-id))))))
+ (t
+ (call-next-method))))
+
+
+(defbinding dialog-response (dialog response-id) nil
+ (dialog dialog)
+ ((%dialog-find-response-id-num dialog response-id nil) int))
+
+(defbinding %dialog-set-default-response () nil
+ (dialog dialog)
+ (response-id-num int))
+
+(defun dialog-set-default-response (dialog response-id)
+ (%dialog-set-default-response
+ dialog (%dialog-find-response-id-num dialog response-id nil)))
+
+(defbinding dialog-set-response-sensitive (dialog response-id sensitive) nil
+ (dialog dialog)
+ ((%dialog-find-response-id-num dialog response-id nil) int)
+ (sensitive boolean))
+
+
+(defbinding %dialog-add-button () button
+ (dialog dialog)
+ (text string)
+ (response-id-num int))
+
+(defun dialog-add-button (dialog label &optional response-id default-p)
+ (let* ((response-id-num
+ (if response-id
+ (%dialog-find-response-id-num dialog response-id t)
+ (length (object-data dialog %*response-id-key*))))
+ (button (%dialog-add-button dialog label response-id-num)))
+ (unless response-id
+ (%dialog-find-response-id-num dialog button t))
+ (when default-p
+ (%dialog-set-default-response dialog response-id-num))
+ button))
+
+
+(defbinding %dialog-add-action-widget () button
+ (dialog dialog)
+ (action-widget widget)
+ (response-id-num int))
+
+(defun dialog-add-action-widget (dialog widget &optional (response-id widget)
+ default-p)
+ (let ((response-id-num (%dialog-find-response-id-num dialog response-id t)))
+ (%dialog-add-action-widget dialog widget response-id-num)
+ (when default-p
+ (%dialog-set-default-response dialog response-id-num))
+ widget))
+
+
+(defun dialog-add-child (dialog child &rest args)
+ (apply #'container-add (slot-value dialog 'vbox) child args))
+
+(defmethod container-children ((dialog dialog))
+ (container-children (dialog-vbox dialog)))
+
+(defmethod (setf container-children) (children (dialog dialog))
+ (setf (container-children (dialog-vbox dialog)) children))
+
+
+
+;;; Drawing area -- no functions
+