~ubuntu-branches/ubuntu/hardy/pygobject/hardy

« back to all changes in this revision

Viewing changes to docs/reference/pygobject-constants.xml

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2006-08-05 12:08:23 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060805120823-bzr4wfj03o79zqc9
Tags: 2.11.1-0ubuntu1
* New upstream version:
  - Add John Finlay's reference manual 
  - Fix GOption mem leak 
  - Infrastructure for lazy type registration
  - Enum/Flags fixes
  - Eliminate some GCC warnings
* debian/control.in:
  - Build-Depends on xsltproc, docbook-xsl
  - create a python-gobject-doc package
* debian/python-gobject-doc.install:
  - create a python-gobject-doc package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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">
 
4
 
 
5
<refentry id="gobject-constants">
 
6
  <refnamediv>
 
7
    <refname>gobject Constants</refname>
 
8
    <refpurpose>the built-in constants of the gobject module</refpurpose>
 
9
  </refnamediv>
 
10
 
 
11
  <refsect1>
 
12
    <title>Synopsis</title>
 
13
 
 
14
    <programlisting>
 
15
<xref linkend="gobject-io-condition-constants" endterm="gobject-io-condition-constants-title"></xref>
 
16
<xref linkend="gobject-param-constants" endterm="gobject-param-constants-title"></xref>
 
17
<xref linkend="gobject-priority-constants" endterm="gobject-priority-constants-title"></xref>
 
18
<xref linkend="gobject-signal-constants" endterm="gobject-signal-constants-title"></xref>
 
19
<xref linkend="gobject-spawn-flag-constants" endterm="gobject-spawn-flag-constants-title"></xref>
 
20
<xref linkend="gobject-type-constants" endterm="gobject-type-constants-title"></xref>
 
21
<xref linkend="gobject-version-constants" endterm="gobject-version-constants-title"></xref>
 
22
</programlisting>
 
23
 
 
24
  </refsect1>
 
25
 
 
26
  <refsect1 id="gobject-constants-description">
 
27
    <title>Description</title>
 
28
 
 
29
    <refsect2 id="gobject-io-condition-constants">
 
30
      <title id="gobject-io-condition-constants-title">GObject IO Condition Constants</title>
 
31
 
 
32
      <para>The IO Condition constants are a set of bit-flags that specify a
 
33
condition to watch for on an event source.</para>
 
34
 
 
35
      <variablelist>
 
36
        <varlistentry>
 
37
          <term><literal>gobject.IO_IN</literal></term>
 
38
          <listitem>
 
39
            <simpara>There is data to read</simpara>
 
40
          </listitem>
 
41
        </varlistentry>
 
42
        <varlistentry>
 
43
          <term><literal>gobject.IO_OUT</literal></term>
 
44
          <listitem>
 
45
            <simpara>Data can be written (without blocking).</simpara>
 
46
          </listitem>
 
47
        </varlistentry>
 
48
        <varlistentry>
 
49
          <term><literal>gobject.IO_PRI</literal></term>
 
50
          <listitem>
 
51
            <simpara>There is urgent data to read.</simpara>
 
52
          </listitem>
 
53
        </varlistentry>
 
54
        <varlistentry>
 
55
          <term><literal>gobject.IO_ERR</literal></term>
 
56
          <listitem>
 
57
            <simpara>Error condition.</simpara>
 
58
          </listitem>
 
59
        </varlistentry>
 
60
        <varlistentry>
 
61
          <term><literal>gobject.IO_HUP</literal></term>
 
62
          <listitem>
 
63
            <simpara>Hung up (the connection has been broken, usually for
 
64
            pipes and sockets).</simpara>
 
65
          </listitem>
 
66
        </varlistentry>
 
67
        <varlistentry>
 
68
          <term><literal>gobject.IO_NVAL</literal></term>
 
69
          <listitem>
 
70
            <simpara>Invalid request. The file descriptor is not
 
