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