<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="gdk4-Drag-and-Drop">
<refmeta>
<refentrytitle role="top_of_page" id="gdk4-Drag-and-Drop.top_of_page">Drag And Drop</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GDK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Drag And Drop</refname>
<refpurpose>Functions for controlling drag and drop handling</refpurpose>
</refnamediv>

<refsect1 id="gdk4-Drag-and-Drop.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-drag-drop-done">gdk_drag_drop_done</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkDrag"><returnvalue>GdkDrag</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-drag-begin">gdk_drag_begin</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkDisplay"><returnvalue>GdkDisplay</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-drag-get-display">gdk_drag_get_display</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkContentProvider"><returnvalue>GdkContentProvider</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-drag-get-content">gdk_drag_get_content</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkDragAction"><returnvalue>GdkDragAction</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-drag-get-actions">gdk_drag_get_actions</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkDragAction"><returnvalue>GdkDragAction</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-drag-get-selected-action">gdk_drag_get_selected_action</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-drag-get-formats">gdk_drag_get_formats</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkDevice"><returnvalue>GdkDevice</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-drag-get-device">gdk_drag_get_device</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkSurface"><returnvalue>GdkSurface</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-drag-get-surface">gdk_drag_get_surface</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkSurface"><returnvalue>GdkSurface</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-drag-get-drag-surface">gdk_drag_get_drag_surface</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-drag-set-hotspot">gdk_drag_set_hotspot</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-drag-action-is-unique">gdk_drag_action_is_unique</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-drag-surface-present">gdk_drag_surface_present</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="GdkDisplay"><returnvalue>GdkDisplay</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-drop-get-display">gdk_drop_get_display</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkDevice"><returnvalue>GdkDevice</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-drop-get-device">gdk_drop_get_device</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkSurface"><returnvalue>GdkSurface</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-drop-get-surface">gdk_drop_get_surface</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-drop-get-formats">gdk_drop_get_formats</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkDragAction"><returnvalue>GdkDragAction</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-drop-get-actions">gdk_drop_get_actions</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkDrag"><returnvalue>GdkDrag</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-drop-get-drag">gdk_drop_get_drag</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-drop-status">gdk_drop_status</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-drop-finish">gdk_drop_finish</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-drop-read-async">gdk_drop_read_async</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GInputStream"><returnvalue>GInputStream</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-drop-read-finish">gdk_drop_read_finish</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-drop-read-value-async">gdk_drop_read_value_async</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="GValue"><returnvalue>GValue</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-drop-read-value-finish">gdk_drop_read_value_finish</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="gdk4-Drag-and-Drop.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="GdkDragAction"><type>GdkDragAction</type></link></entry><entry role="property_name"><link linkend="GdkDrag--actions">actions</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GdkContentProvider"><type>GdkContentProvider</type></link>&#160;*</entry><entry role="property_name"><link linkend="GdkDrag--content">content</link></entry><entry role="property_flags">Read / Write / Construct&#160;Only</entry></row>
<row><entry role="property_type"><link linkend="GdkDevice"><type>GdkDevice</type></link>&#160;*</entry><entry role="property_name"><link linkend="GdkDrag--device">device</link></entry><entry role="property_flags">Read / Write / Construct&#160;Only</entry></row>
<row><entry role="property_type"><link linkend="GdkDisplay"><type>GdkDisplay</type></link>&#160;*</entry><entry role="property_name"><link linkend="GdkDrag--display">display</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>&#160;*</entry><entry role="property_name"><link linkend="GdkDrag--formats">formats</link></entry><entry role="property_flags">Read / Write / Construct&#160;Only</entry></row>
<row><entry role="property_type"><link linkend="GdkDragAction"><type>GdkDragAction</type></link></entry><entry role="property_name"><link linkend="GdkDrag--selected-action">selected-action</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GdkSurface"><type>GdkSurface</type></link>&#160;*</entry><entry role="property_name"><link linkend="GdkDrag--surface">surface</link></entry><entry role="property_flags">Read / Write / Construct&#160;Only</entry></row>
<row><entry role="property_type"><link linkend="GdkDragAction"><type>GdkDragAction</type></link></entry><entry role="property_name"><link linkend="GdkDrop--actions">actions</link></entry><entry role="property_flags">Read / Write / Construct&#160;Only</entry></row>
<row><entry role="property_type"><link linkend="GdkDevice"><type>GdkDevice</type></link>&#160;*</entry><entry role="property_name"><link linkend="GdkDrop--device">device</link></entry><entry role="property_flags">Read / Write / Construct&#160;Only</entry></row>
<row><entry role="property_type"><link linkend="GdkDisplay"><type>GdkDisplay</type></link>&#160;*</entry><entry role="property_name"><link linkend="GdkDrop--display">display</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="GdkDrag"><type>GdkDrag</type></link>&#160;*</entry><entry role="property_name"><link linkend="GdkDrop--drag">drag</link></entry><entry role="property_flags">Read / Write / Construct&#160;Only</entry></row>
<row><entry role="property_type"><link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>&#160;*</entry><entry role="property_name"><link linkend="GdkDrop--formats">formats</link></entry><entry role="property_flags">Read / Write / Construct&#160;Only</entry></row>
<row><entry role="property_type"><link linkend="GdkSurface"><type>GdkSurface</type></link>&#160;*</entry><entry role="property_name"><link linkend="GdkDrop--surface">surface</link></entry><entry role="property_flags">Read / Write / Construct&#160;Only</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="gdk4-Drag-and-Drop.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="signal_proto_type" colwidth="150px"/>
<colspec colname="signal_proto_name" colwidth="300px"/>
<colspec colname="signal_proto_flags" colwidth="200px"/>
<tbody>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GdkDrag-cancel">cancel</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GdkDrag-dnd-finished">dnd-finished</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GdkDrag-drop-performed">drop-performed</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<anchor id="GdkDrag"/><anchor id="GdkDrop"/><anchor id="GdkDragSurface"/><refsect1 id="gdk4-Drag-and-Drop.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GdkDrag-struct">GdkDrag</link></entry></row>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GdkDrop-struct">GdkDrop</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GdkDragCancelReason">GdkDragCancelReason</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GdkDragAction">GdkDragAction</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="GDK-ACTION-ALL:CAPS">GDK_ACTION_ALL</link></entry></row>


<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GdkDragSurface-struct">GdkDragSurface</link></entry></row>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GdkDragSurfaceInterface">GdkDragSurfaceInterface</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="gdk4-Drag-and-Drop.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GInterface">GInterface</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GdkDragSurface
    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> GdkDrag
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GdkDrop
</screen>
</refsect1>
<refsect1 id="gdk4-Drag-and-Drop.prerequisites" role="prerequisites">
<title role="prerequisites.title">Prerequisites</title>
<para>
GdkDragSurface requires
 <link linkend="GdkSurface">GdkSurface</link>.</para>

</refsect1>

<refsect1 id="gdk4-Drag-and-Drop.includes"><title>Includes</title><synopsis>#include &lt;gdk/gdk.h&gt;
</synopsis></refsect1>

<refsect1 id="gdk4-Drag-and-Drop.description" role="desc">
<title role="desc.title">Description</title>
<para>These functions provide a low-level interface for drag and drop.</para>
<para>The GdkDrag object represents the source side of an ongoing DND operation.
It is created when a drag is started, and stays alive for duration of
the DND operation. After a drag has been started with <link linkend="gdk-drag-begin"><function>gdk_drag_begin()</function></link>,
the caller gets informed about the status of the ongoing drag operation
with signals on the <link linkend="GdkDrag"><type>GdkDrag</type></link> object.</para>
<para>The GdkDrop object represents the target side of an ongoing DND operation.
Possible drop sites get informed about the status of the ongoing drag operation
with events of type <link linkend="GDK-DRAG-ENTER:CAPS"><literal>GDK_DRAG_ENTER</literal></link>, <link linkend="GDK-DRAG-LEAVE:CAPS"><literal>GDK_DRAG_LEAVE</literal></link>, <link linkend="GDK-DRAG-MOTION:CAPS"><literal>GDK_DRAG_MOTION</literal></link> and
<link linkend="GDK-DROP-START:CAPS"><literal>GDK_DROP_START</literal></link>. The <link linkend="GdkDrop"><type>GdkDrop</type></link> object can be obtained from these <link linkend="GdkEvents"><type>GdkEvents</type></link>
using <link linkend="gdk-dnd-event-get-drop"><function>gdk_dnd_event_get_drop()</function></link>.</para>
<para>The actual data transfer is initiated from the target side via an async
read, using one of the GdkDrop functions for this purpose: <link linkend="gdk-drop-read-async"><function>gdk_drop_read_async()</function></link>
or <link linkend="gdk-drop-read-value-async"><function>gdk_drop_read_value_async()</function></link>.</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="gtk4-Drag-and-Drop">Drag and Drop</link> section of the GTK documentation
for more information.</para>

</refsect1>
<refsect1 id="gdk4-Drag-and-Drop.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gdk-drag-drop-done" role="function">
<title>gdk_drag_drop_done&#160;()</title>
<indexterm zone="gdk-drag-drop-done"><primary>gdk_drag_drop_done</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_drag_drop_done (<parameter><link linkend="GdkDrag"><type>GdkDrag</type></link> *drag</parameter>,
                    <parameter><link linkend="gboolean"><type>gboolean</type></link> success</parameter>);</programlisting>
<para>Inform GDK if the drop ended successfully. Passing <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>
for <parameter>success</parameter>
 may trigger a drag cancellation animation.</para>
<para>This function is called by the drag source, and should
be the last call before dropping the reference to the
<parameter>drag</parameter>
.</para>
<para>The <link linkend="GdkDrag"><type>GdkDrag</type></link> will only take the first <link linkend="gdk-drag-drop-done"><function>gdk_drag_drop_done()</function></link>
call as effective, if this function is called multiple times,
all subsequent calls will be ignored.</para>
<refsect3 id="gdk-drag-drop-done.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>drag</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrag"><type>GdkDrag</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>success</para></entry>
<entry role="parameter_description"><para>whether the drag was ultimatively successful</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-drag-begin" role="function">
<title>gdk_drag_begin&#160;()</title>
<indexterm zone="gdk-drag-begin"><primary>gdk_drag_begin</primary></indexterm>
<programlisting language="C"><link linkend="GdkDrag"><returnvalue>GdkDrag</returnvalue></link>&#160;*
gdk_drag_begin (<parameter><link linkend="GdkSurface"><type>GdkSurface</type></link> *surface</parameter>,
                <parameter><link linkend="GdkDevice"><type>GdkDevice</type></link> *device</parameter>,
                <parameter><link linkend="GdkContentProvider"><type>GdkContentProvider</type></link> *content</parameter>,
                <parameter><link linkend="GdkDragAction"><type>GdkDragAction</type></link> actions</parameter>,
                <parameter><link linkend="double"><type>double</type></link> dx</parameter>,
                <parameter><link linkend="double"><type>double</type></link> dy</parameter>);</programlisting>
<para>Starts a drag and creates a new drag context for it.</para>
<para>This function is called by the drag source. After this call, you
probably want to set up the drag icon using the surface returned
by <link linkend="gdk-drag-get-drag-surface"><function>gdk_drag_get_drag_surface()</function></link>.</para>
<para>This function returns a reference to the GdkDrag object, but GTK
keeps its own reference as well, as long as the DND operation is
going on.</para>
<para>Note: if <parameter>actions</parameter>
 include <link linkend="GDK-ACTION-MOVE:CAPS"><literal>GDK_ACTION_MOVE</literal></link>, you need to listen for
