chiark / gitweb /
Added selection in list and tree widgets
[clg] / gtk / gtktypes.lisp
index 00dd6f729ba11d3c51c5f19163907983e4a945e3..21517909733b62e58c3a86e4d6e90c21664da91f 100644 (file)
@@ -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.17 2004-11-06 21:39:58 espen Exp $
+;; $Id: gtktypes.lisp,v 1.20 2004-11-21 17:57:56 espen Exp $
 
 
 (in-package "GTK")
@@ -108,13 +108,33 @@ (defclass stock-item (struct)
     :type string))
   (:metaclass static-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"
   ;; Manually defined
   ("GtkObject" :ignore t)
   ("GtkRequisition" :ignore t)
   ("GtkBorder" :ignore t)
-  
+  ("GtkTreeIter" :ignore t)
+  ("GtkTreePath" :ignore t)
 
   ;; Manual override
   ("GtkWidget"
@@ -653,6 +673,52 @@     (default-widget
      :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)))
+
+
      
   ;; Not needed
   ("GtkFundamentalType" :ignore t)
@@ -662,15 +728,20 @@     (default-widget
   ;; 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)
+  ("GtkItemFactory" :ignore t)
   ("GtkText" :ignore-prefix t :except ("GtkTextDirection"))
   ("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)