/usr/share/gtk-doc/html/pygtk/class-gtkiconinfo.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 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.IconInfo</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-gtkiconfactory.html" title="gtk.IconFactory"><link rel="next" href="class-gtkiconset.html" title="gtk.IconSet"></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.IconInfo</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkiconfactory.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkiconset.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.IconInfo"><a name="class-gtkiconinfo"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.IconInfo</h2><p>gtk.IconInfo — object containing
information about and icon in an icon theme (new in PyGTK 2.4)</p></div><div class="refsect1" title="Synopsis"><a name="id3731550"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.IconInfo</span></span>(<span class="ooclass"><span class="classname">gobject.GBoxed</span></span>):
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--copy" title="gtk.IconInfo.copy">copy</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--free" title="gtk.IconInfo.free">free</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--get-base-size" title="gtk.IconInfo.get_base_size">get_base_size</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--get-filename" title="gtk.IconInfo.get_filename">get_filename</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--get-builtin-pixbuf" title="gtk.IconInfo.get_builtin_pixbuf">get_builtin_pixbuf</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--load-icon" title="gtk.IconInfo.load_icon">load_icon</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--set-raw-coordinates" title="gtk.IconInfo.set_raw_coordinates">set_raw_coordinates</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>raw_coordinates</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--get-embedded-rect" title="gtk.IconInfo.get_embedded_rect">get_embedded_rect</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--get-attach-points" title="gtk.IconInfo.get_attach_points">get_attach_points</a></span>()</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--get-display-name" title="gtk.IconInfo.get_display_name">get_display_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-gtkiconinfo.html#function-gtk--iconinfo-new-from-pixbuf" title="gtk.icon_info_new_from_pixbuf">gtk.icon_info_new_from_pixbuf</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbuf</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Description"><a name="id3731805"></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 <a class="link" href="class-gtkiconinfo.html" title="gtk.IconInfo"><code class="classname">gtk.IconInfo</code></a>
object contains information about an icon in a <a class="link" href="class-gtkicontheme.html" title="gtk.IconTheme"><code class="classname">gtk.IconTheme</code></a>. A
<a class="link" href="class-gtkiconinfo.html" title="gtk.IconInfo"><code class="classname">gtk.IconInfo</code></a>
object is created using the <a class="link" href="class-gtkicontheme.html#method-gtkicontheme--lookup-icon" title="gtk.IconTheme.lookup_icon"><code class="methodname">gtk.IconTheme.lookup_icon</code>()</a>
method.</p><p>A <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a> can
be rendered with the icon using the <a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--load-icon" title="gtk.IconInfo.load_icon"><code class="methodname">load_icon</code>()</a>
method. If you just want to load the pixbuf of an icon you can use the <a class="link" href="class-gtkicontheme.html#method-gtkicontheme--load-icon" title="gtk.IconTheme.load_icon"><code class="methodname">gtk.IconTheme.load_icon</code>()</a>
method that combines the <a class="link" href="class-gtkicontheme.html#method-gtkicontheme--lookup-icon" title="gtk.IconTheme.lookup_icon"><code class="methodname">gtk.IconTheme.lookup_icon</code>()</a>
method and the <a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--load-icon" title="gtk.IconInfo.load_icon"><code class="methodname">load_icon</code>()</a>
method.</p></div><div class="refsect1" title="Methods"><a name="id3731905"></a><h2>Methods</h2><div class="refsect2" title="gtk.IconInfo.copy"><a name="method-gtkiconinfo--copy"></a><h3>gtk.IconInfo.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>the new <a class="link" href="class-gtkiconinfo.html" title="gtk.IconInfo"><code class="classname">gtk.IconInfo</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">copy</code>() method returns a copy of the
icon info object.</p></div><div class="refsect2" title="gtk.IconInfo.free"><a name="method-gtkiconinfo--free"></a><h3>gtk.IconInfo.free</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">free</span>(<span class="methodparam"></span>)</code></pre><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><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 since it can
crash your application.</p></div><p>The <code class="methodname">free</code>() method frees the icon info
and its associated information</p></div><div class="refsect2" title="gtk.IconInfo.get_base_size"><a name="method-gtkiconinfo--get-base-size"></a><h3>gtk.IconInfo.get_base_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_base_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 base size, or 0, if no base
size is known for 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">get_base_size</code>() method returns the
base size for the icon. The base size is a size for the icon that was
specified by the icon theme creator. This may be different than the actual
size of image; an example of this is small emblem icons that can be attached
to a larger icon. These icons will be given the same base size as the larger
icons to which they are attached.</p></div><div class="refsect2" title="gtk.IconInfo.get_filename"><a name="method-gtkiconinfo--get-filename"></a><h3>gtk.IconInfo.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 filename for the icon, or
<code class="literal">None</code> if 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>
should be used instead.</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_filename</code>() method returns the filename for the icon. If
the <code class="literal">gtk.ICON_LOOKUP_USE_BUILTIN</code> flag was passed to the
<a class="link" href="class-gtkicontheme.html#method-gtkicontheme--lookup-icon" title="gtk.IconTheme.lookup_icon"><code class="methodname">gtk.IconTheme.lookup_icon()</code></a>
method, there may be no filename if a builtin icon is returned. In this
case, you should use 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.</p></div><div class="refsect2" title="gtk.IconInfo.get_builtin_pixbuf"><a name="method-gtkiconinfo--get-builtin-pixbuf"></a><h3>gtk.IconInfo.get_builtin_pixbuf</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_builtin_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 built-in image pixbuf, 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_builtin_pixbuf</code>() method returns
the built-in image for this icon, if any. To allow <code class="literal">GTK+</code>
to use built in icon images, you must pass the
<code class="literal">gtk.ICON_LOOKUP_USE_BUILTIN</code> to the <a class="link" href="class-gtkicontheme.html#method-gtkicontheme--lookup-icon" title="gtk.IconTheme.lookup_icon"><code class="methodname">gtk.IconTheme.lookup_icon()</code></a>
method.</p></div><div class="refsect2" title="gtk.IconInfo.load_icon"><a name="method-gtkiconinfo--load-icon"></a><h3>gtk.IconInfo.load_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">load_icon</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 rendered into a <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a>.
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 renders the icon
previously looked up in an icon theme using the <a class="link" href="class-gtkicontheme.html#method-gtkicontheme--lookup-icon" title="gtk.IconTheme.lookup_icon"><code class="methodname">gtk.IconTheme.lookup_icon()</code></a>
method. The icon size will be based on the size passed to the <a class="link" href="class-gtkicontheme.html#method-gtkicontheme--lookup-icon" title="gtk.IconTheme.lookup_icon"><code class="methodname">gtk.IconTheme.lookup_icon()</code></a>
method. Note that the resulting <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a> may
not be exactly this size. An icon theme may have icons that differ slightly
from their nominal sizes, and in addition <code class="literal">GTK</code>+ will avoid
scaling icons that it considers sufficiently close to the requested size to
maintain sharpness.</p><p>This method raise the GError exception if an error occurs during
rendering of the icon.</p></div><div class="refsect2" title="gtk.IconInfo.set_raw_coordinates"><a name="method-gtkiconinfo--set-raw-coordinates"></a><h3>gtk.IconInfo.set_raw_coordinates</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_raw_coordinates</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>raw_coordinates</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>raw_coordinates</code></strong> :</span></p></td><td>if <code class="literal">True</code>, the coordinates of
embedded rectangles and attached points should be returned in
their original (unscaled) form.</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_raw_coordinates</code>() method sets
the internal raw_coordinates flag to the value of
<em class="parameter"><code>raw_coordinates</code></em>. If
<em class="parameter"><code>raw_coordinates</code></em> is <code class="literal">True</code>, the
coordinates returned by the <a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--get-embedded-rect" title="gtk.IconInfo.get_embedded_rect"><code class="methodname">get_embedded_rect()</code></a>
and <a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--get-attach-points" title="gtk.IconInfo.get_attach_points"><code class="methodname">get_attach_points()</code></a>
methods will be returned in their original form as specified in the icon
theme, instead of scaled appropriately for the pixbuf returned by the <a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--load-icon" title="gtk.IconInfo.load_icon"><code class="methodname">load_icon()</code></a>
method.</p><p>Raw coordinates are somewhat strange; they are specified to be
with respect to the unscaled pixmap for <code class="literal">PNG</code> and
<code class="literal">XPM</code> icons, but for <code class="literal">SVG</code> icons, they are
in a 1000x1000 coordinate space that is scaled to the final size of the
icon. You can determine if the icon is an <code class="literal">SVG</code> icon by
using the <a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--get-filename" title="gtk.IconInfo.get_filename"><code class="methodname">get_filename()</code></a>
method, and seeing if it is not <code class="literal">None</code> and ends in '.svg'.</p><p>This method is provided primarily to allow compatibility
wrappers for older API's, and is not expected to be useful for
applications.</p></div><div class="refsect2" title="gtk.IconInfo.get_embedded_rect"><a name="method-gtkiconinfo--get-embedded-rect"></a><h3>gtk.IconInfo.get_embedded_rect</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_embedded_rect</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 <a class="link" href="class-gdkrectangle.html" title="gtk.gdk.Rectangle"><code class="classname">gtk.gdk.Rectangle</code></a>
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_embedded_rect</code>() method returns
a <a class="link" href="class-gdkrectangle.html" title="gtk.gdk.Rectangle"><code class="classname">gtk.gdk.Rectangle</code></a>
containing the coordinates of a rectangle within the icon that can be used
for display of information such as a preview of the contents of a text file.
See the <a class="link" href="class-gtkiconinfo.html#method-gtkiconinfo--set-raw-coordinates" title="gtk.IconInfo.set_raw_coordinates"><code class="methodname">set_raw_coordinates()</code></a>
method for further information about the coordinate system.</p></div><div class="refsect2" title="gtk.IconInfo.get_attach_points"><a name="method-gtkiconinfo--get-attach-points"></a><h3>gtk.IconInfo.get_attach_points</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_attach_points</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 a set of 2-tuples for the
attach points</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_attach_points</code>() method returns
a tuple containing the attach points for an icon as a set of 2-tuples. An
attach point is a location in the icon that can be used as anchor points for
attaching emblems or overlays to the icon.</p></div><div class="refsect2" title="gtk.IconInfo.get_display_name"><a name="method-gtkiconinfo--get-display-name"></a><h3>gtk.IconInfo.get_display_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_display_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 display name for the icon or <code class="literal">None</code>, if
the icon doesn't have a specified display name.</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_display_name</code>() method returns the display name for an icon. A display name is a
string to be used in place of the icon name in a user
visible context like a list of icons.</p></div></div><div class="refsect1" title="Functions"><a name="id3732838"></a><h2>Functions</h2><div class="refsect2" title="gtk.icon_info_new_from_pixbuf"><a name="function-gtk--iconinfo-new-from-pixbuf"></a><h3>gtk.icon_info_new_from_pixbuf</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.icon_info_new_from_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 <PYGTKDOCLINK HREF="class-gtkpixbuf"><code class="classname">gtk.Pixbuf</code></PYGTKDOCLINK>
to wrap in a <a class="link" href="class-gtkiconinfo.html" title="gtk.IconInfo"><code class="classname">gtk.IconInfo</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 function is available in PyGTK 2.14 and above.</p></div><p>
Creates a <a class="link" href="class-gtkiconinfo.html" title="gtk.IconInfo"><code class="classname">gtk.IconInfo</code></a>
for a <PYGTKDOCLINK HREF="class-gtkpixbuf"><code class="classname">gtk.Pixbuf</code></PYGTKDOCLINK>.
</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-gtkiconfactory.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-gtkiconset.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.IconFactory </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.IconSet</td></tr></table></div></body></html>
|