/usr/share/gtk-doc/html/pygtk/class-gtkiconsource.html is in python-gtk2-doc 2.24.0-5.1ubuntu2.
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 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.IconSource</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-gtkiconset.html" title="gtk.IconSet"><link rel="next" href="class-gtkicontheme.html" title="gtk.IconTheme"></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.IconSource</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkiconset.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkicontheme.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.IconSource"><a name="class-gtkiconsource"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.IconSource</h2><p>gtk.IconSource — a source for icon variants</p></div><div class="refsect1" title="Synopsis"><a name="id3734092"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.IconSource</span></span>(<span class="ooclass"><span class="classname">gobject.GBoxed</span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gtkiconsource.html#constructor-gtkiconsource" title="Constructor">gtk.IconSource</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#method-gtkiconsource--copy" title="gtk.IconSource.copy">copy</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#method-gtkiconsource--free" title="gtk.IconSource.free">free</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#method-gtkiconsource--set-filename" title="gtk.IconSource.set_filename">set_filename</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filename</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#method-gtkiconsource--set-pixbuf" title="gtk.IconSource.set_pixbuf">set_pixbuf</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbuf</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#method-gtkiconsource--get-filename" title="gtk.IconSource.get_filename">get_filename</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#method-gtkiconsource--get-pixbuf" title="gtk.IconSource.get_pixbuf">get_pixbuf</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#method-gtkiconsource--set-direction-wildcarded" title="gtk.IconSource.set_direction_wildcarded">set_direction_wildcarded</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>setting</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#method-gtkiconsource--set-state-wildcarded" title="gtk.IconSource.set_state_wildcarded">set_state_wildcarded</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>setting</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#method-gtkiconsource--set-size-wildcarded" title="gtk.IconSource.set_size_wildcarded">set_size_wildcarded</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>setting</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#method-gtkiconsource--get-size-wildcarded" title="gtk.IconSource.get_size_wildcarded">get_size_wildcarded</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#method-gtkiconsource--get-state-wildcarded" title="gtk.IconSource.get_state_wildcarded">get_state_wildcarded</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#method-gtkiconsource--get-direction-wildcarded" title="gtk.IconSource.get_direction_wildcarded">get_direction_wildcarded</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#method-gtkiconsource--set-direction" title="gtk.IconSource.set_direction">set_direction</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>direction</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#method-gtkiconsource--set-state" title="gtk.IconSource.set_state">set_state</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>state</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#method-gtkiconsource--set-size" title="gtk.IconSource.set_size">set_size</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#method-gtkiconsource--get-direction" title="gtk.IconSource.get_direction">get_direction</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#method-gtkiconsource--get-state" title="gtk.IconSource.get_state">get_state</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#method-gtkiconsource--get-size" title="gtk.IconSource.get_size">get_size</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#method-gtkiconsource--set-state" title="gtk.IconSource.set_state">set_icon_name</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-gtkiconsource.html#method-gtkiconsource--get-size" title="gtk.IconSource.get_size">get_icon_name</a></span>(<span class="methodparam"></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-gtkiconsource.html#function-gtk--icon-size-lookup" title="gtk.icon_size_lookup">gtk.icon_size_lookup</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_size</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#function-gtk--icon-size-lookup-for-settings" title="gtk.icon_size_lookup_for_settings">gtk.icon_size_lookup_for_settings</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>settings</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_size</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#function-gtk--icon-size-register" title="gtk.icon_size_register">gtk.icon_size_register</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#function-gtk--icon-size-register-alias" title="gtk.icon_size_register_alias">gtk.icon_size_register_alias</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>alias</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>target</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#function-gtk--icon-size-from-name" title="gtk.icon_size_from_name">gtk.icon_size_from_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconsource.html#function-gtk--icon-size-get-name" title="gtk.icon_size_get_name">gtk.icon_size_get_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Description"><a name="id3734836"></a><h2>Description</h2><p>A <a class="link" href="class-gtkiconsource.html" title="gtk.IconSource"><code class="classname">gtk.IconSource</code></a>
contains a <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a> (or
an image filename) that serves as the base image for one or more of the
icons in a <a class="link" href="class-gtkiconset.html" title="gtk.IconSet"><code class="classname">gtk.IconSet</code></a>, along
with a specification for which icons in the icon set will be based on that
pixbuf or image file. By default, the icon source has all parameters
wildcarded. That is, the icon source can be used as the base icon for any
desired text direction, widget state, or icon size.</p></div><div class="refsect1" title="Constructor"><a name="constructor-gtkiconsource"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.IconSource</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 new <a class="link" href="class-gtkiconsource.html" title="gtk.IconSource"><code class="classname">gtk.IconSource</code></a></td></tr></tbody></table><p>Creates a new <a class="link" href="class-gtkiconsource.html" title="gtk.IconSource"><code class="classname">gtk.IconSource</code></a>.
A <a class="link" href="class-gtkiconsource.html" title="gtk.IconSource"><code class="classname">gtk.IconSource</code></a>
contains a <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a> (or
image filename) that serves as the base image for one or more of the icons
in a <a class="link" href="class-gtkiconset.html" title="gtk.IconSet"><code class="classname">gtk.IconSet</code></a>, along
with a specification for which icons in the icon set will be based on that
pixbuf or image file. By default, the icon source has all parameters
wildcarded. That is, the icon source will be used as the base icon for any
desired text direction, widget state, or icon size.</p></div><div class="refsect1" title="Methods"><a name="id3734971"></a><h2>Methods</h2><div class="refsect2" title="gtk.IconSource.copy"><a name="method-gtkiconsource--copy"></a><h3>gtk.IconSource.copy</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">copy</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 new <a class="link" href="class-gtkiconsource.html" title="gtk.IconSource"><code class="classname">gtk.IconSource</code></a></td></tr></tbody></table><p>The <code class="methodname">copy</code>() method creates a copy of the
icon source.</p></div><div class="refsect2" title="gtk.IconSource.free"><a name="method-gtkiconsource--free"></a><h3>gtk.IconSource.free</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">free</span>(<span class="methodparam"></span>)</code></pre><div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated and should not be used. Use of this
method may cause your application to crash.</p></div><p>The <code class="methodname">free</code>() method frees a
dynamically-allocated icon source, along with its filename, size, and pixbuf
fields if those are not <code class="literal">None</code>.</p></div><div class="refsect2" title="gtk.IconSource.set_filename"><a name="method-gtkiconsource--set-filename"></a><h3>gtk.IconSource.set_filename</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_filename</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filename</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>filename</code></strong> :</span></p></td><td>the image file to use</td></tr></tbody></table><p>The <code class="methodname">set_filename</code>() method sets the name
of the image file (specified by <em class="parameter"><code>filename</code></em>) to use as
the base image when creating icon variants for a <a class="link" href="class-gtkiconset.html" title="gtk.IconSet"><code class="classname">gtk.IconSet</code></a>. The
filename must be absolute.</p></div><div class="refsect2" title="gtk.IconSource.set_pixbuf"><a name="method-gtkiconsource--set-pixbuf"></a><h3>gtk.IconSource.set_pixbuf</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_pixbuf</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>pixbuf</code></strong> :</span></p></td><td>the pixbuf to use as a
source</td></tr></tbody></table><p>The <code class="methodname">set_pixbuf</code>() method sets a pixbuf
(specified by <em class="parameter"><code>pixbuf</code></em>) to use as a base image when
creating icon variants for a <a class="link" href="class-gtkiconset.html" title="gtk.IconSet"><code class="classname">gtk.IconSet</code></a>. If an
icon source has both a filename and a pixbuf set, the pixbuf will take
priority.</p></div><div class="refsect2" title="gtk.IconSource.get_filename"><a name="method-gtkiconsource--get-filename"></a><h3>gtk.IconSource.get_filename</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_filename</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 image filename</td></tr></tbody></table><p>The <code class="methodname">get_filename</code>() method retrieves the
source filename, or <code class="literal">None</code> if none is set.</p></div><div class="refsect2" title="gtk.IconSource.get_pixbuf"><a name="method-gtkiconsource--get-pixbuf"></a><h3>gtk.IconSource.get_pixbuf</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_pixbuf</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 source pixbuf</td></tr></tbody></table><p>The <code class="methodname">get_pixbuf</code>() method retrieves the
source pixbuf, or <code class="literal">None</code> if none is set.</p></div><div class="refsect2" title="gtk.IconSource.set_direction_wildcarded"><a name="method-gtkiconsource--set-direction-wildcarded"></a><h3>gtk.IconSource.set_direction_wildcarded</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_direction_wildcarded</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>setting</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>setting</code></strong> :</span></p></td><td>if <code class="literal">True</code> wildcard the text
direction</td></tr></tbody></table><p>The <code class="methodname">set_direction_wildcarded</code>() method
determines whether the icon source direction is wildcarded according to the
value specified by <em class="parameter"><code>setting</code></em>. If
<em class="parameter"><code>setting</code></em> is <code class="literal">True</code> the text direction
is wildcarded and the icon source can be used as the base image for an icon
in any text direction (<code class="literal">gtk.TEXT_DIR_NONE</code>,
<code class="literal">gtk.TEXT_DIR_LTR</code> or <code class="literal">gtk.TEXT_DIR_RTL</code>).
If the text direction is not wildcarded, then the text direction the icon
source applies to should be set with the <a class="link" href="class-gtkiconsource.html#method-gtkiconsource--set-direction" title="gtk.IconSource.set_direction"><code class="methodname">set_direction</code>()</a>
method and the icon source will only be used with that text direction.
Non-wildcarded icon sources (exact matches) are preferred over wildcarded
icon sources. An exact match will be used when possible.</p></div><div class="refsect2" title="gtk.IconSource.set_state_wildcarded"><a name="method-gtkiconsource--set-state-wildcarded"></a><h3>gtk.IconSource.set_state_wildcarded</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_state_wildcarded</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>setting</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>setting</code></strong> :</span></p></td><td>if <code class="literal">True</code> wildcard the widget
state</td></tr></tbody></table><p>The <code class="methodname">set_state_wildcarded</code>() method
determines whether the icon source state is wildcarded according to the
value of <em class="parameter"><code>setting</code></em>. If <em class="parameter"><code>setting</code></em>
is <code class="literal">True</code> the widget state is wildcarded and the icon
source can be used as the base image for an icon in any widget state
(<code class="literal">gtk.STATE_NORMAL</code>, <code class="literal">gtk.STATE_ACTIVE</code>,
<code class="literal">gtk.STATE_PRELIGHT</code>, <code class="literal">gtk.STATE_SELECTED</code>
or <code class="literal">gtk.STATE_INSENSITIVE</code>). If the widget state is not
wildcarded, then the widget state the icon source applies to should be set
with the <a class="link" href="class-gtkiconsource.html#method-gtkiconsource--set-state" title="gtk.IconSource.set_state"><code class="methodname">set_state</code>()</a>
method and the icon source will only be used with that specific state.
Non-wildcarded icon sources (exact matches) are preferred over wildcarded
icon sources. An exact match will be used when possible.</p><p>A <a class="link" href="class-gtkiconset.html" title="gtk.IconSet"><code class="classname">gtk.IconSet</code></a> will
normally transform wildcarded icon source images to produce an appropriate
icon for a given state, for example lightening an image on prelight, but
will not modify source images that match exactly.</p></div><div class="refsect2" title="gtk.IconSource.set_size_wildcarded"><a name="method-gtkiconsource--set-size-wildcarded"></a><h3>gtk.IconSource.set_size_wildcarded</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_size_wildcarded</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>setting</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>setting</code></strong> :</span></p></td><td>if <code class="literal">True</code> wildcard the widget
state</td></tr></tbody></table><p>The <code class="methodname">set_size_wildcarded</code>() determines
whether the icon source can be used as the basis for an icon of any size
according to the value of <em class="parameter"><code>setting</code></em>. If
<em class="parameter"><code>setting</code></em> is <code class="literal">True</code> the icon size is
wildcarded and the icon source can be used as the base image for an icon of
any size. If the size is not wildcarded, then the size the icon source
applies to should be set with <a class="link" href="class-gtkiconsource.html#method-gtkiconsource--set-size" title="gtk.IconSource.set_size"><code class="function">gtk.IconSource.set_size()</code></a>
and the icon source will only be used with that specific size.
Non-wildcarded icon sources (exact matches) are preferred over wildcarded
icon sources. An exact match will be used when possible.</p><p><a class="link" href="class-gtkiconset.html" title="gtk.IconSet"><code class="classname">gtk.IconSet</code></a> will
normally scale wildcarded source images to produce an appropriate icon at a
given size, but will not change the size of source images that match
exactly.</p></div><div class="refsect2" title="gtk.IconSource.get_size_wildcarded"><a name="method-gtkiconsource--get-size-wildcarded"></a><h3>gtk.IconSource.get_size_wildcarded</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_size_wildcarded</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 this icon source is
a base for any icon size variant</td></tr></tbody></table><p>The <code class="methodname">get_size_wildcarded</code>() method gets
the value set by the <a class="link" href="class-gtkiconsource.html#method-gtkiconsource--set-size-wildcarded" title="gtk.IconSource.set_size_wildcarded"><code class="methodname">set_size_wildcarded</code>()</a>
method.</p></div><div class="refsect2" title="gtk.IconSource.get_state_wildcarded"><a name="method-gtkiconsource--get-state-wildcarded"></a><h3>gtk.IconSource.get_state_wildcarded</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_state_wildcarded</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 this icon source is
a base for any widget state variant</td></tr></tbody></table><p>The <code class="methodname">get_state_wildcarded</code>() method gets
the value set by the <a class="link" href="class-gtkiconsource.html#method-gtkiconsource--set-state-wildcarded" title="gtk.IconSource.set_state_wildcarded"><code class="methodname">set_state_wildcarded</code>()</a>
method.</p></div><div class="refsect2" title="gtk.IconSource.get_direction_wildcarded"><a name="method-gtkiconsource--get-direction-wildcarded"></a><h3>gtk.IconSource.get_direction_wildcarded</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_direction_wildcarded</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 this icon source is
a base for any text direction variant</td></tr></tbody></table><p>The <code class="methodname">get_direction_wildcarded</code>() method
gets the value set by the <a class="link" href="class-gtkiconsource.html#method-gtkiconsource--set-direction-wildcarded" title="gtk.IconSource.set_direction_wildcarded"><code class="methodname">set_direction_wildcarded</code>()</a>
method.</p></div><div class="refsect2" title="gtk.IconSource.set_direction"><a name="method-gtkiconsource--set-direction"></a><h3>gtk.IconSource.set_direction</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_direction</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>direction</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>direction</code></strong> :</span></p></td><td>the text direction this icon source applies
to</td></tr></tbody></table><p>The <code class="methodname">set_direction</code>() method sets the
text direction according to the value of <em class="parameter"><code>direction</code></em>
that the icon source is intended to be used with. The value of direction
must be one of: <code class="literal">gtk.TEXT_DIR_NONE</code>,
<code class="literal">gtk.TEXT_DIR_LTR</code> or
<code class="literal">gtk.TEXT_DIR_RTL</code>.</p><p>Setting the text direction on an icon source makes no difference
if the text direction is wildcarded. Therefore, you should usually call the
<a class="link" href="class-gtkiconsource.html#method-gtkiconsource--set-direction-wildcarded" title="gtk.IconSource.set_direction_wildcarded"><code class="methodname">set_direction_wildcarded</code>()</a>
method with a setting of <code class="literal">False</code> to un-wildcard it in
addition to calling this function.</p></div><div class="refsect2" title="gtk.IconSource.set_state"><a name="method-gtkiconsource--set-state"></a><h3>gtk.IconSource.set_state</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_state</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>state</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>state</code></strong> :</span></p></td><td>the widget state this source applies
to</td></tr></tbody></table><p>The <code class="methodname">set_state</code>() method sets the widget
state specified by <em class="parameter"><code>state</code></em> that the icon source is
intended to be used with. The value of <em class="parameter"><code>state</code></em> must be
one of: <code class="literal">gtk.STATE_NORMAL</code>,
<code class="literal">gtk.STATE_ACTIVE</code>, <code class="literal">gtk.STATE_PRELIGHT</code>,
<code class="literal">gtk.STATE_SELECTED</code> or
<code class="literal">gtk.STATE_INSENSITIVE</code>. Setting the widget state on an
icon source makes no difference if the state is wildcarded. Therefore, you
should usually call the <a class="link" href="class-gtkiconsource.html#method-gtkiconsource--set-state-wildcarded" title="gtk.IconSource.set_state_wildcarded"><code class="methodname">set_state_wildcarded</code>()</a>
method with a setting of <code class="literal">False</code> to un-wildcard it in
addition to calling this function.</p></div><div class="refsect2" title="gtk.IconSource.set_size"><a name="method-gtkiconsource--set-size"></a><h3>gtk.IconSource.set_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_size</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</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>size</code></strong> :</span></p></td><td>the icon size this source applies
to</td></tr></tbody></table><p>The <code class="methodname">set_size</code>() method sets the icon
size specified by <em class="parameter"><code>size</code></em> that the icon source is
intended to be used with. Setting the icon size for an icon source makes no
difference if the size is wildcarded. Therefore, you should usually call the
<a class="link" href="class-gtkiconsource.html#method-gtkiconsource--set-size-wildcarded" title="gtk.IconSource.set_size_wildcarded"><code class="function">gtk.IconSource.set_size_wildcarded()</code></a>
method with a setting of <code class="literal">False</code> to un-wildcard it in
addition to calling this function.</p></div><div class="refsect2" title="gtk.IconSource.get_direction"><a name="method-gtkiconsource--get-direction"></a><h3>gtk.IconSource.get_direction</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_direction</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 text direction the icon source
matches</td></tr></tbody></table><p>The <code class="methodname">get_direction</code>() method obtains the
text direction this icon source applies to. The return value is only useful
and meaningful if the text direction is <span class="emphasis"><em>not</em></span>
wildcarded.</p></div><div class="refsect2" title="gtk.IconSource.get_state"><a name="method-gtkiconsource--get-state"></a><h3>gtk.IconSource.get_state</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_state</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 widget state the icon source
matches</td></tr></tbody></table><p>The <code class="methodname">get_state</code>() method obtains the
widget state this icon source applies to. The return value is only useful
and meaningful if the widget state is <span class="emphasis"><em>not</em></span>
wildcarded.</p></div><div class="refsect2" title="gtk.IconSource.get_size"><a name="method-gtkiconsource--get-size"></a><h3>gtk.IconSource.get_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_size</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 icon size this source
matches.</td></tr></tbody></table><p>The <code class="methodname">get_size</code>() method obtains the icon
size this source applies to. The return value is only useful and meaningful
if the icon size is <span class="emphasis"><em>not</em></span> wildcarded.</p></div><div class="refsect2" title="gtk.IconSource.set_icon_name"><a name="method-gtkiconsource--set-icon-name"></a><h3>gtk.IconSource.set_icon_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_icon_name</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>an icon name
to</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_icon_name</code>() method uses the
name specified by <em class="parameter"><code>icon_name</code></em> to look up an icon in the
current icon theme to use as a base image when creating icon variants for
<a class="link" href="class-gtkiconset.html" title="gtk.IconSet"><code class="classname">gtk.IconSet</code></a>.</p><p>In PyGTK 2.10 and above, <em class="parameter"><code>icon_name</code></em> may be
<code class="literal">None</code> to unset the icon name.</p></div><div class="refsect2" title="gtk.IconSource.get_icon_name"><a name="method-gtkiconsource--get-icon-name"></a><h3>gtk.IconSource.get_icon_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_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 icon name or <code class="literal">None</code> if no
name is set.</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_icon</code>() method returns the
source icon name, or <code class="literal">None</code> if no name is set.</p></div></div><div class="refsect1" title="Functions"><a name="id3736763"></a><h2>Functions</h2><div class="refsect2" title="gtk.icon_size_lookup"><a name="function-gtk--icon-size-lookup"></a><h3>gtk.icon_size_lookup</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.icon_size_lookup</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_size</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_size</code></strong> :</span></p></td><td> an icon size</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 2-tuple containing the width and height of
the specified <em class="parameter"><code>icon_size</code></em></td></tr></tbody></table><p>The <code class="function">gtk.icon_size_lookup</code>() function returns
a 2-tuple containing the width and height of the icon size specified by
<em class="parameter"><code>icon_size</code></em>. The value of
<em class="parameter"><code>icon_size</code></em> must be one of:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><code class="literal">gtk.ICON_SIZE_MENU</code></li><li class="listitem"><code class="literal">gtk.ICON_SIZE_SMALL_TOOLBAR</code></li><li class="listitem"><code class="literal">gtk.ICON_SIZE_LARGE_TOOLBAR</code></li><li class="listitem"><code class="literal">gtk.ICON_SIZE_BUTTON</code></li><li class="listitem"><code class="literal">gtk.ICON_SIZE_DND</code></li><li class="listitem"><code class="literal">gtk.ICON_SIZE_DIALOG</code></li></ul></div><p>or an integer value returned from 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.</p></div><div class="refsect2" title="gtk.icon_size_lookup_for_settings"><a name="function-gtk--icon-size-lookup-for-settings"></a><h3>gtk.icon_size_lookup_for_settings</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.icon_size_lookup_for_settings</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>settings</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_size</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>settings</code></strong> :</span></p></td><td>a <a class="link" href="class-gtksettings.html" title="gtk.Settings"><code class="classname">gtk.Settings</code></a>
object used to determine which user preferences to use.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>icon_size</code></strong> :</span></p></td><td> an icon size</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 2-tuple containing the width and height of
the specified <em class="parameter"><code>icon_size</code></em> or <code class="literal">None</code>
if <em class="parameter"><code>icon_size</code></em> was invalid.</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_size_lookup_for_settings</code>()
function returns a 2-tuple containing the width and height of the icon size
specified by <em class="parameter"><code>icon_size</code></em> of <code class="literal">None</code> if
<em class="parameter"><code>icon_size</code></em> was not valid. The value of
<em class="parameter"><code>icon_size</code></em> must be one of:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><code class="literal">gtk.ICON_SIZE_MENU</code></li><li class="listitem"><code class="literal">gtk.ICON_SIZE_SMALL_TOOLBAR</code></li><li class="listitem"><code class="literal">gtk.ICON_SIZE_LARGE_TOOLBAR</code></li><li class="listitem"><code class="literal">gtk.ICON_SIZE_BUTTON</code></li><li class="listitem"><code class="literal">gtk.ICON_SIZE_DND</code></li><li class="listitem"><code class="literal">gtk.ICON_SIZE_DIALOG</code></li></ul></div><p>or an integer value returned from 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.</p></div><div class="refsect2" title="gtk.icon_size_register"><a name="function-gtk--icon-size-register"></a><h3>gtk.icon_size_register</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.icon_size_register</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</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>name</code></strong> :</span></p></td><td>the name of the icon size</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the width of the icon size</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the height of the icon
size</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer representing the icon
size</td></tr></tbody></table><p>The <code class="function">gtk.icon_size_register</code>() function
registers a new icon size for the specified <em class="parameter"><code>width</code></em> and
<em class="parameter"><code>height</code></em> with the specified <em class="parameter"><code>name</code></em>
and returns the integer used to represent the icon size.</p></div><div class="refsect2" title="gtk.icon_size_register_alias"><a name="function-gtk--icon-size-register-alias"></a><h3>gtk.icon_size_register_alias</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.icon_size_register_alias</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>alias</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>target</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>alias</code></strong> :</span></p></td><td>an alias for
<em class="parameter"><code>target</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>target</code></strong> :</span></p></td><td>an integer representing an existing icon
size</td></tr></tbody></table><p>The <code class="function">gtk.icon_size_register_alias</code>() function
registers the specified <em class="parameter"><code>alias</code></em> as another name for the
icon size specified by <em class="parameter"><code>target</code></em>.</p></div><div class="refsect2" title="gtk.icon_size_from_name"><a name="function-gtk--icon-size-from-name"></a><h3>gtk.icon_size_from_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.icon_size_from_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>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>name</code></strong> :</span></p></td><td>a name of an existing icon
size</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the icon size associated with
<em class="parameter"><code>name</code></em></td></tr></tbody></table><p>The <code class="function">gtk.icon_size_from_name</code>() function
returns the integer representing the icon size associated with the specified
<em class="parameter"><code>name</code></em>.</p></div><div class="refsect2" title="gtk.icon_size_get_name"><a name="function-gtk--icon-size-get-name"></a><h3>gtk.icon_size_get_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.icon_size_get_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</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>size</code></strong> :</span></p></td><td>an integer representing an existing icon
size</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the name associated with the icon size
represented by <em class="parameter"><code>size</code></em></td></tr></tbody></table><p>The <code class="function">gtk.icon_size_get_name</code>() function
returns the name of the icon size represented by
<em class="parameter"><code>size</code></em>.</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-gtkiconset.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-gtkicontheme.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.IconSet </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.IconTheme</td></tr></table></div></body></html>
|