3 (defcfun gtk-tree-selection-set-select-function
:void
5 (select-function :pointer
)
7 (destroy-notify :pointer
))
9 (defcallback gtk-tree-selection-select-function-callback
:boolean
10 ((selection g-object
) (model g-object
) (path (g-boxed-foreign tree-path
)) (path-currently-selected :boolean
) (data :pointer
))
11 (let ((fn (get-stable-pointer-value data
)))
13 (funcall fn selection model path path-currently-selected
)
15 (return-false () nil
))))
17 (defun tree-selection-set-select-function (tree-selection fn
)
18 (gtk-tree-selection-set-select-function tree-selection
19 (callback gtk-tree-selection-select-function-callback
)
20 (allocate-stable-pointer fn
)
21 (callback stable-pointer-free-destroy-notify-callback
)))
23 (defcfun gtk-tree-selection-get-user-data
:pointer
(tree-selection g-object
))
25 (defun tree-selection-get-select-function (tree-selection)
26 (let ((ptr (gtk-tree-selection-get-user-data tree-selection
)))
27 (unless (null-pointer-p ptr
)
28 (get-stable-pointer-value ptr
))))
30 (defcfun gtk-tree-selection-get-selected
:boolean
33 (iter (g-boxed-foreign tree-iter
)))
35 (defun tree-selection-selected (tree-selection)
36 (let ((iter (make-instance 'tree-iter
)))
37 (when (gtk-tree-selection-get-selected tree-selection
(null-pointer) iter
)
40 (export 'tree-selection-selected
)
42 (defcfun gtk-tree-selection-selected-foreach
:void
47 (defcallback gtk-tree-selection-foreach-callback
:void
48 ((model g-object
) (path (g-boxed-foreign tree-path
)) (iter (g-boxed-foreign tree-iter
)) (data :pointer
))
49 (let ((fn (get-stable-pointer-value data
)))
50 (funcall fn model path iter
)))
52 (defun map-tree-selection-rows (tree-selection fn
)
53 (with-stable-pointer (ptr fn
)
54 (gtk-tree-selection-selected-foreach tree-selection
(callback gtk-tree-selection-foreach-callback
) ptr
)))
56 (export 'map-tree-selection-rows
)
58 (defcfun gtk-tree-selection-get-selected-rows
(glist (g-boxed-foreign tree-path
) :free-from-foreign t
)
62 (defun tree-selection-selected-rows (tree-selection)
63 (gtk-tree-selection-get-selected-rows tree-selection
(null-pointer)))
65 (export 'tree-selection-selected-rows
)
67 (defcfun (tree-selection-count-selected-rows "gtk_tree_selection_count_selected_rows") :int
70 (export 'tree-selection-count-selected-rows
)
72 (defcfun (tree-selection-select-path "gtk_tree_selection_select_path") :void
74 (path (g-boxed-foreign tree-path
)))
76 (export 'tree-selection-select-path
)
78 (defcfun (tree-selection-unselect-path "gtk_tree_selection_unselect_path") :void
80 (path (g-boxed-foreign tree-path
)))
82 (export 'tree-selection-unselect-path
)
84 (defcfun (tree-selection-path-selected-p "gtk_tree_selection_path_is_selected") :boolean
86 (path (g-boxed-foreign tree-path
)))
88 (export 'tree-selection-path-selected-p
)
90 (defcfun (tree-selection-select-iter "gtk_tree_selection_select_iter") :void
92 (iter (g-boxed-foreign tree-iter
)))
94 (export 'tree-selection-select-iter
)
96 (defcfun (tree-selection-unselect-iter "gtk_tree_selection_unselect_iter") :void
98 (iter (g-boxed-foreign tree-iter
)))
100 (export 'tree-selection-unselect-iter
)
102 (defcfun (tree-selection-iter-selected-p "gtk_tree_selection_iter_is_selected") :boolean
104 (iter (g-boxed-foreign tree-iter
)))
106 (export 'tree-selection-iter-selected-p
)
108 (defcfun (tree-selection-select-all "gtk_tree_selection_select_all") :void
109 (selection g-object
))
111 (export 'tree-selection-select-all
)
113 (defcfun (tree-selection-unselect-all "gtk_tree_selection_unselect_all") :void
114 (selection g-object
))
116 (export 'tree-selection-unselect-all
)
118 (defcfun (tree-selection-select-range "gtk_tree_selection_select_range") :void
120 (start-path (g-boxed-foreign tree-path
))
121 (end-path (g-boxed-foreign tree-path
)))
123 (export 'tree-selection-select-range
)
125 (defcfun (tree-selection-unselect-range "gtk_tree_selection_unselect_range") :void
127 (start-path (g-boxed-foreign tree-path
))
128 (end-path (g-boxed-foreign tree-path
)))
130 (export 'tree-selection-unselect-range
)