1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
<title>Drag and Drop</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
7
<link rel="start" href="index.html" title="GTK+ Reference Manual">
8
<link rel="up" href="gtkbase.html" title="Part II. GTK+ Core Reference">
9
<link rel="prev" href="gtk-Clipboards.html" title="Clipboards">
10
<link rel="next" href="GtkIconTheme.html" title="GtkIconTheme">
11
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="part" href="gtk.html" title="Part I. GTK+ Overview">
14
<link rel="part" href="gtkbase.html" title="Part II. GTK+ Core Reference">
15
<link rel="part" href="gtkobjects.html" title="Part III. GTK+ Widgets and Objects">
16
<link rel="chapter" href="ch01.html" title="Object Hierarchy">
17
<link rel="chapter" href="ch02.html" title="Widget Gallery">
18
<link rel="chapter" href="WindowWidgets.html" title="Windows">
19
<link rel="chapter" href="DisplayWidgets.html" title="Display Widgets">
20
<link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles">
21
<link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry">
22
<link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor">
23
<link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
24
<link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
25
<link rel="chapter" href="Actions.html" title="Action-based menus and toolbars">
26
<link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
27
<link rel="chapter" href="LayoutContainers.html" title="Layout Containers">
28
<link rel="chapter" href="Ornaments.html" title="Ornaments">
29
<link rel="chapter" href="ScrollingWidgets.html" title="Scrolling">
30
<link rel="chapter" href="Printing.html" title="Printing">
31
<link rel="chapter" href="MiscObjects.html" title="Miscellaneous">
32
<link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes">
33
<link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding">
34
<link rel="chapter" href="SpecialObjects.html" title="Special-purpose features">
35
<link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents">
36
<link rel="chapter" href="DeprecatedObjects.html" title="Deprecated">
37
<link rel="part" href="migrating.html" title="Part IV. Migrating from Previous Versions of GTK+">
38
<link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist">
39
<link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
40
<link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction">
41
<link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and GtkComboBoxEntry">
42
<link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView">
43
<link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog">
44
<link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton">
45
<link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant">
46
<link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser">
47
<link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton">
48
<link rel="part" href="pt05.html" title="Part V. GTK+ Tools">
49
<link rel="glossary" href="glossary.html" title="Glossary">
50
<link rel="index" href="ix01.html" title="Index">
51
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
52
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
53
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
54
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
55
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
56
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
58
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
59
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
61
<td><a accesskey="p" href="gtk-Clipboards.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
62
<td><a accesskey="u" href="gtkbase.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
63
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
64
<th width="100%" align="center">GTK+ Reference Manual</th>
65
<td><a accesskey="n" href="GtkIconTheme.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
67
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2673209" class="shortcut">Top</a>
69
<a href="#id2674536" class="shortcut">Description</a></nobr></td></tr>
71
<div class="refentry" lang="en">
72
<a name="gtk-Drag-and-Drop"></a><div class="titlepage"></div>
73
<div class="refnamediv"><table width="100%"><tr>
76
<a name="id2673209"></a><span class="refentrytitle">Drag and Drop</span>
78
<p>Drag and Drop — Functions for controlling drag and drop handling</p>
80
<td valign="top" align="right"></td>
82
<div class="refsynopsisdiv">
84
<pre class="synopsis">
86
#include <gtk/gtk.h>
89
enum <a href="gtk-Drag-and-Drop.html#GtkDestDefaults">GtkDestDefaults</a>;
90
enum <a href="gtk-Drag-and-Drop.html#GtkTargetFlags">GtkTargetFlags</a>;
92
void <a href="gtk-Drag-and-Drop.html#gtk-drag-dest-set">gtk_drag_dest_set</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
93
<a href="gtk-Drag-and-Drop.html#GtkDestDefaults">GtkDestDefaults</a> flags,
94
const <a href="gtk-Selections.html#GtkTargetEntry">GtkTargetEntry</a> *targets,
97
href="../gdk/gdk-Drag-and-Drop.html#GdkDragAction"
98
>GdkDragAction</a> actions);
99
void <a href="gtk-Drag-and-Drop.html#gtk-drag-dest-set-proxy">gtk_drag_dest_set_proxy</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
101
href="../gdk/gdk-Windows.html#GdkWindow"
102
>GdkWindow</a> *proxy_window,
104
href="../gdk/gdk-Drag-and-Drop.html#GdkDragProtocol"
105
>GdkDragProtocol</a> protocol,
106
gboolean use_coordinates);
107
void <a href="gtk-Drag-and-Drop.html#gtk-drag-dest-unset">gtk_drag_dest_unset</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);
109
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
110
>GdkAtom</a> <a href="gtk-Drag-and-Drop.html#gtk-drag-dest-find-target">gtk_drag_dest_find_target</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
112
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
113
>GdkDragContext</a> *context,
114
<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *target_list);
115
<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a>* <a href="gtk-Drag-and-Drop.html#gtk-drag-dest-get-target-list">gtk_drag_dest_get_target_list</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);
116
void <a href="gtk-Drag-and-Drop.html#gtk-drag-dest-set-target-list">gtk_drag_dest_set_target_list</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
117
<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *target_list);
118
void <a href="gtk-Drag-and-Drop.html#gtk-drag-dest-add-text-targets">gtk_drag_dest_add_text_targets</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);
119
void <a href="gtk-Drag-and-Drop.html#gtk-drag-dest-add-image-targets">gtk_drag_dest_add_image_targets</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);
120
void <a href="gtk-Drag-and-Drop.html#gtk-drag-dest-add-uri-targets">gtk_drag_dest_add_uri_targets</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);
121
void <a href="gtk-Drag-and-Drop.html#gtk-drag-dest-set-track-motion">gtk_drag_dest_set_track_motion</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
122
gboolean track_motion);
123
gboolean <a href="gtk-Drag-and-Drop.html#gtk-drag-dest-get-track-motion">gtk_drag_dest_get_track_motion</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);
124
void <a href="gtk-Drag-and-Drop.html#gtk-drag-finish">gtk_drag_finish</a> (<a
125
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
126
>GdkDragContext</a> *context,
130
void <a href="gtk-Drag-and-Drop.html#gtk-drag-get-data">gtk_drag_get_data</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
132
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
133
>GdkDragContext</a> *context,
135
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
138
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* <a href="gtk-Drag-and-Drop.html#gtk-drag-get-source-widget">gtk_drag_get_source_widget</a> (<a
139
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
140
>GdkDragContext</a> *context);
141
void <a href="gtk-Drag-and-Drop.html#gtk-drag-highlight">gtk_drag_highlight</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);
142
void <a href="gtk-Drag-and-Drop.html#gtk-drag-unhighlight">gtk_drag_unhighlight</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);
145
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
146
>GdkDragContext</a>* <a href="gtk-Drag-and-Drop.html#gtk-drag-begin">gtk_drag_begin</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
147
<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *targets,
149
href="../gdk/gdk-Drag-and-Drop.html#GdkDragAction"
150
>GdkDragAction</a> actions,
153
href="../gdk/gdk-Event-Structures.html#GdkEvent"
154
>GdkEvent</a> *event);
155
void <a href="gtk-Drag-and-Drop.html#gtk-drag-set-icon-widget">gtk_drag_set_icon_widget</a> (<a
156
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
157
>GdkDragContext</a> *context,
158
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
161
void <a href="gtk-Drag-and-Drop.html#gtk-drag-set-icon-pixmap">gtk_drag_set_icon_pixmap</a> (<a
162
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
163
>GdkDragContext</a> *context,
165
href="../gdk/gdk-Colormaps-and-Colors.html#GdkColormap"
166
>GdkColormap</a> *colormap,
168
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
169
>GdkPixmap</a> *pixmap,
171
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
172
>GdkBitmap</a> *mask,
175
void <a href="gtk-Drag-and-Drop.html#gtk-drag-set-icon-pixbuf">gtk_drag_set_icon_pixbuf</a> (<a
176
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
177
>GdkDragContext</a> *context,
179
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
180
>GdkPixbuf</a> *pixbuf,
183
void <a href="gtk-Drag-and-Drop.html#gtk-drag-set-icon-stock">gtk_drag_set_icon_stock</a> (<a
184
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
185
>GdkDragContext</a> *context,
186
const gchar *stock_id,
189
void <a href="gtk-Drag-and-Drop.html#gtk-drag-set-icon-name">gtk_drag_set_icon_name</a> (<a
190
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
191
>GdkDragContext</a> *context,
192
const gchar *icon_name,
195
void <a href="gtk-Drag-and-Drop.html#gtk-drag-set-icon-default">gtk_drag_set_icon_default</a> (<a
196
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
197
>GdkDragContext</a> *context);
198
void <a href="gtk-Drag-and-Drop.html#gtk-drag-set-default-icon">gtk_drag_set_default_icon</a> (<a
199
href="../gdk/gdk-Colormaps-and-Colors.html#GdkColormap"
200
>GdkColormap</a> *colormap,
202
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
203
>GdkPixmap</a> *pixmap,
205
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
206
>GdkBitmap</a> *mask,
209
gboolean <a href="gtk-Drag-and-Drop.html#gtk-drag-check-threshold">gtk_drag_check_threshold</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
214
void <a href="gtk-Drag-and-Drop.html#gtk-drag-source-set">gtk_drag_source_set</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
216
href="../gdk/gdk-Windows.html#GdkModifierType"
217
>GdkModifierType</a> start_button_mask,
218
const <a href="gtk-Selections.html#GtkTargetEntry">GtkTargetEntry</a> *targets,
221
href="../gdk/gdk-Drag-and-Drop.html#GdkDragAction"
222
>GdkDragAction</a> actions);
223
void <a href="gtk-Drag-and-Drop.html#gtk-drag-source-set-icon">gtk_drag_source_set_icon</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
225
href="../gdk/gdk-Colormaps-and-Colors.html#GdkColormap"
226
>GdkColormap</a> *colormap,
228
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
229
>GdkPixmap</a> *pixmap,
231
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
232
>GdkBitmap</a> *mask);
233
void <a href="gtk-Drag-and-Drop.html#gtk-drag-source-set-icon-pixbuf">gtk_drag_source_set_icon_pixbuf</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
235
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
236
>GdkPixbuf</a> *pixbuf);
237
void <a href="gtk-Drag-and-Drop.html#gtk-drag-source-set-icon-stock">gtk_drag_source_set_icon_stock</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
238
const gchar *stock_id);
239
void <a href="gtk-Drag-and-Drop.html#gtk-drag-source-set-icon-name">gtk_drag_source_set_icon_name</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
240
const gchar *icon_name);
241
void <a href="gtk-Drag-and-Drop.html#gtk-drag-source-unset">gtk_drag_source_unset</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);
242
void <a href="gtk-Drag-and-Drop.html#gtk-drag-source-set-target-list">gtk_drag_source_set_target_list</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
243
<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *target_list);
244
<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a>* <a href="gtk-Drag-and-Drop.html#gtk-drag-source-get-target-list">gtk_drag_source_get_target_list</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);
245
void <a href="gtk-Drag-and-Drop.html#gtk-drag-source-add-text-targets">gtk_drag_source_add_text_targets</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);
246
void <a href="gtk-Drag-and-Drop.html#gtk-drag-source-add-image-targets">gtk_drag_source_add_image_targets</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);
247
void <a href="gtk-Drag-and-Drop.html#gtk-drag-source-add-uri-targets">gtk_drag_source_add_uri_targets</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);
250
<div class="refsect1" lang="en">
251
<a name="id2674536"></a><h2>Description</h2>
253
GTK+ has a rich set of functions for doing inter-process
254
communication via the drag-and-drop metaphor. GTK+
255
can do drag-and-drop (DND) via multiple protocols.
256
The currently supported protocols are the Xdnd and
259
As well as the functions listed here, applications
260
may need to use some facilities provided for
261
<a href="gtk-Selections.html" title="Selections">Selections</a>.
262
Also, the Drag and Drop API makes use of signals
263
in the <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> class.
266
<div class="refsect1" lang="en">
267
<a name="id2674573"></a><h2>Details</h2>
268
<div class="refsect2" lang="en">
269
<a name="id2674583"></a><h3>
270
<a name="GtkDestDefaults"></a>enum GtkDestDefaults</h3>
271
<a class="indexterm" name="id2674596"></a><pre class="programlisting">typedef enum {
272
GTK_DEST_DEFAULT_MOTION = 1 << 0, /* respond to "drag_motion" */
273
GTK_DEST_DEFAULT_HIGHLIGHT = 1 << 1, /* auto-highlight */
274
GTK_DEST_DEFAULT_DROP = 1 << 2, /* respond to "drag_drop" */
275
GTK_DEST_DEFAULT_ALL = 0x07
279
The <a href="gtk-Drag-and-Drop.html#GtkDestDefaults"><span class="type">GtkDestDefaults</span></a> enumeration specifies the various
280
types of action that will be taken on behalf
281
of the user for a drag destination site.
283
<div class="variablelist"><table border="0">
284
<col align="left" valign="top">
287
<td><span class="term"><a name="GTK-DEST-DEFAULT-MOTION:CAPS"></a><code class="literal">GTK_DEST_DEFAULT_MOTION</code></span></td>
289
If set for a widget, GTK+, during a drag over this
290
widget will check if the drag matches this widget's
291
list of possible targets and actions.
292
GTK+ will then call <a
293
href="../gdk/gdk-Drag-and-Drop.html#gdk-drag-status"
294
><code class="function">gdk_drag_status()</code></a> as appropriate.
298
<td><span class="term"><a name="GTK-DEST-DEFAULT-HIGHLIGHT:CAPS"></a><code class="literal">GTK_DEST_DEFAULT_HIGHLIGHT</code></span></td>
300
If set for a widget, GTK+ will draw a highlight on
301
this widget as long as a drag is over this widget
302
and the widget drag format and action are acceptable.
306
<td><span class="term"><a name="GTK-DEST-DEFAULT-DROP:CAPS"></a><code class="literal">GTK_DEST_DEFAULT_DROP</code></span></td>
308
If set for a widget, when a drop occurs, GTK+ will
309
will check if the drag matches this widget's
310
list of possible targets and actions. If so,
311
GTK+ will call <a href="gtk-Drag-and-Drop.html#gtk-drag-get-data"><code class="function">gtk_drag_get_data()</code></a> on behalf
312
of the widget. Whether or not the drop is successful,
313
GTK+ will call <a href="gtk-Drag-and-Drop.html#gtk-drag-finish"><code class="function">gtk_drag_finish()</code></a>. If the action
314
was a move, then if the drag was successful, then
315
<code class="literal">TRUE</code> will be passed for the <em class="parameter"><code>delete</code></em> parameter
316
to <a href="gtk-Drag-and-Drop.html#gtk-drag-finish"><code class="function">gtk_drag_finish()</code></a>.
320
<td><span class="term"><a name="GTK-DEST-DEFAULT-ALL:CAPS"></a><code class="literal">GTK_DEST_DEFAULT_ALL</code></span></td>
322
If set, specifies that all default actions should
331
<div class="refsect2" lang="en">
332
<a name="id2674794"></a><h3>
333
<a name="GtkTargetFlags"></a>enum GtkTargetFlags</h3>
334
<a class="indexterm" name="id2674806"></a><pre class="programlisting">typedef enum {
335
GTK_TARGET_SAME_APP = 1 << 0, /*< nick=same-app >*/
336
GTK_TARGET_SAME_WIDGET = 1 << 1 /*< nick=same-widget >*/
340
The <a href="gtk-Drag-and-Drop.html#GtkTargetFlags"><span class="type">GtkTargetFlags</span></a> enumeration is used to specify
341
constraints on an entry in a <span class="type">GtkTargetTable</span>.
343
<div class="variablelist"><table border="0">
344
<col align="left" valign="top">
347
<td><span class="term"><a name="GTK-TARGET-SAME-APP:CAPS"></a><code class="literal">GTK_TARGET_SAME_APP</code></span></td>
349
If this is set, the target will only be selected
350
for drags within a single application.
354
<td><span class="term"><a name="GTK-TARGET-SAME-WIDGET:CAPS"></a><code class="literal">GTK_TARGET_SAME_WIDGET</code></span></td>
356
If this is set, the target will only be selected
357
for drags within a single widget.
365
<div class="refsect2" lang="en">
366
<a name="id2674896"></a><h3>
367
<a name="gtk-drag-dest-set"></a>gtk_drag_dest_set ()</h3>
368
<a class="indexterm" name="id2674909"></a><pre class="programlisting">void gtk_drag_dest_set (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
369
<a href="gtk-Drag-and-Drop.html#GtkDestDefaults">GtkDestDefaults</a> flags,
370
const <a href="gtk-Selections.html#GtkTargetEntry">GtkTargetEntry</a> *targets,
373
href="../gdk/gdk-Drag-and-Drop.html#GdkDragAction"
374
>GdkDragAction</a> actions);</pre>
376
Sets a widget as a potential drop destination.
378
<div class="variablelist"><table border="0">
379
<col align="left" valign="top">
382
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
383
<td>a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
387
<td><span class="term"><em class="parameter"><code>flags</code></em> :</span></td>
388
<td>the flags that specify what actions GTK+ should take
389
on behalf of a widget for drops onto that widget. The <em class="parameter"><code>targets</code></em>
390
and <em class="parameter"><code>actions</code></em> fields only are used if <a href="gtk-Drag-and-Drop.html#GTK-DEST-DEFAULT-MOTION:CAPS"><code class="literal">GTK_DEST_DEFAULT_MOTION</code></a>
391
or <a href="gtk-Drag-and-Drop.html#GTK-DEST-DEFAULT-DROP:CAPS"><code class="literal">GTK_DEST_DEFAULT_DROP</code></a> are given.
395
<td><span class="term"><em class="parameter"><code>targets</code></em> :</span></td>
396
<td>a pointer to an array of <a href="gtk-Selections.html#GtkTargetEntry"><span class="type">GtkTargetEntry</span></a>s indicating
397
the drop types that this widget will accept.
401
<td><span class="term"><em class="parameter"><code>n_targets</code></em> :</span></td>
402
<td>the number of entries in <em class="parameter"><code>targets</code></em>.
406
<td><span class="term"><em class="parameter"><code>actions</code></em> :</span></td>
407
<td>a bitmask of possible actions for a drop onto this
417
<div class="refsect2" lang="en">
418
<a name="id2675106"></a><h3>
419
<a name="gtk-drag-dest-set-proxy"></a>gtk_drag_dest_set_proxy ()</h3>
420
<a class="indexterm" name="id2675119"></a><pre class="programlisting">void gtk_drag_dest_set_proxy (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
422
href="../gdk/gdk-Windows.html#GdkWindow"
423
>GdkWindow</a> *proxy_window,
425
href="../gdk/gdk-Drag-and-Drop.html#GdkDragProtocol"
426
>GdkDragProtocol</a> protocol,
427
gboolean use_coordinates);</pre>
429
Sets this widget as a proxy for drops to another window.
431
<div class="variablelist"><table border="0">
432
<col align="left" valign="top">
435
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
436
<td>a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
440
<td><span class="term"><em class="parameter"><code>proxy_window</code></em> :</span></td>
441
<td>the window to which to forward drag events
445
<td><span class="term"><em class="parameter"><code>protocol</code></em> :</span></td>
446
<td>the drag protocol which the <em class="parameter"><code>proxy_window</code></em> accepts
448
href="../gdk/gdk-Drag-and-Drop.html#gdk-drag-get-protocol"
449
><code class="function">gdk_drag_get_protocol()</code></a> to determine this)
453
<td><span class="term"><em class="parameter"><code>use_coordinates</code></em> :</span></td>
454
<td>If <code class="literal">TRUE</code>, send the same coordinates to the
455
destination, because it is an embedded
465
<div class="refsect2" lang="en">
466
<a name="id2675272"></a><h3>
467
<a name="gtk-drag-dest-unset"></a>gtk_drag_dest_unset ()</h3>
468
<a class="indexterm" name="id2675285"></a><pre class="programlisting">void gtk_drag_dest_unset (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre>
470
Clears information about a drop destination set with
471
<a href="gtk-Drag-and-Drop.html#gtk-drag-dest-set"><code class="function">gtk_drag_dest_set()</code></a>. The widget will no longer receive
472
notification of drags.
474
<div class="variablelist"><table border="0">
475
<col align="left" valign="top">
477
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
478
<td>a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
486
<div class="refsect2" lang="en">
487
<a name="id2675351"></a><h3>
488
<a name="gtk-drag-dest-find-target"></a>gtk_drag_dest_find_target ()</h3>
489
<a class="indexterm" name="id2675365"></a><pre class="programlisting"><a
490
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
491
>GdkAtom</a> gtk_drag_dest_find_target (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
493
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
494
>GdkDragContext</a> *context,
495
<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *target_list);</pre>
497
Looks for a match between <em class="parameter"><code>context->targets</code></em> and the
498
<em class="parameter"><code>dest_target_list</code></em>, returning the first matching target, otherwise
500
href="../gdk/gdk-Properties-and-Atoms.html#GDK-NONE:CAPS"
501
><code class="literal">GDK_NONE</code></a>. <em class="parameter"><code>dest_target_list</code></em> should usually be the return
502
value from <a href="gtk-Drag-and-Drop.html#gtk-drag-dest-get-target-list"><code class="function">gtk_drag_dest_get_target_list()</code></a>, but some widgets may
503
have different valid targets for different parts of the widget; in
504
that case, they will have to implement a drag_motion handler that
505
passes the correct target list to this function.</p>
509
<div class="variablelist"><table border="0">
510
<col align="left" valign="top">
513
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
514
<td> drag destination widget
518
<td><span class="term"><em class="parameter"><code>context</code></em> :</span></td>
523
<td><span class="term"><em class="parameter"><code>target_list</code></em> :</span></td>
524
<td> list of droppable targets, or <a
525
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
526
><code class="literal">NULL</code></a> to use
527
gtk_drag_dest_get_target_list (<em class="parameter"><code>widget</code></em>).
531
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
532
<td> first target that the source offers and the dest can accept, or <a
533
href="../gdk/gdk-Properties-and-Atoms.html#GDK-NONE:CAPS"
534
><code class="literal">GDK_NONE</code></a>
541
<div class="refsect2" lang="en">
542
<a name="id2675543"></a><h3>
543
<a name="gtk-drag-dest-get-target-list"></a>gtk_drag_dest_get_target_list ()</h3>
544
<a class="indexterm" name="id2675557"></a><pre class="programlisting"><a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a>* gtk_drag_dest_get_target_list (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre>
546
Returns the list of targets this widget can accept from
551
<div class="variablelist"><table border="0">
552
<col align="left" valign="top">
555
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
556
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
560
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
561
<td> the <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>, or <a
562
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
563
><code class="literal">NULL</code></a> if none
570
<div class="refsect2" lang="en">
571
<a name="id2675644"></a><h3>
572
<a name="gtk-drag-dest-set-target-list"></a>gtk_drag_dest_set_target_list ()</h3>
573
<a class="indexterm" name="id2675658"></a><pre class="programlisting">void gtk_drag_dest_set_target_list (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
574
<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *target_list);</pre>
576
Sets the target types that this widget can accept from drag-and-drop.
577
The widget must first be made into a drag destination with
578
<a href="gtk-Drag-and-Drop.html#gtk-drag-dest-set"><code class="function">gtk_drag_dest_set()</code></a>.</p>
582
<div class="variablelist"><table border="0">
583
<col align="left" valign="top">
586
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
587
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that's a drag destination
591
<td><span class="term"><em class="parameter"><code>target_list</code></em> :</span></td>
592
<td> list of droppable targets, or <a
593
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
594
><code class="literal">NULL</code></a> for none
601
<div class="refsect2" lang="en">
602
<a name="id2675761"></a><h3>
603
<a name="gtk-drag-dest-add-text-targets"></a>gtk_drag_dest_add_text_targets ()</h3>
604
<a class="indexterm" name="id2675776"></a><pre class="programlisting">void gtk_drag_dest_add_text_targets (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre>
606
Add the text targets supported by <span class="type">GtkSelection</span> to
607
the target list of the drag destination. The targets
608
are added with <em class="parameter"><code>info</code></em> = 0. If you need another value,
609
use <a href="gtk-Selections.html#gtk-target-list-add-text-targets"><code class="function">gtk_target_list_add_text_targets()</code></a> and
610
<a href="gtk-Drag-and-Drop.html#gtk-drag-dest-set-target-list"><code class="function">gtk_drag_dest_set_target_list()</code></a>.</p>
614
<div class="variablelist"><table border="0">
615
<col align="left" valign="top">
617
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
618
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that's a drag destination
622
<p class="since">Since 2.6
626
<div class="refsect2" lang="en">
627
<a name="id2675882"></a><h3>
628
<a name="gtk-drag-dest-add-image-targets"></a>gtk_drag_dest_add_image_targets ()</h3>
629
<a class="indexterm" name="id2675897"></a><pre class="programlisting">void gtk_drag_dest_add_image_targets (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre>
631
Add the image targets supported by <span class="type">GtkSelection</span> to
632
the target list of the drag destination. The targets
633
are added with <em class="parameter"><code>info</code></em> = 0. If you need another value,
634
use <a href="gtk-Selections.html#gtk-target-list-add-image-targets"><code class="function">gtk_target_list_add_image_targets()</code></a> and
635
<a href="gtk-Drag-and-Drop.html#gtk-drag-dest-set-target-list"><code class="function">gtk_drag_dest_set_target_list()</code></a>.</p>
639
<div class="variablelist"><table border="0">
640
<col align="left" valign="top">
642
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
643
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that's a drag destination
647
<p class="since">Since 2.6
651
<div class="refsect2" lang="en">
652
<a name="id2676003"></a><h3>
653
<a name="gtk-drag-dest-add-uri-targets"></a>gtk_drag_dest_add_uri_targets ()</h3>
654
<a class="indexterm" name="id2676019"></a><pre class="programlisting">void gtk_drag_dest_add_uri_targets (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre>
656
Add the URI targets supported by <span class="type">GtkSelection</span> to
657
the target list of the drag destination. The targets
658
are added with <em class="parameter"><code>info</code></em> = 0. If you need another value,
659
use <a href="gtk-Selections.html#gtk-target-list-add-uri-targets"><code class="function">gtk_target_list_add_uri_targets()</code></a> and
660
<a href="gtk-Drag-and-Drop.html#gtk-drag-dest-set-target-list"><code class="function">gtk_drag_dest_set_target_list()</code></a>.</p>
664
<div class="variablelist"><table border="0">
665
<col align="left" valign="top">
667
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
668
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that's a drag destination
672
<p class="since">Since 2.6
676
<div class="refsect2" lang="en">
677
<a name="id2676123"></a><h3>
678
<a name="gtk-drag-dest-set-track-motion"></a>gtk_drag_dest_set_track_motion ()</h3>
679
<a class="indexterm" name="id2676139"></a><pre class="programlisting">void gtk_drag_dest_set_track_motion (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
680
gboolean track_motion);</pre>
682
Tells the widget to emit ::drag-motion and ::drag-leave
683
events regardless of the targets and the <a href="gtk-Drag-and-Drop.html#GTK-DEST-DEFAULT-MOTION:CAPS"><code class="literal">GTK_DEST_DEFAULT_MOTION</code></a>
687
This may be used when a widget wants to do generic
688
actions regardless of the targets that the source offers.</p>
692
<div class="variablelist"><table border="0">
693
<col align="left" valign="top">
696
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
697
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that's a drag destination
701
<td><span class="term"><em class="parameter"><code>track_motion</code></em> :</span></td>
702
<td> whether to accept all targets
707
<p class="since">Since 2.10
711
<div class="refsect2" lang="en">
712
<a name="id2676244"></a><h3>
713
<a name="gtk-drag-dest-get-track-motion"></a>gtk_drag_dest_get_track_motion ()</h3>
714
<a class="indexterm" name="id2676260"></a><pre class="programlisting">gboolean gtk_drag_dest_get_track_motion (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre>
716
Returns whether the widget has been configured to always
717
emit ::drag-motion signals.</p>
721
<div class="variablelist"><table border="0">
722
<col align="left" valign="top">
725
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
726
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that's a drag destination
730
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
731
<td> <code class="literal">TRUE</code> if the widget always emits ::drag-motion events
737
<p class="since">Since 2.10
741
<div class="refsect2" lang="en">
742
<a name="id2676347"></a><h3>
743
<a name="gtk-drag-finish"></a>gtk_drag_finish ()</h3>
744
<a class="indexterm" name="id2676360"></a><pre class="programlisting">void gtk_drag_finish (<a
745
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
746
>GdkDragContext</a> *context,
749
guint32 time_);</pre>
751
Informs the drag source that the drop is finished, and
752
that the data of the drag will no longer be required.
754
<div class="variablelist"><table border="0">
755
<col align="left" valign="top">
758
<td><span class="term"><em class="parameter"><code>context</code></em> :</span></td>
759
<td>the drag context.
763
<td><span class="term"><em class="parameter"><code>success</code></em> :</span></td>
764
<td>a flag indicating whether the drop was successful
768
<td><span class="term"><em class="parameter"><code>del</code></em> :</span></td>
769
<td>a flag indicating whether the source should delete the
770
original data. (This should be <code class="literal">TRUE</code> for a move)
774
<td><span class="term"><em class="parameter"><code>time_</code></em> :</span></td>
775
<td>the timestamp from the "drag_data_drop" signal.
784
<div class="refsect2" lang="en">
785
<a name="id2676487"></a><h3>
786
<a name="gtk-drag-get-data"></a>gtk_drag_get_data ()</h3>
787
<a class="indexterm" name="id2676500"></a><pre class="programlisting">void gtk_drag_get_data (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
789
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
790
>GdkDragContext</a> *context,
792
href="../gdk/gdk-Properties-and-Atoms.html#GdkAtom"
794
guint32 time_);</pre>
796
Gets the data associated with a drag. When the data
797
is received or the retrieval fails, GTK+ will emit a
798
"drag_data_received" signal. Failure of the retrieval
799
is indicated by the length field of the <em class="parameter"><code>selection_data</code></em>
800
signal parameter being negative. However, when <a href="gtk-Drag-and-Drop.html#gtk-drag-get-data"><code class="function">gtk_drag_get_data()</code></a>
801
is called implicitely because the <a href="gtk-Drag-and-Drop.html#GTK-DEST-DEFAULT-DROP:CAPS"><code class="literal">GTK_DEST_DEFAULT_DROP</code></a> was set,
802
then the widget will not receive notification of failed
805
<div class="variablelist"><table border="0">
806
<col align="left" valign="top">
809
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
810
<td>the widget that will receive the "drag_data_received"
815
<td><span class="term"><em class="parameter"><code>context</code></em> :</span></td>
820
<td><span class="term"><em class="parameter"><code>target</code></em> :</span></td>
821
<td>the target (form of the data) to retrieve.
825
<td><span class="term"><em class="parameter"><code>time_</code></em> :</span></td>
826
<td>a timestamp for retrieving the data. This will
827
generally be the time received in a "drag_data_motion"
828
or "drag_data_drop" signal.
837
<div class="refsect2" lang="en">
838
<a name="id2676649"></a><h3>
839
<a name="gtk-drag-get-source-widget"></a>gtk_drag_get_source_widget ()</h3>
840
<a class="indexterm" name="id2676663"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_drag_get_source_widget (<a
841
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
842
>GdkDragContext</a> *context);</pre>
844
Determines the source widget for a drag.
846
<div class="variablelist"><table border="0">
847
<col align="left" valign="top">
850
<td><span class="term"><em class="parameter"><code>context</code></em> :</span></td>
851
<td>a (destination side) drag context.
855
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
856
<td>if the drag is occurring within a single application,
857
a pointer to the source widget. Otherwise, <a
858
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
859
><code class="literal">NULL</code></a>.
868
<div class="refsect2" lang="en">
869
<a name="id2676732"></a><h3>
870
<a name="gtk-drag-highlight"></a>gtk_drag_highlight ()</h3>
871
<a class="indexterm" name="id2676746"></a><pre class="programlisting">void gtk_drag_highlight (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre>
873
Draws a highlight around a widget. This will attach
874
handlers to "expose_event" and "draw", so the highlight
875
will continue to be displayed until <a href="gtk-Drag-and-Drop.html#gtk-drag-unhighlight"><code class="function">gtk_drag_unhighlight()</code></a>
878
<div class="variablelist"><table border="0">
879
<col align="left" valign="top">
881
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
882
<td>a widget to highlight
890
<div class="refsect2" lang="en">
891
<a name="id2676806"></a><h3>
892
<a name="gtk-drag-unhighlight"></a>gtk_drag_unhighlight ()</h3>
893
<a class="indexterm" name="id2676819"></a><pre class="programlisting">void gtk_drag_unhighlight (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre>
895
Removes a highlight set by <a href="gtk-Drag-and-Drop.html#gtk-drag-highlight"><code class="function">gtk_drag_highlight()</code></a> from
898
<div class="variablelist"><table border="0">
899
<col align="left" valign="top">
901
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
902
<td>a widget to remove the highlight from.
910
<div class="refsect2" lang="en">
911
<a name="id2676878"></a><h3>
912
<a name="gtk-drag-begin"></a>gtk_drag_begin ()</h3>
913
<a class="indexterm" name="id2676891"></a><pre class="programlisting"><a
914
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
915
>GdkDragContext</a>* gtk_drag_begin (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
916
<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *targets,
918
href="../gdk/gdk-Drag-and-Drop.html#GdkDragAction"
919
>GdkDragAction</a> actions,
922
href="../gdk/gdk-Event-Structures.html#GdkEvent"
923
>GdkEvent</a> *event);</pre>
925
Initiates a drag on the source side. The function
926
only needs to be used when the application is
927
starting drags itself, and is not needed when
928
<a href="gtk-Drag-and-Drop.html#gtk-drag-source-set"><code class="function">gtk_drag_source_set()</code></a> is used.</p>
932
<div class="variablelist"><table border="0">
933
<col align="left" valign="top">
936
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
937
<td> the source widget.
941
<td><span class="term"><em class="parameter"><code>targets</code></em> :</span></td>
942
<td> The targets (data formats) in which the
943
source can provide the data.
947
<td><span class="term"><em class="parameter"><code>actions</code></em> :</span></td>
948
<td> A bitmask of the allowed drag actions for this drag.
952
<td><span class="term"><em class="parameter"><code>button</code></em> :</span></td>
953
<td> The button the user clicked to start the drag.
957
<td><span class="term"><em class="parameter"><code>event</code></em> :</span></td>
958
<td> The event that triggered the start of the drag.
962
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
963
<td> the context for this drag.
970
<div class="refsect2" lang="en">
971
<a name="id2677056"></a><h3>
972
<a name="gtk-drag-set-icon-widget"></a>gtk_drag_set_icon_widget ()</h3>
973
<a class="indexterm" name="id2677069"></a><pre class="programlisting">void gtk_drag_set_icon_widget (<a
974
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
975
>GdkDragContext</a> *context,
976
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
980
Changes the icon for a widget to a given widget. GTK+
981
will not destroy the icon, so if you don't want
982
it to persist, you should connect to the "drag_end"
983
signal and destroy it yourself.</p>
986
<div class="variablelist"><table border="0">
987
<col align="left" valign="top">
990
<td><span class="term"><em class="parameter"><code>context</code></em> :</span></td>
991
<td> the context for a drag. (This must be called
992
with a context for the source side of a drag)
996
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
997
<td> a toplevel window to use as an icon.
1001
<td><span class="term"><em class="parameter"><code>hot_x</code></em> :</span></td>
1002
<td> the X offset within <em class="parameter"><code>widget</code></em> of the hotspot.
1006
<td><span class="term"><em class="parameter"><code>hot_y</code></em> :</span></td>
1007
<td> the Y offset within <em class="parameter"><code>widget</code></em> of the hotspot.
1014
<div class="refsect2" lang="en">
1015
<a name="id2677202"></a><h3>
1016
<a name="gtk-drag-set-icon-pixmap"></a>gtk_drag_set_icon_pixmap ()</h3>
1017
<a class="indexterm" name="id2677215"></a><pre class="programlisting">void gtk_drag_set_icon_pixmap (<a
1018
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
1019
>GdkDragContext</a> *context,
1021
href="../gdk/gdk-Colormaps-and-Colors.html#GdkColormap"
1022
>GdkColormap</a> *colormap,
1024
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
1025
>GdkPixmap</a> *pixmap,
1027
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
1028
>GdkBitmap</a> *mask,
1032
Sets <em class="parameter"><code>pixmap</code></em> as the icon for a given drag. GTK+ retains
1033
references for the arguments, and will release them when
1034
they are no longer needed. In general, <a href="gtk-Drag-and-Drop.html#gtk-drag-set-icon-pixbuf"><code class="function">gtk_drag_set_icon_pixbuf()</code></a>
1035
will be more convenient to use.</p>
1038
<div class="variablelist"><table border="0">
1039
<col align="left" valign="top">
1042
<td><span class="term"><em class="parameter"><code>context</code></em> :</span></td>
1043
<td> the context for a drag. (This must be called
1044
with a context for the source side of a drag)
1048
<td><span class="term"><em class="parameter"><code>colormap</code></em> :</span></td>
1049
<td> the colormap of the icon
1053
<td><span class="term"><em class="parameter"><code>pixmap</code></em> :</span></td>
1054
<td> the image data for the icon
1058
<td><span class="term"><em class="parameter"><code>mask</code></em> :</span></td>
1059
<td> the transparency mask for the icon
1063
<td><span class="term"><em class="parameter"><code>hot_x</code></em> :</span></td>
1064
<td> the X offset within <em class="parameter"><code>pixmap</code></em> of the hotspot.
1068
<td><span class="term"><em class="parameter"><code>hot_y</code></em> :</span></td>
1069
<td> the Y offset within <em class="parameter"><code>pixmap</code></em> of the hotspot.
1076
<div class="refsect2" lang="en">
1077
<a name="id2677409"></a><h3>
1078
<a name="gtk-drag-set-icon-pixbuf"></a>gtk_drag_set_icon_pixbuf ()</h3>
1079
<a class="indexterm" name="id2677423"></a><pre class="programlisting">void gtk_drag_set_icon_pixbuf (<a
1080
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
1081
>GdkDragContext</a> *context,
1083
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
1084
>GdkPixbuf</a> *pixbuf,
1088
Sets <em class="parameter"><code>pixbuf</code></em> as the icon for a given drag.</p>
1092
<div class="variablelist"><table border="0">
1093
<col align="left" valign="top">
1096
<td><span class="term"><em class="parameter"><code>context</code></em> :</span></td>
1097
<td> the context for a drag. (This must be called
1098
with a context for the source side of a drag)
1102
<td><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></td>
1104
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
1105
><span class="type">GdkPixbuf</span></a> to use as the drag icon.
1109
<td><span class="term"><em class="parameter"><code>hot_x</code></em> :</span></td>
1110
<td> the X offset within <em class="parameter"><code>widget</code></em> of the hotspot.
1114
<td><span class="term"><em class="parameter"><code>hot_y</code></em> :</span></td>
1115
<td> the Y offset within <em class="parameter"><code>widget</code></em> of the hotspot.
1122
<div class="refsect2" lang="en">
1123
<a name="id2677567"></a><h3>
1124
<a name="gtk-drag-set-icon-stock"></a>gtk_drag_set_icon_stock ()</h3>
1125
<a class="indexterm" name="id2677580"></a><pre class="programlisting">void gtk_drag_set_icon_stock (<a
1126
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
1127
>GdkDragContext</a> *context,
1128
const gchar *stock_id,
1132
Sets the icon for a given drag from a stock ID.</p>
1136
<div class="variablelist"><table border="0">
1137
<col align="left" valign="top">
1140
<td><span class="term"><em class="parameter"><code>context</code></em> :</span></td>
1141
<td> the context for a drag. (This must be called
1142
with a context for the source side of a drag)
1146
<td><span class="term"><em class="parameter"><code>stock_id</code></em> :</span></td>
1147
<td> the ID of the stock icon to use for the drag.
1151
<td><span class="term"><em class="parameter"><code>hot_x</code></em> :</span></td>
1152
<td> the X offset within the icon of the hotspot.
1156
<td><span class="term"><em class="parameter"><code>hot_y</code></em> :</span></td>
1157
<td> the Y offset within the icon of the hotspot.
1164
<div class="refsect2" lang="en">
1165
<a name="id2677700"></a><h3>
1166
<a name="gtk-drag-set-icon-name"></a>gtk_drag_set_icon_name ()</h3>
1167
<a class="indexterm" name="id2677716"></a><pre class="programlisting">void gtk_drag_set_icon_name (<a
1168
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
1169
>GdkDragContext</a> *context,
1170
const gchar *icon_name,
1174
Sets the icon for a given drag from a named themed icon. See
1175
the docs for <a href="GtkIconTheme.html" title="GtkIconTheme"><span class="type">GtkIconTheme</span></a> for more details. Note that the
1176
size of the icon depends on the icon theme (the icon is
1177
loaded at the symbolic size <span class="type">GTK_ICON_SIZE_DND</span>), thus
1178
<em class="parameter"><code>hot_x</code></em> and <em class="parameter"><code>hot_y</code></em> have to be used with care.</p>
1182
<div class="variablelist"><table border="0">
1183
<col align="left" valign="top">
1186
<td><span class="term"><em class="parameter"><code>context</code></em> :</span></td>
1187
<td> the context for a drag. (This must be called
1188
with a context for the source side of a drag)
1192
<td><span class="term"><em class="parameter"><code>icon_name</code></em> :</span></td>
1193
<td> name of icon to use
1197
<td><span class="term"><em class="parameter"><code>hot_x</code></em> :</span></td>
1198
<td> the X offset of the hotspot within the icon
1202
<td><span class="term"><em class="parameter"><code>hot_y</code></em> :</span></td>
1203
<td> the Y offset of the hotspot within the icon
1208
<p class="since">Since 2.8
1212
<div class="refsect2" lang="en">
1213
<a name="id2677876"></a><h3>
1214
<a name="gtk-drag-set-icon-default"></a>gtk_drag_set_icon_default ()</h3>
1215
<a class="indexterm" name="id2677890"></a><pre class="programlisting">void gtk_drag_set_icon_default (<a
1216
href="../gdk/gdk-Drag-and-Drop.html#GdkDragContext"
1217
>GdkDragContext</a> *context);</pre>
1219
Sets the icon for a particular drag to the default
1223
<div class="variablelist"><table border="0">
1224
<col align="left" valign="top">
1226
<td><span class="term"><em class="parameter"><code>context</code></em> :</span></td>
1227
<td> the context for a drag. (This must be called
1228
with a context for the source side of a drag)
1234
<div class="refsect2" lang="en">
1235
<a name="id2677942"></a><h3>
1236
<a name="gtk-drag-set-default-icon"></a>gtk_drag_set_default_icon ()</h3>
1237
<a class="indexterm" name="id2677958"></a><pre class="programlisting">void gtk_drag_set_default_icon (<a
1238
href="../gdk/gdk-Colormaps-and-Colors.html#GdkColormap"
1239
>GdkColormap</a> *colormap,
1241
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
1242
>GdkPixmap</a> *pixmap,
1244
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
1245
>GdkBitmap</a> *mask,
1248
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
1249
<h3 class="title">Warning</h3>
1250
<p><code class="literal">gtk_drag_set_default_icon</code> is deprecated and should not be used in newly-written code.</p>
1253
Changes the default drag icon. GTK+ retains references for the
1254
arguments, and will release them when they are no longer needed.
1255
This function is obsolete. The default icon should now be changed
1256
via the stock system by changing the stock pixbuf for <a href="gtk-Stock-Items.html#GTK-STOCK-DND:CAPS"><span class="type">GTK_STOCK_DND</span></a>.</p>
1260
<div class="variablelist"><table border="0">
1261
<col align="left" valign="top">
1264
<td><span class="term"><em class="parameter"><code>colormap</code></em> :</span></td>
1265
<td> the colormap of the icon
1269
<td><span class="term"><em class="parameter"><code>pixmap</code></em> :</span></td>
1270
<td> the image data for the icon
1274
<td><span class="term"><em class="parameter"><code>mask</code></em> :</span></td>
1275
<td> the transparency mask for an image.
1279
<td><span class="term"><em class="parameter"><code>hot_x</code></em> :</span></td>
1280
<td> The X offset within <em class="parameter"><code>widget</code></em> of the hotspot.
1284
<td><span class="term"><em class="parameter"><code>hot_y</code></em> :</span></td>
1285
<td> The Y offset within <em class="parameter"><code>widget</code></em> of the hotspot.
1292
<div class="refsect2" lang="en">
1293
<a name="id2678134"></a><h3>
1294
<a name="gtk-drag-check-threshold"></a>gtk_drag_check_threshold ()</h3>
1295
<a class="indexterm" name="id2678147"></a><pre class="programlisting">gboolean gtk_drag_check_threshold (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
1299
gint current_y);</pre>
1301
Checks to see if a mouse drag starting at (<em class="parameter"><code>start_x</code></em>, <em class="parameter"><code>start_y</code></em>) and ending
1302
at (<em class="parameter"><code>current_x</code></em>, <em class="parameter"><code>current_y</code></em>) has passed the GTK+ drag threshold, and thus
1303
should trigger the beginning of a drag-and-drop operation.</p>
1307
<div class="variablelist"><table border="0">
1308
<col align="left" valign="top">
1311
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
1312
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
1316
<td><span class="term"><em class="parameter"><code>start_x</code></em> :</span></td>
1317
<td> X coordinate of start of drag
1321
<td><span class="term"><em class="parameter"><code>start_y</code></em> :</span></td>
1322
<td> Y coordinate of start of drag
1326
<td><span class="term"><em class="parameter"><code>current_x</code></em> :</span></td>
1327
<td> current X coordinate
1331
<td><span class="term"><em class="parameter"><code>current_y</code></em> :</span></td>
1332
<td> current Y coordinate
1336
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
1337
<td> <code class="literal">TRUE</code> if the drag threshold has been passed.
1344
<div class="refsect2" lang="en">
1345
<a name="id2678339"></a><h3>
1346
<a name="gtk-drag-source-set"></a>gtk_drag_source_set ()</h3>
1347
<a class="indexterm" name="id2678353"></a><pre class="programlisting">void gtk_drag_source_set (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
1349
href="../gdk/gdk-Windows.html#GdkModifierType"
1350
>GdkModifierType</a> start_button_mask,
1351
const <a href="gtk-Selections.html#GtkTargetEntry">GtkTargetEntry</a> *targets,
1354
href="../gdk/gdk-Drag-and-Drop.html#GdkDragAction"
1355
>GdkDragAction</a> actions);</pre>
1357
Sets up a widget so that GTK+ will start a drag
1358
operation when the user clicks and drags on the
1359
widget. The widget must have a window.
1361
<div class="variablelist"><table border="0">
1362
<col align="left" valign="top">
1365
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
1366
<td>a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
1370
<td><span class="term"><em class="parameter"><code>start_button_mask</code></em> :</span></td>
1371
<td>the bitmask of buttons that can start the drag
1375
<td><span class="term"><em class="parameter"><code>targets</code></em> :</span></td>
1376
<td>the table of targets that the drag will support
1380
<td><span class="term"><em class="parameter"><code>n_targets</code></em> :</span></td>
1381
<td>the number of items in <em class="parameter"><code>targets</code></em>
1385
<td><span class="term"><em class="parameter"><code>actions</code></em> :</span></td>
1386
<td>the bitmask of possible actions for a drag from this
1396
<div class="refsect2" lang="en">
1397
<a name="id2678505"></a><h3>
1398
<a name="gtk-drag-source-set-icon"></a>gtk_drag_source_set_icon ()</h3>
1399
<a class="indexterm" name="id2678518"></a><pre class="programlisting">void gtk_drag_source_set_icon (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
1401
href="../gdk/gdk-Colormaps-and-Colors.html#GdkColormap"
1402
>GdkColormap</a> *colormap,
1404
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
1405
>GdkPixmap</a> *pixmap,
1407
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
1408
>GdkBitmap</a> *mask);</pre>
1410
Sets the icon that will be used for drags from a particular widget
1411
from a pixmap/mask. GTK+ retains references for the arguments, and
1412
will release them when they are no longer needed.
1413
Use <a href="gtk-Drag-and-Drop.html#gtk-drag-source-set-icon-pixbuf"><code class="function">gtk_drag_source_set_icon_pixbuf()</code></a> instead.</p>
1416
<div class="variablelist"><table border="0">
1417
<col align="left" valign="top">
1420
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
1421
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
1425
<td><span class="term"><em class="parameter"><code>colormap</code></em> :</span></td>
1426
<td> the colormap of the icon
1430
<td><span class="term"><em class="parameter"><code>pixmap</code></em> :</span></td>
1431
<td> the image data for the icon
1435
<td><span class="term"><em class="parameter"><code>mask</code></em> :</span></td>
1436
<td> the transparency mask for an image.
1443
<div class="refsect2" lang="en">
1444
<a name="id2678656"></a><h3>
1445
<a name="gtk-drag-source-set-icon-pixbuf"></a>gtk_drag_source_set_icon_pixbuf ()</h3>
1446
<a class="indexterm" name="id2678669"></a><pre class="programlisting">void gtk_drag_source_set_icon_pixbuf (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
1448
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
1449
>GdkPixbuf</a> *pixbuf);</pre>
1451
Sets the icon that will be used for drags from a particular widget
1453
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
1454
><span class="type">GdkPixbuf</span></a>. GTK+ retains a reference for <em class="parameter"><code>pixbuf</code></em> and will
1455
release it when it is no longer needed.</p>
1459
<div class="variablelist"><table border="0">
1460
<col align="left" valign="top">
1463
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
1464
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
1468
<td><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></td>
1470
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
1471
><span class="type">GdkPixbuf</span></a> for the drag icon
1478
<div class="refsect2" lang="en">
1479
<a name="id2678773"></a><h3>
1480
<a name="gtk-drag-source-set-icon-stock"></a>gtk_drag_source_set_icon_stock ()</h3>
1481
<a class="indexterm" name="id2678786"></a><pre class="programlisting">void gtk_drag_source_set_icon_stock (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
1482
const gchar *stock_id);</pre>
1484
Sets the icon that will be used for drags from a particular source
1485
to a stock icon.</p>
1489
<div class="variablelist"><table border="0">
1490
<col align="left" valign="top">
1493
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
1494
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
1498
<td><span class="term"><em class="parameter"><code>stock_id</code></em> :</span></td>
1499
<td> the ID of the stock icon to use
1506
<div class="refsect2" lang="en">
1507
<a name="id2678867"></a><h3>
1508
<a name="gtk-drag-source-set-icon-name"></a>gtk_drag_source_set_icon_name ()</h3>
1509
<a class="indexterm" name="id2678882"></a><pre class="programlisting">void gtk_drag_source_set_icon_name (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
1510
const gchar *icon_name);</pre>
1512
Sets the icon that will be used for drags from a particular source
1513
to a themed icon. See the docs for <a href="GtkIconTheme.html" title="GtkIconTheme"><span class="type">GtkIconTheme</span></a> for more details.</p>
1517
<div class="variablelist"><table border="0">
1518
<col align="left" valign="top">
1521
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
1522
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
1526
<td><span class="term"><em class="parameter"><code>icon_name</code></em> :</span></td>
1527
<td> name of icon to use
1532
<p class="since">Since 2.8
1536
<div class="refsect2" lang="en">
1537
<a name="id2678979"></a><h3>
1538
<a name="gtk-drag-source-unset"></a>gtk_drag_source_unset ()</h3>
1539
<a class="indexterm" name="id2678992"></a><pre class="programlisting">void gtk_drag_source_unset (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre>
1541
Undoes the effects of <a href="gtk-Drag-and-Drop.html#gtk-drag-source-set"><code class="function">gtk_drag_source_set()</code></a>.
1543
<div class="variablelist"><table border="0">
1544
<col align="left" valign="top">
1546
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
1547
<td>a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
1555
<div class="refsect2" lang="en">
1556
<a name="id2679057"></a><h3>
1557
<a name="gtk-drag-source-set-target-list"></a>gtk_drag_source_set_target_list ()</h3>
1558
<a class="indexterm" name="id2679073"></a><pre class="programlisting">void gtk_drag_source_set_target_list (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
1559
<a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *target_list);</pre>
1561
Changes the target types that this widget offers for drag-and-drop.
1562
The widget must first be made into a drag source with
1563
<a href="gtk-Drag-and-Drop.html#gtk-drag-source-set"><code class="function">gtk_drag_source_set()</code></a>.</p>
1567
<div class="variablelist"><table border="0">
1568
<col align="left" valign="top">
1571
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
1572
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that's a drag source
1576
<td><span class="term"><em class="parameter"><code>target_list</code></em> :</span></td>
1577
<td> list of draggable targets, or <a
1578
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
1579
><code class="literal">NULL</code></a> for none
1584
<p class="since">Since 2.4
1588
<div class="refsect2" lang="en">
1589
<a name="id2679183"></a><h3>
1590
<a name="gtk-drag-source-get-target-list"></a>gtk_drag_source_get_target_list ()</h3>
1591
<a class="indexterm" name="id2679198"></a><pre class="programlisting"><a href="gtk-Selections.html#GtkTargetList">GtkTargetList</a>* gtk_drag_source_get_target_list (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre>
1593
Gets the list of targets this widget can provide for
1598
<div class="variablelist"><table border="0">
1599
<col align="left" valign="top">
1602
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
1603
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
1607
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
1608
<td> the <a href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>, or <a
1609
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
1610
><code class="literal">NULL</code></a> if none
1616
<p class="since">Since 2.4
1620
<div class="refsect2" lang="en">
1621
<a name="id2679293"></a><h3>
1622
<a name="gtk-drag-source-add-text-targets"></a>gtk_drag_source_add_text_targets ()</h3>
1623
<a class="indexterm" name="id2679308"></a><pre class="programlisting">void gtk_drag_source_add_text_targets (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre>
1625
Add the text targets supported by <span class="type">GtkSelection</span> to
1626
the target list of the drag source. The targets
1627
are added with <em class="parameter"><code>info</code></em> = 0. If you need another value,
1628
use <a href="gtk-Selections.html#gtk-target-list-add-text-targets"><code class="function">gtk_target_list_add_text_targets()</code></a> and
1629
<a href="gtk-Drag-and-Drop.html#gtk-drag-source-set-target-list"><code class="function">gtk_drag_source_set_target_list()</code></a>.</p>
1633
<div class="variablelist"><table border="0">
1634
<col align="left" valign="top">
1636
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
1637
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that's is a drag source
1641
<p class="since">Since 2.6
1645
<div class="refsect2" lang="en">
1646
<a name="id2679412"></a><h3>
1647
<a name="gtk-drag-source-add-image-targets"></a>gtk_drag_source_add_image_targets ()</h3>
1648
<a class="indexterm" name="id2679429"></a><pre class="programlisting">void gtk_drag_source_add_image_targets (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre>
1650
Add the writable image targets supported by <span class="type">GtkSelection</span> to
1651
the target list of the drag source. The targets
1652
are added with <em class="parameter"><code>info</code></em> = 0. If you need another value,
1653
use <a href="gtk-Selections.html#gtk-target-list-add-image-targets"><code class="function">gtk_target_list_add_image_targets()</code></a> and
1654
<a href="gtk-Drag-and-Drop.html#gtk-drag-source-set-target-list"><code class="function">gtk_drag_source_set_target_list()</code></a>.</p>
1658
<div class="variablelist"><table border="0">
1659
<col align="left" valign="top">
1661
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
1662
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that's is a drag source
1666
<p class="since">Since 2.6
1670
<div class="refsect2" lang="en">
1671
<a name="id2679532"></a><h3>
1672
<a name="gtk-drag-source-add-uri-targets"></a>gtk_drag_source_add_uri_targets ()</h3>
1673
<a class="indexterm" name="id2679548"></a><pre class="programlisting">void gtk_drag_source_add_uri_targets (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre>
1675
Add the URI targets supported by <span class="type">GtkSelection</span> to
1676
the target list of the drag source. The targets
1677
are added with <em class="parameter"><code>info</code></em> = 0. If you need another value,
1678
use <a href="gtk-Selections.html#gtk-target-list-add-uri-targets"><code class="function">gtk_target_list_add_uri_targets()</code></a> and
1679
<a href="gtk-Drag-and-Drop.html#gtk-drag-source-set-target-list"><code class="function">gtk_drag_source_set_target_list()</code></a>.</p>
1683
<div class="variablelist"><table border="0">
1684
<col align="left" valign="top">
1686
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
1687
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that's is a drag source
1691
<p class="since">Since 2.6