chiark / gitweb /
Added misc classes and slots
[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.22 2004-12-17 00:42:55 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
130 (define-types-by-introspection "Gtk"
131   ;; Manually defined
132   ("GtkObject" :ignore t)
133   ("GtkRequisition" :ignore t)
134   ("GtkBorder" :ignore t)
135   ("GtkTreeIter" :ignore t)
136   ("GtkTreePath" :ignore t)
137 ;  ("GtkStyle" :ignore t)
138
139   ;; Manual override
140   ("GtkWidget"
141    :slots
142    ((child-slots
143      :allocation :instance
144      :accessor widget-child-slots
145      :type container-child)
146     (window
147      :allocation :virtual
148      :getter "gtk_widget_get_window"
149      :unbound nil
150      :reader widget-window
151      :type gdk:window)
152     (state
153      :allocation :virtual
154      :getter "gtk_widget_get_state"
155      :setter "gtk_widget_set_state"
156      :accessor widget-state
157      :initarg :state
158      :type state-type)
159     (colormap
160      :allocation :virtual
161      :getter "gtk_widget_get_colormap"
162      :setter "gtk_widget_set_colormap"
163      :unbound nil
164      :initarg :colormap
165      :accessor widget-colormap
166      :type gdk:colormap)
167     (visual
168      :allocation :virtual
169      :getter "gtk_widget_get_visual"
170      :unbound nil
171      :reader widget-visual
172      :type gdk:visual)
173     (direction
174      :allocation :virtual
175      :getter "gtk_widget_get_direction"
176      :setter "gtk_widget_set_direction"
177      :accessor widget-direction
178      :initarg :direction
179      :type text-direction)
180     (composite-name
181      :allocation :virtual
182      :getter "gtk_widget_get_composite_name"
183      :setter "gtk_widget_set_composite_name"
184      :accessor widget-composite-name
185      :initarg :composite-name
186      :type string)
187     (settings
188      :allocation :virtual
189      :getter "gtk_widget_get_settings"
190      :unbound nil
191      :accessor widget-settings
192      :type settings)
193     (child-visible
194      :allocation :virtual
195      :getter "gtk_widget_get_child_visible"
196      :setter "gtk_widget_set_child_visible"
197      :accessor widget-child-visible-p
198      :initarg :child-visible
199      :type boolean)
200     (width-request
201      :merge t :unbound -1)
202     (height-request
203      :merge t :unbound -1)))
204      
205   ("GtkContainer"
206    :slots
207    ((child
208      :ignore t)
209     (children
210      :allocation :virtual
211      :getter container-children
212      :setter (setf container-children))
213     (focus-child
214      :allocation :virtual
215      :getter "gtk_container_get_focus_child"
216      :setter "gtk_container_set_focus_child"
217      :accessor container-focus-child
218      :initarg :focus-child
219      :type widget)
220     (focus-chain
221      :allocation :virtual
222      :getter container-focus-chain
223      :setter (setf container-focus-chain))
224     (focus-hadjustment
225      :allocation :virtual
226      :getter "gtk_container_get_focus_hadjustment"
227      :setter "gtk_container_set_focus_hadjustment"
228      :accessor container-focus-hadjustment
229      :initarg :focus-hadjustment
230      :type adjustment)
231     (focus-vadjustment
232      :allocation :virtual
233      :getter "gtk_container_get_focus_vadjustment"
234      :setter "gtk_container_set_focus_vadjustment"
235      :accessor container-focus-vadjustment
236      :initarg :focus-vadjustment
237      :type adjustment)))
238       
239   ("GtkBin"
240    :slots
241    ((child
242      :allocation :virtual
243      :getter "gtk_bin_get_child"
244      :setter (setf bin-child)
245      :reader bin-child
246      :type widget)))
247
248   ("GtkWindow"
249    :slots
250    ((gravity
251      :allocation :virtual
252      :getter "gtk_window_get_gravity"
253      :setter "gtk_window_set_gravity"
254      :accessor window-gravity
255      :initarg :gravity
256      :type gdk:gravity)
257     (focus-widget
258      :allocation :virtual
259      :getter "gtk_window_get_focus"
260      :setter "gtk_window_set_focus"
261      :accessor window-focus-widget
262      :initarg :focus-widget
263      :type widget)
264     (default-widget
265      :allocation :virtual
266      :getter "gtk_window_get_default"
267      :setter "gtk_window_set_default"
268      :accessor window-default-widget
269      :initarg :default-widget
270      :type widget)
271     (decorated
272      :allocation :virtual
273      :getter "gtk_window_get_decorated"
274      :setter "gtk_window_set_decorated"
275      :accessor window-decorated-p
276      :initarg :decorated
277      :type boolean)
278     (has-frame
279      :allocation :virtual
280      :getter "gtk_window_get_has_frame"
281      :setter "gtk_window_set_has_frame"
282      :accessor window-has-frame-p
283      :initarg :has-frame
284      :type boolean)
285     (role
286      :allocation :virtual
287      :getter "gtk_window_get_role"
288      :setter "gtk_window_set_role"
289      :accessor window-role
290      :initarg :role
291      :type string)
292     (type-hint
293      :allocation :virtual
294      :getter "gtk_window_get_type_hint"
295      :setter "gtk_window_set_type_hint"
296      :accessor window-type-hint
297      :initarg :type-hint
298      :type gdk:window-type-hint)
299     (icon
300      :allocation :virtual
301      :getter window-icon
302      :setter (setf window-icon)
303      :initarg :icon)
304     (mnemonic-modifier
305      :allocation :virtual
306      :getter "gtk_window_get_mnemonic_modifier"
307      :setter "gtk_window_set_mnemonic_modifier"
308      :accessor window-mnemonic-modifier
309      :initarg :mnemonic-modifier
310      :type gdk:modifier-type)
311     (transient-for
312      :allocation :virtual
313      :getter "gtk_window_get_transient_for"
314      :setter "gtk_window_set_transient_for"
315      :accessor window-transient-for
316      :initarg :transient-for
317      :type window)))
318   
319   ("GtkTooltips"
320    :slots
321    ((enabled
322      :allocation :virtual
323      :getter "gtk_tooltips_get_enabled"
324      :setter (setf tooltips-enabled-p)
325      :reader tooltips-enabled-p
326      :initarg :enabled
327      :type boolean)))
328   
329   ("GtkOptionMenu"
330    :slots
331    ((menu
332      :allocation :virtual
333      :getter "gtk_option_menu_get_menu"
334      :setter (setf option-menu-menu)
335      :reader option-menu-menu
336      :initarg :menu
337      :type menu)
338     (history
339      :allocation :virtual
340      :getter "gtk_option_menu_get_history"
341      :setter "gtk_option_menu_set_history"
342      :accessor option-menu-history
343      :initarg :history
344      :type unsigned-int)))
345
346   ("GtkMenuItem"
347    :slots
348    ((label
349      :allocation :virtual
350      :getter menu-item-label
351      :setter (setf menu-item-label)
352      :initarg :label
353      :type string)
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 (setf menu-item-submenu)
365      :reader menu-item-submenu
366      :initarg :submenu
367      :type menu-item)))
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 paned-child1
404     :setter (setf paned-child1)
405     :initarg :child1
406     :type widget)
407    (child2
408     :allocation :virtual
409     :getter paned-child2
410     :setter (setf paned-child2)
411     :initarg :child2
412     :type widget)))
413
414   ("GtkMenu"
415    :slots
416    ((accel-group
417      :allocation :virtual
418      :getter "gtk_menu_get_accel_group"
419      :setter "gtk_menu_set_accel_group"
420      :accessor menu-accel-group
421      :initarg :accel-group
422      :type accel-group)
423     (title
424      :allocation :virtual
425      :getter "gtk_menu_get_title"
426      :setter "gtk_menu_set_title"
427      :accessor menu-title
428      :initarg :title
429      :type string)
430     (active
431      :allocation :virtual
432      :getter "gtk_menu_get_active"
433      :setter (setf menu-active)
434      :reader menu-active
435      :initarg :active
436      :type widget)
437     (tornoff
438      :allocation :virtual
439      :getter "gtk_menu_get_tearoff_state"
440      :setter "gtk_menu_set_tearoff_state"
441      :accessor menu-tornoff-p
442      :initarg :tearoff
443      :type boolean)))
444
445   ("GtkToolbar"
446    :slots
447    ((tooltips
448      :allocation :virtual
449      :getter "gtk_toolbar_get_tooltips"
450      :setter "gtk_toolbar_set_tooltips"
451      :accessor toolbar-tooltips-p
452      :initarg :tooltips
453      :type boolean)
454     (icon-size
455      :allocation :virtual
456      :getter "gtk_toolbar_get_icon_size"
457      :setter "gtk_toolbar_set_icon_size"
458      :accessor toolbar-icon-size
459      :initarg :icon-size
460      :type icon-size)
461     (toolbar-style
462      :allocation :property
463      :pname "toolbar-style"
464      :initarg :toolbar-style
465      :accessor toolbar-style
466      :type toolbar-style)))
467
468   ("GtkNotebook"
469    :slots
470    ((current-page
471      :allocation :virtual
472      :getter notebook-current-page
473      :setter (setf notebook-current-page)
474      :initarg :current-page)
475     (page :ignore t)))
476   
477   ("GtkRuler"
478    :slots
479    ((metric
480      :allocation :virtual
481      :getter "gtk_ruler_get_metric"
482      :setter "gtk_ruler_set_metric"
483      :accessor ruler-metric
484      :initarg :metric
485      :type metric-type)))
486
487   ("GtkProgressBar"
488    :slots
489    ; deprecated properties
490    ((bar-style :ignore t)
491     (adjustment :ignore t)
492     (activity-step :ignore t)
493     (activity-blocks :ignore t)
494     (discrete-blocks :ignore t)))
495
496   ("GtkTable"
497    :slots
498    ((column-spacing
499      :allocation :virtual
500      :getter "gtk_table_get_default_col_spacing"
501      :setter "gtk_table_set_col_spacings"
502      :initarg :column-spacing
503      :type unsigned-int)
504     (row-spacing
505      :allocation :virtual
506      :getter "gtk_table_get_default_row_spacing"
507      :setter "gtk_table_set_row_spacings"
508      :initarg :row-spacing
509      :type unsigned-int)))
510
511   ("GtkDialog"
512    :slots
513    ((vbox
514      :allocation :virtual
515      :getter "gtk_dialog_get_vbox"
516      :reader dialog-vbox
517      :type widget)
518     (action-area
519      :allocation :virtual
520      :getter "gtk_dialog_get_action_area"
521      :reader dialog-action-area
522      :type widget)))
523
524   ("GtkCombo"
525    :slots
526    ((entry
527      :allocation :virtual
528      :getter "gtk_combo_get_entry"
529      :reader combo-entry
530      :type entry)))
531   
532   ("GtkRadioButton"
533    :slots
534    ((group
535      :allocation :virtual
536      :getter "gtk_radio_button_get_group"
537      :reader radio-button-group
538      :type (copy-of (gslist widget)))))
539
540   ("GtkRadioMenuItem"
541    :slots
542    ((group
543      :allocation :virtual
544      :getter "gtk_radio_menu_item_get_group"
545      :reader radio-menu-item-group
546      :type (static (gslist widget)))))
547
548   ("GtkFileSelection"
549    :slots
550    ((action-area
551      :allocation :virtual
552      :getter "gtk_file_selection_get_action_area"
553      :reader file-selection-action-area
554      :type widget)
555     (ok-button
556      :allocation :virtual
557      :getter "gtk_file_selection_get_ok_button"
558      :reader file-selection-ok-button
559      :type widget)
560     (cancel-button
561      :allocation :virtual
562      :getter "gtk_file_selection_get_cancel_button"
563      :reader file-selection-cancel-button
564      :type widget)))
565
566   ("GtkLayout"
567    :slots
568    ((bin-window
569      :allocation :virtual
570      :getter "gtk_layout_get_bin_window"
571      :reader layout-bin-window
572      :type gdk:window)))
573
574   ("GtkFixed"
575    :slots
576    ((has-window
577      :allocation :virtual
578      :getter "gtk_fixed_get_has_window"
579      :setter "gtk_fixed_set_has_window"
580      :reader fixed-has-window-p
581      :initarg :has-window
582      :type boolean)))
583
584   ("GtkRange"
585    :slots
586    ((value
587      :allocation :virtual
588      :getter "gtk_range_get_value"
589      :setter "gtk_range_set_value"
590      :initarg :value
591      :accessor range-value
592      :type double-float)
593    (upper
594      :allocation :virtual
595      :getter range-upper
596      :setter (setf range-upper)
597      :initarg :upper)
598    (lower
599      :allocation :virtual
600      :getter range-lower
601      :setter (setf range-lower)
602      :initarg :lower)
603    (step-increment
604      :allocation :virtual
605      :getter range-step-increment
606      :setter (setf range-step-increment)
607      :initarg :step-increment)
608    (page-increment
609      :allocation :virtual
610      :getter range-page-increment
611      :setter (setf range-page-increment)
612      :initarg :page-increment)))
613
614   ("GtkImage"
615    :slots
616    ((file :ignore t)))
617        
618   ("GtkEditable"
619    :slots
620    ((editable
621      :allocation :virtual
622      :getter "gtk_editable_get_editable"
623      :setter "gtk_editable_set_editable"
624      :reader editable-editable-p
625      :initarg :editable
626      :type boolean)
627     (position
628      :allocation :virtual
629      :getter "gtk_editable_get_position"
630      :setter "gtk_editable_set_position"
631      :reader editable-position
632      :initarg :position
633      :type int)
634     (text
635      :allocation :virtual
636      :getter editable-text
637      :setter (setf editable-text)
638      :initarg text)))
639
640   ("GtkFileChooser"
641    :slots
642    ((filename
643      :allocation :virtual
644      :getter "gtk_file_chooser_get_filename"
645      :setter "gtk_file_chooser_set_filename"
646      :accessor file-chooser-filename
647      :initarg :filename
648      :type string)
649     (current-name
650      :allocation :virtual
651      :setter "gtk_file_chooser_set_current_name"
652      :accessor file-choser-current-name
653      :initarg :current-name
654      :type string)
655     (current-folder
656      :allocation :virtual
657      :setter "gtk_file_chooser_set_current_folder"
658      :setter "gtk_file_chooser_get_current_folder"
659      :accessor file-choser-current-folder
660      :initarg :current-folder
661      :type string)
662     (uri
663      :allocation :virtual
664      :getter "gtk_file_chooser_get_uri"
665      :setter "gtk_file_chooser_set_uri"
666      :accessor file-choser-uri
667      :initarg :uri
668      :type string)
669     (current-folder-uri
670      :allocation :virtual
671      :setter "gtk_file_chooser_set_current_folder_uri"
672      :setter "gtk_file_chooser_get_current_folder_uri"
673      :accessor file-choser-current-folder-uri
674      :initarg :current-folder-uri
675      :type string)))
676
677   ("GtkTreeView"
678    :slots
679    ((columns
680      :allocation :virtual
681      :getter "gtk_tree_view_get_columns"
682      :reader tree-view-columns 
683      :type (glist tree-view-column))
684     (selection
685      :allocation :virtual
686      :getter "gtk_tree_view_get_selection"
687      :reader tree-view-selection
688      :type tree-selection)))
689
690   ("GtkTreeModel"
691    :slots
692    ((n-columns
693      :allocation :virtual
694      :getter "gtk_tree_model_get_n_columns"
695      :reader tree-model-n-columns 
696      :type int)))
697
698   ("GtkTreeSelection"
699    :slots
700    ((mode
701      :allocation :virtual
702      :getter "gtk_tree_selection_get_mode"
703      :setter "gtk_tree_selection_set_mode"
704      :accessor tree-selection-mode
705      :initarg :mode
706      :type selection-mode)
707     (tree-view
708      :allocation :virtual
709      :getter "gtk_tree_selection_get_mode"
710      :reader tree-selection-mode
711      :type tree-view)))
712
713   ("GtkComboBox"
714    :slots
715    ((active-iter
716      :allocation :virtual
717      :getter "gtk_combo_box_get_active_iter"
718      :setter "gtk_combo_box_set_active_iter"
719      :accessor combo-box-active-iter 
720      :type tree-iter)))
721
722   ("GtkTextBuffer"
723    :slots
724    ((line-count
725      :allocation :virtual
726      :getter "gtk_text_buffer_get_line_count"
727      :reader text-buffer-line-count
728      :type int)
729     (char-count
730      :allocation :virtual
731      :getter "gtk_text_buffer_get_char_count"
732      :reader text-buffer-char-count
733      :type int)
734     (modified
735      :allocation :virtual
736      :getter "gtk_text_buffer_get_modified"
737      :setter "gtk_text_buffer_set_modified"
738      :accessor text-buffer-modifed-p
739      :type boolean)))
740
741   ("GtkTextView"
742    :slots
743    ((default-attributes
744      :allocation :virtual
745      :getter "gtk_text_view_get_default_attributes"
746      :reader text-view-default-attributes
747      :type text-attributes)))
748
749   ("GtkTextTagTable"
750    :slots
751    ((size
752      :allocation :virtual
753      :getter "gtk_text_tag_table_get_size"
754      :reader text-tag-table-size
755      :type int)))
756
757   ("GtkTextTag"
758    :slots
759    ((priority
760      :allocation :virtual
761      :getter "gtk_text_tag_get_priority"
762      :setter "gtk_text_tag_set_priority"
763      :accessor text-tag-priority
764      :type int)
765     (weight
766      :merge t :type pango:weight)))
767
768   ("GtkUIManager"
769    :type ui-manager
770    :slots
771    ((action-groups
772      :allocation :virtual
773      :getter "gtk_ui_manager_get_action_groups"
774      :reader ui-manager-action-groups
775      :type (copy-of (glist action-group)))
776     (accel-group
777      :allocation :virtual
778      :getter "gtk_ui_manager_get_accel_group"
779      :reader ui-manager-accel-group
780      :type accel-group)))
781
782   ("GtkUIManagerItemType"
783    :type ui-manager-item-type)
784
785   ("GtkToggle"
786    :slots
787    ((accelerator
788      :allocation :virtual
789      :getter action-accelerator)))
790
791   ("GtkToggleAction"
792    :slots
793    ((active
794      :allocation :virtual
795      :getter "gtk_toggle_action_get_active"
796      :setter "gtk_toggle_action_set_active"
797      :initarg :active
798      :accessor toggle-action-active-p
799      :type boolean)))
800
801   ("GtkRadioAction"
802    :slots
803    ((group
804      :allocation :virtual
805      :getter "gtk_radio_button_get_group"
806      :reader radio-button-group
807      :type (copy-of (gslist widget)))
808     (%value
809      :allocation :property  :pname "value"
810      :readable nil :type int)
811     (value 
812      :allocation :virtual
813      :getter radio-action-value)))
814
815
816   ;; Not needed
817   ("GtkFundamentalType" :ignore t)
818   ("GtkArgFlags" :ignore t)
819
820   
821   ;; Deprecated widgets
822   ("GtkCList" :ignore-prefix t)
823   ("GtkCTree" :ignore-prefix t)
824   ("GtkList" :ignore t)
825   ("GtkListItem" :ignore t)
826   ("GtkTree" :ignore t)
827   ("GtkTreeItem" :ignore t)
828   ("GtkItemFactory" :ignore t)
829   ("GtkText" :ignore t)
830   ("GtkPacker" :ignore-prefix t)
831   ("GtkPixmap" :ignore t)
832   ("GtkPreview" :ignore-prefix t)
833   ("GtkProgres" :ignore t)
834   ("GtkTipsQuery" :ignore t)
835   ("GtkOldEditable" :ignore t)
836   ("GtkCombo" :ignore t)
837   ("GtkOptionMenu" :ignore t)
838
839   ;; What are these?
840   ("GtkFileSystemModule" :ignore t)
841   ("GtkIMModule" :ignore t)
842   ("GtkThemeEngine" :ignore t)
843
844   )
845
846
847 (defclass text-iter (boxed)
848   ((buffer
849     :allocation :virtual
850     :getter "gtk_text_iter_get_buffer"
851     :reader text-iter-buffer
852     :type text-buffer)
853    (offset
854     :allocation :virtual
855     :getter "gtk_text_iter_get_offset"
856     :setter "gtk_text_iter_set_offset"
857     :accessor text-iter-offset
858     :type int)
859    (line
860     :allocation :virtual
861     :getter "gtk_text_iter_get_line"
862     :setter "gtk_text_iter_set_line"
863     :accessor text-iter-line
864     :type int)
865    (line-offset
866     :allocation :virtual
867     :getter "gtk_text_iter_get_line_offset"
868     :setter "gtk_text_iter_set_line_offset"
869     :accessor text-iter-line-offset
870     :type int)
871    (line-index
872     :allocation :virtual
873     :getter "gtk_text_iter_get_line_index"
874     :setter "gtk_text_iter_set_line_index"
875     :accessor text-iter-line-index
876     :type int)
877    (visible-line-index
878     :allocation :virtual
879     :getter "gtk_text_iter_get_visible_line_index"
880     :setter "gtk_text_iter_set_visible_line_index"
881     :accessor text-iter-visible-line-index
882     :type int)
883    (visible-line-offset
884     :allocation :virtual
885     :getter "gtk_text_iter_get_visible_line_offset"
886     :setter "gtk_text_iter_set_visible_line_offset"
887     :accessor text-iter-visible-line-offset
888     :type int)
889    ;; Workaround to get correct size 
890    (dummy14
891      :allocation :alien :offset #.(* 13 (size-of 'pointer))
892      :type pointer))
893   (:metaclass boxed-class 
894    ;; I am pretty sure this was working in older versons on CMUCL
895    :size #.(* 14 (size-of 'pointer))))