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