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>);
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>
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>.
81
<div class="variablelist"><table border="0" class="variablelist">
83
<col align="left" valign="top">
88
<td><p><span class="term"><em class="parameter"><code>actor</code></em> :</span></p></td>
89
<td>A <span class="type">ClutterActor</span>
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>
78
Synchronously load the contents of a file as a NUL terminated
79
string, validating it as UTF-8. Embedded NUL characters count as
82
<div class="variablelist"><table border="0" class="variablelist">
84
<col align="left" valign="top">
89
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
90
<td>UTF-8 encoded filename path</td>
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>
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>
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>
117
Workaround for non-introspectability of <code class="function">gdk_pixbuf_from_data()</code>.
119
<div class="variablelist"><table border="0" class="variablelist">
121
<col align="left" valign="top">
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>
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>
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>
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
150
<div class="variablelist"><table border="0" class="variablelist">
152
<col align="left" valign="top">
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>
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>
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>
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>
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
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.
118
196
<div class="variablelist"><table border="0" class="variablelist">
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>
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
181
<div class="variablelist"><table border="0" class="variablelist">
183
<col align="left" valign="top">
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>
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>
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>
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>
215
Write a string to a GOutputStream as UTF-8. This is a workaround
216
for not having binary buffers in GJS.
218
<div class="variablelist"><table border="0" class="variablelist">
220
<col align="left" valign="top">
225
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
226
<td>a <span class="type">GOutputStream</span>
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>
235
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
236
<td>location to store GError</td>
239
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
241
<code class="literal">TRUE</code> if write succeeded</td>
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>
252
Synchronously load the contents of a file as a NUL terminated
253
string, validating it as UTF-8. Embedded NUL characters count as
256
<div class="variablelist"><table border="0" class="variablelist">
258
<col align="left" valign="top">
263
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
264
<td>UTF-8 encoded filename path</td>
267
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
268
<td>a <span class="type">GError</span>
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>
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>
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>.
256
<div class="variablelist"><table border="0" class="variablelist">
258
<col align="left" valign="top">
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>
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>
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>
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.
325
316
<div class="variablelist"><table border="0" class="variablelist">
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>
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>
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>
333
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
334
<td>location to store GError</td>
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
<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>