1 ;; Common Lisp bindings for GTK+ v2.0
2 ;; Copyright (C) 1999-2001 Espen S. Johnsen <esj@stud.cs.uit.no>
4 ;; This library is free software; you can redistribute it and/or
5 ;; modify it under the terms of the GNU Lesser General Public
6 ;; License as published by the Free Software Foundation; either
7 ;; version 2 of the License, or (at your option) any later version.
9 ;; This library is distributed in the hope that it will be useful,
10 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 ;; Lesser General Public License for more details.
14 ;; You should have received a copy of the GNU Lesser General Public
15 ;; License along with this library; if not, write to the Free Software
16 ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 ;; $Id: gtk.lisp,v 1.5 2001-05-31 21:52:57 espen Exp $
25 (defbinding check-version () string
26 (required-major unsigned-int)
27 (required-minor unsigned-int)
28 (required-micro unsigned-int))
30 (defbinding query-version () nil
31 (major unsigned-int :out)
32 (minor unsigned-int :out)
33 (micro unsigned-int :out))
36 (multiple-value-bind (major minor micro)
39 (format nil "Gtk+ v~A.~A" major minor)
40 (format nil "Gtk+ v~A.~A.~A" major minor micro))))
46 (defbinding label-select-region () nil
55 (defbinding accel-label-refetch () boolean
56 (accel-label accel-label))
62 (defun bin-child (bin)
63 (first (container-children bin)))
65 (defun (setf bin-child) (child bin)
66 (let ((old-child (bin-child bin)))
68 (container-remove bin old-child)))
69 (container-add bin child)
72 (defmethod initialize-instance ((bin bin) &rest initargs &key child)
73 (declare (ignore initargs))
77 (container-add bin (first child))
79 (slot-value (first child) 'child-slots)
82 (slot-value (class-of bin) 'child-class)
83 :parent bin :child (first child) (cdr child))))
85 (container-add bin child))))
90 (defbinding button-pressed () nil
93 (defbinding button-released () nil
96 (defbinding button-clicked () nil
99 (defbinding button-enter () nil
102 (defbinding button-leave () nil
109 (defbinding toggle-button-toggled () nil
110 (toggle-button toggle-button))
116 (defmethod (setf button-label) ((label string) (button check-button))
118 (setf (misc-xalign (bin-child button)) 0.0)
125 (defbinding (%radio-button-get-group "gtk_radio_button_group") () pointer
126 (radio-button radio-button))
128 (defbinding %radio-button-set-group () nil
129 (radio-button radio-button)
132 (defun radio-button-add-to-group (button1 button2)
133 "Add BUTTON1 to the group which BUTTON2 belongs to."
134 (%radio-button-set-group button1 (%radio-button-get-group button2)))
136 (defmethod initialize-instance ((button radio-button)
137 &rest initargs &key group)
140 (radio-button-add-to-group item group)))
145 (defbinding %option-menu-set-menu () nil
146 (option-menu option-menu)
149 (defbinding %option-menu-remove-menu () nil
150 (option-menu option-menu))
152 (defun (setf option-menu-menu) (menu option-menu)
154 (%option-menu-remove-menu option-menu)
155 (%option-menu-set-menu option-menu menu))
162 (defbinding item-select () nil
165 (defbinding item-deselect () nil
168 (defbinding item-toggle () nil
175 (defun (setf menu-item-label) (label menu-item)
176 (make-instance 'accel-label
177 :label label :xalign 0.0 :yalign 0.5 :accel-widget menu-item
178 :visible t :parent menu-item)
181 (defbinding %menu-item-set-submenu () nil
182 (menu-item menu-item)
185 (defbinding %menu-item-remove-submenu () nil
186 (menu-item menu-item))
188 (defun (setf menu-item-submenu) (submenu menu-item)
190 (%menu-item-remove-submenu menu-item)
191 (%menu-item-set-submenu menu-item submenu))
194 (defbinding %menu-item-configure () nil
195 (menu-item menu-item)
196 (show-toggle-indicator boolean)
197 (show-submenu-indicator boolean))
199 (defun (setf menu-item-toggle-indicator-p) (show menu-item)
200 (%menu-item-configure
203 (menu-item-submenu-indicator-p menu-item))
206 (defun (setf menu-item-submenu-indicator-p) (show menu-item)
207 (%menu-item-configure
209 (menu-item-toggle-indicator-p menu-item)
212 (defbinding menu-item-select () nil
213 (menu-item menu-item))
215 (defbinding menu-item-deselect () nil
216 (menu-item menu-item))
218 (defbinding menu-item-activate () nil
219 (menu-item menu-item))
221 (defbinding menu-item-right-justify () nil
222 (menu-item menu-item))
228 (defbinding check-menu-item-toggled () nil
229 (check-menu-item check-menu-item))
235 (defbinding (%radio-menu-item-get-group
236 "gtk_radio_menu_item_group") () pointer
237 (radio-menu-item radio-menu-item))
239 (defbinding %radio-menu-item-set-group () nil
240 (radio-menu-item radio-menu-item)
243 (defun radio-menu-item-add-to-group (item1 item2)
244 "Add ITEM1 to the group which ITEM2 belongs to."
245 (%radio-menu-item-set-group item1 (%radio-menu-item-get-group item2)))
247 (defmethod initialize-instance ((item radio-menu-item)
248 &rest initargs &key group)
251 (radio-menu-item-add-to-group item group)))
257 (defbinding %window-set-wmclass () nil
259 (wmclass-name string)
260 (wmclass-class string))
262 (defun (setf window-wmclass) (wmclass window)
263 (%window-set-wmclass window (svref wmclass 0) (svref wmclass 1))
264 (values (svref wmclass 0) (svref wmclass 1)))
267 (defbinding window-wmclass () nil
269 (wmclass-name string :out)
270 (wmclass-class string :out))
272 (defbinding window-add-accel-group () nil
274 (accel-group accel-group))
276 (defbinding window-remove-accel-group () nil
278 (accel-group accel-group))
280 (defbinding window-activate-focus () int
283 (defbinding window-activate-default () int
286 (defbinding window-set-transient-for () nil
290 ;(defbinding window-set-geometry-hints)
296 (defbinding file-selection-complete () nil
297 (file-selection file-selection)
300 (defbinding file-selection-show-fileop-buttons () nil
301 (file-selection file-selection))
303 (defbinding file-selection-hide-fileop-buttons () nil
304 (file-selection file-selection))
310 (defun (setf scrolled-window-scrollbar-policy) (policy window)
311 (setf (scrolled-window-hscrollbar-policy window) policy)
312 (setf (scrolled-window-vscrollbar-policy window) policy))
314 (defbinding scrolled-window-add-with-viewport () nil
315 (scrolled-window scrolled-window)
322 (defbinding box-pack-start () nil
327 (padding unsigned-int))
329 (defbinding box-pack-end () nil
334 (padding unsigned-int))
336 (defun box-pack (box child &key (pack :start) (expand t) (fill t) (padding 0))
338 (box-pack-start box child expand fill padding)
339 (box-pack-end box child expand fill padding)))
341 (defbinding box-reorder-child () nil
346 (defbinding box-query-child-packing () nil
349 (expand boolean :out)
351 (padding unsigned-int :out)
352 (pack-type pack-type :out))
354 (defbinding box-set-child-packing () nil
359 (padding unsigned-int)
360 (pack-type pack-type))
366 (defbinding button-box-get-child-size () nil
367 (button-box button-box)
369 (min-height int :out))
371 (defbinding button-box-set-child-size () nil
372 (button-box button-box)
376 (defbinding button-box-get-child-ipadding () nil
377 (button-box button-box)
381 (defbinding button-box-set-child-ipadding () nil
382 (button-box button-box)
390 ; (defbinding %color-selection-get-previous-color () nil
391 ; (colorsel color-selection)
394 ; (defun color-selection-previous-color (colorsel)
395 ; (let ((color (allocate-memory (* (size-of 'double-float) 4))))
396 ; (%color-selection-get-previous-color colorsel color)
397 ; (funcall (get-from-alien-function '(vector double-float 4)) color)))
399 ; (defbinding %color-selection-set-previous-color () nil
400 ; (colorsel color-selection)
401 ; (color (vector double-float 4)))
403 ; (defun (setf color-selection-previous-color) (color colorsel)
404 ; (%color-selection-set-previous-color colorsel color)
407 (defbinding (color-selection-is-adjusting-p
408 "gtk_color_selection_is_adjusting") () boolean
409 (colorsel color-selection))
415 (defbinding combo-set-value-in-list () nil
418 (ok-if-empty boolean))
420 ; (defbinding ("gtk_combo_set_item_string" (setf combo-item-string)) () nil
423 ; (item-value string))
425 (defbinding %combo-set-popdown-strings () nil
427 (strings (glist string)))
429 (defun (setf combo-popdown-strings) (strings combo)
430 (%combo-set-popdown-strings combo strings)
433 (defbinding combo-disable-activate () nil
440 (defbinding (statusbar-context-id "gtk_statusbar_get_context_id")
442 (statusbar statusbar)
443 (context-description string))
445 (defbinding statusbar-push () unsigned-int
446 (statusbar statusbar)
447 (context-id unsigned-int)
450 (defbinding statusbar-pop () nil
451 (statusbar statusbar)
452 (context-id unsigned-int))
454 (defbinding statusbar-remove () nil
455 (statusbar statusbar)
456 (context-id unsigned-int)
457 (message-id unsigned-int))
463 (defbinding fixed-put () nil
469 (defbinding fixed-move () nil
479 (defbinding (notebook-insert-page "gtk_notebook_insert_page_menu")
480 (notebook position child tab-label &optional menu-label) nil
483 ((if (stringp tab-label)
484 (label-new tab-label)
486 ((if (stringp menu-label)
487 (label-new menu-label)
488 menu-label) (or null widget))
491 (defun notebook-append-page (notebook child tab-label &optional menu-label)
492 (notebook-insert-page notebook -1 child tab-label menu-label))
494 (defun notebook-prepend-page (notebook child tab-label &optional menu-label)
495 (notebook-insert-page notebook 0 child tab-label menu-label))
497 (defbinding notebook-remove-page () nil
501 ; (defun notebook-current-page-num (notebook)
502 ; (let ((page-num (notebook-current-page notebook)))
503 ; (if (= page-num -1)
507 (defbinding (notebook-nth-page-child "gtk_notebook_get_nth_page") () widget
511 (defun notebook-page-child (notebook)
512 (notebook-nth-page-child notebook (notebook-page notebook)))
514 (defbinding %notebook-page-num () int
518 (defun notebook-child-num (notebook child)
519 (let ((page-num (%notebook-page-num notebook child)))
524 (defbinding notebook-next-page () nil
527 (defbinding notebook-prev-page () nil
530 (defbinding notebook-popup-enable () nil
533 (defbinding notebook-popup-disable () nil
536 (defbinding (notebook-tab-label "gtk_notebook_get_tab_label")
537 (notebook ref) widget
539 ((if (typep ref 'widget)
541 (notebook-nth-page-child notebook ref))
544 (defbinding %notebook-set-tab-label () nil
549 (defun (setf notebook-tab-label) (tab-label notebook reference)
550 (let ((tab-label-widget (if (stringp tab-label)
551 (label-new tab-label)
553 (%notebook-set-tab-label
555 (if (typep reference 'widget)
557 (notebook-nth-page-child notebook reference))
561 (defbinding (notebook-menu-label "gtk_notebook_get_menu_label")
562 (notebook ref) widget
564 ((if (typep ref 'widget)
566 (notebook-nth-page-child notebook ref))
569 (defbinding %notebook-set-menu-label () nil
574 (defun (setf notebook-menu-label) (menu-label notebook reference)
575 (let ((menu-label-widget (if (stringp menu-label)
576 (label-new menu-label)
578 (%notebook-set-menu-label
580 (if (typep reference 'widget)
582 (notebook-nth-page-child notebook reference))
586 (defbinding notebook-query-tab-label-packing (notebook ref) nil
588 ((if (typep ref 'widget)
590 (notebook-nth-page-child notebook ref))
592 (expand boolean :out)
594 (pack-type pack-type :out))
597 notebook-set-tab-label-packing (notebook ref expand fill pack-type) nil
599 ((if (typep ref 'widget)
601 (notebook-nth-page-child notebook ref))
605 (pack-type pack-type))
607 (defbinding notebook-reorder-child () nil
616 (defbinding paned-pack1 () nil
622 (defbinding paned-pack2 () nil
629 (defbinding paned-child1 () widget
631 (resize boolean :out)
632 (shrink boolean :out))
635 (defbinding paned-child2 () widget
637 (resize boolean :out)
638 (shrink boolean :out))
640 (defun (setf paned-child1) (child paned)
641 (paned-pack1 paned child nil t))
643 (defun (setf paned-child2) (child paned)
644 (paned-pack2 paned child t t))
650 (defbinding layout-put () nil
656 (defbinding layout-move () nil
662 (defbinding layout-set-size () nil
668 (defbinding layout-get-size () nil
673 (defun layout-x-size (layout)
674 (nth-value 0 (layout-get-size layout)))
676 (defun layout-y-size (layout)
677 (nth-value 1 (layout-get-size layout)))
679 (defun (setf layout-x-size) (x layout)
680 (layout-set-size layout x (layout-y-size layout)))
682 (defun (setf layout-y-size) (y layout)
683 (layout-set-size layout (layout-x-size layout) y))
685 (defbinding layout-freeze () nil
688 (defbinding layout-thaw () nil
695 (defbinding menu-shell-insert () nil
696 (menu-shell menu-shell)
697 (menu-item menu-item)
700 (defun menu-shell-append (menu-shell menu-item)
701 (menu-shell-insert menu-shell menu-item -1))
703 (defun menu-shell-prepend (menu-shell menu-item)
704 (menu-shell-insert menu-shell menu-item 0))
706 (defbinding menu-shell-deactivate () nil
707 (menu-shell menu-shell))
709 (defbinding menu-shell-select-item () nil
710 (menu-shell menu-shell)
711 (menu-item menu-item))
713 (defbinding menu-shell-deselect () nil
714 (menu-shell menu-shell))
716 (defbinding menu-shell-activate-item () nil
717 (menu-shell menu-shell)
718 (menu-item menu-item)
719 (fore-deactivate boolean))
725 ; (defbinding menu-bar-insert () nil
726 ; (menu-bar menu-bar)
730 ; (defun menu-bar-append (menu-bar menu)
731 ; (menu-bar-insert menu-bar menu -1))
733 ; (defun menu-bar-prepend (menu-bar menu)
734 ; (menu-bar-insert menu-bar menu 0))
740 ; (defun menu-insert (menu menu-item position)
741 ; (menu-shell-insert menu menu-item position))
743 ; (defun menu-append (menu menu-item)
744 ; (menu-shell-append menu menu-item))
746 ; (defun menu-prepend (menu menu-item)
747 ; (menu-shell-prepend menu menu-item))
749 ;(defun menu-popup ...)
751 (defbinding menu-reposition () nil
754 (defbinding menu-popdown () nil
757 (defbinding (menu-active "gtk_menu_get_active") () widget
760 (defbinding %menu-set-active () nil
762 (index unsigned-int))
764 (defun (setf menu-active) (menu index)
765 (%menu-set-active menu index))
767 ;(defun menu-attach-to-widget ...)
769 (defbinding menu-detach () nil
772 (defbinding (menu-attach-widget "gtk_menu_get_attach_widget") () widget
775 (defbinding menu-reorder-child () nil
777 (menu-item menu-item)
783 (defbinding table-resize () nil
786 (columns unsigned-int))
788 (defbinding table-attach (table child left right top bottom
789 &key (x-options '(:expand :fill))
790 (y-options '(:expand :fill))
791 (x-padding 0) (y-padding 0)) nil
797 (bottom unsigned-int)
798 (x-options attach-options)
799 (y-options attach-options)
800 (x-padding unsigned-int)
801 (y-padding unsigned-int))
803 (defbinding %table-set-row-spacing () nil
806 (spacing unsigned-int))
808 (defun (setf table-row-spacing) (spacing table row)
809 (%table-set-row-spacing table row spacing)
813 (defbinding table-row-spacing (table row) unsigned-int
816 (assert (and (>= row 0) (< row (table-rows table))))
819 (defbinding %table-set-col-spacing () nil
822 (spacing unsigned-int))
824 (defun (setf table-column-spacing) (spacing table column)
825 (%table-set-col-spacing table column spacing)
829 (defbinding table-column-spacing (table col) unsigned-int
832 (assert (and (>= col 0) (< col (table-columns table))))
836 (defun %set-table-child-option (object slot flag value)
837 (let ((options (child-slot-value object slot)))
839 ((and value (not (member flag options)))
840 (setf (child-slot-value object slot) (cons flag options)))
841 ((and (not value) (member flag options))
842 (setf (child-slot-value object slot) (delete flag options))))))
844 (macrolet ((define-option-accessor (name slot flag)
846 (defun ,name (object)
847 (member ,flag (child-slot-value object ,slot)))
848 (defun (setf ,name) (value object)
849 (%set-table-child-option object ,slot ,flag value)))))
850 (define-option-accessor table-child-x-expand-p :x-options :expand)
851 (define-option-accessor table-child-y-expand-p :y-options :expand)
852 (define-option-accessor table-child-x-shrink-p :x-options :shrink)
853 (define-option-accessor table-child-y-shrink-p :y-options :shrink)
854 (define-option-accessor table-child-x-fill-p :x-options :fill)
855 (define-option-accessor table-child-y-fill-p :y-options :fill))
862 (defbinding toolbar-num-children () int
865 (defun %toolbar-position-num (toolbar position)
868 (:append (toolbar-num-children toolbar))
870 (assert (and (>= position 0) (< position (toolbar-num-children toolbar))))
873 (defbinding %toolbar-insert-element () widget
875 (type toolbar-child-type)
876 (widget (or null widget))
878 (tooltip-text string)
879 (tooltip-private-text string)
880 (icon (or null widget))
885 (defun toolbar-insert-element (toolbar position
886 &key tooltip-text tooltip-private-text
887 type widget icon text callback)
888 (let* ((icon-widget (typecase icon
889 ((or null widget) icon)
890 (t (pixmap-new icon))))
892 (%toolbar-insert-element
893 toolbar (or type (and widget :widget) :button)
894 widget text tooltip-text tooltip-private-text icon-widget
895 (%toolbar-position-num toolbar position))))
897 (signal-connect toolbar-child 'clicked callback))
900 (defun toolbar-append-element (toolbar &key tooltip-text tooltip-private-text
901 type widget icon text callback)
902 (toolbar-insert-element
903 toolbar :append :type type :widget widget :icon icon :text text
904 :tooltip-text tooltip-text :tooltip-private-text tooltip-private-text
907 (defun toolbar-prepend-element (toolbar &key tooltip-text tooltip-private-text
908 type widget icon text callback)
909 (toolbar-insert-element
910 toolbar :prepend :type type :widget widget :icon icon :text text
911 :tooltip-text tooltip-text :tooltip-private-text tooltip-private-text
914 (defun toolbar-insert-space (toolbar position)
915 (toolbar-insert-element toolbar position :type :space))
917 (defun toolbar-append-space (toolbar)
918 (toolbar-insert-space toolbar :append))
920 (defun toolbar-prepend-space (toolbar)
921 (toolbar-insert-space toolbar :prepend))
923 (defun toolbar-insert-widget (toolbar widget position &key tooltip-text
924 tooltip-private-text callback)
925 (toolbar-insert-element
926 toolbar position :widget widget :tooltip-text tooltip-text
927 :tooltip-private-text tooltip-private-text :callback callback))
929 (defun toolbar-append-widget (toolbar widget &key tooltip-text
930 tooltip-private-text callback)
931 (toolbar-insert-widget
932 toolbar widget :append :tooltip-text tooltip-text
933 :tooltip-private-text tooltip-private-text :callback callback))
935 (defun toolbar-prepend-widget (toolbar widget &key tooltip-text
936 tooltip-private-text callback)
937 (toolbar-insert-widget
938 toolbar widget :prepend :tooltip-text tooltip-text
939 :tooltip-private-text tooltip-private-text :callback callback))
941 (defun toolbar-insert-item (toolbar text icon position &key tooltip-text
942 tooltip-private-text callback)
943 (toolbar-insert-element
944 toolbar position :text text :icon icon :callback callback
945 :tooltip-text tooltip-text :tooltip-private-text tooltip-private-text))
947 (defun toolbar-append-item (toolbar text icon &key tooltip-text
948 tooltip-private-text callback)
950 toolbar text icon :append :callback callback
951 :tooltip-text tooltip-text :tooltip-private-text tooltip-private-text))
954 (defun toolbar-prepend-item (toolbar text icon &key tooltip-text
955 tooltip-private-text callback)
957 toolbar text icon :prepend :callback callback
958 :tooltip-text tooltip-text :tooltip-private-text tooltip-private-text))
960 (defun toolbar-enable-tooltips (toolbar)
961 (setf (toolbar-tooltips-p toolbar) t))
963 (defun toolbar-disable-tooltips (toolbar)
964 (setf (toolbar-tooltips-p toolbar) nil))
970 (defbinding calendar-select-month () int
975 (defbinding calendar-select-day () nil
979 (defbinding calendar-mark-day () int
983 (defbinding calendar-unmark-day () int
987 (defbinding calendar-clear-marks () nil
990 (defbinding calendar-display-options () nil
992 (options calendar-display-options))
994 (defbinding (calendar-date "gtk_calendar_get_date") () nil
996 (year unsigned-int :out)
997 (month unsigned-int :out)
998 (day unsigned-int :out))
1000 (defbinding calendar-freeze () nil
1001 (calendar calendar))
1003 (defbinding calendar-thaw () nil
1004 (calendar calendar))
1011 ; (defbinding ("gtk_drawing_area_size" %drawing-area-set-size) () nil
1012 ; (drawing-area drawing-area)
1016 ; (defun (setf drawing-area-size) (size drawing-area)
1017 ; (%drawing-area-set-size drawing-area (svref size 0) (svref size 1))
1018 ; (values (svref size 0) (svref size 1)))
1021 ; (defbinding ("gtk_drawing_area_get_size" drawing-area-size) () nil
1022 ; (drawing-area drawing-area)
1024 ; (height int :out))
1030 (defbinding editable-select-region (editable &optional (start 0) end) nil
1035 (defbinding editable-insert-text
1036 (editable text &optional (position 0)) nil
1040 ((or position -1) int :in-out))
1042 (defun editable-append-text (editable text)
1043 (editable-insert-text editable text nil))
1045 (defun editable-prepend-text (editable text)
1046 (editable-insert-text editable text 0))
1048 (defbinding editable-delete-text (editable &optional (start 0) end) nil
1053 (defbinding (editable-text "gtk_editable_get_chars")
1054 (editable &optional (start 0) end) string
1059 (defun (setf editable-text) (text editable)
1061 (editable-delete-text
1063 (editable-insert-text editable text))
1064 (editable-delete-text editable))
1067 (defbinding editable-cut-clipboard () nil
1068 (editable editable))
1070 (defbinding editable-copy-clipboard () nil
1071 (editable editable))
1073 (defbinding editable-paste-clipboard () nil
1074 (editable editable))
1076 ; (defbinding editable-claim-selection () nil
1077 ; (editable editable)
1079 ; (time unsigned-int))
1081 (defbinding editable-delete-selection () nil
1082 (editable editable))
1084 ; (defbinding editable-changed () nil
1085 ; (editable editable))
1091 (defun spin-button-value-as-int (spin-button)
1092 (round (spin-button-value spin-button)))
1094 (defbinding spin-button-spin () nil
1095 (spin-button spin-button)
1096 (direction spin-type)
1097 (increment single-float))
1099 (defbinding spin-button-update () nil
1100 (spin-button spin-button))
1106 (defbinding ruler-set-range () nil
1108 (lower single-float)
1109 (upper single-float)
1110 (position single-float)
1111 (max-size single-float))
1113 (defbinding ruler-draw-ticks () nil
1116 (defbinding ruler-draw-pos () nil
1123 (defbinding range-draw-background () nil
1126 (defbinding range-clear-background () nil
1129 (defbinding range-draw-trough () nil
1132 (defbinding range-draw-slider () nil
1135 (defbinding range-draw-step-forw () nil
1138 (defbinding range-slider-update () nil
1141 (defbinding range-trough-click () int
1145 (jump-perc single-float :out))
1147 (defbinding range-default-hslider-update () nil
1150 (defbinding range-default-vslider-update () nil
1153 (defbinding range-default-htrough-click () int
1157 (jump-perc single-float :out))
1159 (defbinding range-default-vtrough-click () int
1163 (jump-perc single-float :out))
1165 (defbinding range-default-hmotion () int
1170 (defbinding range-default-vmotion () int
1179 (defbinding scale-draw-value () nil
1186 (defbinding progress-configure () adjustment
1188 (value single-float)
1192 (defbinding (progress-text-from-value
1193 "gtk_progress_get_text_from_value") () string
1194 (progress progress))
1196 (defbinding (progress-percentage-from-value
1197 "gtk_progress_get_percentage_from_value") () single-float
1198 (progress progress))
1204 (defbinding progress-bar-pulse () nil
1205 (progress-bar progress-bar))
1211 (defbinding adjustment-changed () nil
1212 (adjustment adjustment))
1214 (defbinding adjustment-value-changed () nil
1215 (adjustment adjustment))
1217 (defbinding adjustment-clamp-page () nil
1218 (adjustment adjustment)
1219 (lower single-float)
1220 (upper single-float))
1226 (defbinding tooltips-enable () nil
1227 (tooltips tooltips))
1229 (defbinding tooltips-disable () nil
1230 (tooltips tooltips))
1232 (defbinding tooltips-set-tip () nil
1236 (tip-private string))
1238 (defbinding tooltips-set-colors (tooltips background foreground) nil
1240 ((gdk:ensure-color background) gdk:color)
1241 ((gdk:ensure-color foreground) gdk:color))
1243 (defbinding tooltips-force-window () nil
1244 (tooltips tooltips))
1250 (defbinding rc-add-default-file (filename) nil
1251 ((namestring (truename filename)) string))
1253 (defbinding rc-parse (filename) nil
1254 ((namestring (truename filename)) string))
1256 (defbinding rc-parse-string () nil
1259 (defbinding rc-reparse-all () nil)
1261 (defbinding rc-get-style () style
1266 ;;; Accelerator Groups
1268 (defbinding accel-group-get-default () accel-group)
1270 (deftype-method alien-ref accel-group (type-spec)
1271 (declare (ignore type-spec))
1274 (deftype-method alien-unref accel-group (type-spec)
1275 (declare (ignore type-spec))
1276 '%accel-group-unref)
1278 (defbinding %accel-group-ref () accel-group
1279 (accel-group (or accel-group pointer)))
1281 (defbinding %accel-group-unref () nil
1282 (accel-group (or accel-group pointer)))
1284 (defbinding accel-group-activate (accel-group key modifiers) boolean
1285 (accel-group accel-group)
1286 ((gdk:keyval-from-name key) unsigned-int)
1287 (modifiers gdk:modifier-type))
1289 (defbinding accel-groups-activate (object key modifiers) boolean
1291 ((gdk:keyval-from-name key) unsigned-int)
1292 (modifiers gdk:modifier-type))
1294 (defbinding accel-group-attach () nil
1295 (accel-group accel-group)
1298 (defbinding accel-group-detach () nil
1299 (accel-group accel-group)
1302 (defbinding accel-group-lock () nil
1303 (accel-group accel-group))
1305 (defbinding accel-group-unlock () nil
1306 (accel-group accel-group))
1309 ;;; Accelerator Groups Entries
1311 (defbinding accel-group-get-entry (accel-group key modifiers) accel-entry
1312 (accel-group accel-group)
1313 ((gdk:keyval-from-name key) unsigned-int)
1314 (modifiers gdk:modifier-type))
1316 (defbinding accel-group-lock-entry (accel-group key modifiers) nil
1317 (accel-group accel-group)
1318 ((gdk:keyval-from-name key) unsigned-int)
1319 (modifiers gdk:modifier-type))
1321 (defbinding accel-group-unlock-entry (accel-group key modifiers) nil
1322 (accel-group accel-group)
1323 ((gdk:keyval-from-name key) unsigned-int)
1324 (modifiers gdk:modifier-type))
1326 (defbinding accel-group-add
1327 (accel-group key modifiers flags object signal) nil
1328 (accel-group accel-group)
1329 ((gdk:keyval-from-name key) unsigned-int)
1330 (modifiers gdk:modifier-type)
1333 ((name-to-string signal) string))
1335 (defbinding accel-group-add (accel-group key modifiers object) nil
1336 (accel-group accel-group)
1337 ((gdk:keyval-from-name key) unsigned-int)
1338 (modifiers gdk:modifier-type)
1342 ;;; Accelerator Signals
1344 (defbinding accel-group-handle-add
1345 (object signal-id accel-group key modifiers flags) nil
1347 (signal-id unsigned-int)
1348 (accel-group accel-group)
1349 ((gdk:keyval-from-name key) unsigned-int)
1350 (modifiers gdk:modifier-type)
1351 (flags accel-flags))
1353 (defbinding accel-group-handle-remove
1354 (object accel-group key modifiers) nil
1356 (accel-group accel-group)
1357 ((gdk:keyval-from-name key) unsigned-int)
1358 (modifiers gdk:modifier-type))
1364 ; (defbinding style-new () style)
1366 ; (defbinding style-copy () style
1369 (defbinding %style-get-color () gdk:color
1371 (color-type color-type)
1372 (state-type state-type))
1374 (defbinding %style-set-color () gdk:color
1376 (color-type color-type)
1377 (state-type state-type)
1380 (defun style-fg (style state)
1381 (%style-get-color style :foreground state))
1383 (defun (setf style-fg) (color style state)
1384 (%style-set-color style :foreground state color))
1386 (defun style-bg (style state)
1387 (%style-get-color style :background state))
1389 (defun (setf style-bg) (color style state)
1390 (%style-set-color style :background state color))
1392 (defun style-text (style state)
1393 (%style-get-color style :text state))
1395 (defun (setf style-text) (color style state)
1396 (%style-set-color style :text state color))
1398 (defun style-base (style state)
1399 (%style-get-color style :base state))
1401 (defun (setf style-base) (color style state)
1402 (%style-set-color style :base state color))
1404 (defun style-white (style)
1405 (%style-get-color style :white :normal))
1407 (defun (setf style-white) (color style)
1408 (%style-set-color style :white :normal color))
1410 (defun style-black (style)
1411 (%style-get-color style :black :normal))
1413 (defun (setf style-black) (color style)
1414 (%style-set-color style :black :normal color))
1416 (defbinding style-get-gc () gdk:gc
1418 (color-type color-type)
1419 (state-type state-type))
1422 (defbinding draw-hline () nil
1430 (defbinding draw-vline () nil
1438 (defbinding draw-shadow () nil
1442 (shadow shadow-type)
1448 ; (defbinding draw-polygon () nil
1450 ; (window gdk:window)
1451 ; (state state-type)
1452 ; (shadow shadow-type)
1453 ; (points (vector gdk:point))
1454 ; ((length points) int)
1457 (defbinding draw-arrow () nil
1461 (shadow shadow-type)
1469 (defbinding draw-diamond () nil
1473 (shadow shadow-type)
1479 ; (defbinding draw-oval () nil
1481 ; (window gdk:window)
1482 ; (state state-type)
1483 ; (shadow shadow-type)
1489 (defbinding draw-string () nil
1497 (defbinding draw-box () nil
1501 (shadow shadow-type)
1507 (defbinding draw-flat-box () nil
1511 (shadow shadow-type)
1517 (defbinding draw-check () nil
1521 (shadow shadow-type)
1527 (defbinding draw-option () nil
1531 (shadow shadow-type)
1537 ; (defbinding draw-cross () nil
1539 ; (window gdk:window)
1540 ; (state state-type)
1541 ; (shadow shadow-type)
1547 ; (defbinding draw-ramp () nil
1549 ; (window gdk:window)
1550 ; (state state-type)
1551 ; (shadow shadow-type)
1552 ; (arrow arrow-type)
1558 (defbinding draw-tab () nil
1567 (defbinding draw-shadow-gap () nil
1575 (gap-side position-type)
1579 (defbinding draw-box-gap () nil
1587 (gap-side position-type)
1591 (defbinding draw-extension () nil
1600 (defbinding draw-focus () nil
1608 (defbinding draw-slider () nil
1612 (shadow shadow-type)
1617 (orientation orientation))
1619 (defbinding draw-handle () nil
1623 (shadow shadow-type)
1628 (orientation orientation))
1630 (defbinding draw-handle () nil
1634 (shadow shadow-type)
1639 (orientation orientation))
1641 (defbinding paint-hline () nil