<?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">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkDropTargetAsync">
<refmeta>
<refentrytitle role="top_of_page" id="GtkDropTargetAsync.top_of_page">GtkDropTargetAsync</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkDropTargetAsync</refname>
<refpurpose>Event controller to receive DND drops</refpurpose>
</refnamediv>

<refsect1 id="GtkDropTargetAsync.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="GtkDropTargetAsync"><returnvalue>GtkDropTargetAsync</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-drop-target-async-new">gtk_drop_target_async_new</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="gtk-drop-target-async-set-formats">gtk_drop_target_async_set_formats</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="gtk-drop-target-async-get-formats">gtk_drop_target_async_get_formats</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="gtk-drop-target-async-set-actions">gtk_drop_target_async_set_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="gtk-drop-target-async-get-actions">gtk_drop_target_async_get_actions</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="gtk-drop-target-async-reject-drop">gtk_drop_target_async_reject_drop</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkDropTargetAsync.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="GtkDropTargetAsync--actions">actions</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkDropTargetAsync--formats">formats</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkDropTargetAsync.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="gboolean"><returnvalue>gboolean</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkDropTargetAsync-accept">accept</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="GdkDragAction"><returnvalue>GdkDragAction</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkDropTargetAsync-drag-enter">drag-enter</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="GtkDropTargetAsync-drag-leave">drag-leave</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="GdkDragAction"><returnvalue>GdkDragAction</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkDropTargetAsync-drag-motion">drag-motion</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="gboolean"><returnvalue>gboolean</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkDropTargetAsync-drop">drop</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkDropTargetAsync.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="GtkDropTargetAsync-struct">GtkDropTargetAsync</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkDropTargetAsync.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkEventController">GtkEventController</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkDropTargetAsync
</screen>
</refsect1>

<refsect1 id="GtkDropTargetAsync.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkDropTargetAsync.description" role="desc">
<title role="desc.title">Description</title>
<para>GtkDropTargetAsync is an auxiliary object that can be used to receive
Drag-and-Drop operations.  
It is the more complete but also more complex method of handling drop
operations compared to <link linkend="GtkDropTarget"><type>GtkDropTarget</type></link> and you should only use it if
<link linkend="GtkDropTarget"><type>GtkDropTarget</type></link> doesn't provide all the features you need.</para>
<para>To use a <link linkend="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link> to receive drops on a widget, you create
a <link linkend="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link> object, configure which data formats and actions
you support, connect to its signals, and then attach
it to the widget with <link linkend="gtk-widget-add-controller"><function>gtk_widget_add_controller()</function></link>.</para>
<para>During a drag operation, the first signal that a GtkDropTargetAsync
emits is <link linkend="GtkDropTargetAsync-accept"><type>“accept”</type></link>, which is meant to determine
whether the target is a possible drop site for the ongoing drop.
The default handler for the ::accept signal accepts the drop
if it finds a compatible data format and an action that is supported
on both sides.</para>
<para>If it is, and the widget becomes a target, you will receive a
<link linkend="GtkDropTargetAsync-drag-enter"><type>“drag-enter”</type></link> signal, followed by
<link linkend="GtkDropTargetAsync-drag-motion"><type>“drag-motion”</type></link> signals as the pointer moves,
optionally a <link linkend="GtkDropTargetAsync-drop"><type>“drop”</type></link> signal when a drop happens,
and finally a <link linkend="GtkDropTargetAsync-drag-leave"><type>“drag-leave”</type></link> signal when the pointer
moves off the widget.</para>
<para>The ::drag-enter and ::drag-motion handler return a <link linkend="GdkDragAction"><type>GdkDragAction</type></link>
to update the status of the ongoing operation. The ::drop handler
should decide if it ultimately accepts the drop and if it does, it
should initiate the data transfer and finish the operation by calling
<link linkend="gdk-drop-finish"><function>gdk_drop_finish()</function></link>.</para>
<para>Between the ::drag-enter and ::drag-leave signals the widget is a
current drop target, and will receive the <link linkend="GTK-STATE-FLAG-DROP-ACTIVE:CAPS"><literal>GTK_STATE_FLAG_DROP_ACTIVE</literal></link>
state, which can be used by themes to style the widget as a drop target.</para>

