blob: 93198c40f489818dc697ce09e2f9362e593b2e0f (
plain)
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="class-gioloadableicon">
<refnamediv>
<refname>gio.LoadableIcon</refname>
<refpurpose>Interface for icons.</refpurpose>
</refnamediv>
<refsect1>
<title>Synopsis</title>
<classsynopsis language="python">
<ooclass><classname>gio.LoadableIcon</classname></ooclass>
<ooclass><classname><link linkend="class-gobjectginterface">gobject.GInterface</link></classname></ooclass>
<methodsynopsis language="python">
<methodname><link linkend="method-gioloadableicon--load">load</link></methodname>
<methodparam><parameter role="keyword">size</parameter><initializer>0</initializer></methodparam>
<methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gioloadableicon--load-async">load_async</link></methodname>
<methodparam><parameter role="keyword">callback</parameter></methodparam>
<methodparam><parameter role="keyword">size</parameter><initializer>0</initializer></methodparam>
<methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
<methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gioloadableicon--load-finish">load_finish</link></methodname>
<methodparam><parameter role="keyword">res</parameter></methodparam>
</methodsynopsis>
</classsynopsis>
</refsect1>
<refsect1>
<title>Ancestry</title>
<synopsis>+-- <link linkend="class-gobjectginterface">gobject.GInterface</link>
+-- <link linkend="class-gioloadableicon">gio.LoadableIcon</link>
</synopsis>
</refsect1>
<refsect1>
<title>Prerequisites</title>
<para>
<link linkend="class-gioloadableicon"><classname>gio.LoadableIcon</classname></link> requires
<link linkend="class-gioicon"><classname>gio.Icon</classname></link>. and
<link linkend="class-gobject"><classname>gobject.GObject</classname></link>
</para>
</refsect1>
<refsect1>
<title>Known Implementation</title>
<para>
<link linkend="class-gioloadableicon"><classname>gio.LoadableIcon</classname></link> is implemented by
<link linkend="class-giofileicon"><classname>gio.FileIcon</classname></link>
</para>
</refsect1>
<refsect1>
<title>Description</title>
<para>
<link linkend="class-gioloadableicon"><classname>gio.LoadableIcon</classname></link>
extends the <link linkend="class-gioicon"><classname>gio.Icon</classname></link>
interface and adds the ability to load icons from streams.
</para>
</refsect1>
<refsect1>
<title>Methods</title>
<refsect2 id="method-gioloadableicon--load">
<title>gio.LoadableIcon.load</title>
<programlisting><methodsynopsis language="python">
<methodname>load</methodname>
<methodparam><parameter role="keyword">size</parameter><initializer>0</initializer></methodparam>
<methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter>size</parameter> :</term>
<listitem><simpara>an integer
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>cancellable</parameter> :</term>
<listitem><simpara>optional
<link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
object, <literal>None</literal> to ignore.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a 2 tuple containing a
<link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
to read the icon from and a string containing the icon type.
</simpara></listitem>
</varlistentry>
</variablelist>
<para>
The <methodname>load</methodname>() method loads a loadable icon.
For the asynchronous version of this function, see
<methodname><link linkend="method-gioloadableicon--load-async">gio.LoadableIcon.load_async</link></methodname>().
</para>
</refsect2>
<refsect2 id="method-gioloadableicon--load-async">
<title>gio.LoadableIcon.load_async</title>
<programlisting><methodsynopsis language="python">
<methodname>load_async</methodname>
<methodparam><parameter role="keyword">callback</parameter></methodparam>
<methodparam><parameter role="keyword">size</parameter><initializer>0</initializer></methodparam>
<methodparam><parameter role="keyword">cancellable</parameter><initializer><literal>None</literal></initializer></methodparam>
<methodparam><parameter role="keyword">user_data</parameter><initializer><literal>None</literal></initializer></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter>callback</parameter> :</term>
<listitem><simpara>a GAsyncReadyCallback to call when the request is satisfied.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>size</parameter> :</term>
<listitem><simpara>an integer
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>cancellable</parameter> :</term>
<listitem><simpara>optional
<link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link>
object, <literal>None</literal> to ignore.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>user_data</parameter> :</term>
<listitem><simpara>the data to pass to callback function.
</simpara></listitem>
</varlistentry>
</variablelist>
<para>
The <methodname>load_async</methodname>() method loads an icon asynchronously.
</para>
<para>
For more details, see
<methodname><link linkend="method-gioloadableicon--load">gio.LoadableIcon.load</link></methodname>()
which is the synchronous version of this call.
</para>
<para>
When the operation is finished, callback will be called. You can then call
<methodname><link linkend="method-gioloadableicon--load-finish">gio.LoadableIcon.load_finish</link></methodname>()
to get the result of the operation.
</para>
</refsect2>
<refsect2 id="method-gioloadableicon--load-finish">
<title>gio.LoadableIcon.load_finish</title>
<programlisting><methodsynopsis language="python">
<methodname>load_finish</methodname>
<methodparam><parameter role="keyword">res</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter>res</parameter> :</term>
<listitem><simpara>a
<link linkend="class-gioasyncresult"><classname>gio.AsyncResult</classname></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a 2 tuple containing a
<link linkend="class-gioinputstream"><classname>gio.InputStream</classname></link>
to read the icon from and a string containing the icon type.
</simpara></listitem>
</varlistentry>
</variablelist>
<para>
The <methodname>load_finish</methodname>() method finishes an asynchronous
icon load started in
<methodname><link linkend="method-gioloadableicon--load-async">gio.LoadableIcon.load_async</link></methodname>().
</para>
</refsect2>
</refsect1>
</refentry>
|