1 ;; Common Lisp bindings for GTK+ v2.0.x
2 ;; Copyright (C) 1999-2001 Espen S. Johnsen <espen@users.sourceforge.org>
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.
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.
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
18 ;; $Id: gtktypes.lisp,v 1.17 2004-11-06 21:39:58 espen Exp $
23 (defclass requisition (boxed)
26 :accessor requisition-width
31 :accessor requisition-height
34 (:metaclass boxed-class))
37 (defclass allocation (struct)
40 :accessor allocation-width
45 :accessor allocation-width
50 :accessor allocation-width
55 :accessor allocation-height
58 (:metaclass struct-class))
60 (defclass border (boxed)
68 :accessor border-right
78 :accessor border-bottom
81 (:metaclass boxed-class))
83 (defclass stock-item (struct)
86 :accessor stock-item-id
91 :accessor stock-item-label
96 :accessor stock-item-modifier
98 :type gdk:modifier-type)
101 :accessor stock-item-keyval
106 :accessor stock-item-translation-domain
107 :initarg :translation-domain
109 (:metaclass static-struct-class))
112 (define-types-by-introspection "Gtk"
114 ("GtkObject" :ignore t)
115 ("GtkRequisition" :ignore t)
116 ("GtkBorder" :ignore t)
123 :allocation :instance
124 :accessor widget-child-slots
125 :type container-child)
128 :getter "gtk_widget_get_parent_window"
129 :setter "gtk_widget_set_parent_window"
130 :accessor widget-parent-window
134 :getter "gtk_widget_get_window"
135 :reader widget-window
139 :getter "gtk_widget_get_state"
140 :setter "gtk_widget_set_state"
141 :accessor widget-state
146 :getter "gtk_widget_get_colormap"
147 :setter "gtk_widget_set_colormap"
149 :accessor widget-colormap
153 :getter "gtk_widget_get_visual"
154 :reader widget-visual
158 :getter "gtk_widget_get_direction"
159 :setter "gtk_widget_set_direction"
160 :accessor widget-direction
162 :type text-direction)
165 :getter "gtk_widget_get_composite_name"
166 :setter "gtk_widget_set_composite_name"
167 :accessor widget-composite-name
168 :initarg :composite-name
172 :getter "gtk_widget_get_settings"
173 :accessor widget-settings
177 :getter "gtk_widget_get_child_visible"
178 :setter "gtk_widget_set_child_visible"
179 :accessor widget-child-visible-p
180 :initarg :child-visible
189 :getter container-children
190 :setter (setf container-children))
193 :getter "gtk_container_get_focus_child"
194 :setter "gtk_container_set_focus_child"
195 :accessor container-focus-child
196 :initarg :focus-child
200 :getter container-focus-chain
201 :setter (setf container-focus-chain))
204 :getter "gtk_container_get_focus_hadjustment"
205 :setter "gtk_container_set_focus_hadjustment"
206 :accessor container-focus-hadjustment
207 :initarg :focus-hadjustment
211 :getter "gtk_container_get_focus_vadjustment"
212 :setter "gtk_container_set_focus_vadjustment"
213 :accessor container-focus-vadjustment
214 :initarg :focus-vadjustment
221 :getter "gtk_bin_get_child"
222 :setter (setf bin-child)
230 :getter "gtk_window_get_gravity"
231 :setter "gtk_window_set_gravity"
232 :accessor window-gravity
237 :getter "gtk_window_get_focus"
238 :setter "gtk_window_set_focus"
239 :accessor window-focus-widget
240 :initarg :focus-widget
244 :getter "gtk_window_get_default"
245 :setter "gtk_window_set_default"
246 :accessor window-default-widget
247 :initarg :default-widget
251 :getter "gtk_window_get_decorated"
252 :setter "gtk_window_set_decorated"
253 :accessor window-decorated-p
258 :getter "gtk_window_get_has_frame"
259 :setter "gtk_window_set_has_frame"
260 :accessor window-has-frame-p
265 :getter "gtk_window_get_role"
266 :setter "gtk_window_set_role"
267 :accessor window-role
272 :getter "gtk_window_get_type_hint"
273 :setter "gtk_window_set_type_hint"
274 :accessor window-type-hint
276 :type gdk:window-type-hint)
280 :setter (setf window-icon)
284 :getter "gtk_window_get_mnemonic_modifier"
285 :setter "gtk_window_set_mnemonic_modifier"
286 :accessor window-mnemonic-modifier
287 :initarg :mnemonic-modifier
288 :type gdk:modifier-type)
291 :getter "gtk_window_get_transient_for"
292 :setter "gtk_window_set_transient_for"
293 :accessor window-transient-for
294 :initarg :transient-for
301 :getter "gtk_tooltips_get_enabled"
302 :setter (setf tooltips-enabled-p)
303 :reader tooltips-enabled-p
311 :getter "gtk_option_menu_get_menu"
312 :setter (setf option-menu-menu)
313 :reader option-menu-menu
318 :getter "gtk_option_menu_get_history"
319 :setter "gtk_option_menu_set_history"
320 :accessor option-menu-history
322 :type unsigned-int)))
328 :getter menu-item-label
329 :setter (setf menu-item-label)
334 :getter "gtk_menu_item_get_right_justified"
335 :setter "gtk_menu_item_set_right_justified"
336 :accessor menu-item-right-justified-p
337 :initarg :right-justified
341 :getter "gtk_menu_item_get_submenu"
342 :setter (setf menu-item-submenu)
343 :reader menu-item-submenu
347 ("GtkColorSelectionDialog"
351 :reader color-selection-dialog-colorsel
355 :reader color-selection-dialog-ok-button
359 :reader color-selection-dialog-cancel-button
363 :reader color-selection-dialog-help-button
370 :reader scrolled-window-hscrollbar
374 :reader scrolled-window-vscrollbar
382 :setter (setf paned-child1)
388 :setter (setf paned-child2)
396 :getter "gtk_menu_get_accel_group"
397 :setter "gtk_menu_set_accel_group"
398 :accessor menu-accel-group
399 :initarg :accel-group
403 :getter "gtk_menu_get_title"
404 :setter "gtk_menu_set_title"
410 :getter "gtk_menu_get_active"
411 :setter (setf menu-active)
417 :getter "gtk_menu_get_tearoff_state"
418 :setter "gtk_menu_set_tearoff_state"
419 :accessor menu-tornoff-p
427 :getter "gtk_toolbar_get_tooltips"
428 :setter "gtk_toolbar_set_tooltips"
429 :accessor toolbar-tooltips-p
434 :getter "gtk_toolbar_get_icon_size"
435 :setter "gtk_toolbar_set_icon_size"
436 :accessor toolbar-icon-size
440 :allocation :property
441 :pname "toolbar-style"
442 :initarg :toolbar-style
443 :accessor toolbar-style
444 :type toolbar-style)))
450 :getter notebook-current-page
451 :setter (setf notebook-current-page)
452 :initarg :current-page)
459 :getter "gtk_ruler_get_metric"
460 :setter "gtk_ruler_set_metric"
461 :accessor ruler-metric
467 ; deprecated properties
468 ((bar-style :ignore t)
469 (adjustment :ignore t)
470 (activity-step :ignore t)
471 (activity-blocks :ignore t)
472 (discrete-blocks :ignore t)))
478 :getter "gtk_table_get_default_col_spacing"
479 :setter "gtk_table_set_col_spacings"
480 :initarg :column-spacing
484 :getter "gtk_table_get_default_row_spacing"
485 :setter "gtk_table_set_row_spacings"
486 :initarg :row-spacing
487 :type unsigned-int)))
493 :getter "gtk_dialog_get_vbox"
498 :getter "gtk_dialog_get_action_area"
499 :reader dialog-action-area
506 :getter "gtk_combo_get_entry"
514 :getter "gtk_radio_button_get_group"
515 :reader radio-button-group
516 :type (static (gslist widget)))))
522 :getter "gtk_radio_menu_item_get_group"
523 :reader radio-menu-item-group
524 :type (static (gslist widget)))))
530 :getter "gtk_file_selection_get_action_area"
531 :reader file-selection-action-area
535 :getter "gtk_file_selection_get_ok_button"
536 :reader file-selection-ok-button
540 :getter "gtk_file_selection_get_cancel_button"
541 :reader file-selection-cancel-button
548 :getter "gtk_layout_get_bin_window"
549 :reader layout-bin-window
556 :getter "gtk_fixed_get_has_window"
557 :setter "gtk_fixed_set_has_window"
558 :reader fixed-has-window-p
566 :getter "gtk_range_get_value"
567 :setter "gtk_range_set_value"
569 :accessor range-value
574 :setter (setf range-upper)
579 :setter (setf range-lower)
583 :getter range-step-increment
584 :setter (setf range-step-increment)
585 :initarg :step-increment)
588 :getter range-page-increment
589 :setter (setf range-page-increment)
590 :initarg :page-increment)))
601 :getter "gtk_editable_get_editable"
602 :setter "gtk_editable_set_editable"
603 :reader editable-editable-p
608 :getter "gtk_editable_get_position"
609 :setter "gtk_editable_set_position"
610 :reader editable-position
615 :getter editable-text
616 :setter (setf editable-text)
623 :getter "gtk_file_chooser_get_filename"
624 :setter "gtk_file_chooser_set_filename"
625 :accessor file-chooser-filename
630 :setter "gtk_file_chooser_set_current_name"
631 :accessor file-choser-current-name
632 :initarg :current-name
636 :setter "gtk_file_chooser_set_current_folder"
637 :setter "gtk_file_chooser_get_current_folder"
638 :accessor file-choser-current-folder
639 :initarg :current-folder
643 :getter "gtk_file_chooser_get_uri"
644 :setter "gtk_file_chooser_set_uri"
645 :accessor file-choser-uri
650 :setter "gtk_file_chooser_set_current_folder_uri"
651 :setter "gtk_file_chooser_get_current_folder_uri"
652 :accessor file-choser-current-folder-uri
653 :initarg :current-folder-uri
658 ("GtkFundamentalType" :ignore t)
659 ("GtkArgFlags" :ignore t)
662 ;; Deprecated widgets
663 ("GtkCList" :ignore-prefix t)
664 ("GtkCTree" :ignore-prefix t)
665 ("GtkList" :ignore-prefix t)
666 ("GtkTree" :ignore t)
667 ("GtkTreeItem" :ignore t)
668 ("GtkText" :ignore-prefix t :except ("GtkTextDirection"))
669 ("GtkPacker" :ignore-prefix t)
670 ("GtkPixmap" :ignore t)
671 ("GtkPreview" :ignore-prefix t)
672 ("GtkTipsQuery" :ignore t)
673 ("GtkOldEditable" :ignore t)
676 ("GtkFileSystemModule" :ignore t)
677 ("GtkIMModule" :ignore t)
678 ("GtkThemeEngine" :ignore t)