the <link linkend="GdkDrag-dnd-finished"><type>“dnd-finished”</type></link> signal and delete the data at the source
if <link linkend="gdk-drag-get-selected-action"><function>gdk_drag_get_selected_action()</function></link> returns <link linkend="GDK-ACTION-MOVE:CAPS"><literal>GDK_ACTION_MOVE</literal></link>.</para>
<refsect3 id="gdk-drag-begin.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>surface</para></entry>
<entry role="parameter_description"><para>the source surface for this drag</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>device</para></entry>
<entry role="parameter_description"><para>the device that controls this drag</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>content</para></entry>
<entry role="parameter_description"><para>the offered content. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>actions</para></entry>
<entry role="parameter_description"><para>the actions supported by this drag</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>dx</para></entry>
<entry role="parameter_description"><para>the x offset to <parameter>device</parameter>
's position where the drag nominally started</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>dy</para></entry>
<entry role="parameter_description"><para>the y offset to <parameter>device</parameter>
's position where the drag nominally started</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-drag-begin.returns" role="returns">
<title>Returns</title>
<para>a newly created <link linkend="GdkDrag"><type>GdkDrag</type></link> or
<link linkend="NULL:CAPS"><literal>NULL</literal></link> on error. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>][<acronym>nullable</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-drag-get-display" role="function">
<title>gdk_drag_get_display&#160;()</title>
<indexterm zone="gdk-drag-get-display"><primary>gdk_drag_get_display</primary></indexterm>
<programlisting language="C"><link linkend="GdkDisplay"><returnvalue>GdkDisplay</returnvalue></link>&#160;*
gdk_drag_get_display (<parameter><link linkend="GdkDrag"><type>GdkDrag</type></link> *drag</parameter>);</programlisting>
<para>Gets the <link linkend="GdkDisplay"><type>GdkDisplay</type></link> that the drag object was created for.</para>
<refsect3 id="gdk-drag-get-display.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>drag</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrag"><type>GdkDrag</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-drag-get-display.returns" role="returns">
<title>Returns</title>
<para>a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-drag-get-content" role="function">
<title>gdk_drag_get_content&#160;()</title>
<indexterm zone="gdk-drag-get-content"><primary>gdk_drag_get_content</primary></indexterm>
<programlisting language="C"><link linkend="GdkContentProvider"><returnvalue>GdkContentProvider</returnvalue></link>&#160;*
gdk_drag_get_content (<parameter><link linkend="GdkDrag"><type>GdkDrag</type></link> *drag</parameter>);</programlisting>
<para>Returns the <link linkend="GdkContentProvider"><type>GdkContentProvider</type></link> associated to the GdkDrag object.</para>
<refsect3 id="gdk-drag-get-content.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>drag</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrag"><type>GdkDrag</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-drag-get-content.returns" role="returns">
<title>Returns</title>
<para>The <link linkend="GdkContentProvider"><type>GdkContentProvider</type></link> associated to <parameter>drag</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-drag-get-actions" role="function">
<title>gdk_drag_get_actions&#160;()</title>
<indexterm zone="gdk-drag-get-actions"><primary>gdk_drag_get_actions</primary></indexterm>
<programlisting language="C"><link linkend="GdkDragAction"><returnvalue>GdkDragAction</returnvalue></link>
gdk_drag_get_actions (<parameter><link linkend="GdkDrag"><type>GdkDrag</type></link> *drag</parameter>);</programlisting>
<para>Determines the bitmask of possible actions proposed by the source.</para>
<refsect3 id="gdk-drag-get-actions.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>drag</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrag"><type>GdkDrag</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-drag-get-actions.returns" role="returns">
<title>Returns</title>
<para> the <link linkend="GdkDragAction"><type>GdkDragAction</type></link> flags</para>
</refsect3></refsect2>
<refsect2 id="gdk-drag-get-selected-action" role="function">
<title>gdk_drag_get_selected_action&#160;()</title>
<indexterm zone="gdk-drag-get-selected-action"><primary>gdk_drag_get_selected_action</primary></indexterm>
<programlisting language="C"><link linkend="GdkDragAction"><returnvalue>GdkDragAction</returnvalue></link>
gdk_drag_get_selected_action (<parameter><link linkend="GdkDrag"><type>GdkDrag</type></link> *drag</parameter>);</programlisting>
<para>Determines the action chosen by the drag destination.</para>
<refsect3 id="gdk-drag-get-selected-action.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>drag</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrag"><type>GdkDrag</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-drag-get-selected-action.returns" role="returns">
<title>Returns</title>
<para> a <link linkend="GdkDragAction"><type>GdkDragAction</type></link> value</para>
</refsect3></refsect2>
<refsect2 id="gdk-drag-get-formats" role="function">
<title>gdk_drag_get_formats&#160;()</title>
<indexterm zone="gdk-drag-get-formats"><primary>gdk_drag_get_formats</primary></indexterm>
<programlisting language="C"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
gdk_drag_get_formats (<parameter><link linkend="GdkDrag"><type>GdkDrag</type></link> *drag</parameter>);</programlisting>
<para>Retrieves the formats supported by this GdkDrag object.</para>
<refsect3 id="gdk-drag-get-formats.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>drag</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrag"><type>GdkDrag</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-drag-get-formats.returns" role="returns">
<title>Returns</title>
<para>a <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-drag-get-device" role="function">
<title>gdk_drag_get_device&#160;()</title>
<indexterm zone="gdk-drag-get-device"><primary>gdk_drag_get_device</primary></indexterm>
<programlisting language="C"><link linkend="GdkDevice"><returnvalue>GdkDevice</returnvalue></link>&#160;*
gdk_drag_get_device (<parameter><link linkend="GdkDrag"><type>GdkDrag</type></link> *drag</parameter>);</programlisting>
<para>Returns the <link linkend="GdkDevice"><type>GdkDevice</type></link> associated to the GdkDrag object.</para>
<refsect3 id="gdk-drag-get-device.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>drag</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrag"><type>GdkDrag</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-drag-get-device.returns" role="returns">
<title>Returns</title>
<para>The <link linkend="GdkDevice"><type>GdkDevice</type></link> associated to <parameter>drag</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-drag-get-surface" role="function">
<title>gdk_drag_get_surface&#160;()</title>
<indexterm zone="gdk-drag-get-surface"><primary>gdk_drag_get_surface</primary></indexterm>
<programlisting language="C"><link linkend="GdkSurface"><returnvalue>GdkSurface</returnvalue></link>&#160;*
gdk_drag_get_surface (<parameter><link linkend="GdkDrag"><type>GdkDrag</type></link> *drag</parameter>);</programlisting>
<para>Returns the <link linkend="GdkSurface"><type>GdkSurface</type></link> where the drag originates.</para>
<refsect3 id="gdk-drag-get-surface.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>drag</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrag"><type>GdkDrag</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-drag-get-surface.returns" role="returns">
<title>Returns</title>
<para>The <link linkend="GdkSurface"><type>GdkSurface</type></link> where the drag originates. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-drag-get-drag-surface" role="function">
<title>gdk_drag_get_drag_surface&#160;()</title>
<indexterm zone="gdk-drag-get-drag-surface"><primary>gdk_drag_get_drag_surface</primary></indexterm>
<programlisting language="C"><link linkend="GdkSurface"><returnvalue>GdkSurface</returnvalue></link>&#160;*
gdk_drag_get_drag_surface (<parameter><link linkend="GdkDrag"><type>GdkDrag</type></link> *drag</parameter>);</programlisting>
<para>Returns the surface on which the drag icon should be rendered
during the drag operation. Note that the surface may not be
available until the drag operation has begun. GDK will move
the surface in accordance with the ongoing drag operation.
The surface is owned by <parameter>drag</parameter>
 and will be destroyed when
the drag operation is over.</para>
<refsect3 id="gdk-drag-get-drag-surface.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>drag</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrag"><type>GdkDrag</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-drag-get-drag-surface.returns" role="returns">
<title>Returns</title>
<para>the drag surface, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-drag-set-hotspot" role="function">
<title>gdk_drag_set_hotspot&#160;()</title>
<indexterm zone="gdk-drag-set-hotspot"><primary>gdk_drag_set_hotspot</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_drag_set_hotspot (<parameter><link linkend="GdkDrag"><type>GdkDrag</type></link> *drag</parameter>,
                      <parameter><link linkend="int"><type>int</type></link> hot_x</parameter>,
                      <parameter><link linkend="int"><type>int</type></link> hot_y</parameter>);</programlisting>
<para>Sets the position of the drag surface that will be kept
under the cursor hotspot. Initially, the hotspot is at the
top left corner of the drag surface.</para>
<refsect3 id="gdk-drag-set-hotspot.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>drag</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrag"><type>GdkDrag</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>hot_x</para></entry>
<entry role="parameter_description"><para>x coordinate of the drag surface hotspot</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>hot_y</para></entry>
<entry role="parameter_description"><para>y coordinate of the drag surface hotspot</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-drag-action-is-unique" role="function">
<title>gdk_drag_action_is_unique&#160;()</title>
<indexterm zone="gdk-drag-action-is-unique"><primary>gdk_drag_action_is_unique</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gdk_drag_action_is_unique (<parameter><link linkend="GdkDragAction"><type>GdkDragAction</type></link> action</parameter>);</programlisting>
<para>Checks if <parameter>action</parameter>
 represents a single action or if it
includes multiple flags that can be selected from.</para>
<para>When <parameter>action</parameter>
 is 0 - ie no action was given, <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>
is returned.</para>
<refsect3 id="gdk-drag-action-is-unique.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>action</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDragAction"><type>GdkDragAction</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-drag-action-is-unique.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if exactly one action was given</para>
</refsect3></refsect2>
<refsect2 id="gdk-drag-surface-present" role="function">
<title>gdk_drag_surface_present&#160;()</title>
<indexterm zone="gdk-drag-surface-present"><primary>gdk_drag_surface_present</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gdk_drag_surface_present (<parameter><link linkend="GdkDragSurface"><type>GdkDragSurface</type></link> *drag_surface</parameter>,
                          <parameter><link linkend="int"><type>int</type></link> width</parameter>,
                          <parameter><link linkend="int"><type>int</type></link> height</parameter>);</programlisting>
<para>Present <parameter>drag_surface</parameter>
.</para>
<refsect3 id="gdk-drag-surface-present.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>drag_surface</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkDragSurface"><type>GdkDragSurface</type></link> to show</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>width</para></entry>
<entry role="parameter_description"><para>the unconstrained drag_surface width to layout</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>height</para></entry>
<entry role="parameter_description"><para>the unconstrained drag_surface height to layout</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-drag-surface-present.returns" role="returns">
<title>Returns</title>
<para> <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if it failed to be presented, otherwise <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>.</para>
</refsect3></refsect2>
<refsect2 id="gdk-drop-get-display" role="function">
<title>gdk_drop_get_display&#160;()</title>
<indexterm zone="gdk-drop-get-display"><primary>gdk_drop_get_display</primary></indexterm>
<programlisting language="C"><link linkend="GdkDisplay"><returnvalue>GdkDisplay</returnvalue></link>&#160;*
gdk_drop_get_display (<parameter><link linkend="GdkDrop"><type>GdkDrop</type></link> *self</parameter>);</programlisting>
<para>Gets the <link linkend="GdkDisplay"><type>GdkDisplay</type></link> that <parameter>self</parameter>
 was created for.</para>
<refsect3 id="gdk-drop-get-display.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrop"><type>GdkDrop</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-drop-get-display.returns" role="returns">
<title>Returns</title>
<para>a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-drop-get-device" role="function">
<title>gdk_drop_get_device&#160;()</title>
<indexterm zone="gdk-drop-get-device"><primary>gdk_drop_get_device</primary></indexterm>
<programlisting language="C"><link linkend="GdkDevice"><returnvalue>GdkDevice</returnvalue></link>&#160;*
gdk_drop_get_device (<parameter><link linkend="GdkDrop"><type>GdkDrop</type></link> *self</parameter>);</programlisting>
<para>Returns the <link linkend="GdkDevice"><type>GdkDevice</type></link> performing the drop.</para>
<refsect3 id="gdk-drop-get-device.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrop"><type>GdkDrop</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-drop-get-device.returns" role="returns">
<title>Returns</title>
<para>The <link linkend="GdkDevice"><type>GdkDevice</type></link> performing the drop. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-drop-get-surface" role="function">
<title>gdk_drop_get_surface&#160;()</title>
<indexterm zone="gdk-drop-get-surface"><primary>gdk_drop_get_surface</primary></indexterm>
<programlisting language="C"><link linkend="GdkSurface"><returnvalue>GdkSurface</returnvalue></link>&#160;*
gdk_drop_get_surface (<parameter><link linkend="GdkDrop"><type>GdkDrop</type></link> *self</parameter>);</programlisting>
<para>Returns the <link linkend="GdkSurface"><type>GdkSurface</type></link> performing the drop.</para>
<refsect3 id="gdk-drop-get-surface.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrop"><type>GdkDrop</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-drop-get-surface.returns" role="returns">
<title>Returns</title>
<para>The <link linkend="GdkSurface"><type>GdkSurface</type></link> performing the drop. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-drop-get-formats" role="function">
<title>gdk_drop_get_formats&#160;()</title>
<indexterm zone="gdk-drop-get-formats"><primary>gdk_drop_get_formats</primary></indexterm>
<programlisting language="C"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
gdk_drop_get_formats (<parameter><link linkend="GdkDrop"><type>GdkDrop</type></link> *self</parameter>);</programlisting>
<para>Returns the <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> that the drop offers the data
to be read in.</para>
<refsect3 id="gdk-drop-get-formats.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrop"><type>GdkDrop</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-drop-get-formats.returns" role="returns">
<title>Returns</title>
<para>The possible <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-drop-get-actions" role="function">
<title>gdk_drop_get_actions&#160;()</title>
<indexterm zone="gdk-drop-get-actions"><primary>gdk_drop_get_actions</primary></indexterm>
<programlisting language="C"><link linkend="GdkDragAction"><returnvalue>GdkDragAction</returnvalue></link>
gdk_drop_get_actions (<parameter><link linkend="GdkDrop"><type>GdkDrop</type></link> *self</parameter>);</programlisting>
<para>Returns the possible actions for this <link linkend="GdkDrop"><type>GdkDrop</type></link>. If this value
contains multiple actions - ie <link linkend="gdk-drag-action-is-unique"><function>gdk_drag_action_is_unique()</function></link>
returns <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> for the result - <link linkend="gdk-drop-finish"><function>gdk_drop_finish()</function></link> must choose
the action to use when accepting the drop. This will only
happen if you passed <link linkend="GDK-ACTION-ASK:CAPS"><literal>GDK_ACTION_ASK</literal></link> as one of the possible
actions in <link linkend="gdk-drop-status"><function>gdk_drop_status()</function></link>. <link linkend="GDK-ACTION-ASK:CAPS"><literal>GDK_ACTION_ASK</literal></link> itself will not
be included in the actions returned by this function.</para>
<para>This value may change over the lifetime of the <link linkend="GdkDrop"><type>GdkDrop</type></link> both
as a response to source side actions as well as to calls to
<link linkend="gdk-drop-status"><function>gdk_drop_status()</function></link> or <link linkend="gdk-drop-finish"><function>gdk_drop_finish()</function></link>. The source side will
not change this value anymore once a drop has started.</para>
<refsect3 id="gdk-drop-get-actions.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrop"><type>GdkDrop</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-drop-get-actions.returns" role="returns">
<title>Returns</title>
<para> The possible <link linkend="GdkDragActions"><type>GdkDragActions</type></link></para>
</refsect3></refsect2>
<refsect2 id="gdk-drop-get-drag" role="function">
<title>gdk_drop_get_drag&#160;()</title>
<indexterm zone="gdk-drop-get-drag"><primary>gdk_drop_get_drag</primary></indexterm>
<programlisting language="C"><link linkend="GdkDrag"><returnvalue>GdkDrag</returnvalue></link>&#160;*
gdk_drop_get_drag (<parameter><link linkend="GdkDrop"><type>GdkDrop</type></link> *self</parameter>);</programlisting>
<para>If this is an in-app drag-and-drop operation, returns the <link linkend="GdkDrag"><type>GdkDrag</type></link>
that corresponds to this drop.</para>
<para>If it is not, <link linkend="NULL:CAPS"><literal>NULL</literal></link> is returned.</para>
<refsect3 id="gdk-drop-get-drag.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrop"><type>GdkDrop</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-drop-get-drag.returns" role="returns">
<title>Returns</title>
<para>the corresponding <link linkend="GdkDrag"><type>GdkDrag</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>][<acronym>nullable</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-drop-status" role="function">
<title>gdk_drop_status&#160;()</title>
<indexterm zone="gdk-drop-status"><primary>gdk_drop_status</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_drop_status (<parameter><link linkend="GdkDrop"><type>GdkDrop</type></link> *self</parameter>,
                 <parameter><link linkend="GdkDragAction"><type>GdkDragAction</type></link> actions</parameter>,
                 <parameter><link linkend="GdkDragAction"><type>GdkDragAction</type></link> preferred</parameter>);</programlisting>
<para>Selects all actions that are potentially supported by the destination.</para>
<para>When calling this function, do not restrict the passed in actions to
the ones provided by <link linkend="gdk-drop-get-actions"><function>gdk_drop_get_actions()</function></link>. Those actions may
change in the future, even depending on the actions you provide here.</para>
<para>The <parameter>preferred</parameter>
 action is a hint to the drag'n'drop mechanism about which
action to use when multiple actions are possible.</para>
<para>This function should be called by drag destinations in response to
<link linkend="GDK-DRAG-ENTER:CAPS"><literal>GDK_DRAG_ENTER</literal></link> or <link linkend="GDK-DRAG-MOTION:CAPS"><literal>GDK_DRAG_MOTION</literal></link> events. If the destination does
not yet know the exact actions it supports, it should set any possible
actions first and then later call this function again.</para>
<refsect3 id="gdk-drop-status.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrop"><type>GdkDrop</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>actions</para></entry>
<entry role="parameter_description"><para>Supported actions of the destination, or 0 to indicate
that a drop will not be accepted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>preferred</para></entry>
<entry role="parameter_description"><para>A unique action that's a member of <parameter>actions</parameter>
indicating the
preferred action.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-drop-finish" role="function">
<title>gdk_drop_finish&#160;()</title>
<indexterm zone="gdk-drop-finish"><primary>gdk_drop_finish</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_drop_finish (<parameter><link linkend="GdkDrop"><type>GdkDrop</type></link> *self</parameter>,
                 <parameter><link linkend="GdkDragAction"><type>GdkDragAction</type></link> action</parameter>);</programlisting>
<para>Ends the drag operation after a drop.</para>
<para>The <parameter>action</parameter>
 must be a single action selected from the actions
available via <link linkend="gdk-drop-get-actions"><function>gdk_drop_get_actions()</function></link>.</para>
<refsect3 id="gdk-drop-finish.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrop"><type>GdkDrop</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>action</para></entry>
<entry role="parameter_description"><para>the action performed by the destination or 0 if the drop
failed</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-drop-read-async" role="function">
<title>gdk_drop_read_async&#160;()</title>
<indexterm zone="gdk-drop-read-async"><primary>gdk_drop_read_async</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_drop_read_async (<parameter><link linkend="GdkDrop"><type>GdkDrop</type></link> *self</parameter>,
                     <parameter>const <link linkend="char"><type>char</type></link> **mime_types</parameter>,
                     <parameter><link linkend="int"><type>int</type></link> io_priority</parameter>,
                     <parameter><link linkend="GCancellable"><type>GCancellable</type></link> *cancellable</parameter>,
                     <parameter><link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> callback</parameter>,
                     <parameter><link linkend="gpointer"><type>gpointer</type></link> user_data</parameter>);</programlisting>
<para>Asynchronously read the dropped data from a <link linkend="GdkDrop"><type>GdkDrop</type></link>
in a format that complies with one of the mime types.</para>
<refsect3 id="gdk-drop-read-async.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrop"><type>GdkDrop</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>mime_types</para></entry>
<entry role="parameter_description"><para>pointer to an array of mime types. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>array</acronym> zero-terminated=1][<acronym>element-type</acronym> utf8]</emphasis></entry></row>
<row><entry role="parameter_name"><para>io_priority</para></entry>
<entry role="parameter_description"><para>the io priority for the read operation</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>cancellable</para></entry>
<entry role="parameter_description"><para>optional <link linkend="GCancellable"><type>GCancellable</type></link> object,
<link linkend="NULL:CAPS"><literal>NULL</literal></link> to ignore. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>callback</para></entry>
<entry role="parameter_description"><para>a <link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> to call when
the request is satisfied. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>scope async</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>user_data</para></entry>
<entry role="parameter_description"><para>the data to pass to <parameter>callback</parameter>
. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>closure</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-drop-read-finish" role="function">
<title>gdk_drop_read_finish&#160;()</title>
<indexterm zone="gdk-drop-read-finish"><primary>gdk_drop_read_finish</primary></indexterm>
<programlisting language="C"><link linkend="GInputStream"><returnvalue>GInputStream</returnvalue></link>&#160;*
gdk_drop_read_finish (<parameter><link linkend="GdkDrop"><type>GdkDrop</type></link> *self</parameter>,
                      <parameter><link linkend="GAsyncResult"><type>GAsyncResult</type></link> *result</parameter>,
                      <parameter>const <link linkend="char"><type>char</type></link> **out_mime_type</parameter>,
                      <parameter><link linkend="GError"><type>GError</type></link> **error</parameter>);</programlisting>
