<HTML ><HEAD ><TITLE >Drag and Drop</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.61 "><LINK REL="HOME" TITLE="GTK+ Reference Manual" HREF="index.html"><LINK REL="UP" TITLE="GTK+ " HREF="gtk.html"><LINK REL="PREVIOUS" TITLE="Selections" HREF="gtk-selections.html"><LINK REL="NEXT" TITLE="Signals" HREF="gtk-signals.html"></HEAD ><BODY CLASS="REFENTRY" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE WIDTH="100%" BORDER="0" BGCOLOR="#000000" CELLPADDING="1" CELLSPACING="0" ><TR ><TH COLSPAN="4" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="5" >GTK+ Reference Manual</FONT ></TH ></TR ><TR ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="left" ><A HREF="gtk-selections.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><<< Previous Page</B ></FONT ></A ></TD ><TD WIDTH="25%" BGCOLOR="#0000C0" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="index.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Home</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#00C000" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="gtk.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Up</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="right" ><A HREF="gtk-signals.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Next Page >>></B ></FONT ></A ></TD ></TR ></TABLE ></DIV ><H1 ><A NAME="GTK-DRAG-AND-DROP" >Drag and Drop</A ></H1 ><DIV CLASS="REFNAMEDIV" ><A NAME="AEN6965" ></A ><H2 >Name</H2 >Drag and Drop -- Functions for controlling drag and drop handling.</DIV ><DIV CLASS="REFSYNOPSISDIV" ><A NAME="AEN6968" ></A ><H2 >Synopsis</H2 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="SYNOPSIS" > #include <gtk/gtk.h> enum <A HREF="gtk-drag-and-drop.html#GTKDESTDEFAULTS" >GtkDestDefaults</A >; enum <A HREF="gtk-drag-and-drop.html#GTKTARGETFLAGS" >GtkTargetFlags</A >; void <A HREF="gtk-drag-and-drop.html#GTK-DRAG-DEST-SET" >gtk_drag_dest_set</A > (<A HREF="gtkwidget.html" >GtkWidget</A > *widget, <A HREF="gtk-drag-and-drop.html#GTKDESTDEFAULTS" >GtkDestDefaults</A > flags, const <A HREF="gtk-selections.html#GTKTARGETENTRY" >GtkTargetEntry</A > *targets, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> n_targets, <A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGACTION >GdkDragAction</A> actions); void <A HREF="gtk-drag-and-drop.html#GTK-DRAG-DEST-SET-PROXY" >gtk_drag_dest_set_proxy</A > (<A HREF="gtkwidget.html" >GtkWidget</A > *widget, <A HREF=../gdk/gdk-windows.html#GDKWINDOW >GdkWindow</A> *proxy_window, <A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGPROTOCOL >GdkDragProtocol</A> protocol, <A HREF=../glib/glib-basic-types.html#GBOOLEAN >gboolean</A> use_coordinates); void <A HREF="gtk-drag-and-drop.html#GTK-DRAG-DEST-UNSET" >gtk_drag_dest_unset</A > (<A HREF="gtkwidget.html" >GtkWidget</A > *widget); void <A HREF="gtk-drag-and-drop.html#GTK-DRAG-FINISH" >gtk_drag_finish</A > (<A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGCONTEXT >GdkDragContext</A> *context, <A HREF=../glib/glib-basic-types.html#GBOOLEAN >gboolean</A> success, <A HREF=../glib/glib-basic-types.html#GBOOLEAN >gboolean</A> del, <A HREF=../glib/glib-basic-types.html#GUINT32 >guint32</A> time); void <A HREF="gtk-drag-and-drop.html#GTK-DRAG-GET-DATA" >gtk_drag_get_data</A > (<A HREF="gtkwidget.html" >GtkWidget</A > *widget, <A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGCONTEXT >GdkDragContext</A> *context, <A HREF=../gdk/gdk-properties-and-atoms.html#GDKATOM >GdkAtom</A> target, <A HREF=../glib/glib-basic-types.html#GUINT32 >guint32</A> time); <A HREF="gtkwidget.html" >GtkWidget</A >* <A HREF="gtk-drag-and-drop.html#GTK-DRAG-GET-SOURCE-WIDGET" >gtk_drag_get_source_widget</A > (<A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGCONTEXT >GdkDragContext</A> *context); void <A HREF="gtk-drag-and-drop.html#GTK-DRAG-HIGHLIGHT" >gtk_drag_highlight</A > (<A HREF="gtkwidget.html" >GtkWidget</A > *widget); void <A HREF="gtk-drag-and-drop.html#GTK-DRAG-UNHIGHLIGHT" >gtk_drag_unhighlight</A > (<A HREF="gtkwidget.html" >GtkWidget</A > *widget); <A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGCONTEXT >GdkDragContext</A>* <A HREF="gtk-drag-and-drop.html#GTK-DRAG-BEGIN" >gtk_drag_begin</A > (<A HREF="gtkwidget.html" >GtkWidget</A > *widget, <A HREF="gtk-selections.html#GTKTARGETLIST" >GtkTargetList</A > *targets, <A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGACTION >GdkDragAction</A> actions, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> button, <A HREF=../gdk/gdk-event-structures.html#GDKEVENT >GdkEvent</A> *event); void <A HREF="gtk-drag-and-drop.html#GTK-DRAG-SET-ICON-WIDGET" >gtk_drag_set_icon_widget</A > (<A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGCONTEXT >GdkDragContext</A> *context, <A HREF="gtkwidget.html" >GtkWidget</A > *widget, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> hot_x, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> hot_y); void <A HREF="gtk-drag-and-drop.html#GTK-DRAG-SET-ICON-PIXMAP" >gtk_drag_set_icon_pixmap</A > (<A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGCONTEXT >GdkDragContext</A> *context, <A HREF=../gdk/gdk-colormaps-and-colors.html#GDKCOLORMAP >GdkColormap</A> *colormap, <A HREF=../gdk/gdk-bitmaps-and-pixmaps.html#GDKPIXMAP >GdkPixmap</A> *pixmap, <A HREF=../gdk/gdk-bitmaps-and-pixmaps.html#GDKBITMAP >GdkBitmap</A> *mask, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> hot_x, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> hot_y); void <A HREF="gtk-drag-and-drop.html#GTK-DRAG-SET-ICON-DEFAULT" >gtk_drag_set_icon_default</A > (<A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGCONTEXT >GdkDragContext</A> *context); void <A HREF="gtk-drag-and-drop.html#GTK-DRAG-SET-DEFAULT-ICON" >gtk_drag_set_default_icon</A > (<A HREF=../gdk/gdk-colormaps-and-colors.html#GDKCOLORMAP >GdkColormap</A> *colormap, <A HREF=../gdk/gdk-bitmaps-and-pixmaps.html#GDKPIXMAP >GdkPixmap</A> *pixmap, <A HREF=../gdk/gdk-bitmaps-and-pixmaps.html#GDKBITMAP >GdkBitmap</A> *mask, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> hot_x, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> hot_y); void <A HREF="gtk-drag-and-drop.html#GTK-DRAG-SOURCE-SET" >gtk_drag_source_set</A > (<A HREF="gtkwidget.html" >GtkWidget</A > *widget, <A HREF=../gdk/gdk-windows.html#GDKMODIFIERTYPE >GdkModifierType</A> start_button_mask, const <A HREF="gtk-selections.html#GTKTARGETENTRY" >GtkTargetEntry</A > *targets, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> n_targets, <A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGACTION >GdkDragAction</A> actions); void <A HREF="gtk-drag-and-drop.html#GTK-DRAG-SOURCE-SET-ICON" >gtk_drag_source_set_icon</A > (<A HREF="gtkwidget.html" >GtkWidget</A > *widget, <A HREF=../gdk/gdk-colormaps-and-colors.html#GDKCOLORMAP >GdkColormap</A> *colormap, <A HREF=../gdk/gdk-bitmaps-and-pixmaps.html#GDKPIXMAP >GdkPixmap</A> *pixmap, <A HREF=../gdk/gdk-bitmaps-and-pixmaps.html#GDKBITMAP >GdkBitmap</A> *mask); void <A HREF="gtk-drag-and-drop.html#GTK-DRAG-SOURCE-UNSET" >gtk_drag_source_unset</A > (<A HREF="gtkwidget.html" >GtkWidget</A > *widget); void <A HREF="gtk-drag-and-drop.html#GTK-DRAG-SOURCE-HANDLE-EVENT" >gtk_drag_source_handle_event</A > (<A HREF="gtkwidget.html" >GtkWidget</A > *widget, <A HREF=../gdk/gdk-event-structures.html#GDKEVENT >GdkEvent</A> *event); void <A HREF="gtk-drag-and-drop.html#GTK-DRAG-DEST-HANDLE-EVENT" >gtk_drag_dest_handle_event</A > (<A HREF="gtkwidget.html" >GtkWidget</A > *toplevel, <A HREF=../gdk/gdk-event-structures.html#GDKEVENT >GdkEvent</A> *event);</PRE ></TD ></TR ></TABLE ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN7049" ></A ><H2 >Description</H2 ><P >GTK+ has a rich set of functions for doing inter-process communication via the drag-and-drop metaphore. GTK+ can do drag and drop (DND) via multiple protocols. The currently supported protocols are the Xdnd and Motif protocols. As well as the functions listed here, applications may need to use some facilities provided for <A HREF="gtk-selections.html" >Selections</A >. Also, the Drag and Drop API makes use of signals in the <A HREF="gtkwidget.html" >GtkWidget</A > class.</P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN7054" ></A ><H2 >Details</H2 ><DIV CLASS="REFSECT2" ><A NAME="AEN7056" ></A ><H3 ><A NAME="GTKDESTDEFAULTS" ></A >enum GtkDestDefaults</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >typedef enum { GTK_DEST_DEFAULT_MOTION = 1 << 0, /* respond to "drag_motion" */ GTK_DEST_DEFAULT_HIGHLIGHT = 1 << 1, /* auto-highlight */ GTK_DEST_DEFAULT_DROP = 1 << 2, /* respond to "drag_drop" */ GTK_DEST_DEFAULT_ALL = 0x07 } GtkDestDefaults;</PRE ></TD ></TR ></TABLE ><P >The GtkDestfaults enumeration specifies the various types of action that will be taken on behalf of the user for a drag destination site.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN7062" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#F0F0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="LEFT" VALIGN="TOP" ><SPAN CLASS="SYMBOL" >GTK_DEST_DEFAULT_MOTION</SPAN ></TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > If set for a widget, GTK+, during a drag over this widget will check if the drag matches this widget's list of possible targets and actions. GTK+ will then call gtk_drag_status() as appropriate.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="LEFT" VALIGN="TOP" ><SPAN CLASS="SYMBOL" >GTK_DEST_DEFAULT_HIGHLIGHT</SPAN ></TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > If set for a widget, GTK+ will draw a highlight on this widget as long as a drag is over this widget and the wiget drag format and action is accetable.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="LEFT" VALIGN="TOP" ><SPAN CLASS="SYMBOL" >GTK_DEST_DEFAULT_DROP</SPAN ></TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > If set for a widget, when a drop occurs, GTK+ will will check if the drag matches this widget's list of possible targets and actions. If so, GTK+ will call gtk_drag_data_get() on behalf of the widget. Whether or not the drop is succesful, GTK+ will call <A HREF="gtk-drag-and-drop.html#GTK-DRAG-FINISH" >gtk_drag_finish</A >(). If the action was a move, then if the drag was succesful, then <TT CLASS="LITERAL" >TRUE</TT > will be passed for the <TT CLASS="PARAMETER" ><I >delete</I ></TT > parameter to <A HREF="gtk-drag-and-drop.html#GTK-DRAG-FINISH" >gtk_drag_finish</A >().</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="LEFT" VALIGN="TOP" ><SPAN CLASS="SYMBOL" >GTK_DEST_DEFAULT_ALL</SPAN ></TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > If set, specifies that all default actions should be taken.</TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7089" ></A ><H3 ><A NAME="GTKTARGETFLAGS" ></A >enum GtkTargetFlags</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >typedef enum { GTK_TARGET_SAME_APP = 1 << 0, /*< nick=same-app >*/ GTK_TARGET_SAME_WIDGET = 1 << 1 /*< nick=same-widget >*/ } GtkTargetFlags;</PRE ></TD ></TR ></TABLE ><P >The <A HREF="gtk-drag-and-drop.html#GTKTARGETFLAGS" >GtkTargetFlags</A > enumeration is used to specifies constraints on an entry in a GtkTargetTable. </P ><P ></P ><DIV CLASS="VARIABLELIST" ><DL ><DT ><TT CLASS="LITERAL" >GTK_TARGET_SAME_APP</TT ></DT ><DD ><P > If this is set, the target will only be selected for drags within a single application. </P ></DD ><DT ><TT CLASS="LITERAL" >GTK_TARGET_SAME_WIDGET</TT ></DT ><DD ><P > If this is set, the target will only be selected for drags within a single widget. </P ></DD ></DL ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7106" ></A ><H3 ><A NAME="GTK-DRAG-DEST-SET" ></A >gtk_drag_dest_set ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void gtk_drag_dest_set (<A HREF="gtkwidget.html" >GtkWidget</A > *widget, <A HREF="gtk-drag-and-drop.html#GTKDESTDEFAULTS" >GtkDestDefaults</A > flags, const <A HREF="gtk-selections.html#GTKTARGETENTRY" >GtkTargetEntry</A > *targets, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> n_targets, <A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGACTION >GdkDragAction</A> actions);</PRE ></TD ></TR ></TABLE ><P >Set a widget as a potential drop destination.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN7116" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >widget</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a widget</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >flags</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the flags that specify what actions GTK+ should take on behalf of a widget for drops onto that widget. The <TT CLASS="PARAMETER" ><I >targets</I ></TT > and <TT CLASS="PARAMETER" ><I >actions</I ></TT > fields only are used if <TT CLASS="LITERAL" >GTK_DEST_DEFAULT_MOTION</TT > or <TT CLASS="LITERAL" >GTK_DEST_DEFAULT_DROP</TT > are given.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >targets</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a pointer to an array of <A HREF="gtk-selections.html#GTKTARGETENTRY" >GtkTargetEntry</A > indicating the drop types that this widget will accept.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >n_targets</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the number of entries in <TT CLASS="PARAMETER" ><I >targets</I ></TT >.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >actions</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a bitmask of possible actions for a drop onto this widget. </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7147" ></A ><H3 ><A NAME="GTK-DRAG-DEST-SET-PROXY" ></A >gtk_drag_dest_set_proxy ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void gtk_drag_dest_set_proxy (<A HREF="gtkwidget.html" >GtkWidget</A > *widget, <A HREF=../gdk/gdk-windows.html#GDKWINDOW >GdkWindow</A> *proxy_window, <A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGPROTOCOL >GdkDragProtocol</A> protocol, <A HREF=../glib/glib-basic-types.html#GBOOLEAN >gboolean</A> use_coordinates);</PRE ></TD ></TR ></TABLE ><P >Set this widget as a proxy for drops to another window.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN7156" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >widget</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a <A HREF="gtkwidget.html" >GtkWidget</A ></TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >proxy_window</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the window to which to forward drag events</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >protocol</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the drag protocol which the <TT CLASS="PARAMETER" ><I >proxy_window</I ></TT > accepts (You can use <A HREF=../gdk/gdk-drag-and-drop.html#GDK-DRAG-GET-PROTOCOL >gdk_drag_get_protocol</A>() to determine this)</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >use_coordinates</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >If true, send the same coordinates to the destination, because it is a embedded subwindow. </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7180" ></A ><H3 ><A NAME="GTK-DRAG-DEST-UNSET" ></A >gtk_drag_dest_unset ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void gtk_drag_dest_unset (<A HREF="gtkwidget.html" >GtkWidget</A > *widget);</PRE ></TD ></TR ></TABLE ><P >Clear information about a drop destination set with <A HREF="gtk-drag-and-drop.html#GTK-DRAG-DEST-SET" >gtk_drag_dest_set</A >(). The widget will no longer receive notification of drags.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN7187" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >widget</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a <A HREF="gtkwidget.html" >GtkWidget</A > </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7197" ></A ><H3 ><A NAME="GTK-DRAG-FINISH" ></A >gtk_drag_finish ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void gtk_drag_finish (<A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGCONTEXT >GdkDragContext</A> *context, <A HREF=../glib/glib-basic-types.html#GBOOLEAN >gboolean</A> success, <A HREF=../glib/glib-basic-types.html#GBOOLEAN >gboolean</A> del, <A HREF=../glib/glib-basic-types.html#GUINT32 >guint32</A> time);</PRE ></TD ></TR ></TABLE ><P >Inform the drag source that the drop is finished, and that the data of the drag will no longer be required.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN7206" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >context</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the drag context.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >success</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a flag indicating whether the drop was succesful</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >del</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a flag indicating whether the source should delete the original data. (This should be <TT CLASS="LITERAL" >TRUE</TT > for a move)</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >time</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the timestamp from the "drag_data_drop" signal. </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7228" ></A ><H3 ><A NAME="GTK-DRAG-GET-DATA" ></A >gtk_drag_get_data ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void gtk_drag_get_data (<A HREF="gtkwidget.html" >GtkWidget</A > *widget, <A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGCONTEXT >GdkDragContext</A> *context, <A HREF=../gdk/gdk-properties-and-atoms.html#GDKATOM >GdkAtom</A> target, <A HREF=../glib/glib-basic-types.html#GUINT32 >guint32</A> time);</PRE ></TD ></TR ></TABLE ><P >Get the data associated with a drag. When the data is received or the retrieval fails, GTK+ will emit a "drag_data_received" signal. Failure of the retrieval is indicated by the length field of the <TT CLASS="PARAMETER" ><I >selection_data</I ></TT > signal parameter being negative. However, when <A HREF="gtk-drag-and-drop.html#GTK-DRAG-GET-DATA" >gtk_drag_get_data</A >() is called implicitely because the <TT CLASS="LITERAL" >GTK_DRAG_DEFAULT_DROP</TT > was set, then the widget will not receive notification of failed drops.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN7240" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >widget</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the widget that will receive the "drag_data_received" signal.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >context</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the drag context</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >target</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the target (form of the data) to retrieve.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >time</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a timestamp for retrieving the data. This will generally be the time received in a "drag_data_motion" or "drag_data_drop" signal. </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7261" ></A ><H3 ><A NAME="GTK-DRAG-GET-SOURCE-WIDGET" ></A >gtk_drag_get_source_widget ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" ><A HREF="gtkwidget.html" >GtkWidget</A >* gtk_drag_get_source_widget (<A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGCONTEXT >GdkDragContext</A> *context);</PRE ></TD ></TR ></TABLE ><P >Determine the source widget for a drag.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN7268" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >context</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a (destination side) drag context.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><I CLASS="EMPHASIS" >Returns</I > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >if the drag is occurring within a single application, a pointer to the source widget. Otherwise, NULL. </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7281" ></A ><H3 ><A NAME="GTK-DRAG-HIGHLIGHT" ></A >gtk_drag_highlight ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void gtk_drag_highlight (<A HREF="gtkwidget.html" >GtkWidget</A > *widget);</PRE ></TD ></TR ></TABLE ><P >Draw a highlight around a widget. This will attach handlers to "expose_event" and "draw", so the highlight will continue to be displayed until gtk_drag_unhighlight is called.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN7287" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >widget</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a widget to highlight </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7296" ></A ><H3 ><A NAME="GTK-DRAG-UNHIGHLIGHT" ></A >gtk_drag_unhighlight ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void gtk_drag_unhighlight (<A HREF="gtkwidget.html" >GtkWidget</A > *widget);</PRE ></TD ></TR ></TABLE ><P >Remove a highlight set by <A HREF="gtk-drag-and-drop.html#GTK-DRAG-HIGHLIGHT" >gtk_drag_highlight</A >() from a widget. is called.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN7303" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >widget</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a widget to remove the highlight from. </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7312" ></A ><H3 ><A NAME="GTK-DRAG-BEGIN" ></A >gtk_drag_begin ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" ><A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGCONTEXT >GdkDragContext</A>* gtk_drag_begin (<A HREF="gtkwidget.html" >GtkWidget</A > *widget, <A HREF="gtk-selections.html#GTKTARGETLIST" >GtkTargetList</A > *targets, <A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGACTION >GdkDragAction</A> actions, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> button, <A HREF=../gdk/gdk-event-structures.html#GDKEVENT >GdkEvent</A> *event);</PRE ></TD ></TR ></TABLE ><P >Initiate a drag on the source side. The function only needs to be used when the application is starting drags itself, and is not needed when <A HREF="gtk-drag-and-drop.html#GTK-DRAG-SOURCE-SET" >gtk_drag_source_set</A >() is used.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN7324" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >widget</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the source widget.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >targets</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >The targets (data formats) in which the source can provide the data.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >actions</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >A bitmask of the allowed drag actions for this drag.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >button</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >The button the user clicked to start the drag.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >event</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >The event that triggered the start of the drag. Usually</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><I CLASS="EMPHASIS" >Returns</I > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >The context for this drag. </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7353" ></A ><H3 ><A NAME="GTK-DRAG-SET-ICON-WIDGET" ></A >gtk_drag_set_icon_widget ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void gtk_drag_set_icon_widget (<A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGCONTEXT >GdkDragContext</A> *context, <A HREF="gtkwidget.html" >GtkWidget</A > *widget, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> hot_x, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> hot_y);</PRE ></TD ></TR ></TABLE ><P >Change the icon for a widget to a given widget. GTK+ will not destroy the icon, so if you don't want it to persist, you should connect to the "drag_end" signal and destroy it yourself.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN7362" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >context</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the context for a drag. (This must be called with a context for the source side of a drag)</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >widget</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >A toplevel window to use as an icon.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >hot_x</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >The X offset within <TT CLASS="PARAMETER" ><I >widget</I ></TT > of the hotspot.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >hot_y</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >The Y offset within <TT CLASS="PARAMETER" ><I >widget</I ></TT > of the hotspot. </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7385" ></A ><H3 ><A NAME="GTK-DRAG-SET-ICON-PIXMAP" ></A >gtk_drag_set_icon_pixmap ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void gtk_drag_set_icon_pixmap (<A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGCONTEXT >GdkDragContext</A> *context, <A HREF=../gdk/gdk-colormaps-and-colors.html#GDKCOLORMAP >GdkColormap</A> *colormap, <A HREF=../gdk/gdk-bitmaps-and-pixmaps.html#GDKPIXMAP >GdkPixmap</A> *pixmap, <A HREF=../gdk/gdk-bitmaps-and-pixmaps.html#GDKBITMAP >GdkBitmap</A> *mask, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> hot_x, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> hot_y);</PRE ></TD ></TR ></TABLE ><P >Sets a given pixmap as the icon for a given drag. GTK+ retains a reference count for the arguments, and will release them when they are no longer needed.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN7396" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >context</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the context for a drag. (This must be called with a context for the source side of a drag)</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >colormap</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the colormap of the icon</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >pixmap</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the image data for the icon</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >mask</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the transparency mask for an image.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >hot_x</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >The X offset within <TT CLASS="PARAMETER" ><I >widget</I ></TT > of the hotspot.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >hot_y</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >The Y offset within <TT CLASS="PARAMETER" ><I >widget</I ></TT > of the hotspot. </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7427" ></A ><H3 ><A NAME="GTK-DRAG-SET-ICON-DEFAULT" ></A >gtk_drag_set_icon_default ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void gtk_drag_set_icon_default (<A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGCONTEXT >GdkDragContext</A> *context);</PRE ></TD ></TR ></TABLE ><P >Set the icon for a particular drag to the default icon.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN7433" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >context</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the context for a drag. (This must be called with a context for the source side of a drag) </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7442" ></A ><H3 ><A NAME="GTK-DRAG-SET-DEFAULT-ICON" ></A >gtk_drag_set_default_icon ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void gtk_drag_set_default_icon (<A HREF=../gdk/gdk-colormaps-and-colors.html#GDKCOLORMAP >GdkColormap</A> *colormap, <A HREF=../gdk/gdk-bitmaps-and-pixmaps.html#GDKPIXMAP >GdkPixmap</A> *pixmap, <A HREF=../gdk/gdk-bitmaps-and-pixmaps.html#GDKBITMAP >GdkBitmap</A> *mask, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> hot_x, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> hot_y);</PRE ></TD ></TR ></TABLE ><P >Change the default drag icon. GTK+ retains a reference count for the arguments, and will release them when they are no longer needed.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN7452" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >colormap</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the colormap of the icon</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >pixmap</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the image data for the icon</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >mask</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the transparency mask for an image.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >hot_x</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >The X offset within <TT CLASS="PARAMETER" ><I >widget</I ></TT > of the hotspot.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >hot_y</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >The Y offset within <TT CLASS="PARAMETER" ><I >widget</I ></TT > of the hotspot. </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7479" ></A ><H3 ><A NAME="GTK-DRAG-SOURCE-SET" ></A >gtk_drag_source_set ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void gtk_drag_source_set (<A HREF="gtkwidget.html" >GtkWidget</A > *widget, <A HREF=../gdk/gdk-windows.html#GDKMODIFIERTYPE >GdkModifierType</A> start_button_mask, const <A HREF="gtk-selections.html#GTKTARGETENTRY" >GtkTargetEntry</A > *targets, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> n_targets, <A HREF=../gdk/gdk-drag-and-drop.html#GDKDRAGACTION >GdkDragAction</A> actions);</PRE ></TD ></TR ></TABLE ><P >Sets up a widget so that GTK+ will start a drag operation when the user clicks and drags on the widget. The widget must have a window.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN7489" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >widget</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a <A HREF="gtkwidget.html" >GtkWidget</A ></TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >start_button_mask</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the bitmask of buttons that can start the drag</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >targets</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the table of targets that the drag will support</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >n_targets</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the number of items in <TT CLASS="PARAMETER" ><I >targets</I ></TT ></TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >actions</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the bitmask of possible actions for a drag from this widget. </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7516" ></A ><H3 ><A NAME="GTK-DRAG-SOURCE-SET-ICON" ></A >gtk_drag_source_set_icon ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void gtk_drag_source_set_icon (<A HREF="gtkwidget.html" >GtkWidget</A > *widget, <A HREF=../gdk/gdk-colormaps-and-colors.html#GDKCOLORMAP >GdkColormap</A> *colormap, <A HREF=../gdk/gdk-bitmaps-and-pixmaps.html#GDKPIXMAP >GdkPixmap</A> *pixmap, <A HREF=../gdk/gdk-bitmaps-and-pixmaps.html#GDKBITMAP >GdkBitmap</A> *mask);</PRE ></TD ></TR ></TABLE ><P >Sets the icon that will be used for drags from a particular widget. GTK+ retains a reference count for the arguments, and will release them when they are no longer needed.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN7525" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >widget</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a <A HREF="gtkwidget.html" >GtkWidget</A ></TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >colormap</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the colormap of the icon</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >pixmap</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the image data for the icon</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >mask</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the transparency mask for an image. </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7547" ></A ><H3 ><A NAME="GTK-DRAG-SOURCE-UNSET" ></A >gtk_drag_source_unset ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void gtk_drag_source_unset (<A HREF="gtkwidget.html" >GtkWidget</A > *widget);</PRE ></TD ></TR ></TABLE ><P >Undo the effects of <A HREF="gtk-drag-and-drop.html#GTK-DRAG-SOURCE-SET" >gtk_drag_source_set</A >().</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN7554" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >widget</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a <A HREF="gtkwidget.html" >GtkWidget</A > </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7564" ></A ><H3 ><A NAME="GTK-DRAG-SOURCE-HANDLE-EVENT" ></A >gtk_drag_source_handle_event ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void gtk_drag_source_handle_event (<A HREF="gtkwidget.html" >GtkWidget</A > *widget, <A HREF=../gdk/gdk-event-structures.html#GDKEVENT >GdkEvent</A> *event);</PRE ></TD ></TR ></TABLE ><P >Internal function.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN7571" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >widget</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > </TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >event</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN7584" ></A ><H3 ><A NAME="GTK-DRAG-DEST-HANDLE-EVENT" ></A >gtk_drag_dest_handle_event ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void gtk_drag_dest_handle_event (<A HREF="gtkwidget.html" >GtkWidget</A > *toplevel, <A HREF=../gdk/gdk-event-structures.html#GDKEVENT >GdkEvent</A> *event);</PRE ></TD ></TR ></TABLE ><P >Internal function.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN7591" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >toplevel</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > </TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >event</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><BR CLEAR="all"><BR><TABLE WIDTH="100%" BORDER="0" BGCOLOR="#000000" CELLPADDING="1" CELLSPACING="0" ><TR ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="left" ><A HREF="gtk-selections.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><<< Previous Page</B ></FONT ></A ></TD ><TD WIDTH="25%" BGCOLOR="#0000C0" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="index.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Home</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#00C000" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="gtk.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Up</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="right" ><A HREF="gtk-signals.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Next Page >>></B ></FONT ></A ></TD ></TR ><TR ><TD COLSPAN="2" ALIGN="left" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Selections</B ></FONT ></TD ><TD COLSPAN="2" ALIGN="right" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Signals</B ></FONT ></TD ></TR ></TABLE ></DIV ></BODY ></HTML >