| 1 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.gdk.DragContext</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gdk-class-reference.html" title="The gtk.gdk Class Reference"><link rel="prev" href="class-gdkdisplaymanager.html" title="gtk.gdk.DisplayManager"><link rel="next" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.gdk.DragContext</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gdkdisplaymanager.html">Prev</a>Â </td><th width="60%" align="center">The gtk.gdk Class Reference</th><td width="20%" align="right">Â <a accesskey="n" href="class-gdkdrawable.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gdkdragcontext"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.gdk.DragContext</h2><p>gtk.gdk.DragContext â an object containing the drag and drop context |
|---|
| 2 | data</p></div><div class="refsect1" lang="en"><a name="id2891975"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.gdk.DragContext</span></span>(<span class="ooclass"><span class="classname"><PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK></span></span>): |
|---|
| 3 | <code class="constructorsynopsis"> <span class="methodname"><a href="class-gdkdragcontext.html#constructor-gdkdragcontext" title="Constructor">gtk.gdk.DragContext</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkdragcontext.html#method-gdkdragcontext--drag-status" title="gtk.gdk.DragContext.drag_status">drag_status</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>action</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkdragcontext.html#method-gdkdragcontext--drop-reply" title="gtk.gdk.DragContext.drop_reply">drop_reply</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>ok</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkdragcontext.html#method-gdkdragcontext--drop-finish" title="gtk.gdk.DragContext.drop_finish">drop_finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>success</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkdragcontext.html#method-gdkdragcontext--drag-get-selection" title="gtk.gdk.DragContext.drag_get_selection">drag_get_selection</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkdragcontext.html#method-gdkdragcontext--drag-find-window" title="gtk.gdk.DragContext.drag_find_window">drag_find_window</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>drag_window</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x_root</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y_root</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkdragcontext.html#method-gdkdragcontext--drag-find-window-for-screen" title="gtk.gdk.DragContext.drag_find_window_for_screen">drag_find_window_for_screen</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>drag_window</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>screen</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x_root</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y_root</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkdragcontext.html#method-gdkdragcontext--drag-motion" title="gtk.gdk.DragContext.drag_motion">drag_motion</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>dest_window</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>protocol</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x_root</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y_root</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>suggested_action</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>possible_actions</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkdragcontext.html#method-gdkdragcontext--drag-drop" title="gtk.gdk.DragContext.drag_drop">drag_drop</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkdragcontext.html#method-gdkdragcontext--drag-abort" title="gtk.gdk.DragContext.drag_abort">drag_abort</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkdragcontext.html#method-gdkdragcontext--finish" title="gtk.gdk.DragContext.finish">finish</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>success</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>del_</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkdragcontext.html#method-gdkdragcontext--get-source-widget" title="gtk.gdk.DragContext.get_source_widget">get_source_widget</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkdragcontext.html#method-gdkdragcontext--set-icon-widget" title="gtk.gdk.DragContext.set_icon_widget">set_icon_widget</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>hot_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>hot_y</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkdragcontext.html#method-gdkdragcontext--set-icon-pixmap" title="gtk.gdk.DragContext.set_icon_pixmap">set_icon_pixmap</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>colormap</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixmap</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>mask</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>hot_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>hot_y</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkdragcontext.html#method-gdkdragcontext--set-icon-pixbuf" title="gtk.gdk.DragContext.set_icon_pixbuf">set_icon_pixbuf</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbuf</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>hot_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>hot_y</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkdragcontext.html#method-gdkdragcontext--set-icon-stock" title="gtk.gdk.DragContext.set_icon_stock">set_icon_stock</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stock_id</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>hot_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>hot_y</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkdragcontext.html#method-gdkdragcontext--set-icon-name" title="gtk.gdk.DragContext.set_icon_name">set_icon_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>hot_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>hot_y</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkdragcontext.html#method-gdkdragcontext--set-icon-default" title="gtk.gdk.DragContext.set_icon_default">set_icon_default</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gdkdragcontext.html#method-gdkdragcontext--drag-drop-succeeded" title="gtk.gdk.DragContext.drag_drop_succeeded">drag_drop_succeeded</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id2789502"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK> |
|---|
| 4 | +-- <a href="class-gdkdragcontext.html" title="gtk.gdk.DragContext">gtk.gdk.DragContext</a> |
|---|
| 5 | </pre></div><div class="refsect1" lang="en"><a name="id2534991"></a><h2>Attributes</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table cellpadding="5" width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"action"</td><td valign="top">Read</td><td valign="top">the action chosen by the destination. One of: |
|---|
| 6 | <code class="literal">gtk.gdk.ACTION_COPY</code>, |
|---|
| 7 | <code class="literal">gtk.gdk.ACTION_MOVE</code>, |
|---|
| 8 | <code class="literal">gtk.gdk.ACTION_LINK</code>, |
|---|
| 9 | <code class="literal">gtk.gdk.ACTION_PRIVATE</code></td></tr><tr valign="top"><td valign="top">"actions"</td><td valign="top">Read</td><td valign="top">a bitmask of actions proposed by the source when |
|---|
| 10 | <code class="literal">suggested_action</code> is |
|---|
| 11 | <code class="literal">gtk.gdk.ACTION_ASK</code>. A combination of: |
|---|
| 12 | <code class="literal">gtk.gdk.ACTION_COPY</code>, |
|---|
| 13 | <code class="literal">gtk.gdk.ACTION_MOVE</code>, |
|---|
| 14 | <code class="literal">gtk.gdk.ACTION_LINK</code>, |
|---|
| 15 | <code class="literal">gtk.gdk.ACTION_PRIVATE</code></td></tr><tr valign="top"><td valign="top">"dest_window"</td><td valign="top">Read</td><td valign="top">the destination <a href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> of |
|---|
| 16 | this drag.</td></tr><tr valign="top"><td valign="top">"is_source"</td><td valign="top">Read</td><td valign="top">if True the context is used on the source side.</td></tr><tr valign="top"><td valign="top">"protocol"</td><td valign="top">Read</td><td valign="top">the DND protocol which governs this drag - one of: |
|---|
| 17 | <code class="literal">gtk.gdk.DRAG_PROTO_MOTIF</code>, |
|---|
| 18 | <code class="literal">gtk.gdk.DRAG_PROTO_XDND</code>, |
|---|
| 19 | <code class="literal">gtk.gdk.DRAG_PROTO_ROOTWIN</code>, |
|---|
| 20 | <code class="literal">gtk.gdk.DRAG_PROTO_NONE</code>, |
|---|
| 21 | <code class="literal">gtk.gdk.DRAG_PROTO_WIN32_DROPFILES</code>, |
|---|
| 22 | <code class="literal">gtk.gdk.DRAG_PROTO_OLE2</code>, |
|---|
| 23 | <code class="literal">gtk.gdk.DRAG_PROTO_LOCAL</code></td></tr><tr valign="top"><td valign="top">"source_window"</td><td valign="top">Read</td><td valign="top">the source <a href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> of |
|---|
| 24 | this drag.</td></tr><tr valign="top"><td valign="top">"start_time"</td><td valign="top">Read</td><td valign="top">a timestamp recording the start time of this |
|---|
| 25 | drag.</td></tr><tr valign="top"><td valign="top">"suggested_action"</td><td valign="top">Read</td><td valign="top">the action suggested by the source. One of: |
|---|
| 26 | <code class="literal">gtk.gdk.ACTION_DEFAULT</code>, |
|---|
| 27 | <code class="literal">gtk.gdk.ACTION_COPY</code>, |
|---|
| 28 | <code class="literal">gtk.gdk.ACTION_MOVE</code>, |
|---|
| 29 | <code class="literal">gtk.gdk.ACTION_LINK</code>, |
|---|
| 30 | <code class="literal">gtk.gdk.ACTION_PRIVATE</code>, |
|---|
| 31 | <code class="literal">gtk.gdk.ACTION_ASK</code></td></tr><tr valign="top"><td valign="top">"targets"</td><td valign="top">Read</td><td valign="top">a list of targets offered by the source.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id2560562"></a><h2>Description</h2><p>A <a href="class-gdkdragcontext.html" title="gtk.gdk.DragContext"><code class="classname">gtk.gdk.DragContext</code></a> |
|---|
| 32 | holds information about a drag in progress. It is used for both source and |
|---|
| 33 | destination. A <a href="class-gdkdragcontext.html" title="gtk.gdk.DragContext"><code class="classname">gtk.gdk.DragContext</code></a> |
|---|
| 34 | can be created using the <a href="class-gdkdragcontext.html#constructor-gdkdragcontext" title="Constructor">gtk.gdk.DragContext</a>() |
|---|
| 35 | constructor but since there is no way to set its attributes the new object |
|---|
| 36 | is not much use. Useful <a href="class-gdkdragcontext.html" title="gtk.gdk.DragContext"><code class="classname">gtk.gdk.DragContext</code></a> |
|---|
| 37 | objects are created as a result of the <a href="class-gdkwindow.html#method-gdkwindow--drag-begin" title="gtk.gdk.Window.drag_begin"><code class="methodname">gtk.gdk.Window.drag_begin</code>()</a> |
|---|
| 38 | or the <a href="class-gtkwidget.html#method-gtkwidget--drag-begin" title="gtk.Widget.drag_begin"><code class="methodname">gtk.Widget.drag_begin</code>()</a> |
|---|
| 39 | methods.</p></div><div class="refsect1" lang="en"><a name="constructor-gdkdragcontext"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.gdk.DragContext</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>a new <a href="class-gdkdragcontext.html" title="gtk.gdk.DragContext"><code class="classname">gtk.gdk.DragContext</code></a></td></tr></tbody></table><p>Creates a new <a href="class-gdkdragcontext.html" title="gtk.gdk.DragContext"><code class="classname">gtk.gdk.DragContext</code></a> |
|---|
| 40 | object.</p></div><div class="refsect1" lang="en"><a name="id2732137"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gdkdragcontext--drag-status"></a><h3>gtk.gdk.DragContext.drag_status</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">drag_status</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>action</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>action</code></strong>Â :</span></td><td>a drag action that will be taken when a drop |
|---|
| 41 | happens</td></tr><tr><td><span class="term"><strong class="parameter"><code>time</code></strong>Â :</span></td><td>the timestamp for this |
|---|
| 42 | action</td></tr></tbody></table><p>The <code class="methodname">drag_status</code>() method sets the |
|---|
| 43 | specified <em class="parameter"><code>action</code></em> to be taken when a drop happens. The |
|---|
| 44 | value of <em class="parameter"><code>action</code></em> is one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><code class="literal">gtk.gdk.ACTION_DEFAULT</code></span></td><td></td></tr><tr><td><span class="term"><code class="literal">gtk.gdk.ACTION_COPY</code></span></td><td>Copy the data.</td></tr><tr><td><span class="term"><code class="literal">gtk.gdk.ACTION_MOVE</code></span></td><td>Move the data, i.e. first copy it, then delete it from |
|---|
| 45 | the source using the DELETE target of the X selection protocol.</td></tr><tr><td><span class="term"><code class="literal">gtk.gdk.ACTION_LINK</code></span></td><td>Add a link to the data. Note that this is only useful |
|---|
| 46 | if source and destination agree on what it means.</td></tr><tr><td><span class="term"><code class="literal">gtk.gdk.ACTION_PRIVATE</code></span></td><td>Special action which tells the source that the |
|---|
| 47 | destination will do something that the source doesn't understand.</td></tr><tr><td><span class="term"><code class="literal">gtk.gdk.ACTION_ASK</code></span></td><td>Ask the user what to do with the data.</td></tr></tbody></table><p>The time the action occurred is specified by |
|---|
| 48 | <em class="parameter"><code>time</code></em>. This method is called by the drag destination |
|---|
| 49 | in response to <a href="class-gdkdragcontext.html#method-gdkdragcontext--drag-motion" title="gtk.gdk.DragContext.drag_motion"><code class="methodname">drag_motion</code>()</a> |
|---|
| 50 | called by the drag source. |
|---|
| 51 | </p></div><div class="refsect2" lang="en"><a name="method-gdkdragcontext--drop-reply"></a><h3>gtk.gdk.DragContext.drop_reply</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">drop_reply</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>ok</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>ok</code></strong>Â :</span></td><td>if <code class="literal">True</code> the drop is accepted |
|---|
| 52 | by the destination</td></tr><tr><td><span class="term"><strong class="parameter"><code>time</code></strong>Â :</span></td><td>the timestamp</td></tr></tbody></table><p>The <code class="methodname">drop_reply</code>() method determines if |
|---|
| 53 | the drop is accepted or rejected according to the value specified by |
|---|
| 54 | <em class="parameter"><code>ok</code></em>. If <em class="parameter"><code>ok</code></em> is |
|---|
| 55 | <code class="literal">True</code> the drop is accepted. <em class="parameter"><code>time</code></em> |
|---|
| 56 | specifies the time that the drop reply occurred. This method is called by |
|---|
| 57 | the drag destination when a drop is initiated by the drag source.</p></div><div class="refsect2" lang="en"><a name="method-gdkdragcontext--drop-finish"></a><h3>gtk.gdk.DragContext.drop_finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">drop_finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>success</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>success</code></strong>Â :</span></td><td>if True the data was |
|---|
| 58 | received</td></tr><tr><td><span class="term"><strong class="parameter"><code>time</code></strong>Â :</span></td><td>the time of the finish</td></tr></tbody></table><p>The <code class="methodname">drop_finish</code>() method ends a drag |
|---|
| 59 | operation and indicates if the drop was successful by setting the value of |
|---|
| 60 | <em class="parameter"><code>success</code></em>. <em class="parameter"><code>time</code></em> indicates the |
|---|
| 61 | time of the drop finish. This method is called by the drag |
|---|
| 62 | destination.</p></div><div class="refsect2" lang="en"><a name="method-gdkdragcontext--drag-get-selection"></a><h3>gtk.gdk.DragContext.drag_get_selection</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">drag_get_selection</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>the selection atom</td></tr></tbody></table><p>The <code class="methodname">drag_get_selection</code>() method returns |
|---|
| 63 | the selection atom for the current source window.</p></div><div class="refsect2" lang="en"><a name="method-gdkdragcontext--drag-find-window"></a><h3>gtk.gdk.DragContext.drag_find_window</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">drag_find_window</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>drag_window</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x_root</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y_root</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>drag_window</code></strong>Â :</span></td><td>a <a href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a></td></tr><tr><td><span class="term"><strong class="parameter"><code>x_root</code></strong>Â :</span></td><td>the x position of the pointer in root |
|---|
| 64 | coordinates.</td></tr><tr><td><span class="term"><strong class="parameter"><code>y_root</code></strong>Â :</span></td><td>the y position of the pointer in root |
|---|
| 65 | coordinates.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>a 2-tuple containing the drag destination <a href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> and |
|---|
| 66 | the drag protocol</td></tr></tbody></table><p>The <code class="methodname">drag_find_window</code>() method returns a |
|---|
| 67 | 2-tuple containing the drag destination <a href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> and |
|---|
| 68 | the drag protocol being used. The drag protocol is one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><code class="literal">gtk.gdk.DRAG_PROTO_MOTIF</code></span></td><td>The Motif DND protocol. </td></tr><tr><td><span class="term"><code class="literal">gtk.gdk.DRAG_PROTO_XDND</code></span></td><td>The Xdnd protocol.</td></tr><tr><td><span class="term"><code class="literal">gtk.gdk.DRAG_PROTO_ROOTWIN</code></span></td><td>An extension to the Xdnd protocol for unclaimed root |
|---|
| 69 | window drops. </td></tr><tr><td><span class="term"><code class="literal">gtk.gdk.DRAG_PROTO_NONE</code></span></td><td>no protocol.</td></tr><tr><td><span class="term"><code class="literal">gtk.gdk.DRAG_PROTO_WIN32_DROPFILES</code></span></td><td>The simple WM_DROPFILES protocol.</td></tr><tr><td><span class="term"><code class="literal">gtk.gdk.DRAG_PROTO_OLE2</code></span></td><td>The complex OLE2 DND protocol (not |
|---|
| 70 | implemented).</td></tr><tr><td><span class="term"><code class="literal">gtk.gdk.DRAG_PROTO_LOCAL</code></span></td><td>Intra-application DND.</td></tr></tbody></table><p><em class="parameter"><code>drag_window</code></em> is a <a href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> and |
|---|
| 71 | <em class="parameter"><code>x_root</code></em> and <em class="parameter"><code>y_root</code></em> specify the |
|---|
| 72 | location of the mouse pointer in the root window.</p></div><div class="refsect2" lang="en"><a name="method-gdkdragcontext--drag-find-window-for-screen"></a><h3>gtk.gdk.DragContext.drag_find_window_for_screen</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">drag_find_window_for_screen</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>drag_window</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>screen</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x_root</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y_root</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>drag_window</code></strong>Â :</span></td><td>a <a href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a></td></tr><tr><td><span class="term"><strong class="parameter"><code>screen</code></strong>Â :</span></td><td>a <a href="class-gdkscreen.html" title="gtk.gdk.Screen"><code class="classname">gtk.gdk.Screen</code></a></td></tr><tr><td><span class="term"><strong class="parameter"><code>x_root</code></strong>Â :</span></td><td>the x position of the pointer in root |
|---|
| 73 | coordinates.</td></tr><tr><td><span class="term"><strong class="parameter"><code>y_root</code></strong>Â :</span></td><td>the y position of the pointer in root |
|---|
| 74 | coordinates.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>a 2-tuple containing the drag destination <a href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> and |
|---|
| 75 | the drag protocol</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.2 and above.</p></div><p>The <code class="methodname">drag_find_window_for_screen</code>() |
|---|
| 76 | method returns a 2-tuple containing the drag destination <a href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> and |
|---|
| 77 | the drag protocol being used. The drag protocol is one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><code class="literal">gtk.gdk.DRAG_PROTO_MOTIF</code></span></td><td>The Motif DND protocol. </td></tr><tr><td><span class="term"><code class="literal">gtk.gdk.DRAG_PROTO_XDND</code></span></td><td>The Xdnd protocol.</td></tr><tr><td><span class="term"><code class="literal">gtk.gdk.DRAG_PROTO_ROOTWIN</code></span></td><td>An extension to the Xdnd protocol for unclaimed root |
|---|
| 78 | window drops. </td></tr><tr><td><span class="term"><code class="literal">gtk.gdk.DRAG_PROTO_NONE</code></span></td><td>no protocol.</td></tr><tr><td><span class="term"><code class="literal">gtk.gdk.DRAG_PROTO_WIN32_DROPFILES</code></span></td><td>The simple WM_DROPFILES protocol.</td></tr><tr><td><span class="term"><code class="literal">gtk.gdk.DRAG_PROTO_OLE2</code></span></td><td>The complex OLE2 DND protocol (not |
|---|
| 79 | implemented).</td></tr><tr><td><span class="term"><code class="literal">gtk.gdk.DRAG_PROTO_LOCAL</code></span></td><td>Intra-application DND.</td></tr></tbody></table><p><em class="parameter"><code>drag_window</code></em> is a <a href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> and |
|---|
| 80 | <em class="parameter"><code>x_root</code></em> and <em class="parameter"><code>y_root</code></em> specify the |
|---|
| 81 | location of the mouse pointer in the root window.</p></div><div class="refsect2" lang="en"><a name="method-gdkdragcontext--drag-motion"></a><h3>gtk.gdk.DragContext.drag_motion</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">drag_motion</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>dest_window</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>protocol</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x_root</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y_root</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>suggested_action</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>possible_actions</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>dest_window</code></strong>Â :</span></td><td>the destination <a href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> the |
|---|
| 82 | drag is moving over</td></tr><tr><td><span class="term"><strong class="parameter"><code>protocol</code></strong>Â :</span></td><td>the drag protocol in use</td></tr><tr><td><span class="term"><strong class="parameter"><code>x_root</code></strong>Â :</span></td><td>the x root coordinate of the mouse |
|---|
| 83 | pointer</td></tr><tr><td><span class="term"><strong class="parameter"><code>y_root</code></strong>Â :</span></td><td>the y root coordinate of the mouse |
|---|
| 84 | pointer</td></tr><tr><td><span class="term"><strong class="parameter"><code>suggested_action</code></strong>Â :</span></td><td>the suggest drag action</td></tr><tr><td><span class="term"><strong class="parameter"><code>possible_actions</code></strong>Â :</span></td><td>the possible drag actions</td></tr><tr><td><span class="term"><strong class="parameter"><code>time</code></strong>Â :</span></td><td>the timestamp of the drag |
|---|
| 85 | motion</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>True if there is a drag destination window and |
|---|
| 86 | the drag has paused or a drop has occurred.</td></tr></tbody></table><p>The <code class="methodname">drag_motion</code>() method updates the |
|---|
| 87 | drag context when the pointer moves or the set of actions changes. This |
|---|
| 88 | method is called by the drag source. <em class="parameter"><code>dest_window</code></em> |
|---|
| 89 | specifies the drag destination <a href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>; |
|---|
| 90 | <em class="parameter"><code>protocol</code></em> specifies the drag protocol being used (see |
|---|
| 91 | the <a href="class-gdkdragcontext.html#method-gdkdragcontext--drag-find-window" title="gtk.gdk.DragContext.drag_find_window"><code class="methodname">drag_find_window</code>()</a> |
|---|
| 92 | method for details); <em class="parameter"><code>x_root</code></em> and |
|---|
| 93 | <em class="parameter"><code>y_root</code></em> specify the root window coordinates of the |
|---|
| 94 | mouse pointer; <em class="parameter"><code>suggested_action</code></em> specifies the |
|---|
| 95 | suggested drag action (see the <a href="class-gdkdragcontext.html#method-gdkdragcontext--drag-status" title="gtk.gdk.DragContext.drag_status"><code class="methodname">drag_status</code>()</a> |
|---|
| 96 | method for more detail); possible_actions specifies the possible drag |
|---|
| 97 | actions for the drag (see the <a href="class-gdkdragcontext.html#method-gdkdragcontext--drag-status" title="gtk.gdk.DragContext.drag_status"><code class="methodname">drag_status</code>()</a> |
|---|
| 98 | method for more detail); and, <em class="parameter"><code>time</code></em> specifies the |
|---|
| 99 | timestamp of the drag motion.</p></div><div class="refsect2" lang="en"><a name="method-gdkdragcontext--drag-drop"></a><h3>gtk.gdk.DragContext.drag_drop</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">drag_drop</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>time</code></strong>Â :</span></td><td>the timestamp of the drag |
|---|
| 100 | drop.</td></tr></tbody></table><p>The <code class="methodname">drag_drop</code>() method initiates a drop |
|---|
| 101 | on the current drag destination at the time specified by |
|---|
| 102 | <em class="parameter"><code>time</code></em>. This method is called by the drag |
|---|
| 103 | source.</p></div><div class="refsect2" lang="en"><a name="method-gdkdragcontext--drag-abort"></a><h3>gtk.gdk.DragContext.drag_abort</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">drag_abort</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>time</code></strong>Â :</span></td><td>the time of the drag abort |
|---|
| 104 | operation</td></tr></tbody></table><p>The <code class="methodname">drag_abort</code>() method aborts the |
|---|
| 105 | current drag operation at the specified <em class="parameter"><code>time</code></em>. No drop |
|---|
| 106 | operation is initiated. This method is called by the drag source.</p></div><div class="refsect2" lang="en"><a name="method-gdkdragcontext--finish"></a><h3>gtk.gdk.DragContext.finish</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">finish</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>success</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>del_</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>time</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>success</code></strong>Â :</span></td><td>if <code class="literal">True</code> the drop was |
|---|
| 107 | completed</td></tr><tr><td><span class="term"><strong class="parameter"><code>del_</code></strong>Â :</span></td><td>if <code class="literal">True</code> the drag source |
|---|
| 108 | should delete the source data</td></tr><tr><td><span class="term"><strong class="parameter"><code>time</code></strong>Â :</span></td><td>the time of the drag finish |
|---|
| 109 | operation.</td></tr></tbody></table><p>The <code class="methodname">finish</code>() method informs the drag |
|---|
| 110 | source that the drop is finished, and that the data of the drag will no |
|---|
| 111 | longer be required. If <em class="parameter"><code>success</code></em> is |
|---|
| 112 | <code class="literal">True</code> the drag drop completed successfully; if |
|---|
| 113 | <em class="parameter"><code>del_</code></em> is <code class="literal">True</code> the source data |
|---|
| 114 | should be deleted; <em class="parameter"><code>time</code></em> is the timestamp of the |
|---|
| 115 | finish operation. This method is called by the drag destination.</p></div><div class="refsect2" lang="en"><a name="method-gdkdragcontext--get-source-widget"></a><h3>gtk.gdk.DragContext.get_source_widget</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_source_widget</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td>the source <a href="class-gtkwidget.html" title="gtk.Widget"><code class="classname">gtk.Widget</code></a> if the |
|---|
| 116 | drag is within the same application or <code class="literal">None</code> |
|---|
| 117 | otherwise.</td></tr></tbody></table><p>The <code class="methodname">get_source_widget</code>() method returns |
|---|
| 118 | the source <a href="class-gtkwidget.html" title="gtk.Widget"><code class="classname">gtk.Widget</code></a> if the |
|---|
| 119 | drag is within the application; otherwise <code class="literal">None</code> is |
|---|
| 120 | returned.</p></div><div class="refsect2" lang="en"><a name="method-gdkdragcontext--set-icon-widget"></a><h3>gtk.gdk.DragContext.set_icon_widget</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_icon_widget</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>hot_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>hot_y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>widget</code></strong>Â :</span></td><td>a toplevel window to use as an |
|---|
| 121 | icon.</td></tr><tr><td><span class="term"><strong class="parameter"><code>hot_x</code></strong>Â :</span></td><td>the X offset within |
|---|
| 122 | <em class="parameter"><code>widget</code></em> of the hotspot.</td></tr><tr><td><span class="term"><strong class="parameter"><code>hot_y</code></strong>Â :</span></td><td>the Y offset within |
|---|
| 123 | <em class="parameter"><code>widget</code></em> of the hotspot.</td></tr></tbody></table><p>The <code class="methodname">set_icon_widget</code>() method changes |
|---|
| 124 | the icon for a drag source to the specified <em class="parameter"><code>widget</code></em> |
|---|
| 125 | with its hot spot at the offset specified by <em class="parameter"><code>hot_x</code></em> |
|---|
| 126 | and <em class="parameter"><code>hot_y</code></em>. <code class="literal">PyGTK</code> will not destroy |
|---|
| 127 | the icon, so if you don't want it to persist, you should connect to the |
|---|
| 128 | "drag_end" signal and destroy it yourself.</p></div><div class="refsect2" lang="en"><a name="method-gdkdragcontext--set-icon-pixmap"></a><h3>gtk.gdk.DragContext.set_icon_pixmap</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_icon_pixmap</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>colormap</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixmap</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>mask</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>hot_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>hot_y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>colormap</code></strong>Â :</span></td><td>the colormap of the icon</td></tr><tr><td><span class="term"><strong class="parameter"><code>pixmap</code></strong>Â :</span></td><td>the <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> image |
|---|
| 129 | data for the icon</td></tr><tr><td><span class="term"><strong class="parameter"><code>mask</code></strong>Â :</span></td><td>the <a href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> |
|---|
| 130 | transparency mask for the icon</td></tr><tr><td><span class="term"><strong class="parameter"><code>hot_x</code></strong>Â :</span></td><td>the X offset within |
|---|
| 131 | <em class="parameter"><code>pixmap</code></em> of the hotspot.</td></tr><tr><td><span class="term"><strong class="parameter"><code>hot_y</code></strong>Â :</span></td><td>the Y offset within |
|---|
| 132 | <em class="parameter"><code>pixmap</code></em> of the hotspot.</td></tr></tbody></table><p>The <code class="methodname">set_icon_pixmap</code>() method sets |
|---|
| 133 | <em class="parameter"><code>pixmap</code></em> as the icon for the drag. |
|---|
| 134 | <em class="parameter"><code>mask</code></em> is a bitmap mask for |
|---|
| 135 | <em class="parameter"><code>pixmap</code></em> and <em class="parameter"><code>hot_x</code></em> and |
|---|
| 136 | <em class="parameter"><code>hot_y</code></em> specify the offset of the hot spot in |
|---|
| 137 | <em class="parameter"><code>pixmap</code></em>. In general, <a href="class-gdkdragcontext.html#method-gdkdragcontext--set-icon-pixbuf" title="gtk.gdk.DragContext.set_icon_pixbuf"><code class="function">gtk.gdk.DragContext.set_icon_pixbuf()</code></a> |
|---|
| 138 | will be more convenient to use.</p></div><div class="refsect2" lang="en"><a name="method-gdkdragcontext--set-icon-pixbuf"></a><h3>gtk.gdk.DragContext.set_icon_pixbuf</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_icon_pixbuf</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbuf</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>hot_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>hot_y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>pixbuf</code></strong>Â :</span></td><td>the <a href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a> to |
|---|
| 139 | use as the drag icon.</td></tr><tr><td><span class="term"><strong class="parameter"><code>hot_x</code></strong>Â :</span></td><td>the X offset within |
|---|
| 140 | <em class="parameter"><code>pixbuf</code></em> of the hotspot.</td></tr><tr><td><span class="term"><strong class="parameter"><code>hot_y</code></strong>Â :</span></td><td>the Y offset within |
|---|
| 141 | <em class="parameter"><code>pixbuf</code></em> of the hotspot.</td></tr></tbody></table><p>The <code class="methodname">set_icon_pixbuf</code>() method sets |
|---|
| 142 | <em class="parameter"><code>pixbuf</code></em> as the icon for the drag. |
|---|
| 143 | <em class="parameter"><code>hot_x</code></em> and <em class="parameter"><code>hot_y</code></em> specify the |
|---|
| 144 | offset of the hot spot within <em class="parameter"><code>pixbuf</code></em>.</p></div><div class="refsect2" lang="en"><a name="method-gdkdragcontext--set-icon-stock"></a><h3>gtk.gdk.DragContext.set_icon_stock</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_icon_stock</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stock_id</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>hot_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>hot_y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>stock_id</code></strong>Â :</span></td><td>the ID of the stock icon to use for the |
|---|
| 145 | drag.</td></tr><tr><td><span class="term"><strong class="parameter"><code>hot_x</code></strong>Â :</span></td><td>the X offset within the icon of the |
|---|
| 146 | hotspot.</td></tr><tr><td><span class="term"><strong class="parameter"><code>hot_y</code></strong>Â :</span></td><td>the Y offset within the icon of the |
|---|
| 147 | hotspot.</td></tr></tbody></table><p>The <code class="methodname">set_icon_stock</code>() method sets the |
|---|
| 148 | the icon for a given drag from a stock ID specified by |
|---|
| 149 | <em class="parameter"><code>stock_id</code></em>. <em class="parameter"><code>hot_x</code></em> and |
|---|
| 150 | <em class="parameter"><code>hot_y</code></em> specify the offset of the hot spot within the |
|---|
| 151 | stock icon.</p></div><div class="refsect2" lang="en"><a name="method-gdkdragcontext--set-icon-name"></a><h3>gtk.gdk.DragContext.set_icon_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_icon_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>hot_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>hot_y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>icon_name</code></strong>Â :</span></td><td>the name of the icon to use for the |
|---|
| 152 | drag.</td></tr><tr><td><span class="term"><strong class="parameter"><code>hot_x</code></strong>Â :</span></td><td>the X offset within the icon of the |
|---|
| 153 | hotspot.</td></tr><tr><td><span class="term"><strong class="parameter"><code>hot_y</code></strong>Â :</span></td><td>the Y offset within the icon of the |
|---|
| 154 | hotspot.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">set_icon_name</code>() method sets the the |
|---|
| 155 | icon for a given drag from the named themed icon specified by |
|---|
| 156 | <em class="parameter"><code>icon_name</code></em>. <em class="parameter"><code>hot_x</code></em> and |
|---|
| 157 | <em class="parameter"><code>hot_y</code></em> specify the offset of the hot spot within the |
|---|
| 158 | stock icon. See the docs for <a href="class-gtkicontheme.html" title="gtk.IconTheme"><code class="classname">gtk.IconTheme</code></a> for |
|---|
| 159 | more information. Note that the size of the icon depends on the icon theme |
|---|
| 160 | (the icon is loaded at the symbolic size |
|---|
| 161 | <code class="literal">gtk.ICON_SIZE_DND</code>), thus <em class="parameter"><code>hot_x</code></em> and |
|---|
| 162 | <em class="parameter"><code>hot_y</code></em> have to be used with care.</p></div><div class="refsect2" lang="en"><a name="method-gdkdragcontext--set-icon-default"></a><h3>gtk.gdk.DragContext.set_icon_default</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_icon_default</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">set_icon_default</code>() method sets the |
|---|
| 163 | icon for the drag to the default icon.</p></div><div class="refsect2" lang="en"><a name="method-gdkdragcontext--drag-drop-succeeded"></a><h3>gtk.gdk.DragContext.drag_drop_succeeded</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">drag_drop_succeeded</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>Â :</span></td><td><code class="literal">True</code> if the drop was |
|---|
| 164 | successful.</td></tr></tbody></table><p>The <code class="methodname">drag_drop_succeeded</code>() method |
|---|
| 165 | returns <code class="literal">True</code> if the dropped data has been successfully |
|---|
| 166 | transferred. This method is intended to be used while handling a |
|---|
| 167 | <code class="literal">gtk.gdk.DROP_FINISHED</code> event, its return value is |
|---|
| 168 | meaningless at other times.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gdkdisplaymanager.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gdk-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gdkdrawable.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.gdk.DisplayManager </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.gdk.Drawable</td></tr></table></div></body></html> |
|---|