dnd.sgml 4.33 KB
Newer Older
Owen Taylor's avatar
Owen Taylor committed
1 2 3 4
<!-- ##### SECTION Title ##### -->
Drag and Drop

<!-- ##### SECTION Short_Description ##### -->
5
Functions for controlling drag and drop handling
Owen Taylor's avatar
Owen Taylor committed
6 7 8

<!-- ##### SECTION Long_Description ##### -->
<para>
Damon Chaplin's avatar
Damon Chaplin committed
9
These functions provide a low level interface for drag and drop.
Matthias Clasen's avatar
Matthias Clasen committed
10 11
The X backend of GDK supports both the Xdnd and Motif drag and drop protocols 
transparently, the Win32 backend supports the WM_DROPFILES protocol.
Damon Chaplin's avatar
Damon Chaplin committed
12 13 14 15 16 17
</para>
<para>
GTK+ provides a higher level abstraction based on top of these functions,
and so they are not normally needed in GTK+ applications.
See the <link linkend="gtk-Drag-and-Drop">Drag and Drop</link> section of
the GTK+ documentation for more information.
Owen Taylor's avatar
Owen Taylor committed
18 19 20 21 22 23 24
</para>

<!-- ##### SECTION See_Also ##### -->
<para>

</para>

Matthias Clasen's avatar
Matthias Clasen committed
25 26 27
<!-- ##### SECTION Stability_Level ##### -->


28 29 30
<!-- ##### SECTION Image ##### -->


Owen Taylor's avatar
Owen Taylor committed
31 32 33 34
<!-- ##### FUNCTION gdk_drag_get_selection ##### -->
<para>
</para>

35 36
@context: 
@Returns: 
Owen Taylor's avatar
Owen Taylor committed
37

38

Owen Taylor's avatar
Owen Taylor committed
39 40 41 42
<!-- ##### FUNCTION gdk_drag_abort ##### -->
<para>
</para>

43
@context: 
44
@time_: 
Owen Taylor's avatar
Owen Taylor committed
45 46 47 48 49 50


<!-- ##### FUNCTION gdk_drop_reply ##### -->
<para>
</para>

51 52
@context: 
@ok: 
53
@time_: 
Owen Taylor's avatar
Owen Taylor committed
54 55 56 57 58 59


<!-- ##### FUNCTION gdk_drag_context_new ##### -->
<para>
</para>

60
@void: 
61
@Returns: 
Owen Taylor's avatar
Owen Taylor committed
62 63 64 65 66 67


<!-- ##### FUNCTION gdk_drag_drop ##### -->
<para>
</para>

68
@context: 
69
@time_: 
Owen Taylor's avatar
Owen Taylor committed
70 71 72 73 74 75


<!-- ##### FUNCTION gdk_drag_find_window ##### -->
<para>
</para>

76 77 78 79 80 81
@context: 
@drag_window: 
@x_root: 
@y_root: 
@dest_window: 
@protocol: 
Owen Taylor's avatar
Owen Taylor committed
82 83


Soeren Sandmann's avatar
Soeren Sandmann committed
84 85 86 87 88 89 90 91 92 93 94 95 96 97
<!-- ##### FUNCTION gdk_drag_find_window_for_screen ##### -->
<para>

</para>

@context: 
@drag_window: 
@screen: 
@x_root: 
@y_root: 
@dest_window: 
@protocol: 


Owen Taylor's avatar
Owen Taylor committed
98 99 100 101
<!-- ##### FUNCTION gdk_drag_begin ##### -->
<para>
</para>

102 103 104
@window: 
@targets: 
@Returns: 
Owen Taylor's avatar
Owen Taylor committed
105 106 107 108 109 110


<!-- ##### FUNCTION gdk_drag_motion ##### -->
<para>
</para>

111 112 113 114 115 116 117
@context: 
@dest_window: 
@protocol: 
@x_root: 
@y_root: 
@suggested_action: 
@possible_actions: 
118
@time_: 
119
@Returns: 
Owen Taylor's avatar
Owen Taylor committed
120 121 122 123 124 125


<!-- ##### FUNCTION gdk_drop_finish ##### -->
<para>
</para>

126 127
@context: 
@success: 
128
@time_: 
Owen Taylor's avatar
Owen Taylor committed
129 130 131 132 133 134


<!-- ##### FUNCTION gdk_drag_get_protocol ##### -->
<para>
</para>

135 136 137
@xid: 
@protocol: 
@Returns: 
Owen Taylor's avatar
Owen Taylor committed
138 139


Owen Taylor's avatar
Owen Taylor committed
140 141 142 143 144 145 146 147 148 149 150
<!-- ##### FUNCTION gdk_drag_get_protocol_for_display ##### -->
<para>

