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

📄 gtkicontheme.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>icon_theme</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkIconTheme.html" title="GtkIconTheme"><span class="type">GtkIconTheme</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>icon_name</code></em>&#160;:</span></p></td><td> the name of an icon</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 <em class="parameter"><code>icon_theme</code></em> includes an icon for <em class="parameter"><code>icon_name</code></em>.</td></tr></tbody></table></div><p class="since">Since  2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3199650"></a><h3><a name="gtk-icon-theme-lookup-icon"></a>gtk_icon_theme_lookup_icon ()</h3><a class="indexterm" name="id3199666"></a><pre class="programlisting"><a class="link" href="GtkIconTheme.html#GtkIconInfo">GtkIconInfo</a>*        gtk_icon_theme_lookup_icon          (<a class="link" href="GtkIconTheme.html" title="GtkIconTheme">GtkIconTheme</a> *icon_theme,                                                         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> size,                                                         <a class="link" href="GtkIconTheme.html#GtkIconLookupFlags">GtkIconLookupFlags</a> flags);</pre><p>Looks up a named icon and returns a structure containinginformation such as the filename of the icon. The iconcan then be rendered into a pixbuf using<a class="link" href="GtkIconTheme.html#gtk-icon-info-load-icon"><code class="function">gtk_icon_info_load_icon()</code></a>. (<a class="link" href="GtkIconTheme.html#gtk-icon-theme-load-icon"><code class="function">gtk_icon_theme_load_icon()</code></a>combines these two steps if all you need is the pixbuf.)</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>icon_theme</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkIconTheme.html" title="GtkIconTheme"><span class="type">GtkIconTheme</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>icon_name</code></em>&#160;:</span></p></td><td> the name of the icon to lookup</td></tr><tr><td><p><span class="term"><em class="parameter"><code>size</code></em>&#160;:</span></p></td><td> desired icon size</td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em>&#160;:</span></p></td><td> flags modifying the behavior of the icon lookup</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> a <a class="link" href="GtkIconTheme.html#GtkIconInfo"><span class="type">GtkIconInfo</span></a> structure containing informationabout the icon, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if the icon wasn't found. Free with<a class="link" href="GtkIconTheme.html#gtk-icon-info-free"><code class="function">gtk_icon_info_free()</code></a></td></tr></tbody></table></div><p class="since">Since  2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3199863"></a><h3><a name="gtk-icon-theme-choose-icon"></a>gtk_icon_theme_choose_icon ()</h3><a class="indexterm" name="id3199879"></a><pre class="programlisting"><a class="link" href="GtkIconTheme.html#GtkIconInfo">GtkIconInfo</a>*        gtk_icon_theme_choose_icon          (<a class="link" href="GtkIconTheme.html" title="GtkIconTheme">GtkIconTheme</a> *icon_theme,                                                         const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *icon_names[],                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> size,                                                         <a class="link" href="GtkIconTheme.html#GtkIconLookupFlags">GtkIconLookupFlags</a> flags);</pre><p>Looks up a named icon and returns a structure containinginformation such as the filename of the icon. The iconcan then be rendered into a pixbuf using<a class="link" href="GtkIconTheme.html#gtk-icon-info-load-icon"><code class="function">gtk_icon_info_load_icon()</code></a>. (<a class="link" href="GtkIconTheme.html#gtk-icon-theme-load-icon"><code class="function">gtk_icon_theme_load_icon()</code></a>combines these two steps if all you need is the pixbuf.)</p><p>If <em class="parameter"><code>icon_names</code></em> contains more than one name, this function tries them all in the given order before falling back to inherited icon themes.</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>icon_theme</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkIconTheme.html" title="GtkIconTheme"><span class="type">GtkIconTheme</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>icon_names</code></em>&#160;:</span></p></td><td> <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of icon names to lookup</td></tr><tr><td><p><span class="term"><em class="parameter"><code>size</code></em>&#160;:</span></p></td><td> desired icon size</td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em>&#160;:</span></p></td><td> flags modifying the behavior of the icon lookup</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> a <a class="link" href="GtkIconTheme.html#GtkIconInfo"><span class="type">GtkIconInfo</span></a> structure containing informationabout the icon, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if the icon wasn't found. Free with<a class="link" href="GtkIconTheme.html#gtk-icon-info-free"><code class="function">gtk_icon_info_free()</code></a></td></tr></tbody></table></div><p class="since">Since  2.12</p></div><hr><div class="refsect2" lang="en"><a name="id3200097"></a><h3><a name="gtk-icon-theme-load-icon"></a>gtk_icon_theme_load_icon ()</h3><a class="indexterm" name="id3200112"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf">GdkPixbuf</a>*          gtk_icon_theme_load_icon            (<a class="link" href="GtkIconTheme.html" title="GtkIconTheme">GtkIconTheme</a> *icon_theme,                                                         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> size,                                                         <a class="link" href="GtkIconTheme.html#GtkIconLookupFlags">GtkIconLookupFlags</a> flags,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError">GError</a> **error);</pre><p>Looks up an icon in an icon theme, scales it to the given sizeand renders it into a pixbuf. This is a convenience function;if more details about the icon are needed, use<a class="link" href="GtkIconTheme.html#gtk-icon-theme-lookup-icon"><code class="function">gtk_icon_theme_lookup_icon()</code></a> followed by <a class="link" href="GtkIconTheme.html#gtk-icon-info-load-icon"><code class="function">gtk_icon_info_load_icon()</code></a>.</p><p>Note that you probably want to listen for icon theme changes andupdate the icon. This is usually done by connecting to the GtkWidget::style-set signal. If for some reason you do not want toupdate the icon when the icon theme changes, you should considerusing <ahref="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-creating.html#gdk-pixbuf-copy"><code class="function">gdk_pixbuf_copy()</code></a> to make a private copy of the pixbufreturned by this function. Otherwise GTK+ may need to keep the old icon theme loaded, which would be a waste of memory.</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>icon_theme</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkIconTheme.html" title="GtkIconTheme"><span class="type">GtkIconTheme</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>icon_name</code></em>&#160;:</span></p></td><td> the name of the icon to lookup</td></tr><tr><td><p><span class="term"><em class="parameter"><code>size</code></em>&#160;:</span></p></td><td> the desired icon size. The resulting icon may not be       exactly this size; see <a class="link" href="GtkIconTheme.html#gtk-icon-info-load-icon"><code class="function">gtk_icon_info_load_icon()</code></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em>&#160;:</span></p></td><td> flags modifying the behavior of the icon lookup</td></tr><tr><td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td><td> Location to store error information on failure, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> the rendered icon; this may be a newly created icon or a new reference to an internal icon, so you must not modify the icon. Use <ahref="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> to release your reference to the icon. <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if the icon isn't found.</td></tr></tbody></table></div><p class="since">Since  2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3200370"></a><h3><a name="gtk-icon-theme-list-contexts"></a>gtk_icon_theme_list_contexts ()</h3><a class="indexterm" name="id3200386"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList">GList</a>*              gtk_icon_theme_list_contexts        (<a class="link" href="GtkIconTheme.html" title="GtkIconTheme">GtkIconTheme</a> *icon_theme);</pre><p>Gets the list of contexts available within the currenthierarchy of icon themes</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>icon_theme</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkIconTheme.html" title="GtkIconTheme"><span class="type">GtkIconTheme</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> a <ahref="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> list holding the names of all the contexts in the theme. You must first free each element in the list with <ahref="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>, then free the list itself

⌨️ 快捷键说明

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