4e569562ae4f7759236cc5fb871d4a4116707f4f
[platform/upstream/pygobject2.git] / docs / html / glib-constants.html
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>glib Constants</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="glib-class-reference.html" title="PyGlibClass Reference"><link rel="prev" href="glib-functions.html" title="glib Functions"><link rel="next" href="gobject-class-reference.html" title="PyGObject Class Reference"></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">glib Constants</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glib-functions.html">Prev</a> </td><th width="60%" align="center">PyGlibClass Reference</th><td width="20%" align="right"> <a accesskey="n" href="gobject-class-reference.html">Next</a></td></tr></table><hr></div><div class="refentry" title="glib Constants"><a name="glib-constants"></a><div class="titlepage"></div><div class="refnamediv"><h2>glib Constants</h2><p>glib Constants — the built-in constants of the glib module</p></div><div class="refsect1" title="Synopsis"><a name="id400400"></a><h2>Synopsis</h2><pre class="programlisting">
2 <a class="xref" href="glib-constants.html#glib-io-condition-constants" title="Glib IO Condition Constants">Glib IO Condition Constants</a>
3 <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a>
4 <a class="xref" href="glib-constants.html#glib-spawn-flag-constants" title="Glib Spawn Flag Constants">Glib Spawn Flag Constants</a>
5 <a class="xref" href="glib-constants.html#glib-user-directory-constants" title="Glib User Directory Constants">Glib User Directory Constants</a>
6 <a class="xref" href="glib-constants.html#glib-version-constants" title="Glib Version Constants">Glib Version Constants</a>
7 </pre></div><div class="refsect1" title="Description"><a name="glib-constants-description"></a><h2>Description</h2><div class="refsect2" title="Glib IO Condition Constants"><a name="glib-io-condition-constants"></a><h3>Glib IO Condition Constants</h3><p>The IO Condition constants are a set of bit-flags that specify a
8 condition to watch for on an event source.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">glib.IO_IN</code></span></p></td><td>There is data to read</td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_OUT</code></span></p></td><td>Data can be written (without blocking).</td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_PRI</code></span></p></td><td>There is urgent data to read.</td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_ERR</code></span></p></td><td>Error condition.</td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_HUP</code></span></p></td><td>Hung up (the connection has been broken, usually for
9             pipes and sockets).</td></tr><tr><td><p><span class="term"><code class="literal">glib.IO_NVAL</code></span></p></td><td>Invalid request. The file descriptor is not
10             open.</td></tr></tbody></table></div><div class="refsect2" title="Glib Priority Constants"><a name="glib-priority-constants"></a><h3>Glib Priority Constants</h3><p>The Priority constants specify </p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">glib.PRIORITY_HIGH</code></span></p></td><td>Use this for high priority event sources.</td></tr><tr><td><p><span class="term"><code class="literal">glib.PRIORITY_DEFAULT</code></span></p></td><td>Use this for default priority event sources.  This
11             priority is used when adding timeout functions with the <a class="link" href="glib-functions.html#function-glib--timeout-add" title="glib.timeout_add"><code class="function">glib.timeout_add</code>()</a>
12             function. This priority is also used for events from the X
13             server.</td></tr><tr><td><p><span class="term"><code class="literal">glib.PRIORITY_HIGH_IDLE</code></span></p></td><td>Use this for high priority idle functions. For example,
14             glib.PRIORITY_HIGH_IDLE + 10 is used for resizing operations;
15             and, glib.PRIORITY_HIGH_IDLE + 20, for redrawing
16             operations. (This is done to ensure that any pending resizes are
17             processed before any pending redraws, so that widgets are not
18             redrawn twice unnecessarily.)</td></tr><tr><td><p><span class="term"><code class="literal">glib.PRIORITY_DEFAULT_IDLE</code></span></p></td><td>Use this for default priority idle functions. This
19             priority is used when adding idle functions with the <a class="link" href="glib-functions.html#function-glib--idle-add" title="glib.idle_add"><code class="function">glib.idle_add</code>()</a>
20             function.</td></tr><tr><td><p><span class="term"><code class="literal">glib.PRIORITY_LOW</code></span></p></td><td>Use this for very low priority background
21             tasks.</td></tr></tbody></table></div><div class="refsect2" title="Glib Spawn Flag Constants"><a name="glib-spawn-flag-constants"></a><h3>Glib Spawn Flag Constants</h3><p>The Spawn Flag constants are a set of bit-flags that can be
22 passed to the <a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async"><code class="function">glib.spawn_async</code>()</a>
23 function.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">glib.SPAWN_LEAVE_DESCRIPTORS_OPEN</code></span></p></td><td>the parent's open file descriptors will be inherited by
24 the child; otherwise all descriptors except stdin/stdout/stderr will be
25 closed before calling <code class="function">exec</code>() in the child.</td></tr><tr><td><p><span class="term"><code class="literal">glib.SPAWN_DO_NOT_REAP_CHILD</code></span></p></td><td>the child will not be automatically reaped; you must
26 call <code class="function">waitpid</code>() or handle <code class="literal">SIGCHLD</code>
27 yourself, or the child will become a zombie.</td></tr><tr><td><p><span class="term"><code class="literal">glib.SPAWN_SEARCH_PATH</code></span></p></td><td><em class="parameter"><code>argv</code></em>[0] need not be an absolute
28 path, it will be looked for in the user's <code class="envar">PATH</code>.</td></tr><tr><td><p><span class="term"><code class="literal">glib.SPAWN_STDOUT_TO_DEV_NULL</code></span></p></td><td>the child's standard output will be discarded, instead
29 of going to the same location as the parent's standard output.</td></tr><tr><td><p><span class="term"><code class="literal">glib.SPAWN_STDERR_TO_DEV_NULL</code></span></p></td><td>the child's standard error will be discarded.</td></tr><tr><td><p><span class="term"><code class="literal">glib.SPAWN_CHILD_INHERITS_STDIN</code></span></p></td><td>the child will inherit the parent's standard input (by
30 default, the child's standard input is attached to /dev/null).</td></tr><tr><td><p><span class="term"><code class="literal">glib.SPAWN_FILE_AND_ARGV_ZERO</code></span></p></td><td>the first element of <em class="parameter"><code>argv</code></em> is the
31 file to execute, while the remaining elements are the actual argument vector
32 to pass to the file. Normally <a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async"><code class="function">glib.spawn_async</code>()</a>
33 uses <em class="parameter"><code>argv</code></em>[0] as the file to execute, and passes all
34 of <em class="parameter"><code>argv</code></em> to the child.</td></tr></tbody></table></div><div class="refsect2" title="Glib User Directory Constants"><a name="glib-user-directory-constants"></a><h3>Glib User Directory Constants</h3><p>The User Directory constants are integer values that are currently used only as arguments to
35         <a class="link" href="glib-functions.html#function-glib--get-user-special-dir" title="glib.get_user_special_dir"><code class="function">glib.get_user_special_dir</code>()</a>
36         function.  See function documentation for details.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_DESKTOP</code></span></p></td><td>the user's Desktop directory</td></tr><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_DOCUMENTS</code></span></p></td><td>the user's Documents directory</td></tr><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_DOWNLOAD</code></span></p></td><td>the user's Downloads directory</td></tr><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_MUSIC</code></span></p></td><td>the user's Music directory</td></tr><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_PICTURES</code></span></p></td><td>the user's Pictures directory</td></tr><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_PUBLIC_SHARE</code></span></p></td><td>the user's shared directory</td></tr><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_TEMPLATES</code></span></p></td><td>the user's Templates directory</td></tr><tr><td><p><span class="term"><code class="literal">glib.USER_DIRECTORY_VIDEOS</code></span></p></td><td>the user's Movies directory</td></tr></tbody></table></div><div class="refsect2" title="Glib Version Constants"><a name="glib-version-constants"></a><h3>Glib Version Constants</h3><p>The Version constants specify the version of
37 <code class="literal">Glib</code> used by PyGObject as a 3-tuple containing the major,
38 minor and patch release numbers.</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">glib.glib_version</code></span></p></td><td>A 3-tuple containing (major, minor, patch) release
39             numbers of glib.</td></tr><tr><td><p><span class="term"><code class="literal">glib.pyglib_version</code></span></p></td><td>A 3-tuple containing (major, minor, patch) release
40             numbers of the python bindings.</td></tr></tbody></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="glib-functions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="glib-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gobject-class-reference.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glib Functions </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> PyGObject Class Reference</td></tr></table></div></body></html>