| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 5 |
<title>Spawn: libxfce4ui Reference Manual</title> |
| 6 |
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> |
| 7 |
<link rel="home" href="index.html" title="libxfce4ui Reference Manual"> |
| 8 |
<link rel="up" href="ch01.html" title="[Insert title here]"> |
| 9 |
<link rel="prev" href="libxfce4ui-libxfce4ui-config.html" title="libxfce4ui config"> |
| 10 |
<link rel="next" href="libxfce4ui-Gdk-Extensions.html" title="Gdk Extensions"> |
| 11 |
<meta name="generator" content="GTK-Doc V1.34.0 (XML mode)"> |
| 12 |
<link rel="stylesheet" href="style.css" type="text/css"> |
| 13 |
</head> |
| 14 |
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| 15 |
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> |
| 16 |
<td width="100%" align="left" class="shortcuts"> |
| 17 |
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> |
| 18 |
<a href="#libxfce4ui-Spawn.description" class="shortcut">Description</a></span> |
| 19 |
</td> |
| 20 |
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
| 21 |
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> |
| 22 |
<td><a accesskey="p" href="libxfce4ui-libxfce4ui-config.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> |
| 23 |
<td><a accesskey="n" href="libxfce4ui-Gdk-Extensions.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> |
| 24 |
</tr></table> |
| 25 |
<div class="refentry"> |
| 26 |
<a name="libxfce4ui-Spawn"></a><div class="titlepage"></div> |
| 27 |
<div class="refnamediv"><table width="100%"><tr> |
| 28 |
<td valign="top"> |
| 29 |
<h2><span class="refentrytitle"><a name="libxfce4ui-Spawn.top_of_page"></a>Spawn</span></h2> |
| 30 |
<p>Spawn — spawn a command with startup notification</p> |
| 31 |
</td> |
| 32 |
<td class="gallery_image" valign="top" align="right"></td> |
| 33 |
</tr></table></div> |
| 34 |
<div class="refsect1"> |
| 35 |
<a name="libxfce4ui-Spawn.stability-level"></a><h2>Stability Level</h2> |
| 36 |
<acronym title="The intention of a Stable interface is to enable arbitrary third parties to |
| 37 |
develop applications to these interfaces, release them, and have confidence that |
| 38 |
they will run on all minor releases of the product (after the one in which the |
| 39 |
interface was introduced, and within the same major release). Even at a major |
| 40 |
release, incompatible changes are expected to be rare, and to have strong |
| 41 |
justifications. |
| 42 |
"><span class="acronym">Stable</span></acronym>, unless otherwise indicated |
| 43 |
</div> |
| 44 |
<div class="refsect1"> |
| 45 |
<a name="libxfce4ui-Spawn.functions"></a><h2>Functions</h2> |
| 46 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 47 |
<colgroup> |
| 48 |
<col width="150px" class="functions_proto_type"> |
| 49 |
<col class="functions_proto_name"> |
| 50 |
</colgroup> |
| 51 |
<tbody> |
| 52 |
<tr> |
| 53 |
<td class="function_type"> |
| 54 |
<span class="returnvalue">gboolean</span> |
| 55 |
</td> |
| 56 |
<td class="function_name"> |
| 57 |
<a class="link" href="libxfce4ui-Spawn.html#xfce-spawn-on-screen-with-child-watch" title="xfce_spawn_on_screen_with_child_watch ()">xfce_spawn_on_screen_with_child_watch</a> <span class="c_punctuation">()</span> |
| 58 |
</td> |
| 59 |
</tr> |
| 60 |
<tr> |
| 61 |
<td class="function_type"> |
| 62 |
<span class="returnvalue">gboolean</span> |
| 63 |
</td> |
| 64 |
<td class="function_name"> |
| 65 |
<a class="link" href="libxfce4ui-Spawn.html#xfce-spawn-on-screen" title="xfce_spawn_on_screen ()">xfce_spawn_on_screen</a> <span class="c_punctuation">()</span> |
| 66 |
</td> |
| 67 |
</tr> |
| 68 |
<tr> |
| 69 |
<td class="function_type"> |
| 70 |
<span class="returnvalue">gboolean</span> |
| 71 |
</td> |
| 72 |
<td class="function_name"> |
| 73 |
<a class="link" href="libxfce4ui-Spawn.html#xfce-spawn" title="xfce_spawn ()">xfce_spawn</a> <span class="c_punctuation">()</span> |
| 74 |
</td> |
| 75 |
</tr> |
| 76 |
<tr> |
| 77 |
<td class="function_type"> |
| 78 |
<span class="returnvalue">gboolean</span> |
| 79 |
</td> |
| 80 |
<td class="function_name"> |
| 81 |
<a class="link" href="libxfce4ui-Spawn.html#xfce-spawn-command-line-on-screen" title="xfce_spawn_command_line_on_screen ()">xfce_spawn_command_line_on_screen</a> <span class="c_punctuation">()</span> |
| 82 |
</td> |
| 83 |
</tr> |
| 84 |
<tr> |
| 85 |
<td class="function_type"> |
| 86 |
<span class="returnvalue">gboolean</span> |
| 87 |
</td> |
| 88 |
<td class="function_name"> |
| 89 |
<a class="link" href="libxfce4ui-Spawn.html#xfce-spawn-command-line" title="xfce_spawn_command_line ()">xfce_spawn_command_line</a> <span class="c_punctuation">()</span> |
| 90 |
</td> |
| 91 |
</tr> |
| 92 |
</tbody> |
| 93 |
</table></div> |
| 94 |
</div> |
| 95 |
<div class="refsect1"> |
| 96 |
<a name="libxfce4ui-Spawn.includes"></a><h2>Includes</h2> |
| 97 |
<pre class="synopsis">#include <libxfce4ui/libxfce4ui.h> |
| 98 |
</pre> |
| 99 |
</div> |
| 100 |
<div class="refsect1"> |
| 101 |
<a name="libxfce4ui-Spawn.description"></a><h2>Description</h2> |
| 102 |
<p>Functions to spawn a command with startup notification support.</p> |
| 103 |
</div> |
| 104 |
<div class="refsect1"> |
| 105 |
<a name="libxfce4ui-Spawn.functions_details"></a><h2>Functions</h2> |
| 106 |
<div class="refsect2"> |
| 107 |
<a name="xfce-spawn-on-screen-with-child-watch"></a><h3>xfce_spawn_on_screen_with_child_watch ()</h3> |
| 108 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 109 |
xfce_spawn_on_screen_with_child_watch (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gdk3/GdkScreen.html#GdkScreen-struct"><span class="type">GdkScreen</span></a> *screen</code></em>, |
| 110 |
<em class="parameter"><code>const <span class="type">gchar</span> *working_directory</code></em>, |
| 111 |
<em class="parameter"><code><span class="type">gchar</span> **argv</code></em>, |
| 112 |
<em class="parameter"><code><span class="type">gchar</span> **envp</code></em>, |
| 113 |
<em class="parameter"><code><span class="type">GSpawnFlags</span> flags</code></em>, |
| 114 |
<em class="parameter"><code><span class="type">gboolean</span> startup_notify</code></em>, |
| 115 |
<em class="parameter"><code><span class="type">guint32</span> startup_timestamp</code></em>, |
| 116 |
<em class="parameter"><code>const <span class="type">gchar</span> *startup_icon_name</code></em>, |
| 117 |
<em class="parameter"><code><span class="type">GClosure</span> *child_watch_closure</code></em>, |
| 118 |
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> |
| 119 |
<p>Like <a class="link" href="libxfce4ui-Spawn.html#xfce-spawn-on-screen" title="xfce_spawn_on_screen ()"><code class="function">xfce_spawn_on_screen()</code></a>, but allows to attach a closure to watch the |
| 120 |
child's exit status. This because only one <code class="function">g_child_watch_add()</code> is allowed on |
| 121 |
Unix (per PID) and this is already internally needed for a proper |
| 122 |
startup notification implementation.</p> |
| 123 |
<div class="example"> |
| 124 |
<a name="id-1.2.3.7.2.5"></a><p class="title"><b>Example 2. Spawning with a child watch</b></p> |
| 125 |
<div class="example-contents"> |
| 126 |
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> |
| 127 |
<tbody> |
| 128 |
<tr> |
| 129 |
<td class="listing_lines" align="right"><pre>1 |
| 130 |
2 |
| 131 |
3 |
| 132 |
4 |
| 133 |
5 |
| 134 |
6 |
| 135 |
7 |
| 136 |
8 |
| 137 |
9 |
| 138 |
10 |
| 139 |
11 |
| 140 |
12 |
| 141 |
13 |
| 142 |
14 |
| 143 |
15 |
| 144 |
16 |
| 145 |
17 |
| 146 |
18</pre></td> |
| 147 |
<td class="listing_code"><pre class="programlisting"><span class="k">static</span><span class="w"> </span><span class="kt">void</span> |
| 148 |
<span class="nf">child_watch_callback</span><span class="w"> </span><span class="p">(</span><span class="n">GObject</span><span class="w"> </span><span class="o">*</span><span class="n">object</span><span class="p">,</span> |
| 149 |
<span class="w"> </span><span class="n">gint</span><span class="w"> </span><span class="n">status</span><span class="p">)</span> |
| 150 |
<span class="p">{</span> |
| 151 |
<span class="w"> </span><span class="n">g_message</span><span class="w"> </span><span class="p">(</span><span class="s">"Child exit status is %d"</span><span class="p">,</span><span class="w"> </span><span class="n">status</span><span class="p">);</span> |
| 152 |
<span class="p">}</span> |
| 153 |
|
| 154 |
<span class="k">static</span><span class="w"> </span><span class="kt">void</span> |
| 155 |
<span class="nf">spawn_something</span><span class="w"> </span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> |
| 156 |
<span class="p">{</span> |
| 157 |
<span class="w"> </span><span class="n">GClosure</span><span class="w"> </span><span class="o">*</span><span class="n">child_watch</span><span class="p">;</span> |
| 158 |
|
| 159 |
<span class="w"> </span><span class="n">child_watch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_cclosure_new_swap</span><span class="w"> </span><span class="p">(</span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">child_watch_callback</span><span class="p">),</span> |
| 160 |
<span class="w"> </span><span class="n">object</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> |
| 161 |
<span class="w"> </span><span class="n">xfce_spawn_on_screen_with_child_watch</span><span class="w"> </span><span class="p">(...,</span> |
| 162 |
<span class="w"> </span><span class="n">child_watch</span><span class="p">,</span> |
| 163 |
<span class="w"> </span><span class="p">...);</span> |
| 164 |
<span class="p">}</span></pre></td> |
| 165 |
</tr> |
| 166 |
</tbody> |
| 167 |
</table> |
| 168 |
</div> |
| 169 |
|
| 170 |
</div> |
| 171 |
<br class="example-break"><div class="refsect3"> |
| 172 |
<a name="xfce-spawn-on-screen-with-child-watch.parameters"></a><h4>Parameters</h4> |
| 173 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 174 |
<colgroup> |
| 175 |
<col width="150px" class="parameters_name"> |
| 176 |
<col class="parameters_description"> |
| 177 |
<col width="200px" class="parameters_annotations"> |
| 178 |
</colgroup> |
| 179 |
<tbody> |
| 180 |
<tr> |
| 181 |
<td class="parameter_name"><p>screen</p></td> |
| 182 |
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gdk3/GdkScreen.html#GdkScreen-struct"><span class="type">GdkScreen</span></a> or <code class="literal">NULL</code> to use the active screen, |
| 183 |
see <a class="link" href="libxfce4ui-Gdk-Extensions.html#xfce-gdk-screen-get-active" title="xfce_gdk_screen_get_active ()"><code class="function">xfce_gdk_screen_get_active()</code></a>. </p></td> |
| 184 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> |
| 185 |
</tr> |
| 186 |
<tr> |
| 187 |
<td class="parameter_name"><p>working_directory</p></td> |
| 188 |
<td class="parameter_description"><p>child's current working directory or <code class="literal">NULL</code> to |
| 189 |
inherit parent's. </p></td> |
| 190 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> |
| 191 |
</tr> |
| 192 |
<tr> |
| 193 |
<td class="parameter_name"><p>argv</p></td> |
| 194 |
<td class="parameter_description"><p>child's argument vector.</p></td> |
| 195 |
<td class="parameter_annotations"> </td> |
| 196 |
</tr> |
| 197 |
<tr> |
| 198 |
<td class="parameter_name"><p>envp</p></td> |
| 199 |
<td class="parameter_description"><p>child's environment vector or <code class="literal">NULL</code> to inherit |
| 200 |
parent's. </p></td> |
| 201 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> |
| 202 |
</tr> |
| 203 |
<tr> |
| 204 |
<td class="parameter_name"><p>flags</p></td> |
| 205 |
<td class="parameter_description"><p>flags from <span class="type">GSpawnFlags</span>. <span class="type">G_SPAWN_DO_NOT_REAP_CHILD</span> |
| 206 |
is not allowed, you should use the |
| 207 |
<em class="parameter"><code>child_watch_closure</code></em> |
| 208 |
for this.</p></td> |
| 209 |
<td class="parameter_annotations"> </td> |
| 210 |
</tr> |
| 211 |
<tr> |
| 212 |
<td class="parameter_name"><p>startup_notify</p></td> |
| 213 |
<td class="parameter_description"><p>whether to use startup notification.</p></td> |
| 214 |
<td class="parameter_annotations"> </td> |
| 215 |
</tr> |
| 216 |
<tr> |
| 217 |
<td class="parameter_name"><p>startup_timestamp</p></td> |
| 218 |
<td class="parameter_description"><p>the timestamp to pass to startup notification, use |
| 219 |
the event time here if possible to make focus |
| 220 |
stealing prevention work property. If you don't |
| 221 |
have direct access to the event time you could use |
| 222 |
<a href="/usr/share/gtk-doc/html/gtk3/gtk3-General.html#gtk-get-current-event-time"><code class="function">gtk_get_current_event_time()</code></a> or if nothing is |
| 223 |
available 0 is valid too.</p></td> |
| 224 |
<td class="parameter_annotations"> </td> |
| 225 |
</tr> |
| 226 |
<tr> |
| 227 |
<td class="parameter_name"><p>startup_icon_name</p></td> |
| 228 |
<td class="parameter_description"><p>application icon or <code class="literal">NULL</code>. </p></td> |
| 229 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> |
| 230 |
</tr> |
| 231 |
<tr> |
| 232 |
<td class="parameter_name"><p>child_watch_closure</p></td> |
| 233 |
<td class="parameter_description"><p>closure that is triggered when the child exists |
| 234 |
or <code class="literal">NULL</code>. </p></td> |
| 235 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> |
| 236 |
</tr> |
| 237 |
<tr> |
| 238 |
<td class="parameter_name"><p>error</p></td> |
| 239 |
<td class="parameter_description"><p>return location for errors or <code class="literal">NULL</code>. </p></td> |
| 240 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td> |
| 241 |
</tr> |
| 242 |
</tbody> |
| 243 |
</table></div> |
| 244 |
</div> |
| 245 |
<div class="refsect3"> |
| 246 |
<a name="xfce-spawn-on-screen-with-child-watch.returns"></a><h4>Returns</h4> |
| 247 |
<p> <code class="literal">TRUE</code> on success, <code class="literal">FALSE</code> if <em class="parameter"><code>error</code></em> |
| 248 |
is set.</p> |
| 249 |
</div> |
| 250 |
</div> |
| 251 |
<hr> |
| 252 |
<div class="refsect2"> |
| 253 |
<a name="xfce-spawn-on-screen"></a><h3>xfce_spawn_on_screen ()</h3> |
| 254 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 255 |
xfce_spawn_on_screen (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gdk3/GdkScreen.html#GdkScreen-struct"><span class="type">GdkScreen</span></a> *screen</code></em>, |
| 256 |
<em class="parameter"><code>const <span class="type">gchar</span> *working_directory</code></em>, |
| 257 |
<em class="parameter"><code><span class="type">gchar</span> **argv</code></em>, |
| 258 |
<em class="parameter"><code><span class="type">gchar</span> **envp</code></em>, |
| 259 |
<em class="parameter"><code><span class="type">GSpawnFlags</span> flags</code></em>, |
| 260 |
<em class="parameter"><code><span class="type">gboolean</span> startup_notify</code></em>, |
| 261 |
<em class="parameter"><code><span class="type">guint32</span> startup_timestamp</code></em>, |
| 262 |
<em class="parameter"><code>const <span class="type">gchar</span> *startup_icon_name</code></em>, |
| 263 |
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> |
| 264 |
<div class="warning"> |
| 265 |
<p><code class="literal">xfce_spawn_on_screen</code> has been deprecated since version 4.16 and should not be used in newly-written code.</p> |
| 266 |
<p>Use <a class="link" href="libxfce4ui-Spawn.html#xfce-spawn" title="xfce_spawn ()"><span class="type">xfce_spawn</span></a> instead.</p> |
| 267 |
</div> |
| 268 |
<p>Like <code class="function">gdk_spawn_on_screen()</code> (GDK 2), but also supports startup notification |
| 269 |
(if Libxfce4ui was built with startup notification support).</p> |
| 270 |
<div class="refsect3"> |
| 271 |
<a name="xfce-spawn-on-screen.parameters"></a><h4>Parameters</h4> |
| 272 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 273 |
<colgroup> |
| 274 |
<col width="150px" class="parameters_name"> |
| 275 |
<col class="parameters_description"> |
| 276 |
<col width="200px" class="parameters_annotations"> |
| 277 |
</colgroup> |
| 278 |
<tbody> |
| 279 |
<tr> |
| 280 |
<td class="parameter_name"><p>screen</p></td> |
| 281 |
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gdk3/GdkScreen.html#GdkScreen-struct"><span class="type">GdkScreen</span></a> or <code class="literal">NULL</code> to use the active screen, |
| 282 |
see <a class="link" href="libxfce4ui-Gdk-Extensions.html#xfce-gdk-screen-get-active" title="xfce_gdk_screen_get_active ()"><code class="function">xfce_gdk_screen_get_active()</code></a>. </p></td> |
| 283 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> |
| 284 |
</tr> |
| 285 |
<tr> |
| 286 |
<td class="parameter_name"><p>working_directory</p></td> |
| 287 |
<td class="parameter_description"><p>child's current working directory or <code class="literal">NULL</code> to |
| 288 |
inherit parent's. </p></td> |
| 289 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> |
| 290 |
</tr> |
| 291 |
<tr> |
| 292 |
<td class="parameter_name"><p>argv</p></td> |
| 293 |
<td class="parameter_description"><p>child's argument vector.</p></td> |
| 294 |
<td class="parameter_annotations"> </td> |
| 295 |
</tr> |
| 296 |
<tr> |
| 297 |
<td class="parameter_name"><p>envp</p></td> |
| 298 |
<td class="parameter_description"><p>child's environment vector or <code class="literal">NULL</code> to inherit |
| 299 |
parent's. </p></td> |
| 300 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> |
| 301 |
</tr> |
| 302 |
<tr> |
| 303 |
<td class="parameter_name"><p>flags</p></td> |
| 304 |
<td class="parameter_description"><p>flags from <span class="type">GSpawnFlags</span>. <span class="type">G_SPAWN_DO_NOT_REAP_CHILD</span> |
| 305 |
is not allowed, use <a class="link" href="libxfce4ui-Spawn.html#xfce-spawn-on-screen-with-child-watch" title="xfce_spawn_on_screen_with_child_watch ()"><code class="function">xfce_spawn_on_screen_with_child_watch()</code></a> |
| 306 |
if you want a child watch.</p></td> |
| 307 |
<td class="parameter_annotations"> </td> |
| 308 |
</tr> |
| 309 |
<tr> |
| 310 |
<td class="parameter_name"><p>startup_notify</p></td> |
| 311 |
<td class="parameter_description"><p>whether to use startup notification.</p></td> |
| 312 |
<td class="parameter_annotations"> </td> |
| 313 |
</tr> |
| 314 |
<tr> |
| 315 |
<td class="parameter_name"><p>startup_timestamp</p></td> |
| 316 |
<td class="parameter_description"><p>the timestamp to pass to startup notification, use |
| 317 |
the event time here if possible to make focus |
| 318 |
stealing prevention work property. If you don't |
| 319 |
have direct access to the event time you could use |
| 320 |
<a href="/usr/share/gtk-doc/html/gtk3/gtk3-General.html#gtk-get-current-event-time"><code class="function">gtk_get_current_event_time()</code></a> or if nothing is |
| 321 |
available 0 is valid too.</p></td> |
| 322 |
<td class="parameter_annotations"> </td> |
| 323 |
</tr> |
| 324 |
<tr> |
| 325 |
<td class="parameter_name"><p>startup_icon_name</p></td> |
| 326 |
<td class="parameter_description"><p>application icon or <code class="literal">NULL</code>. </p></td> |
| 327 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> |
| 328 |
</tr> |
| 329 |
<tr> |
| 330 |
<td class="parameter_name"><p>error</p></td> |
| 331 |
<td class="parameter_description"><p>return location for errors or <code class="literal">NULL</code>. </p></td> |
| 332 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td> |
| 333 |
</tr> |
| 334 |
</tbody> |
| 335 |
</table></div> |
| 336 |
</div> |
| 337 |
<div class="refsect3"> |
| 338 |
<a name="xfce-spawn-on-screen.returns"></a><h4>Returns</h4> |
| 339 |
<p> <code class="literal">TRUE</code> on success, <code class="literal">FALSE</code> if <em class="parameter"><code>error</code></em> |
| 340 |
is set.</p> |
| 341 |
</div> |
| 342 |
</div> |
| 343 |
<hr> |
| 344 |
<div class="refsect2"> |
| 345 |
<a name="xfce-spawn"></a><h3>xfce_spawn ()</h3> |
| 346 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 347 |
xfce_spawn (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gdk3/GdkScreen.html#GdkScreen-struct"><span class="type">GdkScreen</span></a> *screen</code></em>, |
| 348 |
<em class="parameter"><code>const <span class="type">gchar</span> *working_directory</code></em>, |
| 349 |
<em class="parameter"><code><span class="type">gchar</span> **argv</code></em>, |
| 350 |
<em class="parameter"><code><span class="type">gchar</span> **envp</code></em>, |
| 351 |
<em class="parameter"><code><span class="type">GSpawnFlags</span> flags</code></em>, |
| 352 |
<em class="parameter"><code><span class="type">gboolean</span> startup_notify</code></em>, |
| 353 |
<em class="parameter"><code><span class="type">guint32</span> startup_timestamp</code></em>, |
| 354 |
<em class="parameter"><code>const <span class="type">gchar</span> *startup_icon_name</code></em>, |
| 355 |
<em class="parameter"><code><span class="type">gboolean</span> child_process</code></em>, |
| 356 |
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> |
| 357 |
<p>Like <code class="function">gdk_spawn_on_screen()</code> (GDK 2), but also supports startup notification |
| 358 |
(if Libxfce4ui was built with startup notification support).</p> |
| 359 |
<div class="refsect3"> |
| 360 |
<a name="xfce-spawn.parameters"></a><h4>Parameters</h4> |
| 361 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 362 |
<colgroup> |
| 363 |
<col width="150px" class="parameters_name"> |
| 364 |
<col class="parameters_description"> |
| 365 |
<col width="200px" class="parameters_annotations"> |
| 366 |
</colgroup> |
| 367 |
<tbody> |
| 368 |
<tr> |
| 369 |
<td class="parameter_name"><p>screen</p></td> |
| 370 |
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gdk3/GdkScreen.html#GdkScreen-struct"><span class="type">GdkScreen</span></a> or <code class="literal">NULL</code> to use the active screen, |
| 371 |
see <a class="link" href="libxfce4ui-Gdk-Extensions.html#xfce-gdk-screen-get-active" title="xfce_gdk_screen_get_active ()"><code class="function">xfce_gdk_screen_get_active()</code></a>. </p></td> |
| 372 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> |
| 373 |
</tr> |
| 374 |
<tr> |
| 375 |
<td class="parameter_name"><p>working_directory</p></td> |
| 376 |
<td class="parameter_description"><p>child's current working directory or <code class="literal">NULL</code> to |
| 377 |
inherit parent's. </p></td> |
| 378 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> |
| 379 |
</tr> |
| 380 |
<tr> |
| 381 |
<td class="parameter_name"><p>argv</p></td> |
| 382 |
<td class="parameter_description"><p>child's argument vector.</p></td> |
| 383 |
<td class="parameter_annotations"> </td> |
| 384 |
</tr> |
| 385 |
<tr> |
| 386 |
<td class="parameter_name"><p>envp</p></td> |
| 387 |
<td class="parameter_description"><p>child's environment vector or <code class="literal">NULL</code> to inherit |
| 388 |
parent's. </p></td> |
| 389 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> |
| 390 |
</tr> |
| 391 |
<tr> |
| 392 |
<td class="parameter_name"><p>flags</p></td> |
| 393 |
<td class="parameter_description"><p>flags from <span class="type">GSpawnFlags</span>. <span class="type">G_SPAWN_DO_NOT_REAP_CHILD</span> |
| 394 |
is not allowed, use <a class="link" href="libxfce4ui-Spawn.html#xfce-spawn-on-screen-with-child-watch" title="xfce_spawn_on_screen_with_child_watch ()"><code class="function">xfce_spawn_on_screen_with_child_watch()</code></a> |
| 395 |
if you want a child watch.</p></td> |
| 396 |
<td class="parameter_annotations"> </td> |
| 397 |
</tr> |
| 398 |
<tr> |
| 399 |
<td class="parameter_name"><p>startup_notify</p></td> |
| 400 |
<td class="parameter_description"><p>whether to use startup notification.</p></td> |
| 401 |
<td class="parameter_annotations"> </td> |
| 402 |
</tr> |
| 403 |
<tr> |
| 404 |
<td class="parameter_name"><p>startup_timestamp</p></td> |
| 405 |
<td class="parameter_description"><p>the timestamp to pass to startup notification, use |
| 406 |
the event time here if possible to make focus |
| 407 |
stealing prevention work property. If you don't |
| 408 |
have direct access to the event time you could use |
| 409 |
<a href="/usr/share/gtk-doc/html/gtk3/gtk3-General.html#gtk-get-current-event-time"><code class="function">gtk_get_current_event_time()</code></a> or if nothing is |
| 410 |
available 0 is valid too.</p></td> |
| 411 |
<td class="parameter_annotations"> </td> |
| 412 |
</tr> |
| 413 |
<tr> |
| 414 |
<td class="parameter_name"><p>startup_icon_name</p></td> |
| 415 |
<td class="parameter_description"><p>application icon or <code class="literal">NULL</code>. </p></td> |
| 416 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> |
| 417 |
</tr> |
| 418 |
<tr> |
| 419 |
<td class="parameter_name"><p>child_process</p></td> |
| 420 |
<td class="parameter_description"><p><code class="literal">TRUE</code> if the process should be a child process, |
| 421 |
<code class="literal">FALSE</code> if it should be reparented to init.</p></td> |
| 422 |
<td class="parameter_annotations"> </td> |
| 423 |
</tr> |
| 424 |
<tr> |
| 425 |
<td class="parameter_name"><p>error</p></td> |
| 426 |
<td class="parameter_description"><p>return location for errors or <code class="literal">NULL</code>. </p></td> |
| 427 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td> |
| 428 |
</tr> |
| 429 |
</tbody> |
| 430 |
</table></div> |
| 431 |
</div> |
| 432 |
<div class="refsect3"> |
| 433 |
<a name="xfce-spawn.returns"></a><h4>Returns</h4> |
| 434 |
<p> <code class="literal">TRUE</code> on success, <code class="literal">FALSE</code> if <em class="parameter"><code>error</code></em> |
| 435 |
is set.</p> |
| 436 |
</div> |
| 437 |
<p class="since">Since: <a class="link" href="api-index-4-16.html#api-index-4.16">4.16</a></p> |
| 438 |
</div> |
| 439 |
<hr> |
| 440 |
<div class="refsect2"> |
| 441 |
<a name="xfce-spawn-command-line-on-screen"></a><h3>xfce_spawn_command_line_on_screen ()</h3> |
| 442 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 443 |
xfce_spawn_command_line_on_screen (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gdk3/GdkScreen.html#GdkScreen-struct"><span class="type">GdkScreen</span></a> *screen</code></em>, |
| 444 |
<em class="parameter"><code>const <span class="type">gchar</span> *command_line</code></em>, |
| 445 |
<em class="parameter"><code><span class="type">gboolean</span> in_terminal</code></em>, |
| 446 |
<em class="parameter"><code><span class="type">gboolean</span> startup_notify</code></em>, |
| 447 |
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> |
| 448 |
<div class="warning"> |
| 449 |
<p><code class="literal">xfce_spawn_command_line_on_screen</code> has been deprecated since version 4.16 and should not be used in newly-written code.</p> |
| 450 |
<p>Use <a class="link" href="libxfce4ui-Spawn.html#xfce-spawn-command-line" title="xfce_spawn_command_line ()"><span class="type">xfce_spawn_command_line</span></a> instead.</p> |
| 451 |
</div> |
| 452 |
<p>Executes the given <em class="parameter"><code>command_line</code></em> |
| 453 |
and returns <code class="literal">TRUE</code> if the |
| 454 |
command terminated successfully. Else, the <em class="parameter"><code>error</code></em> |
| 455 |
is set |
| 456 |
to the standard error output.</p> |
| 457 |
<div class="refsect3"> |
| 458 |
<a name="xfce-spawn-command-line-on-screen.parameters"></a><h4>Parameters</h4> |
| 459 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 460 |
<colgroup> |
| 461 |
<col width="150px" class="parameters_name"> |
| 462 |
<col class="parameters_description"> |
| 463 |
<col width="200px" class="parameters_annotations"> |
| 464 |
</colgroup> |
| 465 |
<tbody> |
| 466 |
<tr> |
| 467 |
<td class="parameter_name"><p>screen</p></td> |
| 468 |
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gdk3/GdkScreen.html#GdkScreen-struct"><span class="type">GdkScreen</span></a> or <code class="literal">NULL</code> to use the active screen, see <a class="link" href="libxfce4ui-Gdk-Extensions.html#xfce-gdk-screen-get-active" title="xfce_gdk_screen_get_active ()"><code class="function">xfce_gdk_screen_get_active()</code></a>. </p></td> |
| 469 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> |
| 470 |
</tr> |
| 471 |
<tr> |
| 472 |
<td class="parameter_name"><p>command_line</p></td> |
| 473 |
<td class="parameter_description"><p>command line to run.</p></td> |
| 474 |
<td class="parameter_annotations"> </td> |
| 475 |
</tr> |
| 476 |
<tr> |
| 477 |
<td class="parameter_name"><p>in_terminal</p></td> |
| 478 |
<td class="parameter_description"><p>whether to run <em class="parameter"><code>command_line</code></em> |
| 479 |
in a terminal.</p></td> |
| 480 |
<td class="parameter_annotations"> </td> |
| 481 |
</tr> |
| 482 |
<tr> |
| 483 |
<td class="parameter_name"><p>startup_notify</p></td> |
| 484 |
<td class="parameter_description"><p>whether to use startup notification.</p></td> |
| 485 |
<td class="parameter_annotations"> </td> |
| 486 |
</tr> |
| 487 |
<tr> |
| 488 |
<td class="parameter_name"><p>error</p></td> |
| 489 |
<td class="parameter_description"><p>location for a <span class="type">GError</span> or <code class="literal">NULL</code>. </p></td> |
| 490 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td> |
| 491 |
</tr> |
| 492 |
</tbody> |
| 493 |
</table></div> |
| 494 |
</div> |
| 495 |
<div class="refsect3"> |
| 496 |
<a name="xfce-spawn-command-line-on-screen.returns"></a><h4>Returns</h4> |
| 497 |
<p> <code class="literal">TRUE</code> if the <em class="parameter"><code>command_line</code></em> |
| 498 |
was executed |
| 499 |
successfully, <code class="literal">FALSE</code> if <em class="parameter"><code>error</code></em> |
| 500 |
is set.</p> |
| 501 |
</div> |
| 502 |
</div> |
| 503 |
<hr> |
| 504 |
<div class="refsect2"> |
| 505 |
<a name="xfce-spawn-command-line"></a><h3>xfce_spawn_command_line ()</h3> |
| 506 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 507 |
xfce_spawn_command_line (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gdk3/GdkScreen.html#GdkScreen-struct"><span class="type">GdkScreen</span></a> *screen</code></em>, |
| 508 |
<em class="parameter"><code>const <span class="type">gchar</span> *command_line</code></em>, |
| 509 |
<em class="parameter"><code><span class="type">gboolean</span> in_terminal</code></em>, |
| 510 |
<em class="parameter"><code><span class="type">gboolean</span> startup_notify</code></em>, |
| 511 |
<em class="parameter"><code><span class="type">gboolean</span> child_process</code></em>, |
| 512 |
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> |
| 513 |
<p>Executes the given <em class="parameter"><code>command_line</code></em> |
| 514 |
and returns <code class="literal">TRUE</code> if the |
| 515 |
command terminated successfully. Else, the <em class="parameter"><code>error</code></em> |
| 516 |
is set |
| 517 |
to the standard error output.</p> |
| 518 |
<div class="refsect3"> |
| 519 |
<a name="xfce-spawn-command-line.parameters"></a><h4>Parameters</h4> |
| 520 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 521 |
<colgroup> |
| 522 |
<col width="150px" class="parameters_name"> |
| 523 |
<col class="parameters_description"> |
| 524 |
<col width="200px" class="parameters_annotations"> |
| 525 |
</colgroup> |
| 526 |
<tbody> |
| 527 |
<tr> |
| 528 |
<td class="parameter_name"><p>screen</p></td> |
| 529 |
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gdk3/GdkScreen.html#GdkScreen-struct"><span class="type">GdkScreen</span></a> or <code class="literal">NULL</code> to use the active screen, see <a class="link" href="libxfce4ui-Gdk-Extensions.html#xfce-gdk-screen-get-active" title="xfce_gdk_screen_get_active ()"><code class="function">xfce_gdk_screen_get_active()</code></a>. </p></td> |
| 530 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> |
| 531 |
</tr> |
| 532 |
<tr> |
| 533 |
<td class="parameter_name"><p>command_line</p></td> |
| 534 |
<td class="parameter_description"><p>command line to run.</p></td> |
| 535 |
<td class="parameter_annotations"> </td> |
| 536 |
</tr> |
| 537 |
<tr> |
| 538 |
<td class="parameter_name"><p>in_terminal</p></td> |
| 539 |
<td class="parameter_description"><p>whether to run <em class="parameter"><code>command_line</code></em> |
| 540 |
in a terminal.</p></td> |
| 541 |
<td class="parameter_annotations"> </td> |
| 542 |
</tr> |
| 543 |
<tr> |
| 544 |
<td class="parameter_name"><p>startup_notify</p></td> |
| 545 |
<td class="parameter_description"><p>whether to use startup notification.</p></td> |
| 546 |
<td class="parameter_annotations"> </td> |
| 547 |
</tr> |
| 548 |
<tr> |
| 549 |
<td class="parameter_name"><p>child_process</p></td> |
| 550 |
<td class="parameter_description"><p><code class="literal">TRUE</code> if the process should be a child process, <code class="literal">FALSE</code> if it should be reparented to init.</p></td> |
| 551 |
<td class="parameter_annotations"> </td> |
| 552 |
</tr> |
| 553 |
<tr> |
| 554 |
<td class="parameter_name"><p>error</p></td> |
| 555 |
<td class="parameter_description"><p>location for a <span class="type">GError</span> or <code class="literal">NULL</code>. </p></td> |
| 556 |
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></td> |
| 557 |
</tr> |
| 558 |
</tbody> |
| 559 |
</table></div> |
| 560 |
</div> |
| 561 |
<div class="refsect3"> |
| 562 |
<a name="xfce-spawn-command-line.returns"></a><h4>Returns</h4> |
| 563 |
<p> <code class="literal">TRUE</code> if the <em class="parameter"><code>command_line</code></em> |
| 564 |
was executed |
| 565 |
successfully, <code class="literal">FALSE</code> if <em class="parameter"><code>error</code></em> |
| 566 |
is set.</p> |
| 567 |
</div> |
| 568 |
<p class="since">Since: <a class="link" href="api-index-4-16.html#api-index-4.16">4.16</a></p> |
| 569 |
</div> |
| 570 |
</div> |
| 571 |
</div> |
| 572 |
<div class="footer"> |
| 573 |
<hr>Generated by GTK-Doc V1.34.0</div> |
| 574 |
</body> |
| 575 |
</html> |