<para>Finishes an async drop read operation, see <link linkend="gdk-drop-read-async"><function>gdk_drop_read_async()</function></link>.</para>
<refsect3 id="gdk-drop-read-finish.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrop"><type>GdkDrop</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>result</para></entry>
<entry role="parameter_description"><para>a <link linkend="GAsyncResult"><type>GAsyncResult</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>out_mime_type</para></entry>
<entry role="parameter_description"><para>return location for the used mime type. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>type</acronym> utf8]</emphasis></entry></row>
<row><entry role="parameter_name"><para>error</para></entry>
<entry role="parameter_description"><para>location to store error information on failure, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-drop-read-finish.returns" role="returns">
<title>Returns</title>
<para>the <link linkend="GInputStream"><type>GInputStream</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-drop-read-value-async" role="function">
<title>gdk_drop_read_value_async&#160;()</title>
<indexterm zone="gdk-drop-read-value-async"><primary>gdk_drop_read_value_async</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_drop_read_value_async (<parameter><link linkend="GdkDrop"><type>GdkDrop</type></link> *self</parameter>,
                           <parameter><link linkend="GType"><type>GType</type></link> type</parameter>,
                           <parameter><link linkend="int"><type>int</type></link> io_priority</parameter>,
                           <parameter><link linkend="GCancellable"><type>GCancellable</type></link> *cancellable</parameter>,
                           <parameter><link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> callback</parameter>,
                           <parameter><link linkend="gpointer"><type>gpointer</type></link> user_data</parameter>);</programlisting>
