3 (defcfun (tree-view-columns-autosize "gtk_tree_view_columns_autosize") :void
6 (export 'tree-view-columns-autosize
)
8 (defcfun (tree-view-append-column "gtk_tree_view_append_column") :int
9 (tree-view (g-object gtk
:tree-view
))
10 (column (g-object gtk
:tree-view-column
)))
12 (export 'tree-view-append-column
)
14 (defcfun (tree-view-remove-column "gtk_tree_view_remove_column") :int
15 (tree-view (g-object gtk
:tree-view
))
16 (column (g-object gtk
:tree-view-column
)))
18 (export 'tree-view-remove-column
)
20 (defcfun (tree-view-insert-column "gtk_tree_view_insert_column") :int
25 (export 'tree-view-insert-column
)
27 (defcfun (tree-view-get-column "gtk_tree_view_get_column") g-object
31 (export 'tree-view-get-column
)
33 (defcfun (tree-view-columns "gtk_tree_view_get_columns") (glist g-object
)
36 (export 'tree-view-columns
)
38 (defcfun (tree-view-move-column-after "gtk_tree_view_move_column_after") :void
41 (base-column g-object
))
43 (export 'tree-view-move-column-after
)
45 (defcallback gtk-tree-view-column-drop-func-callback
:boolean
46 ((tree-view g-object
) (column g-object
) (prev-column g-object
) (next-column g-object
) (data :pointer
))
47 (let ((fn (get-stable-pointer-value data
)))
48 (funcall fn tree-view column prev-column next-column
)))
50 (defcfun gtk-tree-view-set-column-drag-function
:void
54 (destroy-notify :pointer
))
56 (defun tree-view-set-column-drag-fuction (tree-view function
)
57 (gtk-tree-view-set-column-drag-function tree-view
58 (callback gtk-tree-view-column-drop-func-callback
)
59 (allocate-stable-pointer function
)
60 (callback stable-pointer-free-destroy-notify-callback
)))
62 (defcfun (tree-view-scroll-to-point "gtk_tree_view_scroll_to_point") :void
67 (export 'tree-view-scroll-to-point
)
69 (defcfun gtk-tree-view-scroll-to-cell
:void
71 (path (g-boxed-foreign tree-path
))
77 (defun tree-view-scroll-to-cell (tree-view path column
&optional
(row-align 0.5 row-align-supplied-p
) (col-align 0.5 col-align-supplied-p
))
78 (gtk-tree-view-scroll-to-cell tree-view path column
(or row-align-supplied-p col-align-supplied-p
) row-align col-align
))
80 (export 'tree-view-scroll-to-cell
)
82 (defcfun gtk-tree-view-set-cursor
:void
84 (path (g-boxed-foreign tree-path
))
85 (focus-column g-object
)
86 (start-editing :boolean
))
88 (defun tree-view-set-cursor (tree-view path
&key focus-column start-editing
)
89 (gtk-tree-view-set-cursor tree-view path focus-column start-editing
))
91 (export 'tree-view-set-cursor
)
93 (defcfun gtk-tree-view-set-cursor-on-cell
:void
95 (path (g-boxed-foreign tree-path
))
96 (focus-column g-object
)
98 (start-editing :boolean
))
100 (defun tree-view-set-cursor-on-cell (tree-view path
&key focus-column focus-cell start-editing
)
101 (gtk-tree-view-set-cursor-on-cell tree-view path focus-column focus-cell start-editing
))
103 (export 'tree-view-set-cursor-on-cell
)
105 (defcfun gtk-tree-view-get-cursor
:void
108 (focus-column :pointer
))
110 (defun tree-view-get-cursor (tree-view)
111 (with-foreign-objects ((path :pointer
) (focus-column :pointer
))
112 (gtk-tree-view-get-cursor tree-view path focus-column
)
113 (values (mem-ref path
'(g-boxed-foreign tree-path
:return
))
114 (mem-ref focus-column
'g-object
))))
116 (export 'tree-view-get-cursor
)
118 (defcfun (tree-view-expand-all "gtk_tree_view_expand_all") :void
119 (tree-view g-object
))
121 (export 'tree-view-expand-all
)
123 (defcfun (tree-view-collapse-all "gtk_tree_view_collapse_all") :void
124 (tree-view g-object
))
126 (export 'tree-view-collapse-all
)
128 (defcfun (tree-view-expand-to-path "gtk_tree_view_expand_to_path") :void
130 (path (g-boxed-foreign tree-path
)))
132 (export 'tree-view-expand-to-path
)
134 (defcfun (tree-view-expand-row "gtk_tree_view_expand_row") :boolean
136 (path (g-boxed-foreign tree-path
)))
138 (export 'tree-view-expand-row
)
140 (defcfun (tree-view-collapse-row "gtk_tree_view_collapse_row") :boolean
142 (path (g-boxed-foreign tree-path
)))
144 (export 'tree-view-collapse-row
)
146 (defcallback gtk-tree-view-mapping-func-callback
:void
147 ((tree-view g-object
) (path (g-boxed-foreign tree-path
)) (data :pointer
))
148 (funcall (get-stable-pointer-value data
)
151 (defcfun gtk-tree-view-map-expanded-rows
:void
156 (defun tree-view-map-expanded-rows (tree-view function
)
157 (with-stable-pointer (ptr function
)
158 (gtk-tree-view-map-expanded-rows tree-view
(callback gtk-tree-view-mapping-func-callback
) ptr
)))
160 (export 'tree-view-map-expanded-rows
)
162 (defcfun (tree-view-row-expanded-p "gtk_tree_view_row_expanded") :boolean
164 (path (g-boxed-foreign tree-path
)))
166 (export 'tree-view-row-expanded-p
)
168 (defcfun gtk-tree-view-get-path-at-pos
:boolean
177 (defun tree-view-get-path-at-pos (tree-view x y
)
178 (with-foreign-objects ((path :pointer
) (column :pointer
) (cell-x :int
) (cell-y :int
))
179 (when (gtk-tree-view-get-path-at-pos tree-view x y path column cell-x cell-y
)
180 (values (mem-ref path
'(g-boxed-foreign tree-path
:return
))
181 (mem-ref column
'g-object
)
182 (mem-ref cell-x
:int
)
183 (mem-ref cell-y
:int
)))))
185 (export 'tree-view-get-path-at-pos
)
187 (defcfun gtk-tree-view-get-cell-area
:void
189 (path (g-boxed-foreign tree-path
))
191 (rectangle (g-boxed-foreign rectangle
)))
193 (defun tree-view-get-cell-area (tree-view path column
)
194 (let ((rect (make-rectangle :x
0 :y
0 :width
0 :height
0)))
195 (gtk-tree-view-get-cell-area tree-view path column rect
)
198 (export 'tree-view-get-cell-area
)
200 (defcfun gtk-tree-view-get-background-area
:void
202 (path (g-boxed-foreign tree-path
))
204 (rectangle (g-boxed-foreign rectangle
)))
206 (defun tree-view-get-background-area (tree-view path column
)
207 (let ((rect (make-rectangle :x
0 :y
0 :width
0 :height
0)))
208 (gtk-tree-view-get-background-area tree-view path column rect
)
211 (export 'tree-view-get-background-area
)
213 (defcfun gtk-tree-view-get-visible-rect
:void
215 (rectangle (g-boxed-foreign rectangle
)))
217 (defun tree-view-get-visible-rect (tree-view)
218 (let ((rect (make-rectangle :x
0 :y
0 :width
0 :height
0)))
219 (gtk-tree-view-get-visible-rect tree-view rect
)
222 (export 'tree-view-get-visible-rect
)
224 (defcfun gtk-tree-view-get-visible-range
:boolean
226 (start-path :pointer
)
229 (defun tree-view-get-visible-range (tree-view)
230 (with-foreign-objects ((start-path :pointer
) (end-path :pointer
))
231 (when (gtk-tree-view-get-visible-range tree-view start-path end-path
)
232 (values (mem-ref start-path
'(g-boxed-foreign tree-path
:return
))
233 (mem-ref end-path
'(g-boxed-foreign tree-path
:return
))))))
235 (export 'tree-view-get-visible-range
)
237 (defcfun gtk-tree-view-convert-bin-window-to-tree-coords
:void
244 (defun tree-view-convert-bin-window-to-tree-coords (tree-view x y
)
245 (with-foreign-objects ((rx :int
) (ry :int
))
246 (gtk-tree-view-convert-bin-window-to-tree-coords tree-view x y rx ry
)
247 (values (mem-ref rx
:int
)
250 (export 'tree-view-convert-bin-window-to-tree-coords
)
252 (defcfun gtk-tree-view-convert-bin-window-to-widget-coords
:void
259 (defun tree-view-convert-bin-window-to-widget-coords (tree-view x y
)
260 (with-foreign-objects ((rx :int
) (ry :int
))
261 (gtk-tree-view-convert-bin-window-to-widget-coords tree-view x y rx ry
)
262 (values (mem-ref rx
:int
)
265 (export 'tree-view-convert-bin-window-to-widget-coords
)
267 (defcfun gtk-tree-view-convert-tree-to-bin-window-coords
:void
274 (defun tree-view-convert-tree-to-bin-window-coords (tree-view x y
)
275 (with-foreign-objects ((rx :int
) (ry :int
))
276 (gtk-tree-view-convert-tree-to-bin-window-coords tree-view x y rx ry
)
277 (values (mem-ref rx
:int
)
280 (export 'tree-view-convert-tree-to-bin-window-coords
)
282 (defcfun gtk-tree-view-convert-tree-to-widget-coords
:void
289 (defun tree-view-convert-tree-to-widget-coords (tree-view x y
)
290 (with-foreign-objects ((rx :int
) (ry :int
))
291 (gtk-tree-view-convert-tree-to-widget-coords tree-view x y rx ry
)
292 (values (mem-ref rx
:int
)
295 (export 'tree-view-convert-tree-to-widget-coords
)
297 (defcfun gtk-tree-view-convert-widget-to-bin-window-coords
:void
304 (defun tree-view-convert-widget-to-bin-window-coords (tree-view x y
)
305 (with-foreign-objects ((rx :int
) (ry :int
))
306 (gtk-tree-view-convert-widget-to-bin-window-coords tree-view x y rx ry
)
307 (values (mem-ref rx
:int
)
310 (export 'tree-view-convert-widget-to-bin-window-coords
)
312 (defcfun gtk-tree-view-convert-widget-to-tree-coords
:void
319 (defun tree-view-convert-widget-to-tree-coords (tree-view x y
)
320 (with-foreign-objects ((rx :int
) (ry :int
))
321 (gtk-tree-view-convert-widget-to-tree-coords tree-view x y rx ry
)
322 (values (mem-ref rx
:int
)
325 (export 'tree-view-convert-widget-to-tree-coords
)
327 (defcfun gtk-tree-view-enable-model-drag-dest
:void
328 (tree-view (g-object tree-view
))
331 (actions gdk-drag-action
))
333 (defun tree-view-enable-model-drag-dest (tree-view targets actions
)
334 (with-foreign-boxed-array (n-targets targets-ptr target-entry targets
)
335 (gtk-tree-view-enable-model-drag-dest tree-view targets-ptr n-targets actions
)))
337 (export 'tree-view-enable-model-drag-dest
)
339 (defcfun gtk-tree-view-enable-model-drag-source
:void
340 (tree-view (g-object tree-view
))
341 (start-button-mask modifier-type
)
344 (actions gdk-drag-action
))
346 (defun tree-view-enable-model-drag-source (tree-view start-button-mask targets actions
)
347 (with-foreign-boxed-array (n-targets targets-ptr target-entry targets
)
348 (gtk-tree-view-enable-model-drag-source tree-view start-button-mask targets-ptr n-targets actions
)))
350 (export 'tree-view-enable-model-drag-source
)
352 ; TODO: gtk_tree_view_unset_rows_drag_source
354 ; TODO: gtk_tree_view_unset_rows_drag_dest
356 ; TOOD: gtk_tree_view_set_drag_dest_row
358 ; TOOD: gtk_tree_view_get_drag_dest_row
360 (defcfun gtk-tree-view-get-dest-row-at-pos
:boolean
361 (tree_view (g-object tree-view
))
367 (defun tree-view-get-dest-row-at-pos (tree-view x y
)
368 (with-foreign-objects ((path :pointer
) (pos :int
))
369 (when (gtk-tree-view-get-dest-row-at-pos tree-view x y path pos
)
370 (values (mem-ref path
'(g-boxed-foreign tree-path
:return
))
371 (mem-ref pos
'tree-view-drop-position
)))))
373 (export 'tree-view-get-dest-row-at-pos
)
375 ; TOOD: gtk_tree_view_create_drag_icon
377 (defcallback gtk-tree-view-search-equal-func-callback
:boolean
378 ((model g-object
) (column :int
) (key (:string
:free-from-foreign nil
)) (iter (g-boxed-foreign tree-iter
)) (data :pointer
))
380 (funcall (get-stable-pointer-value data
)
381 model column key iter
)
383 (return-false () t
)))
385 (defcfun gtk-tree-view-set-search-equal-func
:void
389 (destroy-notify :pointer
))
391 (defun tree-view-set-search-equal-func (tree-view func
)
392 (gtk-tree-view-set-search-equal-func tree-view
393 (callback gtk-tree-view-search-equal-func-callback
)
394 (allocate-stable-pointer func
)
395 (callback stable-pointer-free-destroy-notify-callback
)))
397 (defcallback gtk-tree-view-search-position-func
:void
398 ((tree-view g-object
) (search-dialog g-object
) (data :pointer
))
400 (funcall (get-stable-pointer-value data
)
405 (defcfun gtk-tree-view-set-search-position-func
:void
409 (destroy-notify :pointer
))
411 (defun tree-view-set-search-position-func (tree-view func
)
413 (gtk-tree-view-set-search-position-func tree-view
414 (callback gtk-tree-view-set-search-position-func
)
415 (allocate-stable-pointer func
)
416 (callback stable-pointer-free-destroy-notify-callback
))
417 (gtk-tree-view-set-search-position-func tree-view
422 ; TODO: gtk_tree_view_set_destroy_count_func
424 (defcallback gtk-tree-view-row-separator-func-callback
:boolean
425 ((tree-model g-object
) (iter (g-boxed-foreign tree-iter
)) (data :pointer
))
427 (funcall (get-stable-pointer-value data
)
431 (return-false () nil
)))
433 (defcfun gtk-tree-view-set-row-separator-func
:void
437 (destroy-notify :pointer
))
439 (defun tree-view-set-row-separartor-func (tree-view func
)
441 (gtk-tree-view-set-row-separator-func tree-view
442 (callback gtk-tree-view-row-separator-func-callback
)
443 (allocate-stable-pointer func
)
444 (callback stable-pointer-free-destroy-notify-callback
))
445 (gtk-tree-view-set-row-separator-func tree-view
(null-pointer) (null-pointer) (null-pointer))))
447 (defcfun (tree-view-rubber-banding-active "gtk_tree_view_is_rubber_banding_active") :boolean
448 (tree-view g-object
))
450 (export 'tree-view-rubber-banding-active
)
452 (defcfun (tree-view-set-tooltip-row "gtk_tree_view_set_tooltip_row") :void
455 (tree-path (g-boxed-foreign tree-path
)))
457 (export 'tree-view-set-tooltip-row
)
459 (defcfun (tree-view-set-tooltip-cell "gtk_tree_view_set_tooltip_cell") :void
462 (path (g-boxed-foreign tree-path
))
466 (export 'tree-view-set-tooltip-cell
)
468 (defcfun gtk-tree-view-get-tooltip-context
:boolean
472 (keyboard-tip :boolean
)
477 (defun tree-view-get-tooltip-context (tree-view)
478 (with-foreign-objects ((x :int
) (y :int
) (keyboard-tip :boolean
) (model :pointer
) (path :pointer
) (iter :pointer
))
479 (when (gtk-tree-view-get-tooltip-context tree-view x y keyboard-tip model path iter
)
480 (values (mem-ref x
:int
)
482 (mem-ref keyboard-tip
:boolean
)
483 (mem-ref model
'g-object
)
484 (mem-ref path
'(g-boxed-foreign tree-path
:return
))
485 (mem-ref iter
'(g-boxed-foreign tree-iter
:return
))))))
487 (export 'tree-view-get-tooltip-context
)
489 ; TODO: GtkTreeView drag-and-drop
491 (defcfun gtk-cell-view-get-size-of-row
:boolean
492 (cell-view (g-object cell-view
))
493 (path (g-boxed-foreign tree-path
))
494 (requisition (g-boxed-foreign requisition
)))
496 (defun cell-view-get-size-of-row (cell-view path
)
497 (let ((requisition (make-requisition)))
498 (gtk-cell-view-get-size-of-row cell-view path requisition
)
501 (export 'cell-view-get-size-of-row
)