~ubuntu-branches/ubuntu/trusty/gnome-shell/trusty

« back to all changes in this revision

Viewing changes to docs/reference/shell/html/shell-shell-util.html

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-07-31 21:29:20 UTC
  • mfrom: (1.1.51)
  • Revision ID: package-import@ubuntu.com-20130731212920-mz92zheiqgq2ggd1
Tags: 3.8.4-0ubuntu1
* New upstream release.
* debian/patches/git-dont-crash-for-unstaged-widgets.patch:
  - Dropped, applied in new version

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
<link rel="up" href="ch06.html" title="Integration helpers and utilities">
9
9
<link rel="prev" href="shell-shell-xfixes-cursor.html" title="shell-xfixes-cursor">
10
10
<link rel="next" href="ShellMountOperation.html" title="ShellMountOperation">
11
 
<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
</head>
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
37
37
</tr></table></div>
38
38
<div class="refsynopsisdiv">
39
39
<a name="shell-shell-util.synopsis"></a><h2>Synopsis</h2>
40
 
<pre class="synopsis"><span class="returnvalue">void</span>                <a class="link" href="shell-shell-util.html#shell-util-set-hidden-from-pick" title="shell_util_set_hidden_from_pick ()">shell_util_set_hidden_from_pick</a>     (<em class="parameter"><code><span class="type">ClutterActor</span> *actor</code></em>,
41
 
                                                         <em class="parameter"><code><span class="type">gboolean</span> hidden</code></em>);
 
