1 <?xml version="1.0" standalone="no"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
5 <refentry id="class-gioemblem">
7 <refname>gio.Emblem</refname>
8 <refpurpose>An object for emblems.</refpurpose>
12 <title>Synopsis</title>
14 <classsynopsis language="python">
15 <ooclass><classname>gio.Emblem</classname></ooclass>
16 <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
17 <ooclass><classname><link linkend="class-gioicon">gio.Icon</link></classname></ooclass>
19 <constructorsynopsis language="python">
20 <methodname><link linkend="constructor-gioemblem">gio.Emblem</link></methodname>
21 <methodparam><parameter role="keyword">icon</parameter></methodparam>
22 <methodparam><parameter role="keyword">origin</parameter><initializer><literal>gio.EMBLEM_ORIGIN_UNKNOWN</literal></initializer></methodparam>
23 </constructorsynopsis>
25 <methodsynopsis language="python">
26 <methodname><link linkend="method-gioemblem--get-icon">get_icon</link></methodname>
27 <methodparam></methodparam>
29 <methodsynopsis language="python">
30 <methodname><link linkend="method-gioemblem--get-origin">get_origin</link></methodname>
31 <methodparam></methodparam>
37 <emphasis role="bold">Functions</emphasis>
39 <methodsynopsis language="python">
40 <methodname><link linkend="function-gio--emblem-new-with-origin">gio.emblem_new_with_origin</link></methodname>
41 <methodparam><parameter role="keyword">icon</parameter></methodparam>
42 <methodparam><parameter role="keyword">origin</parameter></methodparam>
43 </methodsynopsis></programlisting>
48 <title>Ancestry</title>
50 <synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
51 +-- <link linkend="class-gioemblem">gio.Emblem</link>
57 <title>Implemented Interfaces</title>
59 <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>
61 <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
65 <refsect1 id="properties-gioemblem">
66 <title>gio.Emblem Properties</title>
68 <blockquote role="properties">
69 <informaltable pgwide="1" frame="none">
71 <colspec column="1" colwidth="1in"/>
72 <colspec column="2" colwidth="1in"/>
73 <colspec column="3" colwidth="4in"/>
77 <entry>Read - Write - Construct Only</entry>
78 <entry>The actual icon of the emblem.</entry>
81 <entry>"origin"</entry>
82 <entry>Read - Write - Construct Only</entry>
83 <entry>Tells which origin the emblem is derived from.</entry>
93 <title>Description</title>
96 The <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>
97 class is an implementation of <classname><link linkend="class-gioicon">gio.Icon</link></classname>
98 that supports having an emblem, which is an icon with additional properties.
99 It can then be added to a
100 <link linkend="class-gioemblemedicon"><classname>gio.EmblemedIcon</classname></link>.
103 Currently, only metainformation about the emblem's origin is supported.
104 More may be added in the future.
108 <refsect1 id="constructor-gioemblem">
109 <title>Constructor</title>
111 <programlisting><constructorsynopsis language="python">
112 <methodname>gio.Emblem</methodname>
113 <methodparam><parameter role="keyword">icon</parameter></methodparam>
114 <methodparam><parameter role="keyword">origin</parameter><initializer><literal>gio.EMBLEM_ORIGIN_UNKNOWN</literal></initializer></methodparam>
115 </constructorsynopsis></programlisting>
118 <term><parameter>icon</parameter> :</term>
120 <link linkend="class-gioicon"><classname>gio.Icon</classname></link> containing the icon.
121 </simpara></listitem>
124 <term><parameter>origin</parameter> :</term>
126 <link linkend="gio-emblem-origin-constants">origin</link> of the emblem.
127 </simpara></listitem>
130 <term><emphasis>Returns</emphasis> :</term>
131 <listitem><simpara>a new
132 <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>.
133 </simpara></listitem>
138 Parameter <parameter>origin</parameter> is available since PyGObject 2.20.
142 Creates a new <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link> for icon.
148 <title>Methods</title>
150 <refsect2 id="method-gioemblem--get-icon">
151 <title>gio.Emblem.get_icon</title>
153 <programlisting><methodsynopsis language="python">
154 <methodname>get_icon</methodname>
155 <methodparam></methodparam>
156 </methodsynopsis></programlisting>
160 <term><emphasis>Returns</emphasis> :</term>
162 <link linkend="class-gioicon"><classname>gio.Icon</classname></link>.
163 </simpara></listitem>
168 The <methodname>get_icon</methodname>() method gives back the icon from emblem.
172 <refsect2 id="method-gioemblem--get-origin">
173 <title>gio.Emblem.get_origin</title>
175 <programlisting><methodsynopsis language="python">
176 <methodname>get_origin</methodname>
177 <methodparam></methodparam>
178 </methodsynopsis></programlisting>
182 <term><emphasis>Returns</emphasis> :</term>
183 <listitem><simpara>the origin of the emblem.
184 </simpara></listitem>
189 The <methodname>get_origin</methodname>() method gets the origin of the emblem.
195 <title>Functions</title>
197 <refsect2 id="function-gio--emblem-new-with-origin">
198 <title>gio.emblem_new_with_origin</title>
200 <programlisting><methodsynopsis language="python">
201 <methodname>emblem_new_with_origin</methodname>
202 <methodparam><parameter role="keyword">icon</parameter></methodparam>
203 <methodparam><parameter role="keyword">origin</parameter></methodparam>
204 </methodsynopsis></programlisting>
208 <term><parameter>origin</parameter> :</term>
209 <listitem><simpara>a <xref linkend="gio-emblem-origin-constants" endterm="gio-emblem-origin-constants-title"></xref>
210 defining the emblem's origin.
211 </simpara></listitem>
214 <term><emphasis>Returns</emphasis> :</term>
215 <listitem><simpara>A <link linkend="class-gioemblem"><classname>gio.Emblem</classname></link>.
216 </simpara></listitem>
221 While this method is not deprecated, with 2.20 and up it is recommended
222 to use the constructor instead.
227 The <methodname>emblem_new_with_origin</methodname>() function creates
228 a new emblem for icon.