[gtk-cffi-cvs] CVS gtk-cffi/gtk

CVS User rklochkov rklochkov at common-lisp.net
Sat Dec 15 14:33:12 UTC 2012


Update of /project/gtk-cffi/cvsroot/gtk-cffi/gtk
In directory tiger.common-lisp.net:/tmp/cvs-serv20011/gtk

Modified Files:
	tree-model.lisp tree-selection.lisp tree-view.lisp 
Log Message:
Fixed LICENSE


--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/tree-model.lisp	2012/10/07 12:02:11	1.16
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/tree-model.lisp	2012/12/15 14:33:10	1.17
@@ -45,16 +45,20 @@
 (defmethod translate-to-foreign ((value string) (tree-path tree-path))
   (gtk-tree-path-new-from-string value))
 
+(defmethod translate-to-foreign ((value null) (tree-path tree-path))
+  (null-pointer))
+
+
 (defmethod free-ptr ((tree-path (eql 'tree-path)) ptr)
   (gtk-tree-path-free ptr))
 
-(define-foreign-type cb-tree-path (tree-path)
+(define-foreign-type ptree-path (tree-path)
   ((free-from-foreign :initform nil))
   (:documentation "Tree path for callbacks")
-  (:simple-parser cb-tree-path)
+  (:simple-parser ptree-path)
   (:actual-type :pointer))
 
-(defmethod free-ptr ((tree-path (eql 'cb-tree-path)) ptr)
+(defmethod free-ptr ((tree-path (eql 'ptree-path)) ptr)
   (gtk-tree-path-free ptr))
 
 (defclass tree-row-reference (object)
@@ -126,7 +130,7 @@
 
 (make-foreach tree-model
               (model pobject)
-              (path cb-tree-path) 
+              (path ptree-path) 
               (tree-iter (object tree-iter))
               (data pdata))
 
--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/tree-selection.lisp	2012/10/07 12:02:11	1.4
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/tree-selection.lisp	2012/12/15 14:33:10	1.5
@@ -26,7 +26,7 @@
   
 
 (defcallback cb-tree-selection-func :boolean
-    ((selection pobject) (model pobject) (path cb-tree-path)
+    ((selection pobject) (model pobject) (path ptree-path)
      (path-currently-selected :boolean) (data pdata))
   (funcall data selection model path path-currently-selected))
 
--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/tree-view.lisp	2012/10/07 12:02:11	1.4
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/tree-view.lisp	2012/12/15 14:33:11	1.5
@@ -27,7 +27,9 @@
   hover-selection :boolean
   hover-expand :boolean
   rubber-banding :boolean
-  search-column :int)
+  search-column :int
+  expander-column pobject)
+  
 
 (deffuns tree-view 
   (remove-column :int (column pobject))
@@ -35,8 +37,18 @@
   (insert-column :int (column pobject) (position :int) &key)
   (:get selection pobject)
   (:get columns g-list-object)
-  (:get column pobject (n :int)))
-  
+  (:get column pobject (n :int))
+  (:get n-columns :int)
+  (move-column-after :void (column pobject) (base-column pobject))
+  (scroll-to-point :void (x :int) (y :int)))
+
+(defcfun gtk-tree-view-scroll-to-cell :void 
+  (tree-view pobject) (path ptree-path) (column pobject) (use-align :boolean) (row-align :float) (col-align :float))
+
+(defgeneric scroll-to-cell (tree-view path column &key row-align col-align)
+  (:method ((tree-view tree-view) path column &key (row-align 0.0 row-align-p) (col-align 0.0 col-align-p))
+    (gtk-tree-view-scroll-to-cell tree-view path column (or row-align-p col-align-p) row-align col-align)))
+
 
 (defmethod (setf columns) (columns (tree-view tree-view))
   (dolist (column (columns tree-view))
@@ -75,7 +87,7 @@
       (gtk-tree-view-get-cursor tree-view path column)))
 
 (defcfun gtk-tree-view-insert-column-with-data-func :int
-  (tree-view pobject) (postion :int) (title :string) (cell pobject)
+  (tree-view pobject) (position :int) (title :string) (cell pobject)
   (data-func pfunction) (data pdata) (destroy pfunction))
 
 (defmethod insert-column ((tree-view tree-view) (cell cell-renderer) position 
@@ -83,6 +95,19 @@
   (set-callback tree-view gtk-tree-view-insert-column-with-data-func
                 cb-cell-data-func func data destroy-notify 
                 position title cell))
+
+(defcfun gtk-tree-view-set-column-drag-function :void
+  (tree-view pobject) (func pfunction) (user-data pdata) (destroy pfunction))
+
+(defcallback cb-column-drop-function :boolean
+    ((tree-view pobject) (column pobject) (prev-column pobject) (next-column pobject) (data pdata))
+  (funcall data tree-view column prev-column next-column))
+
+(defgeneric (setf column-drag-function) (func tree-view &key data destroy-notify)
+  (:documentation "gtk_tree_view_set_column_drag_function")
+  (:method (func (tree-view tree-view) &key data destroy-notify)
+    (set-callback tree-view gtk-tree-view-set-column-drag-function
+                  cb-column-drop-function func data destroy-notify)))
                 
 
 (init-slots tree-view (on-select)





More information about the gtk-cffi-cvs mailing list