1
<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.73.2"><link rel="start" 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" lang="en"><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" lang="en"><a name="id3506650"></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>):
1
<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.73.2"><link rel="start" 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" lang="en"><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" lang="en"><a name="id3707457"></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>):
2
2
<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">
3
3
<span class="bold"><strong>Functions</strong></span>
5
5
<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>
7
7
+-- <a class="link" href="class-gtkicontheme.html" title="gtk.IconTheme">gtk.IconTheme</a>
8
</pre></div><div class="refsect1" lang="en"><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" lang="en"><a name="id3507436"></a><h2>Description</h2><div class="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>
8
</pre></div><div class="refsect1" lang="en"><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" lang="en"><a name="id3708242"></a><h2>Description</h2><div class="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>
9
9
provides a facility for looking up icons by name and size. The main reason
10
10
for using a name rather than simply providing a filename is to allow
11
11
different icons to be used depending on what icon theme is selected by the