| 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>XfceSMClient: 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="XfceClipboardManager.html" title="XfceClipboardManager"> |
| 10 |
<link rel="next" href="XfceScreensaver.html" title="XfceScreensaver"> |
| 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="#XfceSMClient.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> |
| 19 |
<a href="#XfceSMClient.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span> |
| 20 |
<a href="#XfceSMClient.properties" class="shortcut">Properties</a></span><span id="nav_signals"> <span class="dim">|</span> |
| 21 |
<a href="#XfceSMClient.signals" class="shortcut">Signals</a></span> |
| 22 |
</td> |
| 23 |
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
| 24 |
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> |
| 25 |
<td><a accesskey="p" href="XfceClipboardManager.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> |
| 26 |
<td><a accesskey="n" href="XfceScreensaver.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> |
| 27 |
</tr></table> |
| 28 |
<div class="refentry"> |
| 29 |
<a name="XfceSMClient"></a><div class="titlepage"></div> |
| 30 |
<div class="refnamediv"><table width="100%"><tr> |
| 31 |
<td valign="top"> |
| 32 |
<h2><span class="refentrytitle"><a name="XfceSMClient.top_of_page"></a>XfceSMClient</span></h2> |
| 33 |
<p>XfceSMClient — Session management client</p> |
| 34 |
</td> |
| 35 |
<td class="gallery_image" valign="top" align="right"></td> |
| 36 |
</tr></table></div> |
| 37 |
<div class="refsect1"> |
| 38 |
<a name="XfceSMClient.stability-level"></a><h2>Stability Level</h2> |
| 39 |
<acronym title="The intention of a Stable interface is to enable arbitrary third parties to |
| 40 |
develop applications to these interfaces, release them, and have confidence that |
| 41 |
they will run on all minor releases of the product (after the one in which the |
| 42 |
interface was introduced, and within the same major release). Even at a major |
| 43 |
release, incompatible changes are expected to be rare, and to have strong |
| 44 |
justifications. |
| 45 |
"><span class="acronym">Stable</span></acronym>, unless otherwise indicated |
| 46 |
</div> |
| 47 |
<div class="refsect1"> |
| 48 |
<a name="XfceSMClient.functions"></a><h2>Functions</h2> |
| 49 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 50 |
<colgroup> |
| 51 |
<col width="150px" class="functions_proto_type"> |
| 52 |
<col class="functions_proto_name"> |
| 53 |
</colgroup> |
| 54 |
<tbody> |
| 55 |
<tr> |
| 56 |
<td class="function_type"> |
| 57 |
<span class="returnvalue">GOptionGroup</span> * |
| 58 |
</td> |
| 59 |
<td class="function_name"> |
| 60 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-get-option-group" title="xfce_sm_client_get_option_group ()">xfce_sm_client_get_option_group</a> <span class="c_punctuation">()</span> |
| 61 |
</td> |
| 62 |
</tr> |
| 63 |
<tr> |
| 64 |
<td class="function_type"> |
| 65 |
<a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="returnvalue">XfceSMClient</span></a> * |
| 66 |
</td> |
| 67 |
<td class="function_name"> |
| 68 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-get" title="xfce_sm_client_get ()">xfce_sm_client_get</a> <span class="c_punctuation">()</span> |
| 69 |
</td> |
| 70 |
</tr> |
| 71 |
<tr> |
| 72 |
<td class="function_type"> |
| 73 |
<a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="returnvalue">XfceSMClient</span></a> * |
| 74 |
</td> |
| 75 |
<td class="function_name"> |
| 76 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-get-with-argv" title="xfce_sm_client_get_with_argv ()">xfce_sm_client_get_with_argv</a> <span class="c_punctuation">()</span> |
| 77 |
</td> |
| 78 |
</tr> |
| 79 |
<tr> |
| 80 |
<td class="function_type"> |
| 81 |
<a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="returnvalue">XfceSMClient</span></a> * |
| 82 |
</td> |
| 83 |
<td class="function_name"> |
| 84 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-get-full" title="xfce_sm_client_get_full ()">xfce_sm_client_get_full</a> <span class="c_punctuation">()</span> |
| 85 |
</td> |
| 86 |
</tr> |
| 87 |
<tr> |
| 88 |
<td class="function_type"> |
| 89 |
<span class="returnvalue">gboolean</span> |
| 90 |
</td> |
| 91 |
<td class="function_name"> |
| 92 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-connect" title="xfce_sm_client_connect ()">xfce_sm_client_connect</a> <span class="c_punctuation">()</span> |
| 93 |
</td> |
| 94 |
</tr> |
| 95 |
<tr> |
| 96 |
<td class="function_type"> |
| 97 |
<span class="returnvalue">void</span> |
| 98 |
</td> |
| 99 |
<td class="function_name"> |
| 100 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-disconnect" title="xfce_sm_client_disconnect ()">xfce_sm_client_disconnect</a> <span class="c_punctuation">()</span> |
| 101 |
</td> |
| 102 |
</tr> |
| 103 |
<tr> |
| 104 |
<td class="function_type"> |
| 105 |
<span class="returnvalue">gboolean</span> |
| 106 |
</td> |
| 107 |
<td class="function_name"> |
| 108 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-is-connected" title="xfce_sm_client_is_connected ()">xfce_sm_client_is_connected</a> <span class="c_punctuation">()</span> |
| 109 |
</td> |
| 110 |
</tr> |
| 111 |
<tr> |
| 112 |
<td class="function_type"> |
| 113 |
<span class="returnvalue">gboolean</span> |
| 114 |
</td> |
| 115 |
<td class="function_name"> |
| 116 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-is-resumed" title="xfce_sm_client_is_resumed ()">xfce_sm_client_is_resumed</a> <span class="c_punctuation">()</span> |
| 117 |
</td> |
| 118 |
</tr> |
| 119 |
<tr> |
| 120 |
<td class="function_type"> |
| 121 |
<span class="returnvalue">void</span> |
| 122 |
</td> |
| 123 |
<td class="function_name"> |
| 124 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-set-desktop-file" title="xfce_sm_client_set_desktop_file ()">xfce_sm_client_set_desktop_file</a> <span class="c_punctuation">()</span> |
| 125 |
</td> |
| 126 |
</tr> |
| 127 |
<tr> |
| 128 |
<td class="function_type"> |
| 129 |
<span class="returnvalue">void</span> |
| 130 |
</td> |
| 131 |
<td class="function_name"> |
| 132 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-request-shutdown" title="xfce_sm_client_request_shutdown ()">xfce_sm_client_request_shutdown</a> <span class="c_punctuation">()</span> |
| 133 |
</td> |
| 134 |
</tr> |
| 135 |
<tr> |
| 136 |
<td class="function_type">const <span class="returnvalue">gchar</span> * |
| 137 |
</td> |
| 138 |
<td class="function_name"> |
| 139 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-get-client-id" title="xfce_sm_client_get_client_id ()">xfce_sm_client_get_client_id</a> <span class="c_punctuation">()</span> |
| 140 |
</td> |
| 141 |
</tr> |
| 142 |
<tr> |
| 143 |
<td class="function_type">const <span class="returnvalue">gchar</span> * |
| 144 |
</td> |
| 145 |
<td class="function_name"> |
| 146 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-get-state-file" title="xfce_sm_client_get_state_file ()">xfce_sm_client_get_state_file</a> <span class="c_punctuation">()</span> |
| 147 |
</td> |
| 148 |
</tr> |
| 149 |
<tr> |
| 150 |
<td class="function_type">const <span class="returnvalue">gchar</span> * |
| 151 |
</td> |
| 152 |
<td class="function_name"> |
| 153 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-get-current-directory" title="xfce_sm_client_get_current_directory ()">xfce_sm_client_get_current_directory</a> <span class="c_punctuation">()</span> |
| 154 |
</td> |
| 155 |
</tr> |
| 156 |
<tr> |
| 157 |
<td class="function_type"> |
| 158 |
<span class="returnvalue">void</span> |
| 159 |
</td> |
| 160 |
<td class="function_name"> |
| 161 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-set-current-directory" title="xfce_sm_client_set_current_directory ()">xfce_sm_client_set_current_directory</a> <span class="c_punctuation">()</span> |
| 162 |
</td> |
| 163 |
</tr> |
| 164 |
<tr> |
| 165 |
<td class="function_type"> |
| 166 |
<span class="returnvalue">guint8</span> |
| 167 |
</td> |
| 168 |
<td class="function_name"> |
| 169 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-get-priority" title="xfce_sm_client_get_priority ()">xfce_sm_client_get_priority</a> <span class="c_punctuation">()</span> |
| 170 |
</td> |
| 171 |
</tr> |
| 172 |
<tr> |
| 173 |
<td class="function_type"> |
| 174 |
<span class="returnvalue">void</span> |
| 175 |
</td> |
| 176 |
<td class="function_name"> |
| 177 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-set-priority" title="xfce_sm_client_set_priority ()">xfce_sm_client_set_priority</a> <span class="c_punctuation">()</span> |
| 178 |
</td> |
| 179 |
</tr> |
| 180 |
<tr> |
| 181 |
<td class="function_type">const <span class="returnvalue">gchar</span> *const * |
| 182 |
</td> |
| 183 |
<td class="function_name"> |
| 184 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-get-restart-command" title="xfce_sm_client_get_restart_command ()">xfce_sm_client_get_restart_command</a> <span class="c_punctuation">()</span> |
| 185 |
</td> |
| 186 |
</tr> |
| 187 |
<tr> |
| 188 |
<td class="function_type"> |
| 189 |
<span class="returnvalue">void</span> |
| 190 |
</td> |
| 191 |
<td class="function_name"> |
| 192 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-set-restart-command" title="xfce_sm_client_set_restart_command ()">xfce_sm_client_set_restart_command</a> <span class="c_punctuation">()</span> |
| 193 |
</td> |
| 194 |
</tr> |
| 195 |
<tr> |
| 196 |
<td class="function_type"> |
| 197 |
<a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle" title="enum XfceSMClientRestartStyle"><span class="returnvalue">XfceSMClientRestartStyle</span></a> |
| 198 |
</td> |
| 199 |
<td class="function_name"> |
| 200 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-get-restart-style" title="xfce_sm_client_get_restart_style ()">xfce_sm_client_get_restart_style</a> <span class="c_punctuation">()</span> |
| 201 |
</td> |
| 202 |
</tr> |
| 203 |
<tr> |
| 204 |
<td class="function_type"> |
| 205 |
<span class="returnvalue">void</span> |
| 206 |
</td> |
| 207 |
<td class="function_name"> |
| 208 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-set-restart-style" title="xfce_sm_client_set_restart_style ()">xfce_sm_client_set_restart_style</a> <span class="c_punctuation">()</span> |
| 209 |
</td> |
| 210 |
</tr> |
| 211 |
</tbody> |
| 212 |
</table></div> |
| 213 |
</div> |
| 214 |
<div class="refsect1"> |
| 215 |
<a name="XfceSMClient.properties"></a><h2>Properties</h2> |
| 216 |
<div class="informaltable"><table class="informaltable" border="0"> |
| 217 |
<colgroup> |
| 218 |
<col width="150px" class="properties_type"> |
| 219 |
<col width="300px" class="properties_name"> |
| 220 |
<col width="200px" class="properties_flags"> |
| 221 |
</colgroup> |
| 222 |
<tbody> |
| 223 |
<tr> |
| 224 |
<td class="property_type"><span class="type">int</span></td> |
| 225 |
<td class="property_name"><a class="link" href="XfceSMClient.html#XfceSMClient--argc" title="The “argc” property">argc</a></td> |
| 226 |
<td class="property_flags">Write / Construct Only</td> |
| 227 |
</tr> |
| 228 |
<tr> |
| 229 |
<td class="property_type"><span class="type">GStrv</span></td> |
| 230 |
<td class="property_name"><a class="link" href="XfceSMClient.html#XfceSMClient--argv" title="The “argv” property">argv</a></td> |
| 231 |
<td class="property_flags">Write / Construct Only</td> |
| 232 |
</tr> |
| 233 |
<tr> |
| 234 |
<td class="property_type"> |
| 235 |
<span class="type">char</span> *</td> |
| 236 |
<td class="property_name"><a class="link" href="XfceSMClient.html#XfceSMClient--client-id" title="The “client-id” property">client-id</a></td> |
| 237 |
<td class="property_flags">Read / Write / Construct Only</td> |
| 238 |
</tr> |
| 239 |
<tr> |
| 240 |
<td class="property_type"> |
| 241 |
<span class="type">char</span> *</td> |
| 242 |
<td class="property_name"><a class="link" href="XfceSMClient.html#XfceSMClient--current-directory" title="The “current-directory” property">current-directory</a></td> |
| 243 |
<td class="property_flags">Read / Write</td> |
| 244 |
</tr> |
| 245 |
<tr> |
| 246 |
<td class="property_type"> |
| 247 |
<span class="type">char</span> *</td> |
| 248 |
<td class="property_name"><a class="link" href="XfceSMClient.html#XfceSMClient--desktop-file" title="The “desktop-file” property">desktop-file</a></td> |
| 249 |
<td class="property_flags">Read / Write</td> |
| 250 |
</tr> |
| 251 |
<tr> |
| 252 |
<td class="property_type"><span class="type">guchar</span></td> |
| 253 |
<td class="property_name"><a class="link" href="XfceSMClient.html#XfceSMClient--priority" title="The “priority” property">priority</a></td> |
| 254 |
<td class="property_flags">Read / Write / Construct</td> |
| 255 |
</tr> |
| 256 |
<tr> |
| 257 |
<td class="property_type"><span class="type">GStrv</span></td> |
| 258 |
<td class="property_name"><a class="link" href="XfceSMClient.html#XfceSMClient--restart-command" title="The “restart-command” property">restart-command</a></td> |
| 259 |
<td class="property_flags">Read / Write</td> |
| 260 |
</tr> |
| 261 |
<tr> |
| 262 |
<td class="property_type"><a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle" title="enum XfceSMClientRestartStyle"><span class="type">XfceSMClientRestartStyle</span></a></td> |
| 263 |
<td class="property_name"><a class="link" href="XfceSMClient.html#XfceSMClient--restart-style" title="The “restart-style” property">restart-style</a></td> |
| 264 |
<td class="property_flags">Read / Write / Construct</td> |
| 265 |
</tr> |
| 266 |
<tr> |
| 267 |
<td class="property_type"><span class="type">gboolean</span></td> |
| 268 |
<td class="property_name"><a class="link" href="XfceSMClient.html#XfceSMClient--resumed" title="The “resumed” property">resumed</a></td> |
| 269 |
<td class="property_flags">Read</td> |
| 270 |
</tr> |
| 271 |
</tbody> |
| 272 |
</table></div> |
| 273 |
</div> |
| 274 |
<div class="refsect1"> |
| 275 |
<a name="XfceSMClient.signals"></a><h2>Signals</h2> |
| 276 |
<div class="informaltable"><table class="informaltable" border="0"> |
| 277 |
<colgroup> |
| 278 |
<col width="150px" class="signal_proto_type"> |
| 279 |
<col width="300px" class="signal_proto_name"> |
| 280 |
<col width="200px" class="signal_proto_flags"> |
| 281 |
</colgroup> |
| 282 |
<tbody> |
| 283 |
<tr> |
| 284 |
<td class="signal_type"><span class="returnvalue">void</span></td> |
| 285 |
<td class="signal_name"><a class="link" href="XfceSMClient.html#XfceSMClient-quit" title="The “quit” signal">quit</a></td> |
| 286 |
<td class="signal_flags">Run Last</td> |
| 287 |
</tr> |
| 288 |
<tr> |
| 289 |
<td class="signal_type"><span class="returnvalue">void</span></td> |
| 290 |
<td class="signal_name"><a class="link" href="XfceSMClient.html#XfceSMClient-quit-cancelled" title="The “quit-cancelled” signal">quit-cancelled</a></td> |
| 291 |
<td class="signal_flags">Run Last</td> |
| 292 |
</tr> |
| 293 |
<tr> |
| 294 |
<td class="signal_type"><span class="returnvalue">gboolean</span></td> |
| 295 |
<td class="signal_name"><a class="link" href="XfceSMClient.html#XfceSMClient-quit-requested" title="The “quit-requested” signal">quit-requested</a></td> |
| 296 |
<td class="signal_flags">Run Last</td> |
| 297 |
</tr> |
| 298 |
<tr> |
| 299 |
<td class="signal_type"><span class="returnvalue">void</span></td> |
| 300 |
<td class="signal_name"><a class="link" href="XfceSMClient.html#XfceSMClient-save-state" title="The “save-state” signal">save-state</a></td> |
| 301 |
<td class="signal_flags">Run Last</td> |
| 302 |
</tr> |
| 303 |
<tr> |
| 304 |
<td class="signal_type"><span class="returnvalue">void</span></td> |
| 305 |
<td class="signal_name"><a class="link" href="XfceSMClient.html#XfceSMClient-save-state-extended" title="The “save-state-extended” signal">save-state-extended</a></td> |
| 306 |
<td class="signal_flags">Run Last</td> |
| 307 |
</tr> |
| 308 |
</tbody> |
| 309 |
</table></div> |
| 310 |
</div> |
| 311 |
<div class="refsect1"> |
| 312 |
<a name="XfceSMClient.other"></a><h2>Types and Values</h2> |
| 313 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 314 |
<colgroup> |
| 315 |
<col width="150px" class="other_proto_type"> |
| 316 |
<col class="other_proto_name"> |
| 317 |
</colgroup> |
| 318 |
<tbody> |
| 319 |
<tr> |
| 320 |
<td class="datatype_keyword"> </td> |
| 321 |
<td class="function_name"><a class="link" href="XfceSMClient.html#XfceSMClient-struct" title="XfceSMClient">XfceSMClient</a></td> |
| 322 |
</tr> |
| 323 |
<tr> |
| 324 |
<td class="datatype_keyword">enum</td> |
| 325 |
<td class="function_name"><a class="link" href="XfceSMClient.html#XfceSMClientPriority" title="enum XfceSMClientPriority">XfceSMClientPriority</a></td> |
| 326 |
</tr> |
| 327 |
<tr> |
| 328 |
<td class="datatype_keyword">enum</td> |
| 329 |
<td class="function_name"><a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle" title="enum XfceSMClientRestartStyle">XfceSMClientRestartStyle</a></td> |
| 330 |
</tr> |
| 331 |
<tr> |
| 332 |
<td class="datatype_keyword">enum</td> |
| 333 |
<td class="function_name"><a class="link" href="XfceSMClient.html#XfceSMClientShutdownHint" title="enum XfceSMClientShutdownHint">XfceSMClientShutdownHint</a></td> |
| 334 |
</tr> |
| 335 |
<tr> |
| 336 |
<td class="define_keyword">#define</td> |
| 337 |
<td class="function_name"><a class="link" href="XfceSMClient.html#XFCE-SM-CLIENT-ERROR:CAPS" title="XFCE_SM_CLIENT_ERROR">XFCE_SM_CLIENT_ERROR</a></td> |
| 338 |
</tr> |
| 339 |
<tr> |
| 340 |
<td class="datatype_keyword">enum</td> |
| 341 |
<td class="function_name"><a class="link" href="XfceSMClient.html#XfceSmCLientErrorEnum" title="enum XfceSmCLientErrorEnum">XfceSmCLientErrorEnum</a></td> |
| 342 |
</tr> |
| 343 |
</tbody> |
| 344 |
</table></div> |
| 345 |
</div> |
| 346 |
<div class="refsect1"> |
| 347 |
<a name="XfceSMClient.object-hierarchy"></a><h2>Object Hierarchy</h2> |
| 348 |
<pre class="screen"> <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GEnum</a> |
| 349 |
<span class="lineart">├──</span> XfceSMClientRestartStyle |
| 350 |
<span class="lineart">├──</span> XfceSMClientShutdownHint |
| 351 |
<span class="lineart">╰──</span> XfceSmCLientErrorEnum |
| 352 |
GObject |
| 353 |
<span class="lineart">╰──</span> XfceSMClient |
| 354 |
</pre> |
| 355 |
</div> |
| 356 |
<div class="refsect1"> |
| 357 |
<a name="XfceSMClient.includes"></a><h2>Includes</h2> |
| 358 |
<pre class="synopsis">#include <libxfce4ui/libxfce4ui.h> |
| 359 |
</pre> |
| 360 |
</div> |
| 361 |
<div class="refsect1"> |
| 362 |
<a name="XfceSMClient.description"></a><h2>Description</h2> |
| 363 |
<p><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> is a session management client that speaks the X Session |
| 364 |
Management Protocol (XSMP). It's designed to be easy to use and hide some |
| 365 |
of the more esoteric feaures of XSMP from the API user.</p> |
| 366 |
</div> |
| 367 |
<div class="refsect1"> |
| 368 |
<a name="XfceSMClient.functions_details"></a><h2>Functions</h2> |
| 369 |
<div class="refsect2"> |
| 370 |
<a name="xfce-sm-client-get-option-group"></a><h3>xfce_sm_client_get_option_group ()</h3> |
| 371 |
<pre class="programlisting"><span class="returnvalue">GOptionGroup</span> * |
| 372 |
xfce_sm_client_get_option_group (<em class="parameter"><code><span class="type">gint</span> argc</code></em>, |
| 373 |
<em class="parameter"><code><span class="type">gchar</span> **argv</code></em>);</pre> |
| 374 |
<p>Constructs a <span class="type">GOptionGroup</span> suitable for use with Glib's |
| 375 |
command-line option parser.</p> |
| 376 |
<p>This function is a bit sneaky in that it will make a copy of |
| 377 |
the program's argc and argv <span class="emphasis"><em>before</em></span> GTK+ etc. |
| 378 |
has a chance to mess around with it, so <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> can later |
| 379 |
construct an accurate restart command. Instead of calling |
| 380 |
<a href="/usr/share/gtk-doc/html/gtk3/gtk3-General.html#gtk-init"><code class="function">gtk_init()</code></a> or <a href="/usr/share/gtk-doc/html/gtk3/gtk3-General.html#gtk-init-with-args"><code class="function">gtk_init_with_args()</code></a>, instead you'd do something |
| 381 |
like:</p> |
| 382 |
<div class="informalexample"> |
| 383 |
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> |
| 384 |
<tbody> |
| 385 |
<tr> |
| 386 |
<td class="listing_lines" align="right"><pre>1 |
| 387 |
2 |
| 388 |
3 |
| 389 |
4</pre></td> |
| 390 |
<td class="listing_code"><pre class="programlisting"><span class="n">GOptionContext</span><span class="w"> </span><span class="o">*</span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_option_context_new</span><span class="p">(</span><span class="s">""</span><span class="p">);</span> |
| 391 |
<span class="n">g_option_context_add_group</span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">gtk_get_option_group</span><span class="p">(</span><span class="n">TRUE</span><span class="p">));</span> |
| 392 |
<span class="n">g_option_context_add_group</span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">xfce_sm_client_get_option_group</span><span class="p">(</span><span class="n">argc</span><span class="p">,</span><span class="w"> </span><span class="n">argv</span><span class="p">);</span> |
| 393 |
<span class="n">g_option_context_parse</span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">argc</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">argv</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span></pre></td> |
| 394 |
</tr> |
| 395 |
</tbody> |
| 396 |
</table> |
| 397 |
</div> |
| 398 |
|
| 399 |
<p>Error checking is omitted here for brevity, and of course you could |
| 400 |
add your app's own options with <code class="function">g_option_context_add_main_entries()</code> |
| 401 |
or similar.</p> |
| 402 |
<div class="refsect3"> |
| 403 |
<a name="xfce-sm-client-get-option-group.parameters"></a><h4>Parameters</h4> |
| 404 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 405 |
<colgroup> |
| 406 |
<col width="150px" class="parameters_name"> |
| 407 |
<col class="parameters_description"> |
| 408 |
<col width="200px" class="parameters_annotations"> |
| 409 |
</colgroup> |
| 410 |
<tbody> |
| 411 |
<tr> |
| 412 |
<td class="parameter_name"><p>argc</p></td> |
| 413 |
<td class="parameter_description"><p>The application's argument count</p></td> |
| 414 |
<td class="parameter_annotations"> </td> |
| 415 |
</tr> |
| 416 |
<tr> |
| 417 |
<td class="parameter_name"><p>argv</p></td> |
| 418 |
<td class="parameter_description"><p>The application's argument vector</p></td> |
| 419 |
<td class="parameter_annotations"> </td> |
| 420 |
</tr> |
| 421 |
</tbody> |
| 422 |
</table></div> |
| 423 |
</div> |
| 424 |
<div class="refsect3"> |
| 425 |
<a name="xfce-sm-client-get-option-group.returns"></a><h4>Returns</h4> |
| 426 |
<p> A new <span class="type">GOptionGroup</span></p> |
| 427 |
</div> |
| 428 |
</div> |
| 429 |
<hr> |
| 430 |
<div class="refsect2"> |
| 431 |
<a name="xfce-sm-client-get"></a><h3>xfce_sm_client_get ()</h3> |
| 432 |
<pre class="programlisting"><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="returnvalue">XfceSMClient</span></a> * |
| 433 |
xfce_sm_client_get (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> |
| 434 |
<p>Gets the application's SM client instance. This is best |
| 435 |
used with <a class="link" href="XfceSMClient.html#xfce-sm-client-get-option-group" title="xfce_sm_client_get_option_group ()"><code class="function">xfce_sm_client_get_option_group()</code></a> above (and using |
| 436 |
the returned <span class="type">GOptionGroup</span> with <code class="function">g_option_context_parse()</code>), as the |
| 437 |
command line parsing will figure out many of the SM client's |
| 438 |
required property values for you.</p> |
| 439 |
<p>If you have already created an <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> instance using |
| 440 |
this function, this will return the same instance, i.e. you should |
| 441 |
*only* unref the first instance.</p> |
| 442 |
<p><span class="annotation">[<acronym title="This symbol is a constructor, not a static method."><span class="acronym">constructor</span></acronym>]</span></p> |
| 443 |
<div class="refsect3"> |
| 444 |
<a name="xfce-sm-client-get.returns"></a><h4>Returns</h4> |
| 445 |
<p> A new <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> instance -transfer full- on the first call only, |
| 446 |
other calls to this function are transfer none</p> |
| 447 |
</div> |
| 448 |
</div> |
| 449 |
<hr> |
| 450 |
<div class="refsect2"> |
| 451 |
<a name="xfce-sm-client-get-with-argv"></a><h3>xfce_sm_client_get_with_argv ()</h3> |
| 452 |
<pre class="programlisting"><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="returnvalue">XfceSMClient</span></a> * |
| 453 |
xfce_sm_client_get_with_argv (<em class="parameter"><code><span class="type">gint</span> argc</code></em>, |
| 454 |
<em class="parameter"><code><span class="type">gchar</span> **argv</code></em>, |
| 455 |
<em class="parameter"><code><a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle" title="enum XfceSMClientRestartStyle"><span class="type">XfceSMClientRestartStyle</span></a> restart_style</code></em>, |
| 456 |
<em class="parameter"><code><span class="type">guchar</span> priority</code></em>);</pre> |
| 457 |
<p>Creates a new <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> instance. It attempts to |
| 458 |
set all required properties using the app's command line. |
| 459 |
Note that this function does not actually connect to the session |
| 460 |
manager, so other actions can be taken (such as setting custom |
| 461 |
properties or connecting signals) before calling |
| 462 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-connect" title="xfce_sm_client_connect ()"><code class="function">xfce_sm_client_connect()</code></a>.</p> |
| 463 |
<p>If you are using Gtk or Glib's command-line option parser, |
| 464 |
it is recommended that you use <a class="link" href="XfceSMClient.html#xfce-sm-client-get-option-group" title="xfce_sm_client_get_option_group ()"><code class="function">xfce_sm_client_get_option_group()</code></a> |
| 465 |
and <a class="link" href="XfceSMClient.html#xfce-sm-client-get" title="xfce_sm_client_get ()"><code class="function">xfce_sm_client_get()</code></a> instead.</p> |
| 466 |
<p><span class="annotation">[<acronym title="This symbol is a constructor, not a static method."><span class="acronym">constructor</span></acronym>]</span></p> |
| 467 |
<div class="refsect3"> |
| 468 |
<a name="xfce-sm-client-get-with-argv.parameters"></a><h4>Parameters</h4> |
| 469 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 470 |
<colgroup> |
| 471 |
<col width="150px" class="parameters_name"> |
| 472 |
<col class="parameters_description"> |
| 473 |
<col width="200px" class="parameters_annotations"> |
| 474 |
</colgroup> |
| 475 |
<tbody> |
| 476 |
<tr> |
| 477 |
<td class="parameter_name"><p>argc</p></td> |
| 478 |
<td class="parameter_description"><p>The number of arguments passed to <code class="function">main()</code></p></td> |
| 479 |
<td class="parameter_annotations"> </td> |
| 480 |
</tr> |
| 481 |
<tr> |
| 482 |
<td class="parameter_name"><p>argv</p></td> |
| 483 |
<td class="parameter_description"><p>The argument vector passed to <code class="function">main()</code></p></td> |
| 484 |
<td class="parameter_annotations"> </td> |
| 485 |
</tr> |
| 486 |
<tr> |
| 487 |
<td class="parameter_name"><p>restart_style</p></td> |
| 488 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle" title="enum XfceSMClientRestartStyle"><span class="type">XfceSMClientRestartStyle</span></a></p></td> |
| 489 |
<td class="parameter_annotations"> </td> |
| 490 |
</tr> |
| 491 |
<tr> |
| 492 |
<td class="parameter_name"><p>priority</p></td> |
| 493 |
<td class="parameter_description"><p>A restart priority</p></td> |
| 494 |
<td class="parameter_annotations"> </td> |
| 495 |
</tr> |
| 496 |
</tbody> |
| 497 |
</table></div> |
| 498 |
</div> |
| 499 |
<div class="refsect3"> |
| 500 |
<a name="xfce-sm-client-get-with-argv.returns"></a><h4>Returns</h4> |
| 501 |
<p>A new <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> instance. </p> |
| 502 |
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> |
| 503 |
</div> |
| 504 |
</div> |
| 505 |
<hr> |
| 506 |
<div class="refsect2"> |
| 507 |
<a name="xfce-sm-client-get-full"></a><h3>xfce_sm_client_get_full ()</h3> |
| 508 |
<pre class="programlisting"><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="returnvalue">XfceSMClient</span></a> * |
| 509 |
xfce_sm_client_get_full (<em class="parameter"><code><a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle" title="enum XfceSMClientRestartStyle"><span class="type">XfceSMClientRestartStyle</span></a> restart_style</code></em>, |
| 510 |
<em class="parameter"><code><span class="type">guchar</span> priority</code></em>, |
| 511 |
<em class="parameter"><code>const <span class="type">gchar</span> *resumed_client_id</code></em>, |
| 512 |
<em class="parameter"><code>const <span class="type">gchar</span> *current_directory</code></em>, |
| 513 |
<em class="parameter"><code>const <span class="type">gchar</span> **restart_command</code></em>, |
| 514 |
<em class="parameter"><code>const <span class="type">gchar</span> *desktop_file</code></em>);</pre> |
| 515 |
<p>Creates a new SM client instance, allowing the application |
| 516 |
fine-grained control over the initial properties set. |
| 517 |
Note that this function does not actually connect to the session |
| 518 |
manager, so other actions can be taken (such as setting custom |
| 519 |
properties or connecting signals) before calling |
| 520 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-connect" title="xfce_sm_client_connect ()"><code class="function">xfce_sm_client_connect()</code></a>.</p> |
| 521 |
<p>It is recommended to use <a class="link" href="XfceSMClient.html#xfce-sm-client-get-with-argv" title="xfce_sm_client_get_with_argv ()"><code class="function">xfce_sm_client_get_with_argv()</code></a>, or, |
| 522 |
if you are using Gtk or Glib's command-line option parser, |
| 523 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-get-option-group" title="xfce_sm_client_get_option_group ()"><code class="function">xfce_sm_client_get_option_group()</code></a> and <a class="link" href="XfceSMClient.html#xfce-sm-client-get" title="xfce_sm_client_get ()"><code class="function">xfce_sm_client_get()</code></a> instead.</p> |
| 524 |
<p><span class="annotation">[<acronym title="This symbol is a constructor, not a static method."><span class="acronym">constructor</span></acronym>]</span></p> |
| 525 |
<div class="refsect3"> |
| 526 |
<a name="xfce-sm-client-get-full.parameters"></a><h4>Parameters</h4> |
| 527 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 528 |
<colgroup> |
| 529 |
<col width="150px" class="parameters_name"> |
| 530 |
<col class="parameters_description"> |
| 531 |
<col width="200px" class="parameters_annotations"> |
| 532 |
</colgroup> |
| 533 |
<tbody> |
| 534 |
<tr> |
| 535 |
<td class="parameter_name"><p>restart_style</p></td> |
| 536 |
<td class="parameter_description"><p>An XfceSMClientRestartStyle</p></td> |
| 537 |
<td class="parameter_annotations"> </td> |
| 538 |
</tr> |
| 539 |
<tr> |
| 540 |
<td class="parameter_name"><p>priority</p></td> |
| 541 |
<td class="parameter_description"><p>A restart priority</p></td> |
| 542 |
<td class="parameter_annotations"> </td> |
| 543 |
</tr> |
| 544 |
<tr> |
| 545 |
<td class="parameter_name"><p>resumed_client_id</p></td> |
| 546 |
<td class="parameter_description"><p>The client id used in the previous session</p></td> |
| 547 |
<td class="parameter_annotations"> </td> |
| 548 |
</tr> |
| 549 |
<tr> |
| 550 |
<td class="parameter_name"><p>current_directory</p></td> |
| 551 |
<td class="parameter_description"><p>The application's working directory</p></td> |
| 552 |
<td class="parameter_annotations"> </td> |
| 553 |
</tr> |
| 554 |
<tr> |
| 555 |
<td class="parameter_name"><p>restart_command</p></td> |
| 556 |
<td class="parameter_description"><p>A command that can resume the application's |
| 557 |
saved state</p></td> |
| 558 |
<td class="parameter_annotations"> </td> |
| 559 |
</tr> |
| 560 |
<tr> |
| 561 |
<td class="parameter_name"><p>desktop_file</p></td> |
| 562 |
<td class="parameter_description"><p>The application's .desktop file</p></td> |
| 563 |
<td class="parameter_annotations"> </td> |
| 564 |
</tr> |
| 565 |
</tbody> |
| 566 |
</table></div> |
| 567 |
</div> |
| 568 |
<div class="refsect3"> |
| 569 |
<a name="xfce-sm-client-get-full.returns"></a><h4>Returns</h4> |
| 570 |
<p>A new <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> instance. </p> |
| 571 |
<p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> |
| 572 |
</div> |
| 573 |
</div> |
| 574 |
<hr> |
| 575 |
<div class="refsect2"> |
| 576 |
<a name="xfce-sm-client-connect"></a><h3>xfce_sm_client_connect ()</h3> |
| 577 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 578 |
xfce_sm_client_connect (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>, |
| 579 |
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> |
| 580 |
<p>Attempts to connect to the session manager.</p> |
| 581 |
<div class="refsect3"> |
| 582 |
<a name="xfce-sm-client-connect.parameters"></a><h4>Parameters</h4> |
| 583 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 584 |
<colgroup> |
| 585 |
<col width="150px" class="parameters_name"> |
| 586 |
<col class="parameters_description"> |
| 587 |
<col width="200px" class="parameters_annotations"> |
| 588 |
</colgroup> |
| 589 |
<tbody> |
| 590 |
<tr> |
| 591 |
<td class="parameter_name"><p>sm_client</p></td> |
| 592 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a></p></td> |
| 593 |
<td class="parameter_annotations"> </td> |
| 594 |
</tr> |
| 595 |
<tr> |
| 596 |
<td class="parameter_name"><p>error</p></td> |
| 597 |
<td class="parameter_description"><p>A <span class="type">GError</span> location. </p></td> |
| 598 |
<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> |
| 599 |
</tr> |
| 600 |
</tbody> |
| 601 |
</table></div> |
| 602 |
</div> |
| 603 |
<div class="refsect3"> |
| 604 |
<a name="xfce-sm-client-connect.returns"></a><h4>Returns</h4> |
| 605 |
<p> <code class="literal">TRUE</code> on success, <code class="literal">FALSE</code> otherwise. If an error |
| 606 |
occurs, <em class="parameter"><code>error</code></em> |
| 607 |
will be set.</p> |
| 608 |
</div> |
| 609 |
</div> |
| 610 |
<hr> |
| 611 |
<div class="refsect2"> |
| 612 |
<a name="xfce-sm-client-disconnect"></a><h3>xfce_sm_client_disconnect ()</h3> |
| 613 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 614 |
xfce_sm_client_disconnect (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);</pre> |
| 615 |
<p>Disconnects the application from the session manager.</p> |
| 616 |
<div class="note"><p> |
| 617 |
This may not remove the application from the saved |
| 618 |
session (if any) if the user later does not choose to save |
| 619 |
the session when logging out. |
| 620 |
</p></div> |
| 621 |
<div class="refsect3"> |
| 622 |
<a name="xfce-sm-client-disconnect.parameters"></a><h4>Parameters</h4> |
| 623 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 624 |
<colgroup> |
| 625 |
<col width="150px" class="parameters_name"> |
| 626 |
<col class="parameters_description"> |
| 627 |
<col width="200px" class="parameters_annotations"> |
| 628 |
</colgroup> |
| 629 |
<tbody><tr> |
| 630 |
<td class="parameter_name"><p>sm_client</p></td> |
| 631 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a></p></td> |
| 632 |
<td class="parameter_annotations"> </td> |
| 633 |
</tr></tbody> |
| 634 |
</table></div> |
| 635 |
</div> |
| 636 |
</div> |
| 637 |
<hr> |
| 638 |
<div class="refsect2"> |
| 639 |
<a name="xfce-sm-client-is-connected"></a><h3>xfce_sm_client_is_connected ()</h3> |
| 640 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 641 |
xfce_sm_client_is_connected (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);</pre> |
| 642 |
<p>Determines whether or not the application has connected to the |
| 643 |
session manager.</p> |
| 644 |
<div class="refsect3"> |
| 645 |
<a name="xfce-sm-client-is-connected.parameters"></a><h4>Parameters</h4> |
| 646 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 647 |
<colgroup> |
| 648 |
<col width="150px" class="parameters_name"> |
| 649 |
<col class="parameters_description"> |
| 650 |
<col width="200px" class="parameters_annotations"> |
| 651 |
</colgroup> |
| 652 |
<tbody><tr> |
| 653 |
<td class="parameter_name"><p>sm_client</p></td> |
| 654 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a></p></td> |
| 655 |
<td class="parameter_annotations"> </td> |
| 656 |
</tr></tbody> |
| 657 |
</table></div> |
| 658 |
</div> |
| 659 |
<div class="refsect3"> |
| 660 |
<a name="xfce-sm-client-is-connected.returns"></a><h4>Returns</h4> |
| 661 |
<p> <code class="literal">TRUE</code> if connected to the session manager, <code class="literal">FALSE</code> otherwise</p> |
| 662 |
</div> |
| 663 |
</div> |
| 664 |
<hr> |
| 665 |
<div class="refsect2"> |
| 666 |
<a name="xfce-sm-client-is-resumed"></a><h3>xfce_sm_client_is_resumed ()</h3> |
| 667 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 668 |
xfce_sm_client_is_resumed (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);</pre> |
| 669 |
<p>Determines whether the application was resumed from a previous |
| 670 |
session, or if the application has been started fresh with no |
| 671 |
state information associated with it.</p> |
| 672 |
<div class="refsect3"> |
| 673 |
<a name="xfce-sm-client-is-resumed.parameters"></a><h4>Parameters</h4> |
| 674 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 675 |
<colgroup> |
| 676 |
<col width="150px" class="parameters_name"> |
| 677 |
<col class="parameters_description"> |
| 678 |
<col width="200px" class="parameters_annotations"> |
| 679 |
</colgroup> |
| 680 |
<tbody><tr> |
| 681 |
<td class="parameter_name"><p>sm_client</p></td> |
| 682 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a></p></td> |
| 683 |
<td class="parameter_annotations"> </td> |
| 684 |
</tr></tbody> |
| 685 |
</table></div> |
| 686 |
</div> |
| 687 |
<div class="refsect3"> |
| 688 |
<a name="xfce-sm-client-is-resumed.returns"></a><h4>Returns</h4> |
| 689 |
<p> <code class="literal">TRUE</code> if resumed from a previous session, <code class="literal">FALSE</code> otherwise</p> |
| 690 |
</div> |
| 691 |
</div> |
| 692 |
<hr> |
| 693 |
<div class="refsect2"> |
| 694 |
<a name="xfce-sm-client-set-desktop-file"></a><h3>xfce_sm_client_set_desktop_file ()</h3> |
| 695 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 696 |
xfce_sm_client_set_desktop_file (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>, |
| 697 |
<em class="parameter"><code>const <span class="type">gchar</span> *desktop_file</code></em>);</pre> |
| 698 |
<p>Sets the application's .desktop file. In addition to informing |
| 699 |
the session manager of the .desktop file so it can present localized |
| 700 |
names and an icon in session listings and the splash screen, this |
| 701 |
also calls <code class="function">g_set_application_name()</code> and |
| 702 |
<a href="/usr/share/gtk-doc/html/gtk3/GtkWindow.html#gtk-window-set-default-icon-name"><code class="function">gtk_window_set_default_icon_name()</code></a> (or |
| 703 |
<a href="/usr/share/gtk-doc/html/gtk3/GtkWindow.html#gtk-window-set-default-icon-from-file"><code class="function">gtk_window_set_default_icon_from_file()</code></a>) if the Name and Icon |
| 704 |
keys are present, respectively.</p> |
| 705 |
<p>If a relative path to the file is provided, this function will search |
| 706 |
the standard application directories as specified by the</p> |
| 707 |
<a class="ulink" href="http://standards.freedesktop.org/menu-spec/latest/" target="_top">XDG |
| 708 |
Desktop Menu Specification</a>. |
| 709 |
<div class="refsect3"> |
| 710 |
<a name="xfce-sm-client-set-desktop-file.parameters"></a><h4>Parameters</h4> |
| 711 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 712 |
<colgroup> |
| 713 |
<col width="150px" class="parameters_name"> |
| 714 |
<col class="parameters_description"> |
| 715 |
<col width="200px" class="parameters_annotations"> |
| 716 |
</colgroup> |
| 717 |
<tbody> |
| 718 |
<tr> |
| 719 |
<td class="parameter_name"><p>sm_client</p></td> |
| 720 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a></p></td> |
| 721 |
<td class="parameter_annotations"> </td> |
| 722 |
</tr> |
| 723 |
<tr> |
| 724 |
<td class="parameter_name"><p>desktop_file</p></td> |
| 725 |
<td class="parameter_description"><p>The path to the application's .desktop file</p></td> |
| 726 |
<td class="parameter_annotations"> </td> |
| 727 |
</tr> |
| 728 |
</tbody> |
| 729 |
</table></div> |
| 730 |
</div> |
| 731 |
</div> |
| 732 |
<hr> |
| 733 |
<div class="refsect2"> |
| 734 |
<a name="xfce-sm-client-request-shutdown"></a><h3>xfce_sm_client_request_shutdown ()</h3> |
| 735 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 736 |
xfce_sm_client_request_shutdown (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>, |
| 737 |
<em class="parameter"><code><a class="link" href="XfceSMClient.html#XfceSMClientShutdownHint" title="enum XfceSMClientShutdownHint"><span class="type">XfceSMClientShutdownHint</span></a> shutdown_hint</code></em>);</pre> |
| 738 |
<p>Sends a request to the session manager to end the session. |
| 739 |
Depending on <em class="parameter"><code>hint</code></em> |
| 740 |
, the session manager may prompt for a |
| 741 |
certain action (log out, halt, reboot, etc.) or may take the |
| 742 |
requested action without user intervention.</p> |
| 743 |
<div class="note"><p> |
| 744 |
The session manager may or may not support all requested |
| 745 |
actions, and is also free to ignore the requested action. |
| 746 |
</p></div> |
| 747 |
<div class="refsect3"> |
| 748 |
<a name="xfce-sm-client-request-shutdown.parameters"></a><h4>Parameters</h4> |
| 749 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 750 |
<colgroup> |
| 751 |
<col width="150px" class="parameters_name"> |
| 752 |
<col class="parameters_description"> |
| 753 |
<col width="200px" class="parameters_annotations"> |
| 754 |
</colgroup> |
| 755 |
<tbody> |
| 756 |
<tr> |
| 757 |
<td class="parameter_name"><p>sm_client</p></td> |
| 758 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a></p></td> |
| 759 |
<td class="parameter_annotations"> </td> |
| 760 |
</tr> |
| 761 |
<tr> |
| 762 |
<td class="parameter_name"><p>shutdown_hint</p></td> |
| 763 |
<td class="parameter_description"><p>The type of shutdown requested</p></td> |
| 764 |
<td class="parameter_annotations"> </td> |
| 765 |
</tr> |
| 766 |
</tbody> |
| 767 |
</table></div> |
| 768 |
</div> |
| 769 |
</div> |
| 770 |
<hr> |
| 771 |
<div class="refsect2"> |
| 772 |
<a name="xfce-sm-client-get-client-id"></a><h3>xfce_sm_client_get_client_id ()</h3> |
| 773 |
<pre class="programlisting">const <span class="returnvalue">gchar</span> * |
| 774 |
xfce_sm_client_get_client_id (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);</pre> |
| 775 |
<p>Retrieves the session client's unique ID. This ID can |
| 776 |
be used to construct a filename used to restore the |
| 777 |
application's state. Note that this value is only |
| 778 |
guaranteed to be valid if connected to the session manager.</p> |
| 779 |
<div class="note"><p> |
| 780 |
Instead of constructing a state filename, it is |
| 781 |
recommended to use <a class="link" href="XfceSMClient.html#xfce-sm-client-get-state-file" title="xfce_sm_client_get_state_file ()"><code class="function">xfce_sm_client_get_state_file()</code></a>. |
| 782 |
</p></div> |
| 783 |
<div class="refsect3"> |
| 784 |
<a name="xfce-sm-client-get-client-id.parameters"></a><h4>Parameters</h4> |
| 785 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 786 |
<colgroup> |
| 787 |
<col width="150px" class="parameters_name"> |
| 788 |
<col class="parameters_description"> |
| 789 |
<col width="200px" class="parameters_annotations"> |
| 790 |
</colgroup> |
| 791 |
<tbody><tr> |
| 792 |
<td class="parameter_name"><p>sm_client</p></td> |
| 793 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a></p></td> |
| 794 |
<td class="parameter_annotations"> </td> |
| 795 |
</tr></tbody> |
| 796 |
</table></div> |
| 797 |
</div> |
| 798 |
<div class="refsect3"> |
| 799 |
<a name="xfce-sm-client-get-client-id.returns"></a><h4>Returns</h4> |
| 800 |
<p> an opaque object-owned string</p> |
| 801 |
</div> |
| 802 |
</div> |
| 803 |
<hr> |
| 804 |
<div class="refsect2"> |
| 805 |
<a name="xfce-sm-client-get-state-file"></a><h3>xfce_sm_client_get_state_file ()</h3> |
| 806 |
<pre class="programlisting">const <span class="returnvalue">gchar</span> * |
| 807 |
xfce_sm_client_get_state_file (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);</pre> |
| 808 |
<p>Constructs a filename that can be used to restore or save |
| 809 |
state information.</p> |
| 810 |
<p>When saving state, ote that this file may already exist (and |
| 811 |
may have been used for saving previous state for the |
| 812 |
application), so the application should first remove or empty |
| 813 |
the file if it requires a fresh state file.</p> |
| 814 |
<p>On the next application start, this function can be used to |
| 815 |
check to see if there is any previous saved state, and, if so, |
| 816 |
the state can be restored from the file.</p> |
| 817 |
<p>This function will use a standard location and naming scheme |
| 818 |
and handle state cleanup (setting of the discard command) for you.</p> |
| 819 |
<p>Before calling this function, the application must have a |
| 820 |
valid client ID (see <a class="link" href="XfceSMClient.html#xfce-sm-client-get-client-id" title="xfce_sm_client_get_client_id ()"><code class="function">xfce_sm_client_get_client_id()</code></a>).</p> |
| 821 |
<div class="refsect3"> |
| 822 |
<a name="xfce-sm-client-get-state-file.parameters"></a><h4>Parameters</h4> |
| 823 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 824 |
<colgroup> |
| 825 |
<col width="150px" class="parameters_name"> |
| 826 |
<col class="parameters_description"> |
| 827 |
<col width="200px" class="parameters_annotations"> |
| 828 |
</colgroup> |
| 829 |
<tbody><tr> |
| 830 |
<td class="parameter_name"><p>sm_client</p></td> |
| 831 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a></p></td> |
| 832 |
<td class="parameter_annotations"> </td> |
| 833 |
</tr></tbody> |
| 834 |
</table></div> |
| 835 |
</div> |
| 836 |
<div class="refsect3"> |
| 837 |
<a name="xfce-sm-client-get-state-file.returns"></a><h4>Returns</h4> |
| 838 |
<p> a file name string, owned by the object or <code class="literal">NULL</code> if |
| 839 |
the session client is disabled.</p> |
| 840 |
</div> |
| 841 |
</div> |
| 842 |
<hr> |
| 843 |
<div class="refsect2"> |
| 844 |
<a name="xfce-sm-client-get-current-directory"></a><h3>xfce_sm_client_get_current_directory ()</h3> |
| 845 |
<pre class="programlisting">const <span class="returnvalue">gchar</span> * |
| 846 |
xfce_sm_client_get_current_directory (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);</pre> |
| 847 |
<p>Retrieves the session client's working directory. See |
| 848 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-set-current-directory" title="xfce_sm_client_set_current_directory ()"><code class="function">xfce_sm_client_set_current_directory()</code></a> for more information.</p> |
| 849 |
<div class="refsect3"> |
| 850 |
<a name="xfce-sm-client-get-current-directory.parameters"></a><h4>Parameters</h4> |
| 851 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 852 |
<colgroup> |
| 853 |
<col width="150px" class="parameters_name"> |
| 854 |
<col class="parameters_description"> |
| 855 |
<col width="200px" class="parameters_annotations"> |
| 856 |
</colgroup> |
| 857 |
<tbody><tr> |
| 858 |
<td class="parameter_name"><p>sm_client</p></td> |
| 859 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a></p></td> |
| 860 |
<td class="parameter_annotations"> </td> |
| 861 |
</tr></tbody> |
| 862 |
</table></div> |
| 863 |
</div> |
| 864 |
<div class="refsect3"> |
| 865 |
<a name="xfce-sm-client-get-current-directory.returns"></a><h4>Returns</h4> |
| 866 |
<p> an object-owned string</p> |
| 867 |
</div> |
| 868 |
</div> |
| 869 |
<hr> |
| 870 |
<div class="refsect2"> |
| 871 |
<a name="xfce-sm-client-set-current-directory"></a><h3>xfce_sm_client_set_current_directory ()</h3> |
| 872 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 873 |
xfce_sm_client_set_current_directory (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>, |
| 874 |
<em class="parameter"><code>const <span class="type">gchar</span> *current_directory</code></em>);</pre> |
| 875 |
<p>Sets the startup working directory of <em class="parameter"><code>sm_client</code></em> |
| 876 |
to |
| 877 |
<em class="parameter"><code>current_directory</code></em> |
| 878 |
. If unset, defaults to the user's |
| 879 |
home directory.</p> |
| 880 |
<div class="refsect3"> |
| 881 |
<a name="xfce-sm-client-set-current-directory.parameters"></a><h4>Parameters</h4> |
| 882 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 883 |
<colgroup> |
| 884 |
<col width="150px" class="parameters_name"> |
| 885 |
<col class="parameters_description"> |
| 886 |
<col width="200px" class="parameters_annotations"> |
| 887 |
</colgroup> |
| 888 |
<tbody> |
| 889 |
<tr> |
| 890 |
<td class="parameter_name"><p>sm_client</p></td> |
| 891 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a></p></td> |
| 892 |
<td class="parameter_annotations"> </td> |
| 893 |
</tr> |
| 894 |
<tr> |
| 895 |
<td class="parameter_name"><p>current_directory</p></td> |
| 896 |
<td class="parameter_description"><p>A valid path name</p></td> |
| 897 |
<td class="parameter_annotations"> </td> |
| 898 |
</tr> |
| 899 |
</tbody> |
| 900 |
</table></div> |
| 901 |
</div> |
| 902 |
</div> |
| 903 |
<hr> |
| 904 |
<div class="refsect2"> |
| 905 |
<a name="xfce-sm-client-get-priority"></a><h3>xfce_sm_client_get_priority ()</h3> |
| 906 |
<pre class="programlisting"><span class="returnvalue">guint8</span> |
| 907 |
xfce_sm_client_get_priority (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);</pre> |
| 908 |
<p>Retrieves the session client's restart priority. See |
| 909 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-set-priority" title="xfce_sm_client_set_priority ()"><code class="function">xfce_sm_client_set_priority()</code></a> for more information.</p> |
| 910 |
<div class="refsect3"> |
| 911 |
<a name="xfce-sm-client-get-priority.parameters"></a><h4>Parameters</h4> |
| 912 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 913 |
<colgroup> |
| 914 |
<col width="150px" class="parameters_name"> |
| 915 |
<col class="parameters_description"> |
| 916 |
<col width="200px" class="parameters_annotations"> |
| 917 |
</colgroup> |
| 918 |
<tbody><tr> |
| 919 |
<td class="parameter_name"><p>sm_client</p></td> |
| 920 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a></p></td> |
| 921 |
<td class="parameter_annotations"> </td> |
| 922 |
</tr></tbody> |
| 923 |
</table></div> |
| 924 |
</div> |
| 925 |
<div class="refsect3"> |
| 926 |
<a name="xfce-sm-client-get-priority.returns"></a><h4>Returns</h4> |
| 927 |
<p> a value from <span class="type">G_MININT8</span> to <span class="type">G_MAXINT8</span></p> |
| 928 |
</div> |
| 929 |
</div> |
| 930 |
<hr> |
| 931 |
<div class="refsect2"> |
| 932 |
<a name="xfce-sm-client-set-priority"></a><h3>xfce_sm_client_set_priority ()</h3> |
| 933 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 934 |
xfce_sm_client_set_priority (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>, |
| 935 |
<em class="parameter"><code><span class="type">guint8</span> priority</code></em>);</pre> |
| 936 |
<p>Sets the startup priority for <em class="parameter"><code>sm_client</code></em> |
| 937 |
to <em class="parameter"><code>priority</code></em> |
| 938 |
. Note |
| 939 |
that the default priority for applications is 50; lower values |
| 940 |
should be reserved for components of the desktop environment.</p> |
| 941 |
<div class="refsect3"> |
| 942 |
<a name="xfce-sm-client-set-priority.parameters"></a><h4>Parameters</h4> |
| 943 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 944 |
<colgroup> |
| 945 |
<col width="150px" class="parameters_name"> |
| 946 |
<col class="parameters_description"> |
| 947 |
<col width="200px" class="parameters_annotations"> |
| 948 |
</colgroup> |
| 949 |
<tbody> |
| 950 |
<tr> |
| 951 |
<td class="parameter_name"><p>sm_client</p></td> |
| 952 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a></p></td> |
| 953 |
<td class="parameter_annotations"> </td> |
| 954 |
</tr> |
| 955 |
<tr> |
| 956 |
<td class="parameter_name"><p>priority</p></td> |
| 957 |
<td class="parameter_description"><p>A 8-bit signed priority value</p></td> |
| 958 |
<td class="parameter_annotations"> </td> |
| 959 |
</tr> |
| 960 |
</tbody> |
| 961 |
</table></div> |
| 962 |
</div> |
| 963 |
</div> |
| 964 |
<hr> |
| 965 |
<div class="refsect2"> |
| 966 |
<a name="xfce-sm-client-get-restart-command"></a><h3>xfce_sm_client_get_restart_command ()</h3> |
| 967 |
<pre class="programlisting">const <span class="returnvalue">gchar</span> *const * |
| 968 |
xfce_sm_client_get_restart_command (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);</pre> |
| 969 |
<p>Retrieves the session client's restart command. See |
| 970 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-set-restart-command" title="xfce_sm_client_set_restart_command ()"><code class="function">xfce_sm_client_set_restart_command()</code></a> for more information.</p> |
| 971 |
<div class="refsect3"> |
| 972 |
<a name="xfce-sm-client-get-restart-command.parameters"></a><h4>Parameters</h4> |
| 973 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 974 |
<colgroup> |
| 975 |
<col width="150px" class="parameters_name"> |
| 976 |
<col class="parameters_description"> |
| 977 |
<col width="200px" class="parameters_annotations"> |
| 978 |
</colgroup> |
| 979 |
<tbody><tr> |
| 980 |
<td class="parameter_name"><p>sm_client</p></td> |
| 981 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a></p></td> |
| 982 |
<td class="parameter_annotations"> </td> |
| 983 |
</tr></tbody> |
| 984 |
</table></div> |
| 985 |
</div> |
| 986 |
<div class="refsect3"> |
| 987 |
<a name="xfce-sm-client-get-restart-command.returns"></a><h4>Returns</h4> |
| 988 |
<p> an object-owned string vector</p> |
| 989 |
</div> |
| 990 |
</div> |
| 991 |
<hr> |
| 992 |
<div class="refsect2"> |
| 993 |
<a name="xfce-sm-client-set-restart-command"></a><h3>xfce_sm_client_set_restart_command ()</h3> |
| 994 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 995 |
xfce_sm_client_set_restart_command (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>, |
| 996 |
<em class="parameter"><code><span class="type">gchar</span> **restart_command</code></em>);</pre> |
| 997 |
<p>Sets the application's "restart" command, which is used to restart |
| 998 |
the application and restore any saved state from the previous |
| 999 |
run.</p> |
| 1000 |
<p>If unset, defaults to the command used to start this instance |
| 1001 |
of the application, with session management related arguments |
| 1002 |
added (if not already present).</p> |
| 1003 |
<div class="refsect3"> |
| 1004 |
<a name="xfce-sm-client-set-restart-command.parameters"></a><h4>Parameters</h4> |
| 1005 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1006 |
<colgroup> |
| 1007 |
<col width="150px" class="parameters_name"> |
| 1008 |
<col class="parameters_description"> |
| 1009 |
<col width="200px" class="parameters_annotations"> |
| 1010 |
</colgroup> |
| 1011 |
<tbody> |
| 1012 |
<tr> |
| 1013 |
<td class="parameter_name"><p>sm_client</p></td> |
| 1014 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a></p></td> |
| 1015 |
<td class="parameter_annotations"> </td> |
| 1016 |
</tr> |
| 1017 |
<tr> |
| 1018 |
<td class="parameter_name"><p>restart_command</p></td> |
| 1019 |
<td class="parameter_description"><p>An argument vector</p></td> |
| 1020 |
<td class="parameter_annotations"> </td> |
| 1021 |
</tr> |
| 1022 |
</tbody> |
| 1023 |
</table></div> |
| 1024 |
</div> |
| 1025 |
</div> |
| 1026 |
<hr> |
| 1027 |
<div class="refsect2"> |
| 1028 |
<a name="xfce-sm-client-get-restart-style"></a><h3>xfce_sm_client_get_restart_style ()</h3> |
| 1029 |
<pre class="programlisting"><a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle" title="enum XfceSMClientRestartStyle"><span class="returnvalue">XfceSMClientRestartStyle</span></a> |
| 1030 |
xfce_sm_client_get_restart_style (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>);</pre> |
| 1031 |
<p>Retrieves the session client's restart style. See |
| 1032 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-set-restart-style" title="xfce_sm_client_set_restart_style ()"><code class="function">xfce_sm_client_set_restart_style()</code></a> for more information.</p> |
| 1033 |
<div class="refsect3"> |
| 1034 |
<a name="xfce-sm-client-get-restart-style.parameters"></a><h4>Parameters</h4> |
| 1035 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1036 |
<colgroup> |
| 1037 |
<col width="150px" class="parameters_name"> |
| 1038 |
<col class="parameters_description"> |
| 1039 |
<col width="200px" class="parameters_annotations"> |
| 1040 |
</colgroup> |
| 1041 |
<tbody><tr> |
| 1042 |
<td class="parameter_name"><p>sm_client</p></td> |
| 1043 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a></p></td> |
| 1044 |
<td class="parameter_annotations"> </td> |
| 1045 |
</tr></tbody> |
| 1046 |
</table></div> |
| 1047 |
</div> |
| 1048 |
<div class="refsect3"> |
| 1049 |
<a name="xfce-sm-client-get-restart-style.returns"></a><h4>Returns</h4> |
| 1050 |
<p> a value from the <a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle" title="enum XfceSMClientRestartStyle"><span class="type">XfceSMClientRestartStyle</span></a> enum</p> |
| 1051 |
</div> |
| 1052 |
</div> |
| 1053 |
<hr> |
| 1054 |
<div class="refsect2"> |
| 1055 |
<a name="xfce-sm-client-set-restart-style"></a><h3>xfce_sm_client_set_restart_style ()</h3> |
| 1056 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 1057 |
xfce_sm_client_set_restart_style (<em class="parameter"><code><a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client</code></em>, |
| 1058 |
<em class="parameter"><code><a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle" title="enum XfceSMClientRestartStyle"><span class="type">XfceSMClientRestartStyle</span></a> restart_style</code></em>);</pre> |
| 1059 |
<p>Sets the restart style hint to <em class="parameter"><code>restart_style</code></em> |
| 1060 |
.</p> |
| 1061 |
<div class="refsect3"> |
| 1062 |
<a name="xfce-sm-client-set-restart-style.parameters"></a><h4>Parameters</h4> |
| 1063 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1064 |
<colgroup> |
| 1065 |
<col width="150px" class="parameters_name"> |
| 1066 |
<col class="parameters_description"> |
| 1067 |
<col width="200px" class="parameters_annotations"> |
| 1068 |
</colgroup> |
| 1069 |
<tbody> |
| 1070 |
<tr> |
| 1071 |
<td class="parameter_name"><p>sm_client</p></td> |
| 1072 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a></p></td> |
| 1073 |
<td class="parameter_annotations"> </td> |
| 1074 |
</tr> |
| 1075 |
<tr> |
| 1076 |
<td class="parameter_name"><p>restart_style</p></td> |
| 1077 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle" title="enum XfceSMClientRestartStyle"><span class="type">XfceSMClientRestartStyle</span></a> value</p></td> |
| 1078 |
<td class="parameter_annotations"> </td> |
| 1079 |
</tr> |
| 1080 |
</tbody> |
| 1081 |
</table></div> |
| 1082 |
</div> |
| 1083 |
</div> |
| 1084 |
</div> |
| 1085 |
<div class="refsect1"> |
| 1086 |
<a name="XfceSMClient.other_details"></a><h2>Types and Values</h2> |
| 1087 |
<div class="refsect2"> |
| 1088 |
<a name="XfceSMClient-struct"></a><h3>XfceSMClient</h3> |
| 1089 |
<pre class="programlisting">typedef struct _XfceSMClient XfceSMClient;</pre> |
| 1090 |
<p>An opaque struct with only private fields.</p> |
| 1091 |
</div> |
| 1092 |
<hr> |
| 1093 |
<div class="refsect2"> |
| 1094 |
<a name="XfceSMClientPriority"></a><h3>enum XfceSMClientPriority</h3> |
| 1095 |
<p>Some sample priority values for use with <a class="link" href="XfceSMClient.html#xfce-sm-client-set-priority" title="xfce_sm_client_set_priority ()"><code class="function">xfce_sm_client_set_priority()</code></a>.</p> |
| 1096 |
<div class="refsect3"> |
| 1097 |
<a name="XfceSMClientPriority.members"></a><h4>Members</h4> |
| 1098 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1099 |
<colgroup> |
| 1100 |
<col width="300px" class="enum_members_name"> |
| 1101 |
<col class="enum_members_description"> |
| 1102 |
<col width="200px" class="enum_members_annotations"> |
| 1103 |
</colgroup> |
| 1104 |
<tbody> |
| 1105 |
<tr> |
| 1106 |
<td class="enum_member_name"><p><a name="XFCE-SM-CLIENT-PRIORITY-HIGHEST:CAPS"></a>XFCE_SM_CLIENT_PRIORITY_HIGHEST</p></td> |
| 1107 |
<td class="enum_member_description"> |
| 1108 |
<p>A high priority value. You probably |
| 1109 |
don't want to use this.</p> |
| 1110 |
</td> |
| 1111 |
<td class="enum_member_annotations"> </td> |
| 1112 |
</tr> |
| 1113 |
<tr> |
| 1114 |
<td class="enum_member_name"><p><a name="XFCE-SM-CLIENT-PRIORITY-WM:CAPS"></a>XFCE_SM_CLIENT_PRIORITY_WM</p></td> |
| 1115 |
<td class="enum_member_description"> |
| 1116 |
<p>A priority value for use by the window manager.</p> |
| 1117 |
</td> |
| 1118 |
<td class="enum_member_annotations"> </td> |
| 1119 |
</tr> |
| 1120 |
<tr> |
| 1121 |
<td class="enum_member_name"><p><a name="XFCE-SM-CLIENT-PRIORITY-CORE:CAPS"></a>XFCE_SM_CLIENT_PRIORITY_CORE</p></td> |
| 1122 |
<td class="enum_member_description"> |
| 1123 |
<p>A priority value for use by applications that |
| 1124 |
place windows on the screen and possibly set |
| 1125 |
window manager struts.</p> |
| 1126 |
</td> |
| 1127 |
<td class="enum_member_annotations"> </td> |
| 1128 |
</tr> |
| 1129 |
<tr> |
| 1130 |
<td class="enum_member_name"><p><a name="XFCE-SM-CLIENT-PRIORITY-DESKTOP:CAPS"></a>XFCE_SM_CLIENT_PRIORITY_DESKTOP</p></td> |
| 1131 |
<td class="enum_member_description"> |
| 1132 |
<p>A priority value for use by applications |
| 1133 |
that draw on the desktop.</p> |
| 1134 |
</td> |
| 1135 |
<td class="enum_member_annotations"> </td> |
| 1136 |
</tr> |
| 1137 |
<tr> |
| 1138 |
<td class="enum_member_name"><p><a name="XFCE-SM-CLIENT-PRIORITY-DEFAULT:CAPS"></a>XFCE_SM_CLIENT_PRIORITY_DEFAULT</p></td> |
| 1139 |
<td class="enum_member_description"> |
| 1140 |
<p>A priority value for regular applications.</p> |
| 1141 |
</td> |
| 1142 |
<td class="enum_member_annotations"> </td> |
| 1143 |
</tr> |
| 1144 |
<tr> |
| 1145 |
<td class="enum_member_name"><p><a name="XFCE-SM-CLIENT-PRIORITY-LOWEST:CAPS"></a>XFCE_SM_CLIENT_PRIORITY_LOWEST</p></td> |
| 1146 |
<td class="enum_member_description"> |
| 1147 |
<p>The lowest possible priority value.</p> |
| 1148 |
</td> |
| 1149 |
<td class="enum_member_annotations"> </td> |
| 1150 |
</tr> |
| 1151 |
</tbody> |
| 1152 |
</table></div> |
| 1153 |
</div> |
| 1154 |
</div> |
| 1155 |
<hr> |
| 1156 |
<div class="refsect2"> |
| 1157 |
<a name="XfceSMClientRestartStyle"></a><h3>enum XfceSMClientRestartStyle</h3> |
| 1158 |
<p>An enumeration describing how the session manager should restart |
| 1159 |
the application.</p> |
| 1160 |
<div class="refsect3"> |
| 1161 |
<a name="XfceSMClientRestartStyle.members"></a><h4>Members</h4> |
| 1162 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1163 |
<colgroup> |
| 1164 |
<col width="300px" class="enum_members_name"> |
| 1165 |
<col class="enum_members_description"> |
| 1166 |
<col width="200px" class="enum_members_annotations"> |
| 1167 |
</colgroup> |
| 1168 |
<tbody> |
| 1169 |
<tr> |
| 1170 |
<td class="enum_member_name"><p><a name="XFCE-SM-CLIENT-RESTART-NORMAL:CAPS"></a>XFCE_SM_CLIENT_RESTART_NORMAL</p></td> |
| 1171 |
<td class="enum_member_description"> |
| 1172 |
<p>Only restart the application if it is |
| 1173 |
still running when the session is next |
| 1174 |
saved.</p> |
| 1175 |
</td> |
| 1176 |
<td class="enum_member_annotations"> </td> |
| 1177 |
</tr> |
| 1178 |
<tr> |
| 1179 |
<td class="enum_member_name"><p><a name="XFCE-SM-CLIENT-RESTART-IMMEDIATELY:CAPS"></a>XFCE_SM_CLIENT_RESTART_IMMEDIATELY</p></td> |
| 1180 |
<td class="enum_member_description"> |
| 1181 |
<p>Immediately restart the application |
| 1182 |
if it ever quits.</p> |
| 1183 |
</td> |
| 1184 |
<td class="enum_member_annotations"> </td> |
| 1185 |
</tr> |
| 1186 |
</tbody> |
| 1187 |
</table></div> |
| 1188 |
</div> |
| 1189 |
</div> |
| 1190 |
<hr> |
| 1191 |
<div class="refsect2"> |
| 1192 |
<a name="XfceSMClientShutdownHint"></a><h3>enum XfceSMClientShutdownHint</h3> |
| 1193 |
<p>Hints to the session manager what kind of shutdown the session manager |
| 1194 |
should perform.</p> |
| 1195 |
<div class="refsect3"> |
| 1196 |
<a name="XfceSMClientShutdownHint.members"></a><h4>Members</h4> |
| 1197 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1198 |
<colgroup> |
| 1199 |
<col width="300px" class="enum_members_name"> |
| 1200 |
<col class="enum_members_description"> |
| 1201 |
<col width="200px" class="enum_members_annotations"> |
| 1202 |
</colgroup> |
| 1203 |
<tbody> |
| 1204 |
<tr> |
| 1205 |
<td class="enum_member_name"><p><a name="XFCE-SM-CLIENT-SHUTDOWN-HINT-ASK:CAPS"></a>XFCE_SM_CLIENT_SHUTDOWN_HINT_ASK</p></td> |
| 1206 |
<td class="enum_member_description"> |
| 1207 |
<p>Prompt the user for a choice,</p> |
| 1208 |
</td> |
| 1209 |
<td class="enum_member_annotations"> </td> |
| 1210 |
</tr> |
| 1211 |
<tr> |
| 1212 |
<td class="enum_member_name"><p><a name="XFCE-SM-CLIENT-SHUTDOWN-HINT-LOGOUT:CAPS"></a>XFCE_SM_CLIENT_SHUTDOWN_HINT_LOGOUT</p></td> |
| 1213 |
<td class="enum_member_description"> |
| 1214 |
<p>End the current session,</p> |
| 1215 |
</td> |
| 1216 |
<td class="enum_member_annotations"> </td> |
| 1217 |
</tr> |
| 1218 |
<tr> |
| 1219 |
<td class="enum_member_name"><p><a name="XFCE-SM-CLIENT-SHUTDOWN-HINT-HALT:CAPS"></a>XFCE_SM_CLIENT_SHUTDOWN_HINT_HALT</p></td> |
| 1220 |
<td class="enum_member_description"> |
| 1221 |
<p>Shut down the computer.</p> |
| 1222 |
</td> |
| 1223 |
<td class="enum_member_annotations"> </td> |
| 1224 |
</tr> |
| 1225 |
<tr> |
| 1226 |
<td class="enum_member_name"><p><a name="XFCE-SM-CLIENT-SHUTDOWN-HINT-REBOOT:CAPS"></a>XFCE_SM_CLIENT_SHUTDOWN_HINT_REBOOT</p></td> |
| 1227 |
<td class="enum_member_description"> |
| 1228 |
<p>Restart the computer.</p> |
| 1229 |
</td> |
| 1230 |
<td class="enum_member_annotations"> </td> |
| 1231 |
</tr> |
| 1232 |
</tbody> |
| 1233 |
</table></div> |
| 1234 |
</div> |
| 1235 |
</div> |
| 1236 |
<hr> |
| 1237 |
<div class="refsect2"> |
| 1238 |
<a name="XFCE-SM-CLIENT-ERROR:CAPS"></a><h3>XFCE_SM_CLIENT_ERROR</h3> |
| 1239 |
<pre class="programlisting">#define XFCE_SM_CLIENT_ERROR xfce_sm_client_error_quark () |
| 1240 |
</pre> |
| 1241 |
<p>Error domain for XfceSmCLient. Errors in this domain will be from the <a class="link" href="XfceSMClient.html#XfceSmCLientErrorEnum" title="enum XfceSmCLientErrorEnum"><span class="type">XfceSmCLientErrorEnum</span></a> enumeration. |
| 1242 |
See <span class="type">GError</span> for more information on error domains.</p> |
| 1243 |
</div> |
| 1244 |
<hr> |
| 1245 |
<div class="refsect2"> |
| 1246 |
<a name="XfceSmCLientErrorEnum"></a><h3>enum XfceSmCLientErrorEnum</h3> |
| 1247 |
<p>Error codes returned by XfceSmCLient functions.</p> |
| 1248 |
<div class="refsect3"> |
| 1249 |
<a name="XfceSmCLientErrorEnum.members"></a><h4>Members</h4> |
| 1250 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1251 |
<colgroup> |
| 1252 |
<col width="300px" class="enum_members_name"> |
| 1253 |
<col class="enum_members_description"> |
| 1254 |
<col width="200px" class="enum_members_annotations"> |
| 1255 |
</colgroup> |
| 1256 |
<tbody> |
| 1257 |
<tr> |
| 1258 |
<td class="enum_member_name"><p><a name="XFCE-SM-CLIENT-ERROR-FAILED:CAPS"></a>XFCE_SM_CLIENT_ERROR_FAILED</p></td> |
| 1259 |
<td class="enum_member_description"> |
| 1260 |
<p>Failed to connect to the session manager.</p> |
| 1261 |
</td> |
| 1262 |
<td class="enum_member_annotations"> </td> |
| 1263 |
</tr> |
| 1264 |
<tr> |
| 1265 |
<td class="enum_member_name"><p><a name="XFCE-SM-CLIENT-ERROR-INVALID-CLIENT:CAPS"></a>XFCE_SM_CLIENT_ERROR_INVALID_CLIENT</p></td> |
| 1266 |
<td class="enum_member_description"> |
| 1267 |
<p>Session does not have a valid client id.</p> |
| 1268 |
</td> |
| 1269 |
<td class="enum_member_annotations"> </td> |
| 1270 |
</tr> |
| 1271 |
</tbody> |
| 1272 |
</table></div> |
| 1273 |
</div> |
| 1274 |
</div> |
| 1275 |
</div> |
| 1276 |
<div class="refsect1"> |
| 1277 |
<a name="XfceSMClient.property-details"></a><h2>Property Details</h2> |
| 1278 |
<div class="refsect2"> |
| 1279 |
<a name="XfceSMClient--argc"></a><h3>The <code class="literal">“argc”</code> property</h3> |
| 1280 |
<pre class="programlisting"> “argc” <span class="type">int</span></pre> |
| 1281 |
<p>Argument count passed to program.</p> |
| 1282 |
<p>Owner: XfceSMClient</p> |
| 1283 |
<p>Flags: Write / Construct Only</p> |
| 1284 |
<p>Default value: 0</p> |
| 1285 |
</div> |
| 1286 |
<hr> |
| 1287 |
<div class="refsect2"> |
| 1288 |
<a name="XfceSMClient--argv"></a><h3>The <code class="literal">“argv”</code> property</h3> |
| 1289 |
<pre class="programlisting"> “argv” <span class="type">GStrv</span></pre> |
| 1290 |
<p>Argument vector passed to program.</p> |
| 1291 |
<p>Owner: XfceSMClient</p> |
| 1292 |
<p>Flags: Write / Construct Only</p> |
| 1293 |
</div> |
| 1294 |
<hr> |
| 1295 |
<div class="refsect2"> |
| 1296 |
<a name="XfceSMClient--client-id"></a><h3>The <code class="literal">“client-id”</code> property</h3> |
| 1297 |
<pre class="programlisting"> “client-id” <span class="type">char</span> *</pre> |
| 1298 |
<p>A string uniquely identifying the current instance of this client.</p> |
| 1299 |
<p>Owner: XfceSMClient</p> |
| 1300 |
<p>Flags: Read / Write / Construct Only</p> |
| 1301 |
<p>Default value: NULL</p> |
| 1302 |
</div> |
| 1303 |
<hr> |
| 1304 |
<div class="refsect2"> |
| 1305 |
<a name="XfceSMClient--current-directory"></a><h3>The <code class="literal">“current-directory”</code> property</h3> |
| 1306 |
<pre class="programlisting"> “current-directory” <span class="type">char</span> *</pre> |
| 1307 |
<p>The directory that should be used as the working directory the next time this client is restarted.</p> |
| 1308 |
<p>Owner: XfceSMClient</p> |
| 1309 |
<p>Flags: Read / Write</p> |
| 1310 |
<p>Default value: NULL</p> |
| 1311 |
</div> |
| 1312 |
<hr> |
| 1313 |
<div class="refsect2"> |
| 1314 |
<a name="XfceSMClient--desktop-file"></a><h3>The <code class="literal">“desktop-file”</code> property</h3> |
| 1315 |
<pre class="programlisting"> “desktop-file” <span class="type">char</span> *</pre> |
| 1316 |
<p>The application's .desktop file.</p> |
| 1317 |
<p>Owner: XfceSMClient</p> |
| 1318 |
<p>Flags: Read / Write</p> |
| 1319 |
<p>Default value: NULL</p> |
| 1320 |
</div> |
| 1321 |
<hr> |
| 1322 |
<div class="refsect2"> |
| 1323 |
<a name="XfceSMClient--priority"></a><h3>The <code class="literal">“priority”</code> property</h3> |
| 1324 |
<pre class="programlisting"> “priority” <span class="type">guchar</span></pre> |
| 1325 |
<p>Determines the ordering in which this client is restarted.</p> |
| 1326 |
<p>Owner: XfceSMClient</p> |
| 1327 |
<p>Flags: Read / Write / Construct</p> |
| 1328 |
<p>Default value: 50</p> |
| 1329 |
</div> |
| 1330 |
<hr> |
| 1331 |
<div class="refsect2"> |
| 1332 |
<a name="XfceSMClient--restart-command"></a><h3>The <code class="literal">“restart-command”</code> property</h3> |
| 1333 |
<pre class="programlisting"> “restart-command” <span class="type">GStrv</span></pre> |
| 1334 |
<p>A command used to restart this application, preserving the current state.</p> |
| 1335 |
<p>Owner: XfceSMClient</p> |
| 1336 |
<p>Flags: Read / Write</p> |
| 1337 |
</div> |
| 1338 |
<hr> |
| 1339 |
<div class="refsect2"> |
| 1340 |
<a name="XfceSMClient--restart-style"></a><h3>The <code class="literal">“restart-style”</code> property</h3> |
| 1341 |
<pre class="programlisting"> “restart-style” <a class="link" href="XfceSMClient.html#XfceSMClientRestartStyle" title="enum XfceSMClientRestartStyle"><span class="type">XfceSMClientRestartStyle</span></a></pre> |
| 1342 |
<p>Specifies how the client should be restarted by the session manager.</p> |
| 1343 |
<p>Owner: XfceSMClient</p> |
| 1344 |
<p>Flags: Read / Write / Construct</p> |
| 1345 |
<p>Default value: XFCE_SM_CLIENT_RESTART_NORMAL</p> |
| 1346 |
</div> |
| 1347 |
<hr> |
| 1348 |
<div class="refsect2"> |
| 1349 |
<a name="XfceSMClient--resumed"></a><h3>The <code class="literal">“resumed”</code> property</h3> |
| 1350 |
<pre class="programlisting"> “resumed” <span class="type">gboolean</span></pre> |
| 1351 |
<p>Whether or not the client was resumed with previous state.</p> |
| 1352 |
<p>Owner: XfceSMClient</p> |
| 1353 |
<p>Flags: Read</p> |
| 1354 |
<p>Default value: FALSE</p> |
| 1355 |
</div> |
| 1356 |
</div> |
| 1357 |
<div class="refsect1"> |
| 1358 |
<a name="XfceSMClient.signal-details"></a><h2>Signal Details</h2> |
| 1359 |
<div class="refsect2"> |
| 1360 |
<a name="XfceSMClient-quit"></a><h3>The <code class="literal">“quit”</code> signal</h3> |
| 1361 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 1362 |
user_function (<a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client, |
| 1363 |
<span class="type">gpointer</span> user_data)</pre> |
| 1364 |
<p>Emitted when the application is required to quit. This is not |
| 1365 |
optional: if the client does not quit a short time after receiving |
| 1366 |
this signal, it will likely be terminated in some other way. While |
| 1367 |
not required, the application will usually receive quit-requested |
| 1368 |
before receiving quit. If the application does not connect to this |
| 1369 |
signal, <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> will call <code class="function">exit(3)</code> with |
| 1370 |
an exit code of zero on behalf of the application.</p> |
| 1371 |
<div class="refsect3"> |
| 1372 |
<a name="XfceSMClient-quit.parameters"></a><h4>Parameters</h4> |
| 1373 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1374 |
<colgroup> |
| 1375 |
<col width="150px" class="parameters_name"> |
| 1376 |
<col class="parameters_description"> |
| 1377 |
<col width="200px" class="parameters_annotations"> |
| 1378 |
</colgroup> |
| 1379 |
<tbody> |
| 1380 |
<tr> |
| 1381 |
<td class="parameter_name"><p>sm_client</p></td> |
| 1382 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a></p></td> |
| 1383 |
<td class="parameter_annotations"> </td> |
| 1384 |
</tr> |
| 1385 |
<tr> |
| 1386 |
<td class="parameter_name"><p>user_data</p></td> |
| 1387 |
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td> |
| 1388 |
<td class="parameter_annotations"> </td> |
| 1389 |
</tr> |
| 1390 |
</tbody> |
| 1391 |
</table></div> |
| 1392 |
</div> |
| 1393 |
<p>Flags: Run Last</p> |
| 1394 |
</div> |
| 1395 |
<hr> |
| 1396 |
<div class="refsect2"> |
| 1397 |
<a name="XfceSMClient-quit-cancelled"></a><h3>The <code class="literal">“quit-cancelled”</code> signal</h3> |
| 1398 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 1399 |
user_function (<a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client, |
| 1400 |
<span class="type">gpointer</span> user_data)</pre> |
| 1401 |
<p>Informs the application that it will not need to quit. In most cases, |
| 1402 |
quit-cancelled will be emitted a short time after quit-requested.</p> |
| 1403 |
<div class="refsect3"> |
| 1404 |
<a name="XfceSMClient-quit-cancelled.parameters"></a><h4>Parameters</h4> |
| 1405 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1406 |
<colgroup> |
| 1407 |
<col width="150px" class="parameters_name"> |
| 1408 |
<col class="parameters_description"> |
| 1409 |
<col width="200px" class="parameters_annotations"> |
| 1410 |
</colgroup> |
| 1411 |
<tbody> |
| 1412 |
<tr> |
| 1413 |
<td class="parameter_name"><p>sm_client</p></td> |
| 1414 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a></p></td> |
| 1415 |
<td class="parameter_annotations"> </td> |
| 1416 |
</tr> |
| 1417 |
<tr> |
| 1418 |
<td class="parameter_name"><p>user_data</p></td> |
| 1419 |
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td> |
| 1420 |
<td class="parameter_annotations"> </td> |
| 1421 |
</tr> |
| 1422 |
</tbody> |
| 1423 |
</table></div> |
| 1424 |
</div> |
| 1425 |
<p>Flags: Run Last</p> |
| 1426 |
</div> |
| 1427 |
<hr> |
| 1428 |
<div class="refsect2"> |
| 1429 |
<a name="XfceSMClient-quit-requested"></a><h3>The <code class="literal">“quit-requested”</code> signal</h3> |
| 1430 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 1431 |
user_function (<a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client, |
| 1432 |
<span class="type">gpointer</span> user_data)</pre> |
| 1433 |
<p>Signals the client that the session manager will soon want the |
| 1434 |
application to quit, perhaps as a part of ending the session |
| 1435 |
(but this should not be assumed). The application can take |
| 1436 |
this opportunity to prompt the user to save any unsaved work |
| 1437 |
to disk.</p> |
| 1438 |
<p>This signal also expects a return value from the handler. If the |
| 1439 |
application wishes to cancel the quit request (perhaps because the |
| 1440 |
user selected "Cancel" in prompts to save unsaved work), it should |
| 1441 |
return <code class="literal">TRUE</code> from the handler. If the application is satisfied |
| 1442 |
with possibly needing to quit soon, the handler should return <code class="literal">FALSE</code>.</p> |
| 1443 |
<div class="refsect3"> |
| 1444 |
<a name="XfceSMClient-quit-requested.parameters"></a><h4>Parameters</h4> |
| 1445 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1446 |
<colgroup> |
| 1447 |
<col width="150px" class="parameters_name"> |
| 1448 |
<col class="parameters_description"> |
| 1449 |
<col width="200px" class="parameters_annotations"> |
| 1450 |
</colgroup> |
| 1451 |
<tbody> |
| 1452 |
<tr> |
| 1453 |
<td class="parameter_name"><p>sm_client</p></td> |
| 1454 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a></p></td> |
| 1455 |
<td class="parameter_annotations"> </td> |
| 1456 |
</tr> |
| 1457 |
<tr> |
| 1458 |
<td class="parameter_name"><p>user_data</p></td> |
| 1459 |
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td> |
| 1460 |
<td class="parameter_annotations"> </td> |
| 1461 |
</tr> |
| 1462 |
</tbody> |
| 1463 |
</table></div> |
| 1464 |
</div> |
| 1465 |
<p>Flags: Run Last</p> |
| 1466 |
</div> |
| 1467 |
<hr> |
| 1468 |
<div class="refsect2"> |
| 1469 |
<a name="XfceSMClient-save-state"></a><h3>The <code class="literal">“save-state”</code> signal</h3> |
| 1470 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 1471 |
user_function (<a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client, |
| 1472 |
<span class="type">gpointer</span> user_data)</pre> |
| 1473 |
<p>Signals the client that it should save a copy of its current state |
| 1474 |
such that it could be restarted later in exactly the same state as |
| 1475 |
it is at the time of signal emission.</p> |
| 1476 |
<p>If the state is simple enough to be encoded in the application's |
| 1477 |
command line, <a class="link" href="XfceSMClient.html#xfce-sm-client-set-restart-command" title="xfce_sm_client_set_restart_command ()"><code class="function">xfce_sm_client_set_restart_command()</code></a> can be used |
| 1478 |
to set that command line. For more complex state data, |
| 1479 |
<a class="link" href="XfceSMClient.html#xfce-sm-client-get-state-file" title="xfce_sm_client_get_state_file ()"><code class="function">xfce_sm_client_get_state_file()</code></a> should be used.</p> |
| 1480 |
<p>The application should attempt to save its state as quickly as |
| 1481 |
possible, and MUST NOT interact with the user as a part of saving |
| 1482 |
state.</p> |
| 1483 |
<div class="refsect3"> |
| 1484 |
<a name="XfceSMClient-save-state.parameters"></a><h4>Parameters</h4> |
| 1485 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1486 |
<colgroup> |
| 1487 |
<col width="150px" class="parameters_name"> |
| 1488 |
<col class="parameters_description"> |
| 1489 |
<col width="200px" class="parameters_annotations"> |
| 1490 |
</colgroup> |
| 1491 |
<tbody> |
| 1492 |
<tr> |
| 1493 |
<td class="parameter_name"><p>sm_client</p></td> |
| 1494 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a></p></td> |
| 1495 |
<td class="parameter_annotations"> </td> |
| 1496 |
</tr> |
| 1497 |
<tr> |
| 1498 |
<td class="parameter_name"><p>user_data</p></td> |
| 1499 |
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td> |
| 1500 |
<td class="parameter_annotations"> </td> |
| 1501 |
</tr> |
| 1502 |
</tbody> |
| 1503 |
</table></div> |
| 1504 |
</div> |
| 1505 |
<p>Flags: Run Last</p> |
| 1506 |
</div> |
| 1507 |
<hr> |
| 1508 |
<div class="refsect2"> |
| 1509 |
<a name="XfceSMClient-save-state-extended"></a><h3>The <code class="literal">“save-state-extended”</code> signal</h3> |
| 1510 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 1511 |
user_function (<a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a> *sm_client, |
| 1512 |
<span class="type">gpointer</span> user_data)</pre> |
| 1513 |
<p>Allows the application to save extra state information after all |
| 1514 |
other applications in the session have had a chance to save their |
| 1515 |
state. This is mainly used by the window manager to save window |
| 1516 |
positions. Most applications should not need to connect to this |
| 1517 |
signal.</p> |
| 1518 |
<div class="refsect3"> |
| 1519 |
<a name="XfceSMClient-save-state-extended.parameters"></a><h4>Parameters</h4> |
| 1520 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 1521 |
<colgroup> |
| 1522 |
<col width="150px" class="parameters_name"> |
| 1523 |
<col class="parameters_description"> |
| 1524 |
<col width="200px" class="parameters_annotations"> |
| 1525 |
</colgroup> |
| 1526 |
<tbody> |
| 1527 |
<tr> |
| 1528 |
<td class="parameter_name"><p>sm_client</p></td> |
| 1529 |
<td class="parameter_description"><p>An <a class="link" href="XfceSMClient.html" title="XfceSMClient"><span class="type">XfceSMClient</span></a></p></td> |
| 1530 |
<td class="parameter_annotations"> </td> |
| 1531 |
</tr> |
| 1532 |
<tr> |
| 1533 |
<td class="parameter_name"><p>user_data</p></td> |
| 1534 |
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td> |
| 1535 |
<td class="parameter_annotations"> </td> |
| 1536 |
</tr> |
| 1537 |
</tbody> |
| 1538 |
</table></div> |
| 1539 |
</div> |
| 1540 |
<p>Flags: Run Last</p> |
| 1541 |
</div> |
| 1542 |
</div> |
| 1543 |
</div> |
| 1544 |
<div class="footer"> |
| 1545 |
<hr>Generated by GTK-Doc V1.34.0</div> |
| 1546 |
</body> |
| 1547 |
</html> |