3 (defcfun (icon-view-get-path-at-pos "gtk_icon_view_get_path_at_pos") (g-boxed-foreign tree-path
:return
)
8 (export 'icon-view-get-path-at-pos
)
10 (defcfun gtk-icon-view-get-item-at-pos
:boolean
17 (defun icon-view-get-item-at-pos (icon-view x y
)
18 (with-foreign-objects ((path :pointer
) (cell :pointer
))
19 (when (gtk-icon-view-get-item-at-pos icon-view x y path cell
)
20 (values (mem-ref path
'(g-boxed-foreign tree-path
:return
))
21 (mem-ref cell
'g-object
)))))
23 (export 'icon-view-get-item-at-pos
)
25 (defcfun gtk-icon-view-convert-widget-to-bin-window-coords
:void
32 (defun icon-view-convert-widget-to-bin-window-coords (icon-view x y
)
33 (with-foreign-objects ((rx :int
) (ry :int
))
34 (gtk-icon-view-convert-widget-to-bin-window-coords icon-view x y rx ry
)
35 (values (mem-ref rx
:int
)
38 (export 'icon-view-conver-widget-to-bin-window-coords
)
40 (defcfun (icon-view-set-cursor "gtk_icon_view_set_cursor") :void
42 (path (g-boxed-foreign tree-path
))
44 (start-editing :boolean
))
46 (export 'icon-view-set-cursor
)
48 (defcfun gtk-icon-view-get-cursor
:boolean
53 (defun icon-view-get-cursor (icon-view)
54 (with-foreign-objects ((path :pointer
) (cell :pointer
))
55 (when (gtk-icon-view-get-cursor icon-view path cell
)
56 (values (mem-ref path
'(g-boxed-foreign tree-path
:return
))
57 (mem-ref cell
'g-object
)))))
59 (export 'icon-view-get-cursor
)
61 (defcallback gtk-icon-view-foreach-func-callback
:void
62 ((icon-view g-object
) (path (g-boxed-foreign tree-path
)) (data :pointer
))
64 (funcall (get-stable-pointer-value data
)
69 (defcfun gtk-icon-view-selected-foreach
:void
74 (defun map-icon-view-selected (icon-view func
)
75 (with-stable-pointer (ptr func
)
76 (gtk-icon-view-selected-foreach icon-view
77 (callback gtk-icon-view-foreach-func-callback
)
80 (export 'map-icon-view-selected
)
82 (defcfun (icon-view-select-path "gtk_icon_view_select_path") :void
84 (path (g-boxed-foreign tree-path
)))
86 (export 'icon-view-select-path
)
88 (defcfun (icon-view-unselect-path "gtk_icon_view_unselect_path") :void
90 (path (g-boxed-foreign tree-path
)))
92 (export 'icon-view-unselect-path
)
94 (defcfun (icon-view-path-selected-p "gtk_icon_view_path_is_selected") :boolean
96 (path (g-boxed-foreign tree-path
)))
98 (export 'icon-view-path-selected-p
)
100 (defcfun (icon-view-selected-items "gtk_icon_view_get_selected_items") (glist (g-boxed-foreign tree-path
) :free-from-foreign t
)
101 (icon-view g-object
))
103 (export 'icon-view-selected-items
)
105 (defcfun (icon-view-select-all "gtk_icon_view_select_all") :void
106 (icon-view g-object
))
108 (export 'icon-view-select-all
)
110 (defcfun (icon-view-unselect-all "gtk_icon_view_unselect_all") :void
111 (icon-view g-object
))
113 (export 'icon-view-unselect-all
)
115 (defcfun gtk-icon-view-scroll-to-path
:void
117 (path (g-boxed-foreign tree-path
))
122 (defun icon-view-scroll-to-path (icon-view path
&key
(row-align 0.5 row-align-supplied-p
) (col-align 0.5 col-align-supplied-p
))
123 (gtk-icon-view-scroll-to-path icon-view path
(or row-align-supplied-p col-align-supplied-p
) row-align col-align
))
125 (export 'icon-view-scroll-to-path
)
127 (defcfun gtk-icon-view-get-visible-range
:boolean
129 (start-path :pointer
)
132 (defun icon-view-get-visible-range (icon-view)
133 (with-foreign-objects ((start-path :pointer
) (end-path :pointer
))
134 (when (gtk-icon-view-get-visible-range icon-view start-path end-path
)
135 (values (mem-ref start-path
'(g-boxed-foreign tree-path
:return
))
136 (mem-ref end-path
'(g-boxed-foreign tree-path
:return
))))))
138 (export 'icon-view-get-visible-range
)
140 (defcfun (icon-view-set-tooltip-item "gtk_icon_view_set_tooltip_item") :void
141 (icon-view (g-object icon-view
))
142 (tooltip (g-object tooltip
))
143 (path (g-boxed-foreign tree-path
)))
145 (export 'icon-view-set-tooltip-item
)
147 (defcfun (icon-view-set-tooltip-cell "gtk_icon_view_set_tooltip_cell") :void
148 (icon-view (g-object icon-view
))
149 (tooltip (g-object tooltip
))
150 (path (g-boxed-foreign tree-path
))
151 (cell-renderer (g-object cell-renderer
)))
153 (export 'icon-view-set-tooltip-cell
)
155 (defcfun gtk-icon-view-get-tooltip-context
:boolean
156 (icon-view (g-object icon-view
))
159 (keyboard-tip :boolean
)
160 (model (:pointer
(g-object tree-model
)))
161 (path (:pointer
(g-boxed-foreign tree-path
)))
162 (iter (g-boxed-foreign tree-iter
)))
164 (defun icon-view-get-tooltip-context (icon-view x y keyboard-tip
)
165 (with-foreign-objects ((xx :int
) (yy :int
) (model-ptr :pointer
) (path-ptr :pointer
))
166 (setf (mem-ref xx
:int
) x
168 (let ((iter (make-tree-iter)))
169 (when (gtk-icon-view-get-tooltip-context icon-view xx yy keyboard-tip model-ptr path-ptr iter
)
170 (values (mem-ref xx
:int
) (mem-ref yy
:int
)
171 (convert-from-foreign (mem-ref model-ptr
:pointer
) '(g-object tree-model
))
172 (convert-from-foreign (mem-ref path-ptr
:pointer
) '(g-boxed-foreign tree-path
:return
))
175 ; TODO: gtk_icon_view_enable_model_drag_source
177 ; TODO: gtk_icon_view_enable_model_drag_dest
179 ; TODO: gtk_icon_view_unset_model_drag_source
181 ; TODO: gtk_icon_view_unset_model_drag_dest
183 ; TODO: gtk_icon_view_set_drag_dest_item
185 ; TODO: gtk_icon_view_get_drag_dest_item
187 ; TODO: gtk_icon_view_get_dest_item_at_pos
189 ; TODO: gtk_icon_view_create_drag_icon