</refsect1>
<refsect1 id="GtkDropTargetAsync.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-drop-target-async-new" role="function">
<title>gtk_drop_target_async_new&#160;()</title>
<indexterm zone="gtk-drop-target-async-new"><primary>gtk_drop_target_async_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkDropTargetAsync"><returnvalue>GtkDropTargetAsync</returnvalue></link>&#160;*
gtk_drop_target_async_new (<parameter><link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *formats</parameter>,
                           <parameter><link linkend="GdkDragAction"><type>GdkDragAction</type></link> actions</parameter>);</programlisting>
<para>Creates a new <link linkend="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link> object.</para>
<refsect3 id="gtk-drop-target-async-new.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>formats</para></entry>
<entry role="parameter_description"><para>the supported data formats. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer full</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>actions</para></entry>
<entry role="parameter_description"><para>the supported actions</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-drop-target-async-new.returns" role="returns">
<title>Returns</title>
<para> the new <link linkend="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-drop-target-async-set-formats" role="function">
<title>gtk_drop_target_async_set_formats&#160;()</title>
<indexterm zone="gtk-drop-target-async-set-formats"><primary>gtk_drop_target_async_set_formats</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_drop_target_async_set_formats (<parameter><link linkend="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link> *self</parameter>,
                                   <parameter><link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> *formats</parameter>);</programlisting>
