Add compiler-macro that handles gtype calls with constant args
[cl-gtk2.git] / gtk / gtk.tree-model-filter.lisp
blobe74abee2863f7e31fd4cb831ef31425f367701b4
1 (in-package :gtk)
3 (defcallback gtk-tree-model-filter-visible-func-callback :boolean
4 ((tree-model g-object) (iter (g-boxed-foreign tree-iter)) (data :pointer))
5 (let ((fn (get-stable-pointer-value data)))
6 (restart-case
7 (funcall fn tree-model iter)
8 (return-true () t)
9 (return-false () nil))))
11 (defcfun gtk-tree-model-filter-set-visible-func :void
12 (filter (g-object tree-model-filter))
13 (func :pointer)
14 (data :pointer)
15 (destroy-notify :pointer))
17 (defun tree-model-filter-set-visible-function (tree-model-filter function)
18 (gtk-tree-model-filter-set-visible-func
19 tree-model-filter
20 (callback gtk-tree-model-filter-visible-func-callback)
21 (allocate-stable-pointer function)
22 (callback stable-pointer-free-destroy-notify-callback)))
24 (export 'tree-model-filter-set-visible-function)
28 typedef void (* GtkTreeModelFilterModifyFunc) (GtkTreeModel *model,
29 GtkTreeIter *iter,
30 GValue *value,
31 gint column,
32 gpointer data);
34 void gtk_tree_model_filter_set_modify_func (GtkTreeModelFilter *filter,
35 gint n_columns,
36 GType *types,
37 GtkTreeModelFilterModifyFunc func,
38 gpointer data,
39 GDestroyNotify destroy);
41 void gtk_tree_model_filter_set_visible_column (GtkTreeModelFilter *filter,
42 gint column);
44 /* conversion */
45 gboolean gtk_tree_model_filter_convert_child_iter_to_iter (GtkTreeModelFilter *filter,
46 GtkTreeIter *filter_iter,
47 GtkTreeIter *child_iter);
50 (defcfun gtk-tree-model-filter-convert-iter-to-child-iter :void
51 (filter (g-object tree-model-filter))
52 (child-iter (g-boxed-foreign tree-iter))
53 (filter-iter (g-boxed-foreign tree-iter)))
55 (defun tree-model-filter-convert-iter-to-child-iter (filter iter)
56 (let ((child-iter (make-instance 'tree-iter)))
57 (gtk-tree-model-filter-convert-iter-to-child-iter filter child-iter iter)
58 child-iter))
60 (export 'tree-model-filter-convert-iter-to-child-iter)
63 GtkTreePath *gtk_tree_model_filter_convert_child_path_to_path (GtkTreeModelFilter *filter,
64 GtkTreePath *child_path);
66 GtkTreePath *gtk_tree_model_filter_convert_path_to_child_path (GtkTreeModelFilter *filter,
67 GtkTreePath *filter_path);
70 ;; extras
72 (defcfun gtk-tree-model-filter-refilter :void
73 (filter (g-object tree-model-filter)))
75 (defun tree-model-filter-refilter (filter)
76 (gtk-tree-model-filter-refilter filter))
78 (export 'tree-model-filter-refilter)
80 (defcfun gtk-tree-model-filter-clear-cache :void
81 (filter (g-object tree-model-filter)))
83 (defun tree-model-filter-clear-cache (filter)
84 (gtk-tree-model-filter-clear-cache filter))
86 (export 'tree-model-filter-clear-cache)