<para>Asynchronously request the drag operation's contents converted to the given
<parameter>type</parameter>
. When the operation is finished <parameter>callback</parameter>
 will be called. 
You can then call <link linkend="gdk-drop-read-value-finish"><function>gdk_drop_read_value_finish()</function></link> to get the resulting
<link linkend="GValue"><type>GValue</type></link>.</para>
<para>For local drag'n'drop operations that are available in the given <link linkend="GType"><type>GType</type></link>, the
value will be copied directly. Otherwise, GDK will try to use
<link linkend="gdk-content-deserialize-async"><function>gdk_content_deserialize_async()</function></link> to convert the data.</para>
<refsect3 id="gdk-drop-read-value-async.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrop"><type>GdkDrop</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>type</para></entry>
<entry role="parameter_description"><para>a <link linkend="GType"><type>GType</type></link> to read</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>io_priority</para></entry>
<entry role="parameter_description"><para>the <link linkend="io-priority">I/O priority</link>
of the request. </para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>cancellable</para></entry>
<entry role="parameter_description"><para>optional <link linkend="GCancellable"><type>GCancellable</type></link> object, <link linkend="NULL:CAPS"><literal>NULL</literal></link> to ignore. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>callback</para></entry>
<entry role="parameter_description"><para>callback to call when the request is satisfied. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>scope async</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>user_data</para></entry>
<entry role="parameter_description"><para>the data to pass to callback function. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>closure</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-drop-read-value-finish" role="function">
<title>gdk_drop_read_value_finish&#160;()</title>
<indexterm zone="gdk-drop-read-value-finish"><primary>gdk_drop_read_value_finish</primary></indexterm>
<programlisting language="C">const <link linkend="GValue"><returnvalue>GValue</returnvalue></link>&#160;*
gdk_drop_read_value_finish (<parameter><link linkend="GdkDrop"><type>GdkDrop</type></link> *self</parameter>,
                            <parameter><link linkend="GAsyncResult"><type>GAsyncResult</type></link> *result</parameter>,
                            <parameter><link linkend="GError"><type>GError</type></link> **error</parameter>);</programlisting>
