Imported Upstream version 2.90.1
[platform/upstream/pygobject2.git] / docs / html / glib-functions.html
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>glib Functions</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="class-glibmainloop.html" title="glib.MainLoop"><link rel="next" href="glib-constants.html" title="glib Constants"></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 Functions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-glibmainloop.html">Prev</a> </td><th width="60%" align="center">PyGlibClass Reference</th><td width="20%" align="right"> <a accesskey="n" href="glib-constants.html">Next</a></td></tr></table><hr></div><div class="refentry" title="glib Functions"><a name="glib-functions"></a><div class="titlepage"></div><div class="refnamediv"><h2>glib Functions</h2><p>glib Functions — miscellaneous functions</p></div><div class="refsect1" title="Synopsis"><a name="id532546"></a><h2>Synopsis</h2><pre class="programlisting">
2 <code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--idle-add" title="glib.idle_add">glib.idle_add</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--timeout-add" title="glib.timeout_add">glib.timeout_add</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>interval</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--timeout-add-seconds" title="glib.timeout_add_seconds">glib.timeout_add_seconds</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>interval</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--io-add-watch" title="glib.io_add_watch">glib.io_add_watch</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>fd</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>condition</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--source-remove" title="glib.source_remove">glib.source_remove</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>tag</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--main-context-default" title="glib.main_context_default">glib.main_context_default</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--markup-escape-text" title="glib.markup_escape_text">glib.markup_escape_text</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>text</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--child-watch-add" title="glib.child_watch_add">glib.child_watch_add</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pid</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>function</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async">glib.spawn_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>argv</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>envp</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>working_directory</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_setup</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>standard_input</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>standard_output</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>standard_error</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--get-current-time" title="glib.get_current_time">glib.get_current_time</a></span>()</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--get-user-cache-dir" title="glib.get_user_cache_dir">glib.get_user_cache_dir</a></span>()</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--get-user-config-dir" title="glib.get_user_config_dir">glib.get_user_config_dir</a></span>()</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--get-user-data-dir" title="glib.get_user_data_dir">glib.get_user_data_dir</a></span>()</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--get-user-special-dir" title="glib.get_user_special_dir">glib.get_user_special_dir</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>directory</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--main-depth" title="glib.main_depth">glib.main_depth</a></span>()</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--threads-init" title="glib.threads_init">glib.threads_init</a></span>()</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--filename-display-name" title="glib.filename_display_name">glib.filename_display_name</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>filename</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--filename-display-basename" title="glib.filename_display_basename">glib.filename_display_basename</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>filename</code></em></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="glib-functions.html#function-glib--filename-from-utf8" title="glib.filename_from_utf8">glib.filename_from_utf8</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>utf8string</code></em></span></span>)</code></pre></div><div class="refsect1" title="Description"><a name="id524851"></a><h2>Description</h2><p>These functions are part of the <code class="literal">PyGObject</code> glib
3 module but are not directly associated with a specific class.</p></div><div class="refsect1" title="Functions"><a name="id516831"></a><h2>Functions</h2><div class="refsect2" title="glib.idle_add"><a name="function-glib--idle-add"></a><h3>glib.idle_add</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.idle_add</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a function to call when
4 <code class="literal">PyGTK</code> is idle</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>optionals arguments to be passed to
5 <em class="parameter"><code>callback</code></em></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer ID</td></tr></tbody></table><p>The <code class="function">glib.idle_add</code>() function adds a
6 function (specified by <em class="parameter"><code>callback</code></em>) to be called
7 whenever there are no higher priority events pending to the default main
8 loop. The function is given the default idle priority,
9 <code class="literal">glib.PRIORITY_DEFAULT_IDLE</code>. Additional arguments to
10 pass to <em class="parameter"><code>callback</code></em> can be specified after
11 <em class="parameter"><code>callback</code></em>. The idle priority can be specified as a
12 keyword-value pair with the keyword "priority". If
13 <em class="parameter"><code>callback</code></em> returns <code class="literal">False</code> it is
14 automatically removed from the list of event sources and will not be called
15 again.</p></div><div class="refsect2" title="glib.timeout_add"><a name="function-glib--timeout-add"></a><h3>glib.timeout_add</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.timeout_add</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>interval</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td><td>the time between calls to the function, in
16 milliseconds </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>the function to call</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>zero or more arguments that will be passed to
17 <em class="parameter"><code>callback</code></em></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer ID of the event
18 source</td></tr></tbody></table><p>The <code class="function">glib.timeout_add</code>() function sets a
19 function (specified by <em class="parameter"><code>callback</code></em>) to be called at
20 regular intervals (specified by <em class="parameter"><code>interval</code></em>, with the
21 default priority, <code class="literal">glib.PRIORITY_DEFAULT</code>. Additional
22 arguments to pass to <em class="parameter"><code>callback</code></em> can be specified after
23 <em class="parameter"><code>callback</code></em>. The idle priority may be specified as a
24 keyword-value pair with the keyword "priority".</p><p>The function is called repeatedly until it returns
25 <code class="literal">False</code>, at which point the timeout is automatically
26 destroyed and the function will not be called again. The first call to the
27 function will be at the end of the first interval. Note that timeout
28 functions may be delayed, due to the processing of other event sources. Thus
29 they should not be relied on for precise timing. After each call to the
30 timeout function, the time of the next timeout is recalculated based on the
31 current time and the given interval (it does not try to 'catch up' time lost
32 in delays).</p></div><div class="refsect2" title="glib.timeout_add_seconds"><a name="function-glib--timeout-add-seconds"></a><h3>glib.timeout_add_seconds</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.timeout_add_seconds</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>interval</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>interval</code></em> :</span></p></td><td>the time between calls to the function, in
33 seconds </td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>the function to call</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>zero or more arguments that will be passed to
34 <em class="parameter"><code>callback</code></em></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer ID of the event
35 source</td></tr></tbody></table><p>The <code class="function">glib.timeout_add_seconds</code>() is similar to
36         <code class="function">glib.timeout_add</code>() except
37         that <em class="parameter"><code>interval</code></em> must be specified in seconds, not
38         milliseconds, and the function should cause less CPU wakeups, which is important
39         for laptops' batteries.</p><p>Unlike <code class="function">glib.timeout_add</code>(), this function operates at
40         whole second granularity.  The initial starting point of the timer is determined
41         by the implementation and the implementation is expected to group multiple timers
42         together so that they fire all at the same time.  To allow this grouping, the
43         interval to the first timer is rounded and can deviate up to one second from the
44         specified interval.  Subsequent timer iterations will generally run at the
45         specified interval.</p><p>Note that timeout functions may be delayed, due to the processing of other
46         event sources.  Thus they should not be relied on for precise timing.  After each
47         call to the timeout function, the time of the next timeout is recalculated based
48         on the current time and the given interval.</p><p>The grouping of timers to fire at the same time results in a more power and
49         CPU efficient behavior so if your timer is in multiples of seconds and you don't
50         require the first timer exactly one second from now, the use of
51         <code class="function">glib.timeout_add_seconds</code>() is preferred
52         over <code class="function">glib.timeout_add</code>().</p></div><div class="refsect2" title="glib.io_add_watch"><a name="function-glib--io-add-watch"></a><h3>glib.io_add_watch</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.io_add_watch</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>fd</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>condition</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>callback</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>fd</code></em> :</span></p></td><td>a Python file object or an integer file
53 descriptor ID</td></tr><tr><td><p><span class="term"><em class="parameter"><code>condition</code></em> :</span></p></td><td>a condition mask</td></tr><tr><td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td><td>a function to call</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional arguments to pass to
54 <em class="parameter"><code>callback</code></em></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an integer ID of the event source</td></tr></tbody></table><p>The <code class="function">glib.io_add_watch</code>() function
55 arranges for the file (specified by <em class="parameter"><code>fd</code></em>) to be
56 monitored by the main loop for the specified
57 <em class="parameter"><code>condition</code></em>. <em class="parameter"><code>fd</code></em> may be a Python
58 file object or an integer file descriptor. The value of condition is a
59 combination of:</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
60 pipes and sockets).</td></tr></tbody></table><p>Additional arguments to pass to <em class="parameter"><code>callback</code></em>
61 can be specified after <em class="parameter"><code>callback</code></em>. The idle priority
62 may be specified as a keyword-value pair with the keyword "priority". The
63 signature of the callback function is:</p><pre class="programlisting">
64   def callback(source, cb_condition, ...)
65 </pre><p>where <em class="parameter"><code>source</code></em> is
66 <em class="parameter"><code>fd</code></em>, the file descriptor;
67 <em class="parameter"><code>cb_condition</code></em> is the condition that triggered the
68 signal; and, <em class="parameter"><code>...</code></em> are the zero or more arguments that
69 were passed to the <code class="function">glib.io_add_watch</code>()
70 function.</p><p>If the callback function returns <code class="literal">False</code> it
71 will be automatically removed from the list of event sources and will not be
72 called again. If it returns <code class="literal">True</code> it will be called again
73 when the condition is matched.</p></div><div class="refsect2" title="glib.source_remove"><a name="function-glib--source-remove"></a><h3>glib.source_remove</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.source_remove</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>tag</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>tag</code></em> :</span></p></td><td>an integer ID</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the event source was
74 removed</td></tr></tbody></table><p>The <code class="function">glib.source_remove</code>() function
75 removes the event source specified by tag (as returned by the <a class="link" href="glib-functions.html#function-glib--idle-add" title="glib.idle_add"><code class="function">glib.idle_add</code>()</a>, 
76 <a class="link" href="glib-functions.html#function-glib--timeout-add" title="glib.timeout_add"><code class="function">glib.timeout_add</code></a>() 
77 and <a class="link" href="glib-functions.html#function-glib--io-add-watch" title="glib.io_add_watch"><code class="function">glib.io_add_watch</code>()</a> 
78 functions)</p></div><div class="refsect2" title="glib.main_context_default"><a name="function-glib--main-context-default"></a><h3>glib.main_context_default</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.main_context_default</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the default glib.MainContext
79 object</td></tr></tbody></table><p>The <code class="function">glib.main_context_default</code>() function
80 returns the default glib.MainContext object.</p></div><div class="refsect2" title="glib.markup_escape_text"><a name="function-glib--markup-escape-text"></a><h3>glib.markup_escape_text</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.markup_escape_text</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>text</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td><td>the UTF-8 string to be
81 escaped</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the escaped text</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.8 and above.</p></div><p>The <code class="function">glib.markup_escape_text</code>() function
82 escapes the string specified by <em class="parameter"><code>text</code></em> so that the
83 markup parser will parse it verbatim. Less than, greater than, ampersand,
84 etc. are replaced with the corresponding entities. This function would
85 typically be used when writing out a file to be parsed with the markup
86 parser.</p><p>Note that this function doesn't protect whitespace and line
87 endings from being processed according to the XML rules for normalization of
88 line endings and attribute values.</p></div><div class="refsect2" title="glib.child_watch_add"><a name="function-glib--child-watch-add"></a><h3>glib.child_watch_add</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.child_watch_add</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pid</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>function</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>data</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>priority</code></strong></span><span class="initializer">=glib.PRIORITY_DEFAULT</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>pid</code></strong> :</span></p></td><td>process id of a child process to watch</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>function</code></strong> :</span></p></td><td>the function to call</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>data</code></strong> :</span></p></td><td>the optional data to pass to
89 <em class="parameter"><code>function</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>priority</code></strong> :</span></p></td><td>the priority of the idle source - one of the
90 <a class="xref" href="glib-constants.html#glib-priority-constants" title="Glib Priority Constants">Glib Priority Constants</a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the id of event source.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.6 and above.</p></div><p>The <code class="function">glib.child_watch_add</code>() function sets
91 the function specified by <em class="parameter"><code>function</code></em> to be called with
92 the user data specified by <em class="parameter"><code>data</code></em> when the child
93 indicated by <em class="parameter"><code>pid</code></em> exits. The signature for the
94 callback is:</p><pre class="programlisting">
95 def callback(pid, condition, user_data)
96 </pre><p>where <em class="parameter"><code>pid</code></em> is is the child process id,
97 <em class="parameter"><code>condition</code></em> is the status information about the child
98 process and <em class="parameter"><code>user_data</code></em> is <em class="parameter"><code>data</code></em>
99 PyGTK supports only a single callback per process id.</p></div><div class="refsect2" title="glib.spawn_async"><a name="function-glib--spawn-async"></a><h3>glib.spawn_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.spawn_async</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>argv</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>envp</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>working_directory</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>child_setup</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>standard_input</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>standard_output</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>standard_error</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>argv</code></strong> :</span></p></td><td>a sequence of strings containing the arguments
100 of the child process</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>envp</code></strong> :</span></p></td><td>the child's environment or
101 <code class="literal">None</code> to inherit the parent's
102 environment.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>working_directory</code></strong> :</span></p></td><td>the child's current working directory, or
103 <code class="literal">None</code> to inherit parent's</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>flags from the <a class="xref" href="glib-constants.html#glib-spawn-flag-constants" title="Glib Spawn Flag Constants">Glib Spawn Flag Constants</a>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>child_setup</code></strong> :</span></p></td><td>a function to run in the child just before
104 calling <code class="function">exec</code>()</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>the user data for the
105 <em class="parameter"><code>child_setup</code></em> function</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>standard_input</code></strong> :</span></p></td><td>if <code class="literal">True</code> return the file
106 descriptor for the child's stdin</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>standard_output</code></strong> :</span></p></td><td>if <code class="literal">True</code> return the file
107 descriptor for the child's stdout</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>standard_error</code></strong> :</span></p></td><td>if <code class="literal">True</code> return the file
108 descriptor for the child's stderr</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a 4-tuple containing the child's process id and
109 the stdin, stdout and stderr file descriptor integers.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.6 and above.</p></div><p>The <code class="function">glib.spawn_async</code>() function executes
110 a child program asynchronously (your program will not block waiting for the
111 child to exit). The child program is specified by the only argument that
112 must be provided, <em class="parameter"><code>argv</code></em>. <em class="parameter"><code>argv</code></em>
113 should be a sequence of strings, to be passed as the argument vector for the
114 child. The first string in <em class="parameter"><code>argv</code></em> is of course the name
115 of the program to execute. By default, the name of the program must be a
116 full path; the <code class="envar">PATH</code> shell variable will only be searched if
117 you pass the <code class="literal">glib.SPAWN_SEARCH_PATH</code> flag in
118 <em class="parameter"><code>flags</code></em>. The function returns a 4-tuple containing the
119 child's process id and the file descriptors for the child's stdin, stdout
120 and stderr. The stdin, stdout and stderr file descriptors are returned only
121 ofthe corresponding <em class="parameter"><code>standard_input</code></em>,
122 <em class="parameter"><code>standard_output</code></em> or
123 <em class="parameter"><code>standard_error</code></em> params are
124 <code class="literal">True</code>.</p><p>On Windows, the low-level child process creation API
125 (<code class="function">CreateProcess</code>()) doesn't use argument vectors, but a
126 command line. The C runtime library's <code class="function">spawn*</code>() family
127 of functions (which <a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async"><code class="function">glib.spawn_async</code>()</a>
128 eventually calls) paste the argument vector elements into a command line,
129 and the C runtime startup code does a corresponding reconstruction of an
130 argument vector from the command line, to be passed to
131 <code class="function">main</code>(). Complications arise when you have argument
132 vector elements that contain spaces of double quotes. The
133 <code class="function">spawn*</code>() functions don't do any quoting or escaping,
134 but on the other hand the startup code does do unquoting and unescaping in
135 order to enable receiving arguments with embedded spaces or double
136 quotes. To work around this asymmetry, the <a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async"><code class="function">glib.spawn_async</code>()</a>
137 function will do quoting and escaping on argument vector elements that need
138 it before calling the C runtime <code class="function">spawn</code>()
139 function.</p><p><em class="parameter"><code>envp</code></em> is a sequence of strings, where each
140  string has the form <code class="literal">KEY=VALUE</code>. This will become the
141  child's environment. If <em class="parameter"><code>envp</code></em> is
142  <em class="parameter"><code>None</code></em> or not specified, the child inherits its
143  parent's environment.</p><p><em class="parameter"><code>flags</code></em> should be the bitwise
144 <code class="literal">OR</code> of the <a class="xref" href="glib-constants.html#glib-spawn-flag-constants" title="Glib Spawn Flag Constants">Glib Spawn Flag Constants</a> you want to affect the
145 function's behaviour. The <code class="literal">glib.SPAWN_DO_NOT_REAP_CHILD</code>
146 flag means that the child will not automatically be reaped; you must use a
147 GChildWatch source to be notified about the death of the child
148 process. Eventually you must call g_spawn_close_pid() on the child_pid, in
149 order to free resources which may be associated with the child process. (On
150 Unix, using a GChildWatch source is equivalent to calling
151 <code class="function">waitpid</code>() or handling the <code class="literal">SIGCHLD</code>
152 signal manually. On Windows, calling g_spawn_close_pid() is equivalent to
153 calling <code class="function">CloseHandle</code>() on the process handle
154 returned).</p><p><code class="literal">glib.SPAWN_LEAVE_DESCRIPTORS_OPEN</code> means
155 that the parent's open file descriptors will be inherited by the child;
156 otherwise all descriptors except stdin/stdout/stderr will be closed before
157 calling <code class="function">exec</code>() in the
158 child. <code class="literal">glib.SPAWN_SEARCH_PATH</code> means that
159 <em class="parameter"><code>argv</code></em>[0] need not be an absolute path, it will be
160 looked for in the user's
161 <code class="envar">PATH</code>. <code class="literal">glib.SPAWN_STDOUT_TO_DEV_NULL</code>
162 means that the child's standard output will be discarded, instead of going
163 to the same location as the parent's standard output. If you use this flag,
164 <em class="parameter"><code>standard_output</code></em> must be
165 <code class="literal">None</code>. <code class="literal">glib.SPAWN_STDERR_TO_DEV_NULL</code>
166 means that the child's standard error will be discarded, instead of going to
167 the same location as the parent's standard error. If you use this flag,
168 <em class="parameter"><code>standard_error</code></em> must be
169 <code class="literal">None</code>. <code class="literal">glib.SPAWN_CHILD_INHERITS_STDIN</code>
170 means that the child will inherit the parent's standard input (by default,
171 the child's standard input is attached to
172 <code class="filename">/dev/null</code>). If you use this flag,
173 <em class="parameter"><code>standard_input</code></em> must be
174 <code class="literal">None</code>. <code class="literal">glib.SPAWN_FILE_AND_ARGV_ZERO</code>
175 means that the first element of <em class="parameter"><code>argv</code></em> is the file to
176 execute, while the remaining elements are the actual argument vector to pass
177 to the file. Normally the <a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async"><code class="function">glib.spawn_async</code>()</a>
178 function uses <em class="parameter"><code>argv</code></em>[0] as the file to execute, and
179 passes all of <em class="parameter"><code>argv</code></em> to the child.</p><p><em class="parameter"><code>child_setup</code></em> and
180 <em class="parameter"><code>user_data</code></em> are a function and user data. On POSIX
181 platforms, the function is called in the child after GLib has performed all
182 the setup it plans to perform (including creating pipes, closing file
183 descriptors, etc.) but before calling <code class="function">exec</code>(). That is,
184 <em class="parameter"><code>child_setup</code></em> is called just before calling
185 <code class="function">exec</code>() in the child. Obviously actions taken in this
186 function will only affect the child, not the parent. On Windows, there is no
187 separate <code class="function">fork</code>() and <code class="function">exec</code>()
188 functionality. Child processes are created and run right away with one API
189 call,
190 <code class="function">CreateProcess</code>(). <em class="parameter"><code>child_setup</code></em> is
191 called in the parent process just before creating the child process. You
192 should carefully consider what you do in <em class="parameter"><code>child_setup</code></em>
193 if you intend your software to be portable to Windows.</p><p>The returned child process id can be used to send signals to the
194 child, or to wait for the child if you specified the
195 <code class="literal">glib.SPAWN_DO_NOT_REAP_CHILD</code> flag.  On Windows, child
196 pid will be returned only if you specified the
197 <code class="literal">glib.SPAWN_DO_NOT_REAP_CHILD</code> flag.</p><p>The caller of the <a class="link" href="glib-functions.html#function-glib--spawn-async" title="glib.spawn_async"><code class="function">glib.spawn_async</code>()</a>
198 must close any returned file descriptors when they are no longer in
199 use.</p><p>If <em class="parameter"><code>standard_input</code></em> is
200 <code class="literal">None</code>, the child's standard input is attached to
201 <code class="filename">/dev/null</code> unless
202 <code class="literal">glib.SPAWN_CHILD_INHERITS_STDIN</code> is set.</p><p>If <em class="parameter"><code>standard_error</code></em> is
203 <code class="literal">None</code>, the child's standard error goes to the same
204 location as the parent's standard error unless
205 <code class="literal">glib.SPAWN_STDERR_TO_DEV_NULL</code> is set.</p><p>If <em class="parameter"><code>standard_output</code></em> is
206 <code class="literal">None</code>, the child's standard output goes to the same
207 location as the parent's standard output unless
208 <code class="literal">glib.SPAWN_STDOUT_TO_DEV_NULL</code> is set.</p><p>If an error occurs, the glib.GError exception will be
209 raised.</p></div><div class="refsect2" title="glib.get_current_time"><a name="function-glib--get-current-time"></a><h3>glib.get_current_time</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.get_current_time</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the current time as the number of seconds and
210 microseconds from the epoch.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.8 and above.</p></div><p>The <code class="function">glib.get_current_time</code>() function
211 reurns the current time of day as the number of seconds and microseconds
212 from the epoch.</p></div><div class="refsect2" title="glib.get_user_cache_dir"><a name="function-glib--get-user-cache-dir"></a><h3>glib.get_user_cache_dir</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.get_user_cache_dir</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>
213               a strings with a path to user's cache directory.
214             </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGObject 2.18 and above.</p></div><p>Returns a base directory in which to store non-essential,
215         cached data specific to particular user.</p><p>On UNIX platforms this is determined using the mechanisms
216         described in the
217         <a class="ulink" href="http://www.freedesktop.org/Standards/basedir-spec" target="_top">XDG
218           Base Directory Specification</a>.</p></div><div class="refsect2" title="glib.get_user_config_dir"><a name="function-glib--get-user-config-dir"></a><h3>glib.get_user_config_dir</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.get_user_config_dir</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>
219               a strings with a path to user's configuration directory.
220             </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGObject 2.18 and above.</p></div><p>Returns a base directory in which to store user-specific
221         application configuration information such as user preferences
222         and settings. </p><p>On UNIX platforms this is determined using the mechanisms
223         described in the
224         <a class="ulink" href="http://www.freedesktop.org/Standards/basedir-spec" target="_top">XDG
225           Base Directory Specification</a>.</p></div><div class="refsect2" title="glib.get_user_data_dir"><a name="function-glib--get-user-data-dir"></a><h3>glib.get_user_data_dir</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.get_user_data_dir</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>
226               a strings with a path to user's data directory.
227             </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGObject 2.18 and above.</p></div><p>Returns a base directory in which to access application
228         data such as icons that is customized for a particular
229         user</p><p>On UNIX platforms this is determined using the mechanisms
230         described in the
231         <a class="ulink" href="http://www.freedesktop.org/Standards/basedir-spec" target="_top">XDG
232           Base Directory Specification</a>.</p></div><div class="refsect2" title="glib.get_user_special_dir"><a name="function-glib--get-user-special-dir"></a><h3>glib.get_user_special_dir</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.get_user_special_dir</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>directory</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>directory</em></span> :</span></p></td><td>
233               the logical id of special directory,
234               see <a class="link" href="glib-constants.html#glib-user-directory-constants" title="Glib User Directory Constants">User
235               Directory constants</a> for the list of supported
236               values
237             </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>
238               a strings with a path to the requested directory.
239             </td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGObject 2.18 and above.</p></div><p>Returns the full path of a special directory using its
240         logical id.</p><p>On Unix this is done using the XDG special user
241         directories.  For compatibility with existing practise,
242         <a class="link" href="glib-constants.html#glib-user-directory-constants" title="Glib User Directory Constants">glib.USER_DIRECTORY_DESKTOP</a>
243         falls back to <code class="literal">$HOME/Desktop</code> when XDG
244         special user directories have not been set up.</p><p>Depending on the platform, the user might be able to
245         change the path of the special directory without requiring the
246         session to restart; GLib will not reflect any change once the
247         special directories are loaded.</p></div><div class="refsect2" title="glib.main_depth"><a name="function-glib--main-depth"></a><h3>glib.main_depth</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.main_depth</span>()</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the depth of the stack of calls to the main
248 context.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.8 and above.</p></div><p>The <code class="function">main_depth</code>() function returns the depth
249 of the stack of calls in the main context. That is, when called from the
250 toplevel, it gives 0. When called from within a callback from the <a class="link" href="class-glibmaincontext.html#method-glibmaincontext--iteration" title="glib.MainContext.iteration"><code class="methodname">glib.MainContext.iteration</code>()</a>
251 method (or the <a class="link" href="class-glibmainloop.html#method-glibmainloop--run" title="glib.MainLoop.run"><code class="methodname">glib.MainLoop.run</code>()</a>
252 method, etc.) it returns 1. When called from within a callback to a
253 recursive call to the <a class="link" href="class-glibmaincontext.html#method-glibmaincontext--iteration" title="glib.MainContext.iteration"><code class="methodname">glib.MainContext.iteration</code>()</a>
254 method), it returns 2. And so forth.</p></div><div class="refsect2" title="glib.threads_init"><a name="function-glib--threads-init"></a><h3>glib.threads_init</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.threads_init</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code></code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.4 and above.</p></div><p>The <code class="function">threads_init</code>() function initializes the
255       the use of Python threading in the glib module. This function is
256       different than the <PYGTKDOCLINK HREF="function-gdk--threads-init"><code class="function">gtk.gdk.threads_init</code>()</PYGTKDOCLINK>
257       function as that function also initializes the gdk threads.</p></div><div class="refsect2" title="glib.signal_accumulator_true_handled"><a name="function-glib--signal-accumulator-true-handled"></a><h3>glib.signal_accumulator_true_handled</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.signal_accumulator_true_handled</span>()</code></pre><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.8 and above.</p></div><p>The <code class="function">signal_accumulator_true_handled</code>()
258       function is only used as accumulator argument when registering
259       signals.</p></div><div class="refsect2" title="glib.filename_display_name"><a name="function-glib--filename-display-name"></a><h3>glib.filename_display_name</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.filename_display_name</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>filename</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>filename</em></span> :</span></p></td><td>a pathname in the file name
260           encoding</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an UTF8 rendition of
261           <em class="parameter"><code>filename</code></em>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>The <code class="function">filename_display_name</code>() function
262       converts a filename into a valid UTF-8 string. The conversion is not
263       necessarily reversible, so you should keep the original around and use
264       the return value of this function only for display purposes. Unlike
265       g_filename_to_utf8(), the result is guaranteed to be non-None even if
266       the filename actually isn't in the file name encoding.</p><p>If you know the whole pathname of the file you should use the
267       <a class="link" href="glib-functions.html#function-glib--filename-display-basename" title="glib.filename_display_basename"><code class="function">glib.filename_display_basename</code>()</a>
268       function, since that allows location-based translation of
269       filenames.</p></div><div class="refsect2" title="glib.filename_display_basename"><a name="function-glib--filename-display-basename"></a><h3>glib.filename_display_basename</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.filename_display_basename</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>filename</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>filename</em></span> :</span></p></td><td>an absolute pathname in the file name
270           encoding</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>an UTF8 rendition of
271           <em class="parameter"><code>filename</code></em>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>The <code class="function">filename_display_basename</code>() function
272       returns the display basename for the particular filename, guaranteed
273       to be valid UTF-8. The display name might not be identical to the
274       filename, for instance there might be problems converting it to UTF-8,
275       and some files can be translated in the display.</p><p>You must pass the whole absolute pathname to this functions so
276       that translation of well known locations can be done.</p><p>This function is preferred over the <a class="link" href="glib-functions.html#function-glib--filename-display-name" title="glib.filename_display_name"><code class="function">glib.filename_display_name</code>()</a>
277       function if you know the whole path, as it allows translation.</p></div><div class="refsect2" title="glib.filename_from_utf8"><a name="function-glib--filename-from-utf8"></a><h3>glib.filename_from_utf8</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">glib.filename_from_utf8</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>utf8string</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>utf8string</em></span> :</span></p></td><td>a UTF-8 encoded string.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a filename encoded in the GLib filename
278           encoding.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.10 and above.</p></div><p>The <code class="function">filename_from_utf8</code>() function converts
279       a string from UTF-8 to the encoding GLib uses for filenames. Note that
280       on Windows GLib uses UTF-8 for filenames.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-glibmainloop.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="glib-constants.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glib.MainLoop </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> glib Constants</td></tr></table></div></body></html>