71
            open.</simpara>
 
72
          </listitem>
 
73
        </varlistentry>
 
74
      </variablelist>
 
75
 
 
76
    </refsect2>
 
77
 
 
78
    <refsect2 id="gobject-param-constants">
 
79
      <title id="gobject-param-constants-title">GObject Param Flag Constants</title>
 
80
 
 
81
      <para>The Param Flag constants are a set of bit-flags that specify
 
82
certain aspects of parameters that can be configured.</para>
 
83
 
 
84
      <variablelist>
 
85
        <varlistentry>
 
86
          <term><literal>gobject.PARAM_READABLE</literal></term>
 
87
          <listitem>
 
88
            <simpara>The parameter is readable</simpara>
 
89
          </listitem>
 
90
        </varlistentry>
 
91
        <varlistentry>
 
92
          <term><literal>gobject.PARAM_WRITABLE</literal></term>
 
93
          <listitem>
 
94
            <simpara>The parameter is writable</simpara>
 
95
          </listitem>
 
96
        </varlistentry>
 
97
        <varlistentry>
 
98
          <term><literal>gobject.PARAM_CONSTRUCT</literal></term>
 
99
          <listitem>
 
100
            <simpara>The parameter will be set upon object
 
101
            construction</simpara>
 
102
          </listitem>
 
103
        </varlistentry>
 
104
        <varlistentry>
 
105
          <term><literal>gobject.PARAM_CONSTRUCT_ONLY</literal></term>
 
106
          <listitem>
 
107
            <simpara>The parameter will only be set upon object
 
108
            construction</simpara>
 
109
          </listitem>
 
110
        </varlistentry>
 
111
        <varlistentry>
 
112
          <term><literal>gobject.PARAM_LAX_VALIDATION</literal></term>
 
113
          <listitem>
 
114
            <simpara>Upon parameter conversion strict validation is not
 
115
            required</simpara>
 
116
          </listitem>
 
117
        </varlistentry>
 
118
      </variablelist>
 
119
 
 
120
    </refsect2>
 
121
 
 
122
    <refsect2 id="gobject-priority-constants">
 
123
      <title id="gobject-priority-constants-title">GObject Priority Constants</title>
 
124
 
 
125
      <para>The Priority constants specify </para>
 
126
 
 
127
      <variablelist>
 
128
        <varlistentry>
 
129
          <term><literal>gobject.PRIORITY_HIGH</literal></term>
 
130
          <listitem>
 
131
            <simpara>Use this for high priority event sources.</simpara>
 
132
          </listitem>
 
133
        </varlistentry>
 
134
        <varlistentry>
 
135
          <term><literal>gobject.PRIORITY_DEFAULT</literal></term>
 
136
          <listitem>
 
137
            <simpara>Use this for default priority event sources.  This
 
138
            priority is used when adding timeout functions with the <link
 
139
            linkend="function-gobject--timeout-add"><function>gobject.timeout_add</function>()</link>
 
140
            function. This priority is also used for events from the X
 
141
            server.</simpara>
 
142
          </listitem>
 
143
        </varlistentry>
 
144
        <varlistentry>
 
145
          <term><literal>gobject.PRIORITY_HIGH_IDLE</literal></term>
 
146
          <listitem>
 
147
            <simpara>Use this for high priority idle functions. For example,
 
148
            gobject.PRIORITY_HIGH_IDLE + 10 is used for resizing operations;
 
149
            and, gobject.PRIORITY_HIGH_IDLE + 20, for redrawing
 
150
            operations. (This is done to ensure that any pending resizes are
 
151
            processed before any pending redraws, so that widgets are not
 
152
            redrawn twice unnecessarily.)</simpara>
 
153
          </listitem>
 
154
        </varlistentry>
 
155
        <varlistentry>
 
156
          <term><literal>gobject.PRIORITY_DEFAULT_IDLE</literal></term>
 
