4 (define-g-boxed-opaque target-list "GtkTargetList"
5 :alloc (error "Use make-target-list to allocate GtkTargetList"))
7 (defcfun (gtk-target-list-new "gtk_target_list_new")
8 (g-boxed-foreign target-list :free-from-foreign nil)
12 (defun make-target-list (targets)
13 (with-foreign-boxed-array (n-targets targets-ptr target-entry targets)
14 (gtk-target-list-new targets-ptr n-targets)))
16 (defcfun (gtk-target-list-ref "gtk_target_list_ref")
17 (g-boxed-foreign target-list :free-from-foreign nil)
18 (target-list (g-boxed-foreign target-list)))
20 (defcfun (gtk-target-list-unref "gtk_target_list_unref") :void
21 (target-list (g-boxed-foreign target-list)))
23 (export (boxed-related-symbols 'target-list))
27 (defcfun (gtk-drag-dest-set "gtk_drag_dest_set") :void
28 (widget (g-object widget))
32 (actions gdk-drag-action))
34 (defun drag-dest-set (widget flags targets actions)
35 (with-foreign-boxed-array (n-targets targets-ptr target-entry targets)
36 (gtk-drag-dest-set widget flags targets-ptr n-targets actions)))
38 (export 'drag-dest-set)
40 (defcfun (drag-dest-unset "gtk_drag_dest_unset") :void
41 (widget (g-object widget)))
43 (export 'drag-dest-unset)
45 (defcfun (drag-dest-add-text-targets "gtk_drag_dest_add_text_targets") :void
46 (widget (g-object widget)))
48 (export 'drag-dest-add-text-targets)
50 (defcfun (drag-dest-add-image-targets "gtk_drag_dest_add_image_targets") :void
51 (widget (g-object widget)))
53 (export 'drag-dest-add-image-targets)
55 (defcfun (drag-dest-add-uri-targets "gtk_drag_dest_add_uri_targets") :void
56 (widget (g-object widget)))
58 (export 'drag-dest-add-uri-targets)
60 (defcfun (drag-dest-set-track-motion "gtk_drag_dest_set_track_motion") :void
61 (widget (g-object widget))
62 (track-motion :boolean))
64 (export 'drag-dest-set-track-motion)
66 (defcfun (drag-dest-get-track-motion "gtk_drag_dest_get_track_motion") :boolean
67 (widget (g-object widget)))
69 (export 'drag-dest-get-track-motion)
71 (defcfun (drag-finish "gtk_drag_finish") :void
72 (context (g-object drag-context))
79 (defcfun (drag-get-data "gtk_drag_get_data") :void
80 (widget (g-object widget))
81 (context (g-object drag-context))
82 (target gdk-atom-as-string)
85 (export 'drag-get-data)
87 (defcfun (drag-get-source-widget "gtk_drag_get_source_widget")
89 (context (g-object drag-context)))
91 (export 'drag-get-source-widget)
93 (defcfun (drag-highlight "gtk_drag_highlight") :void
94 (widget (g-object widget)))
96 (export 'drag-highlight)
98 (defcfun (drag-unhighlight "gtk_drag_unhighlight") :void
99 (widget (g-object widget)))
101 (export 'drag-unhighlight)
103 (defcfun (gtk-drag-begin "gtk_drag_begin") (g-object drag-context :free-from-foreign nil)
104 (widget (g-object widget))
105 (targets (g-boxed-foreign target-list))
106 (actions gdk-drag-action)
108 (event (g-object gdk:event)))
110 (defun drag-begin (widget targets actions button event)
111 (let* ((target-list (make-target-list targets))
112 (context (gtk-drag-begin widget target-list actions button event)))
113 (gtk-target-list-unref target-list)
118 (defcfun (drag-set-icon-widget "gtk_drag_set_icon_widget") :void
119 (context (g-object drag-context))
120 (widget (g-object widget))
124 (export 'drag-set-icon-widget)
126 (defcfun (drag-set-icon-pixbuf "gtk_drag_set_icon_pixbuf") :void
127 (context (g-object drag-context))
128 (pixbuf (g-object pixbuf))
132 (export 'drag-set-icon-pixbuf)
134 (defcfun (drag-set-icon-stock "gtk_drag_set_icon_stock") :void
135 (context (g-object drag-context))
140 (export 'drag-set-icon-stock)
142 (defcfun (drag-set-icon-name "gtk_drag_set_icon_name") :void
143 (context (g-object drag-context))
148 (export 'drag-set-icon-name)
150 (defcfun (drag-set-icon-default "gtk_drag_set_icon_default") :void
151 (context (g-object drag-context)))
153 (export 'drag-set-icon-default)
155 (defcfun (drag-check-threshold "gtk_drag_check_threshold") :boolean
156 (widget (g-object widget))
162 (export 'drag-check-threshold)
164 (defcfun (gtk-drag-source-set "gtk_drag_source_set") :void
165 (widget (g-object widget))
166 (start-button-mask modifier-type)
169 (actions gdk-drag-action))
171 (defun drag-source-set (widget button-mask targets actions)
172 (with-foreign-boxed-array (n-targets targets-ptr target-entry targets)
173 (gtk-drag-source-set widget button-mask targets-ptr n-targets actions)))
175 (export 'drag-source-set)
177 (defcfun (drag-source-set-icon-pixbuf "gtk_drag_source_set_icon_pixbuf") :void
178 (widget (g-object widget))
179 (pixbuf (g-object pixbuf)))
181 (export 'drag-source-set-icon-pixbuf)
183 (defcfun (drag-source-set-icon-stock "gtk_drag_source_set_icon_stock") :void
184 (widget (g-object widget))
187 (export 'drag-source-set-icon-stock)
189 (defcfun (drag-source-set-icon-name "gtk_drag_source_set_icon_name") :void
190 (widget (g-object widget))
193 (export 'drag-source-set-icon-name)
195 (defcfun (gtk-drag-source-unset "gtk_drag_source_unset") :void
196 (widget (g-object widget))
197 (target-list :pointer))
199 (defun drag-source-unset (widget targets)
200 (let ((target-list (make-target-list targets)))
201 (gtk-drag-source-unset widget target-list)
202 (gtk-target-list-unref target-list)
205 (export 'drag-source-unset)
207 (defcfun (drag-source-add-text-targets "gtk_drag_source_add_text_targets") :void
208 (widget (g-object widget)))
210 (export 'drag-source-add-text-targets)
212 (defcfun (drag-source-add-image-targets "gtk_drag_source_add_image_targets") :void
213 (widget (g-object widget)))
215 (export 'drag-source-add-image-targets)
217 (defcfun (drag-source-add-uri-targets "gtk_drag_source_add_uri_targets") :void
218 (widget (g-object widget)))
220 (export 'drag-source-add-uri-targets)