chiark / gitweb /
Introspected classes now defined in propper order
[clg] / gtk / gtktypes.lisp
CommitLineData
560af5c5 1;; Common Lisp bindings for GTK+ v2.0.x
56460319 2;; Copyright (C) 1999-2001 Espen S. Johnsen <espen@users.sourceforge.org>
560af5c5 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
68f519e0 18;; $Id: gtktypes.lisp,v 1.30 2005-01-12 13:38:18 espen Exp $
560af5c5 19
20
21(in-package "GTK")
22
2719586f 23(defclass requisition (boxed)
24 ((width
25 :allocation :alien
26 :accessor requisition-width
27 :initarg :width
28 :type int)
29 (height
30 :allocation :alien
31 :accessor requisition-height
32 :initarg :height
33 :type int))
1047e159 34 (:metaclass boxed-class))
35
2719586f 36
e6d40e16 37(defclass allocation (struct)
38 ((x
39 :allocation :alien
40 :accessor allocation-width
41 :initarg :x
42 :type int)
43 (y
44 :allocation :alien
45 :accessor allocation-width
46 :initarg :width
47 :type int)
48 (width
49 :allocation :alien
50 :accessor allocation-width
51 :initarg :width
52 :type int)
53 (height
54 :allocation :alien
55 :accessor allocation-height
56 :initarg :height
57 :type int))
9adccb27 58 (:metaclass struct-class))
e6d40e16 59
2719586f 60(defclass border (boxed)
61 ((left
62 :allocation :alien
63 :accessor border-left
64 :initarg :left
65 :type int)
66 (right
67 :allocation :alien
68 :accessor border-right
69 :initarg :right
70 :type int)
71 (top
72 :allocation :alien
73 :accessor border-top
74 :initarg :top
75 :type int)
76 (bottom
77 :allocation :alien
78 :accessor border-bottom
79 :initarg :bottom
80 :type int))
1047e159 81 (:metaclass boxed-class))
2719586f 82
f5b67f2b 83(defclass stock-item (struct)
84 ((id
85 :allocation :alien
86 :accessor stock-item-id
87 :initarg :id
88 :type string)
89 (label
90 :allocation :alien
91 :accessor stock-item-label
92 :initarg :label
93 :type string)
94 (modifier
95 :allocation :alien
96 :accessor stock-item-modifier
97 :initarg :modifier
98 :type gdk:modifier-type)
99 (keyval
100 :allocation :alien
101 :accessor stock-item-keyval
102 :initarg :keyval
103 :type int)
104 (translation-domain
105 :allocation :alien
106 :accessor stock-item-translation-domain
107 :initarg :translation-domain
108 :type string))
5e17fb78 109 (:metaclass struct-class))
f5b67f2b 110
2a8752b0 111;; We don't really need to access any of these slots, but we need to
112;; specify the size of the struct somehow
113(defclass tree-iter (boxed)
114 ((stamp :allocation :alien :type int)
115 (user-data :allocation :alien :type pointer)
116 (user-data2 :allocation :alien :type pointer)
117 (user-data3 :allocation :alien :type pointer))
118 (:metaclass boxed-class))
119
120
121;; (defclass tree-path (boxed)
122;; ((depth :allocation :alien :type int)
123;; (indices :allocation :alien :type pointer))
124;; (:metaclass boxed-class))
125
f4175703 126(deftype tree-path () '(vector integer))
2a8752b0 127(register-type 'tree-path "GtkTreePath")
128
68f519e0 129(deftype position ()
130 '(or int (enum (:start 0) (:end -1) (:first 0) (:last -1))))
131
132(defmethod reader-function ((type (eql 'position)) &rest args)
133 (declare (ignore type args))
134 (reader-function 'int))
d76e9fca 135
136;; Forward definitions
137(defclass widget (%object)
138 ()
139 (:metaclass gobject-class))
140(defclass container (widget)
141 ()
142 (:metaclass gobject-class))
143
2a8752b0 144
2719586f 145(define-types-by-introspection "Gtk"
146 ;; Manually defined
147 ("GtkObject" :ignore t)
148 ("GtkRequisition" :ignore t)
149 ("GtkBorder" :ignore t)
2a8752b0 150 ("GtkTreeIter" :ignore t)
151 ("GtkTreePath" :ignore t)
aa77651b 152; ("GtkStyle" :ignore t)
1047e159 153
5b51dee1 154 ;; Manual override
155 ("GtkWidget"
156 :slots
c289d084 157 ((child-properties
1047e159 158 :allocation :instance
c289d084 159 :accessor widget-child-properties
1047e159 160 :type container-child)
5b51dee1 161 (window
162 :allocation :virtual
163 :getter "gtk_widget_get_window"
164 :reader widget-window
165 :type gdk:window)
68f519e0 166 (parent-window
167 :allocation :virtual
168 :getter %widget-parent-window
169 :setter "gtk_widget_set_parent_window"
170 :accessor widget-parent-window
171 :initarg :parent-window
172 :type gdk:window)
5b51dee1 173 (state
174 :allocation :virtual
175 :getter "gtk_widget_get_state"
176 :setter "gtk_widget_set_state"
177 :accessor widget-state
178 :initarg :state
179 :type state-type)
180 (colormap
181 :allocation :virtual
182 :getter "gtk_widget_get_colormap"
e6d40e16 183 :setter "gtk_widget_set_colormap"
184 :initarg :colormap
185 :accessor widget-colormap
5b51dee1 186 :type gdk:colormap)
187 (visual
188 :allocation :virtual
189 :getter "gtk_widget_get_visual"
190 :reader widget-visual
e6d40e16 191 :type gdk:visual)
192 (direction
193 :allocation :virtual
194 :getter "gtk_widget_get_direction"
195 :setter "gtk_widget_set_direction"
196 :accessor widget-direction
197 :initarg :direction
198 :type text-direction)
199 (composite-name
200 :allocation :virtual
201 :getter "gtk_widget_get_composite_name"
202 :setter "gtk_widget_set_composite_name"
203 :accessor widget-composite-name
204 :initarg :composite-name
68f519e0 205 :type (copy-of string)) ; will leak the string when setting
e6d40e16 206 (settings
207 :allocation :virtual
208 :getter "gtk_widget_get_settings"
209 :accessor widget-settings
210 :type settings)
211 (child-visible
212 :allocation :virtual
213 :getter "gtk_widget_get_child_visible"
214 :setter "gtk_widget_set_child_visible"
215 :accessor widget-child-visible-p
216 :initarg :child-visible
aa77651b 217 :type boolean)
218 (width-request
219 :merge t :unbound -1)
220 (height-request
221 :merge t :unbound -1)))
e6d40e16 222
5b51dee1 223 ("GtkContainer"
224 :slots
d76e9fca 225 ((child :ignore t)
5b51dee1 226 (children
227 :allocation :virtual
228 :getter container-children
d76e9fca 229 :setter (setf container-children)
230 ;; The following doesn't work because gtk_container_get_children doesn't
231 ;; increase the reference count of the children
232; :getter "gtk_container_get_children"
233; :reader container-children
234; :type (glist widget)
235 )
236 (child-type
237 :allocation :virtual
cb4bf772 238 :getter "gtk_container_child_type"
d76e9fca 239 :reader container-child-type
240 :type gtype)
5b51dee1 241 (focus-child
242 :allocation :virtual
243 :getter "gtk_container_get_focus_child"
244 :setter "gtk_container_set_focus_child"
245 :accessor container-focus-child
246 :initarg :focus-child
247 :type widget)
e6d40e16 248 (focus-chain
249 :allocation :virtual
250 :getter container-focus-chain
251 :setter (setf container-focus-chain))
5b51dee1 252 (focus-hadjustment
253 :allocation :virtual
254 :getter "gtk_container_get_focus_hadjustment"
255 :setter "gtk_container_set_focus_hadjustment"
256 :accessor container-focus-hadjustment
257 :initarg :focus-hadjustment
258 :type adjustment)
259 (focus-vadjustment
260 :allocation :virtual
261 :getter "gtk_container_get_focus_vadjustment"
262 :setter "gtk_container_set_focus_vadjustment"
263 :accessor container-focus-vadjustment
264 :initarg :focus-vadjustment
d76e9fca 265 :type adjustment)
266 (reallocate-redraws
267 :allocation :virtual
268 :getter "gtk_container_get_reallocate_redraws"
269 :setter "gtk_container_set_reallocate_redraws"
270 :accessor container-reallocate-redraws
271 :initarg :reallocate-redraws
272 :type boolean)))
5b51dee1 273
274 ("GtkBin"
275 :slots
276 ((child
277 :allocation :virtual
56460319 278 :getter "gtk_bin_get_child"
279 :setter (setf bin-child)
280 :reader bin-child
281 :type widget)))
3f73963b 282
283 ("GtkWindow"
284 :slots
4d16221f 285 ((focus-widget
3f73963b 286 :allocation :virtual
287 :getter "gtk_window_get_focus"
288 :setter "gtk_window_set_focus"
289 :accessor window-focus-widget
290 :initarg :focus-widget
291 :type widget)
292 (default-widget
293 :allocation :virtual
294 :getter "gtk_window_get_default"
295 :setter "gtk_window_set_default"
296 :accessor window-default-widget
297 :initarg :default-widget
298 :type widget)
3f73963b 299 (has-frame
300 :allocation :virtual
301 :getter "gtk_window_get_has_frame"
302 :setter "gtk_window_set_has_frame"
303 :accessor window-has-frame-p
304 :initarg :has-frame
305 :type boolean)
4d16221f 306 (icon-list
3f73963b 307 :allocation :virtual
4d16221f 308 :getter "gtk_window_get_icon_list"
309 :setter "gtk_window_set_icon_list"
310 :accessor window-icon-list
311 :initarg :icon-list
312 :type (glist gdk:pixbuf))
3f73963b 313 (mnemonic-modifier
314 :allocation :virtual
315 :getter "gtk_window_get_mnemonic_modifier"
316 :setter "gtk_window_set_mnemonic_modifier"
317 :accessor window-mnemonic-modifier
318 :initarg :mnemonic-modifier
319 :type gdk:modifier-type)
320 (transient-for
321 :allocation :virtual
322 :getter "gtk_window_get_transient_for"
323 :setter "gtk_window_set_transient_for"
324 :accessor window-transient-for
325 :initarg :transient-for
4d16221f 326 :type window)
327 (group
328 :allocation :virtual
329 :getter "gtk_window_get_group"
330 :setter (setf window-group)
331 :reader window-group
332 :initarg :group
333 :type window-group)
334 (default-width :merge t :unbound -1)
335 (default-height :merge t :unbound -1)))
5b51dee1 336
4d16221f 337 ("GtkWindowGroup"
338 :slots
339 ((grabs
340 :allocation :alien
341 :accessor window-group-grabs
342 :type (gslist window))))
343
5b51dee1 344 ("GtkTooltips"
345 :slots
346 ((enabled
347 :allocation :virtual
348 :getter "gtk_tooltips_get_enabled"
349 :setter (setf tooltips-enabled-p)
350 :reader tooltips-enabled-p
351 :initarg :enabled
352 :type boolean)))
353
5b51dee1 354 ("GtkMenuItem"
355 :slots
356 ((label
357 :allocation :virtual
f5b67f2b 358 :getter menu-item-label
359 :setter (setf menu-item-label)
5b51dee1 360 :type string)
d76e9fca 361 (use-underline
362 :allocation :user-data
363 :initform nil
364 :initarg :use-underline
365 :accessor menu-item-use-underline-p)
f5b67f2b 366 (right-justified
367 :allocation :virtual
368 :getter "gtk_menu_item_get_right_justified"
369 :setter "gtk_menu_item_set_right_justified"
370 :accessor menu-item-right-justified-p
371 :initarg :right-justified
372 :type boolean)
5b51dee1 373 (submenu
374 :allocation :virtual
375 :getter "gtk_menu_item_get_submenu"
d76e9fca 376 :setter "gtk_menu_item_set_submenu"
377 :accessor menu-item-submenu
5b51dee1 378 :initarg :submenu
d76e9fca 379 :type widget)))
5b51dee1 380
381 ("GtkColorSelectionDialog"
382 :slots
383 ((colorsel
384 :allocation :alien
385 :reader color-selection-dialog-colorsel
386 :type widget)
387 (ok-button
388 :allocation :alien
389 :reader color-selection-dialog-ok-button
390 :type widget)
391 (cancel-button
392 :allocation :alien
393 :reader color-selection-dialog-cancel-button
394 :type widget)
395 (help-button
396 :allocation :alien
397 :reader color-selection-dialog-help-button
398 :type widget)))
399
400 ("GtkScrolledWindow"
401 :slots
402 ((hscrollbar
403 :allocation :alien
404 :reader scrolled-window-hscrollbar
405 :type widget)
406 (vscrollbar
407 :allocation :alien
408 :reader scrolled-window-vscrollbar
409 :type widget)))
560af5c5 410
5b51dee1 411 ("GtkPaned"
1047e159 412 :slots
5b51dee1 413 ((child1
560af5c5 414 :allocation :virtual
1dd03ab8 415 :getter "gtk_paned_get_child1"
416 :setter "gtk_paned_add1"
417 :accessor paned-child1
5b51dee1 418 :initarg :child1
560af5c5 419 :type widget)
5b51dee1 420 (child2
2d379b6a 421 :allocation :virtual
1dd03ab8 422 :getter "gtk_paned_get_child2"
423 :setter "gtk_paned_add2"
424 :accessor paned-child2
5b51dee1 425 :initarg :child2
426 :type widget)))
560af5c5 427
5b51dee1 428 ("GtkMenu"
429 :slots
430 ((accel-group
431 :allocation :virtual
432 :getter "gtk_menu_get_accel_group"
433 :setter "gtk_menu_set_accel_group"
434 :accessor menu-accel-group
435 :initarg :accel-group
436 :type accel-group)
437 (active
438 :allocation :virtual
439 :getter "gtk_menu_get_active"
440 :setter (setf menu-active)
441 :reader menu-active
442 :initarg :active
443 :type widget)
d76e9fca 444 (screen
445 :allocation :virtual
446 :getter "gtk_menu_get_screen"
447 :setter "gtk_menu_set_screen"
448 :accessor menu-screen
449 :initarg :screen
450 :type gdk:screen)
451 (attach-widget
452 :allocation :virtual
453 :getter "gtk_menu_get_attach_widget"
454 :reader menu-attach-widget
455 :type widget)
456 #-gtk2.6
457 (tearoff-state
5b51dee1 458 :allocation :virtual
459 :getter "gtk_menu_get_tearoff_state"
460 :setter "gtk_menu_set_tearoff_state"
d76e9fca 461 :accessor menu-tearoff-state-p
462 :initarg :tearoff-state
5b51dee1 463 :type boolean)))
464
465 ("GtkToolbar"
466 :slots
cb4bf772 467 ((show-tooltips
5b51dee1 468 :allocation :virtual
469 :getter "gtk_toolbar_get_tooltips"
470 :setter "gtk_toolbar_set_tooltips"
cb4bf772 471 :accessor toolbar-show-tooltips-p
472 :initarg :show-tooltips
5b51dee1 473 :type boolean)
cb4bf772 474 (tooltips
5b51dee1 475 :allocation :virtual
cb4bf772 476 :getter "gtk_toolbar_get_tooltips_object"
477 :reader toolbar-tooltips
478 :type tooltips)
1047e159 479 (toolbar-style
480 :allocation :property
481 :pname "toolbar-style"
482 :initarg :toolbar-style
483 :accessor toolbar-style
cb4bf772 484 :type toolbar-style)
485 (n-items
486 :allocation :virtual
487 :getter "gtk_toolbar_get_n_items"
488 :reader toolbar-n-items
489 :type int)))
5b51dee1 490
d76e9fca 491 ("GtkToolItem"
492 :slots
cb4bf772 493 ((use-drag-window
d76e9fca 494 :allocation :virtual
cb4bf772 495 :getter "gtk_tool_item_get_use_drag_window"
496 :setter "gtk_tool_item_set_use_drag_window"
497 :accessor tool-item-use-drag-window-p
d76e9fca 498 :initarg :drag-window
cb4bf772 499 :type boolean)
500 (tip-text
501 :allocation :user-data
502 :setter (setf tool-item-tip-text)
503 :initarg :tip-text
504 :reader tool-item-tip-text)
505 (tip-private
506 :allocation :user-data
507 :setter (setf tool-item-tip-private)
508 :initarg :tip-private
509 :reader tool-item-tip-private)))
510
511 ("GtkToolButton"
512 :slots
513 ((stock-id :merge t :initarg :stock)
514 (icon-widget :merge t :initarg :icon)))
d76e9fca 515
516 ("GtkToggleToolButton"
517 :slots
518 ((active
519 :allocation :virtual
520 :getter "gtk_toggle_tool_button_get_active"
521 :setter "gtk_toggle_tool_button_get_active"
522 :accessor toggle-tool-button-active-p
523 :initarg :active
524 :type boolean)))
525
526 ("GtkRadioToolButton"
527 :slots
528 ((group
529 :allocation :virtual
530 :getter "gtk_radio_tool_button_get_group"
531 :reader radio-tool-button-group
cb4bf772 532 :type (copy-of (gslist widget)))
533 (value
534 :allocation :user-data
535 :initarg :value
536 :accessor radio-tool-button-value
537 :documentation "Value passed as argument to the activate callback")))
d76e9fca 538
f5b67f2b 539 ("GtkNotebook"
540 :slots
541 ((current-page
542 :allocation :virtual
68f519e0 543 :getter %notebook-current-page
f5b67f2b 544 :setter (setf notebook-current-page)
68f519e0 545 :reader notebook-current-page
546 :type widget
f5b67f2b 547 :initarg :current-page)
68f519e0 548 (current-page-num
549 :allocation :virtual
550 :getter "gtk_notebook_get_current_page"
551 :setter "gtk_notebook_set_current_page"
552 :unbound -1
553 :initarg :current-page-num
554 :accessor notebook-current-page-num
555 :type position)))
f5b67f2b 556
5b51dee1 557 ("GtkRuler"
558 :slots
559 ((metric
560 :allocation :virtual
561 :getter "gtk_ruler_get_metric"
562 :setter "gtk_ruler_set_metric"
563 :accessor ruler-metric
564 :initarg :metric
565 :type metric-type)))
566
567 ("GtkProgressBar"
568 :slots
569 ; deprecated properties
570 ((bar-style :ignore t)
571 (adjustment :ignore t)
572 (activity-step :ignore t)
573 (activity-blocks :ignore t)
574 (discrete-blocks :ignore t)))
575
d76e9fca 576 ("GtkHandleBox"
577 :slots
578 ; deprecated property
579 ((shadow :ignore t)))
580
581 ("GtkFrame"
582 :slots
583 ; deprecated property
584 ((shadow :ignore t)))
585
5b51dee1 586 ("GtkTable"
587 :slots
588 ((column-spacing
589 :allocation :virtual
590 :getter "gtk_table_get_default_col_spacing"
591 :setter "gtk_table_set_col_spacings"
592 :initarg :column-spacing
593 :type unsigned-int)
594 (row-spacing
595 :allocation :virtual
596 :getter "gtk_table_get_default_row_spacing"
597 :setter "gtk_table_set_row_spacings"
598 :initarg :row-spacing
599 :type unsigned-int)))
600
601 ("GtkDialog"
602 :slots
1047e159 603 ((vbox
5b51dee1 604 :allocation :virtual
605 :getter "gtk_dialog_get_vbox"
1047e159 606 :reader dialog-vbox
5b51dee1 607 :type widget)
608 (action-area
609 :allocation :virtual
610 :getter "gtk_dialog_get_action_area"
611 :reader dialog-action-area
612 :type widget)))
2ed3bebb 613
d76e9fca 614 ("GtkEntry"
5b51dee1 615 :slots
d76e9fca 616 ((layout
5b51dee1 617 :allocation :virtual
d76e9fca 618 :getter "gtk_entry_get_layout"
619 :reader entry-layout
620 :type pango:layout)
621 (completion
622 :getter "gtk_entry_get_completion"
623 :setter "gtk_entry_set_completion"
624 :initarg :completion
625 :accessor entry-completion
626 :type entry-completion)
627 (max-length :merge t :unbound 0)
628 #+gtk2.6
629 (with-chars :merge t :unbound -1)))
630
f45fd227 631 ("GtkEntryCompletion"
632 :slots
633 ((entry
634 :allocation :virtual
635 :getter "gtk_entry_completion_get_entry"
636 :reader entry-completion-entry
637 :type entry)
d76e9fca 638 (minimum-key-length :merge t :unbound -1)
f45fd227 639 #+gtk2.6
d76e9fca 640 (text-column :merge t :unbound -1)))
f45fd227 641
5b51dee1 642 ("GtkRadioButton"
643 :slots
644 ((group
645 :allocation :virtual
646 :getter "gtk_radio_button_get_group"
647 :reader radio-button-group
cb4bf772 648 :type (copy-of (gslist widget)))
649 (value
650 :allocation :user-data
651 :initarg :value
652 :accessor radio-button-value
653 :documentation "Value passed as argument to the activate callback")))
d520140e 654
5b51dee1 655 ("GtkRadioMenuItem"
656 :slots
657 ((group
658 :allocation :virtual
659 :getter "gtk_radio_menu_item_get_group"
660 :reader radio-menu-item-group
cb4bf772 661 :type (copy-of (gslist widget)))
662 (value
663 :allocation :user-data
664 :initarg :value
665 :accessor radio-menu-item-value
666 :documentation "Value passed as argument to the activate callback")))
560af5c5 667
5b51dee1 668 ("GtkLayout"
669 :slots
670 ((bin-window
1047e159 671 :allocation :virtual
5b51dee1 672 :getter "gtk_layout_get_bin_window"
673 :reader layout-bin-window
f784870f 674 :type gdk:window)))
f5b67f2b 675
676 ("GtkFixed"
677 :slots
678 ((has-window
1047e159 679 :allocation :virtual
f5b67f2b 680 :getter "gtk_fixed_get_has_window"
681 :setter "gtk_fixed_set_has_window"
682 :reader fixed-has-window-p
683 :initarg :has-window
684 :type boolean)))
1047e159 685
686 ("GtkRange"
687 :slots
688 ((value
689 :allocation :virtual
690 :getter "gtk_range_get_value"
691 :setter "gtk_range_set_value"
692 :initarg :value
693 :accessor range-value
694 :type double-float)
695 (upper
696 :allocation :virtual
697 :getter range-upper
698 :setter (setf range-upper)
699 :initarg :upper)
700 (lower
701 :allocation :virtual
702 :getter range-lower
703 :setter (setf range-lower)
704 :initarg :lower)
705 (step-increment
706 :allocation :virtual
707 :getter range-step-increment
708 :setter (setf range-step-increment)
709 :initarg :step-increment)
710 (page-increment
711 :allocation :virtual
712 :getter range-page-increment
713 :setter (setf range-page-increment)
714 :initarg :page-increment)))
715
716 ("GtkImage"
717 :slots
d76e9fca 718 ((file :ignore t)
719 #+gtk2.6
720 (pixel-size :merge t :unbound -1)))
721
722 ("GtkLabel"
723 :slots
724 ((layout
725 :allocation :virtual
726 :getter "gtk_label_get_layout"
727 :reader label-layout
728 :type pango:layout)))
729
68f519e0 730 ("GtkScale"
731 :slots
732 ((layout
733 :allocation :virtual
734 :getter "gtk_scale_get_layout"
735 :reader scale-layout
736 :type pango:layout)))
737
1047e159 738 ("GtkEditable"
739 :slots
740 ((editable
741 :allocation :virtual
742 :getter "gtk_editable_get_editable"
743 :setter "gtk_editable_set_editable"
744 :reader editable-editable-p
745 :initarg :editable
746 :type boolean)
747 (position
748 :allocation :virtual
749 :getter "gtk_editable_get_position"
750 :setter "gtk_editable_set_position"
751 :reader editable-position
752 :initarg :position
cb4bf772 753 :type position)
1047e159 754 (text
755 :allocation :virtual
756 :getter editable-text
757 :setter (setf editable-text)
758 :initarg text)))
759
760 ("GtkFileChooser"
761 :slots
762 ((filename
763 :allocation :virtual
764 :getter "gtk_file_chooser_get_filename"
765 :setter "gtk_file_chooser_set_filename"
766 :accessor file-chooser-filename
767 :initarg :filename
768 :type string)
769 (current-name
770 :allocation :virtual
771 :setter "gtk_file_chooser_set_current_name"
68f519e0 772 :accessor file-chooser-current-name
1047e159 773 :initarg :current-name
774 :type string)
775 (current-folder
776 :allocation :virtual
777 :setter "gtk_file_chooser_set_current_folder"
778 :setter "gtk_file_chooser_get_current_folder"
68f519e0 779 :accessor file-chooser-current-folder
1047e159 780 :initarg :current-folder
781 :type string)
782 (uri
783 :allocation :virtual
784 :getter "gtk_file_chooser_get_uri"
785 :setter "gtk_file_chooser_set_uri"
68f519e0 786 :accessor file-chooser-uri
1047e159 787 :initarg :uri
788 :type string)
789 (current-folder-uri
790 :allocation :virtual
791 :setter "gtk_file_chooser_set_current_folder_uri"
792 :setter "gtk_file_chooser_get_current_folder_uri"
68f519e0 793 :accessor file-chooser-current-folder-uri
1047e159 794 :initarg :current-folder-uri
795 :type string)))
796
68f519e0 797 ("GtkFileFilter"
798 :slots
799 ((name
800 :allocation :virtual
801 :getter "gtk_file_filter_get_name"
802 :setter "gtk_file_filter_set_name"
803 :accessor file-filter-name
804 :initarg :name
805 :type string)))
806
1a1949c7 807 ("GtkTreeView"
808 :slots
809 ((columns
810 :allocation :virtual
811 :getter "gtk_tree_view_get_columns"
812 :reader tree-view-columns
f4175703 813 :type (glist tree-view-column))
814 (selection
815 :allocation :virtual
816 :getter "gtk_tree_view_get_selection"
817 :reader tree-view-selection
818 :type tree-selection)))
1a1949c7 819
2a8752b0 820 ("GtkTreeModel"
821 :slots
822 ((n-columns
823 :allocation :virtual
824 :getter "gtk_tree_model_get_n_columns"
825 :reader tree-model-n-columns
826 :type int)))
827
f4175703 828 ("GtkTreeSelection"
829 :slots
830 ((mode
831 :allocation :virtual
832 :getter "gtk_tree_selection_get_mode"
833 :setter "gtk_tree_selection_set_mode"
834 :accessor tree-selection-mode
835 :initarg :mode
836 :type selection-mode)
837 (tree-view
838 :allocation :virtual
839 :getter "gtk_tree_selection_get_mode"
840 :reader tree-selection-mode
841 :type tree-view)))
842
1a1949c7 843 ("GtkComboBox"
844 :slots
845 ((active-iter
846 :allocation :virtual
847 :getter "gtk_combo_box_get_active_iter"
848 :setter "gtk_combo_box_set_active_iter"
849 :accessor combo-box-active-iter
850 :type tree-iter)))
851
aa77651b 852 ("GtkTextBuffer"
853 :slots
854 ((line-count
855 :allocation :virtual
856 :getter "gtk_text_buffer_get_line_count"
857 :reader text-buffer-line-count
858 :type int)
859 (char-count
860 :allocation :virtual
861 :getter "gtk_text_buffer_get_char_count"
862 :reader text-buffer-char-count
863 :type int)
864 (modified
865 :allocation :virtual
866 :getter "gtk_text_buffer_get_modified"
867 :setter "gtk_text_buffer_set_modified"
868 :accessor text-buffer-modifed-p
869 :type boolean)))
870
5e17fb78 871 ("GtkTextView"
872 :slots
873 ((default-attributes
874 :allocation :virtual
875 :getter "gtk_text_view_get_default_attributes"
876 :reader text-view-default-attributes
877 :type text-attributes)))
878
aa77651b 879 ("GtkTextTagTable"
880 :slots
881 ((size
882 :allocation :virtual
883 :getter "gtk_text_tag_table_get_size"
884 :reader text-tag-table-size
885 :type int)))
886
887 ("GtkTextTag"
888 :slots
889 ((priority
890 :allocation :virtual
891 :getter "gtk_text_tag_get_priority"
892 :setter "gtk_text_tag_set_priority"
893 :accessor text-tag-priority
894 :type int)
895 (weight
896 :merge t :type pango:weight)))
897
0763f21d 898 ("GtkTextMark"
899 :slots
900 ((buffer
901 :allocation :virtual
902 :getter "gtk_text_mark_get_buffer"
903 :reader text-mark-buffer
904 :type text-buffer)
905 (name
906 :allocation :virtual
907 :getter "gtk_text_mark_get_name"
908 :reader text-mark-name
909 :type string)
910 (visible
911 :allocation :virtual
912 :getter "gtk_text_mark_get_visible"
913 :setter "gtk_text_mark_set_visible"
914 :accessor text-mark-visible-p
915 :type boolean)
916 (deleted
917 :allocation :virtual
918 :getter "gtk_text_mark_get_deleted"
919 :reader text-mark-deleted-p
920 :type boolean)
921 (left-gravity
922 :allocation :virtual
923 :getter "gtk_text_mark_get_left_gravity"
924 :reader text-mark-left-gravity-p
925 :type boolean)))
926
5e17fb78 927 ("GtkUIManager"
928 :type ui-manager
929 :slots
930 ((action-groups
931 :allocation :virtual
932 :getter "gtk_ui_manager_get_action_groups"
933 :reader ui-manager-action-groups
934 :type (copy-of (glist action-group)))
935 (accel-group
936 :allocation :virtual
937 :getter "gtk_ui_manager_get_accel_group"
938 :reader ui-manager-accel-group
939 :type accel-group)))
940
941 ("GtkUIManagerItemType"
942 :type ui-manager-item-type)
943
944 ("GtkToggle"
945 :slots
946 ((accelerator
947 :allocation :virtual
948 :getter action-accelerator)))
949
950 ("GtkToggleAction"
951 :slots
952 ((active
953 :allocation :virtual
954 :getter "gtk_toggle_action_get_active"
955 :setter "gtk_toggle_action_set_active"
956 :initarg :active
957 :accessor toggle-action-active-p
958 :type boolean)))
959
960 ("GtkRadioAction"
961 :slots
962 ((group
963 :allocation :virtual
964 :getter "gtk_radio_button_get_group"
d76e9fca 965 :reader radio-action-group
5e17fb78 966 :type (copy-of (gslist widget)))
967 (%value
968 :allocation :property :pname "value"
969 :readable nil :type int)
970 (value
971 :allocation :virtual
972 :getter radio-action-value)))
2a8752b0 973
68f519e0 974 ("GtkColorSelection"
975 :slots
976 ((previous-alpha
977 :allocation :virtual
978 :getter "gtk_color_selection_get_previous_alpha"
979 :setter "gtk_color_selection_get_previous_alpha"
980 :initarg :previous-alpha
981 :accessor color-selection-previous-alpha
982 :type (unsigned 16))
983 (previous-color
984 :allocation :virtual
985 :getter "gtk_color_selection_get_previous_color"
986 :setter "gtk_color_selection_get_previous_color"
987 :initarg :previous-color
988 :accessor color-selection-previous-color
989 :type gdk:color)))
990
991 ("GtkFontSelection"
992 :slots
993 ; deprecated property
994 ((font :ignore t)))
aa77651b 995
5b51dee1 996 ;; Not needed
997 ("GtkFundamentalType" :ignore t)
998 ("GtkArgFlags" :ignore t)
560af5c5 999
d520140e 1000
5b51dee1 1001 ;; Deprecated widgets
1002 ("GtkCList" :ignore-prefix t)
1003 ("GtkCTree" :ignore-prefix t)
1a1949c7 1004 ("GtkList" :ignore t)
1005 ("GtkListItem" :ignore t)
5b51dee1 1006 ("GtkTree" :ignore t)
1007 ("GtkTreeItem" :ignore t)
1a1949c7 1008 ("GtkItemFactory" :ignore t)
5e17fb78 1009 ("GtkText" :ignore t)
5b51dee1 1010 ("GtkPacker" :ignore-prefix t)
1011 ("GtkPixmap" :ignore t)
1012 ("GtkPreview" :ignore-prefix t)
1a1949c7 1013 ("GtkProgres" :ignore t)
5b51dee1 1014 ("GtkTipsQuery" :ignore t)
1047e159 1015 ("GtkOldEditable" :ignore t)
1a1949c7 1016 ("GtkCombo" :ignore t)
1017 ("GtkOptionMenu" :ignore t)
68f519e0 1018 ("GtkFileSelection" :ignore t)
1019 ("GtkInputDialog")
1047e159 1020
1021 ;; What are these?
1022 ("GtkFileSystemModule" :ignore t)
1023 ("GtkIMModule" :ignore t)
1024 ("GtkThemeEngine" :ignore t)
1025
1026 )
aa77651b 1027
1028
1029(defclass text-iter (boxed)
1030 ((buffer
1031 :allocation :virtual
1032 :getter "gtk_text_iter_get_buffer"
1033 :reader text-iter-buffer
68f519e0 1034 :type pointer) ;text-buffer)
aa77651b 1035 (offset
1036 :allocation :virtual
1037 :getter "gtk_text_iter_get_offset"
1038 :setter "gtk_text_iter_set_offset"
1039 :accessor text-iter-offset
1040 :type int)
1041 (line
1042 :allocation :virtual
1043 :getter "gtk_text_iter_get_line"
1044 :setter "gtk_text_iter_set_line"
1045 :accessor text-iter-line
1046 :type int)
1047 (line-offset
1048 :allocation :virtual
1049 :getter "gtk_text_iter_get_line_offset"
1050 :setter "gtk_text_iter_set_line_offset"
1051 :accessor text-iter-line-offset
1052 :type int)
1053 (line-index
1054 :allocation :virtual
1055 :getter "gtk_text_iter_get_line_index"
1056 :setter "gtk_text_iter_set_line_index"
1057 :accessor text-iter-line-index
1058 :type int)
1059 (visible-line-index
1060 :allocation :virtual
1061 :getter "gtk_text_iter_get_visible_line_index"
1062 :setter "gtk_text_iter_set_visible_line_index"
1063 :accessor text-iter-visible-line-index
1064 :type int)
1065 (visible-line-offset
1066 :allocation :virtual
1067 :getter "gtk_text_iter_get_visible_line_offset"
1068 :setter "gtk_text_iter_set_visible_line_offset"
1069 :accessor text-iter-visible-line-offset
1070 :type int)
1071 ;; Workaround to get correct size
1072 (dummy14
68f519e0 1073 :allocation :alien :offset #.(* 13 (size-of 'pointer))
1074 :type pointer))
aa77651b 1075 (:metaclass boxed-class
1076 ;; I am pretty sure this was working in older versons on CMUCL
68f519e0 1077; :size #.(* 14 (size-of 'pointer))
1078 ))
d76e9fca 1079
1080
1081(defclass tooltips-data (struct)
1082 ((tooltips
1083 :allocation :alien
1084 :reader tooltips-data-tooltips
1085 :type tooltips)
1086 (widget
1087 :allocation :alien
1088 :reader tooltips-data-widget
1089 :type widget)
1090 (tip-text
1091 :allocation :alien
1092 :reader tooltips-data-tip-text
1093 :type string)
1094 (tip-private
1095 :allocation :alien
1096 :reader tooltips-data-tip-private
1097 :type string))
1098 (:metaclass struct-class))
68f519e0 1099
1100(defclass file-filter-info (struct)
1101 ((contains
1102 :allocation :alien
1103 :initarg :contains
1104 :type file-filter-flags)
1105 (filename
1106 :allocation :alien
1107 :initarg :filename
1108 :type string)
1109 (uri
1110 :allocation :alien
1111 :initarg :uri
1112 :type string)
1113 (display-name
1114 :allocation :alien
1115 :initarg :display-name
1116 :type string)
1117 (mime-type
1118 :allocation :alien
1119 :initarg :mime-type
1120 :type string))
1121 (:metaclass struct-class))