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.15 2002-04-02 15:03:47 espen Exp $
23 (defclass requisition (boxed)
26 :accessor requisition-width
31 :accessor requisition-height
34 (:metaclass boxed-class)
35 (:alien-name "GtkTypeRequisition"))
37 (defclass allocation (struct)
40 :accessor allocation-width
45 :accessor allocation-width
50 :accessor allocation-width
55 :accessor allocation-height
58 (:metaclass proxy-class))
60 (defclass border (boxed)
68 :accessor border-right
78 :accessor border-bottom
81 (:metaclass boxed-class)
82 (:alien-name "GtkTypeBorder"))
84 (defclass adjustment (%object)
87 :accessor adjustment-lower
92 :accessor adjustment-upper
95 (%value ; to get the offset right
100 :accessor adjustment-step-increment
101 :initarg :step-increment
105 :accessor adjustment-page-increment
106 :initarg :page-increment
110 :accessor adjustment-page-size
115 :getter "gtk_adjustment_get_value"
116 :setter "gtk_adjustment_set_value"
117 :accessor adjustment-value
120 (:metaclass gobject-class)
121 (:alien-name "GtkAdjustment"))
123 (defclass stock-item (struct)
126 :accessor stock-item-id
131 :accessor stock-item-label
136 :accessor stock-item-modifier
138 :type gdk:modifier-type)
141 :accessor stock-item-keyval
146 :accessor stock-item-translation-domain
147 :initarg :translation-domain
149 (:metaclass proxy-class))
153 (define-types-by-introspection "Gtk"
155 ("GtkObject" :ignore t)
156 ("GtkRequisition" :ignore t)
157 ("GtkBorder" :ignore t)
158 ("GtkAdjustment" :ignore t)
165 :allocation :instance
166 :accessor widget-child-slots
167 :type container-child)
170 :getter "gtk_widget_get_parent_window"
171 :setter "gtk_widget_set_parent_window"
172 :accessor widget-parent-window
176 :getter "gtk_widget_get_window"
177 :reader widget-window
181 :getter "gtk_widget_get_state"
182 :setter "gtk_widget_set_state"
183 :accessor widget-state
188 :getter "gtk_widget_get_colormap"
189 :setter "gtk_widget_set_colormap"
191 :accessor widget-colormap
195 :getter "gtk_widget_get_visual"
196 :reader widget-visual
200 :getter "gtk_widget_get_direction"
201 :setter "gtk_widget_set_direction"
202 :accessor widget-direction
204 :type text-direction)
207 :getter "gtk_widget_get_composite_name"
208 :setter "gtk_widget_set_composite_name"
209 :accessor widget-composite-name
210 :initarg :composite-name
214 :getter "gtk_widget_get_settings"
215 :accessor widget-settings
219 :getter "gtk_widget_get_child_visible"
220 :setter "gtk_widget_set_child_visible"
221 :accessor widget-child-visible-p
222 :initarg :child-visible
231 :getter container-children
232 :setter (setf container-children))
235 :getter "gtk_container_get_focus_child"
236 :setter "gtk_container_set_focus_child"
237 :accessor container-focus-child
238 :initarg :focus-child
242 :getter container-focus-chain
243 :setter (setf container-focus-chain))
246 :getter "gtk_container_get_focus_hadjustment"
247 :setter "gtk_container_set_focus_hadjustment"
248 :accessor container-focus-hadjustment
249 :initarg :focus-hadjustment
253 :getter "gtk_container_get_focus_vadjustment"
254 :setter "gtk_container_set_focus_vadjustment"
255 :accessor container-focus-vadjustment
256 :initarg :focus-vadjustment
263 :getter "gtk_bin_get_child"
264 :setter (setf bin-child)
272 :getter "gtk_window_get_gravity"
273 :setter "gtk_window_set_gravity"
274 :accessor window-gravity
279 :getter "gtk_window_get_focus"
280 :setter "gtk_window_set_focus"
281 :accessor window-focus-widget
282 :initarg :focus-widget
286 :getter "gtk_window_get_default"
287 :setter "gtk_window_set_default"
288 :accessor window-default-widget
289 :initarg :default-widget
293 :getter "gtk_window_get_decorated"
294 :setter "gtk_window_set_decorated"
295 :accessor window-decorated-p
300 :getter "gtk_window_get_has_frame"
301 :setter "gtk_window_set_has_frame"
302 :accessor window-has-frame-p
307 :getter "gtk_window_get_role"
308 :setter "gtk_window_set_role"
309 :accessor window-role
314 :getter "gtk_window_get_type_hint"
315 :setter "gtk_window_set_type_hint"
316 :accessor window-type-hint
318 :type gdk:window-type-hint)
322 :setter (setf window-icon)
326 :getter "gtk_window_get_mnemonic_modifier"
327 :setter "gtk_window_set_mnemonic_modifier"
328 :accessor window-mnemonic-modifier
329 :initarg :mnemonic-modifier
330 :type gdk:modifier-type)
333 :getter "gtk_window_get_transient_for"
334 :setter "gtk_window_set_transient_for"
335 :accessor window-transient-for
336 :initarg :transient-for
343 :getter "gtk_tooltips_get_enabled"
344 :setter (setf tooltips-enabled-p)
345 :reader tooltips-enabled-p
353 :getter "gtk_option_menu_get_menu"
354 :setter (setf option-menu-menu)
355 :reader option-menu-menu
360 :getter "gtk_option_menu_get_history"
361 :setter "gtk_option_menu_set_history"
362 :accessor option-menu-history
364 :type unsigned-int)))
370 :getter menu-item-label
371 :setter (setf menu-item-label)
376 :getter "gtk_menu_item_get_right_justified"
377 :setter "gtk_menu_item_set_right_justified"
378 :accessor menu-item-right-justified-p
379 :initarg :right-justified
383 :getter "gtk_menu_item_get_submenu"
384 :setter (setf menu-item-submenu)
385 :reader menu-item-submenu
389 ("GtkColorSelectionDialog"
393 :reader color-selection-dialog-colorsel
397 :reader color-selection-dialog-ok-button
401 :reader color-selection-dialog-cancel-button
405 :reader color-selection-dialog-help-button
412 :reader scrolled-window-hscrollbar
416 :reader scrolled-window-vscrollbar
424 :setter (setf paned-child1)
430 :setter (setf paned-child2)
438 :getter "gtk_menu_get_accel_group"
439 :setter "gtk_menu_set_accel_group"
440 :accessor menu-accel-group
441 :initarg :accel-group
445 :getter "gtk_menu_get_title"
446 :setter "gtk_menu_set_title"
452 :getter "gtk_menu_get_active"
453 :setter (setf menu-active)
459 :getter "gtk_menu_get_tearoff_state"
460 :setter "gtk_menu_set_tearoff_state"
461 :accessor menu-tornoff-p
469 :getter "gtk_toolbar_get_tooltips"
470 :setter "gtk_toolbar_set_tooltips"
471 :accessor toolbar-tooltips-p
476 :getter "gtk_toolbar_get_icon_size"
477 :setter "gtk_toolbar_set_icon_size"
478 :accessor toolbar-icon-size
486 :getter notebook-current-page
487 :setter (setf notebook-current-page)
488 :initarg :current-page)
495 :getter "gtk_ruler_get_metric"
496 :setter "gtk_ruler_set_metric"
497 :accessor ruler-metric
503 ; deprecated properties
504 ((bar-style :ignore t)
505 (adjustment :ignore t)
506 (activity-step :ignore t)
507 (activity-blocks :ignore t)
508 (discrete-blocks :ignore t)))
514 :getter "gtk_table_get_default_col_spacing"
515 :setter "gtk_table_set_col_spacings"
516 :initarg :column-spacing
520 :getter "gtk_table_get_default_row_spacing"
521 :setter "gtk_table_set_row_spacings"
522 :initarg :row-spacing
523 :type unsigned-int)))
529 :getter "gtk_dialog_get_vbox"
530 :reader dialog-main-area
534 :getter "gtk_dialog_get_action_area"
535 :reader dialog-action-area
542 :getter "gtk_combo_get_entry"
550 :getter "gtk_radio_button_get_group"
551 :reader radio-button-group
552 :type (static (gslist widget)))))
558 :getter "gtk_radio_menu_item_get_group"
559 :reader radio-menu-item-group
560 :type (static (gslist widget)))))
566 :getter "gtk_file_selection_get_action_area"
567 :reader file-selection-action-area
571 :getter "gtk_file_selection_get_ok_button"
572 :reader file-selection-ok-button
576 :getter "gtk_file_selection_get_cancel_button"
577 :reader file-selection-cancel-button
583 :getter "gtk_layout_get_bin_window"
584 :reader layout-bin-window
590 :getter "gtk_fixed_get_has_window"
591 :setter "gtk_fixed_set_has_window"
592 :reader fixed-has-window-p
597 ("GtkFundamentalType" :ignore t)
598 ("GtkArgFlags" :ignore t)
601 ;; Deprecated widgets
602 ("GtkCList" :ignore-prefix t)
603 ("GtkCTree" :ignore-prefix t)
604 ("GtkList" :ignore-prefix t)
605 ("GtkTree" :ignore t)
606 ("GtkTreeItem" :ignore t)
607 ("GtkText" :ignore-prefix t :except ("GtkTextDirection"))
608 ("GtkPacker" :ignore-prefix t)
609 ("GtkPixmap" :ignore t)
610 ("GtkPreview" :ignore-prefix t)
611 ("GtkTipsQuery" :ignore t)
612 ("GtkOldEditable" :ignore t))