157
          <listitem>
 
158
            <simpara>Use this for default priority idle functions. This
 
159
            priority is used when adding idle functions with the <link
 
160
            linkend="function-gobject--idle-add"><function>gobject.idle_add</function>()</link>
 
161
            function.</simpara>
 
162
          </listitem>
 
163
        </varlistentry>
 
164
        <varlistentry>
 
165
          <term><literal>gobject.PRIORITY_LOW</literal></term>
 
166
          <listitem>
 
167
            <simpara>Use this for very low priority background
 
168
            tasks.</simpara>
 
169
          </listitem>
 
170
        </varlistentry>
 
171
      </variablelist>
 
172
 
 
173
    </refsect2>
 
174
 
 
175
    <refsect2 id="gobject-signal-constants">
 
176
      <title id="gobject-signal-constants-title">GObject Signal Flag Constants</title>
 
177
 
 
178
      <para>The Signal Flag constants are a set of bit-flags that specify a
 
179
signal's behavior. The overall signal description outlines how especially
 
180
the <literal>RUN</literal> flags control the stages of a signal
 
181
emission.</para>
 
182
 
 
183
      <variablelist>
 
184
        <varlistentry>
 
185
          <term><literal>gobject.SIGNAL_RUN_FIRST</literal></term>
 
186
          <listitem>
 
187
            <simpara>Invoke the object method handler in the first emission
 
188
            stage.</simpara>
 
189
          </listitem>
 
190
        </varlistentry>
 
191
        <varlistentry>
 
192
          <term><literal>gobject.SIGNAL_RUN_LAST</literal></term>
 
193
          <listitem>
 
194
            <simpara>Invoke the object method handler in the third emission
 
195
            stage.</simpara>
 
196
          </listitem>
 
197
        </varlistentry>
 
198
        <varlistentry>
 
199
          <term><literal>gobject.SIGNAL_RUN_CLEANUP</literal></term>
 
200
          <listitem>
 
201
            <simpara>Invoke the object method handler in the last emission
 
202
            stage.</simpara>
 
203
          </listitem>
 
204
        </varlistentry>
 
205
        <varlistentry>
 
206
          <term><literal>gobject.SIGNAL_NO_RECURSE</literal></term>
 
207
          <listitem>
 
208
            <simpara>Signals being emitted for an object while currently
 
209
            being in emission for this very object will not be emitted
 
210
            recursively, but instead cause the first emission to be
 
211
            restarted.</simpara>
 
212
          </listitem>
 
213
        </varlistentry>
 
214
        <varlistentry>
 
215
          <term><literal>gobject.SIGNAL_DETAILED</literal></term>
 
216
          <listitem>
 
217
            <simpara>This signal supports "::detail" appendices to the
 
218
            signal name upon handler connections and emissions.</simpara>
 
219
          </listitem>
 
220
        </varlistentry>
 
221
        <varlistentry>
 
222
          <term><literal>gobject.SIGNAL_ACTION</literal></term>
 
223
          <listitem>
 
224
            <simpara>Action signals are signals that may freely be emitted
 
225
            on alive objects from user code via the <link
 
226
            linkend="method-gobject--emit"><methodname>gobject.emit</methodname>()</link>
 
227
            method and friends, without the need of being embedded into
 
228
            extra code that performs pre or post emission adjustments on the
 
229
            object. They can also be thought of as object methods which can
 
230
            be called generically by third-party code.</simpara>
 
231
          </listitem>
 
232
        </varlistentry>
 
233
        <varlistentry>
 
234
          <term><literal>gobject.SIGNAL_NO_HOOKS</literal></term>
 
235
          <listitem>
 
236
            <simpara>No emissions hooks are supported for this
 
237
            signal.</simpara>
 
238
          </listitem>
 
239
        </varlistentry>
 
240
      </variablelist>
 
241
 
 
242
    </refsect2>
 
