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

📄 gtk-drag-and-drop.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<td><p><span class="term"><em class="parameter"><code>event</code></em>&#160;:</span></p></td><td> The event that triggered the start of the drag.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> the context for this drag.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3187880"></a><h3><a name="gtk-drag-set-icon-widget"></a>gtk_drag_set_icon_widget ()</h3><a class="indexterm" name="id3187893"></a><pre class="programlisting">void                gtk_drag_set_icon_widget            (<ahref="/usr/share/gtk-doc/html/gdk/gdk-Drag-and-Drop.html#GdkDragContext">GdkDragContext</a> *context,                                                         <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> hot_x,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> hot_y);</pre><p>Changes the icon for a widget to a given widget. GTK+will not destroy the icon, so if you don't wantit to persist, you should connect to the "drag_end" signal and destroy it yourself.</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>&#160;:</span></p></td><td> the context for a drag. (This must be called           with a  context for the source side of a drag)</td></tr><tr><td><p><span class="term"><em class="parameter"><code>widget</code></em>&#160;:</span></p></td><td> a toplevel window to use as an icon.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>hot_x</code></em>&#160;:</span></p></td><td> the X offset within <em class="parameter"><code>widget</code></em> of the hotspot.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>hot_y</code></em>&#160;:</span></p></td><td> the Y offset within <em class="parameter"><code>widget</code></em> of the hotspot.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3188026"></a><h3><a name="gtk-drag-set-icon-pixmap"></a>gtk_drag_set_icon_pixmap ()</h3><a class="indexterm" name="id3188040"></a><pre class="programlisting">void                gtk_drag_set_icon_pixmap            (<ahref="/usr/share/gtk-doc/html/gdk/gdk-Drag-and-Drop.html#GdkDragContext">GdkDragContext</a> *context,                                                         <ahref="/usr/share/gtk-doc/html/gdk/gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a> *colormap,                                                         <ahref="/usr/share/gtk-doc/html/gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a> *pixmap,                                                         <ahref="/usr/share/gtk-doc/html/gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap">GdkBitmap</a> *mask,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> hot_x,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> hot_y);</pre><p>Sets <em class="parameter"><code>pixmap</code></em> as the icon for a given drag. GTK+ retainsreferences for the arguments, and will release them whenthey are no longer needed. In general, <a class="link" href="gtk-Drag-and-Drop.html#gtk-drag-set-icon-pixbuf"><code class="function">gtk_drag_set_icon_pixbuf()</code></a>will be more convenient to use.</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>&#160;:</span></p></td><td> the context for a drag. (This must be called            with a  context for the source side of a drag)</td></tr><tr><td><p><span class="term"><em class="parameter"><code>colormap</code></em>&#160;:</span></p></td><td> the colormap of the icon </td></tr><tr><td><p><span class="term"><em class="parameter"><code>pixmap</code></em>&#160;:</span></p></td><td> the image data for the icon </td></tr><tr><td><p><span class="term"><em class="parameter"><code>mask</code></em>&#160;:</span></p></td><td> the transparency mask for the icon</td></tr><tr><td><p><span class="term"><em class="parameter"><code>hot_x</code></em>&#160;:</span></p></td><td> the X offset within <em class="parameter"><code>pixmap</code></em> of the hotspot.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>hot_y</code></em>&#160;:</span></p></td><td> the Y offset within <em class="parameter"><code>pixmap</code></em> of the hotspot.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3188234"></a><h3><a name="gtk-drag-set-icon-pixbuf"></a>gtk_drag_set_icon_pixbuf ()</h3><a class="indexterm" name="id3188247"></a><pre class="programlisting">void                gtk_drag_set_icon_pixbuf            (<ahref="/usr/share/gtk-doc/html/gdk/gdk-Drag-and-Drop.html#GdkDragContext">GdkDragContext</a> *context,                                                         <ahref="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf">GdkPixbuf</a> *pixbuf,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> hot_x,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> hot_y);</pre><p>Sets <em class="parameter"><code>pixbuf</code></em> as the icon for a given drag.</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>&#160;:</span></p></td><td> the context for a drag. (This must be called            with a  context for the source side of a drag)</td></tr><tr><td><p><span class="term"><em class="parameter"><code>pixbuf</code></em>&#160;:</span></p></td><td> the <ahref="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> to use as the drag icon.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>hot_x</code></em>&#160;:</span></p></td><td> the X offset within <em class="parameter"><code>widget</code></em> of the hotspot.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>hot_y</code></em>&#160;:</span></p></td><td> the Y offset within <em class="parameter"><code>widget</code></em> of the hotspot.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3188391"></a><h3><a name="gtk-drag-set-icon-stock"></a>gtk_drag_set_icon_stock ()</h3><a class="indexterm" name="id3188405"></a><pre class="programlisting">void                gtk_drag_set_icon_stock             (<ahref="/usr/share/gtk-doc/html/gdk/gdk-Drag-and-Drop.html#GdkDragContext">GdkDragContext</a> *context,                                                         const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *stock_id,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> hot_x,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> hot_y);</pre><p>Sets the icon for a given drag from a stock ID.</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>&#160;:</span></p></td><td> the context for a drag. (This must be called            with a  context for the source side of a drag)</td></tr><tr><td><p><span class="term"><em class="parameter"><code>stock_id</code></em>&#160;:</span></p></td><td> the ID of the stock icon to use for the drag.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>hot_x</code></em>&#160;:</span></p></td><td> the X offset within the icon of the hotspot.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>hot_y</code></em>&#160;:</span></p></td><td> the Y offset within the icon of the hotspot.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3188524"></a><h3><a name="gtk-drag-set-icon-name"></a>gtk_drag_set_icon_name ()</h3><a class="indexterm" name="id3188540"></a><pre class="programlisting">void                gtk_drag_set_icon_name              (<ahref="/usr/share/gtk-doc/html/gdk/gdk-Drag-and-Drop.html#GdkDragContext">GdkDragContext</a> *context,                                                         const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *icon_name,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> hot_x,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> hot_y);</pre><p>Sets the icon for a given drag from a named themed icon. Seethe docs for <a class="link" href="GtkIconTheme.html" title="GtkIconTheme"><span class="type">GtkIconTheme</span></a> for more details. Note that thesize of the icon depends on the icon theme (the icon isloaded at the symbolic size <span class="type">GTK_ICON_SIZE_DND</span>), thus <em class="parameter"><code>hot_x</code></em> and <em class="parameter"><code>hot_y</code></em> have to be used with care.</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>&#160;:</span></p></td><td> the context for a drag. (This must be called            with a context for the source side of a drag)</td></tr><tr><td><p><span class="term"><em class="parameter"><code>icon_name</code></em>&#160;:</span></p></td><td> name of icon to use</td></tr><tr><td><p><span class="term"><

⌨️ 快捷键说明

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