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="gobject-constants">
7
<refname>gobject Constants</refname>
8
<refpurpose>the built-in constants of the gobject module</refpurpose>
12
<title>Synopsis</title>
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>
26
<refsect1 id="gobject-constants-description">
27
<title>Description</title>
29
<refsect2 id="gobject-io-condition-constants">
30
<title id="gobject-io-condition-constants-title">GObject IO Condition Constants</title>
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>
37
<term><literal>gobject.IO_IN</literal></term>
39
<simpara>There is data to read</simpara>
43
<term><literal>gobject.IO_OUT</literal></term>
45
<simpara>Data can be written (without blocking).</simpara>
49
<term><literal>gobject.IO_PRI</literal></term>
51
<simpara>There is urgent data to read.</simpara>
55
<term><literal>gobject.IO_ERR</literal></term>
57
<simpara>Error condition.</simpara>
61
<term><literal>gobject.IO_HUP</literal></term>
63
<simpara>Hung up (the connection has been broken, usually for
64
pipes and sockets).</simpara>
68
<term><literal>gobject.IO_NVAL</literal></term>
70
<simpara>Invalid request. The file descriptor is not
78
<refsect2 id="gobject-param-constants">
79
<title id="gobject-param-constants-title">GObject Param Flag Constants</title>
81
<para>The Param Flag constants are a set of bit-flags that specify
82
certain aspects of parameters that can be configured.</para>
86
<term><literal>gobject.PARAM_READABLE</literal></term>
88
<simpara>The parameter is readable</simpara>
92
<term><literal>gobject.PARAM_WRITABLE</literal></term>
94
<simpara>The parameter is writable</simpara>
98
<term><literal>gobject.PARAM_CONSTRUCT</literal></term>
100
<simpara>The parameter will be set upon object
101
construction</simpara>
105
<term><literal>gobject.PARAM_CONSTRUCT_ONLY</literal></term>
107
<simpara>The parameter will only be set upon object
108
construction</simpara>
112
<term><literal>gobject.PARAM_LAX_VALIDATION</literal></term>
114
<simpara>Upon parameter conversion strict validation is not
122
<refsect2 id="gobject-priority-constants">
123
<title id="gobject-priority-constants-title">GObject Priority Constants</title>
125
<para>The Priority constants specify </para>
129
<term><literal>gobject.PRIORITY_HIGH</literal></term>
131
<simpara>Use this for high priority event sources.</simpara>
135
<term><literal>gobject.PRIORITY_DEFAULT</literal></term>
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
145
<term><literal>gobject.PRIORITY_HIGH_IDLE</literal></term>
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>
156
<term><literal>gobject.PRIORITY_DEFAULT_IDLE</literal></term>
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>
165
<term><literal>gobject.PRIORITY_LOW</literal></term>
167
<simpara>Use this for very low priority background
175
<refsect2 id="gobject-signal-constants">
176
<title id="gobject-signal-constants-title">GObject Signal Flag Constants</title>
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
185
<term><literal>gobject.SIGNAL_RUN_FIRST</literal></term>
187
<simpara>Invoke the object method handler in the first emission
192
<term><literal>gobject.SIGNAL_RUN_LAST</literal></term>
194
<simpara>Invoke the object method handler in the third emission
199
<term><literal>gobject.SIGNAL_RUN_CLEANUP</literal></term>
201
<simpara>Invoke the object method handler in the last emission
206
<term><literal>gobject.SIGNAL_NO_RECURSE</literal></term>
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
215
<term><literal>gobject.SIGNAL_DETAILED</literal></term>
217
<simpara>This signal supports "::detail" appendices to the
218
signal name upon handler connections and emissions.</simpara>
222
<term><literal>gobject.SIGNAL_ACTION</literal></term>
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>
234
<term><literal>gobject.SIGNAL_NO_HOOKS</literal></term>
236
<simpara>No emissions hooks are supported for this
244
<refsect2 id="gobject-spawn-flag-constants">
245
<title id="gobject-spawn-flag-constants-title">GObject Spawn Flag Constants</title>
247
<para>The Spawn Flag constants are a set of bit-flags that can be
249
linkend="function-gobject--spawn-async"><function>gobject.spawn_async</function>()</link>
254
<term><literal>gobject.SPAWN_LEAVE_DESCRIPTORS_OPEN</literal></term>
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>
262
<term><literal>gobject.SPAWN_DO_NOT_REAP_CHILD</literal></term>
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>
270
<term><literal>gobject.SPAWN_SEARCH_PATH</literal></term>
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>
277
<term><literal>gobject.SPAWN_STDOUT_TO_DEV_NULL</literal></term>
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>
284
<term><literal>gobject.SPAWN_STDERR_TO_DEV_NULL</literal></term>
286
<simpara>the child's standard error will be discarded.</simpara>
290
<term><literal>gobject.SPAWN_CHILD_INHERITS_STDIN</literal></term>
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>
297
<term><literal>gobject.SPAWN_FILE_AND_ARGV_ZERO</literal></term>
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>
311
<refsect2 id="gobject-type-constants">
312
<title id="gobject-type-constants-title">GObject Built-in Type Constants</title>
314
<para>The Built-in Type constants specify the pre-defined types used
319
<term><literal>gobject.TYPE_INVALID</literal></term>
321
<simpara>An invalid type, used as error return value in some
326
<term><literal>gobject.TYPE_NONE</literal></term>
328
<simpara>A fundamental type indicating no type.</simpara>
332
<term><literal>gobject.TYPE_INTERFACE</literal></term>
334
<simpara>The fundamental type from which all interfaces are
339
<term><literal>gobject.TYPE_CHAR</literal></term>
341
<simpara>The fundamental type corresponding to a
342
character. This maps to a string in Python.</simpara>
346
<term><literal>gobject.TYPE_UCHAR</literal></term>
348
<simpara>The fundamental type corresponding to an unsigned
349
character. This maps to a string in Python.</simpara>
353
<term><literal>gobject.TYPE_BOOLEAN</literal></term>
355
<simpara>The fundamental type corresponding to a True or False
356
value. This maps to an integer in Python.</simpara>
360
<term><literal>gobject.TYPE_INT</literal></term>
362
<simpara>The fundamental type corresponding to an
363
integer. This maps to an integer in Python.</simpara>
367
<term><literal>gobject.TYPE_UINT</literal></term>
369
<simpara>he fundamental type corresponding to an unsigned
370
integer. This maps to an integer in Python.</simpara>
374
<term><literal>gobject.TYPE_LONG</literal></term>
376
<simpara>The fundamental type corresponding to a long
377
integer. This maps to an integer in Python.</simpara>
381
<term><literal>gobject.TYPE_ULONG</literal></term>
383
<simpara>The fundamental type corresponding to an unsigned
384
integer. This maps to an integer in Python.</simpara>
388
<term><literal>gobject.TYPE_INT64</literal></term>
390
<simpara>The fundamental type corresponding to an long long
391
integer. This maps to a long integer in Python.</simpara>
395
<term><literal>gobject.TYPE_UINT64</literal></term>
397
<simpara>The fundamental type corresponding to an unsigned long
398
long integer. This maps to a long integer in Python.</simpara>
402
<term><literal>gobject.TYPE_ENUM</literal></term>
404
<simpara>The fundamental type corresponding to an enumeration
405
type. This maps to an integer in Python.</simpara>
409
<term><literal>gobject.TYPE_FLAGS</literal></term>
411
<simpara>The fundamental type corresponding to a flag
412
type. This maps to an integer in Python.</simpara>
416
<term><literal>gobject.TYPE_FLOAT</literal></term>
418
<simpara>The fundamental type corresponding to a floating point
419
number. This maps to a float in Python.</simpara>
423
<term><literal>gobject.TYPE_DOUBLE</literal></term>
425
<simpara>The fundamental type corresponding to a double
426
floating point number. This maps to a float in Python.</simpara>
430
<term><literal>gobject.TYPE_STRING</literal></term>
432
<simpara>The fundamental type corresponding to a string.</simpara>
436
<term><literal>gobject.TYPE_POINTER</literal></term>
438
<simpara>The fundamental type corresponding to a pointer to an
439
anonymous type. This has no corresponding Python type.</simpara>
443
<term><literal>gobject.TYPE_BOXED</literal></term>
445
<simpara>The fundamental type corresponding to a boxed object
450
<term><literal>gobject.TYPE_PARAM</literal></term>
452
<simpara>The fundamental type corresponding to a GParamSpec
457
<term><literal>gobject.TYPE_OBJECT</literal></term>
459
<simpara>The fundamental type corresponding to a GObject
464
<term><literal>gobject.TYPE_PYOBJECT</literal></term>
466
<simpara>The fundamental type corresponding to a Python Object
474
<refsect2 id="gobject-version-constants">
475
<title id="gobject-version-constants-title">GObject Version Constants</title>
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>
483
<term><literal>gobject.glib_version</literal></term>
485
<simpara>A 3-tuple containing (major, minor, patch) release