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)
36 (gtk-drag-dest-set widget flags (null-pointer) 0 actions)
37 (with-foreign-boxed-array (n-targets targets-ptr target-entry targets)
38 (gtk-drag-dest-set widget flags targets-ptr n-targets actions))))
40 (export 'drag-dest-set)
42 (defcfun (drag-dest-unset "gtk_drag_dest_unset") :void
43 (widget (g-object widget)))
45 (export 'drag-dest-unset)
47 (defcfun (drag-dest-add-text-targets "gtk_drag_dest_add_text_targets") :void
48 (widget (g-object widget)))
50 (export 'drag-dest-add-text-targets)
52 (defcfun (drag-dest-add-image-targets "gtk_drag_dest_add_image_targets") :void
53 (widget (g-object widget)))
55 (export 'drag-dest-add-image-targets)
57 (defcfun (drag-dest-add-uri-targets "gtk_drag_dest_add_uri_targets") :void
58 (widget (g-object widget)))
60 (export 'drag-dest-add-uri-targets)
62 (defcfun (drag-dest-set-track-motion "gtk_drag_dest_set_track_motion") :void
63 (widget (g-object widget))
64 (track-motion :boolean))
66 (export 'drag-dest-set-track-motion)
68 (defcfun (drag-dest-get-track-motion "gtk_drag_dest_get_track_motion") :boolean
69 (widget (g-object widget)))
71 (export 'drag-dest-get-track-motion)
73 (defcfun (drag-finish "gtk_drag_finish") :void
74 (context (g-object drag-context))
81 (defcfun (drag-get-data "gtk_drag_get_data") :void
82 (widget (g-object widget))
83 (context (g-object drag-context))
84 (target gdk-atom-as-string)
87 (export 'drag-get-data)
89 (defcfun (drag-get-source-widget "gtk_drag_get_source_widget")
91 (context (g-object drag-context)))
93 (export 'drag-get-source-widget)
95 (defcfun (drag-highlight "gtk_drag_highlight") :void
96 (widget (g-object widget)))
98 (export 'drag-highlight)
100 (defcfun (drag-unhighlight "gtk_drag_unhighlight") :void
101 (widget (g-object widget)))
103 (export 'drag-unhighlight)
105 (defcfun (gtk-drag-begin "gtk_drag_begin") (g-object drag-context :free-from-foreign nil)
106 (widget (g-object widget))
107 (targets (g-boxed-foreign target-list))
108 (actions gdk-drag-action)
110 (event (g-object gdk:event)))
112 (defun drag-begin (widget targets actions button event)
113 (let* ((target-list (make-target-list targets))
114 (context (gtk-drag-begin widget target-list actions button event)))
115 (gtk-target-list-unref target-list)
120 (defcfun (drag-set-icon-widget "gtk_drag_set_icon_widget") :void
121 (context (g-object drag-context))
122 (widget (g-object widget))
126 (export 'drag-set-icon-widget)
128 (defcfun (drag-set-icon-pixbuf "gtk_drag_set_icon_pixbuf") :void
129 (context (g-object drag-context))
130 (pixbuf (g-object pixbuf))
134 (export 'drag-set-icon-pixbuf)
136 (defcfun (drag-set-icon-stock "gtk_drag_set_icon_stock") :void
137 (context (g-object drag-context))
142 (export 'drag-set-icon-stock)
144 (defcfun (drag-set-icon-name "gtk_drag_set_icon_name") :void
145 (context (g-object drag-context))
150 (export 'drag-set-icon-name)
152 (defcfun (drag-set-icon-default "gtk_drag_set_icon_default") :void
153 (context (g-object drag-context)))
155 (export 'drag-set-icon-default)
157 (defcfun (drag-check-threshold "gtk_drag_check_threshold") :boolean
158 (widget (g-object widget))
164 (export 'drag-check-threshold)
166 (defcfun (gtk-drag-source-set "gtk_drag_source_set") :void
167 (widget (g-object widget))
168 (start-button-mask modifier-type)
171 (actions gdk-drag-action))
173 (defun drag-source-set (widget button-mask targets actions)
174 (with-foreign-boxed-array (n-targets targets-ptr target-entry targets)
175 (gtk-drag-source-set widget button-mask targets-ptr n-targets actions)))
177 (export 'drag-source-set)
179 (defcfun (drag-source-set-icon-pixbuf "gtk_drag_source_set_icon_pixbuf") :void
180 (widget (g-object widget))
181 (pixbuf (g-object pixbuf)))
183 (export 'drag-source-set-icon-pixbuf)
185 (defcfun (drag-source-set-icon-stock "gtk_drag_source_set_icon_stock") :void
186 (widget (g-object widget))
189 (export 'drag-source-set-icon-stock)
191 (defcfun (drag-source-set-icon-name "gtk_drag_source_set_icon_name") :void
192 (widget (g-object widget))
195 (export 'drag-source-set-icon-name)
197 (defcfun (gtk-drag-source-unset "gtk_drag_source_unset") :void
198 (widget (g-object widget))
199 (target-list :pointer))
201 (defun drag-source-unset (widget targets)
202 (let ((target-list (make-target-list targets)))
203 (gtk-drag-source-unset widget target-list)
204 (gtk-target-list-unref target-list)
207 (export 'drag-source-unset)
209 (defcfun (drag-source-add-text-targets "gtk_drag_source_add_text_targets") :void
210 (widget (g-object widget)))
212 (export 'drag-source-add-text-targets)
214 (defcfun (drag-source-add-image-targets "gtk_drag_source_add_image_targets") :void
215 (widget (g-object widget)))
217 (export 'drag-source-add-image-targets)
219 (defcfun (drag-source-add-uri-targets "gtk_drag_source_add_uri_targets") :void
220 (widget (g-object widget)))
222 (export 'drag-source-add-uri-targets)