⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gtk-drag-and-drop.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<td><p><span class="term"><em class="parameter"><code>protocol</code></em>&#160;:</span></p></td><td>the drag protocol which the <em class="parameter"><code>proxy_window</code></em> accepts           (You can use <ahref="/usr/share/gtk-doc/html/gdk/gdk-Drag-and-Drop.html#gdk-drag-get-protocol"><code class="function">gdk_drag_get_protocol()</code></a> to determine this)</td></tr><tr><td><p><span class="term"><em class="parameter"><code>use_coordinates</code></em>&#160;:</span></p></td><td>If <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, send the same coordinates to the                  destination, because it is an embedded                   subwindow.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3186096"></a><h3><a name="gtk-drag-dest-unset"></a>gtk_drag_dest_unset ()</h3><a class="indexterm" name="id3186109"></a><pre class="programlisting">void                gtk_drag_dest_unset                 (<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre><p>Clears information about a drop destination set with<a class="link" href="gtk-Drag-and-Drop.html#gtk-drag-dest-set"><code class="function">gtk_drag_dest_set()</code></a>. The widget will no longer receivenotification of drags.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>widget</code></em>&#160;:</span></p></td><td>a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3186175"></a><h3><a name="gtk-drag-dest-find-target"></a>gtk_drag_dest_find_target ()</h3><a class="indexterm" name="id3186189"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/gdk/gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a>             gtk_drag_dest_find_target           (<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,                                                         <ahref="/usr/share/gtk-doc/html/gdk/gdk-Drag-and-Drop.html#GdkDragContext">GdkDragContext</a> *context,                                                         <a class="link" href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *target_list);</pre><p>Looks for a match between <em class="parameter"><code>context-&gt;targets</code></em> and the<em class="parameter"><code>dest_target_list</code></em>, returning the first matching target, otherwisereturning <ahref="/usr/share/gtk-doc/html/gdk/gdk-Properties-and-Atoms.html#GDK-NONE:CAPS"><code class="literal">GDK_NONE</code></a>. <em class="parameter"><code>dest_target_list</code></em> should usually be the returnvalue from <a class="link" href="gtk-Drag-and-Drop.html#gtk-drag-dest-get-target-list"><code class="function">gtk_drag_dest_get_target_list()</code></a>, but some widgets mayhave different valid targets for different parts of the widget; inthat case, they will have to implement a drag_motion handler thatpasses the correct target list to this function.</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>widget</code></em>&#160;:</span></p></td><td> drag destination widget</td></tr><tr><td><p><span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></p></td><td> drag context</td></tr><tr><td><p><span class="term"><em class="parameter"><code>target_list</code></em>&#160;:</span></p></td><td> list of droppable targets, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to use   gtk_drag_dest_get_target_list (<em class="parameter"><code>widget</code></em>).</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> first target that the source offers and the dest can accept, or <ahref="/usr/share/gtk-doc/html/gdk/gdk-Properties-and-Atoms.html#GDK-NONE:CAPS"><code class="literal">GDK_NONE</code></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3186367"></a><h3><a name="gtk-drag-dest-get-target-list"></a>gtk_drag_dest_get_target_list ()</h3><a class="indexterm" name="id3186381"></a><pre class="programlisting"><a class="link" href="gtk-Selections.html#GtkTargetList">GtkTargetList</a>*      gtk_drag_dest_get_target_list       (<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre><p>Returns the list of targets this widget can accept fromdrag-and-drop.</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>widget</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> the <a class="link" href="gtk-Selections.html#GtkTargetList"><span class="type">GtkTargetList</span></a>, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if none</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3186469"></a><h3><a name="gtk-drag-dest-set-target-list"></a>gtk_drag_dest_set_target_list ()</h3><a class="indexterm" name="id3186482"></a><pre class="programlisting">void                gtk_drag_dest_set_target_list       (<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,                                                         <a class="link" href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *target_list);</pre><p>Sets the target types that this widget can accept from drag-and-drop.The widget must first be made into a drag destination with<a class="link" href="gtk-Drag-and-Drop.html#gtk-drag-dest-set"><code class="function">gtk_drag_dest_set()</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>widget</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that's a drag destination</td></tr><tr><td><p><span class="term"><em class="parameter"><code>target_list</code></em>&#160;:</span></p></td><td> list of droppable targets, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> for none</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3186585"></a><h3><a name="gtk-drag-dest-add-text-targets"></a>gtk_drag_dest_add_text_targets ()</h3><a class="indexterm" name="id3186601"></a><pre class="programlisting">void                gtk_drag_dest_add_text_targets      (<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre><p>Add the text targets supported by <span class="type">GtkSelection</span> tothe target list of the drag destination. The targetsare added with <em class="parameter"><code>info</code></em> = 0. If you need another value, use <a class="link" href="gtk-Selections.html#gtk-target-list-add-text-targets"><code class="function">gtk_target_list_add_text_targets()</code></a> and<a class="link" href="gtk-Drag-and-Drop.html#gtk-drag-dest-set-target-list"><code class="function">gtk_drag_dest_set_target_list()</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>widget</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that's a drag destination</td></tr></tbody></table></div><p class="since">Since  2.6</p></div><hr><div class="refsect2" lang="en"><a name="id3186706"></a><h3><a name="gtk-drag-dest-add-image-targets"></a>gtk_drag_dest_add_image_targets ()</h3><a class="indexterm" name="id3186721"></a><pre class="programlisting">void                gtk_drag_dest_add_image_targets     (<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre><p>Add the image targets supported by <span class="type">GtkSelection</span> tothe target list of the drag destination. The targetsare added with <em class="parameter"><code>info</code></em> = 0. If you need another value, use <a class="link" href="gtk-Selections.html#gtk-target-list-add-image-targets"><code class="function">gtk_target_list_add_image_targets()</code></a> and<a class="link" href="gtk-Drag-and-Drop.html#gtk-drag-dest-set-target-list"><code class="function">gtk_drag_dest_set_target_list()</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>widget</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that's a drag destination</td></tr></tbody></table></div><p class="since">Since  2.6</p></div><hr><div class="refsect2" lang="en"><a name="id3186827"></a><h3><a name="gtk-drag-dest-add-uri-targets"></a>gtk_drag_dest_add_uri_targets ()</h3><a class="indexterm" name="id3186843"></a><pre class="programlisting">void                gtk_drag_dest_add_uri_targets       (<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre><p>Add the URI targets supported by <span class="type">GtkSelection</span> tothe target list of the drag destination. The targetsare added with <em class="parameter"><code>info</code></em> = 0. If you need another value, use <a class="link" href="gtk-Selections.html#gtk-target-list-add-uri-targets"><code class="function">gtk_target_list_add_uri_targets()</code></a> and<a class="link" href="gtk-Drag-and-Drop.html#gtk-drag-dest-set-target-list"><code class="function">gtk_drag_dest_set_target_list()</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>widget</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that's a drag destination</td></tr></tbody></table></div><p class="since">Since  2.6</p></div><hr><div class="refsect2" lang="en"><a name="id3186948"></a><h3><a name="gtk-drag-dest-set-track-motion"></a>gtk_drag_dest_set_track_motion ()</h3><a class="indexterm" name="id3186963"></a><pre class="programlisting">void                gtk_drag_dest_set_track_motion      (<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> track_motion);</pre><p>Tells the widget to emit ::drag-motion and ::drag-leaveevents regardless of the targets and the <a class="link" href="gtk-Drag-and-Drop.html#GTK-DEST-DEFAULT-MOTION:CAPS"><code class="literal">GTK_DEST_DEFAULT_MOTION</code></a>flag. </p><p>This may be used when a widget wants to do genericactions regardless of the targets that the source offers.</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>widget</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> that's a drag destination</td></tr><tr><td><p><span class="term"><em class="parameter"><code>track_motion</code></em>&#160;:</span></p></td><td> whether to accept all targets</td></tr></tbody></table></div>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -