Add GtkTreeModelSort binding
authorDmitry Kalyanov <Kalyanov.Dmitry@gmail.com>
Sat, 17 Oct 2009 14:09:45 +0000 (18:09 +0400)
committerDmitry Kalyanov <Kalyanov.Dmitry@gmail.com>
Sat, 17 Oct 2009 18:51:02 +0000 (22:51 +0400)
api.ods
bugs/issue-39d60c033f5310200786db0a8c3974d754e051de.yaml
gtk/gtk.tree-model.lisp

diff --git a/api.ods b/api.ods
index c7b010e..29911b5 100644 (file)
Binary files a/api.ods and b/api.ods differ
index d174859..c49b4cf 100644 (file)
@@ -5,8 +5,8 @@ type: :task
 component: cl-gtk2
 release: "0.1"
 reporter: Kalyanov Dmitry <Kalyanov.Dmitry@gmail.com>
-status: :unstarted
-disposition: 
+status: :closed
+disposition: :fixed
 creation_time: 2009-10-02 20:56:39.451716 Z
 references: []
 
@@ -16,3 +16,7 @@ log_events:
   - Kalyanov Dmitry <Kalyanov.Dmitry@gmail.com>
   - created
   - ""
+- - 2009-10-17 14:12:00.634767 Z
+  - Kalyanov Dmitry <Kalyanov.Dmitry@gmail.com>
+  - closed with disposition fixed
+  - ""
index f7f628c..82c451f 100644 (file)
   (set-default-sort-func (:void (sortable (g-object tree-sortable)) (func :pointer) (data :pointer) (destroy-notify :pointer)))
   (has-default-sort-func (:boolean (sortable (g-object tree-sortable)))))
 
-; TODO: GtkTreeModelSort
+(defcfun (tree-model-sort-convert-child-path-to-path "gtk_tree_model_sort_convert_child_path_to_path") (g-boxed-foreign tree-path :return)
+  (tree-model-sort (g-object tree-model-sort))
+  (child-path (g-boxed-foreign tree-path)))
+
+(export 'tree-model-sort-conver-child-path-to-path)
+
+(defcfun gtk-tree-model-sort-convert-child-iter-to-iter :boolean
+  (tree-model-sort (g-object tree-model-sort))
+  (sort-iter (g-boxed-foreign tree-iter))
+  (child-iter (g-boxed-foreign tree-iter)))
+
+(defun tree-model-sort-convert-child-iter-to-iter (tree-model-sort child-iter)
+  (let ((sort-iter (make-tree-iter)))
+    (when (gtk-tree-model-sort-convert-child-iter-to-iter tree-model-sort sort-iter child-iter)
+      sort-iter)))
+
+(export 'tree-model-sort-convert-child-iter-to-iter)
+
+(defcfun (tree-model-sort-convert-path-to-child-path "gtk_tree_model_sort_convert_path_to_child_path") (g-boxed-foreign tree-path :return)
+  (tree-model-sort (g-object tree-model-sort))
+  (sort-path (g-boxed-foreign tree-path)))
+
+(export 'tree-model-sort-convert-path-to-child-path)
+
+(defcfun gtk-tree-model-sort-convert-iter-to-child-iter :void
+  (tree-model-sort (g-object tree-model-sort))
+  (child-iter (g-boxed-foreign tree-iter))
+  (sorted-iter (g-boxed-foreign tree-iter)))
+
+(defun tree-model-sort-convert-iter-to-child-iter (tree-model-sort sorted-iter)
+  (let ((child-iter (make-tree-iter)))
+    (gtk-tree-model-sort-convert-iter-to-child-iter tree-model-sort child-iter sorted-iter)
+    child-iter))
+
+(export 'tree-model-sort-convert-iter-to-child-iter)
+
+(defcfun (tree-model-sort-reset-default-sort-func "gtk_tree_model_sort_reset_default_sort_func") :void
+  (tree-model-sort (g-object tree-model-sort)))
+
+(export 'tree-model-sort-reset-default-sort-func)
+
+(defcfun (tree-model-sort-clear-cache "gtk_tree_model_sort_clear_cache") :void
+  (tree-model-sort (g-object tree-model-sort)))
+
+(export 'tree-model-sort-clear-cached)
+
+(defcfun (tree-model-sort-iter-is-valid "gtk_tree_model_sort_iter_is_valid") :boolean
+  (tree-model-sort (g-object tree-model-sort))
+  (iter (g-boxed-foreign tree-iter)))
+
+(export 'tree-model-sort-iter-is-valid)
 
 ; TODO: GtkTreeModelFilter