<para>Sets the data formats that this drop target will accept.</para>
<refsect3 id="gtk-drop-target-async-set-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="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>formats</para></entry>
<entry role="parameter_description"><para>the supported data formats or <link linkend="NULL:CAPS"><literal>NULL</literal></link> for
any format. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-drop-target-async-get-formats" role="function">
<title>gtk_drop_target_async_get_formats&#160;()</title>
<indexterm zone="gtk-drop-target-async-get-formats"><primary>gtk_drop_target_async_get_formats</primary></indexterm>
<programlisting language="C"><link linkend="GdkContentFormats"><returnvalue>GdkContentFormats</returnvalue></link>&#160;*
gtk_drop_target_async_get_formats (<parameter><link linkend="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link> *self</parameter>);</programlisting>
<para>Gets the data formats that this drop target accepts.</para>
<para>If the result is <link linkend="NULL:CAPS"><literal>NULL</literal></link>, all formats are expected to be supported.</para>
<refsect3 id="gtk-drop-target-async-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="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-drop-target-async-get-formats.returns" role="returns">
<title>Returns</title>
<para>the supported data formats. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-drop-target-async-set-actions" role="function">
<title>gtk_drop_target_async_set_actions&#160;()</title>
<indexterm zone="gtk-drop-target-async-set-actions"><primary>gtk_drop_target_async_set_actions</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_drop_target_async_set_actions (<parameter><link linkend="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link> *self</parameter>,
                                   <parameter><link linkend="GdkDragAction"><type>GdkDragAction</type></link> actions</parameter>);</programlisting>
<para>Sets the actions that this drop target supports.</para>
<refsect3 id="gtk-drop-target-async-set-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="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>actions</para></entry>
<entry role="parameter_description"><para>the supported actions</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-drop-target-async-get-actions" role="function">
<title>gtk_drop_target_async_get_actions&#160;()</title>
<indexterm zone="gtk-drop-target-async-get-actions"><primary>gtk_drop_target_async_get_actions</primary></indexterm>
<programlisting language="C"><link linkend="GdkDragAction"><returnvalue>GdkDragAction</returnvalue></link>
gtk_drop_target_async_get_actions (<parameter><link linkend="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link> *self</parameter>);</programlisting>
<para>Gets the actions that this drop target supports.</para>
<refsect3 id="gtk-drop-target-async-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="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-drop-target-async-get-actions.returns" role="returns">
<title>Returns</title>
<para> the actions that this drop target supports</para>
</refsect3></refsect2>
<refsect2 id="gtk-drop-target-async-reject-drop" role="function">
<title>gtk_drop_target_async_reject_drop&#160;()</title>
<indexterm zone="gtk-drop-target-async-reject-drop"><primary>gtk_drop_target_async_reject_drop</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_drop_target_async_reject_drop (<parameter><link linkend="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link> *self</parameter>,
                                   <parameter><link linkend="GdkDrop"><type>GdkDrop</type></link> *drop</parameter>);</programlisting>
<para>Sets the <parameter>drop</parameter>
 as not accepted on this drag site.</para>
<para>This function should be used when delaying the decision
on whether to accept a drag or not until after reading
the data.</para>
<refsect3 id="gtk-drop-target-async-reject-drop.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="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>drop</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkDrop"><type>GdkDrop</type></link> of an ongoing drag operation</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkDropTargetAsync.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkDropTargetAsync-struct" role="struct">
<title>GtkDropTargetAsync</title>
<indexterm zone="GtkDropTargetAsync-struct"><primary>GtkDropTargetAsync</primary></indexterm>
<programlisting language="C">typedef struct _GtkDropTargetAsync GtkDropTargetAsync;</programlisting>
</refsect2>

</refsect1>
<refsect1 id="GtkDropTargetAsync.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkDropTargetAsync--actions" role="property"><title>The <literal>“actions”</literal> property</title>
<indexterm zone="GtkDropTargetAsync--actions"><primary>GtkDropTargetAsync:actions</primary></indexterm>
<programlisting>  “actions”                  <link linkend="GdkDragAction"><type>GdkDragAction</type></link></programlisting>
<para>The <link linkend="GdkDragActions"><type>GdkDragActions</type></link> that this drop target supports</para>
<para>Owner: GtkDropTargetAsync</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkDropTargetAsync--formats" role="property"><title>The <literal>“formats”</literal> property</title>
<indexterm zone="GtkDropTargetAsync--formats"><primary>GtkDropTargetAsync:formats</primary></indexterm>
<programlisting>  “formats”                  <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link>&#160;*</programlisting>
<para>The <link linkend="GdkContentFormats"><type>GdkContentFormats</type></link> that determines the supported data formats</para>
<para>Owner: GtkDropTargetAsync</para>
<para>Flags: Read / Write</para>
</refsect2>

</refsect1>
<refsect1 id="GtkDropTargetAsync.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkDropTargetAsync-accept" role="signal"><title>The <literal>“accept”</literal> signal</title>
<indexterm zone="GtkDropTargetAsync-accept"><primary>GtkDropTargetAsync::accept</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
user_function (<link linkend="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link> *self,
               <link linkend="GdkDrop"><type>GdkDrop</type></link>            *drop,
               <link linkend="gpointer"><type>gpointer</type></link>            user_data)</programlisting>
<para>The ::accept signal is emitted on the drop site when a drop operation
is about to begin.

If the drop is not accepted, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> will be returned and the drop target
will ignore the drop. If <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> is returned, the drop is accepted for now
but may be rejected later via a call to <link linkend="gtk-drop-target-reject"><function>gtk_drop_target_reject()</function></link> or
ultimately by returning <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> from GtkDropTarget::drop</para>
<para>The default handler for this signal decides whether to accept the drop
based on the formats provided by the <parameter>drop</parameter>
.</para>
<para>If the decision whether the drop will be accepted or rejected needs
further procesing, such as inspecting the data, this function should
return <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> and proceed as is <parameter>drop</parameter>
 was accepted and if it decides to
reject the drop later, it should call <link linkend="gtk-drop-target-reject-drop"><function>gtk_drop_target_reject_drop()</function></link>.</para>
<refsect3 id="GtkDropTargetAsync-accept.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>the <link linkend="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>drop</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkDrop"><type>GdkDrop</type></link></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><refsect3 id="GtkDropTargetAsync-accept.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>drop</parameter>
is accepted</para>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkDropTargetAsync-drag-enter" role="signal"><title>The <literal>“drag-enter”</literal> signal</title>
<indexterm zone="GtkDropTargetAsync-drag-enter"><primary>GtkDropTargetAsync::drag-enter</primary></indexterm>
<programlisting language="C"><link linkend="GdkDragAction"><returnvalue>GdkDragAction</returnvalue></link>
user_function (<link linkend="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link> *self,
               <link linkend="GdkDrop"><type>GdkDrop</type></link>            *drop,
               <link linkend="gdouble"><type>gdouble</type></link>             x,
               <link linkend="gdouble"><type>gdouble</type></link>             y,
               <link linkend="gpointer"><type>gpointer</type></link>            user_data)</programlisting>
<para>The ::drag-enter signal is emitted on the drop site when the pointer
enters the widget. It can be used to set up custom highlighting.</para>
<refsect3 id="GtkDropTargetAsync-drag-enter.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>the <link linkend="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>drop</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkDrop"><type>GdkDrop</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>x</para></entry>
<entry role="parameter_description"><para>the x coordinate of the current pointer position</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>y</para></entry>
<entry role="parameter_description"><para>the y coordinate of the current pointer position</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><refsect3 id="GtkDropTargetAsync-drag-enter.returns" role="returns">
<title>Returns</title>
<para> Preferred action for this drag operation. </para>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkDropTargetAsync-drag-leave" role="signal"><title>The <literal>“drag-leave”</literal> signal</title>
<indexterm zone="GtkDropTargetAsync-drag-leave"><primary>GtkDropTargetAsync::drag-leave</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link> *self,
               <link linkend="GdkDrop"><type>GdkDrop</type></link>            *drop,
               <link linkend="gpointer"><type>gpointer</type></link>            user_data)</programlisting>
<para>The ::drag-leave signal is emitted on the drop site when the pointer
leaves the widget. Its main purpose it to undo things done in
<link linkend="GtkDropTargetAsync-drag-enter"><type>“drag-enter”</type></link>.</para>
<refsect3 id="GtkDropTargetAsync-drag-leave.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>the <link linkend="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>drop</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkDrop"><type>GdkDrop</type></link></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="GtkDropTargetAsync-drag-motion" role="signal"><title>The <literal>“drag-motion”</literal> signal</title>
<indexterm zone="GtkDropTargetAsync-drag-motion"><primary>GtkDropTargetAsync::drag-motion</primary></indexterm>
<programlisting language="C"><link linkend="GdkDragAction"><returnvalue>GdkDragAction</returnvalue></link>
user_function (<link linkend="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link> *self,
               <link linkend="GdkDrop"><type>GdkDrop</type></link>            *drop,
               <link linkend="gdouble"><type>gdouble</type></link>             x,
               <link linkend="gdouble"><type>gdouble</type></link>             y,
               <link linkend="gpointer"><type>gpointer</type></link>            user_data)</programlisting>
<para>The ::drag-motion signal is emitted while the pointer is moving
over the drop target.</para>
<refsect3 id="GtkDropTargetAsync-drag-motion.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>the <link linkend="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>drop</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkDrop"><type>GdkDrop</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>x</para></entry>
<entry role="parameter_description"><para>the x coordinate of the current pointer position</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>y</para></entry>
<entry role="parameter_description"><para>the y coordinate of the current pointer position</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><refsect3 id="GtkDropTargetAsync-drag-motion.returns" role="returns">
<title>Returns</title>
<para> Preferred action for this drag operation. </para>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkDropTargetAsync-drop" role="signal"><title>The <literal>“drop”</literal> signal</title>
<indexterm zone="GtkDropTargetAsync-drop"><primary>GtkDropTargetAsync::drop</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
user_function (<link linkend="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link> *self,
               <link linkend="GdkDrop"><type>GdkDrop</type></link>            *drop,
               <link linkend="gdouble"><type>gdouble</type></link>             x,
               <link linkend="gdouble"><type>gdouble</type></link>             y,
               <link linkend="gpointer"><type>gpointer</type></link>            user_data)</programlisting>
<para>The ::drop signal is emitted on the drop site when the user drops
the data onto the widget. The signal handler must determine whether
the pointer position is in a drop zone or not. If it is not in a drop
zone, it returns <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> and no further processing is necessary.</para>
<para>Otherwise, the handler returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>. In this case, this handler will
accept the drop. The handler must ensure that <link linkend="gdk-drop-finish"><function>gdk_drop_finish()</function></link> is
called to let the source know that the drop is done. The call to
<link linkend="gtk-drag-finish"><function>gtk_drag_finish()</function></link> must only be done when all data has been received.</para>
<para>To receive the data, use one of the read functions provides by <link linkend="GdkDrop"><type>GdkDrop</type></link>
such as <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>
<refsect3 id="GtkDropTargetAsync-drop.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>the <link linkend="GtkDropTargetAsync"><type>GtkDropTargetAsync</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>drop</para></entry>
<entry role="parameter_description"><para>the <link linkend="GdkDrop"><type>GdkDrop</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>x</para></entry>
<entry role="parameter_description"><para>the x coordinate of the current pointer position</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>y</para></entry>
<entry role="parameter_description"><para>the y coordinate of the current pointer position</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><refsect3 id="GtkDropTargetAsync-drop.returns" role="returns">
<title>Returns</title>
<para> whether the drop is accepted at the given pointer position</para>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2>
</refsect1>
<refsect1 id="GtkDropTargetAsync.see-also">
<title>See Also</title>
<para><link linkend="GtkDropTarget"><type>GtkDropTarget</type></link></para>

</refsect1>

</refentry>
