Typo fix
[cl-gtk2.git] / gtk / gtk.icon-view.lisp
blobd8bb61f8b011dcc2f2e09f3f634dd0d678790b86
1 (in-package :gtk)
3 (defcfun (icon-view-get-path-at-pos "gtk_icon_view_get_path_at_pos") g-object
4 (icon-view g-object)
5 (x :int)
6 (y :int))
8 (export 'icon-view-get-path-at-pos)
10 (defcfun gtk-icon-view-get-item-at-pos :boolean
11 (icon-view g-object)
12 (x :int)
13 (y :int)
14 (path :pointer)
15 (cell :pointer))
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
26 (icon-view g-object)
27 (x :int)
28 (y :int)
29 (rx :pointer)
30 (ry :pointer))
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)
36 (mem-ref ry :int))))
38 (export 'icon-view-conver-widget-to-bin-window-coords)
40 (defcfun (icon-view-set-cursor "gtk_icon_view_set_cursor") :void
41 (icon-view g-object)
42 (path (g-boxed-foreign tree-path))
43 (cell g-object)
44 (start-editing :boolean))
46 (export 'icon-view-set-cursor)
48 (defcfun gtk-icon-view-get-cursor :boolean
49 (icon-view g-object)
50 (path :pointer)
51 (cell :pointer))
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))
63 (restart-case
64 (funcall (get-stable-pointer-value data)
65 icon-view
66 path)
67 (return () nil)))
69 (defcfun gtk-icon-view-selected-foreach :void
70 (icon-view g-object)
71 (func :pointer)
72 (data :pointer))
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)
78 ptr)))
80 (export 'map-icon-view-selected)
82 (defcfun (icon-view-select-path "gtk_icon_view_select_path") :void
83 (icon-view g-object)
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
89 (icon-view g-object)
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
95 (icon-view g-object)
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
116 (icon-view g-object)
117 (path (g-boxed-foreign tree-path))
118 (use-align :boolean)
119 (row-align :float)
120 (col-align :float))
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
128 (icon-view g-object)
129 (start-path :pointer)
130 (end-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 ; TODO: gtk_icon_view_set_tooltip_item
142 ; TODO: gtk_icon_view_set_tooltip_cell
144 ; TODO: gtk_icon_view_get_tooltip_context
146 ; TODO: gtk_icon_view_enable_model_drag_source
148 ; TODO: gtk_icon_view_enable_model_drag_dest
150 ; TODO: gtk_icon_view_unset_model_drag_source
152 ; TODO: gtk_icon_view_unset_model_drag_dest
154 ; TODO: gtk_icon_view_set_drag_dest_item
156 ; TODO: gtk_icon_view_get_drag_dest_item
158 ; TODO: gtk_icon_view_get_dest_item_at_pos
160 ; TODO: gtk_icon_view_create_drag_icon