chiark / gitweb /
Added optional weak-p arg to reader functions
[clg] / gtk / gtktree.lisp
index 0ff7341fb7be685f27a5816258ac05eadfe26443..7abcc9c3b40c8879dc39b8b0adfba9bf22c46c87 100644 (file)
@@ -20,7 +20,7 @@
 ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-;; $Id: gtktree.lisp,v 1.10 2005-04-23 16:48:52 espen Exp $
+;; $Id: gtktree.lisp,v 1.12 2006-02-06 18:13:13 espen Exp $
 
 
 (in-package "GTK")
@@ -276,7 +276,8 @@ (defmethod writer-function ((type (eql 'tree-path)) &rest args)
 (defmethod reader-function ((type (eql 'tree-path)) &rest args)
   (declare (ignore type args))
   (let ((reader (reader-function 'pointer)))
-    #'(lambda (location &optional (offset 0))
+    #'(lambda (location &optional (offset 0) weak-p)
+       (declare (ignore weak-p))
        (%tree-path-to-vector (funcall reader location offset)))))
 
 (defmethod destroy-function ((type (eql 'tree-path)) &rest args)
@@ -957,3 +958,65 @@   (defbinding %icon-view-set-pixbuf-column (column icon-view) nil
     ((if (integerp column) 
         column 
        (column-index (icon-view-model icon-view) column)) int)))
+
+#+gtk2.8
+(progn
+  (defbinding icon-view-get-item-at-pos () boolean
+    (icon-view icon-view)
+    (x int)
+    (y int)
+    (tree-path tree-path :out)
+    (cell cell-renderer :out))
+
+  (defbinding icon-view-set-cursor (icon-view path &key cell start-editing) nil
+    (icon-view icon-view)
+    (path tree-path)
+    (cell (or null cell-renderer))
+    (start-editing boolean))
+  
+  (defbinding icon-view-get-cursor () boolean
+    (icon-view icon-view)
+    (path tree-path :out)
+    (cell cell-renderer :out))
+
+  (defbinding icon-view-get-dest-item-at-pos () boolean
+    (icon-view icon-view)
+    (drag-x int)
+    (drag-y int)
+    (tree-path tree-path :out)
+    (pos drop-position :out))
+
+  (defbinding icon-view-create-drag-icon () gdk:pixmap
+    (icon-view icon-view)
+    (tree-path tree-path))
+
+  (defbinding icon-view-scroll-to-path (icon-view tree-path &key row-align column-align) nil
+    (icon-view icon-view)
+    (tree-path tree-path)
+    ((or row-align column-align) boolean)
+    (row-align single-float)
+    (column-align single-float))
+
+  (defbinding icon-view-get-visible-range () boolean
+    (icon-view icon-view)
+    (start-path tree-path :out)
+    (end-path tree-path :out))
+
+;;   (defbinding icon-view-enable-model-drag-source () nil
+;;     (icon-view icon-view)
+;;     (start-button-mask gdk:modifier-type)
+;;     (targets (vector target-entry))
+;;     ((length targets) unsigned-int)
+;;     (actions gdk:drag-action))
+
+;;   (defbinding icon-view-enable-model-drag-dest () nil
+;;     (icon-view icon-view)
+;;     (targets (vector target-entry))
+;;     ((length targets) unsigned-int)
+;;     (actions gdk:drag-action))
+
+  (defbinding icon-view-unset-model-drag-source () nil
+    (icon-view icon-view))
+
+  (defbinding icon-view-unset-model-drag-dest () nil
+    (icon-view icon-view)))