<para>Finishes an async drop read started with
<link linkend="gdk-drop-read-value-async"><function>gdk_drop_read_value_async()</function></link>.</para>
<refsect3 id="gdk-drop-read-value-finish.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkDrop"><type>GdkDrop</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>result</para></entry>
<entry role="parameter_description"><para>a <link linkend="GAsyncResult"><type>GAsyncResult</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>error</para></entry>
<entry role="parameter_description"><para>a <link linkend="GError"><type>GError</type></link> location to store the error occurring, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to
ignore.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-drop-read-value-finish.returns" role="returns">
<title>Returns</title>
<para>a <link linkend="GValue"><type>GValue</type></link> containing the result. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="gdk4-Drag-and-Drop.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GdkDrag-struct" role="struct">
<title>GdkDrag</title>
<indexterm zone="GdkDrag-struct"><primary>GdkDrag</primary></indexterm>
<programlisting language="C">typedef struct _GdkDrag GdkDrag;</programlisting>
<para>The GdkDrag struct contains only private fields and
should not be accessed directly.</para>
</refsect2>
<refsect2 id="GdkDrop-struct" role="struct">
<title>GdkDrop</title>
<indexterm zone="GdkDrop-struct"><primary>GdkDrop</primary></indexterm>
<programlisting language="C">typedef struct _GdkDrop GdkDrop;</programlisting>
<para>The GdkDrop struct contains only private fields and
should not be accessed directly.</para>
</refsect2>
<refsect2 id="GdkDragCancelReason" role="enum">
<title>enum GdkDragCancelReason</title>
<indexterm zone="GdkDragCancelReason"><primary>GdkDragCancelReason</primary></indexterm>
<para>Used in <link linkend="GdkDrag"><type>GdkDrag</type></link> to the reason of a cancelled DND operation.</para>
<refsect3 id="GdkDragCancelReason.members" role="enum_members">
<title>Members</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="enum_members_name" colwidth="300px"/>
<colspec colname="enum_members_description"/>
<colspec colname="enum_members_annotations" colwidth="200px"/>
<tbody>
<row role="constant"><entry role="enum_member_name"><para id="GDK-DRAG-CANCEL-NO-TARGET:CAPS">GDK_DRAG_CANCEL_NO_TARGET</para></entry>
<entry role="enum_member_description"><para>There is no suitable drop target.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-DRAG-CANCEL-USER-CANCELLED:CAPS">GDK_DRAG_CANCEL_USER_CANCELLED</para></entry>
<entry role="enum_member_description"><para>Drag cancelled by the user</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-DRAG-CANCEL-ERROR:CAPS">GDK_DRAG_CANCEL_ERROR</para></entry>
<entry role="enum_member_description"><para>Unspecified error.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="GdkDragAction" role="enum">
<title>enum GdkDragAction</title>
<indexterm zone="GdkDragAction"><primary>GdkDragAction</primary></indexterm>
<para>Used in <link linkend="GdkDrop"><type>GdkDrop</type></link> and <link linkend="GdkDrag"><type>GdkDrag</type></link> to indicate the actions that the
destination can and should do with the dropped data.</para>
<refsect3 id="GdkDragAction.members" role="enum_members">
<title>Members</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="enum_members_name" colwidth="300px"/>
<colspec colname="enum_members_description"/>
<colspec colname="enum_members_annotations" colwidth="200px"/>
<tbody>
<row role="constant"><entry role="enum_member_name"><para id="GDK-ACTION-COPY:CAPS">GDK_ACTION_COPY</para></entry>
<entry role="enum_member_description"><para>Copy the data.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-ACTION-MOVE:CAPS">GDK_ACTION_MOVE</para></entry>
<entry role="enum_member_description"><para>Move the data, i.e. first copy it, then delete
it from the source using the DELETE target of the X selection protocol.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-ACTION-LINK:CAPS">GDK_ACTION_LINK</para></entry>
<entry role="enum_member_description"><para>Add a link to the data. Note that this is only
useful if source and destination agree on what it means, and is not
supported on all platforms.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GDK-ACTION-ASK:CAPS">GDK_ACTION_ASK</para></entry>
<entry role="enum_member_description"><para>Ask the user what to do with the data.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="GDK-ACTION-ALL:CAPS" role="macro">
<title>GDK_ACTION_ALL</title>
<indexterm zone="GDK-ACTION-ALL:CAPS"><primary>GDK_ACTION_ALL</primary></indexterm>
<programlisting language="C">#define GDK_ACTION_ALL (GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK)
</programlisting>
<para>Defines all possible DND actions. This can be used in <link linkend="gdk-drop-status"><function>gdk_drop_status()</function></link>
messages when any drop can be accepted or a more specific drop method
is not yet known.</para>
</refsect2>
<refsect2 id="GdkDragSurface-struct" role="struct">
<title>GdkDragSurface</title>
<indexterm zone="GdkDragSurface-struct"><primary>GdkDragSurface</primary></indexterm>
<programlisting language="C">typedef struct _GdkDragSurface GdkDragSurface;</programlisting>
<para>A <link linkend="GdkDragSurface"><type>GdkDragSurface</type></link> is an interface implemented by <link linkend="GdkSurfaces"><type>GdkSurfaces</type></link> used
during a DND operation.</para>
</refsect2>
<refsect2 id="GdkDragSurfaceInterface" role="struct">
<title>GdkDragSurfaceInterface</title>
<indexterm zone="GdkDragSurfaceInterface"><primary>GdkDragSurfaceInterface</primary></indexterm>
<programlisting language="C">typedef struct {
  GTypeInterface g_iface;

  gboolean (* present) (GdkDragSurface *drag_surface,
                        int             width,
                        int             height);
} GdkDragSurfaceInterface;
</programlisting>
</refsect2>