243
 
 
244
    <refsect2 id="gobject-spawn-flag-constants">
 
245
      <title id="gobject-spawn-flag-constants-title">GObject Spawn Flag Constants</title>
 
246
 
 
247
      <para>The Spawn Flag constants are a set of bit-flags that can be
 
248
passed to the <link
 
249
linkend="function-gobject--spawn-async"><function>gobject.spawn_async</function>()</link>
 
250
function.</para>
 
251
 
 
252
      <variablelist>
 
253
        <varlistentry>
 
254
          <term><literal>gobject.SPAWN_LEAVE_DESCRIPTORS_OPEN</literal></term>
 
255
          <listitem>
 
256
            <simpara>the parent's open file descriptors will be inherited by
 
257
the child; otherwise all descriptors except stdin/stdout/stderr will be
 
258
closed before calling <function>exec</function>() in the child.</simpara>
 
259
          </listitem>
 
260
        </varlistentry>
 
261
        <varlistentry>
 
262
          <term><literal>gobject.SPAWN_DO_NOT_REAP_CHILD</literal></term>
 
263
          <listitem>
 
264
            <simpara>the child will not be automatically reaped; you must
 
265
call <function>waitpid</function>() or handle <literal>SIGCHLD</literal>
 
266
yourself, or the child will become a zombie.</simpara>
 
267
          </listitem>
 
268
        </varlistentry>
 
269
        <varlistentry>
 
270
          <term><literal>gobject.SPAWN_SEARCH_PATH</literal></term>
 
271
          <listitem>
 
272
            <simpara><parameter>argv</parameter>[0] need not be an absolute
 
273
path, it will be looked for in the user's <envar>PATH</envar>.</simpara>
 
274
          </listitem>
 
275
        </varlistentry>
 
276
        <varlistentry>
 
277
          <term><literal>gobject.SPAWN_STDOUT_TO_DEV_NULL</literal></term>
 
278
          <listitem>
 
279
            <simpara>the child's standard output will be discarded, instead
 
280
of going to the same location as the parent's standard output.</simpara>
 
281
          </listitem>
 
282
        </varlistentry>
 
283
        <varlistentry>
 
284
          <term><literal>gobject.SPAWN_STDERR_TO_DEV_NULL</literal></term>
 
285
          <listitem>
 
286
            <simpara>the child's standard error will be discarded.</simpara>
 
287
          </listitem>
 
288
        </varlistentry>
 
289
        <varlistentry>
 
290
          <term><literal>gobject.SPAWN_CHILD_INHERITS_STDIN</literal></term>
 
291
          <listitem>
 
292
            <simpara>the child will inherit the parent's standard input (by
 
293
default, the child's standard input is attached to /dev/null).</simpara>
 
294
          </listitem>
 
295
        </varlistentry>
 
296
        <varlistentry>
 
297
          <term><literal>gobject.SPAWN_FILE_AND_ARGV_ZERO</literal></term>
 
298
          <listitem>
 
299
            <simpara>the first element of <parameter>argv</parameter> is the
 
300
file to execute, while the remaining elements are the actual argument vector
 
301
to pass to the file. Normally <link
 
302
linkend="function-gobject--spawn-async"><function>gobject.spawn_async</function>()</link>
 
303
uses <parameter>argv</parameter>[0] as the file to execute, and passes all
 
304
of <parameter>argv</parameter> to the child.</simpara>
 
305
          </listitem>
 
306
        </varlistentry>
 
307
      </variablelist>
 
308
 
 
309
    </refsect2>
 
310
 
 
311
    <refsect2 id="gobject-type-constants">
 
312
      <title id="gobject-type-constants-title">GObject Built-in Type Constants</title>
 
313
 
 
314
      <para>The Built-in Type constants specify the pre-defined types used
 
315
by gobject.</para>
 
316
 
 
317
      <variablelist>
 
318
        <varlistentry>
 
319
          <term><literal>gobject.TYPE_INVALID</literal></term>
 
