Updated for gtk+-1.3.9
[clg] / gtk / gtk.lisp
CommitLineData
0d07716f 1;; Common Lisp bindings for GTK+ v2.0
a60bd055 2;; Copyright (C) 1999-2001 Espen S. Johnsen <esj@stud.cs.uit.no>
0d07716f 3;;
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.
8;;
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.
13;;
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
17
a60bd055 18;; $Id: gtk.lisp,v 1.5 2001/05/31 21:52:57 espen Exp $
0d07716f 19
20
21(in-package "GTK")
22
23;;; Gtk version
24
a60bd055 25(defbinding check-version () string
0d07716f 26 (required-major unsigned-int)
27 (required-minor unsigned-int)
28 (required-micro unsigned-int))
29
a60bd055 30(defbinding query-version () nil
0d07716f 31 (major unsigned-int :out)
32 (minor unsigned-int :out)
33 (micro unsigned-int :out))
34
35(defun gtk-version ()
36 (multiple-value-bind (major minor micro)
37 (query-version)
38 (if (zerop micro)
39 (format nil "Gtk+ v~A.~A" major minor)
40 (format nil "Gtk+ v~A.~A.~A" major minor micro))))
41
0d07716f 42
43
0d07716f 44;;; Label
45
a60bd055 46(defbinding label-select-region () nil
0d07716f 47 (label label)
a60bd055 48 (start int)
49 (end int))
0d07716f 50
51
52
53;;; Acccel label
54
a60bd055 55(defbinding accel-label-refetch () boolean
0d07716f 56 (accel-label accel-label))
57
58
59
0d07716f 60;;; Bin
61
62(defun bin-child (bin)
63 (first (container-children bin)))
64
65(defun (setf bin-child) (child bin)
66 (let ((old-child (bin-child bin)))
67 (when old-child
68 (container-remove bin old-child)))
69 (container-add bin child)
70 child)
71
2afcd8bd 72(defmethod initialize-instance ((bin bin) &rest initargs &key child)
73 (declare (ignore initargs))
74 (call-next-method)
75 (cond
76 ((consp child)
77 (container-add bin (first child))
78 (setf
79 (slot-value (first child) 'child-slots)
80 (apply
81 #'make-instance
82 (slot-value (class-of bin) 'child-class)
83 :parent bin :child (first child) (cdr child))))
84 (child
85 (container-add bin child))))
0d07716f 86
30481825 87
0d07716f 88;;; Button
89
a60bd055 90(defbinding button-pressed () nil
0d07716f 91 (button button))
92
a60bd055 93(defbinding button-released () nil
0d07716f 94 (button button))
95
a60bd055 96(defbinding button-clicked () nil
0d07716f 97 (button button))
98
a60bd055 99(defbinding button-enter () nil
0d07716f 100 (button button))
101
a60bd055 102(defbinding button-leave () nil
0d07716f 103 (button button))
104
105
106
107;;; Toggle button
108
a60bd055 109(defbinding toggle-button-toggled () nil
0d07716f 110 (toggle-button toggle-button))
111
112
113
114;;; Check button
115
30481825 116(defmethod (setf button-label) ((label string) (button check-button))
117 (call-next-method)
118 (setf (misc-xalign (bin-child button)) 0.0)
119 label)
120
0d07716f 121
122
123;;; Radio button
124
a60bd055 125(defbinding (%radio-button-get-group "gtk_radio_button_group") () pointer
2afcd8bd 126 (radio-button radio-button))
127
a60bd055 128(defbinding %radio-button-set-group () nil
2afcd8bd 129 (radio-button radio-button)
130 (group pointer))
0d07716f 131
2afcd8bd 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)))
135
136(defmethod initialize-instance ((button radio-button)
137 &rest initargs &key group)
138 (call-next-method)
139 (when group
140 (radio-button-add-to-group item group)))
0d07716f 141
142
143;;; Option menu
144
a60bd055 145(defbinding %option-menu-set-menu () nil
30481825 146 (option-menu option-menu)
147 (menu widget))
0d07716f 148
a60bd055 149(defbinding %option-menu-remove-menu () nil
30481825 150 (option-menu option-menu))
0d07716f 151
30481825 152(defun (setf option-menu-menu) (menu option-menu)
153 (if (not menu)
154 (%option-menu-remove-menu option-menu)
155 (%option-menu-set-menu option-menu menu))
156 menu)
0d07716f 157
158
159
160;;; Item
161
a60bd055 162(defbinding item-select () nil
0d07716f 163 (item item))
164
a60bd055 165(defbinding item-deselect () nil
0d07716f 166 (item item))
167
a60bd055 168(defbinding item-toggle () nil
0d07716f 169 (item item))
170
171
172
173;;; Menu item
174
30481825 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)
179 label)
0d07716f 180
a60bd055 181(defbinding %menu-item-set-submenu () nil
30481825 182 (menu-item menu-item)
183 (submenu menu))
0d07716f 184
a60bd055 185(defbinding %menu-item-remove-submenu () nil
30481825 186 (menu-item menu-item))
0d07716f 187
30481825 188(defun (setf menu-item-submenu) (submenu menu-item)
189 (if (not submenu)
190 (%menu-item-remove-submenu menu-item)
191 (%menu-item-set-submenu menu-item submenu))
192 submenu)
0d07716f 193
a60bd055 194(defbinding %menu-item-configure () nil
30481825 195 (menu-item menu-item)
196 (show-toggle-indicator boolean)
197 (show-submenu-indicator boolean))
0d07716f 198
30481825 199(defun (setf menu-item-toggle-indicator-p) (show menu-item)
200 (%menu-item-configure
201 menu-item
202 show
203 (menu-item-submenu-indicator-p menu-item))
204 show)
0d07716f 205
30481825 206(defun (setf menu-item-submenu-indicator-p) (show menu-item)
207 (%menu-item-configure
208 menu-item
209 (menu-item-toggle-indicator-p menu-item)
210 show))
0d07716f 211
a60bd055 212(defbinding menu-item-select () nil
30481825 213 (menu-item menu-item))
0d07716f 214
a60bd055 215(defbinding menu-item-deselect () nil
30481825 216 (menu-item menu-item))
0d07716f 217
a60bd055 218(defbinding menu-item-activate () nil
30481825 219 (menu-item menu-item))
0d07716f 220
a60bd055 221(defbinding menu-item-right-justify () nil
30481825 222 (menu-item menu-item))
0d07716f 223
224
225
30481825 226;;; Check menu item
0d07716f 227
a60bd055 228(defbinding check-menu-item-toggled () nil
30481825 229 (check-menu-item check-menu-item))
0d07716f 230
231
232
30481825 233;;; Radio menu item
0d07716f 234
a60bd055 235(defbinding (%radio-menu-item-get-group
236 "gtk_radio_menu_item_group") () pointer
2afcd8bd 237 (radio-menu-item radio-menu-item))
238
a60bd055 239(defbinding %radio-menu-item-set-group () nil
2afcd8bd 240 (radio-menu-item radio-menu-item)
241 (group pointer))
242
2afcd8bd 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)))
246
247(defmethod initialize-instance ((item radio-menu-item)
248 &rest initargs &key group)
249 (call-next-method)
250 (when group
251 (radio-menu-item-add-to-group item group)))
252
0d07716f 253
254
0d07716f 255;;; Window
256
a60bd055 257(defbinding %window-set-wmclass () nil
0d07716f 258 (window window)
259 (wmclass-name string)
260 (wmclass-class string))
261
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)))
265
30481825 266;; gtkglue.c
a60bd055 267(defbinding window-wmclass () nil
0d07716f 268 (window window)
269 (wmclass-name string :out)
270 (wmclass-class string :out))
271
a60bd055 272(defbinding window-add-accel-group () nil
0d07716f 273 (window window)
274 (accel-group accel-group))
275
a60bd055 276(defbinding window-remove-accel-group () nil
0d07716f 277 (window window)
278 (accel-group accel-group))
279
a60bd055 280(defbinding window-activate-focus () int
0d07716f 281 (window window))
282
a60bd055 283(defbinding window-activate-default () int
0d07716f 284 (window window))
285
a60bd055 286(defbinding window-set-transient-for () nil
0d07716f 287 (window window)
288 (parent window))
289
a60bd055 290;(defbinding window-set-geometry-hints)
0d07716f 291
292
293
294;;; File selection
295
a60bd055 296(defbinding file-selection-complete () nil
2afcd8bd 297 (file-selection file-selection)
298 (pattern string))
0d07716f 299
a60bd055 300(defbinding file-selection-show-fileop-buttons () nil
2afcd8bd 301 (file-selection file-selection))
0d07716f 302
a60bd055 303(defbinding file-selection-hide-fileop-buttons () nil
2afcd8bd 304 (file-selection file-selection))
0d07716f 305
306
307
30481825 308;;; Scrolled window
0d07716f 309
0d07716f 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))
313
a60bd055 314(defbinding scrolled-window-add-with-viewport () nil
0d07716f 315 (scrolled-window scrolled-window)
316 (child widget))
317
318
319
0d07716f 320;;; Box
321
a60bd055 322(defbinding box-pack-start () nil
0d07716f 323 (box box)
324 (child widget)
325 (expand boolean)
326 (fill boolean)
327 (padding unsigned-int))
328
a60bd055 329(defbinding box-pack-end () nil
0d07716f 330 (box box)
331 (child widget)
332 (expand boolean)
333 (fill boolean)
334 (padding unsigned-int))
335
336(defun box-pack (box child &key (pack :start) (expand t) (fill t) (padding 0))
337 (if (eq pack :start)
338 (box-pack-start box child expand fill padding)
339 (box-pack-end box child expand fill padding)))
340
a60bd055 341(defbinding box-reorder-child () nil
0d07716f 342 (box box)
343 (child widget)
344 (position int))
345
a60bd055 346(defbinding box-query-child-packing () nil
0d07716f 347 (box box)
348 (child widget :out)
349 (expand boolean :out)
350 (fill boolean :out)
351 (padding unsigned-int :out)
352 (pack-type pack-type :out))
353
a60bd055 354(defbinding box-set-child-packing () nil
0d07716f 355 (box box)
356 (child widget)
357 (expand boolean)
358 (fill boolean)
359 (padding unsigned-int)
360 (pack-type pack-type))
361
362
363
364;;; Button box
365
a60bd055 366(defbinding button-box-get-child-size () nil
367 (button-box button-box)
0d07716f 368 (min-width int :out)
369 (min-height int :out))
370
a60bd055 371(defbinding button-box-set-child-size () nil
372 (button-box button-box)
0d07716f 373 (min-width int)
374 (min-height int))
375
a60bd055 376(defbinding button-box-get-child-ipadding () nil
377 (button-box button-box)
0d07716f 378 (ipad-x int :out)
379 (ipad-y int :out))
380
a60bd055 381(defbinding button-box-set-child-ipadding () nil
382 (button-box button-box)
0d07716f 383 (ipad-x int)
384 (ipad-y int))
385
0d07716f 386
387
0d07716f 388;;; Color selection
389
a60bd055 390; (defbinding %color-selection-get-previous-color () nil
391; (colorsel color-selection)
392; (color pointer))
0d07716f 393
a60bd055 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)))
0d07716f 398
a60bd055 399; (defbinding %color-selection-set-previous-color () nil
400; (colorsel color-selection)
401; (color (vector double-float 4)))
0d07716f 402
a60bd055 403; (defun (setf color-selection-previous-color) (color colorsel)
404; (%color-selection-set-previous-color colorsel color)
405; color)
2afcd8bd 406
a60bd055 407(defbinding (color-selection-is-adjusting-p
408 "gtk_color_selection_is_adjusting") () boolean
2afcd8bd 409 (colorsel color-selection))
410
411
412
0d07716f 413;;; Combo
414
a60bd055 415(defbinding combo-set-value-in-list () nil
30481825 416 (combo combo)
417 (val boolean)
418 (ok-if-empty boolean))
0d07716f 419
a60bd055 420; (defbinding ("gtk_combo_set_item_string" (setf combo-item-string)) () nil
0d07716f 421; (combo combo)
422; (item item)
423; (item-value string))
424
a60bd055 425(defbinding %combo-set-popdown-strings () nil
30481825 426 (combo combo)
2afcd8bd 427 (strings (glist string)))
0d07716f 428
30481825 429(defun (setf combo-popdown-strings) (strings combo)
430 (%combo-set-popdown-strings combo strings)
431 strings)
0d07716f 432
a60bd055 433(defbinding combo-disable-activate () nil
30481825 434 (combo combo))
0d07716f 435
0d07716f 436
0d07716f 437
30481825 438;;; Statusbar
0d07716f 439
a60bd055 440(defbinding (statusbar-context-id "gtk_statusbar_get_context_id")
441 () unsigned-int
30481825 442 (statusbar statusbar)
443 (context-description string))
0d07716f 444
a60bd055 445(defbinding statusbar-push () unsigned-int
30481825 446 (statusbar statusbar)
447 (context-id unsigned-int)
448 (text string))
0d07716f 449
a60bd055 450(defbinding statusbar-pop () nil
30481825 451 (statusbar statusbar)
452 (context-id unsigned-int))
0d07716f 453
a60bd055 454(defbinding statusbar-remove () nil
30481825 455 (statusbar statusbar)
456 (context-id unsigned-int)
457 (message-id unsigned-int))
0d07716f 458
0d07716f 459
460
461;;; Fixed
462
a60bd055 463(defbinding fixed-put () nil
30481825 464 (fixed fixed)
465 (widget widget)
466 (x (signed 16))
467 (y (signed 16)))
0d07716f 468
a60bd055 469(defbinding fixed-move () nil
30481825 470 (fixed fixed)
471 (widget widget)
472 (x (signed 16))
473 (y (signed 16)))
0d07716f 474
475
476
2afcd8bd 477;;; Notebook
0d07716f 478
a60bd055 479(defbinding (notebook-insert-page "gtk_notebook_insert_page_menu")
30481825 480 (notebook position child tab-label &optional menu-label) nil
481 (notebook notebook)
482 (child widget)
483 ((if (stringp tab-label)
484 (label-new tab-label)
485 tab-label) widget)
486 ((if (stringp menu-label)
487 (label-new menu-label)
488 menu-label) (or null widget))
489 (position int))
0d07716f 490
30481825 491(defun notebook-append-page (notebook child tab-label &optional menu-label)
492 (notebook-insert-page notebook -1 child tab-label menu-label))
0d07716f 493
30481825 494(defun notebook-prepend-page (notebook child tab-label &optional menu-label)
495 (notebook-insert-page notebook 0 child tab-label menu-label))
0d07716f 496
a60bd055 497(defbinding notebook-remove-page () nil
30481825 498 (notebook notebook)
499 (page-num int))
0d07716f 500
501; (defun notebook-current-page-num (notebook)
502; (let ((page-num (notebook-current-page notebook)))
503; (if (= page-num -1)
504; nil
505; page-num)))
506
a60bd055 507(defbinding (notebook-nth-page-child "gtk_notebook_get_nth_page") () widget
30481825 508 (notebook notebook)
509 (page-num int))
0d07716f 510
30481825 511(defun notebook-page-child (notebook)
512 (notebook-nth-page-child notebook (notebook-page notebook)))
0d07716f 513
a60bd055 514(defbinding %notebook-page-num () int
30481825 515 (notebook notebook)
516 (child widget))
517
518(defun notebook-child-num (notebook child)
519 (let ((page-num (%notebook-page-num notebook child)))
520 (if (= page-num -1)
521 nil
522 page-num)))
523
a60bd055 524(defbinding notebook-next-page () nil
30481825 525 (notebook notebook))
0d07716f 526
a60bd055 527(defbinding notebook-prev-page () nil
30481825 528 (notebook notebook))
529
a60bd055 530(defbinding notebook-popup-enable () nil
30481825 531 (notebook notebook))
532
a60bd055 533(defbinding notebook-popup-disable () nil
30481825 534 (notebook notebook))
535
a60bd055 536(defbinding (notebook-tab-label "gtk_notebook_get_tab_label")
537 (notebook ref) widget
30481825 538 (notebook notebook)
539 ((if (typep ref 'widget)
540 ref
541 (notebook-nth-page-child notebook ref))
542 widget))
543
a60bd055 544(defbinding %notebook-set-tab-label () nil
30481825 545 (notebook notebook)
546 (reference widget)
547 (tab-label widget))
548
549(defun (setf notebook-tab-label) (tab-label notebook reference)
550 (let ((tab-label-widget (if (stringp tab-label)
551 (label-new tab-label)
552 tab-label)))
553 (%notebook-set-tab-label
554 notebook
555 (if (typep reference 'widget)
556 reference
557 (notebook-nth-page-child notebook reference))
558 tab-label-widget)
30481825 559 tab-label-widget))
0d07716f 560
a60bd055 561(defbinding (notebook-menu-label "gtk_notebook_get_menu_label")
562 (notebook ref) widget
30481825 563 (notebook notebook)
564 ((if (typep ref 'widget)
565 ref
566 (notebook-nth-page-child notebook ref))
567 widget))
568
a60bd055 569(defbinding %notebook-set-menu-label () nil
30481825 570 (notebook notebook)
571 (reference widget)
572 (menu-label widget))
573
574(defun (setf notebook-menu-label) (menu-label notebook reference)
575 (let ((menu-label-widget (if (stringp menu-label)
576 (label-new menu-label)
577 menu-label)))
578 (%notebook-set-menu-label
579 notebook
580 (if (typep reference 'widget)
581 reference
582 (notebook-nth-page-child notebook reference))
583 menu-label-widget)
30481825 584 menu-label-widget))
585
a60bd055 586(defbinding notebook-query-tab-label-packing (notebook ref) nil
30481825 587 (notebook notebook)
588 ((if (typep ref 'widget)
589 ref
590 (notebook-nth-page-child notebook ref))
591 widget)
592 (expand boolean :out)
593 (fill boolean :out)
594 (pack-type pack-type :out))
595
a60bd055 596(defbinding
30481825 597 notebook-set-tab-label-packing (notebook ref expand fill pack-type) nil
598 (notebook notebook)
599 ((if (typep ref 'widget)
600 ref
601 (notebook-nth-page-child notebook ref))
602 widget)
603 (expand boolean)
604 (fill boolean)
605 (pack-type pack-type))
606
a60bd055 607(defbinding notebook-reorder-child () nil
30481825 608 (notebook notebook)
609 (child widget)
610 (position int))
0d07716f 611
612
613
2afcd8bd 614;;; Paned
0d07716f 615
a60bd055 616(defbinding paned-pack1 () nil
2afcd8bd 617 (paned paned)
618 (child widget)
619 (resize boolean)
620 (shrink boolean))
0d07716f 621
a60bd055 622(defbinding paned-pack2 () nil
2afcd8bd 623 (paned paned)
624 (child widget)
625 (resize boolean)
626 (shrink boolean))
0d07716f 627
2afcd8bd 628;; gtkglue.c
a60bd055 629(defbinding paned-child1 () widget
2afcd8bd 630 (paned paned)
631 (resize boolean :out)
632 (shrink boolean :out))
0d07716f 633
2afcd8bd 634;; gtkglue.c
a60bd055 635(defbinding paned-child2 () widget
2afcd8bd 636 (paned paned)
637 (resize boolean :out)
638 (shrink boolean :out))
0d07716f 639
2afcd8bd 640(defun (setf paned-child1) (child paned)
641 (paned-pack1 paned child nil t))
0d07716f 642
2afcd8bd 643(defun (setf paned-child2) (child paned)
644 (paned-pack2 paned child t t))
0d07716f 645
0d07716f 646
0d07716f 647
2afcd8bd 648;;; Layout
0d07716f 649
a60bd055 650(defbinding layout-put () nil
2afcd8bd 651 (layout layout)
652 (widget widget)
653 (x int)
654 (y int))
0d07716f 655
a60bd055 656(defbinding layout-move () nil
2afcd8bd 657 (layout layout)
658 (widget widget)
659 (x int)
660 (y int))
0d07716f 661
a60bd055 662(defbinding layout-set-size () nil
2afcd8bd 663 (layout layout)
664 (width int)
665 (height int))
0d07716f 666
2afcd8bd 667;; gtkglue.c
a60bd055 668(defbinding layout-get-size () nil
2afcd8bd 669 (layout layout)
670 (width int :out)
671 (height int :out))
0d07716f 672
2afcd8bd 673(defun layout-x-size (layout)
674 (nth-value 0 (layout-get-size layout)))
675
676(defun layout-y-size (layout)
677 (nth-value 1 (layout-get-size layout)))
678
679(defun (setf layout-x-size) (x layout)
680 (layout-set-size layout x (layout-y-size layout)))
0d07716f 681
2afcd8bd 682(defun (setf layout-y-size) (y layout)
683 (layout-set-size layout (layout-x-size layout) y))
0d07716f 684
a60bd055 685(defbinding layout-freeze () nil
2afcd8bd 686 (layout layout))
0d07716f 687
a60bd055 688(defbinding layout-thaw () nil
2afcd8bd 689 (layout layout))
0d07716f 690
691
692
0d07716f 693;;; Menu shell
694
a60bd055 695(defbinding menu-shell-insert () nil
30481825 696 (menu-shell menu-shell)
697 (menu-item menu-item)
698 (position int))
0d07716f 699
30481825 700(defun menu-shell-append (menu-shell menu-item)
701 (menu-shell-insert menu-shell menu-item -1))
0d07716f 702
30481825 703(defun menu-shell-prepend (menu-shell menu-item)
704 (menu-shell-insert menu-shell menu-item 0))
0d07716f 705
a60bd055 706(defbinding menu-shell-deactivate () nil
30481825 707 (menu-shell menu-shell))
0d07716f 708
a60bd055 709(defbinding menu-shell-select-item () nil
30481825 710 (menu-shell menu-shell)
711 (menu-item menu-item))
0d07716f 712
a60bd055 713(defbinding menu-shell-deselect () nil
30481825 714 (menu-shell menu-shell))
0d07716f 715
a60bd055 716(defbinding menu-shell-activate-item () nil
30481825 717 (menu-shell menu-shell)
718 (menu-item menu-item)
719 (fore-deactivate boolean))
0d07716f 720
721
722
723; ;;; Menu bar
724
a60bd055 725; (defbinding menu-bar-insert () nil
0d07716f 726; (menu-bar menu-bar)
727; (menu menu)
728; (position int))
729
730; (defun menu-bar-append (menu-bar menu)
731; (menu-bar-insert menu-bar menu -1))
732
733; (defun menu-bar-prepend (menu-bar menu)
734; (menu-bar-insert menu-bar menu 0))
735
736
737
738; ;;; Menu
739
0d07716f 740; (defun menu-insert (menu menu-item position)
741; (menu-shell-insert menu menu-item position))
742
743; (defun menu-append (menu menu-item)
744; (menu-shell-append menu menu-item))
745
746; (defun menu-prepend (menu menu-item)
747; (menu-shell-prepend menu menu-item))
748
30481825 749;(defun menu-popup ...)
0d07716f 750
a60bd055 751(defbinding menu-reposition () nil
30481825 752 (menu menu))
0d07716f 753
a60bd055 754(defbinding menu-popdown () nil
30481825 755 (menu menu))
0d07716f 756
a60bd055 757(defbinding (menu-active "gtk_menu_get_active") () widget
30481825 758 (menu menu))
0d07716f 759
a60bd055 760(defbinding %menu-set-active () nil
30481825 761 (menu menu)
762 (index unsigned-int))
0d07716f 763
2afcd8bd 764(defun (setf menu-active) (menu index)
765 (%menu-set-active menu index))
766
30481825 767;(defun menu-attach-to-widget ...)
0d07716f 768
a60bd055 769(defbinding menu-detach () nil
30481825 770 (menu menu))
0d07716f 771
a60bd055 772(defbinding (menu-attach-widget "gtk_menu_get_attach_widget") () widget
30481825 773 (menu menu))
0d07716f 774
a60bd055 775(defbinding menu-reorder-child () nil
30481825 776 (menu menu)
777 (menu-item menu-item)
778 (position int))
0d07716f 779
780
30481825 781;;; Table
0d07716f 782
a60bd055 783(defbinding table-resize () nil
30481825 784 (table table)
785 (rows unsigned-int)
786 (columns unsigned-int))
0d07716f 787
a60bd055 788(defbinding table-attach (table child left right top bottom
30481825 789 &key (x-options '(:expand :fill))
790 (y-options '(:expand :fill))
791 (x-padding 0) (y-padding 0)) nil
792 (table table)
793 (child widget)
794 (left unsigned-int)
795 (right unsigned-int)
796 (top unsigned-int)
797 (bottom unsigned-int)
798 (x-options attach-options)
799 (y-options attach-options)
800 (x-padding unsigned-int)
801 (y-padding unsigned-int))
802
a60bd055 803(defbinding %table-set-row-spacing () nil
30481825 804 (table table)
805 (row unsigned-int)
806 (spacing unsigned-int))
807
808(defun (setf table-row-spacing) (spacing table row)
809 (%table-set-row-spacing table row spacing)
810 spacing)
811
812;; gtkglue.c
a60bd055 813(defbinding table-row-spacing (table row) unsigned-int
30481825 814 (table table)
815 ((progn
816 (assert (and (>= row 0) (< row (table-rows table))))
817 row) unsigned-int))
818
a60bd055 819(defbinding %table-set-col-spacing () nil
30481825 820 (table table)
821 (col unsigned-int)
822 (spacing unsigned-int))
823
824(defun (setf table-column-spacing) (spacing table column)
2afcd8bd 825 (%table-set-col-spacing table column spacing)
30481825 826 spacing)
827
828;; gtkglue.c
a60bd055 829(defbinding table-column-spacing (table col) unsigned-int
30481825 830 (table table)
831 ((progn
832 (assert (and (>= col 0) (< col (table-columns table))))
833 col) unsigned-int))
834
835
836(defun %set-table-child-option (object slot flag value)
2afcd8bd 837 (let ((options (child-slot-value object slot)))
30481825 838 (cond
839 ((and value (not (member flag options)))
2afcd8bd 840 (setf (child-slot-value object slot) (cons flag options)))
30481825 841 ((and (not value) (member flag options))
2afcd8bd 842 (setf (child-slot-value object slot) (delete flag options))))))
30481825 843
844(macrolet ((define-option-accessor (name slot flag)
845 `(progn
846 (defun ,name (object)
2afcd8bd 847 (member ,flag (child-slot-value object ,slot)))
30481825 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))
856
857
858
859;;; Toolbar
860
30481825 861;; gtkglue.c
a60bd055 862(defbinding toolbar-num-children () int
30481825 863 (toolbar toolbar))
864
865(defun %toolbar-position-num (toolbar position)
866 (case position
867 (:prepend 0)
868 (:append (toolbar-num-children toolbar))
869 (t
870 (assert (and (>= position 0) (< position (toolbar-num-children toolbar))))
871 position)))
872
a60bd055 873(defbinding %toolbar-insert-element () widget
30481825 874 (toolbar toolbar)
875 (type toolbar-child-type)
876 (widget (or null widget))
877 (text string)
878 (tooltip-text string)
879 (tooltip-private-text string)
880 (icon (or null widget))
881 (nil null)
882 (nil null)
883 (position int))
0d07716f 884
30481825 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))))
891 (toolbar-child
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))))
896 (when callback
897 (signal-connect toolbar-child 'clicked callback))
898 toolbar-child))
899
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
905 :callback callback))
906
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
912 :callback callback))
913
914(defun toolbar-insert-space (toolbar position)
915 (toolbar-insert-element toolbar position :type :space))
916
917(defun toolbar-append-space (toolbar)
918 (toolbar-insert-space toolbar :append))
919
920(defun toolbar-prepend-space (toolbar)
921 (toolbar-insert-space toolbar :prepend))
922
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))
0d07716f 928
30481825 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))
934
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))
940
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))
946
947(defun toolbar-append-item (toolbar text icon &key tooltip-text
948 tooltip-private-text callback)
949 (toolbar-insert-item
950 toolbar text icon :append :callback callback
951 :tooltip-text tooltip-text :tooltip-private-text tooltip-private-text))
0d07716f 952
953
30481825 954(defun toolbar-prepend-item (toolbar text icon &key tooltip-text
955 tooltip-private-text callback)
956 (toolbar-insert-item
957 toolbar text icon :prepend :callback callback
958 :tooltip-text tooltip-text :tooltip-private-text tooltip-private-text))
0d07716f 959
30481825 960(defun toolbar-enable-tooltips (toolbar)
961 (setf (toolbar-tooltips-p toolbar) t))
0d07716f 962
30481825 963(defun toolbar-disable-tooltips (toolbar)
964 (setf (toolbar-tooltips-p toolbar) nil))
0d07716f 965
966
967
0d07716f 968;;; Calendar
969
a60bd055 970(defbinding calendar-select-month () int
0d07716f 971 (calendar calendar)
972 (month unsigned-int)
973 (year unsigned-int))
974
a60bd055 975(defbinding calendar-select-day () nil
0d07716f 976 (calendar calendar)
977 (day unsigned-int))
978
a60bd055 979(defbinding calendar-mark-day () int
0d07716f 980 (calendar calendar)
981 (day unsigned-int))
982
a60bd055 983(defbinding calendar-unmark-day () int
0d07716f 984 (calendar calendar)
985 (day unsigned-int))
986
a60bd055 987(defbinding calendar-clear-marks () nil
0d07716f 988 (calendar calendar))
989
a60bd055 990(defbinding calendar-display-options () nil
0d07716f 991 (calendar calendar)
992 (options calendar-display-options))
993
a60bd055 994(defbinding (calendar-date "gtk_calendar_get_date") () nil
0d07716f 995 (calendar calendar)
996 (year unsigned-int :out)
997 (month unsigned-int :out)
998 (day unsigned-int :out))
999
a60bd055 1000(defbinding calendar-freeze () nil
0d07716f 1001 (calendar calendar))
1002
a60bd055 1003(defbinding calendar-thaw () nil
0d07716f 1004 (calendar calendar))
1005
1006
1007
1008;;; Drawing area
1009
0d07716f 1010
a60bd055 1011; (defbinding ("gtk_drawing_area_size" %drawing-area-set-size) () nil
0d07716f 1012; (drawing-area drawing-area)
1013; (width int)
1014; (height int))
1015
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)))
1019
30481825 1020; ;; gtkglue.c
a60bd055 1021; (defbinding ("gtk_drawing_area_get_size" drawing-area-size) () nil
0d07716f 1022; (drawing-area drawing-area)
1023; (width int :out)
1024; (height int :out))
1025
1026
1027
a60bd055 1028;;; Editable
1029#|
1030(defbinding editable-select-region (editable &optional (start 0) end) nil
30481825 1031 (editable editable)
1032 (start int)
1033 ((or end -1) int))
0d07716f 1034
a60bd055 1035(defbinding editable-insert-text
30481825 1036 (editable text &optional (position 0)) nil
1037 (editable editable)
1038 (text string)
1039 ((length text) int)
1040 ((or position -1) int :in-out))
0d07716f 1041
30481825 1042(defun editable-append-text (editable text)
1043 (editable-insert-text editable text nil))
0d07716f 1044
30481825 1045(defun editable-prepend-text (editable text)
1046 (editable-insert-text editable text 0))
0d07716f 1047
a60bd055 1048(defbinding editable-delete-text (editable &optional (start 0) end) nil
30481825 1049 (editable editable)
1050 (start int)
1051 ((or end -1) int))
0d07716f 1052
a60bd055 1053(defbinding (editable-text "gtk_editable_get_chars")
30481825 1054 (editable &optional (start 0) end) string
1055 (editable editable)
1056 (start int)
1057 ((or end -1) int))
0d07716f 1058
30481825 1059(defun (setf editable-text) (text editable)
1060 (if text
1061 (editable-delete-text
1062 editable
1063 (editable-insert-text editable text))
1064 (editable-delete-text editable))
1065 text)
0d07716f 1066
a60bd055 1067(defbinding editable-cut-clipboard () nil
30481825 1068 (editable editable))
0d07716f 1069
a60bd055 1070(defbinding editable-copy-clipboard () nil
30481825 1071 (editable editable))
0d07716f 1072
a60bd055 1073(defbinding editable-paste-clipboard () nil
30481825 1074 (editable editable))
0d07716f 1075
a60bd055 1076; (defbinding editable-claim-selection () nil
32483ef6 1077; (editable editable)
1078; (claim boolean)
1079; (time unsigned-int))
0d07716f 1080
a60bd055 1081(defbinding editable-delete-selection () nil
30481825 1082 (editable editable))
0d07716f 1083
a60bd055 1084; (defbinding editable-changed () nil
32483ef6 1085; (editable editable))
a60bd055 1086|#
0d07716f 1087
0d07716f 1088
30481825 1089;;; Spin button
0d07716f 1090
30481825 1091(defun spin-button-value-as-int (spin-button)
1092 (round (spin-button-value spin-button)))
0d07716f 1093
a60bd055 1094(defbinding spin-button-spin () nil
30481825 1095 (spin-button spin-button)
1096 (direction spin-type)
1097 (increment single-float))
0d07716f 1098
a60bd055 1099(defbinding spin-button-update () nil
30481825 1100 (spin-button spin-button))
0d07716f 1101
1102
1103
1104; ;;; Ruler
1105
a60bd055 1106(defbinding ruler-set-range () nil
30481825 1107 (ruler ruler)
1108 (lower single-float)
1109 (upper single-float)
1110 (position single-float)
1111 (max-size single-float))
0d07716f 1112
a60bd055 1113(defbinding ruler-draw-ticks () nil
30481825 1114 (ruler ruler))
0d07716f 1115
a60bd055 1116(defbinding ruler-draw-pos () nil
30481825 1117 (ruler ruler))
0d07716f 1118
0d07716f 1119
0d07716f 1120
2afcd8bd 1121;;; Range
a60bd055 1122#|
1123(defbinding range-draw-background () nil
2afcd8bd 1124 (range range))
0d07716f 1125
a60bd055 1126(defbinding range-clear-background () nil
2afcd8bd 1127 (range range))
0d07716f 1128
a60bd055 1129(defbinding range-draw-trough () nil
2afcd8bd 1130 (range range))
0d07716f 1131
a60bd055 1132(defbinding range-draw-slider () nil
2afcd8bd 1133 (range range))
0d07716f 1134
a60bd055 1135(defbinding range-draw-step-forw () nil
2afcd8bd 1136 (range range))
0d07716f 1137
a60bd055 1138(defbinding range-slider-update () nil
2afcd8bd 1139 (range range))
0d07716f 1140
a60bd055 1141(defbinding range-trough-click () int
2afcd8bd 1142 (range range)
1143 (x int)
1144 (y int)
1145 (jump-perc single-float :out))
0d07716f 1146
a60bd055 1147(defbinding range-default-hslider-update () nil
2afcd8bd 1148 (range range))
0d07716f 1149
a60bd055 1150(defbinding range-default-vslider-update () nil
2afcd8bd 1151 (range range))
0d07716f 1152
a60bd055 1153(defbinding range-default-htrough-click () int
2afcd8bd 1154 (range range)
1155 (x int)
1156 (y int)
1157 (jump-perc single-float :out))
0d07716f 1158
a60bd055 1159(defbinding range-default-vtrough-click () int
2afcd8bd 1160 (range range)
1161 (x int)
1162 (y int)
1163 (jump-perc single-float :out))
0d07716f 1164
a60bd055 1165(defbinding range-default-hmotion () int
2afcd8bd 1166 (range range)
1167 (x-delta int)
1168 (y-delta int))
0d07716f 1169
a60bd055 1170(defbinding range-default-vmotion () int
2afcd8bd 1171 (range range)
1172 (x-delta int)
1173 (y-delta int))
a60bd055 1174|#
0d07716f 1175
0d07716f 1176
2afcd8bd 1177;;; Scale
0d07716f 1178
a60bd055 1179(defbinding scale-draw-value () nil
2afcd8bd 1180 (scale scale))
0d07716f 1181
0d07716f 1182
0d07716f 1183
2afcd8bd 1184;;; Progress
0d07716f 1185
a60bd055 1186(defbinding progress-configure () adjustment
2afcd8bd 1187 (progress progress)
1188 (value single-float)
1189 (min single-float)
1190 (max single-float))
0d07716f 1191
a60bd055 1192(defbinding (progress-text-from-value
1193 "gtk_progress_get_text_from_value") () string
2afcd8bd 1194 (progress progress))
0d07716f 1195
a60bd055 1196(defbinding (progress-percentage-from-value
1197 "gtk_progress_get_percentage_from_value") () single-float
2afcd8bd 1198 (progress progress))
0d07716f 1199
0d07716f 1200
0d07716f 1201
2afcd8bd 1202;;; Progress bar
0d07716f 1203
a60bd055 1204(defbinding progress-bar-pulse () nil
2afcd8bd 1205 (progress-bar progress-bar))
0d07716f 1206
1207
1208
1209;;; Adjustment
1210
a60bd055 1211(defbinding adjustment-changed () nil
0d07716f 1212 (adjustment adjustment))
1213
a60bd055 1214(defbinding adjustment-value-changed () nil
0d07716f 1215 (adjustment adjustment))
1216
a60bd055 1217(defbinding adjustment-clamp-page () nil
0d07716f 1218 (adjustment adjustment)
1219 (lower single-float)
1220 (upper single-float))
1221
1222
1223
1224;;; Tooltips
1225
a60bd055 1226(defbinding tooltips-enable () nil
2afcd8bd 1227 (tooltips tooltips))
0d07716f 1228
a60bd055 1229(defbinding tooltips-disable () nil
2afcd8bd 1230 (tooltips tooltips))
0d07716f 1231
a60bd055 1232(defbinding tooltips-set-tip () nil
2afcd8bd 1233 (tooltips tooltips)
1234 (widget widget)
1235 (tip-text string)
1236 (tip-private string))
0d07716f 1237
a60bd055 1238(defbinding tooltips-set-colors (tooltips background foreground) nil
2afcd8bd 1239 (tooltips tooltips)
1240 ((gdk:ensure-color background) gdk:color)
1241 ((gdk:ensure-color foreground) gdk:color))
0d07716f 1242
a60bd055 1243(defbinding tooltips-force-window () nil
2afcd8bd 1244 (tooltips tooltips))
0d07716f 1245
1246
1247
2afcd8bd 1248;;; Rc
0d07716f 1249
a60bd055 1250(defbinding rc-add-default-file (filename) nil
2afcd8bd 1251 ((namestring (truename filename)) string))
0d07716f 1252
a60bd055 1253(defbinding rc-parse (filename) nil
2afcd8bd 1254 ((namestring (truename filename)) string))
0d07716f 1255
a60bd055 1256(defbinding rc-parse-string () nil
2afcd8bd 1257 (rc-string string))
0d07716f 1258
a60bd055 1259(defbinding rc-reparse-all () nil)
0d07716f 1260
a60bd055 1261(defbinding rc-get-style () style
2afcd8bd 1262 (widget widget))
0d07716f 1263
1264
1265
1266;;; Accelerator Groups
a60bd055 1267#|
1268(defbinding accel-group-get-default () accel-group)
0d07716f 1269
30481825 1270(deftype-method alien-ref accel-group (type-spec)
1271 (declare (ignore type-spec))
1272 '%accel-group-ref)
0d07716f 1273
30481825 1274(deftype-method alien-unref accel-group (type-spec)
1275 (declare (ignore type-spec))
1276 '%accel-group-unref)
1277
a60bd055 1278(defbinding %accel-group-ref () accel-group
30481825 1279 (accel-group (or accel-group pointer)))
1280
a60bd055 1281(defbinding %accel-group-unref () nil
30481825 1282 (accel-group (or accel-group pointer)))
0d07716f 1283
a60bd055 1284(defbinding accel-group-activate (accel-group key modifiers) boolean
0d07716f 1285 (accel-group accel-group)
1286 ((gdk:keyval-from-name key) unsigned-int)
1287 (modifiers gdk:modifier-type))
1288
a60bd055 1289(defbinding accel-groups-activate (object key modifiers) boolean
0d07716f 1290 (object object)
1291 ((gdk:keyval-from-name key) unsigned-int)
1292 (modifiers gdk:modifier-type))
1293
a60bd055 1294(defbinding accel-group-attach () nil
0d07716f 1295 (accel-group accel-group)
1296 (object object))
1297
a60bd055 1298(defbinding accel-group-detach () nil
0d07716f 1299 (accel-group accel-group)
1300 (object object))
1301
a60bd055 1302(defbinding accel-group-lock () nil
0d07716f 1303 (accel-group accel-group))
1304
a60bd055 1305(defbinding accel-group-unlock () nil
0d07716f 1306 (accel-group accel-group))
1307
1308
1309;;; Accelerator Groups Entries
1310
a60bd055 1311(defbinding accel-group-get-entry (accel-group key modifiers) accel-entry
0d07716f 1312 (accel-group accel-group)
1313 ((gdk:keyval-from-name key) unsigned-int)
1314 (modifiers gdk:modifier-type))
1315
a60bd055 1316(defbinding accel-group-lock-entry (accel-group key modifiers) nil
0d07716f 1317 (accel-group accel-group)
1318 ((gdk:keyval-from-name key) unsigned-int)
1319 (modifiers gdk:modifier-type))
1320
a60bd055 1321(defbinding accel-group-unlock-entry (accel-group key modifiers) nil
0d07716f 1322 (accel-group accel-group)
1323 ((gdk:keyval-from-name key) unsigned-int)
1324 (modifiers gdk:modifier-type))
1325
a60bd055 1326(defbinding accel-group-add
0d07716f 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)
1331 (flags accel-flags)
1332 (object object)
1333 ((name-to-string signal) string))
1334
a60bd055 1335(defbinding accel-group-add (accel-group key modifiers object) nil
0d07716f 1336 (accel-group accel-group)
1337 ((gdk:keyval-from-name key) unsigned-int)
1338 (modifiers gdk:modifier-type)
1339 (object object))
1340
1341
1342;;; Accelerator Signals
1343
a60bd055 1344(defbinding accel-group-handle-add
0d07716f 1345 (object signal-id accel-group key modifiers flags) nil
1346 (object object)
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))
1352
a60bd055 1353(defbinding accel-group-handle-remove
0d07716f 1354 (object accel-group key modifiers) nil
1355 (object object)
1356 (accel-group accel-group)
1357 ((gdk:keyval-from-name key) unsigned-int)
1358 (modifiers gdk:modifier-type))
a60bd055 1359|#
0d07716f 1360
1361
1362;;; Style
1363
a60bd055 1364; (defbinding style-new () style)
0d07716f 1365
a60bd055 1366; (defbinding style-copy () style
0d07716f 1367; (style style))
a60bd055 1368#|
1369(defbinding %style-get-color () gdk:color
2afcd8bd 1370 (style style)
1371 (color-type color-type)
1372 (state-type state-type))
0d07716f 1373
a60bd055 1374(defbinding %style-set-color () gdk:color
2afcd8bd 1375 (style style)
1376 (color-type color-type)
1377 (state-type state-type)
1378 (color gdk:color))
0d07716f 1379
2afcd8bd 1380(defun style-fg (style state)
1381 (%style-get-color style :foreground state))
0d07716f 1382
2afcd8bd 1383(defun (setf style-fg) (color style state)
1384 (%style-set-color style :foreground state color))
0d07716f 1385
2afcd8bd 1386(defun style-bg (style state)
1387 (%style-get-color style :background state))
0d07716f 1388
2afcd8bd 1389(defun (setf style-bg) (color style state)
1390 (%style-set-color style :background state color))
0d07716f 1391
2afcd8bd 1392(defun style-text (style state)
1393 (%style-get-color style :text state))
0d07716f 1394
2afcd8bd 1395(defun (setf style-text) (color style state)
1396 (%style-set-color style :text state color))
0d07716f 1397
2afcd8bd 1398(defun style-base (style state)
1399 (%style-get-color style :base state))
0d07716f 1400
2afcd8bd 1401(defun (setf style-base) (color style state)
1402 (%style-set-color style :base state color))
0d07716f 1403
2afcd8bd 1404(defun style-white (style)
1405 (%style-get-color style :white :normal))
0d07716f 1406
2afcd8bd 1407(defun (setf style-white) (color style)
1408 (%style-set-color style :white :normal color))
0d07716f 1409
2afcd8bd 1410(defun style-black (style)
1411 (%style-get-color style :black :normal))
0d07716f 1412
2afcd8bd 1413(defun (setf style-black) (color style)
1414 (%style-set-color style :black :normal color))
0d07716f 1415
a60bd055 1416(defbinding style-get-gc () gdk:gc
2afcd8bd 1417 (style style)
1418 (color-type color-type)
1419 (state-type state-type))
32483ef6 1420
a60bd055 1421|#
1422(defbinding draw-hline () nil
32483ef6 1423 (style style)
1424 (window gdk:window)
1425 (state state-type)
1426 (x1 int)
1427 (x2 int)
1428 (y int))
1429
a60bd055 1430(defbinding draw-vline () nil
32483ef6 1431 (style style)
1432 (window gdk:window)
1433 (state state-type)
1434 (y1 int)
1435 (y2 int)
1436 (x int))
1437
a60bd055 1438(defbinding draw-shadow () nil
32483ef6 1439 (style style)
1440 (window gdk:window)
1441 (state state-type)
1442 (shadow shadow-type)
1443 (x int)
1444 (y int)
1445 (width int)
1446 (height int))
1447
a60bd055 1448; (defbinding draw-polygon () nil
32483ef6 1449; (style style)
1450; (window gdk:window)
1451; (state state-type)
1452; (shadow shadow-type)
1453; (points (vector gdk:point))
1454; ((length points) int)
1455; (fill boolean))
1456
a60bd055 1457(defbinding draw-arrow () nil
32483ef6 1458 (style style)
1459 (window gdk:window)
1460 (state state-type)
1461 (shadow shadow-type)
1462 (arrow arrow-type)
1463 (fill boolean)
1464 (x int)
1465 (y int)
1466 (width int)
1467 (height int))
1468
a60bd055 1469(defbinding draw-diamond () nil
32483ef6 1470 (style style)
1471 (window gdk:window)
1472 (state state-type)
1473 (shadow shadow-type)
1474 (x int)
1475 (y int)
1476 (width int)
1477 (height int))
1478
a60bd055 1479; (defbinding draw-oval () nil
32483ef6 1480; (style style)
1481; (window gdk:window)
1482; (state state-type)
1483; (shadow shadow-type)
1484; (x int)
1485; (y int)
1486; (width int)
1487; (height int))
1488
a60bd055 1489(defbinding draw-string () nil
32483ef6 1490 (style style)
1491 (window gdk:window)
1492 (state state-type)
1493 (x int)
1494 (y int)
1495 (string string))
1496
a60bd055 1497(defbinding draw-box () nil
32483ef6 1498 (style style)
1499 (window gdk:window)
1500 (state state-type)
1501 (shadow shadow-type)
1502 (x int)
1503 (y int)
1504 (width int)
1505 (height int))
1506
a60bd055 1507(defbinding draw-flat-box () nil
32483ef6 1508 (style style)
1509 (window gdk:window)
1510 (state state-type)
1511 (shadow shadow-type)
1512 (x int)
1513 (y int)
1514 (width int)
1515 (height int))
1516
a60bd055 1517(defbinding draw-check () nil
32483ef6 1518 (style style)
1519 (window gdk:window)
1520 (state state-type)
1521 (shadow shadow-type)
1522 (x int)
1523 (y int)
1524 (width int)
1525 (height int))
1526
a60bd055 1527(defbinding draw-option () nil
32483ef6 1528 (style style)
1529 (window gdk:window)
1530 (state state-type)
1531 (shadow shadow-type)
1532 (x int)
1533 (y int)
1534 (width int)
1535 (height int))
1536
a60bd055 1537; (defbinding draw-cross () nil
32483ef6 1538; (style style)
1539; (window gdk:window)
1540; (state state-type)
1541; (shadow shadow-type)
1542; (x int)
1543; (y int)
1544; (width int)
1545; (height int))
1546
a60bd055 1547; (defbinding draw-ramp () nil
32483ef6 1548; (style style)
1549; (window gdk:window)
1550; (state state-type)
1551; (shadow shadow-type)
1552; (arrow arrow-type)
1553; (x int)
1554; (y int)
1555; (width int)
1556; (height int))
1557
a60bd055 1558(defbinding draw-tab () nil
32483ef6 1559 (style style)
1560 (window gdk:window)
1561 (state state-type)
1562 (x int)
1563 (y int)
1564 (width int)
1565 (height int))
1566
a60bd055 1567(defbinding draw-shadow-gap () nil
32483ef6 1568 (style style)
1569 (window gdk:window)
1570 (state state-type)
1571 (x int)
1572 (y int)
1573 (width int)
1574 (height int)
1575 (gap-side position-type)
1576 (gap-x int)
1577 (gap-width int))
1578
a60bd055 1579(defbinding draw-box-gap () nil
32483ef6 1580 (style style)
1581 (window gdk:window)
1582 (state state-type)
1583 (x int)
1584 (y int)
1585 (width int)
1586 (height int)
1587 (gap-side position-type)
1588 (gap-x int)
1589 (gap-width int))
1590
a60bd055 1591(defbinding draw-extension () nil
32483ef6 1592 (style style)
1593 (window gdk:window)
1594 (state state-type)
1595 (x int)
1596 (y int)
1597 (width int)
1598 (height int))
1599
a60bd055 1600(defbinding draw-focus () nil
32483ef6 1601 (style style)
1602 (window gdk:window)
1603 (x int)
1604 (y int)
1605 (width int)
1606 (height int))
1607
a60bd055 1608(defbinding draw-slider () nil
32483ef6 1609 (style style)
1610 (window gdk:window)
1611 (state state-type)
1612 (shadow shadow-type)
1613 (x int)
1614 (y int)
1615 (width int)
1616 (height int)
1617 (orientation orientation))
1618
a60bd055 1619(defbinding draw-handle () nil
32483ef6 1620 (style style)
1621 (window gdk:window)
1622 (state state-type)
1623 (shadow shadow-type)
1624 (x int)
1625 (y int)
1626 (width int)
1627 (height int)
1628 (orientation orientation))
1629
a60bd055 1630(defbinding draw-handle () nil
32483ef6 1631 (style style)
1632 (window gdk:window)
1633 (state state-type)
1634 (shadow shadow-type)
1635 (x int)
1636 (y int)
1637 (width int)
1638 (height int)
1639 (orientation orientation))
1640
a60bd055 1641(defbinding paint-hline () nil
32483ef6 1642 (style style)
1643 (window gdk:window)
1644 (state state-type)
1645 (x1 int)
1646 (x2 int)
1647 (y int))