</refsect1>
<refsect1 id="gdk4-Drag-and-Drop.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GdkDrag--actions" role="property"><title>The <literal>“actions”</literal> property</title>
<indexterm zone="GdkDrag--actions"><primary>GdkDrag:actions</primary></indexterm>
<programlisting>  “actions”                  <link linkend="GdkDragAction"><type>GdkDragAction</type></link></programlisting>
<para>The possible actions.</para><para>Owner: GdkDrag</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GdkDrag--content" role="property"><title>The <literal>“content”</literal> property</title>
<indexterm zone="GdkDrag--content"><primary>GdkDrag:content</primary></indexterm>
<programlisting>  “content”                  <link linkend="GdkContentProvider"><type>GdkContentProvider</type></link>&#160;*</programlisting>
<para>The <link linkend="GdkContentProvider"><type>GdkContentProvider</type></link>.</para>
<para>Owner: GdkDrag</para>
<para>Flags: Read / Write / Construct&#160;Only</para>
</refsect2>
<refsect2 id="GdkDrag--device" role="property"><title>The <literal>“device”</literal> property</title>
<indexterm zone="GdkDrag--device"><primary>GdkDrag:device</primary></indexterm>
<programlisting>  “device”                   <link linkend="GdkDevice"><type>GdkDevice</type></link>&#160;*</programlisting>
<para>The <link linkend="GdkDevice"><type>GdkDevice</type></link> that is performing the drag.</para>
<para>Owner: GdkDrag</para>
<para>Flags: Read / Write / Construct&#160;Only</para>
</refsect2>
<refsect2 id="GdkDrag--display" role="property"><title>The <literal>“display”</literal> property</title>
<indexterm zone="GdkDrag--display"><primary>GdkDrag:display</primary></indexterm>
<programlisting>  “display”                  <link linkend="GdkDisplay"><type>GdkDisplay</type></link>&#160;*</programlisting>
<para>The <link linkend="GdkDisplay"><type>GdkDisplay</type></link> that the drag belongs to.</para>
<para>Owner: GdkDrag</para>
<para>Flags: Read</para>
</refsect2>
<refsect2 id="GdkDrag--formats" role="property"><title>The <literal>“formats”</literal> property</title>
<indexterm zone="GdkDrag--formats"><primary>GdkDrag:formats</primary></indexterm>
<programlisting>  “formats”                  <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>&#160;*</programlisting>
<para>The possible formats that the drag can provide its data in.</para>
<para>Owner: GdkDrag</para>
<para>Flags: Read / Write / Construct&#160;Only</para>
</refsect2>
<refsect2 id="GdkDrag--selected-action" role="property"><title>The <literal>“selected-action”</literal> property</title>
<indexterm zone="GdkDrag--selected-action"><primary>GdkDrag:selected-action</primary></indexterm>
<programlisting>  “selected-action”          <link linkend="GdkDragAction"><type>GdkDragAction</type></link></programlisting>
<para>The currently selected action.</para><para>Owner: GdkDrag</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GdkDrag--surface" role="property"><title>The <literal>“surface”</literal> property</title>
<indexterm zone="GdkDrag--surface"><primary>GdkDrag:surface</primary></indexterm>
<programlisting>  “surface”                  <link linkend="GdkSurface"><type>GdkSurface</type></link>&#160;*</programlisting>
<para>The surface where the drag originates.</para><para>Owner: GdkDrag</para>
<para>Flags: Read / Write / Construct&#160;Only</para>
</refsect2>
<refsect2 id="GdkDrop--actions" role="property"><title>The <literal>“actions”</literal> property</title>
<indexterm zone="GdkDrop--actions"><primary>GdkDrop:actions</primary></indexterm>
<programlisting>  “actions”                  <link linkend="GdkDragAction"><type>GdkDragAction</type></link></programlisting>
<para>The possible actions for this drop</para>
<para>Owner: GdkDrop</para>
<para>Flags: Read / Write / Construct&#160;Only</para>
<para>Default value: GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK</para>
</refsect2>
<refsect2 id="GdkDrop--device" role="property"><title>The <literal>“device”</literal> property</title>
<indexterm zone="GdkDrop--device"><primary>GdkDrop:device</primary></indexterm>
<programlisting>  “device”                   <link linkend="GdkDevice"><type>GdkDevice</type></link>&#160;*</programlisting>
<para>The <link linkend="GdkDevice"><type>GdkDevice</type></link> performing the drop</para>
<para>Owner: GdkDrop</para>
<para>Flags: Read / Write / Construct&#160;Only</para>
</refsect2>
<refsect2 id="GdkDrop--display" role="property"><title>The <literal>“display”</literal> property</title>
<indexterm zone="GdkDrop--display"><primary>GdkDrop:display</primary></indexterm>
<programlisting>  “display”                  <link linkend="GdkDisplay"><type>GdkDisplay</type></link>&#160;*</programlisting>
<para>The <link linkend="GdkDisplay"><type>GdkDisplay</type></link> that the drop belongs to.</para>
<para>Owner: GdkDrop</para>
<para>Flags: Read</para>
</refsect2>
<refsect2 id="GdkDrop--drag" role="property"><title>The <literal>“drag”</literal> property</title>
<indexterm zone="GdkDrop--drag"><primary>GdkDrop:drag</primary></indexterm>
<programlisting>  “drag”                     <link linkend="GdkDrag"><type>GdkDrag</type></link>&#160;*</programlisting>
<para>The <link linkend="GdkDrag"><type>GdkDrag</type></link> that initiated this drop</para>
<para>Owner: GdkDrop</para>
<para>Flags: Read / Write / Construct&#160;Only</para>
</refsect2>
<refsect2 id="GdkDrop--formats" role="property"><title>The <literal>“formats”</literal> property</title>
<indexterm zone="GdkDrop--formats"><primary>GdkDrop:formats</primary></indexterm>
<programlisting>  “formats”                  <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>&#160;*</programlisting>
<para>The possible formats that the drop can provide its data in.</para>
<para>Owner: GdkDrop</para>
<para>Flags: Read / Write / Construct&#160;Only</para>
</refsect2>
<refsect2 id="GdkDrop--surface" role="property"><title>The <literal>“surface”</literal> property</title>
<indexterm zone="GdkDrop--surface"><primary>GdkDrop:surface</primary></indexterm>
<programlisting>  “surface”                  <link linkend="GdkSurface"><type>GdkSurface</type></link>&#160;*</programlisting>
<para>The <link linkend="GdkSurface"><type>GdkSurface</type></link> the drop happens on</para>
<para>Owner: GdkDrop</para>
<para>Flags: Read / Write / Construct&#160;Only</para>
</refsect2>

