chiark / gitweb /
Corrected return type for TEXT-BUFFER-GET-SELECTION-BOUNDS
[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.29 2005-01-07 00:28:36 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 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_container_child_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    ((show-tooltips
456      :allocation :virtual
457      :getter "gtk_toolbar_get_tooltips"
458      :setter "gtk_toolbar_set_tooltips"
459      :accessor toolbar-show-tooltips-p
460      :initarg :show-tooltips
461      :type boolean)
462     (tooltips
463      :allocation :virtual
464      :getter "gtk_toolbar_get_tooltips_object"
465      :reader toolbar-tooltips
466      :type tooltips)
467     (toolbar-style
468      :allocation :property
469      :pname "toolbar-style"
470      :initarg :toolbar-style
471      :accessor toolbar-style
472      :type toolbar-style)
473     (n-items
474      :allocation :virtual
475      :getter "gtk_toolbar_get_n_items"
476      :reader toolbar-n-items
477      :type int)))
478
479   ("GtkToolItem"
480    :slots
481    ((use-drag-window
482      :allocation :virtual
483      :getter "gtk_tool_item_get_use_drag_window"
484      :setter "gtk_tool_item_set_use_drag_window"
485      :accessor tool-item-use-drag-window-p
486      :initarg :drag-window
487      :type boolean)
488     (tip-text 
489      :allocation :user-data
490      :setter (setf tool-item-tip-text)
491      :initarg :tip-text
492      :reader tool-item-tip-text)
493     (tip-private
494      :allocation :user-data
495      :setter (setf tool-item-tip-private)
496      :initarg :tip-private
497      :reader tool-item-tip-private)))
498
499   ("GtkToolButton"
500    :slots
501    ((stock-id :merge t :initarg :stock)
502     (icon-widget :merge t :initarg :icon)))
503
504   ("GtkToggleToolButton"
505    :slots
506    ((active
507      :allocation :virtual
508      :getter "gtk_toggle_tool_button_get_active"
509      :setter "gtk_toggle_tool_button_get_active"
510      :accessor toggle-tool-button-active-p
511      :initarg :active
512      :type boolean)))
513
514   ("GtkRadioToolButton"
515    :slots
516    ((group
517      :allocation :virtual
518      :getter "gtk_radio_tool_button_get_group"
519      :reader radio-tool-button-group
520      :type (copy-of (gslist widget)))
521     (value 
522      :allocation :user-data
523      :initarg :value
524      :accessor radio-tool-button-value
525      :documentation "Value passed as argument to the activate callback")))
526
527   ("GtkNotebook"
528    :slots
529    ((current-page
530      :allocation :virtual
531      :getter notebook-current-page
532      :setter (setf notebook-current-page)
533      :initarg :current-page)
534     (page :ignore t)))
535   
536   ("GtkRuler"
537    :slots
538    ((metric
539      :allocation :virtual
540      :getter "gtk_ruler_get_metric"
541      :setter "gtk_ruler_set_metric"
542      :accessor ruler-metric
543      :initarg :metric
544      :type metric-type)))
545
546   ("GtkProgressBar"
547    :slots
548    ; deprecated properties
549    ((bar-style :ignore t)
550     (adjustment :ignore t)
551     (activity-step :ignore t)
552     (activity-blocks :ignore t)
553     (discrete-blocks :ignore t)))
554
555   ("GtkHandleBox"
556    :slots
557    ; deprecated property
558    ((shadow :ignore t)))
559
560   ("GtkFrame"
561    :slots
562    ; deprecated property
563    ((shadow :ignore t)))
564
565   ("GtkTable"
566    :slots
567    ((column-spacing
568      :allocation :virtual
569      :getter "gtk_table_get_default_col_spacing"
570      :setter "gtk_table_set_col_spacings"
571      :initarg :column-spacing
572      :type unsigned-int)
573     (row-spacing
574      :allocation :virtual
575      :getter "gtk_table_get_default_row_spacing"
576      :setter "gtk_table_set_row_spacings"
577      :initarg :row-spacing
578      :type unsigned-int)))
579
580   ("GtkDialog"
581    :slots
582    ((vbox
583      :allocation :virtual
584      :getter "gtk_dialog_get_vbox"
585      :reader dialog-vbox
586      :type widget)
587     (action-area
588      :allocation :virtual
589      :getter "gtk_dialog_get_action_area"
590      :reader dialog-action-area
591      :type widget)))
592
593   ("GtkEntry"
594    :slots
595    ((layout
596      :allocation :virtual
597      :getter "gtk_entry_get_layout"
598      :reader entry-layout
599      :type pango:layout)
600     (completion
601      :getter "gtk_entry_get_completion"
602      :setter "gtk_entry_set_completion"
603      :initarg :completion
604      :accessor entry-completion
605      :type entry-completion)
606     (max-length :merge t :unbound 0)
607     #+gtk2.6
608     (with-chars :merge t :unbound -1)))
609
610   ("GtkEntryCompletion"
611    :slots
612    ((entry
613      :allocation :virtual
614      :getter "gtk_entry_completion_get_entry"
615      :reader entry-completion-entry
616      :type entry)
617     (minimum-key-length :merge t :unbound -1)
618     #+gtk2.6
619     (text-column :merge t :unbound -1)))
620
621   ("GtkRadioButton"
622    :slots
623    ((group
624      :allocation :virtual
625      :getter "gtk_radio_button_get_group"
626      :reader radio-button-group
627      :type (copy-of (gslist widget)))
628     (value 
629      :allocation :user-data
630      :initarg :value
631      :accessor radio-button-value
632      :documentation "Value passed as argument to the activate callback")))
633
634   ("GtkRadioMenuItem"
635    :slots
636    ((group
637      :allocation :virtual
638      :getter "gtk_radio_menu_item_get_group"
639      :reader radio-menu-item-group
640      :type (copy-of (gslist widget)))
641     (value 
642      :allocation :user-data
643      :initarg :value
644      :accessor radio-menu-item-value
645      :documentation "Value passed as argument to the activate callback")))
646
647   ("GtkFileSelection"
648    :slots
649    ((action-area
650      :allocation :virtual
651      :getter "gtk_file_selection_get_action_area"
652      :reader file-selection-action-area
653      :type widget)
654     (ok-button
655      :allocation :virtual
656      :getter "gtk_file_selection_get_ok_button"
657      :reader file-selection-ok-button
658      :type widget)
659     (cancel-button
660      :allocation :virtual
661      :getter "gtk_file_selection_get_cancel_button"
662      :reader file-selection-cancel-button
663      :type widget)))
664
665   ("GtkLayout"
666    :slots
667    ((bin-window
668      :allocation :virtual
669      :getter "gtk_layout_get_bin_window"
670      :reader layout-bin-window
671      :type gdk:window)))
672
673   ("GtkFixed"
674    :slots
675    ((has-window
676      :allocation :virtual
677      :getter "gtk_fixed_get_has_window"
678      :setter "gtk_fixed_set_has_window"
679      :reader fixed-has-window-p
680      :initarg :has-window
681      :type boolean)))
682
683   ("GtkRange"
684    :slots
685    ((value
686      :allocation :virtual
687      :getter "gtk_range_get_value"
688      :setter "gtk_range_set_value"
689      :initarg :value
690      :accessor range-value
691      :type double-float)
692    (upper
693      :allocation :virtual
694      :getter range-upper
695      :setter (setf range-upper)
696      :initarg :upper)
697    (lower
698      :allocation :virtual
699      :getter range-lower
700      :setter (setf range-lower)
701      :initarg :lower)
702    (step-increment
703      :allocation :virtual
704      :getter range-step-increment
705      :setter (setf range-step-increment)
706      :initarg :step-increment)
707    (page-increment
708      :allocation :virtual
709      :getter range-page-increment
710      :setter (setf range-page-increment)
711      :initarg :page-increment)))
712
713   ("GtkImage"
714    :slots
715    ((file :ignore t)
716     #+gtk2.6
717     (pixel-size :merge t :unbound -1)))
718
719   ("GtkLabel"
720    :slots
721    ((layout
722      :allocation :virtual
723      :getter "gtk_label_get_layout"
724      :reader label-layout
725      :type pango:layout)))
726
727   ("GtkEditable"
728    :slots
729    ((editable
730      :allocation :virtual
731      :getter "gtk_editable_get_editable"
732      :setter "gtk_editable_set_editable"
733      :reader editable-editable-p
734      :initarg :editable
735      :type boolean)
736     (position
737      :allocation :virtual
738      :getter "gtk_editable_get_position"
739      :setter "gtk_editable_set_position"
740      :reader editable-position
741      :initarg :position
742      :type position)
743     (text
744      :allocation :virtual
745      :getter editable-text
746      :setter (setf editable-text)
747      :initarg text)))
748
749   ("GtkFileChooser"
750    :slots
751    ((filename
752      :allocation :virtual
753      :getter "gtk_file_chooser_get_filename"
754      :setter "gtk_file_chooser_set_filename"
755      :accessor file-chooser-filename
756      :initarg :filename
757      :type string)
758     (current-name
759      :allocation :virtual
760      :setter "gtk_file_chooser_set_current_name"
761      :accessor file-choser-current-name
762      :initarg :current-name
763      :type string)
764     (current-folder
765      :allocation :virtual
766      :setter "gtk_file_chooser_set_current_folder"
767      :setter "gtk_file_chooser_get_current_folder"
768      :accessor file-choser-current-folder
769      :initarg :current-folder
770      :type string)
771     (uri
772      :allocation :virtual
773      :getter "gtk_file_chooser_get_uri"
774      :setter "gtk_file_chooser_set_uri"
775      :accessor file-choser-uri
776      :initarg :uri
777      :type string)
778     (current-folder-uri
779      :allocation :virtual
780      :setter "gtk_file_chooser_set_current_folder_uri"
781      :setter "gtk_file_chooser_get_current_folder_uri"
782      :accessor file-choser-current-folder-uri
783      :initarg :current-folder-uri
784      :type string)))
785
786   ("GtkTreeView"
787    :slots
788    ((columns
789      :allocation :virtual
790      :getter "gtk_tree_view_get_columns"
791      :reader tree-view-columns 
792      :type (glist tree-view-column))
793     (selection
794      :allocation :virtual
795      :getter "gtk_tree_view_get_selection"
796      :reader tree-view-selection
797      :type tree-selection)))
798
799   ("GtkTreeModel"
800    :slots
801    ((n-columns
802      :allocation :virtual
803      :getter "gtk_tree_model_get_n_columns"
804      :reader tree-model-n-columns 
805      :type int)))
806
807   ("GtkTreeSelection"
808    :slots
809    ((mode
810      :allocation :virtual
811      :getter "gtk_tree_selection_get_mode"
812      :setter "gtk_tree_selection_set_mode"
813      :accessor tree-selection-mode
814      :initarg :mode
815      :type selection-mode)
816     (tree-view
817      :allocation :virtual
818      :getter "gtk_tree_selection_get_mode"
819      :reader tree-selection-mode
820      :type tree-view)))
821
822   ("GtkComboBox"
823    :slots
824    ((active-iter
825      :allocation :virtual
826      :getter "gtk_combo_box_get_active_iter"
827      :setter "gtk_combo_box_set_active_iter"
828      :accessor combo-box-active-iter 
829      :type tree-iter)))
830
831   ("GtkTextBuffer"
832    :slots
833    ((line-count
834      :allocation :virtual
835      :getter "gtk_text_buffer_get_line_count"
836      :reader text-buffer-line-count
837      :type int)
838     (char-count
839      :allocation :virtual
840      :getter "gtk_text_buffer_get_char_count"
841      :reader text-buffer-char-count
842      :type int)
843     (modified
844      :allocation :virtual
845      :getter "gtk_text_buffer_get_modified"
846      :setter "gtk_text_buffer_set_modified"
847      :accessor text-buffer-modifed-p
848      :type boolean)))
849
850   ("GtkTextView"
851    :slots
852    ((default-attributes
853      :allocation :virtual
854      :getter "gtk_text_view_get_default_attributes"
855      :reader text-view-default-attributes
856      :type text-attributes)))
857
858   ("GtkTextTagTable"
859    :slots
860    ((size
861      :allocation :virtual
862      :getter "gtk_text_tag_table_get_size"
863      :reader text-tag-table-size
864      :type int)))
865
866   ("GtkTextTag"
867    :slots
868    ((priority
869      :allocation :virtual
870      :getter "gtk_text_tag_get_priority"
871      :setter "gtk_text_tag_set_priority"
872      :accessor text-tag-priority
873      :type int)
874     (weight
875      :merge t :type pango:weight)))
876
877   ("GtkTextMark"
878    :slots
879    ((buffer
880      :allocation :virtual
881      :getter "gtk_text_mark_get_buffer"
882      :reader text-mark-buffer
883      :type text-buffer)
884     (name
885      :allocation :virtual
886      :getter "gtk_text_mark_get_name"
887      :reader text-mark-name
888      :type string)
889     (visible
890      :allocation :virtual
891      :getter "gtk_text_mark_get_visible"
892      :setter "gtk_text_mark_set_visible"
893      :accessor text-mark-visible-p
894      :type boolean)
895     (deleted
896      :allocation :virtual
897      :getter "gtk_text_mark_get_deleted"
898      :reader text-mark-deleted-p
899      :type boolean)
900     (left-gravity
901      :allocation :virtual
902      :getter "gtk_text_mark_get_left_gravity"
903      :reader text-mark-left-gravity-p
904      :type boolean)))
905
906   ("GtkUIManager"
907    :type ui-manager
908    :slots
909    ((action-groups
910      :allocation :virtual
911      :getter "gtk_ui_manager_get_action_groups"
912      :reader ui-manager-action-groups
913      :type (copy-of (glist action-group)))
914     (accel-group
915      :allocation :virtual
916      :getter "gtk_ui_manager_get_accel_group"
917      :reader ui-manager-accel-group
918      :type accel-group)))
919
920   ("GtkUIManagerItemType"
921    :type ui-manager-item-type)
922
923   ("GtkToggle"
924    :slots
925    ((accelerator
926      :allocation :virtual
927      :getter action-accelerator)))
928
929   ("GtkToggleAction"
930    :slots
931    ((active
932      :allocation :virtual
933      :getter "gtk_toggle_action_get_active"
934      :setter "gtk_toggle_action_set_active"
935      :initarg :active
936      :accessor toggle-action-active-p
937      :type boolean)))
938
939   ("GtkRadioAction"
940    :slots
941    ((group
942      :allocation :virtual
943      :getter "gtk_radio_button_get_group"
944      :reader radio-action-group
945      :type (copy-of (gslist widget)))
946     (%value
947      :allocation :property  :pname "value"
948      :readable nil :type int)
949     (value 
950      :allocation :virtual
951      :getter radio-action-value)))
952
953
954   ;; Not needed
955   ("GtkFundamentalType" :ignore t)
956   ("GtkArgFlags" :ignore t)
957
958   
959   ;; Deprecated widgets
960   ("GtkCList" :ignore-prefix t)
961   ("GtkCTree" :ignore-prefix t)
962   ("GtkList" :ignore t)
963   ("GtkListItem" :ignore t)
964   ("GtkTree" :ignore t)
965   ("GtkTreeItem" :ignore t)
966   ("GtkItemFactory" :ignore t)
967   ("GtkText" :ignore t)
968   ("GtkPacker" :ignore-prefix t)
969   ("GtkPixmap" :ignore t)
970   ("GtkPreview" :ignore-prefix t)
971   ("GtkProgres" :ignore t)
972   ("GtkTipsQuery" :ignore t)
973   ("GtkOldEditable" :ignore t)
974   ("GtkCombo" :ignore t)
975   ("GtkOptionMenu" :ignore t)
976
977   ;; What are these?
978   ("GtkFileSystemModule" :ignore t)
979   ("GtkIMModule" :ignore t)
980   ("GtkThemeEngine" :ignore t)
981
982   )
983
984
985 (defclass text-iter (boxed)
986   ((buffer
987     :allocation :virtual
988     :getter "gtk_text_iter_get_buffer"
989     :reader text-iter-buffer
990     :type text-buffer)
991    (offset
992     :allocation :virtual
993     :getter "gtk_text_iter_get_offset"
994     :setter "gtk_text_iter_set_offset"
995     :accessor text-iter-offset
996     :type int)
997    (line
998     :allocation :virtual
999     :getter "gtk_text_iter_get_line"
1000     :setter "gtk_text_iter_set_line"
1001     :accessor text-iter-line
1002     :type int)
1003    (line-offset
1004     :allocation :virtual
1005     :getter "gtk_text_iter_get_line_offset"
1006     :setter "gtk_text_iter_set_line_offset"
1007     :accessor text-iter-line-offset
1008     :type int)
1009    (line-index
1010     :allocation :virtual
1011     :getter "gtk_text_iter_get_line_index"
1012     :setter "gtk_text_iter_set_line_index"
1013     :accessor text-iter-line-index
1014     :type int)
1015    (visible-line-index
1016     :allocation :virtual
1017     :getter "gtk_text_iter_get_visible_line_index"
1018     :setter "gtk_text_iter_set_visible_line_index"
1019     :accessor text-iter-visible-line-index
1020     :type int)
1021    (visible-line-offset
1022     :allocation :virtual
1023     :getter "gtk_text_iter_get_visible_line_offset"
1024     :setter "gtk_text_iter_set_visible_line_offset"
1025     :accessor text-iter-visible-line-offset
1026     :type int)
1027    ;; Workaround to get correct size 
1028    (dummy14
1029      :allocation :alien :offset #.(* 13 (size-of 'pointer))
1030      :type pointer))
1031   (:metaclass boxed-class 
1032    ;; I am pretty sure this was working in older versons on CMUCL
1033    :size #.(* 14 (size-of 'pointer))))
1034
1035
1036 (defclass tooltips-data (struct)
1037   ((tooltips
1038     :allocation :alien
1039     :reader tooltips-data-tooltips
1040     :type tooltips)
1041    (widget
1042     :allocation :alien
1043     :reader tooltips-data-widget
1044     :type widget)
1045    (tip-text
1046     :allocation :alien
1047     :reader tooltips-data-tip-text
1048     :type string)
1049    (tip-private
1050     :allocation :alien
1051     :reader tooltips-data-tip-private
1052     :type string))
1053   (:metaclass struct-class))