/usr/share/gtk-doc/html/pygtk/class-gtkicontheme.html is in python-gtk2-doc 2.24.0-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.IconTheme</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="prev" href="class-gtkiconsource.html" title="gtk.IconSource"><link rel="next" href="class-gtkiconview.html" title="gtk.IconView"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.IconTheme</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkiconsource.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkiconview.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.IconTheme"><a name="class-gtkicontheme"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.IconTheme</h2><p>gtk.IconTheme — look up icons by name and size (new in PyGTK 2.4)</p></div><div class="refsect1" title="Synopsis"><a name="id3737754"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.IconTheme</span></span>(<span class="ooclass"><span class="classname"><PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gtkicontheme.html#constructor-gtkicontheme" title="Constructor">gtk.IconTheme</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkicontheme.html#method-gtkicontheme--set-screen" title="gtk.IconTheme.set_screen">set_screen</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>screen</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkicontheme.html#method-gtkicontheme--set-search-path" title="gtk.IconTheme.set_search_path">set_search_path</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkicontheme.html#method-gtkicontheme--get-search-path" title="gtk.IconTheme.get_search_path">get_search_path</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkicontheme.html#method-gtkicontheme--append-search-path" title="gtk.IconTheme.append_search_path">append_search_path</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkicontheme.html#method-gtkicontheme--prepend-search-path" title="gtk.IconTheme.prepend_search_path">prepend_search_path</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkicontheme.html#method-gtkicontheme--set-custom-theme" title="gtk.IconTheme.set_custom_theme">set_custom_theme</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>theme_name</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkicontheme.html#method-gtkicontheme--has-icon" title="gtk.IconTheme.has_icon">has_icon</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_name</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkicontheme.html#method-gtkicontheme--lookup-icon" title="gtk.IconTheme.lookup_icon">lookup_icon</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkicontheme.html#method-gtkicontheme--load-icon" title="gtk.IconTheme.load_icon">load_icon</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkicontheme.html#method-gtkicontheme--choose-icon" title="gtk.IconTheme.choose_icon">choose_icon</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_names</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkicontheme.html#method-gtkicontheme--list-contexts" title="gtk.IconTheme.list_contexts">list_contexts</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkicontheme.html#method-gtkicontheme--list-icons" title="gtk.IconTheme.list_icons">list_icons</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>context</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkicontheme.html#method-gtkicontheme--get-example-icon-name" title="gtk.IconTheme.get_example_icon_name">get_example_icon_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkicontheme.html#method-gtkicontheme--rescan-if-needed" title="gtk.IconTheme.rescan_if_needed">rescan_if_needed</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkicontheme.html#method-gtkicontheme--get-icon-sizes" title="gtk.IconTheme.get_icon_sizes">get_icon_sizes</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_name</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkicontheme.html#method-gtkicontheme--lookup-by-gicon" title="gtk.IconTheme.lookup_by_gicon">lookup_by_gicon</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>)</code><br></pre></td></tr></table><pre class="programlisting">
<span class="bold"><strong>Functions</strong></span>
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkicontheme.html#function-gtk--icon-theme-get-default" title="gtk.icon_theme_get_default">gtk.icon_theme_get_default</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkicontheme.html#function-gtk--icon-theme-get-for-screen" title="gtk.icon_theme_get_for_screen">gtk.icon_theme_get_for_screen</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>screen</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkicontheme.html#function-gtk--icon-theme-add-builtin-icon" title="gtk.icon_theme_add_builtin_icon">gtk.icon_theme_add_builtin_icon</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbuf</code></strong></span></span>)</code>
</pre></div><div class="refsect1" title="Ancestry"><a name="id3738428"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
+-- <a class="link" href="class-gtkicontheme.html" title="gtk.IconTheme">gtk.IconTheme</a>
</pre></div><div class="refsect1" title="gtk.IconTheme Signal Prototypes"><a name="signal-prototypes-gtkicontheme"></a><h2>gtk.IconTheme Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gtkicontheme.html#signal-gtkicontheme--changed" title='The "changed" gtk.IconTheme Signal'>changed</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>icontheme</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id3738539"></a><h2>Description</h2><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This object is available in PyGTK 2.4 and above.</p></div><p><a class="link" href="class-gtkicontheme.html" title="gtk.IconTheme"><code class="classname">gtk.IconTheme</code></a>
provides a facility for looking up icons by name and size. The main reason
for using a name rather than simply providing a filename is to allow
different icons to be used depending on what icon theme is selected by the
user. The operation of icon themes on Linux and Unix follows the <a class="ulink" href="http://www.freedesktop.org/Standards/icon-theme-spec" target="_top">Icon Theme
Specification</a>). There is a default icon theme, named "hicolor" where
applications should install their icons, but more additional application
themes can be installed as operating system vendors and users choose.</p><p>Named icons are similar to the Themeable Stock Images facility
(see <a class="link" href="class-gtkiconfactory.html" title="gtk.IconFactory"><code class="classname">gtk.IconFactory</code></a>,
<a class="link" href="class-gtkiconset.html" title="gtk.IconSet"><code class="classname">gtk.IconSet</code></a>
and <a class="link" href="class-gtkiconsource.html" title="gtk.IconSource"><code class="classname">gtk.IconSource</code></a>
for more detail), and the distinction between the two may be a bit
confusing. A few things to keep in mind:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Stock images usually are used in conjunction with <a class="link" href="gtk-stock-items.html" title="Stock Items">Stock Items</a>, such as
<code class="literal">gtk.STOCK_OK</code> or <code class="literal">gtk.STOCK_OPEN</code>. Named
icons are easier to set up and therefore are more useful for new icons that
an application wants to add, such as application icons or window
icons.</p></li><li class="listitem"><p>Stock images can only be loaded at the symbolic sizes defined
by the standard icon sizes (see the <a class="link" href="class-gtkiconsource.html#function-gtk--icon-size-lookup" title="gtk.icon_size_lookup"><code class="function">gtk.icon_size_lookup</code>()</a>
function), or by custom sizes defined by the <a class="link" href="class-gtkiconsource.html#function-gtk--icon-size-register" title="gtk.icon_size_register"><code class="function">gtk.icon_size_register</code>()</a>
function, while named icons are more flexible and any pixel size can be
specified.</p></li><li class="listitem"><p>Because stock images are closely tied to stock items, and thus
to actions in the user interface, stock images may come in multiple variants
for different widget states or writing directions.</p></li></ul></div><p>A good rule of thumb is that if there is a stock image for what
you want to use, use it, otherwise use a named icon. It turns out that
internally stock images are generally defined in terms of one or more named
icons. (An example is icons that depend on writing direction;
<code class="literal">gtk.STOCK_GO_FORWARD</code> uses the two themed icons
"gtk-stock-go-forward-ltr" and "gtk-stock-go-forward-rtl".)</p><p>In many cases, named themes are used indirectly, via <a class="link" href="class-gtkimage.html" title="gtk.Image"><code class="classname">gtk.Image</code></a> or stock
items, rather than directly, but looking up icons directly is also
simple. The <a class="link" href="class-gtkicontheme.html" title="gtk.IconTheme"><code class="classname">gtk.IconTheme</code></a>
object acts as a database of all the icons in the current theme. You can
create new <a class="link" href="class-gtkicontheme.html" title="gtk.IconTheme"><code class="classname">gtk.IconTheme</code></a>
objects, but its much more efficient to use the standard icon theme for the
<a class="link" href="class-gdkscreen.html" title="gtk.gdk.Screen"><code class="classname">gtk.gdk.Screen</code></a>
so that the icon information is shared with other people looking up
icons. In the case where the default screen is being used, looking up an
icon can be as simple as:</p><pre class="programlisting">
icon_theme = gtk.icon_theme_get_default()
try:
pixbuf = icon_theme.load_icon("my-icon-name", 48, 0)
except gobject.GError, exc:
print "can't load icon", exc
</pre><p></p></div><div class="refsect1" title="Constructor"><a name="constructor-gtkicontheme"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.IconTheme</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the newly created <a class="link" href="class-gtkicontheme.html" title="gtk.IconTheme"><code class="classname">gtk.IconTheme</code></a>
object.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This constructor is available in PyGTK 2.4 and above.</p></div><p>Creates a new icon theme object. Icon theme objects are used to
lookup up an icon by name in a particular icon theme. Usually, you'll want
to use the <a class="link" href="class-gtkicontheme.html#function-gtk--icon-theme-get-default" title="gtk.icon_theme_get_default"><code class="function">gtk.icon_theme_get_default</code>()</a>
or <a class="link" href="class-gtkicontheme.html#function-gtk--icon-theme-get-for-screen" title="gtk.icon_theme_get_for_screen"><code class="function">gtk.icon_theme_get_for_screen</code>()</a>
functions rather than creating a new icon theme object from scratch.</p></div><div class="refsect1" title="Methods"><a name="id3738848"></a><h2>Methods</h2><div class="refsect2" title="gtk.IconTheme.set_screen"><a name="method-gtkicontheme--set-screen"></a><h3>gtk.IconTheme.set_screen</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_screen</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>screen</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>screen</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkscreen.html" title="gtk.gdk.Screen"><code class="classname">gtk.gdk.Screen</code></a></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_screen</code>() method sets the <a class="link" href="class-gdkscreen.html" title="gtk.gdk.Screen"><code class="classname">gtk.gdk.Screen</code></a> for
an icon theme to <em class="parameter"><code>screen</code></em>. The screen is used to track
the user's currently configured icon theme, which might be different for
different screens.</p></div><div class="refsect2" title="gtk.IconTheme.set_search_path"><a name="method-gtkicontheme--set-search-path"></a><h3>gtk.IconTheme.set_search_path</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_search_path</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>path</code></strong> :</span></p></td><td>a list or tuple of directories that are
searched for icon themes</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_search_path</code>() method sets the
search path for the icon theme object to the list of directory names
contained in <em class="parameter"><code>path</code></em>. When looking for an icon theme,
<code class="literal">GTK+</code> will search for a subdirectory of one or more of the
directories in <em class="parameter"><code>path</code></em> with the same name as the icon
theme. (Themes from multiple of the path elements are combined to allow
themes to be extended by adding icons in the user's home directory.)</p><p>In addition if an icon found isn't found either in the current
icon theme or the default icon theme, and an image file with the right name
is found directly in one of the elements of <em class="parameter"><code>path</code></em>,
then that image will be used for the icon name. (This is a legacy feature,
and new icons should be put into the default icon theme, which is called
"hicolor", rather than directly on the icon path.)</p></div><div class="refsect2" title="gtk.IconTheme.get_search_path"><a name="method-gtkicontheme--get-search-path"></a><h3>gtk.IconTheme.get_search_path</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_search_path</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tuple containing the list of directory names
that are searched for icon themes</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_search_path</code>() method returns a
tuple containing the current search path. See the <a class="link" href="class-gtkicontheme.html#method-gtkicontheme--set-search-path" title="gtk.IconTheme.set_search_path"><code class="methodname">set_search_path()</code></a>
method for more details.</p></div><div class="refsect2" title="gtk.IconTheme.append_search_path"><a name="method-gtkicontheme--append-search-path"></a><h3>gtk.IconTheme.append_search_path</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">append_search_path</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>path</code></strong> :</span></p></td><td>a directory name to append to the icon
path</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">append_search_path</code>() method appends
the directory name specified by <em class="parameter"><code>path</code></em> to the search
path. See the <a class="link" href="class-gtkicontheme.html#method-gtkicontheme--set-search-path" title="gtk.IconTheme.set_search_path"><code class="methodname">set_search_path()</code></a>
method for more information.</p></div><div class="refsect2" title="gtk.IconTheme.prepend_search_path"><a name="method-gtkicontheme--prepend-search-path"></a><h3>gtk.IconTheme.prepend_search_path</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">prepend_search_path</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>path</code></strong> :</span></p></td><td>a directory name to prepend to the icon
path</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">prepend_search_path</code>() method
prepends the directory name specified by <em class="parameter"><code>path</code></em> to the
search path. See the <a class="link" href="class-gtkicontheme.html#method-gtkicontheme--set-search-path" title="gtk.IconTheme.set_search_path"><code class="methodname">set_search_path()</code></a>
method for more information.</p></div><div class="refsect2" title="gtk.IconTheme.set_custom_theme"><a name="method-gtkicontheme--set-custom-theme"></a><h3>gtk.IconTheme.set_custom_theme</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_custom_theme</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>theme_name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>theme_name</code></strong> :</span></p></td><td>the name of icon theme to use instead of
the configured theme</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_custom_theme</code>() method sets the
theme used by the icon theme object to the theme named by
<em class="parameter"><code>theme_name</code></em> usually replacing system configured
theme. This method cannot be called on the icon theme objects returned from
the <a class="link" href="class-gtkicontheme.html#function-gtk--icon-theme-get-default" title="gtk.icon_theme_get_default"><code class="function">gtk.icon_theme_get_default</code>()</a>
and <a class="link" href="class-gtkicontheme.html#function-gtk--icon-theme-get-default" title="gtk.icon_theme_get_default"><code class="function">gtk.icon_theme_get_default</code>()</a>
functions.</p></div><div class="refsect2" title="gtk.IconTheme.has_icon"><a name="method-gtkicontheme--has-icon"></a><h3>gtk.IconTheme.has_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">has_icon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>icon_name</code></strong> :</span></p></td><td>the name of an icon</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the icon theme
includes an icon for
<em class="parameter"><code>icon_name</code></em>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">has_icon</code>() method checks whether
the icon theme includes an icon for the icon name specified by
<em class="parameter"><code>icon_name</code></em>.</p></div><div class="refsect2" title="gtk.IconTheme.lookup_icon"><a name="method-gtkicontheme--lookup-icon"></a><h3>gtk.IconTheme.lookup_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">lookup_icon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>icon_name</code></strong> :</span></p></td><td>the name of the icon to lookup</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>size</code></strong> :</span></p></td><td>the desired icon size</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>the flags modifying the behavior of the icon
lookup</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gtkiconinfo.html" title="gtk.IconInfo"><code class="classname">gtk.IconInfo</code></a>
object containing information about the icon, or
<code class="literal">None</code> if the icon wasn't found. Free with the
<a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--free" title="gtk.IconInfo.free"><code class="methodname">gtk.IconInfo.free()</code></a>
method</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">lookup_icon</code>() method looks up the
icon specified by <em class="parameter"><code>icon_name</code></em>,
<em class="parameter"><code>size</code></em> and <em class="parameter"><code>flags</code></em> and returns a
<a class="link" href="class-gtkiconinfo.html" title="gtk.IconInfo"><code class="classname">gtk.IconInfo</code></a>
object containing information such as the filename of the icon. The icon can
then be rendered into a pixbuf using the <a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--load-icon" title="gtk.IconInfo.load_icon"><code class="methodname">gtk.IconInfo.load_icon()</code></a>
method. (the <a class="link" href="class-gtkicontheme.html#method-gtkicontheme--load-icon" title="gtk.IconTheme.load_icon"><code class="methodname">load_icon()</code></a>
method combines these two steps if all you need is the pixbuf.)</p><p>The value of flags must be a combination of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gtk.ICON_LOOKUP_NO_SVG</code></span></p></td><td>Never return Scalable Vector Graphics (SVG) icons, even
if gdk-pixbuf supports them. Cannot be used together with
<code class="literal">gtk.ICON_LOOKUP_FORCE_SVG</code>.</td></tr><tr><td><p><span class="term"><code class="literal">gtk.ICON_LOOKUP_FORCE_SVG</code></span></p></td><td> Return SVG icons, even if gdk-pixbuf doesn't support
them. Cannot be used together with
<code class="literal">gtk.ICON_LOOKUP_NO_SVG</code>.</td></tr><tr><td><p><span class="term"><code class="literal">gtk.ICON_LOOKUP_USE_BUILTIN</code></span></p></td><td>When passed to the <a class="link" href="class-gtkicontheme.html#method-gtkicontheme--lookup-icon" title="gtk.IconTheme.lookup_icon"><code class="methodname">lookup_icon</code>()</a>
method includes builtin icons as well as files. For a builtin
icon, the <a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--get-filename" title="gtk.IconInfo.get_filename"><code class="methodname">gtk.IconInfo.get_filename</code>()</a>
method returns <code class="literal">None</code> and you need to call the
<a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--get-builtin-pixbuf" title="gtk.IconInfo.get_builtin_pixbuf"><code class="methodname">get_builtin_pixbuf</code>()</a>
method.</td></tr></tbody></table><p></p></div><div class="refsect2" title="gtk.IconTheme.load_icon"><a name="method-gtkicontheme--load-icon"></a><h3>gtk.IconTheme.load_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">load_icon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>icon_name</code></strong> :</span></p></td><td>the name of the icon to lookup</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>size</code></strong> :</span></p></td><td>the desired icon size. The resulting icon may
not be exactly this size; see the <a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--load-icon" title="gtk.IconInfo.load_icon"><code class="methodname">gtk.IconInfo.load_icon()</code></a>
method.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>the flags modifying the behavior of the icon
lookup</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a>
containing 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.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">load_icon</code>() method looks up the
icon specified by <em class="parameter"><code>icon_name</code></em> in an icon theme, scales
it to the size specified by <em class="parameter"><code>size</code></em> and renders it into
a <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a>. flags
is a combination of: <code class="literal">gtk.ICON_LOOKUP_FORCE_SVG</code>,
<code class="literal">gtk.ICON_LOOKUP_NO_SVG</code> and
<code class="literal">gtk.ICON_LOOKUP_USE_BUILTIN</code> (see the <a class="link" href="class-gtkicontheme.html#method-gtkicontheme--lookup-icon" title="gtk.IconTheme.lookup_icon"><code class="methodname">lookup_icon</code>()</a>
method for more details). Since this is a convenience function, if more
details about the icon are needed, use the <a class="link" href="class-gtkicontheme.html#method-gtkicontheme--lookup-icon" title="gtk.IconTheme.lookup_icon"><code class="methodname">lookup_icon()</code></a>
method followed by the <a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--load-icon" title="gtk.IconInfo.load_icon"><code class="methodname">GtkIconInfo.load_icon()</code></a>
method.</p><p>This method raise the GError exception if an error occurs during
rendering of the icon.</p></div><div class="refsect2" title="gtk.IconTheme.choose_icon"><a name="method-gtkicontheme--choose-icon"></a><h3>gtk.IconTheme.choose_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">choose_icon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_names</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>icon_names</code></strong> :</span></p></td><td>A list or tuple of icon names to lookup.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>size</code></strong> :</span></p></td><td>The desired icon size.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>the flags modifying the behavior of the icon
lookup</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A <a class="link" href="class-gtkiconinfo.html" title="gtk.IconInfo"><code class="classname">gtk.IconInfo</code></a>.
structure containing information about the icon, or <code class="literal">None</code>
if the icon wasn't found.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.12 and above.</p></div><p>
The <code class="methodname">choose_icon</code>() method looks up a named icon and
returns a structure containing information such as the filename of the icon.
The icon can then be rendered into a pixbuf using
<code class="methodname"><a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--load-icon" title="gtk.IconInfo.load_icon">gtk.IconInfo.load_icon</a></code>.
<code class="methodname"><a class="link" href="class-gtkicontheme.html#method-gtkicontheme--load-icon" title="gtk.IconTheme.load_icon">load_icon</a></code>
combines these two steps if all you need is the pixbuf.)
</p></div><div class="refsect2" title="gtk.IconTheme.list_contexts"><a name="method-gtkicontheme--list-contexts"></a><h3>gtk.IconTheme.list_contexts</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">list_contexts</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list holding the names of all the
contexts in the theme. </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.12 and above.</p></div><p>The <code class="methodname">list_contexts</code>() method gets the list of contexts
available within the current hierarchy of icon themes</p></div><div class="refsect2" title="gtk.IconTheme.list_icons"><a name="method-gtkicontheme--list-icons"></a><h3>gtk.IconTheme.list_icons</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">list_icons</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>context</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>context</code></strong> :</span></p></td><td>a string identifying a particular type of icon,
or <code class="literal">None</code> to list all icons.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tuple containing the names of all the
icons in the theme.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">list_icons</code>() method lists the icons
in the current icon theme. Only a subset of the icons can be listed by
providing a string specified by <em class="parameter"><code>context</code></em>. The set of
values for the context string is system dependent, but will typically
include such values as 'apps' and 'mimetypes'.</p></div><div class="refsect2" title="gtk.IconTheme.get_example_icon_name"><a name="method-gtkicontheme--get-example-icon-name"></a><h3>gtk.IconTheme.get_example_icon_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_example_icon_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the name of an example icon or
<code class="literal">None</code>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_example_icon_name</code>() method
returns the name of an icon that is representative of the current theme (for
instance, to use when presenting a list of themes to the user.)</p></div><div class="refsect2" title="gtk.IconTheme.rescan_if_needed"><a name="method-gtkicontheme--rescan-if-needed"></a><h3>gtk.IconTheme.rescan_if_needed</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">rescan_if_needed</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the icon theme has
changed and needed to be reloaded.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">rescan_if_needed</code>() method checks to
see if the icon theme has changed; if it has, any currently cached
information is discarded and will be reloaded next time the icon theme is
accessed.</p></div><div class="refsect2" title="gtk.IconTheme.get_icon_sizes"><a name="method-gtkicontheme--get-icon-sizes"></a><h3>gtk.IconTheme.get_icon_sizes</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_icon_sizes</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>icon_name</code></strong> :</span></p></td><td>the name of an icon</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tuple containing the sizes that the icon is
available in.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="methodname">get_icon_sizes</code>() method returns a
tuple containing the sizes available for the icon named by
<em class="parameter"><code>icon_name</code></em>. A size of -1 means the icon is
scalable. If the icon is not found an empty tuple is returned.</p></div><div class="refsect2" title="gtk.IconTheme.lookup_by_gicon"><a name="method-gtkicontheme--lookup-by-gicon"></a><h3>gtk.IconTheme.lookup_by_gicon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">lookup_by_gicon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>icon</code></strong> :</span></p></td><td>the <PYGTKDOCLINK HREF="class-gioicon"><code class="classname">gio.Icon</code></PYGTKDOCLINK>
to lookup</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>size</code></strong> :</span></p></td><td>The desired icon size.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>the flags modifying the behavior of the icon
lookup</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A <a class="link" href="class-gtkiconinfo.html" title="gtk.IconInfo"><code class="classname">gtk.IconInfo</code></a>.
structure containing information about the icon, or <code class="literal">None</code>
if the icon wasn't found.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.14 and above.</p></div><p>
The <code class="methodname">lookup_by_gicon</code>() method Looks up an icon
and returns a structure containing information such as the filename of
the icon. The icon can then be rendered into a pixbuf using
<code class="methodname"><a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--load-icon" title="gtk.IconInfo.load_icon">gtk.IconInfo.load_icon</a></code>().
</p></div></div><div class="refsect1" title="Functions"><a name="id3740968"></a><h2>Functions</h2><div class="refsect2" title="gtk.icon_theme_get_default"><a name="function-gtk--icon-theme-get-default"></a><h3>gtk.icon_theme_get_default</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.icon_theme_get_default</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A unique <a class="link" href="class-gtkicontheme.html" title="gtk.IconTheme"><code class="classname">gtk.IconTheme</code></a>
associated with the default <a class="link" href="class-gdkscreen.html" title="gtk.gdk.Screen"><code class="classname">gtk.gdk.Screen</code></a>. This
icon theme is associated with the screen and can be used as long
as the screen is open.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.4 and above.</p></div><p>The <code class="function">gtk.icon_them_get_default</code>() function
returns the icon theme for the default screen. See the <a class="link" href="class-gtkicontheme.html#function-gtk--icon-theme-get-for-screen" title="gtk.icon_theme_get_for_screen"><code class="function">gtk.icon_theme_get_for_screen</code>()</a>
function.</p></div><div class="refsect2" title="gtk.icon_theme_get_for_screen"><a name="function-gtk--icon-theme-get-for-screen"></a><h3>gtk.icon_theme_get_for_screen</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.icon_theme_get_for_screen</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>screen</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>screen</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkscreen.html" title="gtk.gdk.Screen"><code class="classname">gtk.gdk.Screen</code></a>
object</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A unique <a class="link" href="class-gtkicontheme.html" title="gtk.IconTheme"><code class="classname">gtk.IconTheme</code></a>
associated with the default <a class="link" href="class-gdkscreen.html" title="gtk.gdk.Screen"><code class="classname">gtk.gdk.Screen</code></a>. This
icon theme is associated with the screen and can be used as long
as the screen is open.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.4 and above.</p></div><p>The <code class="function">gtk.icon_theme_get_for_screen</code>()
function returns the icon theme object associated with the <a class="link" href="class-gdkscreen.html" title="gtk.gdk.Screen"><code class="classname">gtk.gdk.Screen</code></a>
specified by <em class="parameter"><code>screen</code></em>. If this function has not
previously been called for the given screen, a new icon theme object will be
created and associated with the screen. Icon theme objects are fairly
expensive to create, so using this function is usually a better choice than
calling the <a class="link" href="class-gtkicontheme.html#constructor-gtkicontheme" title="Constructor">gtk.IconTheme</a>()
constructor and setting the screen yourself; by using this function a single
icon theme object will be shared between users.</p></div><div class="refsect2" title="gtk.icon_theme_add_builtin_icon"><a name="function-gtk--icon-theme-add-builtin-icon"></a><h3>gtk.icon_theme_add_builtin_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.icon_theme_add_builtin_icon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbuf</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>icon_name</code></strong> :</span></p></td><td> the name of the icon to
register</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>size</code></strong> :</span></p></td><td> the size at which to register the icon
(different images can be registered for the same icon name at
different sizes.)</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>pixbuf</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a>
that contains the image to use for
<em class="parameter"><code>icon_name</code></em>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.4 and above.</p></div><p>The <code class="function">gtk.icon_theme_add_builtin_icon</code>()
function registers a built-in icon for icon theme lookups using
<em class="parameter"><code>icon_name</code></em> as the icon name,
<em class="parameter"><code>size</code></em> as the icon size and
<em class="parameter"><code>pixbuf</code></em> as the icon image. The idea of built-in icons
is to allow an application or library that uses themed icons to function
without requiring specific icon files to be present in the file system. For
instance, the default images for all of <code class="literal">GTK+</code>'s stock
icons are registered as built-icons.</p><p>In general, if you use
<code class="function">gtk.icon_theme_add_builtin_icon</code>() you should also
install the icon in the icon theme, so that the icon is generally
available. This function will generally be used with pixbufs loaded via the
<a class="link" href="class-gdkpixbuf.html#function-gdk--pixbuf-new-from-inline" title="gtk.gdk.pixbuf_new_from_inline"><code class="function">gtk.gdk.pixbuf_new_from_inline</code>()</a>
function.</p></div></div><div class="refsect1" title="Signals"><a name="id3741444"></a><h2>Signals</h2><div class="refsect2" title='The "changed" gtk.IconTheme Signal'><a name="signal-gtkicontheme--changed"></a><h3>The "changed" gtk.IconTheme Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>icontheme</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>icontheme</code></em> :</span></p></td><td>the icontheme that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
any)</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This signal is available in PyGTK 2.4 and above.</p></div><p>The "changed" signal is emitted when the current icon theme is
switched or <code class="literal">GTK+</code> detects that a change has occurred in
the contents of the current icon theme.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtkiconsource.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gtk-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gtkiconview.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.IconSource </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.IconView</td></tr></table></div></body></html>
|