</para>

@display: 
@xid: 
@protocol: 
@Returns: 


Owen Taylor's avatar
Owen Taylor committed
151 152
<!-- ##### ENUM GdkDragProtocol ##### -->
<para>
Matthias Clasen's avatar
Matthias Clasen committed
153
Used in #GdkDragContext to indicate the protocol according to
Matthias Clasen's avatar
Matthias Clasen committed
154
which DND is done.
Owen Taylor's avatar
Owen Taylor committed
155 156
</para>

Matthias Clasen's avatar
Matthias Clasen committed
157 158 159 160
@GDK_DRAG_PROTO_MOTIF: The Motif DND protocol.
@GDK_DRAG_PROTO_XDND: The Xdnd protocol.
@GDK_DRAG_PROTO_ROOTWIN: An extension to the Xdnd protocol for
  unclaimed root window drops.
Owen Taylor's avatar
Owen Taylor committed
161
@GDK_DRAG_PROTO_NONE: no protocol.
Matthias Clasen's avatar
Matthias Clasen committed
162
@GDK_DRAG_PROTO_WIN32_DROPFILES: The simple WM_DROPFILES protocol.
Owen Taylor's avatar
Owen Taylor committed
163
@GDK_DRAG_PROTO_OLE2: The complex OLE2 DND protocol (not implemented).
Matthias Clasen's avatar
Matthias Clasen committed
164
@GDK_DRAG_PROTO_LOCAL: Intra-application DND.
Owen Taylor's avatar
Owen Taylor committed
165 166 167

<!-- ##### STRUCT GdkDragContext ##### -->
<para>
Matthias Clasen's avatar
Matthias Clasen committed
168 169
A <structname>GdkDragContext</structname> holds information about a 
drag in progress. It is used on both source and destination sides.
Owen Taylor's avatar
Owen Taylor committed
170 171
</para>

Matthias Clasen's avatar
Matthias Clasen committed
172
@parent_instance: the parent instance
Matthias Clasen's avatar
Matthias Clasen committed
173

Owen Taylor's avatar
Owen Taylor committed
174 175
<!-- ##### ENUM GdkDragAction ##### -->
<para>
Matthias Clasen's avatar
Matthias Clasen committed
176 177
Used in #GdkDragContext to indicate what the destination
should do with the dropped data.
Owen Taylor's avatar
Owen Taylor committed
178 179
</para>

Matthias Clasen's avatar
Matthias Clasen committed
180
@GDK_ACTION_DEFAULT: Means nothing, and should not be used.
Owen Taylor's avatar
Owen Taylor committed
181
@GDK_ACTION_COPY: Copy the data.
Matthias Clasen's avatar
Matthias Clasen committed
182 183 184 185 186 187
@GDK_ACTION_MOVE: Move the data, i.e. first copy it, then delete
  it from the source using the DELETE target of the X selection protocol.
@GDK_ACTION_LINK: Add a link to the data. Note that this is only
  useful if source and destination agree on what it means.
@GDK_ACTION_PRIVATE: Special action which tells the source that the
  destination will do something that the source doesn't understand.
Owen Taylor's avatar
Owen Taylor committed
188
@GDK_ACTION_ASK: Ask the user what to do with the data.
Owen Taylor's avatar
Owen Taylor committed
189 190 191 192 193

<!-- ##### FUNCTION gdk_drag_status ##### -->
<para>
</para>

194 195
@context: 
@action: 
196
@time_: 
Owen Taylor's avatar
Owen Taylor committed
197 198


Matthias Clasen's avatar
Matthias Clasen committed
199 200 201 202 203 204 205 206 207
<!-- ##### FUNCTION gdk_drag_drop_succeeded ##### -->
<para>

</para>

@context: 
@Returns: 


Matthias Clasen's avatar
Matthias Clasen committed
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261
<!-- ##### FUNCTION gdk_drag_context_get_action ##### -->
<para>

</para>

@context: 
@Returns: 


<!-- ##### FUNCTION gdk_drag_context_get_actions ##### -->
<para>

</para>

@context: 
@Returns: 


<!-- ##### FUNCTION gdk_drag_context_get_suggested_action ##### -->
<para>

</para>

@context: 
@Returns: 


<!-- ##### FUNCTION gdk_drag_context_list_targets ##### -->
<para>

</para>

@context: 
@Returns: 


<!-- ##### FUNCTION gdk_drag_context_get_device ##### -->
<para>

</para>

@context: 
@Returns: 


<!-- ##### FUNCTION gdk_drag_context_set_device ##### -->
<para>

</para>

@context: 
@device: