;; License along with this library; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-;; $Id: gtktypes.lisp,v 1.23 2004-12-20 20:00:07 espen Exp $
+;; $Id: gtktypes.lisp,v 1.29 2005-01-07 00:28:36 espen Exp $
(in-package "GTK")
(deftype tree-path () '(vector integer))
(register-type 'tree-path "GtkTreePath")
+(deftype position () '(or int (enum (:start 0) (:end -1))))
+
+;; Forward definitions
+(defclass widget (%object)
+ ()
+ (:metaclass gobject-class))
+(defclass container (widget)
+ ()
+ (:metaclass gobject-class))
+
(define-types-by-introspection "Gtk"
;; Manually defined
;; Manual override
("GtkWidget"
:slots
- ((child-slots
+ ((child-properties
:allocation :instance
- :accessor widget-child-slots
+ :accessor widget-child-properties
:type container-child)
(window
:allocation :virtual
:getter "gtk_widget_get_window"
- :unbound nil
:reader widget-window
:type gdk:window)
(state
:allocation :virtual
:getter "gtk_widget_get_colormap"
:setter "gtk_widget_set_colormap"
- :unbound nil
:initarg :colormap
:accessor widget-colormap
:type gdk:colormap)
(visual
:allocation :virtual
:getter "gtk_widget_get_visual"
- :unbound nil
:reader widget-visual
:type gdk:visual)
(direction
(settings
:allocation :virtual
:getter "gtk_widget_get_settings"
- :unbound nil
:accessor widget-settings
:type settings)
(child-visible
("GtkContainer"
:slots
- ((child
- :ignore t)
+ ((child :ignore t)
(children
:allocation :virtual
:getter container-children
- :setter (setf container-children))
+ :setter (setf container-children)
+ ;; The following doesn't work because gtk_container_get_children doesn't
+ ;; increase the reference count of the children
+; :getter "gtk_container_get_children"
+; :reader container-children
+; :type (glist widget)
+ )
+ (child-type
+ :allocation :virtual
+ :getter "gtk_container_child_type"
+ :reader container-child-type
+ :type gtype)
(focus-child
:allocation :virtual
:getter "gtk_container_get_focus_child"
:setter "gtk_container_set_focus_vadjustment"
:accessor container-focus-vadjustment
:initarg :focus-vadjustment
- :type adjustment)))
+ :type adjustment)
+ (reallocate-redraws
+ :allocation :virtual
+ :getter "gtk_container_get_reallocate_redraws"
+ :setter "gtk_container_set_reallocate_redraws"
+ :accessor container-reallocate-redraws
+ :initarg :reallocate-redraws
+ :type boolean)))
("GtkBin"
:slots
("GtkWindow"
:slots
- ((gravity
- :allocation :virtual
- :getter "gtk_window_get_gravity"
- :setter "gtk_window_set_gravity"
- :accessor window-gravity
- :initarg :gravity
- :type gdk:gravity)
- (focus-widget
+ ((focus-widget
:allocation :virtual
:getter "gtk_window_get_focus"
:setter "gtk_window_set_focus"
:accessor window-default-widget
:initarg :default-widget
:type widget)
- (decorated
- :allocation :virtual
- :getter "gtk_window_get_decorated"
- :setter "gtk_window_set_decorated"
- :accessor window-decorated-p
- :initarg :decorated
- :type boolean)
(has-frame
:allocation :virtual
:getter "gtk_window_get_has_frame"
:accessor window-has-frame-p
:initarg :has-frame
:type boolean)
- (role
+ (icon-list
:allocation :virtual
- :getter "gtk_window_get_role"
- :setter "gtk_window_set_role"
- :accessor window-role
- :initarg :role
- :type string)
- (type-hint
- :allocation :virtual
- :getter "gtk_window_get_type_hint"
- :setter "gtk_window_set_type_hint"
- :accessor window-type-hint
- :initarg :type-hint
- :type gdk:window-type-hint)
- (icon
- :allocation :virtual
- :getter window-icon
- :setter (setf window-icon)
- :initarg :icon)
+ :getter "gtk_window_get_icon_list"
+ :setter "gtk_window_set_icon_list"
+ :accessor window-icon-list
+ :initarg :icon-list
+ :type (glist gdk:pixbuf))
(mnemonic-modifier
:allocation :virtual
:getter "gtk_window_get_mnemonic_modifier"
:setter "gtk_window_set_transient_for"
:accessor window-transient-for
:initarg :transient-for
- :type window)))
+ :type window)
+ (group
+ :allocation :virtual
+ :getter "gtk_window_get_group"
+ :setter (setf window-group)
+ :reader window-group
+ :initarg :group
+ :type window-group)
+ (default-width :merge t :unbound -1)
+ (default-height :merge t :unbound -1)))
+ ("GtkWindowGroup"
+ :slots
+ ((grabs
+ :allocation :alien
+ :accessor window-group-grabs
+ :type (gslist window))))
+
("GtkTooltips"
:slots
((enabled
:initarg :enabled
:type boolean)))
- ("GtkOptionMenu"
- :slots
- ((menu
- :allocation :virtual
- :getter "gtk_option_menu_get_menu"
- :setter (setf option-menu-menu)
- :reader option-menu-menu
- :initarg :menu
- :type menu)
- (history
- :allocation :virtual
- :getter "gtk_option_menu_get_history"
- :setter "gtk_option_menu_set_history"
- :accessor option-menu-history
- :initarg :history
- :type unsigned-int)))
-
("GtkMenuItem"
:slots
((label
:allocation :virtual
:getter menu-item-label
:setter (setf menu-item-label)
- :initarg :label
:type string)
+ (use-underline
+ :allocation :user-data
+ :initform nil
+ :initarg :use-underline
+ :accessor menu-item-use-underline-p)
(right-justified
:allocation :virtual
:getter "gtk_menu_item_get_right_justified"
(submenu
:allocation :virtual
:getter "gtk_menu_item_get_submenu"
- :setter (setf menu-item-submenu)
- :reader menu-item-submenu
+ :setter "gtk_menu_item_set_submenu"
+ :accessor menu-item-submenu
:initarg :submenu
- :type menu-item)))
+ :type widget)))
("GtkColorSelectionDialog"
:slots
:accessor menu-accel-group
:initarg :accel-group
:type accel-group)
- (title
- :allocation :virtual
- :getter "gtk_menu_get_title"
- :setter "gtk_menu_set_title"
- :accessor menu-title
- :initarg :title
- :type string)
(active
:allocation :virtual
:getter "gtk_menu_get_active"
:reader menu-active
:initarg :active
:type widget)
- (tornoff
+ (screen
+ :allocation :virtual
+ :getter "gtk_menu_get_screen"
+ :setter "gtk_menu_set_screen"
+ :accessor menu-screen
+ :initarg :screen
+ :type gdk:screen)
+ (attach-widget
+ :allocation :virtual
+ :getter "gtk_menu_get_attach_widget"
+ :reader menu-attach-widget
+ :type widget)
+ #-gtk2.6
+ (tearoff-state
:allocation :virtual
:getter "gtk_menu_get_tearoff_state"
:setter "gtk_menu_set_tearoff_state"
- :accessor menu-tornoff-p
- :initarg :tearoff
+ :accessor menu-tearoff-state-p
+ :initarg :tearoff-state
:type boolean)))
("GtkToolbar"
:slots
- ((tooltips
+ ((show-tooltips
:allocation :virtual
:getter "gtk_toolbar_get_tooltips"
:setter "gtk_toolbar_set_tooltips"
- :accessor toolbar-tooltips-p
- :initarg :tooltips
+ :accessor toolbar-show-tooltips-p
+ :initarg :show-tooltips
:type boolean)
- (icon-size
+ (tooltips
:allocation :virtual
- :getter "gtk_toolbar_get_icon_size"
- :setter "gtk_toolbar_set_icon_size"
- :accessor toolbar-icon-size
- :initarg :icon-size
- :type icon-size)
+ :getter "gtk_toolbar_get_tooltips_object"
+ :reader toolbar-tooltips
+ :type tooltips)
(toolbar-style
:allocation :property
:pname "toolbar-style"
:initarg :toolbar-style
:accessor toolbar-style
- :type toolbar-style)))
+ :type toolbar-style)
+ (n-items
+ :allocation :virtual
+ :getter "gtk_toolbar_get_n_items"
+ :reader toolbar-n-items
+ :type int)))
+
+ ("GtkToolItem"
+ :slots
+ ((use-drag-window
+ :allocation :virtual
+ :getter "gtk_tool_item_get_use_drag_window"
+ :setter "gtk_tool_item_set_use_drag_window"
+ :accessor tool-item-use-drag-window-p
+ :initarg :drag-window
+ :type boolean)
+ (tip-text
+ :allocation :user-data
+ :setter (setf tool-item-tip-text)
+ :initarg :tip-text
+ :reader tool-item-tip-text)
+ (tip-private
+ :allocation :user-data
+ :setter (setf tool-item-tip-private)
+ :initarg :tip-private
+ :reader tool-item-tip-private)))
+
+ ("GtkToolButton"
+ :slots
+ ((stock-id :merge t :initarg :stock)
+ (icon-widget :merge t :initarg :icon)))
+
+ ("GtkToggleToolButton"
+ :slots
+ ((active
+ :allocation :virtual
+ :getter "gtk_toggle_tool_button_get_active"
+ :setter "gtk_toggle_tool_button_get_active"
+ :accessor toggle-tool-button-active-p
+ :initarg :active
+ :type boolean)))
+
+ ("GtkRadioToolButton"
+ :slots
+ ((group
+ :allocation :virtual
+ :getter "gtk_radio_tool_button_get_group"
+ :reader radio-tool-button-group
+ :type (copy-of (gslist widget)))
+ (value
+ :allocation :user-data
+ :initarg :value
+ :accessor radio-tool-button-value
+ :documentation "Value passed as argument to the activate callback")))
("GtkNotebook"
:slots
(activity-blocks :ignore t)
(discrete-blocks :ignore t)))
+ ("GtkHandleBox"
+ :slots
+ ; deprecated property
+ ((shadow :ignore t)))
+
+ ("GtkFrame"
+ :slots
+ ; deprecated property
+ ((shadow :ignore t)))
+
("GtkTable"
:slots
((column-spacing
:reader dialog-action-area
:type widget)))
- ("GtkCombo"
+ ("GtkEntry"
+ :slots
+ ((layout
+ :allocation :virtual
+ :getter "gtk_entry_get_layout"
+ :reader entry-layout
+ :type pango:layout)
+ (completion
+ :getter "gtk_entry_get_completion"
+ :setter "gtk_entry_set_completion"
+ :initarg :completion
+ :accessor entry-completion
+ :type entry-completion)
+ (max-length :merge t :unbound 0)
+ #+gtk2.6
+ (with-chars :merge t :unbound -1)))
+
+ ("GtkEntryCompletion"
:slots
((entry
:allocation :virtual
- :getter "gtk_combo_get_entry"
- :reader combo-entry
- :type entry)))
-
+ :getter "gtk_entry_completion_get_entry"
+ :reader entry-completion-entry
+ :type entry)
+ (minimum-key-length :merge t :unbound -1)
+ #+gtk2.6
+ (text-column :merge t :unbound -1)))
+
("GtkRadioButton"
:slots
((group
:allocation :virtual
:getter "gtk_radio_button_get_group"
:reader radio-button-group
- :type (copy-of (gslist widget)))))
+ :type (copy-of (gslist widget)))
+ (value
+ :allocation :user-data
+ :initarg :value
+ :accessor radio-button-value
+ :documentation "Value passed as argument to the activate callback")))
("GtkRadioMenuItem"
:slots
:allocation :virtual
:getter "gtk_radio_menu_item_get_group"
:reader radio-menu-item-group
- :type (static (gslist widget)))))
+ :type (copy-of (gslist widget)))
+ (value
+ :allocation :user-data
+ :initarg :value
+ :accessor radio-menu-item-value
+ :documentation "Value passed as argument to the activate callback")))
("GtkFileSelection"
:slots
("GtkImage"
:slots
- ((file :ignore t)))
-
+ ((file :ignore t)
+ #+gtk2.6
+ (pixel-size :merge t :unbound -1)))
+
+ ("GtkLabel"
+ :slots
+ ((layout
+ :allocation :virtual
+ :getter "gtk_label_get_layout"
+ :reader label-layout
+ :type pango:layout)))
+
("GtkEditable"
:slots
((editable
:setter "gtk_editable_set_position"
:reader editable-position
:initarg :position
- :type int)
+ :type position)
(text
:allocation :virtual
:getter editable-text
(weight
:merge t :type pango:weight)))
+ ("GtkTextMark"
+ :slots
+ ((buffer
+ :allocation :virtual
+ :getter "gtk_text_mark_get_buffer"
+ :reader text-mark-buffer
+ :type text-buffer)
+ (name
+ :allocation :virtual
+ :getter "gtk_text_mark_get_name"
+ :reader text-mark-name
+ :type string)
+ (visible
+ :allocation :virtual
+ :getter "gtk_text_mark_get_visible"
+ :setter "gtk_text_mark_set_visible"
+ :accessor text-mark-visible-p
+ :type boolean)
+ (deleted
+ :allocation :virtual
+ :getter "gtk_text_mark_get_deleted"
+ :reader text-mark-deleted-p
+ :type boolean)
+ (left-gravity
+ :allocation :virtual
+ :getter "gtk_text_mark_get_left_gravity"
+ :reader text-mark-left-gravity-p
+ :type boolean)))
+
("GtkUIManager"
:type ui-manager
:slots
((group
:allocation :virtual
:getter "gtk_radio_button_get_group"
- :reader radio-button-group
+ :reader radio-action-group
:type (copy-of (gslist widget)))
(%value
:allocation :property :pname "value"
(:metaclass boxed-class
;; I am pretty sure this was working in older versons on CMUCL
:size #.(* 14 (size-of 'pointer))))
+
+
+(defclass tooltips-data (struct)
+ ((tooltips
+ :allocation :alien
+ :reader tooltips-data-tooltips
+ :type tooltips)
+ (widget
+ :allocation :alien
+ :reader tooltips-data-widget
+ :type widget)
+ (tip-text
+ :allocation :alien
+ :reader tooltips-data-tip-text
+ :type string)
+ (tip-private
+ :allocation :alien
+ :reader tooltips-data-tip-private
+ :type string))
+ (:metaclass struct-class))