From: Dmitry Kalyanov Date: Sat, 17 Oct 2009 14:09:45 +0000 (+0400) Subject: Add GtkTreeModelSort binding X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=c835ef9debfd6b8309af81521dcad2483fa07078;p=cl-gtk2.git Add GtkTreeModelSort binding --- diff --git a/api.ods b/api.ods index c7b010e..29911b5 100644 Binary files a/api.ods and b/api.ods differ diff --git a/bugs/issue-39d60c033f5310200786db0a8c3974d754e051de.yaml b/bugs/issue-39d60c033f5310200786db0a8c3974d754e051de.yaml index d174859..c49b4cf 100644 --- a/bugs/issue-39d60c033f5310200786db0a8c3974d754e051de.yaml +++ b/bugs/issue-39d60c033f5310200786db0a8c3974d754e051de.yaml @@ -5,8 +5,8 @@ type: :task component: cl-gtk2 release: "0.1" reporter: Kalyanov Dmitry -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 - created - "" +- - 2009-10-17 14:12:00.634767 Z + - Kalyanov Dmitry + - closed with disposition fixed + - "" diff --git a/gtk/gtk.tree-model.lisp b/gtk/gtk.tree-model.lisp index f7f628c..82c451f 100644 --- a/gtk/gtk.tree-model.lisp +++ b/gtk/gtk.tree-model.lisp @@ -80,7 +80,57 @@ (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