</refsect1>
<refsect1 id="gdk4-Drag-and-Drop.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GdkDrag-cancel" role="signal"><title>The <literal>“cancel”</literal> signal</title>
<indexterm zone="GdkDrag-cancel"><primary>GdkDrag::cancel</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GdkDrag"><type>GdkDrag</type></link>            *drag,
               <link linkend="GdkDragCancelReason"><type>GdkDragCancelReason</type></link> reason,
               <link linkend="gpointer"><type>gpointer</type></link>            user_data)</programlisting>
<para>The drag operation was cancelled.</para>
<refsect3 id="GdkDrag-cancel.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>drag</para></entry>
<entry role="parameter_description"><para>The object on which the signal is emitted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>reason</para></entry>
<entry role="parameter_description"><para>The reason the drag was cancelled</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GdkDrag-dnd-finished" role="signal"><title>The <literal>“dnd-finished”</literal> signal</title>
<indexterm zone="GdkDrag-dnd-finished"><primary>GdkDrag::dnd-finished</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GdkDrag"><type>GdkDrag</type></link> *drag,
               <link linkend="gpointer"><type>gpointer</type></link> user_data)</programlisting>
<para>The drag operation was finished, the destination
finished reading all data. The drag object can now
free all miscellaneous data.</para>
<refsect3 id="GdkDrag-dnd-finished.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>drag</para></entry>
<entry role="parameter_description"><para>The object on which the signal is emitted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GdkDrag-drop-performed" role="signal"><title>The <literal>“drop-performed”</literal> signal</title>
<indexterm zone="GdkDrag-drop-performed"><primary>GdkDrag::drop-performed</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GdkDrag"><type>GdkDrag</type></link> *drag,
               <link linkend="gpointer"><type>gpointer</type></link> user_data)</programlisting>
<para>The drag operation was performed on an accepting client.</para>
<refsect3 id="GdkDrag-drop-performed.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>drag</para></entry>
<entry role="parameter_description"><para>The object on which the signal is emitted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2>
</refsect1>

</refentry>
