chiark / gitweb /
79eb33b54627d754692fd4703cc23ff6fffbaa52
[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.27 2004-12-29 21:17:37 espen Exp $
19
20
21 (in-package "GTK")
22
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))
34   (:metaclass boxed-class))
35
36
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))
58   (:metaclass struct-class))
59
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))
81   (:metaclass boxed-class))
82
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))
109   (:metaclass struct-class))
110
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
126 (deftype tree-path () '(vector integer))
127 (register-type 'tree-path "GtkTreePath")
128
129 (deftype editable-position () '(or int (enum (:start 0) (:end -1))))
130
131 ;; Forward definitions
132 (defclass widget (%object)
133   ()
134   (:metaclass gobject-class))
135 (defclass container (widget)
136   ()
137   (:metaclass gobject-class))
138
139
140 (define-types-by-introspection "Gtk"
141   ;; Manually defined
142   ("GtkObject" :ignore t)
143   ("GtkRequisition" :ignore t)
144   ("GtkBorder" :ignore t)
145   ("GtkTreeIter" :ignore t)
146   ("GtkTreePath" :ignore t)
147 ;  ("GtkStyle" :ignore t)
148
149   ;; Manual override
150   ("GtkWidget"
151    :slots
152    ((child-properties
153      :allocation :instance
154      :accessor widget-child-properties
155      :type container-child)
156     (window
157      :allocation :virtual
158      :getter "gtk_widget_get_window"
159      :reader widget-window
160      :type gdk:window)
161     (state
162      :allocation :virtual
163      :getter "gtk_widget_get_state"
164      :setter "gtk_widget_set_state"
165      :accessor widget-state
166      :initarg :state
167      :type state-type)
168     (colormap
169      :allocation :virtual
170      :getter "gtk_widget_get_colormap"
171      :setter "gtk_widget_set_colormap"
172      :initarg :colormap
173      :accessor widget-colormap
174      :type gdk:colormap)
175     (visual
176      :allocation :virtual
177      :getter "gtk_widget_get_visual"
178      :reader widget-visual
179      :type gdk:visual)
180     (direction
181      :allocation :virtual
182      :getter "gtk_widget_get_direction"
183      :setter "gtk_widget_set_direction"
184      :accessor widget-direction
185      :initarg :direction
186      :type text-direction)
187     (composite-name
188      :allocation :virtual
189      :getter "gtk_widget_get_composite_name"
190      :setter "gtk_widget_set_composite_name"
191      :accessor widget-composite-name
192      :initarg :composite-name
193      :type string)
194     (settings
195      :allocation :virtual
196      :getter "gtk_widget_get_settings"
197      :accessor widget-settings
198      :type settings)
199     (child-visible
200      :allocation :virtual
201      :getter "gtk_widget_get_child_visible"
202      :setter "gtk_widget_set_child_visible"
203      :accessor widget-child-visible-p
204      :initarg :child-visible
205      :type boolean)
206     (width-request
207      :merge t :unbound -1)
208     (height-request
209      :merge t :unbound -1)))
210      
211   ("GtkContainer"
212    :slots
213    ((child :ignore t)
214     (children
215      :allocation :virtual
216      :getter container-children
217      :setter (setf container-children)
218      ;; The following doesn't work because gtk_container_get_children doesn't
219      ;; increase the reference count of the children
220 ;     :getter "gtk_container_get_children"
221 ;     :reader container-children
222 ;     :type (glist widget)
223      )
224     (child-type
225      :allocation :virtual
226      :getter "gtk_containerchild_type"
227      :reader container-child-type
228      :type gtype)
229     (focus-child
230      :allocation :virtual
231      :getter "gtk_container_get_focus_child"
232      :setter "gtk_container_set_focus_child"
233      :accessor container-focus-child
234      :initarg :focus-child
235      :type widget)
236     (focus-chain
237      :allocation :virtual
238      :getter container-focus-chain
239      :setter (setf container-focus-chain))
240     (focus-hadjustment
241      :allocation :virtual
242      :getter "gtk_container_get_focus_hadjustment"
243      :setter "gtk_container_set_focus_hadjustment"
244      :accessor container-focus-hadjustment
245      :initarg :focus-hadjustment
246      :type adjustment)
247     (focus-vadjustment
248      :allocation :virtual
249      :getter "gtk_container_get_focus_vadjustment"
250      :setter "gtk_container_set_focus_vadjustment"
251      :accessor container-focus-vadjustment
252      :initarg :focus-vadjustment
253      :type adjustment)
254     (reallocate-redraws
255      :allocation :virtual
256      :getter "gtk_container_get_reallocate_redraws"
257      :setter "gtk_container_set_reallocate_redraws"
258      :accessor container-reallocate-redraws
259      :initarg :reallocate-redraws
260      :type boolean)))
261       
262   ("GtkBin"
263    :slots
264    ((child
265      :allocation :virtual
266      :getter "gtk_bin_get_child"
267      :setter (setf bin-child)
268      :reader bin-child
269      :type widget)))
270
271   ("GtkWindow"
272    :slots
273    ((focus-widget
274      :allocation :virtual
275      :getter "gtk_window_get_focus"
276      :setter "gtk_window_set_focus"
277      :accessor window-focus-widget
278      :initarg :focus-widget
279      :type widget)
280     (default-widget
281      :allocation :virtual
282      :getter "gtk_window_get_default"
283      :setter "gtk_window_set_default"
284      :accessor window-default-widget
285      :initarg :default-widget
286      :type widget)
287     (has-frame
288      :allocation :virtual
289      :getter "gtk_window_get_has_frame"
290      :setter "gtk_window_set_has_frame"
291      :accessor window-has-frame-p
292      :initarg :has-frame
293      :type boolean)
294     (icon-list
295      :allocation :virtual
296      :getter "gtk_window_get_icon_list"
297      :setter "gtk_window_set_icon_list"
298      :accessor window-icon-list
299      :initarg :icon-list
300      :type (glist gdk:pixbuf))
301     (mnemonic-modifier
302      :allocation :virtual
303      :getter "gtk_window_get_mnemonic_modifier"
304      :setter "gtk_window_set_mnemonic_modifier"
305      :accessor window-mnemonic-modifier
306      :initarg :mnemonic-modifier
307      :type gdk:modifier-type)
308     (transient-for
309      :allocation :virtual
310      :getter "gtk_window_get_transient_for"
311      :setter "gtk_window_set_transient_for"
312      :accessor window-transient-for
313      :initarg :transient-for
314      :type window)
315     (group
316      :allocation :virtual
317      :getter "gtk_window_get_group"
318      :setter (setf window-group)
319      :reader window-group
320      :initarg :group
321      :type window-group)
322     (default-width :merge t :unbound -1)
323     (default-height :merge t :unbound -1)))
324   
325   ("GtkWindowGroup"
326    :slots
327    ((grabs
328      :allocation :alien
329      :accessor window-group-grabs
330      :type (gslist window))))
331
332   ("GtkTooltips"
333    :slots
334    ((enabled
335      :allocation :virtual
336      :getter "gtk_tooltips_get_enabled"
337      :setter (setf tooltips-enabled-p)
338      :reader tooltips-enabled-p
339      :initarg :enabled
340      :type boolean)))
341   
342   ("GtkMenuItem"
343    :slots
344    ((label
345      :allocation :virtual
346      :getter menu-item-label
347      :setter (setf menu-item-label)
348      :type string)
349     (use-underline
350      :allocation :user-data
351      :initform nil
352      :initarg :use-underline
353      :accessor menu-item-use-underline-p)
354     (right-justified
355      :allocation :virtual
356      :getter "gtk_menu_item_get_right_justified"
357      :setter "gtk_menu_item_set_right_justified"
358      :accessor menu-item-right-justified-p
359      :initarg :right-justified
360      :type boolean)
361     (submenu
362      :allocation :virtual
363      :getter "gtk_menu_item_get_submenu"
364      :setter "gtk_menu_item_set_submenu"
365      :accessor menu-item-submenu
366      :initarg :submenu
367      :type widget)))
368
369   ("GtkColorSelectionDialog"
370    :slots
371    ((colorsel
372      :allocation :alien
373      :reader color-selection-dialog-colorsel
374      :type widget)
375     (ok-button
376      :allocation :alien
377      :reader color-selection-dialog-ok-button
378      :type widget)
379     (cancel-button
380      :allocation :alien
381      :reader color-selection-dialog-cancel-button
382      :type widget)
383     (help-button
384      :allocation :alien
385      :reader color-selection-dialog-help-button
386      :type widget)))
387
388   ("GtkScrolledWindow"
389    :slots
390    ((hscrollbar
391      :allocation :alien
392      :reader scrolled-window-hscrollbar
393      :type widget)
394     (vscrollbar
395      :allocation :alien
396      :reader scrolled-window-vscrollbar
397      :type widget)))
398
399   ("GtkPaned"
400    :slots
401    ((child1
402     :allocation :virtual
403     :getter "gtk_paned_get_child1"
404     :setter "gtk_paned_add1"
405     :accessor paned-child1
406     :initarg :child1
407     :type widget)
408    (child2
409     :allocation :virtual
410     :getter "gtk_paned_get_child2"
411     :setter "gtk_paned_add2"
412     :accessor paned-child2
413     :initarg :child2
414     :type widget)))
415
416   ("GtkMenu"
417    :slots
418    ((accel-group
419      :allocation :virtual
420      :getter "gtk_menu_get_accel_group"
421      :setter "gtk_menu_set_accel_group"
422      :accessor menu-accel-group
423      :initarg :accel-group
424      :type accel-group)
425     (active
426      :allocation :virtual
427      :getter "gtk_menu_get_active"
428      :setter (setf menu-active)
429      :reader menu-active
430      :initarg :active
431      :type widget)
432     (screen
433      :allocation :virtual
434      :getter "gtk_menu_get_screen"
435      :setter "gtk_menu_set_screen"
436      :accessor menu-screen
437      :initarg :screen
438      :type gdk:screen)
439     (attach-widget
440      :allocation :virtual
441      :getter "gtk_menu_get_attach_widget"
442      :reader menu-attach-widget
443      :type widget)
444     #-gtk2.6
445     (tearoff-state
446      :allocation :virtual
447      :getter "gtk_menu_get_tearoff_state"
448      :setter "gtk_menu_set_tearoff_state"
449      :accessor menu-tearoff-state-p
450      :initarg :tearoff-state
451      :type boolean)))
452
453   ("GtkToolbar"
454    :slots
455    ((tooltips
456      :allocation :virtual
457      :getter "gtk_toolbar_get_tooltips"
458      :setter "gtk_toolbar_set_tooltips"
459      :accessor toolbar-tooltips-p
460      :initarg :tooltips
461      :type boolean)
462     (icon-size
463      :allocation :virtual
464      :getter "gtk_toolbar_get_icon_size"
465      :setter "gtk_toolbar_set_icon_size"
466      :accessor toolbar-icon-size
467      :initarg :icon-size
468      :type icon-size)
469     (toolbar-style
470      :allocation :property
471      :pname "toolbar-style"
472      :initarg :toolbar-style
473      :accessor toolbar-style
474      :type toolbar-style)))
475
476   ("GtkToolItem"
477    :slots
478    ((drag-window
479      :allocation :virtual
480      :getter "gtk_tool_item_get_drag_window"
481      :setter "gtk_tool_item_set_drag_window"
482      :accessor tool-item-drag-window
483      :initarg :drag-window
484      :type boolean)))
485
486   ("GtkToggleToolButton"
487    :slots
488    ((active
489      :allocation :virtual
490      :getter "gtk_toggle_tool_button_get_active"
491      :setter "gtk_toggle_tool_button_get_active"
492      :accessor toggle-tool-button-active-p
493      :initarg :active
494      :type boolean)))
495
496   ("GtkRadioToolButton"
497    :slots
498    ((group
499      :allocation :virtual
500      :getter "gtk_radio_tool_button_get_group"
501      :reader radio-tool-button-group
502      :type (copy-of (gslist widget)))))
503
504   ("GtkNotebook"
505    :slots
506    ((current-page
507      :allocation :virtual
508      :getter notebook-current-page
509      :setter (setf notebook-current-page)
510      :initarg :current-page)
511     (page :ignore t)))
512   
513   ("GtkRuler"
514    :slots
515    ((metric
516      :allocation :virtual
517      :getter "gtk_ruler_get_metric"
518      :setter "gtk_ruler_set_metric"
519      :accessor ruler-metric
520      :initarg :metric
521      :type metric-type)))
522
523   ("GtkProgressBar"
524    :slots
525    ; deprecated properties
526    ((bar-style :ignore t)
527     (adjustment :ignore t)
528     (activity-step :ignore t)
529     (activity-blocks :ignore t)
530     (discrete-blocks :ignore t)))
531
532   ("GtkHandleBox"
533    :slots
534    ; deprecated property
535    ((shadow :ignore t)))
536
537   ("GtkFrame"
538    :slots
539    ; deprecated property
540    ((shadow :ignore t)))
541
542   ("GtkTable"
543    :slots
544    ((column-spacing
545      :allocation :virtual
546      :getter "gtk_table_get_default_col_spacing"
547      :setter "gtk_table_set_col_spacings"
548      :initarg :column-spacing
549      :type unsigned-int)
550     (row-spacing
551      :allocation :virtual
552      :getter "gtk_table_get_default_row_spacing"
553      :setter "gtk_table_set_row_spacings"
554      :initarg :row-spacing
555      :type unsigned-int)))
556
557   ("GtkDialog"
558    :slots
559    ((vbox
560      :allocation :virtual
561      :getter "gtk_dialog_get_vbox"
562      :reader dialog-vbox
563      :type widget)
564     (action-area
565      :allocation :virtual
566      :getter "gtk_dialog_get_action_area"
567      :reader dialog-action-area
568      :type widget)))
569
570   ("GtkEntry"
571    :slots
572    ((layout
573      :allocation :virtual
574      :getter "gtk_entry_get_layout"
575      :reader entry-layout
576      :type pango:layout)
577     (completion
578      :getter "gtk_entry_get_completion"
579      :setter "gtk_entry_set_completion"
580      :initarg :completion
581      :accessor entry-completion
582      :type entry-completion)
583     (max-length :merge t :unbound 0)
584     #+gtk2.6
585     (with-chars :merge t :unbound -1)))
586
587   ("GtkEntryCompletion"
588    :slots
589    ((entry
590      :allocation :virtual
591      :getter "gtk_entry_completion_get_entry"
592      :reader entry-completion-entry
593      :type entry)
594     (minimum-key-length :merge t :unbound -1)
595     #+gtk2.6
596     (text-column :merge t :unbound -1)))
597
598   ("GtkRadioButton"
599    :slots
600    ((group
601      :allocation :virtual
602      :getter "gtk_radio_button_get_group"
603      :reader radio-button-group
604      :type (copy-of (gslist widget)))))
605
606   ("GtkRadioMenuItem"
607    :slots
608    ((group
609      :allocation :virtual
610      :getter "gtk_radio_menu_item_get_group"
611      :reader radio-menu-item-group
612      :type (copy-of (gslist widget)))))
613
614   ("GtkFileSelection"
615    :slots
616    ((action-area
617      :allocation :virtual
618      :getter "gtk_file_selection_get_action_area"
619      :reader file-selection-action-area
620      :type widget)
621     (ok-button
622      :allocation :virtual
623      :getter "gtk_file_selection_get_ok_button"
624      :reader file-selection-ok-button
625      :type widget)
626     (cancel-button
627      :allocation :virtual
628      :getter "gtk_file_selection_get_cancel_button"
629      :reader file-selection-cancel-button
630      :type widget)))
631
632   ("GtkLayout"
633    :slots
634    ((bin-window
635      :allocation :virtual
636      :getter "gtk_layout_get_bin_window"
637      :reader layout-bin-window
638      :type gdk:window)))
639
640   ("GtkFixed"
641    :slots
642    ((has-window
643      :allocation :virtual
644      :getter "gtk_fixed_get_has_window"
645      :setter "gtk_fixed_set_has_window"
646      :reader fixed-has-window-p
647      :initarg :has-window
648      :type boolean)))
649
650   ("GtkRange"
651    :slots
652    ((value
653      :allocation :virtual
654      :getter "gtk_range_get_value"
655      :setter "gtk_range_set_value"
656      :initarg :value
657      :accessor range-value
658      :type double-float)
659    (upper
660      :allocation :virtual
661      :getter range-upper
662      :setter (setf range-upper)
663      :initarg :upper)
664    (lower
665      :allocation :virtual
666      :getter range-lower
667      :setter (setf range-lower)
668      :initarg :lower)
669    (step-increment
670      :allocation :virtual
671      :getter range-step-increment
672      :setter (setf range-step-increment)
673      :initarg :step-increment)
674    (page-increment
675      :allocation :virtual
676      :getter range-page-increment
677      :setter (setf range-page-increment)
678      :initarg :page-increment)))
679
680   ("GtkImage"
681    :slots
682    ((file :ignore t)
683     #+gtk2.6
684     (pixel-size :merge t :unbound -1)))
685
686   ("GtkLabel"
687    :slots
688    ((layout
689      :allocation :virtual
690      :getter "gtk_label_get_layout"
691      :reader label-layout
692      :type pango:layout)))
693
694   ("GtkEditable"
695    :slots
696    ((editable
697      :allocation :virtual
698      :getter "gtk_editable_get_editable"
699      :setter "gtk_editable_set_editable"
700      :reader editable-editable-p
701      :initarg :editable
702      :type boolean)
703     (position
704      :allocation :virtual
705      :getter "gtk_editable_get_position"
706      :setter "gtk_editable_set_position"
707      :reader editable-position
708      :initarg :position
709      :type editable-position)
710     (text
711      :allocation :virtual
712      :getter editable-text
713      :setter (setf editable-text)
714      :initarg text)))
715
716   ("GtkFileChooser"
717    :slots
718    ((filename
719      :allocation :virtual
720      :getter "gtk_file_chooser_get_filename"
721      :setter "gtk_file_chooser_set_filename"
722      :accessor file-chooser-filename
723      :initarg :filename
724      :type string)
725     (current-name
726      :allocation :virtual
727      :setter "gtk_file_chooser_set_current_name"
728      :accessor file-choser-current-name
729      :initarg :current-name
730      :type string)
731     (current-folder
732      :allocation :virtual
733      :setter "gtk_file_chooser_set_current_folder"
734      :setter "gtk_file_chooser_get_current_folder"
735      :accessor file-choser-current-folder
736      :initarg :current-folder
737      :type string)
738     (uri
739      :allocation :virtual
740      :getter "gtk_file_chooser_get_uri"
741      :setter "gtk_file_chooser_set_uri"
742      :accessor file-choser-uri
743      :initarg :uri
744      :type string)
745     (current-folder-uri
746      :allocation :virtual
747      :setter "gtk_file_chooser_set_current_folder_uri"
748      :setter "gtk_file_chooser_get_current_folder_uri"
749      :accessor file-choser-current-folder-uri
750      :initarg :current-folder-uri
751      :type string)))
752
753   ("GtkTreeView"
754    :slots
755    ((columns
756      :allocation :virtual
757      :getter "gtk_tree_view_get_columns"
758      :reader tree-view-columns 
759      :type (glist tree-view-column))
760     (selection
761      :allocation :virtual
762      :getter "gtk_tree_view_get_selection"
763      :reader tree-view-selection
764      :type tree-selection)))
765
766   ("GtkTreeModel"
767    :slots
768    ((n-columns
769      :allocation :virtual
770      :getter "gtk_tree_model_get_n_columns"
771      :reader tree-model-n-columns 
772      :type int)))
773
774   ("GtkTreeSelection"
775    :slots
776    ((mode
777      :allocation :virtual
778      :getter "gtk_tree_selection_get_mode"
779      :setter "gtk_tree_selection_set_mode"
780      :accessor tree-selection-mode
781      :initarg :mode
782      :type selection-mode)
783     (tree-view
784      :allocation :virtual
785      :getter "gtk_tree_selection_get_mode"
786      :reader tree-selection-mode
787      :type tree-view)))
788
789   ("GtkComboBox"
790    :slots
791    ((active-iter
792      :allocation :virtual
793      :getter "gtk_combo_box_get_active_iter"
794      :setter "gtk_combo_box_set_active_iter"
795      :accessor combo-box-active-iter 
796      :type tree-iter)))
797
798   ("GtkTextBuffer"
799    :slots
800    ((line-count
801      :allocation :virtual
802      :getter "gtk_text_buffer_get_line_count"
803      :reader text-buffer-line-count
804      :type int)
805     (char-count
806      :allocation :virtual
807      :getter "gtk_text_buffer_get_char_count"
808      :reader text-buffer-char-count
809      :type int)
810     (modified
811      :allocation :virtual
812      :getter "gtk_text_buffer_get_modified"
813      :setter "gtk_text_buffer_set_modified"
814      :accessor text-buffer-modifed-p
815      :type boolean)))
816
817   ("GtkTextView"
818    :slots
819    ((default-attributes
820      :allocation :virtual
821      :getter "gtk_text_view_get_default_attributes"
822      :reader text-view-default-attributes
823      :type text-attributes)))
824
825   ("GtkTextTagTable"
826    :slots
827    ((size
828      :allocation :virtual
829      :getter "gtk_text_tag_table_get_size"
830      :reader text-tag-table-size
831      :type int)))
832
833   ("GtkTextTag"
834    :slots
835    ((priority
836      :allocation :virtual
837      :getter "gtk_text_tag_get_priority"
838      :setter "gtk_text_tag_set_priority"
839      :accessor text-tag-priority
840      :type int)
841     (weight
842      :merge t :type pango:weight)))
843
844   ("GtkUIManager"
845    :type ui-manager
846    :slots
847    ((action-groups
848      :allocation :virtual
849      :getter "gtk_ui_manager_get_action_groups"
850      :reader ui-manager-action-groups
851      :type (copy-of (glist action-group)))
852     (accel-group
853      :allocation :virtual
854      :getter "gtk_ui_manager_get_accel_group"
855      :reader ui-manager-accel-group
856      :type accel-group)))
857
858   ("GtkUIManagerItemType"
859    :type ui-manager-item-type)
860
861   ("GtkToggle"
862    :slots
863    ((accelerator
864      :allocation :virtual
865      :getter action-accelerator)))
866
867   ("GtkToggleAction"
868    :slots
869    ((active
870      :allocation :virtual
871      :getter "gtk_toggle_action_get_active"
872      :setter "gtk_toggle_action_set_active"
873      :initarg :active
874      :accessor toggle-action-active-p
875      :type boolean)))
876
877   ("GtkRadioAction"
878    :slots
879    ((group
880      :allocation :virtual
881      :getter "gtk_radio_button_get_group"
882      :reader radio-action-group
883      :type (copy-of (gslist widget)))
884     (%value
885      :allocation :property  :pname "value"
886      :readable nil :type int)
887     (value 
888      :allocation :virtual
889      :getter radio-action-value)))
890
891
892   ;; Not needed
893   ("GtkFundamentalType" :ignore t)
894   ("GtkArgFlags" :ignore t)
895
896   
897   ;; Deprecated widgets
898   ("GtkCList" :ignore-prefix t)
899   ("GtkCTree" :ignore-prefix t)
900   ("GtkList" :ignore t)
901   ("GtkListItem" :ignore t)
902   ("GtkTree" :ignore t)
903   ("GtkTreeItem" :ignore t)
904   ("GtkItemFactory" :ignore t)
905   ("GtkText" :ignore t)
906   ("GtkPacker" :ignore-prefix t)
907   ("GtkPixmap" :ignore t)
908   ("GtkPreview" :ignore-prefix t)
909   ("GtkProgres" :ignore t)
910   ("GtkTipsQuery" :ignore t)
911   ("GtkOldEditable" :ignore t)
912   ("GtkCombo" :ignore t)
913   ("GtkOptionMenu" :ignore t)
914
915   ;; What are these?
916   ("GtkFileSystemModule" :ignore t)
917   ("GtkIMModule" :ignore t)
918   ("GtkThemeEngine" :ignore t)
919
920   )
921
922
923 (defclass text-iter (boxed)
924   ((buffer
925     :allocation :virtual
926     :getter "gtk_text_iter_get_buffer"
927     :reader text-iter-buffer
928     :type text-buffer)
929    (offset
930     :allocation :virtual
931     :getter "gtk_text_iter_get_offset"
932     :setter "gtk_text_iter_set_offset"
933     :accessor text-iter-offset
934     :type int)
935    (line
936     :allocation :virtual
937     :getter "gtk_text_iter_get_line"
938     :setter "gtk_text_iter_set_line"
939     :accessor text-iter-line
940     :type int)
941    (line-offset
942     :allocation :virtual
943     :getter "gtk_text_iter_get_line_offset"
944     :setter "gtk_text_iter_set_line_offset"
945     :accessor text-iter-line-offset
946     :type int)
947    (line-index
948     :allocation :virtual
949     :getter "gtk_text_iter_get_line_index"
950     :setter "gtk_text_iter_set_line_index"
951     :accessor text-iter-line-index
952     :type int)
953    (visible-line-index
954     :allocation :virtual
955     :getter "gtk_text_iter_get_visible_line_index"
956     :setter "gtk_text_iter_set_visible_line_index"
957     :accessor text-iter-visible-line-index
958     :type int)
959    (visible-line-offset
960     :allocation :virtual
961     :getter "gtk_text_iter_get_visible_line_offset"
962     :setter "gtk_text_iter_set_visible_line_offset"
963     :accessor text-iter-visible-line-offset
964     :type int)
965    ;; Workaround to get correct size 
966    (dummy14
967      :allocation :alien :offset #.(* 13 (size-of 'pointer))
968      :type pointer))
969   (:metaclass boxed-class 
970    ;; I am pretty sure this was working in older versons on CMUCL
971    :size #.(* 14 (size-of 'pointer))))
972
973
974 (defclass tooltips-data (struct)
975   ((tooltips
976     :allocation :alien
977     :reader tooltips-data-tooltips
978     :type tooltips)
979    (widget
980     :allocation :alien
981     :reader tooltips-data-widget
982     :type widget)
983    (tip-text
984     :allocation :alien
985     :reader tooltips-data-tip-text
986     :type string)
987    (tip-private
988     :allocation :alien
989     :reader tooltips-data-tip-private
990     :type string))
991   (:metaclass struct-class))