Imported Upstream version 2.28.4
[platform/upstream/pygobject2.git] / docs / html / class-gioemblem.html
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gio.Emblem</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="PyGObject Reference Manual"><link rel="up" href="gio-class-reference.html" title="PyGio Class Reference"><link rel="prev" href="class-giodrive.html" title="gio.Drive"><link rel="next" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"></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">gio.Emblem</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-giodrive.html">Prev</a> </td><th width="60%" align="center">PyGio Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gioemblemedicon.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gio.Emblem"><a name="class-gioemblem"></a><div class="titlepage"></div><div class="refnamediv"><h2>gio.Emblem</h2><p>gio.Emblem — An object for emblems.</p></div><div class="refsect1" title="Synopsis"><a name="id692547"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gio.Emblem</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>, <span class="ooclass"><span class="classname"><a class="link" href="class-gioicon.html" title="gio.Icon">gio.Icon</a></span></span>):
2 <code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-gioemblem.html#constructor-gioemblem" title="Constructor">gio.Emblem</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>origin</code></strong></span><span class="initializer">=gio.EMBLEM_ORIGIN_UNKNOWN</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioemblem.html#method-gioemblem--get-icon" title="gio.Emblem.get_icon">get_icon</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioemblem.html#method-gioemblem--get-origin" title="gio.Emblem.get_origin">get_origin</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><pre class="programlisting">
3 <span class="bold"><strong>Functions</strong></span>
4  
5 <code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gioemblem.html#function-gio--emblem-new-with-origin" title="gio.emblem_new_with_origin">gio.emblem_new_with_origin</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>origin</code></strong></span></span>)</code></pre></div><div class="refsect1" title="Ancestry"><a name="id660220"></a><h2>Ancestry</h2><pre class="synopsis">+-- <a class="link" href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
6   +-- <a class="link" href="class-gioemblem.html" title="gio.Emblem">gio.Emblem</a>
7 </pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id578352"></a><h2>Implemented Interfaces</h2><p>
8             <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>
9             implements
10             <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>
11         </p></div><div class="refsect1" title="gio.Emblem Properties"><a name="properties-gioemblem"></a><h2>gio.Emblem Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"icon"</td><td valign="top">Read - Write - Construct Only</td><td valign="top">The actual icon of the emblem.</td></tr><tr valign="top"><td valign="top">"origin"</td><td valign="top">Read - Write - Construct Only</td><td valign="top">Tells which origin the emblem is derived from.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id604910"></a><h2>Description</h2><p>
12             The <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>
13             class is an implementation of <code class="classname"><a class="link" href="class-gioicon.html" title="gio.Icon">gio.Icon</a></code>
14             that supports having an emblem, which is an icon with additional properties.
15             It can then be added to a
16             <a class="link" href="class-gioemblemedicon.html" title="gio.EmblemedIcon"><code class="classname">gio.EmblemedIcon</code></a>.
17         </p><p>
18             Currently, only metainformation about the emblem's origin is supported.
19             More may be added in the future.
20         </p></div><div class="refsect1" title="Constructor"><a name="constructor-gioemblem"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gio.Emblem</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>origin</code></strong></span><span class="initializer">=gio.EMBLEM_ORIGIN_UNKNOWN</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>icon</code></em> :</span></p></td><td>a
21                 <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a> containing the icon.
22                 </td></tr><tr><td><p><span class="term"><em class="parameter"><code>origin</code></em> :</span></p></td><td>
23                 <a class="link" href="gio-constants.html#gio-emblem-origin-constants" title="Gio Emblem Origin Constants">origin</a> of the emblem.
24                 </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new
25                 <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>.
26                 </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
27           Parameter <em class="parameter"><code>origin</code></em> is available since PyGObject 2.20.
28         </div><p>
29             Creates a new <a class="link" href="class-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a> for icon.
30         </p></div><div class="refsect1" title="Methods"><a name="id590866"></a><h2>Methods</h2><div class="refsect2" title="gio.Emblem.get_icon"><a name="method-gioemblem--get-icon"></a><h3>gio.Emblem.get_icon</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_icon</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
31                     <a class="link" href="class-gioicon.html" title="gio.Icon"><code class="classname">gio.Icon</code></a>.
32                     </td></tr></tbody></table><p>
33                 The <code class="methodname">get_icon</code>() method gives back the icon from emblem.
34             </p></div><div class="refsect2" title="gio.Emblem.get_origin"><a name="method-gioemblem--get-origin"></a><h3>gio.Emblem.get_origin</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_origin</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 origin of the emblem.
35                     </td></tr></tbody></table><p>
36                 The <code class="methodname">get_origin</code>() method gets the origin of the emblem.
37             </p></div></div><div class="refsect1" title="Functions"><a name="id651040"></a><h2>Functions</h2><div class="refsect2" title="gio.emblem_new_with_origin"><a name="function-gio--emblem-new-with-origin"></a><h3>gio.emblem_new_with_origin</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">emblem_new_with_origin</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>origin</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"><em class="parameter"><code>origin</code></em> :</span></p></td><td>a <a class="xref" href="gio-constants.html#gio-emblem-origin-constants" title="Gio Emblem Origin Constants">Gio Emblem Origin Constants</a>
38                     defining the emblem's origin.
39                     </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-gioemblem.html" title="gio.Emblem"><code class="classname">gio.Emblem</code></a>.
40                     </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
41               While this method is not deprecated, with 2.20 and up it is recommended
42               to use the constructor instead.
43             </div><p>
44                 The <code class="methodname">emblem_new_with_origin</code>() function creates
45                 a new emblem for icon.
46             </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-giodrive.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gio-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gioemblemedicon.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gio.Drive </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gio.EmblemedIcon</td></tr></table></div></body></html>