X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/clg/blobdiff_plain/aa77651ba00395671cb93c22be674b492129f536..0763f21de5593391d1f1ad25cba9ab49942353ea:/gtk/gtktypes.lisp diff --git a/gtk/gtktypes.lisp b/gtk/gtktypes.lisp index 3e72cad..f73eaf0 100644 --- a/gtk/gtktypes.lisp +++ b/gtk/gtktypes.lisp @@ -15,7 +15,7 @@ ;; 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.22 2004-12-17 00:42:55 espen Exp $ +;; $Id: gtktypes.lisp,v 1.29 2005-01-07 00:28:36 espen Exp $ (in-package "GTK") @@ -126,6 +126,16 @@ (defclass tree-iter (boxed) (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 @@ -139,14 +149,13 @@ (define-types-by-introspection "Gtk" ;; 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 @@ -160,14 +169,12 @@ (define-types-by-introspection "Gtk" :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 @@ -187,7 +194,6 @@ (define-types-by-introspection "Gtk" (settings :allocation :virtual :getter "gtk_widget_get_settings" - :unbound nil :accessor widget-settings :type settings) (child-visible @@ -204,12 +210,22 @@ (define-types-by-introspection "Gtk" ("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" @@ -234,7 +250,14 @@ (define-types-by-introspection "Gtk" :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 @@ -247,14 +270,7 @@ (define-types-by-introspection "Gtk" ("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" @@ -268,13 +284,6 @@ (default-widget :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" @@ -282,25 +291,13 @@ (default-widget :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" @@ -314,8 +311,24 @@ (default-widget :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 @@ -326,31 +339,18 @@ (default-widget :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" @@ -361,10 +361,10 @@ (default-widget (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 @@ -400,14 +400,16 @@ (default-widget :slots ((child1 :allocation :virtual - :getter paned-child1 - :setter (setf paned-child1) + :getter "gtk_paned_get_child1" + :setter "gtk_paned_add1" + :accessor paned-child1 :initarg :child1 :type widget) (child2 :allocation :virtual - :getter paned-child2 - :setter (setf paned-child2) + :getter "gtk_paned_get_child2" + :setter "gtk_paned_add2" + :accessor paned-child2 :initarg :child2 :type widget))) @@ -420,13 +422,6 @@ (default-widget :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" @@ -434,36 +429,100 @@ (default-widget :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 @@ -493,6 +552,16 @@ (default-widget (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 @@ -521,21 +590,46 @@ (default-widget :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 @@ -543,7 +637,12 @@ (default-widget :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 @@ -613,8 +712,18 @@ (default-widget ("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 @@ -630,7 +739,7 @@ (default-widget :setter "gtk_editable_set_position" :reader editable-position :initarg :position - :type int) + :type position) (text :allocation :virtual :getter editable-text @@ -765,6 +874,35 @@ (default-widget (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 @@ -803,7 +941,7 @@ (default-widget ((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" @@ -893,3 +1031,23 @@ (defclass text-iter (boxed) (: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))