+(defbinding widget-path () nil
+ (widget widget)
+ (path-length int :out)
+ (path string :out)
+ (reverse-path string :out))
+
+(defbinding widget-class-path () nil
+ (widget widget)
+ (path-length int :out)
+ (path string :out)
+ (reverse-path string :out))
+
+(defbinding widget-modify-style () nil
+ (widget widget)
+ (style rc-style))
+
+(defbinding widget-get-modifier-style () rc-style
+ (widget widget))
+
+(defbinding widget-modify-fg () nil
+ (widget widget)
+ (state state-type)
+ (color gdk:color))
+
+(defbinding widget-modify-bg () nil
+ (widget widget)
+ (state state-type)
+ (color gdk:color))
+
+(defbinding widget-modify-text () nil
+ (widget widget)
+ (state state-type)
+ (color gdk:color))
+
+(defbinding widget-modify-base () nil
+ (widget widget)
+ (state state-type)
+ (color gdk:color))
+
+(defbinding widget-modify-font () nil
+ (widget widget)
+ (state state-type)
+ (font-desc pango:font-description))
+
+(defbinding widget-create-pango-context () pango:context
+ (widget widget))
+
+(defbinding widget-get-pango-context () pango:context
+ (widget widget))
+
+(defbinding widget-create-pango-layout (widget &optional text) pango:layout
+ (widget widget)
+ (text (or string null)))
+
+(defbinding widget-render-icon (widget stock-id &optional size detail)
+ gdk:pixbuf
+ (widget widget)
+ (stock-id string)
+ ((or size -1) (or icon-size int))
+ (detail (or null string)))
+
+(defbinding widget-push-composite-child () nil)
+
+(defbinding widget-pop-composite-child () nil)
+
+(defbinding widget-queue-draw-area () nil
+ (widget widget)
+ (x int) (y int) (width int) (height int))
+
+(defbinding widget-reset-shapes () nil
+ (widget widget))
+
+;; (defbinding widget-set-double-buffered () nil
+;; (widget widget)
+;; (double-buffered boolean))
+
+;; (defbinding widget-set-redraw-on-allocate () nil
+;; (widget widget)
+;; (redraw-on-allocate boolean))
+
+(defbinding widget-set-scroll-adjustments () boolean
+ (widget widget)
+ (hadjustment (or null adjustment))
+ (vadjustment (or null adjustment)))
+
+(defbinding widget-mnemonic-activate () boolean
+ (widget widget)
+ (group-cycling boolean))
+
+(defbinding widget-class-find-style-property (class name) param
+ ((type-class-peek class) pointer)
+ (name string))
+
+(defbinding widget-class-list-style-properties (class)
+ (vector (copy-of param) n-properties)
+ ((type-class-peek class) pointer)
+ (n-properties unsigned-int :out))
+
+(defbinding widget-region-intersect () pointer ;gdk:region
+ (widget widget)
+ (region pointer)) ;gdk:region))
+
+(defbinding widget-send-expose () boolean
+ (widget widget)
+ (event gdk:event))
+
+(defbinding %widget-style-get-property () nil
+ (widget widget)
+ (name string)
+ (value gvalue))
+
+(defun style-property-value (widget style)
+ (let* ((name (string-downcase style))
+ (param (widget-class-find-style-property (class-of widget) name)))
+ (if (not param)
+ (error "~A has no such style property: ~A" widget style)
+ (with-gvalue (gvalue (param-value-type param))
+ (%widget-style-get-property widget (string-downcase style) gvalue)))))
+
+(defbinding widget-get-accessible () atk:object
+ (widget widget))
+
+(defbinding widget-child-focus () boolean
+ (widget widget)
+ (direction direction-type))
+
+(defbinding widget-child-notify () nil
+ (widget widget)
+ (child-property string))
+
+(defbinding widget-freeze-child-notify () nil
+ (widget widget))
+
+(defbinding widget-get-clipboard () clipboard
+ (widget widget)
+ (selection int #|gdk:atom|#))
+
+(defbinding widget-get-display () gdk:display
+ (widget widget))
+
+(defbinding widget-get-root-window () gdk:window
+ (widget widget))
+
+(defbinding widget-get-screen () gdk:screen
+ (widget widget))
+
+(defbinding widget-has-screen-p () boolean
+ (widget widget))
+
+(defbinding %widget-get-size-request () nil
+ (widget widget)
+ (width int :out)
+ (height int :out))
+
+(defun widget-get-size-request (widget)
+ (multiple-value-bind (width height) (%widget-get-size-request widget)
+ (values (unless (= width -1) width) (unless (= height -1) height))))
+
+(defbinding widget-set-size-request (widget width height) nil
+ (widget widget)
+ ((or width -1) int)
+ ((or height -1) int))
+
+(defbinding widget-thaw-child-notify () nil
+ (widget widget))
+
+(defbinding widget-list-mnemonic-labels () (glist widget)
+ (widget widget))
+
+(defbinding widget-add-mnemonic-label () nil
+ (widget widget)
+ (label widget))
+
+(defbinding widget-remove-mnemonic-label () nil
+ (widget widget)
+ (label widget))
+
+
+;;; Additional bindings and functions
+
+(defbinding (widget-mapped-p "gtk_widget_mapped_p") () boolean
+ (widget widget))
+
+(defbinding widget-get-size-allocation () nil
+ (widget widget)
+ (width int :out)
+ (height int :out))
+
+(defbinding get-event-widget () widget
+ (event gdk:event))
+
+(defun (setf widget-cursor) (cursor-type widget)
+ (let ((cursor (make-instance 'gdk:cursor :type cursor-type)))
+ (gdk:window-set-cursor (widget-window widget) cursor)))
+
+(defbinding %widget-get-parent-window () gdk:window