Ignore initargs for parent and visible in widget class
[clg] / gtk / gtktypes.lisp
CommitLineData
0d07716f 1;; Common Lisp bindings for GTK+ v2.0.x
8b69b878 2;; Copyright (C) 1999-2001 Espen S. Johnsen <espen@users.sourceforge.org>
0d07716f 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
ef4819bd 18;; $Id: gtktypes.lisp,v 1.33 2005/02/27 15:39:52 espen Exp $
0d07716f 19
20(in-package "GTK")
21
61617d70 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))
eb4f580c 33 (:metaclass boxed-class))
34
61617d70 35
b542e6a7 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))
6baf860c 57 (:metaclass struct-class))
b542e6a7 58
61617d70 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))
eb4f580c 80 (:metaclass boxed-class))
61617d70 81
378b3c5f 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))
9482b578 108 (:metaclass struct-class))
378b3c5f 109
4e169141 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
05a3b9e4 125(deftype tree-path () '(vector integer))
4e169141 126(register-type 'tree-path "GtkTreePath")
127
49043b9a 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))
14eaa563 134
61617d70 135(define-types-by-introspection "Gtk"
136 ;; Manually defined
137 ("GtkObject" :ignore t)
138 ("GtkRequisition" :ignore t)
139 ("GtkBorder" :ignore t)
4e169141 140 ("GtkTreeIter" :ignore t)
141 ("GtkTreePath" :ignore t)
29de7c5f 142; ("GtkStyle" :ignore t)
eb4f580c 143
a27dbb23 144 ;; Manual override
145 ("GtkWidget"
146 :slots
c66e7b94 147 ((child-properties
eb4f580c 148 :allocation :instance
c66e7b94 149 :accessor widget-child-properties
eb4f580c 150 :type container-child)
a27dbb23 151 (window
152 :allocation :virtual
153 :getter "gtk_widget_get_window"
154 :reader widget-window
155 :type gdk:window)
ef4819bd 156 (parent :merge t :initarg nil)
157 (visible :merge t :initarg nil)
49043b9a 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)
a27dbb23 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"
b542e6a7 175 :setter "gtk_widget_set_colormap"
176 :initarg :colormap
177 :accessor widget-colormap
a27dbb23 178 :type gdk:colormap)
179 (visual
180 :allocation :virtual
181 :getter "gtk_widget_get_visual"
182 :reader widget-visual
b542e6a7 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
49043b9a 197 :type (copy-of string)) ; will leak the string when setting
b542e6a7 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
29de7c5f 209 :type boolean)
210 (width-request
211 :merge t :unbound -1)
212 (height-request
213 :merge t :unbound -1)))
b542e6a7 214
a27dbb23 215 ("GtkContainer"
216 :slots
14eaa563 217 ((child :ignore t)
a27dbb23 218 (children
219 :allocation :virtual
220 :getter container-children
14eaa563 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
9617dc95 230 :getter "gtk_container_child_type"
14eaa563 231 :reader container-child-type
232 :type gtype)
a27dbb23 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)
b542e6a7 240 (focus-chain
241 :allocation :virtual
242 :getter container-focus-chain
243 :setter (setf container-focus-chain))
a27dbb23 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
14eaa563 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)))
a27dbb23 265
266 ("GtkBin"
267 :slots
268 ((child
269 :allocation :virtual
8b69b878 270 :getter "gtk_bin_get_child"
271 :setter (setf bin-child)
272 :reader bin-child
273 :type widget)))
7899a2d7 274
275 ("GtkWindow"
276 :slots
4eed43f1 277 ((focus-widget
7899a2d7 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)
7899a2d7 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)
4eed43f1 298 (icon-list
7899a2d7 299 :allocation :virtual
4eed43f1 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))
7899a2d7 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
4eed43f1 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)))
a27dbb23 328
4eed43f1 329 ("GtkWindowGroup"
330 :slots
331 ((grabs
332 :allocation :alien
333 :accessor window-group-grabs
334 :type (gslist window))))
335
a27dbb23 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
a27dbb23 346 ("GtkMenuItem"
347 :slots
348 ((label
349 :allocation :virtual
378b3c5f 350 :getter menu-item-label
351 :setter (setf menu-item-label)
a27dbb23 352 :type string)
14eaa563 353 (use-underline
354 :allocation :user-data
355 :initform nil
356 :initarg :use-underline
357 :accessor menu-item-use-underline-p)
378b3c5f 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)
a27dbb23 365 (submenu
366 :allocation :virtual
367 :getter "gtk_menu_item_get_submenu"
14eaa563 368 :setter "gtk_menu_item_set_submenu"
369 :accessor menu-item-submenu
a27dbb23 370 :initarg :submenu
14eaa563 371 :type widget)))
a27dbb23 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)))
0d07716f 402
a27dbb23 403 ("GtkPaned"
eb4f580c 404 :slots
a27dbb23 405 ((child1
0d07716f 406 :allocation :virtual
09ea6079 407 :getter "gtk_paned_get_child1"
408 :setter "gtk_paned_add1"
409 :accessor paned-child1
a27dbb23 410 :initarg :child1
0d07716f 411 :type widget)
a27dbb23 412 (child2
6d2e5d22 413 :allocation :virtual
09ea6079 414 :getter "gtk_paned_get_child2"
415 :setter "gtk_paned_add2"
416 :accessor paned-child2
a27dbb23 417 :initarg :child2
418 :type widget)))
0d07716f 419
a27dbb23 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)
14eaa563 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
a27dbb23 450 :allocation :virtual
451 :getter "gtk_menu_get_tearoff_state"
452 :setter "gtk_menu_set_tearoff_state"
14eaa563 453 :accessor menu-tearoff-state-p
454 :initarg :tearoff-state
a27dbb23 455 :type boolean)))
456
457 ("GtkToolbar"
458 :slots
9617dc95 459 ((show-tooltips
a27dbb23 460 :allocation :virtual
461 :getter "gtk_toolbar_get_tooltips"
462 :setter "gtk_toolbar_set_tooltips"
9617dc95 463 :accessor toolbar-show-tooltips-p
464 :initarg :show-tooltips
a27dbb23 465 :type boolean)
9617dc95 466 (tooltips
a27dbb23 467 :allocation :virtual
9617dc95 468 :getter "gtk_toolbar_get_tooltips_object"
469 :reader toolbar-tooltips
470 :type tooltips)
eb4f580c 471 (toolbar-style
472 :allocation :property
473 :pname "toolbar-style"
474 :initarg :toolbar-style
475 :accessor toolbar-style
9617dc95 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)))
a27dbb23 482
14eaa563 483 ("GtkToolItem"
484 :slots
9617dc95 485 ((use-drag-window
14eaa563 486 :allocation :virtual
9617dc95 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
14eaa563 490 :initarg :drag-window
9617dc95 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)))
14eaa563 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
9617dc95 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")))
14eaa563 530
378b3c5f 531 ("GtkNotebook"
532 :slots
533 ((current-page
534 :allocation :virtual
49043b9a 535 :getter %notebook-current-page
378b3c5f 536 :setter (setf notebook-current-page)
49043b9a 537 :reader notebook-current-page
538 :type widget
378b3c5f 539 :initarg :current-page)
49043b9a 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)))
378b3c5f 548
a27dbb23 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
14eaa563 568 ("GtkHandleBox"
569 :slots
570 ; deprecated property
571 ((shadow :ignore t)))
572
573 ("GtkFrame"
574 :slots
575 ; deprecated property
576 ((shadow :ignore t)))
577
a27dbb23 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
eb4f580c 595 ((vbox
a27dbb23 596 :allocation :virtual
597 :getter "gtk_dialog_get_vbox"
eb4f580c 598 :reader dialog-vbox
a27dbb23 599 :type widget)
600 (action-area
601 :allocation :virtual
602 :getter "gtk_dialog_get_action_area"
603 :reader dialog-action-area
604 :type widget)))
fd44c5b3 605
14eaa563 606 ("GtkEntry"
a27dbb23 607 :slots
14eaa563 608 ((layout
a27dbb23 609 :allocation :virtual
14eaa563 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
1448a84f 621 (width-chars :merge t :unbound -1)))
14eaa563 622
a03a718a 623 ("GtkEntryCompletion"
624 :slots
625 ((entry
626 :allocation :virtual
627 :getter "gtk_entry_completion_get_entry"
628 :reader entry-completion-entry
629 :type entry)
14eaa563 630 (minimum-key-length :merge t :unbound -1)
a03a718a 631 #+gtk2.6
14eaa563 632 (text-column :merge t :unbound -1)))
a03a718a 633
a27dbb23 634 ("GtkRadioButton"
635 :slots
636 ((group
637 :allocation :virtual
638 :getter "gtk_radio_button_get_group"
639 :reader radio-button-group
9617dc95 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")))
2afcd8bd 646
a27dbb23 647 ("GtkRadioMenuItem"
648 :slots
649 ((group
650 :allocation :virtual
651 :getter "gtk_radio_menu_item_get_group"
652 :reader radio-menu-item-group
9617dc95 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")))
0d07716f 659
a27dbb23 660 ("GtkLayout"
661 :slots
662 ((bin-window
eb4f580c 663 :allocation :virtual
a27dbb23 664 :getter "gtk_layout_get_bin_window"
665 :reader layout-bin-window
fe66d5f4 666 :type gdk:window)))
378b3c5f 667
668 ("GtkFixed"
669 :slots
670 ((has-window
eb4f580c 671 :allocation :virtual
378b3c5f 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)))
eb4f580c 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
14eaa563 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
49043b9a 722 ("GtkScale"
723 :slots
724 ((layout
725 :allocation :virtual
726 :getter "gtk_scale_get_layout"
727 :reader scale-layout
728 :type pango:layout)))
729
eb4f580c 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
9617dc95 745 :type position)
eb4f580c 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"
49043b9a 764 :accessor file-chooser-current-name
eb4f580c 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"
49043b9a 771 :accessor file-chooser-current-folder
eb4f580c 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"
49043b9a 778 :accessor file-chooser-uri
eb4f580c 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"
49043b9a 785 :accessor file-chooser-current-folder-uri
eb4f580c 786 :initarg :current-folder-uri
787 :type string)))
788
49043b9a 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
4886872c 799 ("GtkTreeView"
800 :slots
801 ((columns
802 :allocation :virtual
803 :getter "gtk_tree_view_get_columns"
804 :reader tree-view-columns
05a3b9e4 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)))
4886872c 811
4e169141 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
05a3b9e4 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
4886872c 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
29de7c5f 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
9482b578 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
29de7c5f 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
ca289b50 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
9482b578 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 ("GtkToggle"
937 :slots
938 ((accelerator
939 :allocation :virtual
940 :getter 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"
14eaa563 957 :reader radio-action-group
9482b578 958 :type (copy-of (gslist widget)))
959 (%value
960 :allocation :property :pname "value"
961 :readable nil :type int)
962 (value
963 :allocation :virtual
964 :getter radio-action-value)))
4e169141 965
49043b9a 966 ("GtkColorSelection"
967 :slots
968 ((previous-alpha
969 :allocation :virtual
970 :getter "gtk_color_selection_get_previous_alpha"
971 :setter "gtk_color_selection_get_previous_alpha"
972 :initarg :previous-alpha
973 :accessor color-selection-previous-alpha
974 :type (unsigned 16))
975 (previous-color
976 :allocation :virtual
977 :getter "gtk_color_selection_get_previous_color"
978 :setter "gtk_color_selection_get_previous_color"
979 :initarg :previous-color
980 :accessor color-selection-previous-color
981 :type gdk:color)))
982
983 ("GtkFontSelection"
984 :slots
985 ; deprecated property
986 ((font :ignore t)))
29de7c5f 987
1448a84f 988 ("GtkClipboard"
989 :slots
990 ((display
991 :allocation :virtual
992 :getter "gtk_clipboard_get_display"
993 :reader clipboard-display
994 :type gdk:display)))
995
996
a27dbb23 997 ;; Not needed
998 ("GtkFundamentalType" :ignore t)
999 ("GtkArgFlags" :ignore t)
0d07716f 1000
2afcd8bd 1001
a27dbb23 1002 ;; Deprecated widgets
1003 ("GtkCList" :ignore-prefix t)
1004 ("GtkCTree" :ignore-prefix t)
4886872c 1005 ("GtkList" :ignore t)
1006 ("GtkListItem" :ignore t)
a27dbb23 1007 ("GtkTree" :ignore t)
1008 ("GtkTreeItem" :ignore t)
4886872c 1009 ("GtkItemFactory" :ignore t)
9482b578 1010 ("GtkText" :ignore t)
a27dbb23 1011 ("GtkPacker" :ignore-prefix t)
1012 ("GtkPixmap" :ignore t)
1013 ("GtkPreview" :ignore-prefix t)
4886872c 1014 ("GtkProgres" :ignore t)
a27dbb23 1015 ("GtkTipsQuery" :ignore t)
eb4f580c 1016 ("GtkOldEditable" :ignore t)
4886872c 1017 ("GtkCombo" :ignore t)
1018 ("GtkOptionMenu" :ignore t)
49043b9a 1019 ("GtkFileSelection" :ignore t)
1020 ("GtkInputDialog")
eb4f580c 1021
1022 ;; What are these?
1023 ("GtkFileSystemModule" :ignore t)
1024 ("GtkIMModule" :ignore t)
d0cc9e86 1025 ("GtkThemeEngine" :ignore t))
29de7c5f 1026
1027
1028(defclass text-iter (boxed)
1029 ((buffer
1030 :allocation :virtual
1031 :getter "gtk_text_iter_get_buffer"
1032 :reader text-iter-buffer
49043b9a 1033 :type pointer) ;text-buffer)
29de7c5f 1034 (offset
1035 :allocation :virtual
1036 :getter "gtk_text_iter_get_offset"
1037 :setter "gtk_text_iter_set_offset"
1038 :accessor text-iter-offset
1039 :type int)
1040 (line
1041 :allocation :virtual
1042 :getter "gtk_text_iter_get_line"
1043 :setter "gtk_text_iter_set_line"
1044 :accessor text-iter-line
1045 :type int)
1046 (line-offset
1047 :allocation :virtual
1048 :getter "gtk_text_iter_get_line_offset"
1049 :setter "gtk_text_iter_set_line_offset"
1050 :accessor text-iter-line-offset
1051 :type int)
1052 (line-index
1053 :allocation :virtual
1054 :getter "gtk_text_iter_get_line_index"
1055 :setter "gtk_text_iter_set_line_index"
1056 :accessor text-iter-line-index
1057 :type int)
1058 (visible-line-index
1059 :allocation :virtual
1060 :getter "gtk_text_iter_get_visible_line_index"
1061 :setter "gtk_text_iter_set_visible_line_index"
1062 :accessor text-iter-visible-line-index
1063 :type int)
1064 (visible-line-offset
1065 :allocation :virtual
1066 :getter "gtk_text_iter_get_visible_line_offset"
1067 :setter "gtk_text_iter_set_visible_line_offset"
1068 :accessor text-iter-visible-line-offset
1069 :type int)
1070 ;; Workaround to get correct size
1071 (dummy14
49043b9a 1072 :allocation :alien :offset #.(* 13 (size-of 'pointer))
1073 :type pointer))
29de7c5f 1074 (:metaclass boxed-class
1075 ;; I am pretty sure this was working in older versons on CMUCL
49043b9a 1076; :size #.(* 14 (size-of 'pointer))
1077 ))
14eaa563 1078
1079
1080(defclass tooltips-data (struct)
1081 ((tooltips
1082 :allocation :alien
1083 :reader tooltips-data-tooltips
1084 :type tooltips)
1085 (widget
1086 :allocation :alien
1087 :reader tooltips-data-widget
1088 :type widget)
1089 (tip-text
1090 :allocation :alien
1091 :reader tooltips-data-tip-text
1092 :type string)
1093 (tip-private
1094 :allocation :alien
1095 :reader tooltips-data-tip-private
1096 :type string))
1097 (:metaclass struct-class))
49043b9a 1098
1099(defclass file-filter-info (struct)
1100 ((contains
1101 :allocation :alien
1102 :initarg :contains
1103 :type file-filter-flags)
1104 (filename
1105 :allocation :alien
1106 :initarg :filename
1107 :type string)
1108 (uri
1109 :allocation :alien
1110 :initarg :uri
1111 :type string)
1112 (display-name
1113 :allocation :alien
1114 :initarg :display-name
1115 :type string)
1116 (mime-type
1117 :allocation :alien
1118 :initarg :mime-type
1119 :type string))
1120 (:metaclass struct-class))