1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>Drag and Drop</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
7
<link rel="home" href="index.html" title="GDK 2 Reference Manual">
8
<link rel="up" href="reference.html" title="API Reference">
9
<link rel="prev" href="gdk2-Selections.html" title="Selections">
10
<link rel="next" href="gdk2-Properties-and-Atoms.html" title="Properties and Atoms">
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17
<td><a accesskey="p" href="gdk2-Selections.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
<td><a accesskey="u" href="reference.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20
<th width="100%" align="center">GDK 2 Reference Manual</th>
21
<td><a accesskey="n" href="gdk2-Properties-and-Atoms.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#gdk2-Drag-and-Drop.synopsis" class="shortcut">Top</a>
26
<a href="#gdk2-Drag-and-Drop.description" class="shortcut">Description</a>
29
<div class="refentry">
30
<a name="gdk2-Drag-and-Drop"></a><div class="titlepage"></div>
31
<div class="refnamediv"><table width="100%"><tr>
33
<h2><span class="refentrytitle"><a name="gdk2-Drag-and-Drop.top_of_page"></a>Drag and Drop</span></h2>
34
<p>Drag and Drop — Functions for controlling drag and drop handling</p>
36
<td valign="top" align="right"></td>
38
<div class="refsynopsisdiv">
39
<a name="gdk2-Drag-and-Drop.synopsis"></a><h2>Synopsis</h2>
40
<pre class="synopsis">
41
#include <gdk/gdk.h>
43
<a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="returnvalue">GdkAtom</span></a> <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-get-selection" title="gdk_drag_get_selection ()">gdk_drag_get_selection</a> (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);
44
<span class="returnvalue">void</span> <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-abort" title="gdk_drag_abort ()">gdk_drag_abort</a> (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
45
<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);
46
<span class="returnvalue">void</span> <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drop-reply" title="gdk_drop_reply ()">gdk_drop_reply</a> (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
47
<em class="parameter"><code><span class="type">gboolean</span> ok</code></em>,
48
<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);
49
<a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="returnvalue">GdkDragContext</span></a> * <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-context-new" title="gdk_drag_context_new ()">gdk_drag_context_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
50
<span class="returnvalue">void</span> <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-drop" title="gdk_drag_drop ()">gdk_drag_drop</a> (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
51
<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);
52
<span class="returnvalue">void</span> <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-find-window" title="gdk_drag_find_window ()">gdk_drag_find_window</a> (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
53
<em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *drag_window</code></em>,
54
<em class="parameter"><code><span class="type">gint</span> x_root</code></em>,
55
<em class="parameter"><code><span class="type">gint</span> y_root</code></em>,
56
<em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> **dest_window</code></em>,
57
<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragProtocol" title="enum GdkDragProtocol"><span class="type">GdkDragProtocol</span></a> *protocol</code></em>);
58
<span class="returnvalue">void</span> <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-find-window-for-screen" title="gdk_drag_find_window_for_screen ()">gdk_drag_find_window_for_screen</a> (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
59
<em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *drag_window</code></em>,
60
<em class="parameter"><code><a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a> *screen</code></em>,
61
<em class="parameter"><code><span class="type">gint</span> x_root</code></em>,
62
<em class="parameter"><code><span class="type">gint</span> y_root</code></em>,
63
<em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> **dest_window</code></em>,
64
<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragProtocol" title="enum GdkDragProtocol"><span class="type">GdkDragProtocol</span></a> *protocol</code></em>);
65
<span class="returnvalue">void</span> <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-context-ref" title="gdk_drag_context_ref ()">gdk_drag_context_ref</a> (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);
66
<a class="link" href="gdk2-Drag-and-Drop.html#GdkDragAction" title="enum GdkDragAction"><span class="returnvalue">GdkDragAction</span></a> <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-context-get-actions" title="gdk_drag_context_get_actions ()">gdk_drag_context_get_actions</a> (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);
67
<a class="link" href="gdk2-Drag-and-Drop.html#GdkDragAction" title="enum GdkDragAction"><span class="returnvalue">GdkDragAction</span></a> <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-context-get-selected-action" title="gdk_drag_context_get_selected_action ()">gdk_drag_context_get_selected_action</a>
68
(<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);
69
<a class="link" href="gdk2-Drag-and-Drop.html#GdkDragAction" title="enum GdkDragAction"><span class="returnvalue">GdkDragAction</span></a> <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-context-get-suggested-action" title="gdk_drag_context_get_suggested_action ()">gdk_drag_context_get_suggested_action</a>
70
(<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);
71
<span class="returnvalue">GList</span> * <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-context-list-targets" title="gdk_drag_context_list_targets ()">gdk_drag_context_list_targets</a> (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);
72
<a class="link" href="gdk2-Windows.html#GdkWindow"><span class="returnvalue">GdkWindow</span></a> * <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-context-get-source-window" title="gdk_drag_context_get_source_window ()">gdk_drag_context_get_source_window</a> (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);
73
<a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="returnvalue">GdkDragContext</span></a> * <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-begin" title="gdk_drag_begin ()">gdk_drag_begin</a> (<em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>,
74
<em class="parameter"><code><span class="type">GList</span> *targets</code></em>);
75
<span class="returnvalue">gboolean</span> <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-motion" title="gdk_drag_motion ()">gdk_drag_motion</a> (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
76
<em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *dest_window</code></em>,
77
<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragProtocol" title="enum GdkDragProtocol"><span class="type">GdkDragProtocol</span></a> protocol</code></em>,
78
<em class="parameter"><code><span class="type">gint</span> x_root</code></em>,
79
<em class="parameter"><code><span class="type">gint</span> y_root</code></em>,
80
<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragAction" title="enum GdkDragAction"><span class="type">GdkDragAction</span></a> suggested_action</code></em>,
81
<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragAction" title="enum GdkDragAction"><span class="type">GdkDragAction</span></a> possible_actions</code></em>,
82
<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);
83
<span class="returnvalue">void</span> <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drop-finish" title="gdk_drop_finish ()">gdk_drop_finish</a> (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
84
<em class="parameter"><code><span class="type">gboolean</span> success</code></em>,
85
<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);
86
<a class="link" href="gdk2-Event-Structures.html#GdkNativeWindow" title="GdkNativeWindow"><span class="returnvalue">GdkNativeWindow</span></a> <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-get-protocol" title="gdk_drag_get_protocol ()">gdk_drag_get_protocol</a> (<em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkNativeWindow" title="GdkNativeWindow"><span class="type">GdkNativeWindow</span></a> xid</code></em>,
87
<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragProtocol" title="enum GdkDragProtocol"><span class="type">GdkDragProtocol</span></a> *protocol</code></em>);
88
<a class="link" href="gdk2-Event-Structures.html#GdkNativeWindow" title="GdkNativeWindow"><span class="returnvalue">GdkNativeWindow</span></a> <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-get-protocol-for-display" title="gdk_drag_get_protocol_for_display ()">gdk_drag_get_protocol_for_display</a> (<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
89
<em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkNativeWindow" title="GdkNativeWindow"><span class="type">GdkNativeWindow</span></a> xid</code></em>,
90
<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragProtocol" title="enum GdkDragProtocol"><span class="type">GdkDragProtocol</span></a> *protocol</code></em>);
91
enum <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragProtocol" title="enum GdkDragProtocol">GdkDragProtocol</a>;
92
<span class="returnvalue">void</span> <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-context-unref" title="gdk_drag_context_unref ()">gdk_drag_context_unref</a> (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);
93
struct <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext">GdkDragContext</a>;
94
enum <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragAction" title="enum GdkDragAction">GdkDragAction</a>;
95
<span class="returnvalue">void</span> <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-status" title="gdk_drag_status ()">gdk_drag_status</a> (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
96
<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragAction" title="enum GdkDragAction"><span class="type">GdkDragAction</span></a> action</code></em>,
97
<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);
98
<span class="returnvalue">gboolean</span> <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-drop-succeeded" title="gdk_drag_drop_succeeded ()">gdk_drag_drop_succeeded</a> (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);
101
<div class="refsect1">
102
<a name="gdk2-Drag-and-Drop.description"></a><h2>Description</h2>
104
These functions provide a low level interface for drag and drop.
105
The X backend of GDK supports both the Xdnd and Motif drag and drop protocols
106
transparently, the Win32 backend supports the WM_DROPFILES protocol.
109
GTK+ provides a higher level abstraction based on top of these functions,
110
and so they are not normally needed in GTK+ applications.
111
See the Drag and Drop section of
112
the GTK+ documentation for more information.
115
<div class="refsect1">
116
<a name="gdk2-Drag-and-Drop.details"></a><h2>Details</h2>
117
<div class="refsect2">
118
<a name="gdk-drag-get-selection"></a><h3>gdk_drag_get_selection ()</h3>
119
<pre class="programlisting"><a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="returnvalue">GdkAtom</span></a> gdk_drag_get_selection (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);</pre>
121
Returns the selection atom for the current source window.
123
<div class="variablelist"><table border="0" class="variablelist">
125
<col align="left" valign="top">
130
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
131
<td>a <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a>.</td>
134
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
135
<td>the selection atom.</td>
141
<div class="refsect2">
142
<a name="gdk-drag-abort"></a><h3>gdk_drag_abort ()</h3>
143
<pre class="programlisting"><span class="returnvalue">void</span> gdk_drag_abort (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
144
<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);</pre>
146
Aborts a drag without dropping.
149
This function is called by the drag source.
151
<div class="variablelist"><table border="0" class="variablelist">
153
<col align="left" valign="top">
158
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
159
<td>a <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a>.</td>
162
<td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td>
163
<td>the timestamp for this operation.</td>
169
<div class="refsect2">
170
<a name="gdk-drop-reply"></a><h3>gdk_drop_reply ()</h3>
171
<pre class="programlisting"><span class="returnvalue">void</span> gdk_drop_reply (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
172
<em class="parameter"><code><span class="type">gboolean</span> ok</code></em>,
173
<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);</pre>
175
Accepts or rejects a drop.
178
This function is called by the drag destination in response
179
to a drop initiated by the drag source.
181
<div class="variablelist"><table border="0" class="variablelist">
183
<col align="left" valign="top">
188
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
189
<td>a <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a>.</td>
192
<td><p><span class="term"><em class="parameter"><code>ok</code></em> :</span></p></td>
194
<code class="literal">TRUE</code> if the drop is accepted.</td>
197
<td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td>
198
<td>the timestamp for this operation.</td>
204
<div class="refsect2">
205
<a name="gdk-drag-context-new"></a><h3>gdk_drag_context_new ()</h3>
206
<pre class="programlisting"><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="returnvalue">GdkDragContext</span></a> * gdk_drag_context_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
207
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
208
<h3 class="title">Warning</h3>
209
<p><code class="literal">gdk_drag_context_new</code> has been deprecated since version 2.24 and should not be used in newly-written code. This function is not useful, you always
210
obtain drag contexts by <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-begin" title="gdk_drag_begin ()"><code class="function">gdk_drag_begin()</code></a> or similar.</p>
213
Creates a new <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a>.
215
<div class="variablelist"><table border="0" class="variablelist">
217
<col align="left" valign="top">
221
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
222
<td>the newly created <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a>.</td>
227
<div class="refsect2">
228
<a name="gdk-drag-drop"></a><h3>gdk_drag_drop ()</h3>
229
<pre class="programlisting"><span class="returnvalue">void</span> gdk_drag_drop (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
230
<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);</pre>
232
Drops on the current destination.
235
This function is called by the drag source.
237
<div class="variablelist"><table border="0" class="variablelist">
239
<col align="left" valign="top">
244
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
245
<td>a <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a>.</td>
248
<td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td>
249
<td>the timestamp for this operation.</td>
255
<div class="refsect2">
256
<a name="gdk-drag-find-window"></a><h3>gdk_drag_find_window ()</h3>
257
<pre class="programlisting"><span class="returnvalue">void</span> gdk_drag_find_window (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
258
<em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *drag_window</code></em>,
259
<em class="parameter"><code><span class="type">gint</span> x_root</code></em>,
260
<em class="parameter"><code><span class="type">gint</span> y_root</code></em>,
261
<em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> **dest_window</code></em>,
262
<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragProtocol" title="enum GdkDragProtocol"><span class="type">GdkDragProtocol</span></a> *protocol</code></em>);</pre>
263
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
264
<h3 class="title">Warning</h3>
265
<p><code class="literal">gdk_drag_find_window</code> has been deprecated since version 2.24 and should not be used in newly-written code. Use <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-find-window-for-screen" title="gdk_drag_find_window_for_screen ()"><code class="function">gdk_drag_find_window_for_screen()</code></a> instead.</p>
268
Finds the destination window and DND protocol to use at the
269
given pointer position.
272
This function is called by the drag source to obtain the
273
<em class="parameter"><code>dest_window</code></em> and <em class="parameter"><code>protocol</code></em> parameters for <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-motion" title="gdk_drag_motion ()"><code class="function">gdk_drag_motion()</code></a>.
275
<div class="variablelist"><table border="0" class="variablelist">
277
<col align="left" valign="top">
282
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
283
<td>a <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a>.</td>
286
<td><p><span class="term"><em class="parameter"><code>drag_window</code></em> :</span></p></td>
287
<td>a window which may be at the pointer position, but
288
should be ignored, since it is put up by the drag source as an icon.</td>
291
<td><p><span class="term"><em class="parameter"><code>x_root</code></em> :</span></p></td>
292
<td>the x position of the pointer in root coordinates.</td>
295
<td><p><span class="term"><em class="parameter"><code>y_root</code></em> :</span></p></td>
296
<td>the y position of the pointer in root coordinates.</td>
299
<td><p><span class="term"><em class="parameter"><code>dest_window</code></em> :</span></p></td>
300
<td>location to store the destination window in. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
304
<td><p><span class="term"><em class="parameter"><code>protocol</code></em> :</span></p></td>
305
<td>location to store the DND protocol in. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
312
<div class="refsect2">
313
<a name="gdk-drag-find-window-for-screen"></a><h3>gdk_drag_find_window_for_screen ()</h3>
314
<pre class="programlisting"><span class="returnvalue">void</span> gdk_drag_find_window_for_screen (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
315
<em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *drag_window</code></em>,
316
<em class="parameter"><code><a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a> *screen</code></em>,
317
<em class="parameter"><code><span class="type">gint</span> x_root</code></em>,
318
<em class="parameter"><code><span class="type">gint</span> y_root</code></em>,
319
<em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> **dest_window</code></em>,
320
<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragProtocol" title="enum GdkDragProtocol"><span class="type">GdkDragProtocol</span></a> *protocol</code></em>);</pre>
322
Finds the destination window and DND protocol to use at the
323
given pointer position.
326
This function is called by the drag source to obtain the
327
<em class="parameter"><code>dest_window</code></em> and <em class="parameter"><code>protocol</code></em> parameters for <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-motion" title="gdk_drag_motion ()"><code class="function">gdk_drag_motion()</code></a>.
329
<div class="variablelist"><table border="0" class="variablelist">
331
<col align="left" valign="top">
336
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
337
<td>a <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a>
341
<td><p><span class="term"><em class="parameter"><code>drag_window</code></em> :</span></p></td>
342
<td>a window which may be at the pointer position, but
343
should be ignored, since it is put up by the drag source as an icon.</td>
346
<td><p><span class="term"><em class="parameter"><code>screen</code></em> :</span></p></td>
347
<td>the screen where the destination window is sought.</td>
350
<td><p><span class="term"><em class="parameter"><code>x_root</code></em> :</span></p></td>
351
<td>the x position of the pointer in root coordinates.</td>
354
<td><p><span class="term"><em class="parameter"><code>y_root</code></em> :</span></p></td>
355
<td>the y position of the pointer in root coordinates.</td>
358
<td><p><span class="term"><em class="parameter"><code>dest_window</code></em> :</span></p></td>
359
<td>location to store the destination window in. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
363
<td><p><span class="term"><em class="parameter"><code>protocol</code></em> :</span></p></td>
364
<td>location to store the DND protocol in. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
369
<p class="since">Since 2.2</p>
372
<div class="refsect2">
373
<a name="gdk-drag-context-ref"></a><h3>gdk_drag_context_ref ()</h3>
374
<pre class="programlisting"><span class="returnvalue">void</span> gdk_drag_context_ref (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);</pre>
375
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
376
<h3 class="title">Warning</h3>
377
<p><code class="literal">gdk_drag_context_ref</code> has been deprecated since version 2.2 and should not be used in newly-written code. Use <code class="function">g_object_ref()</code> instead.</p>
380
Deprecated function; use <code class="function">g_object_ref()</code> instead.
382
<div class="variablelist"><table border="0" class="variablelist">
384
<col align="left" valign="top">
388
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
389
<td>a <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a>.</td>
394
<div class="refsect2">
395
<a name="gdk-drag-context-get-actions"></a><h3>gdk_drag_context_get_actions ()</h3>
396
<pre class="programlisting"><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragAction" title="enum GdkDragAction"><span class="returnvalue">GdkDragAction</span></a> gdk_drag_context_get_actions (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);</pre>
398
Determines the bitmask of actions proposed by the source if
399
<code class="function">gdk_drag_context_suggested_action()</code> returns GDK_ACTION_ASK.
401
<div class="variablelist"><table border="0" class="variablelist">
403
<col align="left" valign="top">
408
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
409
<td>a <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a>
413
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
414
<td>the <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragAction" title="enum GdkDragAction"><span class="type">GdkDragAction</span></a> flags</td>
418
<p class="since">Since 2.22</p>
421
<div class="refsect2">
422
<a name="gdk-drag-context-get-selected-action"></a><h3>gdk_drag_context_get_selected_action ()</h3>
423
<pre class="programlisting"><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragAction" title="enum GdkDragAction"><span class="returnvalue">GdkDragAction</span></a> gdk_drag_context_get_selected_action
424
(<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);</pre>
426
Determines the action chosen by the drag destination.
428
<div class="variablelist"><table border="0" class="variablelist">
430
<col align="left" valign="top">
435
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
436
<td>a <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a>
440
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
441
<td>a <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragAction" title="enum GdkDragAction"><span class="type">GdkDragAction</span></a> value</td>
445
<p class="since">Since 2.22</p>
448
<div class="refsect2">
449
<a name="gdk-drag-context-get-suggested-action"></a><h3>gdk_drag_context_get_suggested_action ()</h3>
450
<pre class="programlisting"><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragAction" title="enum GdkDragAction"><span class="returnvalue">GdkDragAction</span></a> gdk_drag_context_get_suggested_action
451
(<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);</pre>
453
Determines the suggested drag action of the context.
455
<div class="variablelist"><table border="0" class="variablelist">
457
<col align="left" valign="top">
462
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
463
<td>a <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a>
467
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
468
<td>a <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragAction" title="enum GdkDragAction"><span class="type">GdkDragAction</span></a> value</td>
472
<p class="since">Since 2.22</p>
475
<div class="refsect2">
476
<a name="gdk-drag-context-list-targets"></a><h3>gdk_drag_context_list_targets ()</h3>
477
<pre class="programlisting"><span class="returnvalue">GList</span> * gdk_drag_context_list_targets (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);</pre>
479
Retrieves the list of targets of the context.
481
<div class="variablelist"><table border="0" class="variablelist">
483
<col align="left" valign="top">
488
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
489
<td>a <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a>
493
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
494
<td>a <span class="type">GList</span> of targets. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GdkAtom]</span>
499
<p class="since">Since 2.22</p>
502
<div class="refsect2">
503
<a name="gdk-drag-context-get-source-window"></a><h3>gdk_drag_context_get_source_window ()</h3>
504
<pre class="programlisting"><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="returnvalue">GdkWindow</span></a> * gdk_drag_context_get_source_window (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);</pre>
506
Returns the <a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> where the DND operation started.
508
<div class="variablelist"><table border="0" class="variablelist">
510
<col align="left" valign="top">
515
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
516
<td>a <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a>
520
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
521
<td>a <a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
526
<p class="since">Since 2.22</p>
529
<div class="refsect2">
530
<a name="gdk-drag-begin"></a><h3>gdk_drag_begin ()</h3>
531
<pre class="programlisting"><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="returnvalue">GdkDragContext</span></a> * gdk_drag_begin (<em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>,
532
<em class="parameter"><code><span class="type">GList</span> *targets</code></em>);</pre>
534
Starts a drag and creates a new drag context for it.
537
This function is called by the drag source.
539
<div class="variablelist"><table border="0" class="variablelist">
541
<col align="left" valign="top">
546
<td><p><span class="term"><em class="parameter"><code>window</code></em> :</span></p></td>
547
<td>the source window for this drag.</td>
550
<td><p><span class="term"><em class="parameter"><code>targets</code></em> :</span></p></td>
551
<td>the offered targets,
552
as list of <a class="link" href="gdk2-Properties-and-Atoms.html#GdkAtom" title="GdkAtom"><span class="type">GdkAtom</span></a>s. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GdkAtom]</span>
556
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
557
<td>a newly created <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a>.</td>
563
<div class="refsect2">
564
<a name="gdk-drag-motion"></a><h3>gdk_drag_motion ()</h3>
565
<pre class="programlisting"><span class="returnvalue">gboolean</span> gdk_drag_motion (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
566
<em class="parameter"><code><a class="link" href="gdk2-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *dest_window</code></em>,
567
<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragProtocol" title="enum GdkDragProtocol"><span class="type">GdkDragProtocol</span></a> protocol</code></em>,
568
<em class="parameter"><code><span class="type">gint</span> x_root</code></em>,
569
<em class="parameter"><code><span class="type">gint</span> y_root</code></em>,
570
<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragAction" title="enum GdkDragAction"><span class="type">GdkDragAction</span></a> suggested_action</code></em>,
571
<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragAction" title="enum GdkDragAction"><span class="type">GdkDragAction</span></a> possible_actions</code></em>,
572
<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);</pre>
574
Updates the drag context when the pointer moves or the
575
set of actions changes.
578
This function is called by the drag source.
580
<div class="variablelist"><table border="0" class="variablelist">
582
<col align="left" valign="top">
587
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
588
<td>a <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a>.</td>
591
<td><p><span class="term"><em class="parameter"><code>dest_window</code></em> :</span></p></td>
592
<td>the new destination window, obtained by
593
<a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-find-window" title="gdk_drag_find_window ()"><code class="function">gdk_drag_find_window()</code></a>.</td>
596
<td><p><span class="term"><em class="parameter"><code>protocol</code></em> :</span></p></td>
597
<td>the DND protocol in use, obtained by <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-find-window" title="gdk_drag_find_window ()"><code class="function">gdk_drag_find_window()</code></a>.</td>
600
<td><p><span class="term"><em class="parameter"><code>x_root</code></em> :</span></p></td>
601
<td>the x position of the pointer in root coordinates.</td>
604
<td><p><span class="term"><em class="parameter"><code>y_root</code></em> :</span></p></td>
605
<td>the y position of the pointer in root coordinates.</td>
608
<td><p><span class="term"><em class="parameter"><code>suggested_action</code></em> :</span></p></td>
609
<td>the suggested action.</td>
612
<td><p><span class="term"><em class="parameter"><code>possible_actions</code></em> :</span></p></td>
613
<td>the possible actions.</td>
616
<td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td>
617
<td>the timestamp for this operation.</td>
620
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
627
<div class="refsect2">
628
<a name="gdk-drop-finish"></a><h3>gdk_drop_finish ()</h3>
629
<pre class="programlisting"><span class="returnvalue">void</span> gdk_drop_finish (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
630
<em class="parameter"><code><span class="type">gboolean</span> success</code></em>,
631
<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);</pre>
633
Ends the drag operation after a drop.
636
This function is called by the drag destination.
638
<div class="variablelist"><table border="0" class="variablelist">
640
<col align="left" valign="top">
645
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
646
<td>a <span class="type">GtkDragContext</span>.</td>
649
<td><p><span class="term"><em class="parameter"><code>success</code></em> :</span></p></td>
651
<code class="literal">TRUE</code> if the data was successfully received.</td>
654
<td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td>
655
<td>the timestamp for this operation.</td>
661
<div class="refsect2">
662
<a name="gdk-drag-get-protocol"></a><h3>gdk_drag_get_protocol ()</h3>
663
<pre class="programlisting"><a class="link" href="gdk2-Event-Structures.html#GdkNativeWindow" title="GdkNativeWindow"><span class="returnvalue">GdkNativeWindow</span></a> gdk_drag_get_protocol (<em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkNativeWindow" title="GdkNativeWindow"><span class="type">GdkNativeWindow</span></a> xid</code></em>,
664
<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragProtocol" title="enum GdkDragProtocol"><span class="type">GdkDragProtocol</span></a> *protocol</code></em>);</pre>
665
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
666
<h3 class="title">Warning</h3>
667
<p><code class="literal">gdk_drag_get_protocol</code> has been deprecated since version 2.24 and should not be used in newly-written code. Use <a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-get-protocol-for-display" title="gdk_drag_get_protocol_for_display ()"><code class="function">gdk_drag_get_protocol_for_display()</code></a> instead</p>
670
Finds out the DND protocol supported by a window.
672
<div class="variablelist"><table border="0" class="variablelist">
674
<col align="left" valign="top">
679
<td><p><span class="term"><em class="parameter"><code>xid</code></em> :</span></p></td>
680
<td>the windowing system id of the destination window.</td>
683
<td><p><span class="term"><em class="parameter"><code>protocol</code></em> :</span></p></td>
684
<td>location where the supported DND protocol is returned.</td>
687
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
688
<td>the windowing system specific id for the window where
689
the drop should happen. This may be <em class="parameter"><code>xid</code></em> or the id of a proxy
690
window, or zero if <em class="parameter"><code>xid</code></em> doesn't support Drag and Drop.</td>
696
<div class="refsect2">
697
<a name="gdk-drag-get-protocol-for-display"></a><h3>gdk_drag_get_protocol_for_display ()</h3>
698
<pre class="programlisting"><a class="link" href="gdk2-Event-Structures.html#GdkNativeWindow" title="GdkNativeWindow"><span class="returnvalue">GdkNativeWindow</span></a> gdk_drag_get_protocol_for_display (<em class="parameter"><code><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *display</code></em>,
699
<em class="parameter"><code><a class="link" href="gdk2-Event-Structures.html#GdkNativeWindow" title="GdkNativeWindow"><span class="type">GdkNativeWindow</span></a> xid</code></em>,
700
<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragProtocol" title="enum GdkDragProtocol"><span class="type">GdkDragProtocol</span></a> *protocol</code></em>);</pre>
702
Finds out the DND protocol supported by a window.
704
<div class="variablelist"><table border="0" class="variablelist">
706
<col align="left" valign="top">
711
<td><p><span class="term"><em class="parameter"><code>display</code></em> :</span></p></td>
712
<td>the <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> where the destination window resides</td>
715
<td><p><span class="term"><em class="parameter"><code>xid</code></em> :</span></p></td>
716
<td>the windowing system id of the destination window.</td>
719
<td><p><span class="term"><em class="parameter"><code>protocol</code></em> :</span></p></td>
720
<td>location where the supported DND protocol is returned.</td>
723
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
724
<td>the windowing system id of the window where the drop should happen. This
725
may be <em class="parameter"><code>xid</code></em> or the id of a proxy window, or zero if <em class="parameter"><code>xid</code></em> doesn't
726
support Drag and Drop.</td>
730
<p class="since">Since 2.2</p>
733
<div class="refsect2">
734
<a name="GdkDragProtocol"></a><h3>enum GdkDragProtocol</h3>
735
<pre class="programlisting">typedef enum {
736
GDK_DRAG_PROTO_MOTIF,
738
GDK_DRAG_PROTO_ROOTWIN, /* A root window with nobody claiming
740
GDK_DRAG_PROTO_NONE, /* Not a valid drag window */
741
GDK_DRAG_PROTO_WIN32_DROPFILES, /* The simple WM_DROPFILES dnd */
742
GDK_DRAG_PROTO_OLE2, /* The complex OLE2 dnd (not implemented) */
743
GDK_DRAG_PROTO_LOCAL /* Intra-app */
747
Used in <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> to indicate the protocol according to
750
<div class="variablelist"><table border="0" class="variablelist">
752
<col align="left" valign="top">
757
<td><p><a name="GDK-DRAG-PROTO-MOTIF:CAPS"></a><span class="term"><code class="literal">GDK_DRAG_PROTO_MOTIF</code></span></p></td>
758
<td>The Motif DND protocol.
762
<td><p><a name="GDK-DRAG-PROTO-XDND:CAPS"></a><span class="term"><code class="literal">GDK_DRAG_PROTO_XDND</code></span></p></td>
763
<td>The Xdnd protocol.
767
<td><p><a name="GDK-DRAG-PROTO-ROOTWIN:CAPS"></a><span class="term"><code class="literal">GDK_DRAG_PROTO_ROOTWIN</code></span></p></td>
768
<td>An extension to the Xdnd protocol for
769
unclaimed root window drops.
773
<td><p><a name="GDK-DRAG-PROTO-NONE:CAPS"></a><span class="term"><code class="literal">GDK_DRAG_PROTO_NONE</code></span></p></td>
778
<td><p><a name="GDK-DRAG-PROTO-WIN32-DROPFILES:CAPS"></a><span class="term"><code class="literal">GDK_DRAG_PROTO_WIN32_DROPFILES</code></span></p></td>
779
<td>The simple WM_DROPFILES protocol.
783
<td><p><a name="GDK-DRAG-PROTO-OLE2:CAPS"></a><span class="term"><code class="literal">GDK_DRAG_PROTO_OLE2</code></span></p></td>
784
<td>The complex OLE2 DND protocol (not implemented).
788
<td><p><a name="GDK-DRAG-PROTO-LOCAL:CAPS"></a><span class="term"><code class="literal">GDK_DRAG_PROTO_LOCAL</code></span></p></td>
789
<td>Intra-application DND.
796
<div class="refsect2">
797
<a name="gdk-drag-context-unref"></a><h3>gdk_drag_context_unref ()</h3>
798
<pre class="programlisting"><span class="returnvalue">void</span> gdk_drag_context_unref (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);</pre>
799
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
800
<h3 class="title">Warning</h3>
801
<p><code class="literal">gdk_drag_context_unref</code> has been deprecated since version 2.2 and should not be used in newly-written code. Use <code class="function">g_object_unref()</code> instead.</p>
804
Deprecated function; use <code class="function">g_object_unref()</code> instead.
806
<div class="variablelist"><table border="0" class="variablelist">
808
<col align="left" valign="top">
812
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
813
<td>a <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a>.</td>
818
<div class="refsect2">
819
<a name="GdkDragContext"></a><h3>struct GdkDragContext</h3>
820
<pre class="programlisting">struct GdkDragContext {
821
GObject parent_instance;
824
GdkDragProtocol GSEAL (protocol);
826
gboolean GSEAL (is_source);
828
GdkWindow *GSEAL (source_window);
829
GdkWindow *GSEAL (dest_window);
831
GList *GSEAL (targets);
832
GdkDragAction GSEAL (actions);
833
GdkDragAction GSEAL (suggested_action);
834
GdkDragAction GSEAL (action);
836
guint32 GSEAL (start_time);
840
A <span class="structname">GdkDragContext</span> holds information about a
841
drag in progress. It is used on both source and destination sides.
843
<div class="variablelist"><table border="0" class="variablelist">
845
<col align="left" valign="top">
849
<td><p><span class="term"><span class="type">GObject</span> <em class="structfield"><code><a name="GdkDragContext.parent-instance"></a>parent_instance</code></em>;</span></p></td>
850
<td>the parent instance</td>
855
<div class="refsect2">
856
<a name="GdkDragAction"></a><h3>enum GdkDragAction</h3>
857
<pre class="programlisting">typedef enum {
858
GDK_ACTION_DEFAULT = 1 << 0,
859
GDK_ACTION_COPY = 1 << 1,
860
GDK_ACTION_MOVE = 1 << 2,
861
GDK_ACTION_LINK = 1 << 3,
862
GDK_ACTION_PRIVATE = 1 << 4,
863
GDK_ACTION_ASK = 1 << 5
867
Used in <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> to indicate what the destination
868
should do with the dropped data.
870
<div class="variablelist"><table border="0" class="variablelist">
872
<col align="left" valign="top">
877
<td><p><a name="GDK-ACTION-DEFAULT:CAPS"></a><span class="term"><code class="literal">GDK_ACTION_DEFAULT</code></span></p></td>
878
<td>Means nothing, and should not be used.
882
<td><p><a name="GDK-ACTION-COPY:CAPS"></a><span class="term"><code class="literal">GDK_ACTION_COPY</code></span></p></td>
887
<td><p><a name="GDK-ACTION-MOVE:CAPS"></a><span class="term"><code class="literal">GDK_ACTION_MOVE</code></span></p></td>
888
<td>Move the data, i.e. first copy it, then delete
889
it from the source using the DELETE target of the X selection protocol.
893
<td><p><a name="GDK-ACTION-LINK:CAPS"></a><span class="term"><code class="literal">GDK_ACTION_LINK</code></span></p></td>
894
<td>Add a link to the data. Note that this is only
895
useful if source and destination agree on what it means.
899
<td><p><a name="GDK-ACTION-PRIVATE:CAPS"></a><span class="term"><code class="literal">GDK_ACTION_PRIVATE</code></span></p></td>
900
<td>Special action which tells the source that the
901
destination will do something that the source doesn't understand.
905
<td><p><a name="GDK-ACTION-ASK:CAPS"></a><span class="term"><code class="literal">GDK_ACTION_ASK</code></span></p></td>
906
<td>Ask the user what to do with the data.
913
<div class="refsect2">
914
<a name="gdk-drag-status"></a><h3>gdk_drag_status ()</h3>
915
<pre class="programlisting"><span class="returnvalue">void</span> gdk_drag_status (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>,
916
<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragAction" title="enum GdkDragAction"><span class="type">GdkDragAction</span></a> action</code></em>,
917
<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);</pre>
919
Selects one of the actions offered by the drag source.
922
This function is called by the drag destination in response to
923
<a class="link" href="gdk2-Drag-and-Drop.html#gdk-drag-motion" title="gdk_drag_motion ()"><code class="function">gdk_drag_motion()</code></a> called by the drag source.
925
<div class="variablelist"><table border="0" class="variablelist">
927
<col align="left" valign="top">
932
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
933
<td>a <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a>.</td>
936
<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td>
937
<td>the selected action which will be taken when a drop happens,
938
or 0 to indicate that a drop will not be accepted.</td>
941
<td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td>
942
<td>the timestamp for this operation.</td>
948
<div class="refsect2">
949
<a name="gdk-drag-drop-succeeded"></a><h3>gdk_drag_drop_succeeded ()</h3>
950
<pre class="programlisting"><span class="returnvalue">gboolean</span> gdk_drag_drop_succeeded (<em class="parameter"><code><a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a> *context</code></em>);</pre>
952
Returns whether the dropped data has been successfully
953
transferred. This function is intended to be used while
954
handling a <a class="link" href="gdk2-Events.html#GDK-DROP-FINISHED:CAPS"><code class="literal">GDK_DROP_FINISHED</code></a> event, its return value is
955
meaningless at other times.
957
<div class="variablelist"><table border="0" class="variablelist">
959
<col align="left" valign="top">
964
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
965
<td>a <a class="link" href="gdk2-Drag-and-Drop.html#GdkDragContext" title="struct GdkDragContext"><span class="type">GdkDragContext</span></a>
969
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
971
<code class="literal">TRUE</code> if the drop was successful.</td>
975
<p class="since">Since 2.6</p>
981
Generated by GTK-Doc V1.18</div>
b'\\ No newline at end of file'