320
          <listitem>
 
321
            <simpara>An invalid type, used as error return value in some
 
322
            functions.</simpara>
 
323
          </listitem>
 
324
        </varlistentry>
 
325
        <varlistentry>
 
326
          <term><literal>gobject.TYPE_NONE</literal></term>
 
327
          <listitem>
 
328
            <simpara>A fundamental type indicating no type.</simpara>
 
329
          </listitem>
 
330
        </varlistentry>
 
331
        <varlistentry>
 
332
          <term><literal>gobject.TYPE_INTERFACE</literal></term>
 
333
          <listitem>
 
334
            <simpara>The fundamental type from which all interfaces are
 
335
            derived.</simpara>
 
336
          </listitem>
 
337
        </varlistentry>
 
338
        <varlistentry>
 
339
          <term><literal>gobject.TYPE_CHAR</literal></term>
 
340
          <listitem>
 
341
            <simpara>The fundamental type corresponding to a
 
342
            character. This maps to a string in Python.</simpara>
 
343
          </listitem>
 
344
        </varlistentry>
 
345
        <varlistentry>
 
346
          <term><literal>gobject.TYPE_UCHAR</literal></term>
 
347
          <listitem>
 
348
            <simpara>The fundamental type corresponding to an unsigned
 
349
            character. This maps to a string in Python.</simpara>
 
350
          </listitem>
 
351
        </varlistentry>
 
352
        <varlistentry>
 
353
          <term><literal>gobject.TYPE_BOOLEAN</literal></term>
 
354
          <listitem>
 
355
            <simpara>The fundamental type corresponding to a True or False
 
356
            value. This maps to an integer in Python.</simpara>
 
357
          </listitem>
 
358
        </varlistentry>
 
359
        <varlistentry>
 
360
          <term><literal>gobject.TYPE_INT</literal></term>
 
361
          <listitem>
 
362
            <simpara>The fundamental type corresponding to an
 
363
            integer. This maps to an integer in Python.</simpara>
 
364
          </listitem>
 
365
        </varlistentry>
 
366
        <varlistentry>
 
367
          <term><literal>gobject.TYPE_UINT</literal></term>
 
368
          <listitem>
 
369
            <simpara>he fundamental type corresponding to an unsigned
 
370
            integer. This maps to an integer in Python.</simpara>
 
371
          </listitem>
 
372
        </varlistentry>
 
373
        <varlistentry>
 
374
          <term><literal>gobject.TYPE_LONG</literal></term>
 
375
          <listitem>
 
376
            <simpara>The fundamental type corresponding to a long
 
377
            integer. This maps to an integer in Python.</simpara>
 
378
          </listitem>
 
379
        </varlistentry>
 
380
        <varlistentry>
 
381
          <term><literal>gobject.TYPE_ULONG</literal></term>
 
382
          <listitem>
 
383
            <simpara>The fundamental type corresponding to an unsigned
 
384
            integer. This maps to an integer in Python.</simpara>
 
385
          </listitem>
 
386
        </varlistentry>
 
387
        <varlistentry>
 
388
          <term><literal>gobject.TYPE_INT64</literal></term>
 
389
          <listitem>
 
390
            <simpara>The fundamental type corresponding to an long long
 
391
            integer. This maps to a long integer in Python.</simpara>
 
392
          </listitem>
 
393
        </varlistentry>
 
394
        <varlistentry>
 
395
          <term><literal>gobject.TYPE_UINT64</literal></term>
 
396
          <listitem>
 
397
            <simpara>The fundamental type corresponding to an unsigned long
 
398
            long integer. This maps to a long integer in Python.</simpara>
 
399
          </listitem>
 
400
        </varlistentry>
 
401
        <varlistentry>
 
402
          <term><literal>gobject.TYPE_ENUM</literal></term>
 
403
          <listitem>
 
404
            <simpara>The fundamental type corresponding to an enumeration
 
405
            type. This maps to an integer in Python.</simpara>
 
406
          </listitem>
 
407
        </varlistentry>
 
408
        <varlistentry>
 
409
          <term><literal>gobject.TYPE_FLAGS</literal></term>
 
410
          <listitem>
 
411
            <simpara>The fundamental type corresponding to a flag
 
412
            type. This maps to an integer in Python.</simpara>
 
413
          </listitem>
 
414
        </varlistentry>
 
415
        <varlistentry>
 
416
          <term><literal>gobject.TYPE_FLOAT</literal></term>
 
417
          <listitem>
 
418
            <simpara>The fundamental type corresponding to a floating point
 
419
            number. This maps to a float in Python.</simpara>
 
420
          </listitem>
 
421
        </varlistentry>
 
422
        <varlistentry>
 
423
          <term><literal>gobject.TYPE_DOUBLE</literal></term>
 
424
          <listitem>
 
425
            <simpara>The fundamental type corresponding to a double
 
426
            floating point number. This maps to a float in Python.</simpara>
 
427
          </listitem>
 
428
        </varlistentry>
 
429
        <varlistentry>
 
430
          <term><literal>gobject.TYPE_STRING</literal></term>
 
431
          <listitem>
 
432
            <simpara>The fundamental type corresponding to a string.</simpara>
 
433
          </listitem>
 
434
        </varlistentry>
 
435
        <varlistentry>
 
436
          <term><literal>gobject.TYPE_POINTER</literal></term>
 
437
          <listitem>
 
438
            <simpara>The fundamental type corresponding to a pointer to an
 
439
            anonymous type. This has no corresponding Python type.</simpara>
 
440
          </listitem>
 
441
        </varlistentry>
 
442
        <varlistentry>
 
443
          <term><literal>gobject.TYPE_BOXED</literal></term>
 
444
          <listitem>
 
445
            <simpara>The fundamental type corresponding to a boxed object
 
446
            type.</simpara>
 
447
          </listitem>
 
448
        </varlistentry>
 
449
        <varlistentry>
 
450
          <term><literal>gobject.TYPE_PARAM</literal></term>
 
451
          <listitem>
 
452
            <simpara>The fundamental type corresponding to a GParamSpec
 
453
            type.</simpara>
 
454
          </listitem>
 
455
        </varlistentry>
 
456
        <varlistentry>
 
457
          <term><literal>gobject.TYPE_OBJECT</literal></term>
 
458
          <listitem>
 
459
            <simpara>The fundamental type corresponding to a GObject
 
460
            type.</simpara>
 
461
          </listitem>
 
462
        </varlistentry>
 
463
        <varlistentry>
 
464
          <term><literal>gobject.TYPE_PYOBJECT</literal></term>
 
465
          <listitem>
 
466
            <simpara>The fundamental type corresponding to a Python Object
 
467
            type.</simpara>
 
468
          </listitem>
 
469
        </varlistentry>
 
470
      </variablelist>
 
471
 
 
472
    </refsect2>
 
473
 
 
474
    <refsect2 id="gobject-version-constants">
 
475
      <title id="gobject-version-constants-title">GObject Version Constants</title>
 
476
 
 
477
      <para>The Version constants specify the version of
 
478
<literal>GLIB</literal> used by PyGTK as a 3-tuple containing the major,
 
479
minor and patch release numbers.</para>
 
480
 
 
481
      <variablelist>
 
482
        <varlistentry>
 
483
          <term><literal>gobject.glib_version</literal></term>
 
484
          <listitem>
 
485
            <simpara>A 3-tuple containing (major, minor, patch) release
 
486
            numbers.</simpara>
 
487
          </listitem>
 
488
        </varlistentry>
 
489
      </variablelist>
 
490
 
 
491
    </refsect2>
 
492
 
 
493
  </refsect1>
 
494
 
 
495
</refentry>