X-Git-Url: https://git.distorted.org.uk/~mdw/clg/blobdiff_plain/1047e159d403df191a35ed684e3c80517fbf3807..56329445651cf966f3955c87e2f1548951541435:/gtk/gtktypes.lisp diff --git a/gtk/gtktypes.lisp b/gtk/gtktypes.lisp index 4b09c9a..3e72cad 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.16 2004-10-31 12:05:52 espen Exp $ +;; $Id: gtktypes.lisp,v 1.22 2004-12-17 00:42:55 espen Exp $ (in-package "GTK") @@ -55,7 +55,7 @@ :accessor allocation-height :initarg :height :type int)) - (:metaclass proxy-class)) + (:metaclass struct-class)) (defclass border (boxed) ((left @@ -106,7 +106,25 @@ :accessor stock-item-translation-domain :initarg :translation-domain :type string)) - (:metaclass proxy-class)) + (:metaclass struct-class)) + +;; We don't really need to access any of these slots, but we need to +;; specify the size of the struct somehow +(defclass tree-iter (boxed) + ((stamp :allocation :alien :type int) + (user-data :allocation :alien :type pointer) + (user-data2 :allocation :alien :type pointer) + (user-data3 :allocation :alien :type pointer)) + (:metaclass boxed-class)) + + +;; (defclass tree-path (boxed) +;; ((depth :allocation :alien :type int) +;; (indices :allocation :alien :type pointer)) +;; (:metaclass boxed-class)) + +(deftype tree-path () '(vector integer)) +(register-type 'tree-path "GtkTreePath") (define-types-by-introspection "Gtk" @@ -114,7 +132,9 @@ ("GtkObject" :ignore t) ("GtkRequisition" :ignore t) ("GtkBorder" :ignore t) - + ("GtkTreeIter" :ignore t) + ("GtkTreePath" :ignore t) +; ("GtkStyle" :ignore t) ;; Manual override ("GtkWidget" @@ -123,15 +143,10 @@ :allocation :instance :accessor widget-child-slots :type container-child) - (parent-window - :allocation :virtual - :getter "gtk_widget_get_parent_window" - :setter "gtk_widget_set_parent_window" - :accessor widget-parent-window - :type gdk:window) (window :allocation :virtual :getter "gtk_widget_get_window" + :unbound nil :reader widget-window :type gdk:window) (state @@ -145,12 +160,14 @@ :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 @@ -170,6 +187,7 @@ (settings :allocation :virtual :getter "gtk_widget_get_settings" + :unbound nil :accessor widget-settings :type settings) (child-visible @@ -178,7 +196,11 @@ :setter "gtk_widget_set_child_visible" :accessor widget-child-visible-p :initarg :child-visible - :type boolean))) + :type boolean) + (width-request + :merge t :unbound -1) + (height-request + :merge t :unbound -1))) ("GtkContainer" :slots @@ -513,7 +535,7 @@ :allocation :virtual :getter "gtk_radio_button_get_group" :reader radio-button-group - :type (static (gslist widget))))) + :type (copy-of (gslist widget))))) ("GtkRadioMenuItem" :slots @@ -593,7 +615,6 @@ :slots ((file :ignore t))) - ;; Interfaces ("GtkEditable" :slots ((editable @@ -653,7 +674,145 @@ :initarg :current-folder-uri :type string))) - + ("GtkTreeView" + :slots + ((columns + :allocation :virtual + :getter "gtk_tree_view_get_columns" + :reader tree-view-columns + :type (glist tree-view-column)) + (selection + :allocation :virtual + :getter "gtk_tree_view_get_selection" + :reader tree-view-selection + :type tree-selection))) + + ("GtkTreeModel" + :slots + ((n-columns + :allocation :virtual + :getter "gtk_tree_model_get_n_columns" + :reader tree-model-n-columns + :type int))) + + ("GtkTreeSelection" + :slots + ((mode + :allocation :virtual + :getter "gtk_tree_selection_get_mode" + :setter "gtk_tree_selection_set_mode" + :accessor tree-selection-mode + :initarg :mode + :type selection-mode) + (tree-view + :allocation :virtual + :getter "gtk_tree_selection_get_mode" + :reader tree-selection-mode + :type tree-view))) + + ("GtkComboBox" + :slots + ((active-iter + :allocation :virtual + :getter "gtk_combo_box_get_active_iter" + :setter "gtk_combo_box_set_active_iter" + :accessor combo-box-active-iter + :type tree-iter))) + + ("GtkTextBuffer" + :slots + ((line-count + :allocation :virtual + :getter "gtk_text_buffer_get_line_count" + :reader text-buffer-line-count + :type int) + (char-count + :allocation :virtual + :getter "gtk_text_buffer_get_char_count" + :reader text-buffer-char-count + :type int) + (modified + :allocation :virtual + :getter "gtk_text_buffer_get_modified" + :setter "gtk_text_buffer_set_modified" + :accessor text-buffer-modifed-p + :type boolean))) + + ("GtkTextView" + :slots + ((default-attributes + :allocation :virtual + :getter "gtk_text_view_get_default_attributes" + :reader text-view-default-attributes + :type text-attributes))) + + ("GtkTextTagTable" + :slots + ((size + :allocation :virtual + :getter "gtk_text_tag_table_get_size" + :reader text-tag-table-size + :type int))) + + ("GtkTextTag" + :slots + ((priority + :allocation :virtual + :getter "gtk_text_tag_get_priority" + :setter "gtk_text_tag_set_priority" + :accessor text-tag-priority + :type int) + (weight + :merge t :type pango:weight))) + + ("GtkUIManager" + :type ui-manager + :slots + ((action-groups + :allocation :virtual + :getter "gtk_ui_manager_get_action_groups" + :reader ui-manager-action-groups + :type (copy-of (glist action-group))) + (accel-group + :allocation :virtual + :getter "gtk_ui_manager_get_accel_group" + :reader ui-manager-accel-group + :type accel-group))) + + ("GtkUIManagerItemType" + :type ui-manager-item-type) + + ("GtkToggle" + :slots + ((accelerator + :allocation :virtual + :getter action-accelerator))) + + ("GtkToggleAction" + :slots + ((active + :allocation :virtual + :getter "gtk_toggle_action_get_active" + :setter "gtk_toggle_action_set_active" + :initarg :active + :accessor toggle-action-active-p + :type boolean))) + + ("GtkRadioAction" + :slots + ((group + :allocation :virtual + :getter "gtk_radio_button_get_group" + :reader radio-button-group + :type (copy-of (gslist widget))) + (%value + :allocation :property :pname "value" + :readable nil :type int) + (value + :allocation :virtual + :getter radio-action-value))) + + ;; Not needed ("GtkFundamentalType" :ignore t) ("GtkArgFlags" :ignore t) @@ -662,15 +821,20 @@ ;; Deprecated widgets ("GtkCList" :ignore-prefix t) ("GtkCTree" :ignore-prefix t) - ("GtkList" :ignore-prefix t) + ("GtkList" :ignore t) + ("GtkListItem" :ignore t) ("GtkTree" :ignore t) ("GtkTreeItem" :ignore t) - ("GtkText" :ignore-prefix t :except ("GtkTextDirection")) + ("GtkItemFactory" :ignore t) + ("GtkText" :ignore t) ("GtkPacker" :ignore-prefix t) ("GtkPixmap" :ignore t) ("GtkPreview" :ignore-prefix t) + ("GtkProgres" :ignore t) ("GtkTipsQuery" :ignore t) ("GtkOldEditable" :ignore t) + ("GtkCombo" :ignore t) + ("GtkOptionMenu" :ignore t) ;; What are these? ("GtkFileSystemModule" :ignore t) @@ -678,3 +842,54 @@ ("GtkThemeEngine" :ignore t) ) + + +(defclass text-iter (boxed) + ((buffer + :allocation :virtual + :getter "gtk_text_iter_get_buffer" + :reader text-iter-buffer + :type text-buffer) + (offset + :allocation :virtual + :getter "gtk_text_iter_get_offset" + :setter "gtk_text_iter_set_offset" + :accessor text-iter-offset + :type int) + (line + :allocation :virtual + :getter "gtk_text_iter_get_line" + :setter "gtk_text_iter_set_line" + :accessor text-iter-line + :type int) + (line-offset + :allocation :virtual + :getter "gtk_text_iter_get_line_offset" + :setter "gtk_text_iter_set_line_offset" + :accessor text-iter-line-offset + :type int) + (line-index + :allocation :virtual + :getter "gtk_text_iter_get_line_index" + :setter "gtk_text_iter_set_line_index" + :accessor text-iter-line-index + :type int) + (visible-line-index + :allocation :virtual + :getter "gtk_text_iter_get_visible_line_index" + :setter "gtk_text_iter_set_visible_line_index" + :accessor text-iter-visible-line-index + :type int) + (visible-line-offset + :allocation :virtual + :getter "gtk_text_iter_get_visible_line_offset" + :setter "gtk_text_iter_set_visible_line_offset" + :accessor text-iter-visible-line-offset + :type int) + ;; Workaround to get correct size + (dummy14 + :allocation :alien :offset #.(* 13 (size-of 'pointer)) + :type pointer)) + (:metaclass boxed-class + ;; I am pretty sure this was working in older versons on CMUCL + :size #.(* 14 (size-of 'pointer))))