?? gdk-drag-and-drop.html
字號(hào):
<td><p><span class="term"><em class="parameter"><code>drag_window</code></em> :</span></p></td><td> a window which may be at the pointer position, but should be ignored, since it is put up by the drag source as an icon.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>x_root</code></em> :</span></p></td><td> the x position of the pointer in root coordinates.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>y_root</code></em> :</span></p></td><td> the y position of the pointer in root coordinates.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>dest_window</code></em> :</span></p></td><td> location to store the destination window in.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>protocol</code></em> :</span></p></td><td> location to store the DND protocol in.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3266399"></a><h3><a name="gdk-drag-find-window-for-screen"></a>gdk_drag_find_window_for_screen ()</h3><a class="indexterm" name="id3266415"></a><pre class="programlisting">void gdk_drag_find_window_for_screen (<a class="link" href="gdk-Drag-and-Drop.html#GdkDragContext">GdkDragContext</a> *context, <a class="link" href="gdk-Windows.html#GdkWindow">GdkWindow</a> *drag_window, <a class="link" href="GdkScreen.html" title="GdkScreen">GdkScreen</a> *screen, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> x_root, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> y_root, <a class="link" href="gdk-Windows.html#GdkWindow">GdkWindow</a> **dest_window, <a class="link" href="gdk-Drag-and-Drop.html#GdkDragProtocol">GdkDragProtocol</a> *protocol);</pre><p>Finds the destination window and DND protocol to use at thegiven pointer position. </p><p>This function is called by the drag source to obtain the <em class="parameter"><code>dest_window</code></em> and <em class="parameter"><code>protocol</code></em> parameters for <a class="link" href="gdk-Drag-and-Drop.html#gdk-drag-motion"><code class="function">gdk_drag_motion()</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td><td> a <a class="link" href="gdk-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>drag_window</code></em> :</span></p></td><td> a window which may be at the pointer position, butshould be ignored, since it is put up by the drag source as an icon.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>screen</code></em> :</span></p></td><td> the screen where the destination window is sought. </td></tr><tr><td><p><span class="term"><em class="parameter"><code>x_root</code></em> :</span></p></td><td> the x position of the pointer in root coordinates.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>y_root</code></em> :</span></p></td><td> the y position of the pointer in root coordinates.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>dest_window</code></em> :</span></p></td><td> location to store the destination window in.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>protocol</code></em> :</span></p></td><td> location to store the DND protocol in.</td></tr></tbody></table></div><p class="since">Since 2.2</p></div><hr><div class="refsect2" lang="en"><a name="id3266644"></a><h3><a name="gdk-drag-context-ref"></a>gdk_drag_context_ref ()</h3><a class="indexterm" name="id3266659"></a><pre class="programlisting">void gdk_drag_context_ref (<a class="link" href="gdk-Drag-and-Drop.html#GdkDragContext">GdkDragContext</a> *context);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gdk_drag_context_ref</code> is deprecated and should not be used in newly-written code.</p></div><p>Deprecated function; use <ahref="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a> instead.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td><td> a <a class="link" href="gdk-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3266741"></a><h3><a name="gdk-drag-begin"></a>gdk_drag_begin ()</h3><a class="indexterm" name="id3266754"></a><pre class="programlisting"><a class="link" href="gdk-Drag-and-Drop.html#GdkDragContext">GdkDragContext</a>* gdk_drag_begin (<a class="link" href="gdk-Windows.html#GdkWindow">GdkWindow</a> *window, <ahref="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList">GList</a> *targets);</pre><p>Starts a drag and creates a new drag context for it.</p><p>This function is called by the drag source.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>window</code></em> :</span></p></td><td> the source window for this drag.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>targets</code></em> :</span></p></td><td> the list of offered targets.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> a newly created <a class="link" href="gdk-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3266850"></a><h3><a name="gdk-drag-motion"></a>gdk_drag_motion ()</h3><a class="indexterm" name="id3266863"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> gdk_drag_motion (<a class="link" href="gdk-Drag-and-Drop.html#GdkDragContext">GdkDragContext</a> *context, <a class="link" href="gdk-Windows.html#GdkWindow">GdkWindow</a> *dest_window, <a class="link" href="gdk-Drag-and-Drop.html#GdkDragProtocol">GdkDragProtocol</a> protocol, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> x_root, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> y_root, <a class="link" href="gdk-Drag-and-Drop.html#GdkDragAction">GdkDragAction</a> suggested_action, <a class="link" href="gdk-Drag-and-Drop.html#GdkDragAction">GdkDragAction</a> possible_actions, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32">guint32</a> time_);</pre><p>Updates the drag context when the pointer moves or the set of actions changes.</p><p>This function is called by the drag source.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td><td> a <a class="link" href="gdk-Drag-and-Drop.html#GdkDragContext"><span class="type">GdkDragContext</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>dest_window</code></em> :</span></p></td><td> the new destination window, obtained by <a class="link" href="gdk-Drag-and-Drop.html#gdk-drag-find-window"><code class="function">gdk_drag_find_window()</code></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>protocol</code></em> :</span></p></td><td> the DND protocol in use, obtained by <a class="link" href="gdk-Drag-and-Drop.html#gdk-drag-find-window"><code class="function">gdk_drag_find_window()</code></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>x_root</code></em> :</span></p></td><td> the x position of the pointer in root coordinates.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>y_root</code></em> :</span></p></td><td> the y position of the pointer in root coordinates.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>suggested_action</code></em> :</span></p></td><td> the suggested action.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>possible_actions</code></em> :</span></p></td><td> the possible actions.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td><td> the timestamp for this operation.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> FIXME</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3267116"></a><h3><a name="gdk-drop-finish"></a>gdk_drop_finish ()</h3><a class="indexterm" name="id3267129"></a><pre class="programlisting">void gdk_drop_finish (<a class="link" href="gdk-Drag-and-Drop.html#GdkDragContext">GdkDragContext</a> *context, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> success, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32">guint32</a> time_);</pre><p>Ends the drag operation after a drop.</p><p>This function is called by the drag destination.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td><td> a <span class="type">GtkDragContext</span>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>success</code></em> :</span></p></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the data was successfully received.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>time_</code></em> :</span></p></td><td> the timestamp for this operation.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3267247"></a><h3><a name="gdk-drag-get-protocol"></a>gdk_drag_get_protocol ()</h3><a class="indexterm" name="id3267261"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32">guint32</a> gdk_drag_get_protocol (<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32">guint32</a> xid, <a class="link" href="gdk-Drag-and-Drop.html#GdkDragProtocol">GdkDragProtocol</a> *protocol);</pre><p>Finds out the DND protocol supported by a window.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>xid</code></em> :</span></p></td><td> the X id of the destination window.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>protocol</code></em> :</span></p></td><td> location where the supported DND protocol is returned.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the X id of the window where the drop should happen. This may be <em class="parameter"><code>xid</code></em> or the X id of a proxy window, or None if <em class="parameter"><code>xid</code></em> doesn't support Drag and Drop.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3267359"></a><h3><a name="gdk-drag-get-protocol-for-display"></a>gdk_drag_get_protocol_for_display ()</h3><a class="indexterm" name="id3267375"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32">guint32</a> gdk_drag_get_protocol_for_display (<a class="link" href="GdkDisplay.html" title="GdkDisplay">GdkDisplay</a> *display, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32">guint32</a> xid, <a class="link" href="gdk-Drag-and-Drop.html#GdkDragProtocol">GdkDragProtocol</a> *protocol);</pre><p>Finds out the DND protocol supported by a window.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>display</code></em> :</span></p></td><td> the <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> where the destination window resides</td></tr><tr><td><p><span class="term"><em class="parameter"><code>xid</code></em> :</span></p></td><td> the X id of the destination window.</td></tr>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -