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

📄 gtk-drag-and-drop.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<p class="since">Since  2.10</p></div><hr><div class="refsect2" lang="en"><a name="id3187069"></a><h3><a name="gtk-drag-dest-get-track-motion"></a>gtk_drag_dest_get_track_motion ()</h3><a class="indexterm" name="id3187084"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>            gtk_drag_dest_get_track_motion      (<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre><p>Returns whether the widget has been configured to alwaysemit ::drag-motion signals.</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"><span class="emphasis"><em>Returns</em></span>&#160;:</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 widget always emits ::drag-motion events</td></tr></tbody></table></div><p class="since">Since  2.10</p></div><hr><div class="refsect2" lang="en"><a name="id3187172"></a><h3><a name="gtk-drag-finish"></a>gtk_drag_finish ()</h3><a class="indexterm" name="id3187184"></a><pre class="programlisting">void                gtk_drag_finish                     (<ahref="/usr/share/gtk-doc/html/gdk/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#gboolean">gboolean</a> del,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32">guint32</a> time_);</pre><p>Informs the drag source that the drop is finished, andthat the data of the drag will no longer be required.</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>&#160;:</span></p></td><td>the drag context.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>success</code></em>&#160;:</span></p></td><td>a flag indicating whether the drop was successful</td></tr><tr><td><p><span class="term"><em class="parameter"><code>del</code></em>&#160;:</span></p></td><td>a flag indicating whether the source should delete the      original data. (This should be <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for a move)</td></tr><tr><td><p><span class="term"><em class="parameter"><code>time_</code></em>&#160;:</span></p></td><td>the timestamp from the "drag_data_drop" signal.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3187311"></a><h3><a name="gtk-drag-get-data"></a>gtk_drag_get_data ()</h3><a class="indexterm" name="id3187325"></a><pre class="programlisting">void                gtk_drag_get_data                   (<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,                                                         <ahref="/usr/share/gtk-doc/html/gdk/gdk-Properties-and-Atoms.html#GdkAtom">GdkAtom</a> target,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32">guint32</a> time_);</pre><p>Gets the data associated with a drag. When the datais received or the retrieval fails, GTK+ will emit a "drag_data_received" signal. Failure of the retrievalis indicated by the length field of the <em class="parameter"><code>selection_data</code></em>signal parameter being negative. However, when <a class="link" href="gtk-Drag-and-Drop.html#gtk-drag-get-data"><code class="function">gtk_drag_get_data()</code></a> is called implicitely because the <a class="link" href="gtk-Drag-and-Drop.html#GTK-DEST-DEFAULT-DROP:CAPS"><code class="literal">GTK_DEST_DEFAULT_DROP</code></a> was set, then the widget will not receive notification of faileddrops.</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>the widget that will receive the "drag_data_received" signal.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></p></td><td>the drag context</td></tr><tr><td><p><span class="term"><em class="parameter"><code>target</code></em>&#160;:</span></p></td><td>the target (form of the data) to retrieve.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>time_</code></em>&#160;:</span></p></td><td>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></div></div><hr><div class="refsect2" lang="en"><a name="id3187473"></a><h3><a name="gtk-drag-get-source-widget"></a>gtk_drag_get_source_widget ()</h3><a class="indexterm" name="id3187487"></a><pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          gtk_drag_get_source_widget          (<ahref="/usr/share/gtk-doc/html/gdk/gdk-Drag-and-Drop.html#GdkDragContext">GdkDragContext</a> *context);</pre><p>Determines the source widget for a drag.</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>&#160;:</span></p></td><td>a (destination side) drag context.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td>if the drag is occurring within a single application,          a pointer to the source widget. Otherwise, <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3187557"></a><h3><a name="gtk-drag-highlight"></a>gtk_drag_highlight ()</h3><a class="indexterm" name="id3187570"></a><pre class="programlisting">void                gtk_drag_highlight                  (<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre><p>Draws a highlight around a widget. This will attachhandlers to  "expose_event" and "draw", so the highlightwill continue to be displayed until <a class="link" href="gtk-Drag-and-Drop.html#gtk-drag-unhighlight"><code class="function">gtk_drag_unhighlight()</code></a>is called.</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 widget to highlight</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3187630"></a><h3><a name="gtk-drag-unhighlight"></a>gtk_drag_unhighlight ()</h3><a class="indexterm" name="id3187643"></a><pre class="programlisting">void                gtk_drag_unhighlight                (<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre><p>Removes a highlight set by <a class="link" href="gtk-Drag-and-Drop.html#gtk-drag-highlight"><code class="function">gtk_drag_highlight()</code></a> froma widget.</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 widget to remove the highlight from.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3187702"></a><h3><a name="gtk-drag-begin"></a>gtk_drag_begin ()</h3><a class="indexterm" name="id3187715"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/gdk/gdk-Drag-and-Drop.html#GdkDragContext">GdkDragContext</a>*     gtk_drag_begin                      (<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,                                                         <a class="link" href="gtk-Selections.html#GtkTargetList">GtkTargetList</a> *targets,                                                         <ahref="/usr/share/gtk-doc/html/gdk/gdk-Drag-and-Drop.html#GdkDragAction">GdkDragAction</a> actions,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> button,                                                         <ahref="/usr/share/gtk-doc/html/gdk/gdk-Event-Structures.html#GdkEvent">GdkEvent</a> *event);</pre><p>Initiates a drag on the source side. The functiononly needs to be used when the application isstarting drags itself, and is not needed when<a class="link" href="gtk-Drag-and-Drop.html#gtk-drag-source-set"><code class="function">gtk_drag_source_set()</code></a> is used.</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> the source widget.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>targets</code></em>&#160;:</span></p></td><td> The targets (data formats) in which the   source can provide the data.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>actions</code></em>&#160;:</span></p></td><td> A bitmask of the allowed drag actions for this drag.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></p></td><td> The button the user clicked to start the drag.</td></tr><tr>

⌨️ 快捷键说明

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