40
<pre class="synopsis"><span class="returnvalue">char</span> *              <a class="link" href="shell-shell-util.html#shell-get-file-contents-utf8-sync" title="shell_get_file_contents_utf8_sync ()">shell_get_file_contents_utf8_sync</a>   (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
 
41
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
 
42
<a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *         <a class="link" href="shell-shell-util.html#shell-util-create-pixbuf-from-data" title="shell_util_create_pixbuf_from_data ()">shell_util_create_pixbuf_from_data</a>  (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *data</code></em>,
 
43
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>,
 
44
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkColorspace"><span class="type">GdkColorspace</span></a> colorspace</code></em>,
 
45
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> has_alpha</code></em>,
 
46
                                                         <em class="parameter"><code><span class="type">int</span> bits_per_sample</code></em>,
 
47
                                                         <em class="parameter"><code><span class="type">int</span> width</code></em>,
 
48
                                                         <em class="parameter"><code><span class="type">int</span> height</code></em>,
 
49
                                                         <em class="parameter"><code><span class="type">int</span> rowstride</code></em>);
 
50
<span class="returnvalue">char</span> *              <a class="link" href="shell-shell-util.html#shell-util-format-date" title="shell_util_format_date ()">shell_util_format_date</a>              (<em class="parameter"><code>const <span class="type">char</span> *format</code></em>,
 
51
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> time_ms</code></em>);
42
52
<span class="returnvalue">void</span>                <a class="link" href="shell-shell-util.html#shell-util-get-transformed-allocation" title="shell_util_get_transformed_allocation ()">shell_util_get_transformed_allocation</a>
43
 
                                                        (<em class="parameter"><code><span class="type">ClutterActor</span> *actor</code></em>,
44
 
                                                         <em class="parameter"><code><span class="type">ClutterActorBox</span> *box</code></em>);
 
53
                                                        (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/clutter/ClutterActor.html"><span class="type">ClutterActor</span></a> *actor</code></em>,
 
54
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/clutter/clutter-Base-geometric-types.html#ClutterActorBox"><span class="type">ClutterActorBox</span></a> *box</code></em>);
45
55
<span class="returnvalue">int</span>                 <a class="link" href="shell-shell-util.html#shell-util-get-week-start" title="shell_util_get_week_start ()">shell_util_get_week_start</a>           (<em class="parameter"><code><span class="type">void</span></code></em>);
46
56
<span class="returnvalue">char</span> *              <a class="link" href="shell-shell-util.html#shell-util-normalize-and-casefold" title="shell_util_normalize_and_casefold ()">shell_util_normalize_and_casefold</a>   (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>);
47
57
<span class="returnvalue">char</span> *              <a class="link" href="shell-shell-util.html#shell-util-normalize-casefold-and-unaccent" title="shell_util_normalize_casefold_and_unaccent ()">shell_util_normalize_casefold_and_unaccent</a>
48
58
                                                        (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>);
49
 
<span class="returnvalue">char</span> *              <a class="link" href="shell-shell-util.html#shell-util-format-date" title="shell_util_format_date ()">shell_util_format_date</a>              (<em class="parameter"><code>const <span class="type">char</span> *format</code></em>,
50
 
                                                         <em class="parameter"><code><span class="type">gint64</span> time_ms</code></em>);
51
 
<span class="returnvalue">gboolean</span>            <a class="link" href="shell-shell-util.html#shell-write-string-to-stream" title="shell_write_string_to_stream ()">shell_write_string_to_stream</a>        (<em class="parameter"><code><span class="type">GOutputStream</span> *stream</code></em>,
52
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *str</code></em>,
53
 
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
54
 
<span class="returnvalue">char</span> *              <a class="link" href="shell-shell-util.html#shell-get-file-contents-utf8-sync" title="shell_get_file_contents_utf8_sync ()">shell_get_file_contents_utf8_sync</a>   (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
55
 
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
56
 
<span class="returnvalue">gboolean</span>            <a class="link" href="shell-shell-util.html#shell-util-wifexited" title="shell_util_wifexited ()">shell_util_wifexited</a>                (<em class="parameter"><code><span class="type">int</span> status</code></em>,
 
59
<span class="returnvalue">void</span>                <a class="link" href="shell-shell-util.html#shell-util-set-hidden-from-pick" title="shell_util_set_hidden_from_pick ()">shell_util_set_hidden_from_pick</a>     (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/clutter/ClutterActor.html"><span class="type">ClutterActor</span></a> *actor</code></em>,
 
60
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> hidden</code></em>);
 
61
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="shell-shell-util.html#shell-util-wifexited" title="shell_util_wifexited ()">shell_util_wifexited</a>                (<em class="parameter"><code><span class="type">int</span> status</code></em>,
57
62
                                                         <em class="parameter"><code><span class="type">int</span> *exit</code></em>);
58
 
<span class="returnvalue">GdkPixbuf</span> *         <a class="link" href="shell-shell-util.html#shell-util-create-pixbuf-from-data" title="shell_util_create_pixbuf_from_data ()">shell_util_create_pixbuf_from_data</a>  (<em class="parameter"><code>const <span class="type">guchar</span> *data</code></em>,
59
 
                                                         <em class="parameter"><code><span class="type">gsize</span> len</code></em>,
60
 
                                                         <em class="parameter"><code><span class="type">GdkColorspace</span> colorspace</code></em>,
61
 
                                                         <em class="parameter"><code><span class="type">gboolean</span> has_alpha</code></em>,
62
 
                                                         <em class="parameter"><code><span class="type">int</span> bits_per_sample</code></em>,
63
 
                                                         <em class="parameter"><code><span class="type">int</span> width</code></em>,
64
 
                                                         <em class="parameter"><code><span class="type">int</span> height</code></em>,
65
 
                                                         <em class="parameter"><code><span class="type">int</span> rowstride</code></em>);
 
63
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="shell-shell-util.html#shell-write-string-to-stream" title="shell_write_string_to_stream ()">shell_write_string_to_stream</a>        (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GOutputStream.html"><span class="type">GOutputStream</span></a> *stream</code></em>,
 
64
                                                         <em class="parameter"><code>const <span class="type">char</span> *str</code></em>,
 
65
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
66
66
</pre>
67
67
</div>
68
68
<div class="refsect1">
71
71
<div class="refsect1">
72
72
<a name="shell-shell-util.details"></a><h2>Details</h2>
73
73
<div class="refsect2">
74
 
<a name="shell-util-set-hidden-from-pick"></a><h3>shell_util_set_hidden_from_pick ()</h3>
75
 
<pre class="programlisting"><span class="returnvalue">void</span>                shell_util_set_hidden_from_pick     (<em class="parameter"><code><span class="type">ClutterActor</span> *actor</code></em>,
76
 
                                                         <em class="parameter"><code><span class="type">gboolean</span> hidden</code></em>);</pre>
77
 
<p>
78
 
If <em class="parameter"><code>hidden</code></em> is <code class="literal">TRUE</code>, hide <em class="parameter"><code>actor</code></em> from pick even with a mode of
79
 
<code class="literal">CLUTTER_PICK_ALL</code>; if <em class="parameter"><code>hidden</code></em> is <code class="literal">FALSE</code>, unhide <em class="parameter"><code>actor</code></em>.
80
 
</p>
81
 
<div class="variablelist"><table border="0" class="variablelist">
82
 
<colgroup>
83
 
<col align="left" valign="top">
84
 
<col>
85
 
</colgroup>
86
 
<tbody>
87
 
<tr>
88
 
<td><p><span class="term"><em class="parameter"><code>actor</code></em> :</span></p></td>
89
 
<td>A <span class="type">ClutterActor</span>
90
 
</td>
91
 
</tr>
92
 
<tr>
93
 
<td><p><span class="term"><em class="parameter"><code>hidden</code></em> :</span></p></td>
94
 
<td>Whether <em class="parameter"><code>actor</code></em> should be hidden from pick</td>
 
74
<a name="shell-get-file-contents-utf8-sync"></a><h3>shell_get_file_contents_utf8_sync ()</h3>
 
75
<pre class="programlisting"><span class="returnvalue">char</span> *              shell_get_file_contents_utf8_sync   (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
 
76
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
77
<p>
 
78
Synchronously load the contents of a file as a NUL terminated
 
79
string, validating it as UTF-8.  Embedded NUL characters count as
 
80
invalid content.
 
81
</p>
 
82
<div class="variablelist"><table border="0" class="variablelist">
 
83
<colgroup>
 
84
<col align="left" valign="top">
 
85
<col>
 
86
</colgroup>
 
87
<tbody>
 
88
<tr>
 
89
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
 
90
<td>UTF-8 encoded filename path</td>
 
91
</tr>
 
92
<tr>
 
93
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
 
94
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>
 
95
</td>
 
96
</tr>
 
97
<tr>
 
98
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
99
<td>File contents. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
 
100
</td>
 
101
</tr>
 
102
</tbody>
 
103
</table></div>
 
104
</div>
 
105
<hr>
 
106
<div class="refsect2">
 
107
<a name="shell-util-create-pixbuf-from-data"></a><h3>shell_util_create_pixbuf_from_data ()</h3>
 
108
<pre class="programlisting"><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *         shell_util_create_pixbuf_from_data  (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *data</code></em>,
 
109
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>,
 
110
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkColorspace"><span class="type">GdkColorspace</span></a> colorspace</code></em>,
 
111
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> has_alpha</code></em>,
 
112
                                                         <em class="parameter"><code><span class="type">int</span> bits_per_sample</code></em>,
 
113
                                                         <em class="parameter"><code><span class="type">int</span> width</code></em>,
 
114
                                                         <em class="parameter"><code><span class="type">int</span> height</code></em>,
 
115
                                                         <em class="parameter"><code><span class="type">int</span> rowstride</code></em>);</pre>
 
116
<p>
 
117
Workaround for non-introspectability of <code class="function">gdk_pixbuf_from_data()</code>.
 
118
</p>
 
119
<div class="variablelist"><table border="0" class="variablelist">
 
120
<colgroup>
 
121
<col align="left" valign="top">
 
122
<col>
 
123
</colgroup>
 
124
<tbody>
 
125
<tr>
 
126
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
 
127
<td>. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
 
128
</td>
 
129
</tr>
 
130
<tr>
 
131
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
132
<td>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
 
133
</td>
 
134
</tr>
 
135
</tbody>
 
136
</table></div>
 
137
</div>
 
138
<hr>
 
139
<div class="refsect2">
 
140
<a name="shell-util-format-date"></a><h3>shell_util_format_date ()</h3>
 
141
<pre class="programlisting"><span class="returnvalue">char</span> *              shell_util_format_date              (<em class="parameter"><code>const <span class="type">char</span> *format</code></em>,
 
142
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> time_ms</code></em>);</pre>
 
143
<p>
 
144
Formats a date for the current locale. This should be
 
145
used instead of the Spidermonkey Date.toLocaleFormat()
 
146
extension because Date.toLocaleFormat() is buggy for
 
147
Unicode format strings:
 
148
https://bugzilla.mozilla.org/show_bug.cgi?id=508783
 
149
</p>
 
150
<div class="variablelist"><table border="0" class="variablelist">
 
151
<colgroup>
 
152
<col align="left" valign="top">
 
153
<col>
 
154
</colgroup>
 
155
<tbody>
 
156
<tr>
 
157
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
 
158
<td>a strftime-style string format, as parsed by
 
159
<a href="http://library.gnome.org/devel/glib/unstable/glib-GDateTime.html#g-date-time-format"><code class="function">g_date_time_format()</code></a>
 
160
</td>
 
161
</tr>
 
162
<tr>
 
163
<td><p><span class="term"><em class="parameter"><code>time_ms</code></em> :</span></p></td>
 
164
<td>milliseconds since 1970-01-01 00:00:00 UTC; the
 
165
value returned by Date.getTime()</td>
 
166
</tr>
 
167
<tr>
 
168
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
169
<td>the formatted date. If the date is
 
170
outside of the range of a GDateTime (which contains
 
171
any plausible dates we actually care about), will
 
172
return an empty string.</td>
95
173
</tr>
96
174
</tbody>
97
175
</table></div>
100
178
<div class="refsect2">
101
179
<a name="shell-util-get-transformed-allocation"></a><h3>shell_util_get_transformed_allocation ()</h3>
102
180
<pre class="programlisting"><span class="returnvalue">void</span>                shell_util_get_transformed_allocation
103
 
                                                        (<em class="parameter"><code><span class="type">ClutterActor</span> *actor</code></em>,
104
 
                                                         <em class="parameter"><code><span class="type">ClutterActorBox</span> *box</code></em>);</pre>
 
181
                                                        (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/clutter/ClutterActor.html"><span class="type">ClutterActor</span></a> *actor</code></em>,
 
182
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/clutter/clutter-Base-geometric-types.html#ClutterActorBox"><span class="type">ClutterActorBox</span></a> *box</code></em>);</pre>
105
183
<p>
106
 
This function is similar to a combination of <code class="function">clutter_actor_get_transformed_position()</code>,
107
 
and <code class="function">clutter_actor_get_transformed_size()</code>, but unlike
108
 
<code class="function">clutter_actor_get_transformed_size()</code>, it always returns a transform
109
 
of the current allocation, while <code class="function">clutter_actor_get_transformed_size()</code> returns
 
184
This function is similar to a combination of <a href="/usr/share/gtk-doc/html/clutter/ClutterActor.html#clutter-actor-get-transformed-position"><code class="function">clutter_actor_get_transformed_position()</code></a>,
 
185
and <a href="/usr/share/gtk-doc/html/clutter/ClutterActor.html#clutter-actor-get-transformed-size"><code class="function">clutter_actor_get_transformed_size()</code></a>, but unlike
 
186
<a href="/usr/share/gtk-doc/html/clutter/ClutterActor.html#clutter-actor-get-transformed-size"><code class="function">clutter_actor_get_transformed_size()</code></a>, it always returns a transform
 
187
of the current allocation, while <a href="/usr/share/gtk-doc/html/clutter/ClutterActor.html#clutter-actor-get-transformed-size"><code class="function">clutter_actor_get_transformed_size()</code></a> returns
110
188
bad values (the transform of the requested size) if a relayout has been
111
189
queued.
112
190
</p>
113
191
<p>
114
192
This function is more convenient to use than
115
 
<code class="function">clutter_actor_get_abs_allocation_vertices()</code> if no transformation is in effect
 
193
<a href="/usr/share/gtk-doc/html/clutter/ClutterActor.html#clutter-actor-get-abs-allocation-vertices"><code class="function">clutter_actor_get_abs_allocation_vertices()</code></a> if no transformation is in effect
116
194
and also works around limitations in the GJS binding of arrays.
117
195
</p>
118
196
<div class="variablelist"><table border="0" class="variablelist">
123
201
<tbody>
124
202
<tr>
125
203
<td><p><span class="term"><em class="parameter"><code>actor</code></em> :</span></p></td>
126
 
<td>a <span class="type">ClutterActor</span>
 
204
<td>a <a href="/usr/share/gtk-doc/html/clutter/ClutterActor.html"><span class="type">ClutterActor</span></a>
127
205
</td>
128
206
</tr>
129
207
<tr>
168
246
</div>
169
247
<hr>
170
248
<div class="refsect2">
171
 
<a name="shell-util-format-date"></a><h3>shell_util_format_date ()</h3>
172
 
<pre class="programlisting"><span class="returnvalue">char</span> *              shell_util_format_date              (<em class="parameter"><code>const <span class="type">char</span> *format</code></em>,
173
 
                                                         <em class="parameter"><code><span class="type">gint64</span> time_ms</code></em>);</pre>
174
 
<p>
175
 
Formats a date for the current locale. This should be
176
 
used instead of the Spidermonkey Date.toLocaleFormat()
177
 
extension because Date.toLocaleFormat() is buggy for
178
 
Unicode format strings:
179
 
https://bugzilla.mozilla.org/show_bug.cgi?id=508783
180
 
</p>
181
 
<div class="variablelist"><table border="0" class="variablelist">
182
 
<colgroup>
183
 
<col align="left" valign="top">
184
 
<col>
185
 
</colgroup>
186
 
<tbody>
187
 
<tr>
188
 
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
189
 
<td>a strftime-style string format, as parsed by
190
 
<code class="function">g_date_time_format()</code>
191
 
</td>
192
 
</tr>
193
 
<tr>
194
 
<td><p><span class="term"><em class="parameter"><code>time_ms</code></em> :</span></p></td>
195
 
<td>milliseconds since 1970-01-01 00:00:00 UTC; the
196
 
value returned by Date.getTime()</td>
197
 
</tr>
198
 
<tr>
199
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
200
 
<td>the formatted date. If the date is
201
 
outside of the range of a GDateTime (which contains
202
 
any plausible dates we actually care about), will
203
 
return an empty string.</td>
204
 
</tr>
205
 
</tbody>
206
 
</table></div>
207
 
</div>
208
 
<hr>
209
 
<div class="refsect2">
210
 
<a name="shell-write-string-to-stream"></a><h3>shell_write_string_to_stream ()</h3>
211
 
<pre class="programlisting"><span class="returnvalue">gboolean</span>            shell_write_string_to_stream        (<em class="parameter"><code><span class="type">GOutputStream</span> *stream</code></em>,
212
 
                                                         <em class="parameter"><code>const <span class="type">char</span> *str</code></em>,
213
 
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
214
 
<p>
215
 
Write a string to a GOutputStream as UTF-8. This is a workaround
216
 
for not having binary buffers in GJS.
217
 
</p>
218
 
<div class="variablelist"><table border="0" class="variablelist">
219
 
<colgroup>
220
 
<col align="left" valign="top">
221
 
<col>
222
 
</colgroup>
223
 
<tbody>
224
 
<tr>
225
 
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
226
 
<td>a <span class="type">GOutputStream</span>
227
 
</td>
228
 
</tr>
229
 
<tr>
230
 
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
231
 
<td>a UTF-8 string to write to <em class="parameter"><code>stream</code></em>
232
 
</td>
233
 
</tr>
234
 
<tr>
235
 
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
236
 
<td>location to store GError</td>
237
 
</tr>
238
 
<tr>
239
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
240
 
<td>
241
 
<code class="literal">TRUE</code> if write succeeded</td>
242
 
</tr>
243
 
</tbody>
244
 
</table></div>
245
 
</div>
246
 
<hr>
247
 
<div class="refsect2">
248
 
<a name="shell-get-file-contents-utf8-sync"></a><h3>shell_get_file_contents_utf8_sync ()</h3>
249
 
<pre class="programlisting"><span class="returnvalue">char</span> *              shell_get_file_contents_utf8_sync   (<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
250
 
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
251
 
<p>
252
 
Synchronously load the contents of a file as a NUL terminated
253
 
string, validating it as UTF-8.  Embedded NUL characters count as
254
 
invalid content.
255
 
</p>
256
 
<div class="variablelist"><table border="0" class="variablelist">
257
 
<colgroup>
258
 
<col align="left" valign="top">
259
 
<col>
260
 
</colgroup>
261
 
<tbody>
262
 
<tr>
263
 
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
264
 
<td>UTF-8 encoded filename path</td>
265
 
</tr>
266
 
<tr>
267
 
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
268
 
<td>a <span class="type">GError</span>
269
 
</td>
270
 
</tr>
271
 
<tr>
272
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
273
 
<td>File contents. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
274
 
</td>
 
249
<a name="shell-util-set-hidden-from-pick"></a><h3>shell_util_set_hidden_from_pick ()</h3>
 
250
<pre class="programlisting"><span class="returnvalue">void</span>                shell_util_set_hidden_from_pick     (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/clutter/ClutterActor.html"><span class="type">ClutterActor</span></a> *actor</code></em>,
 
251
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> hidden</code></em>);</pre>
 
252
<p>
 
253
If <em class="parameter"><code>hidden</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, hide <em class="parameter"><code>actor</code></em> from pick even with a mode of
 
254
<a href="/usr/share/gtk-doc/html/clutter/ClutterStage.html#CLUTTER-PICK-ALL:CAPS"><code class="literal">CLUTTER_PICK_ALL</code></a>; if <em class="parameter"><code>hidden</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, unhide <em class="parameter"><code>actor</code></em>.
 
255
</p>
 
256
<div class="variablelist"><table border="0" class="variablelist">
 
257
<colgroup>
 
258
<col align="left" valign="top">
 
259
<col>
 
260
</colgroup>
 
261
<tbody>
 
262
<tr>
 
263
<td><p><span class="term"><em class="parameter"><code>actor</code></em> :</span></p></td>
 
264
<td>A <a href="/usr/share/gtk-doc/html/clutter/ClutterActor.html"><span class="type">ClutterActor</span></a>
 
265
</td>
 
266
</tr>
 
267
<tr>
 
268
<td><p><span class="term"><em class="parameter"><code>hidden</code></em> :</span></p></td>
 
269
<td>Whether <em class="parameter"><code>actor</code></em> should be hidden from pick</td>
275
270
</tr>
276
271
</tbody>
277
272
</table></div>
279
274
<hr>
280
275
<div class="refsect2">
281
276
<a name="shell-util-wifexited"></a><h3>shell_util_wifexited ()</h3>
282
 
<pre class="programlisting"><span class="returnvalue">gboolean</span>            shell_util_wifexited                (<em class="parameter"><code><span class="type">int</span> status</code></em>,
 
277
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            shell_util_wifexited                (<em class="parameter"><code><span class="type">int</span> status</code></em>,
283
278
                                                         <em class="parameter"><code><span class="type">int</span> *exit</code></em>);</pre>
284
279
<p>
285
280
Implements libc standard WIFEXITED, that cannot be used JS
310
305
</div>
311
306
<hr>
312
307
<div class="refsect2">
313
 
<a name="shell-util-create-pixbuf-from-data"></a><h3>shell_util_create_pixbuf_from_data ()</h3>
314
 
<pre class="programlisting"><span class="returnvalue">GdkPixbuf</span> *         shell_util_create_pixbuf_from_data  (<em class="parameter"><code>const <span class="type">guchar</span> *data</code></em>,
315
 
                                                         <em class="parameter"><code><span class="type">gsize</span> len</code></em>,
316
 
                                                         <em class="parameter"><code><span class="type">GdkColorspace</span> colorspace</code></em>,
317
 
                                                         <em class="parameter"><code><span class="type">gboolean</span> has_alpha</code></em>,
318
 
                                                         <em class="parameter"><code><span class="type">int</span> bits_per_sample</code></em>,
319
 
                                                         <em class="parameter"><code><span class="type">int</span> width</code></em>,
320
 
                                                         <em class="parameter"><code><span class="type">int</span> height</code></em>,
321
 
                                                         <em class="parameter"><code><span class="type">int</span> rowstride</code></em>);</pre>
 
308
<a name="shell-write-string-to-stream"></a><h3>shell_write_string_to_stream ()</h3>
 
309
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            shell_write_string_to_stream        (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GOutputStream.html"><span class="type">GOutputStream</span></a> *stream</code></em>,
 
310
                                                         <em class="parameter"><code>const <span class="type">char</span> *str</code></em>,
 
311
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
322
312
<p>
323
 
Workaround for non-introspectability of <code class="function">gdk_pixbuf_from_data()</code>.
 
313
Write a string to a GOutputStream as UTF-8. This is a workaround
 
314
for not having binary buffers in GJS.
324
315
</p>
325
316
<div class="variablelist"><table border="0" class="variablelist">
326
317
<colgroup>
329
320
</colgroup>
330
321
<tbody>
331
322
<tr>
332
 
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
333
 
<td>. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=len][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
334
 
</td>
 
323
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
 
324
<td>a <a href="http://library.gnome.org/devel/gio/unstable/GOutputStream.html"><span class="type">GOutputStream</span></a>
 
325
</td>
 
326
</tr>
 
327
<tr>
 
328
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
 
329
<td>a UTF-8 string to write to <em class="parameter"><code>stream</code></em>
 
330
</td>
 
331
</tr>
 
332
<tr>
 
333
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
 
334
<td>location to store GError</td>
335
335
</tr>
336
336
<tr>
337
337
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
338
 
<td>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
339
 
</td>
 
338
<td>
 
339
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if write succeeded</td>
340
340
</tr>
341
341
</tbody>
342
342
</table></div>
345
345
</div>
346
346
<div class="footer">
347
347
<hr>
348
 
          Generated by GTK-Doc V1.18.1</div>
 
348
          Generated by GTK-Doc V1.19</div>
349
349
</body>
350
350
</html>
 
 
b'\\ No newline at end of file'