KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21585/root/usr/share/gtk-doc/html/libgnomeui/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21585/root/usr/share/gtk-doc/html/libgnomeui/GnomeClient.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>GnomeClient</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="GNOME UI Library Reference Manual">
<link rel="up" href="ch01.html#initialization" title="Initialization and session management">
<link rel="prev" href="libgnomeui-gnome-ui-init.html" title="gnome-ui-init">
<link rel="next" href="application-mgmt.html" title="Application management">
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="ch01.html" title="GNOME UI Library (libgnomeui)">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="libgnomeui-gnome-ui-init.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch01.html#initialization"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GNOME UI Library Reference Manual</th>
<td><a accesskey="n" href="application-mgmt.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2907068" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id2908562" class="shortcut">Description</a>
                  &#160;|&#160;
                  <a href="#id2908265" class="shortcut">Object Hierarchy</a>
                  &#160;|&#160;
                  <a href="#id2908307" class="shortcut">Signals</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="GnomeClient"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2907068"></a><span class="refentrytitle">GnomeClient</span>
</h2>
<p>GnomeClient &#8212; Interactions with the session manager.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">

#include &lt;libgnomeui/libgnomeui.h&gt;


#define     <a href="GnomeClient.html#GNOME-CLIENT-CONNECTED:CAPS">GNOME_CLIENT_CONNECTED</a>          (obj)
enum        <a href="GnomeClient.html#GnomeDialogType">GnomeDialogType</a>;
enum        <a href="GnomeClient.html#GnomeRestartStyle">GnomeRestartStyle</a>;
enum        <a href="GnomeClient.html#GnomeClientFlags">GnomeClientFlags</a>;
enum        <a href="GnomeClient.html#GnomeSaveStyle">GnomeSaveStyle</a>;
enum        <a href="GnomeClient.html#GnomeInteractStyle">GnomeInteractStyle</a>;
void        (<a href="GnomeClient.html#GnomeInteractFunction">*GnomeInteractFunction</a>)        (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> key,
                                             <a href="GnomeClient.html#GnomeDialogType">GnomeDialogType</a> dialog_type,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);
            <a href="GnomeClient.html#GnomeClient-struct">GnomeClient</a>;
#define     <a href="GnomeClient.html#GNOME-CLIENT-PARAM-SM-CONNECT:CAPS">GNOME_CLIENT_PARAM_SM_CONNECT</a>
<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a>* <a href="GnomeClient.html#gnome-master-client">gnome_master_client</a>            (void);
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>* <a href="GnomeClient.html#gnome-client-get-config-prefix">gnome_client_get_config_prefix</a> (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client);
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>* <a href="GnomeClient.html#gnome-client-get-global-config-prefix">gnome_client_get_global_config_prefix</a>
                                            (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client);
const <a
href="/usr/share/gtk-doc/html/libgnome/libgnome-gnome-program.html#GnomeModuleInfo"
>GnomeModuleInfo</a>* <a href="GnomeClient.html#gnome-client-module-info-get">gnome_client_module_info_get</a>
                                            (void);
void        <a href="GnomeClient.html#gnome-client-set-global-config-prefix">gnome_client_set_global_config_prefix</a>
                                            (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *prefix);
<a href="GnomeClient.html#GnomeClientFlags">GnomeClientFlags</a> <a href="GnomeClient.html#gnome-client-get-flags">gnome_client_get_flags</a>     (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client);
void        <a href="GnomeClient.html#gnome-client-set-restart-style">gnome_client_set_restart_style</a>  (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a href="GnomeClient.html#GnomeRestartStyle">GnomeRestartStyle</a> style);
void        <a href="GnomeClient.html#gnome-client-set-priority">gnome_client_set_priority</a>       (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> priority);
void        <a href="GnomeClient.html#gnome-client-set-restart-command">gnome_client_set_restart_command</a>
                                            (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> argc,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *argv[]);
void        <a href="GnomeClient.html#gnome-client-add-static-arg">gnome_client_add_static_arg</a>     (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             ...);
void        <a href="GnomeClient.html#gnome-client-set-discard-command">gnome_client_set_discard_command</a>
                                            (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> argc,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *argv[]);
void        <a href="GnomeClient.html#gnome-client-set-resign-command">gnome_client_set_resign_command</a> (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> argc,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *argv[]);
void        <a href="GnomeClient.html#gnome-client-set-shutdown-command">gnome_client_set_shutdown_command</a>
                                            (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> argc,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *argv[]);
void        <a href="GnomeClient.html#gnome-client-set-current-directory">gnome_client_set_current_directory</a>
                                            (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *dir);
void        <a href="GnomeClient.html#gnome-client-set-environment">gnome_client_set_environment</a>    (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *name,
                                             const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *value);
void        <a href="GnomeClient.html#gnome-client-set-clone-command">gnome_client_set_clone_command</a>  (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> argc,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *argv[]);
void        <a href="GnomeClient.html#gnome-client-set-process-id">gnome_client_set_process_id</a>     (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             pid_t pid);
void        <a href="GnomeClient.html#gnome-client-set-program">gnome_client_set_program</a>        (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *program);
void        <a href="GnomeClient.html#gnome-client-set-user-id">gnome_client_set_user_id</a>        (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *id);
void        <a href="GnomeClient.html#gnome-client-save-any-dialog">gnome_client_save_any_dialog</a>    (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a
href="/usr/share/gtk-doc/html/gtk/GtkDialog.html"
>GtkDialog</a> *dialog);
void        <a href="GnomeClient.html#gnome-client-save-error-dialog">gnome_client_save_error_dialog</a>  (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a
href="/usr/share/gtk-doc/html/gtk/GtkDialog.html"
>GtkDialog</a> *dialog);
void        <a href="GnomeClient.html#gnome-client-request-phase-2">gnome_client_request_phase_2</a>    (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client);
void        <a href="GnomeClient.html#gnome-client-request-save">gnome_client_request_save</a>       (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a href="GnomeClient.html#GnomeSaveStyle">GnomeSaveStyle</a> save_style,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> shutdown,
                                             <a href="GnomeClient.html#GnomeInteractStyle">GnomeInteractStyle</a> interact_style,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> fast,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> global);
void        <a href="GnomeClient.html#gnome-client-flush">gnome_client_flush</a>              (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client);
void        <a href="GnomeClient.html#gnome-client-disable-master-connection">gnome_client_disable_master_connection</a>
                                            (void);
<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a>* <a href="GnomeClient.html#gnome-client-new">gnome_client_new</a>               (void);
<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a>* <a href="GnomeClient.html#gnome-client-new-without-connection">gnome_client_new_without_connection</a>
                                            (void);
void        <a href="GnomeClient.html#gnome-client-connect">gnome_client_connect</a>            (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client);
void        <a href="GnomeClient.html#gnome-client-disconnect">gnome_client_disconnect</a>         (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client);
void        <a href="GnomeClient.html#gnome-client-set-id">gnome_client_set_id</a>             (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *id);
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>* <a href="GnomeClient.html#gnome-client-get-id">gnome_client_get_id</a>            (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client);
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>* <a href="GnomeClient.html#gnome-client-get-previous-id">gnome_client_get_previous_id</a>   (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client);
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>* <a href="GnomeClient.html#gnome-client-get-desktop-id">gnome_client_get_desktop_id</a>    (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client);
void        <a href="GnomeClient.html#gnome-client-request-interaction">gnome_client_request_interaction</a>
                                            (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a href="GnomeClient.html#GnomeDialogType">GnomeDialogType</a> dialog_type,
                                             <a href="GnomeClient.html#GnomeInteractFunction">GnomeInteractFunction</a> function,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);
void        <a href="GnomeClient.html#gnome-client-request-interaction-interp">gnome_client_request_interaction_interp</a>
                                            (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a href="GnomeClient.html#GnomeDialogType">GnomeDialogType</a> dialog_type,
                                             <a
href="/usr/share/gtk-doc/html/gtk/gtk-Types.html#GtkCallbackMarshal"
>GtkCallbackMarshal</a> function,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data,
                                             <a
href="/usr/share/gtk-doc/html/gtk/gtk-Types.html#GtkDestroyNotify"
>GtkDestroyNotify</a> destroy);
void        <a href="GnomeClient.html#gnome-interaction-key-return">gnome_interaction_key_return</a>    (<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> key,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> cancel_shutdown);


</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2908265"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">

  <a
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
   +----<a
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned"
>GInitiallyUnowned</a>
         +----<a
href="/usr/share/gtk-doc/html/gtk/GtkObject.html"
>GtkObject</a>
               +----GnomeClient
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2908307"></a><h2>Signals</h2>
<pre class="synopsis">

"<a href="GnomeClient.html#GnomeClient-connect">connect</a>"   void        user_function      (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>     arg1,
                                            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>     user_data)      : Run first
"<a href="GnomeClient.html#GnomeClient-die">die</a>"       void        user_function      (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>     user_data)      : Run last
"<a href="GnomeClient.html#GnomeClient-disconnect">disconnect</a>"
            void        user_function      (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>     user_data)      : Run first
"<a href="GnomeClient.html#GnomeClient-save-complete">save-complete</a>"
            void        user_function      (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>     user_data)      : Run first
"<a href="GnomeClient.html#GnomeClient-save-yourself">save-yourself</a>"
            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    user_function      (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a>        *client,
                                            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                arg1,
                                            <a href="GnomeClient.html#GnomeSaveStyle">GnomeSaveStyle</a>     *arg2,
                                            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            arg3,
                                            <a href="GnomeClient.html#GnomeInteractStyle">GnomeInteractStyle</a> *arg4,
                                            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            arg5,
                                            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>            user_data)      : Run last
"<a href="GnomeClient.html#GnomeClient-shutdown-cancelled">shutdown-cancelled</a>"
            void        user_function      (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>     user_data)      : Run first
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2908562"></a><h2>Description</h2>
<p>

</p>
</div>
<div class="refsect1" lang="en">
<a name="id2908577"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2908587"></a><h3>
<a name="GNOME-CLIENT-CONNECTED:CAPS"></a>GNOME_CLIENT_CONNECTED()</h3>
<a class="indexterm" name="id2908600"></a><pre class="programlisting">#define GNOME_CLIENT_CONNECTED(obj) (GNOME_CLIENT (obj)-&gt;smc_conn)
</pre>
<p>
Determine if the <a href="GnomeClient.html" title="GnomeClient"><span class="type">GnomeClient</span></a> instance has connected to the session manager
already.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>obj</code></em>&#160;:</span></td>
<td>A <a href="GnomeClient.html" title="GnomeClient"><span class="type">GnomeClient</span></a> instance.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>
<a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if already connected to the session manager, <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> otherwise.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2908682"></a><h3>
<a name="GnomeDialogType"></a>enum GnomeDialogType</h3>
<a class="indexterm" name="id2908695"></a><pre class="programlisting">typedef enum
{
  GNOME_DIALOG_ERROR,
  GNOME_DIALOG_NORMAL
} GnomeDialogType;
</pre>
<p>
The dialogs used by the session manager to handler user interactions.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="GNOME-DIALOG-ERROR:CAPS"></a><code class="literal">GNOME_DIALOG_ERROR</code></span></td>
<td>Used when an error has occurred.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GNOME-DIALOG-NORMAL:CAPS"></a><code class="literal">GNOME_DIALOG_NORMAL</code></span></td>
<td>Used for all other (non-error) interactions.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2908762"></a><h3>
<a name="GnomeRestartStyle"></a>enum GnomeRestartStyle</h3>
<a class="indexterm" name="id2908774"></a><pre class="programlisting">typedef enum
{
  /* update structure when adding an enum */
  GNOME_RESTART_IF_RUNNING,
  GNOME_RESTART_ANYWAY,
  GNOME_RESTART_IMMEDIATELY,
  GNOME_RESTART_NEVER
} GnomeRestartStyle;
</pre>
<p>
The various ways in which the session manager can restart a client. Set by
calling <a href="GnomeClient.html#gnome-client-set-restart-style"><code class="function">gnome_client_set_restart_style()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="GNOME-RESTART-IF-RUNNING:CAPS"></a><code class="literal">GNOME_RESTART_IF_RUNNING</code></span></td>
<td>Restart if the client was running when the previous
session exited.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GNOME-RESTART-ANYWAY:CAPS"></a><code class="literal">GNOME_RESTART_ANYWAY</code></span></td>
<td>Restart even if the client was exited before the user
logged out of the previous session.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GNOME-RESTART-IMMEDIATELY:CAPS"></a><code class="literal">GNOME_RESTART_IMMEDIATELY</code></span></td>
<td>Restart the client immediately whenever it crashes
or exits.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GNOME-RESTART-NEVER:CAPS"></a><code class="literal">GNOME_RESTART_NEVER</code></span></td>
<td>Do not restart the client.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2908902"></a><h3>
<a name="GnomeClientFlags"></a>enum GnomeClientFlags</h3>
<a class="indexterm" name="id2908915"></a><pre class="programlisting">typedef enum
{
  GNOME_CLIENT_IS_CONNECTED= 1 &lt;&lt; 0,
  GNOME_CLIENT_RESTARTED   = 1 &lt;&lt; 1,
  GNOME_CLIENT_RESTORED    = 1 &lt;&lt; 2
} GnomeClientFlags;
</pre>
<p>
Flags indicating the status of a client (as seen by the session manager). Used
as return values by <a href="GnomeClient.html#gnome-client-get-flags"><code class="function">gnome_client_get_flags()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="GNOME-CLIENT-IS-CONNECTED:CAPS"></a><code class="literal">GNOME_CLIENT_IS_CONNECTED</code></span></td>
<td>The client is connected to the session manager.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GNOME-CLIENT-RESTARTED:CAPS"></a><code class="literal">GNOME_CLIENT_RESTARTED</code></span></td>
<td>The client has been restarted (i.e. it has been
running with the same client id previously).
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GNOME-CLIENT-RESTORED:CAPS"></a><code class="literal">GNOME_CLIENT_RESTORED</code></span></td>
<td>There may be a configuration file from which the
client's state should be restored (applies only to the master client).

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2909022"></a><h3>
<a name="GnomeSaveStyle"></a>enum GnomeSaveStyle</h3>
<a class="indexterm" name="id2909034"></a><pre class="programlisting">typedef enum
{
  /* update structure when adding an enum */
  GNOME_SAVE_GLOBAL,
  GNOME_SAVE_LOCAL,
  GNOME_SAVE_BOTH
} GnomeSaveStyle;
</pre>
<p>
Which pieces of data a client should save when receiving a "SaveYourself" call
from the session manager.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="GNOME-SAVE-GLOBAL:CAPS"></a><code class="literal">GNOME_SAVE_GLOBAL</code></span></td>
<td>Save data (to somewhere persistent) that affects and is
visible to all users of this application.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GNOME-SAVE-LOCAL:CAPS"></a><code class="literal">GNOME_SAVE_LOCAL</code></span></td>
<td>Save data that only applies to this instance of the
application.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GNOME-SAVE-BOTH:CAPS"></a><code class="literal">GNOME_SAVE_BOTH</code></span></td>
<td>Save both global and local data.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2909126"></a><h3>
<a name="GnomeInteractStyle"></a>enum GnomeInteractStyle</h3>
<a class="indexterm" name="id2909138"></a><pre class="programlisting">typedef enum
{
  GNOME_INTERACT_NONE,
  GNOME_INTERACT_ERRORS,
  GNOME_INTERACT_ANY
} GnomeInteractStyle;
</pre>
<p>
Indicates how a "SaveYourself" command should interact with the user.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="GNOME-INTERACT-NONE:CAPS"></a><code class="literal">GNOME_INTERACT_NONE</code></span></td>
<td>The client should never interact with the user.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GNOME-INTERACT-ERRORS:CAPS"></a><code class="literal">GNOME_INTERACT_ERRORS</code></span></td>
<td>The client should only interact when there are errors.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GNOME-INTERACT-ANY:CAPS"></a><code class="literal">GNOME_INTERACT_ANY</code></span></td>
<td>The client cna interact with the user for any reason.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2909230"></a><h3>
<a name="GnomeInteractFunction"></a>GnomeInteractFunction ()</h3>
<a class="indexterm" name="id2909242"></a><pre class="programlisting">void        (*GnomeInteractFunction)        (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> key,
                                             <a href="GnomeClient.html#GnomeDialogType">GnomeDialogType</a> dialog_type,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);</pre>
<p>
A function called when the client wishes to interact with the user a the
session manager's convenience (usually during shutdown and restarts). All other
clients are blocked from interacting with the user until the <em class="parameter"><code>key</code></em> is released
via a call to <a href="GnomeClient.html#gnome-interaction-key-return"><code class="function">gnome_interaction_key_return()</code></a>.
</p>
<p>
Although the function is not obliged to respect the passed in <em class="parameter"><code>dialog_type</code></em>, it
is bad form not to do so.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td>The <a href="GnomeClient.html" title="GnomeClient"><span class="type">GnomeClient</span></a> instance doing the interaction.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>key</code></em>&#160;:</span></td>
<td>A unique key.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>dialog_type</code></em>&#160;:</span></td>
<td>The <a href="GnomeClient.html#GnomeDialogType"><span class="type">GnomeDialogType</span></a> that should be used to do the interaction.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></td>
<td>Application specific data that was specified at the time the callback
was set up.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2909403"></a><h3>
<a name="GnomeClient-struct"></a>GnomeClient</h3>
<a class="indexterm" name="id2909417"></a><pre class="programlisting">typedef struct _GnomeClient GnomeClient;</pre>
<p>
A widget representing a client and containing information about the client's
interaction with the session manager.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2909434"></a><h3>
<a name="GNOME-CLIENT-PARAM-SM-CONNECT:CAPS"></a>GNOME_CLIENT_PARAM_SM_CONNECT</h3>
<a class="indexterm" name="id2909447"></a><pre class="programlisting">#define GNOME_CLIENT_PARAM_SM_CONNECT "sm-connect"
</pre>
<p>
Passed as a parameter to the application's <a
href="/usr/share/gtk-doc/html/libgnome/libgnome-gnome-program.html#gnome-program-init"
><code class="function">gnome_program_init()</code></a> call (with a
value of <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>) to indicate whether the application should attempt to
connect to the session manager or not. Can be overridden by the user passing
<code class="literal">--sm-disable</code> on the command line and defaults to <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2909514"></a><h3>
<a name="gnome-master-client"></a>gnome_master_client ()</h3>
<a class="indexterm" name="id2909527"></a><pre class="programlisting"><a href="GnomeClient.html" title="GnomeClient">GnomeClient</a>* gnome_master_client            (void);</pre>
<p>
Get the master session management client.  This master client gets a client
id, that may be specified by the '--sm-client-id' command line option.  A
master client will be generated by <a
href="/usr/share/gtk-doc/html/libgnome/libgnome-gnome-program.html#gnome-program-init"
><code class="function">gnome_program_init()</code></a>.  If possible the
master client will contact the session manager after command-line parsing is
finished (unless <a href="GnomeClient.html#gnome-client-disable-master-connection"><code class="function">gnome_client_disable_master_connection()</code></a> was called). The
master client will also set the SM_CLIENT_ID property on the client leader
window of your application.
</p>
<p>
Additionally, the master client gets some static arguments set automatically
(see <a href="GnomeClient.html#gnome-client-add-static-arg"><code class="function">gnome_client_add_static_arg()</code></a> for static arguments):
<a
href="/usr/share/gtk-doc/html/libgnome/libgnome-gnome-program.html#gnome-program-init"
><code class="function">gnome_program_init()</code></a> passes all the command line options which are
recognised by gtk as static arguments to the master client.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>  Pointer to the master client
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2909624"></a><h3>
<a name="gnome-client-get-config-prefix"></a>gnome_client_get_config_prefix ()</h3>
<a class="indexterm" name="id2909638"></a><pre class="programlisting">const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>* gnome_client_get_config_prefix (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client);</pre>
<p>
Get the config prefix for a client. This config prefix
provides a suitable place to store any details about the state of
the client which can not be described using the app's command line
arguments (as set in the restart command). You may push the
returned value using <a
href="/usr/share/gtk-doc/html/libgnome/libgnome-gnome-config.html#gnome-config-push-prefix"
><code class="function">gnome_config_push_prefix()</code></a> and read or write
any values you require.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> Pointer to GNOME session client object.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> Config prefix. The returned string belongs to libgnomeui library
and should NOT be freed by the caller.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2909718"></a><h3>
<a name="gnome-client-get-global-config-prefix"></a>gnome_client_get_global_config_prefix ()</h3>
<a class="indexterm" name="id2909731"></a><pre class="programlisting">const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>* gnome_client_get_global_config_prefix
                                            (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client);</pre>
<p>
Get the config prefix that will be returned by
<a href="GnomeClient.html#gnome-client-get-config-prefix"><code class="function">gnome_client_get_config_prefix()</code></a> for clients which have NOT been restarted
or cloned (i.e. for clients started by the user without `--sm-' options).
This config prefix may be used to write the user's preferred config for
these "new" clients.
</p>
<p>
You could also use this prefix as a place to store and retrieve config
details that you wish to apply to ALL instances of the app. However, this
practice limits the users freedom to configure each instance in a different
way so it should be used with caution.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> Pointer to GNOME session client object.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>  The config prefix as a newly allocated string.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2909818"></a><h3>
<a name="gnome-client-module-info-get"></a>gnome_client_module_info_get ()</h3>
<a class="indexterm" name="id2909832"></a><pre class="programlisting">const <a
href="/usr/share/gtk-doc/html/libgnome/libgnome-gnome-program.html#GnomeModuleInfo"
>GnomeModuleInfo</a>* gnome_client_module_info_get
                                            (void);</pre>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2909870"></a><h3>
<a name="gnome-client-set-global-config-prefix"></a>gnome_client_set_global_config_prefix ()</h3>
<a class="indexterm" name="id2909884"></a><pre class="programlisting">void        gnome_client_set_global_config_prefix
                                            (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *prefix);</pre>
<p>
Set the value used for the global config prefix. The config
prefixes returned by <a href="GnomeClient.html#gnome-client-get-config-prefix"><code class="function">gnome_client_get_config_prefix()</code></a> are formed by
extending this prefix with an unique identifier.
</p>
<p>
The global config prefix defaults to a name based on the name of
the executable. This function allows you to set it to a different
value. It should be called BEFORE retrieving the config prefix for
the first time. Later calls will be ignored.
</p>
<p>
For example, setting a global config prefix of "/app.d/session/"
would ensure that all your session save files or directories would
be gathered together into the app.d directory.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> Pointer to GNOME session client object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>prefix</code></em>&#160;:</span></td>
<td> Prefix for saving the global configuration.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2909985"></a><h3>
<a name="gnome-client-get-flags"></a>gnome_client_get_flags ()</h3>
<a class="indexterm" name="id2909998"></a><pre class="programlisting"><a href="GnomeClient.html#GnomeClientFlags">GnomeClientFlags</a> gnome_client_get_flags     (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client);</pre>
<p>
Determine the client's status with the session manager.,</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> Pointer to GNOME session client object.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> Various <span class="type">GnomeClientFlag</span> flags which have been or'd together.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2910070"></a><h3>
<a name="gnome-client-set-restart-style"></a>gnome_client_set_restart_style ()</h3>
<a class="indexterm" name="id2910083"></a><pre class="programlisting">void        gnome_client_set_restart_style  (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a href="GnomeClient.html#GnomeRestartStyle">GnomeRestartStyle</a> style);</pre>
<p>
Tells the session manager how the client should be restarted in future
session. The options are given by the <a href="GnomeClient.html#GnomeRestartStyle"><span class="type">GnomeRestartStyle</span></a> enum.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> Pointer to GNOME session client object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>style</code></em>&#160;:</span></td>
<td> When to restart the client.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2910166"></a><h3>
<a name="gnome-client-set-priority"></a>gnome_client_set_priority ()</h3>
<a class="indexterm" name="id2910179"></a><pre class="programlisting">void        gnome_client_set_priority       (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
>guint</a> priority);</pre>
<p>
The gnome-session manager restarts clients in order of their
priorities in a similar way to the start up ordering in SysV.
This function allows the app to suggest a position in this
ordering. The value should be between 0 and 99. A default
value of 50 is assigned to apps that do not provide a value.
The user may assign a different priority.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> Pointer to GNOME session client object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>priority</code></em>&#160;:</span></td>
<td> Position of client in session start up ordering.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2910257"></a><h3>
<a name="gnome-client-set-restart-command"></a>gnome_client_set_restart_command ()</h3>
<a class="indexterm" name="id2910270"></a><pre class="programlisting">void        gnome_client_set_restart_command
                                            (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> argc,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *argv[]);</pre>
<p>
When clients crash or the user logs out and back in, they are
restarted. This command should perform the restart.  Executing the restart
command on the local host should reproduce the state of the client at the
time of the session save as closely as possible. Saving config info under
the <a href="GnomeClient.html#gnome-client-get-config-prefix"><code class="function">gnome_client_get_config_prefix()</code></a> is generally useful.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> Pointer to GNOME session client object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>argc</code></em>&#160;:</span></td>
<td> Number of strings in argv.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>argv</code></em>&#160;:</span></td>
<td> Argument vector to an <code class="function">execv()</code> to restart the client.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2910392"></a><h3>
<a name="gnome-client-add-static-arg"></a>gnome_client_add_static_arg ()</h3>
<a class="indexterm" name="id2910406"></a><pre class="programlisting">void        gnome_client_add_static_arg     (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             ...);</pre>
<p>
You can add arguments to your restart command's argv with this
function. This function provides an alternative way of adding new arguments
to the restart command. The arguments are placed before the arguments
specified by <a href="GnomeClient.html#gnome-client-set-restart-command"><code class="function">gnome_client_set_restart_command()</code></a> and after the arguments
recognised by GTK+ that are specified by the user on the original command
line.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> Pointer to GNOME session client object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>...</code></em>&#160;:</span></td>
<td> <a
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
><code class="literal">NULL</code></a>-terminated list of arguments to add to the restart command.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2910497"></a><h3>
<a name="gnome-client-set-discard-command"></a>gnome_client_set_discard_command ()</h3>
<a class="indexterm" name="id2910511"></a><pre class="programlisting">void        gnome_client_set_discard_command
                                            (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> argc,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *argv[]);</pre>
<p>
Provides a command to run when a client is removed from the session. It might
delete session-specific config files for example.  Executing the discard
command on the local host should delete the information saved as part of the
session save that was in progress when the discard command was set. For
example:

  </p>
<div class="example">
<a name="id2910559"></a><p class="title"><b>Example&#160;1.&#160;Setting up a client's discard command</b></p>
<pre class="programlisting">
gchar *prefix = gnome_client_get_config_prefix (client);
gchar *argv[] = { "rm", "-r", NULL };
argv[2] = gnome_config_get_real_path (prefix);
gnome_client_set_discard_command (client, 3, argv);
    </pre>
</div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td>The <a href="GnomeClient.html" title="GnomeClient"><span class="type">GnomeClient</span></a> of interest.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>argc</code></em>&#160;:</span></td>
<td>Number of strings in <em class="parameter"><code>argv</code></em>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>argv</code></em>&#160;:</span></td>
<td>Vector of strings such as those passed to <code class="function">exev()</code>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2910649"></a><h3>
<a name="gnome-client-set-resign-command"></a>gnome_client_set_resign_command ()</h3>
<a class="indexterm" name="id2910662"></a><pre class="programlisting">void        gnome_client_set_resign_command (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> argc,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *argv[]);</pre>
<p>
Some clients can be "undone," removing their effects and
deleting any saved state. For example, xmodmap could register a resign
command to undo the keymap changes it saved.
</p>
<p>
Used by clients that use the <a href="GnomeClient.html#GNOME-RESTART-ANYWAY:CAPS"><span class="type">GNOME_RESTART_ANYWAY</span></a> restart style to to undo
their effects (these clients usually perform initialisation functions and
leave effects behind after they die). The resign command combines the
effects of a shutdown command and a discard command. It is executed when the
user decides that the client should cease to be restarted.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> Pointer to GNOME session client object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>argc</code></em>&#160;:</span></td>
<td> Number of strings in <em class="parameter"><code>argv</code></em>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>argv</code></em>&#160;:</span></td>
<td> <code class="function">execv()</code>-style command to undo the effects of the client.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2910793"></a><h3>
<a name="gnome-client-set-shutdown-command"></a>gnome_client_set_shutdown_command ()</h3>
<a class="indexterm" name="id2910807"></a><pre class="programlisting">void        gnome_client_set_shutdown_command
                                            (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> argc,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *argv[]);</pre>
<p>
GNOME_RESTART_ANYWAY clients can set this command to run
when the user logs out but the client is no longer running.
</p>
<p>
Used by clients that use the GNOME_RESTART_ANYWAY restart style to
to undo their effects (these clients usually perform initialisation
functions and leave effects behind after they die).  The shutdown
command simply undoes the effects of the client. It is executed
during a normal logout.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> Pointer to GNOME session client object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>argc</code></em>&#160;:</span></td>
<td> Number of strings in argv.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>argv</code></em>&#160;:</span></td>
<td> Command to shutdown the client if the client isn't running.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2910912"></a><h3>
<a name="gnome-client-set-current-directory"></a>gnome_client_set_current_directory ()</h3>
<a class="indexterm" name="id2910926"></a><pre class="programlisting">void        gnome_client_set_current_directory
                                            (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *dir);</pre>
<p>
Set the directory to be in when running shutdown, discard,
restart, etc. commands.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> Pointer to GNOME session client object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>dir</code></em>&#160;:</span></td>
<td> Directory path.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2910999"></a><h3>
<a name="gnome-client-set-environment"></a>gnome_client_set_environment ()</h3>
<a class="indexterm" name="id2911013"></a><pre class="programlisting">void        gnome_client_set_environment    (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *name,
                                             const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *value);</pre>
<p>
Set an environment variable to be placed in the
client's environment prior to running restart, shutdown, discard, etc. commands.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> Pointer to GNOME session client object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></td>
<td> Name of the environment variable
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></td>
<td> Value of the environment variable
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2911109"></a><h3>
<a name="gnome-client-set-clone-command"></a>gnome_client_set_clone_command ()</h3>
<a class="indexterm" name="id2911123"></a><pre class="programlisting">void        gnome_client_set_clone_command  (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> argc,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *argv[]);</pre>
<p>
Set a command the session manager can use to create a new
instance of the application.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> Pointer to GNOME session client object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>argc</code></em>&#160;:</span></td>
<td> Number of strings in the <em class="parameter"><code>argv</code></em> vector.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>argv</code></em>&#160;:</span></td>
<td> Argument strings, suitable for use with <code class="function">execv()</code>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2911234"></a><h3>
<a name="gnome-client-set-process-id"></a>gnome_client_set_process_id ()</h3>
<a class="indexterm" name="id2911248"></a><pre class="programlisting">void        gnome_client_set_process_id     (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             pid_t pid);</pre>
<p>
The client should tell the session manager the result of
<code class="function">getpid()</code>. However, GNOME does this automatically; so you do not need this
function.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> Pointer to GNOME session client object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>pid</code></em>&#160;:</span></td>
<td> PID to set as the client's PID.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2911332"></a><h3>
<a name="gnome-client-set-program"></a>gnome_client_set_program ()</h3>
<a class="indexterm" name="id2911344"></a><pre class="programlisting">void        gnome_client_set_program        (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *program);</pre>
<p>
Used to tell the session manager the name of your program. Set
automatically; this function isn't needed.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> Pointer to GNOME session client object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>program</code></em>&#160;:</span></td>
<td> Name of the program.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2911418"></a><h3>
<a name="gnome-client-set-user-id"></a>gnome_client_set_user_id ()</h3>
<a class="indexterm" name="id2911431"></a><pre class="programlisting">void        gnome_client_set_user_id        (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *id);</pre>
<p>
Tell the session manager the user's login name. GNOME
does this automatically; no need to call the function.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> Pointer to GNOME session client object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>id</code></em>&#160;:</span></td>
<td> Username.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2911504"></a><h3>
<a name="gnome-client-save-any-dialog"></a>gnome_client_save_any_dialog ()</h3>
<a class="indexterm" name="id2911517"></a><pre class="programlisting">void        gnome_client_save_any_dialog    (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a
href="/usr/share/gtk-doc/html/gtk/GtkDialog.html"
>GtkDialog</a> *dialog);</pre>
<p>
May be called during a "save_youself" handler to request that a
(modal) dialog is presented to the user. The session manager decides
when the dialog is shown, but it will not be shown it unless the
session manager is sending an interaction style of <a href="GnomeClient.html#GNOME-INTERACT-ANY:CAPS"><span class="type">GNOME_INTERACT_ANY</span></a>.
A "Cancel Logout" button will be added during a shutdown.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> Pointer to <a href="GnomeClient.html" title="GnomeClient"><span class="type">GnomeClient</span></a> object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>dialog</code></em>&#160;:</span></td>
<td> Pointer to GNOME dialog widget (a <a
href="/usr/share/gtk-doc/html/gtk/GtkDialog.html"
><span class="type">GtkDialog</span></a> widget).
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2911620"></a><h3>
<a name="gnome-client-save-error-dialog"></a>gnome_client_save_error_dialog ()</h3>
<a class="indexterm" name="id2911632"></a><pre class="programlisting">void        gnome_client_save_error_dialog  (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a
href="/usr/share/gtk-doc/html/gtk/GtkDialog.html"
>GtkDialog</a> *dialog);</pre>
<p>
May be called during a "save_youself" handler when an error has occurred
during the save. The session manager decides when the dialog is shown, but
it will not be shown it unless the session manager is sending an interaction
style of <a href="GnomeClient.html#GNOME-INTERACT-ANY:CAPS"><span class="type">GNOME_INTERACT_ANY</span></a>. A "Cancel Logout" button will be added
during a shutdown.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> Pointer to <a href="GnomeClient.html" title="GnomeClient"><span class="type">GnomeClient</span></a> object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>dialog</code></em>&#160;:</span></td>
<td> Pointer to GNOME dialog widget (a <a
href="/usr/share/gtk-doc/html/gtk/GtkDialog.html"
><span class="type">GtkDialog</span></a> widget).
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2911734"></a><h3>
<a name="gnome-client-request-phase-2"></a>gnome_client_request_phase_2 ()</h3>
<a class="indexterm" name="id2911747"></a><pre class="programlisting">void        gnome_client_request_phase_2    (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client);</pre>
<p>
Request the session managaer to emit the "save_yourself"
signal for a second time after all the clients in the session have ceased
interacting with the user and entered an idle state. This might be useful if
your app manages other apps and requires that they are in an idle state
before saving its final data.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> A <a href="GnomeClient.html" title="GnomeClient"><span class="type">GnomeClient</span></a> object.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2911809"></a><h3>
<a name="gnome-client-request-save"></a>gnome_client_request_save ()</h3>
<a class="indexterm" name="id2911823"></a><pre class="programlisting">void        gnome_client_request_save       (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a href="GnomeClient.html#GnomeSaveStyle">GnomeSaveStyle</a> save_style,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> shutdown,
                                             <a href="GnomeClient.html#GnomeInteractStyle">GnomeInteractStyle</a> interact_style,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> fast,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> global);</pre>
<p>
Request the session manager to save the session in
some way. The arguments correspond with the arguments passed to the
"save_yourself" signal handler.
</p>
<p>
The save_style indicates whether the save should affect data
accessible to other users (<a href="GnomeClient.html#GNOME-SAVE-GLOBAL:CAPS"><span class="type">GNOME_SAVE_GLOBAL</span></a>) or only the state
visible to the current user (<a href="GnomeClient.html#GNOME-SAVE-LOCAL:CAPS"><span class="type">GNOME_SAVE_LOCAL</span></a>) or both. Setting
shutdown to <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> will initiate a logout. The interact_style
specifies which kinds of interaction will be available. Setting
fast to <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> will limit the save to setting the session manager
properties plus any essential data.  Setting the value of global to
<a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> will request that all the other apps in the session do a save
as well. A global save is mandatory when doing a shutdown.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> Pointer to GNOME session client object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>save_style</code></em>&#160;:</span></td>
<td> Save style to request.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>shutdown</code></em>&#160;:</span></td>
<td> Whether to log out of the session.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>interact_style</code></em>&#160;:</span></td>
<td> Whether to allow user interaction.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>fast</code></em>&#160;:</span></td>
<td> Minimize activity to save as soon as possible.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>global</code></em>&#160;:</span></td>
<td> Request that all other apps in the session also save their state.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2912048"></a><h3>
<a name="gnome-client-flush"></a>gnome_client_flush ()</h3>
<a class="indexterm" name="id2912060"></a><pre class="programlisting">void        gnome_client_flush              (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client);</pre>
<p>
This will force the underlying connection to the session manager to be
flushed. This is useful if you have some pending changes that you want to
make sure get committed.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> A <a href="GnomeClient.html" title="GnomeClient"><span class="type">GnomeClient</span></a> instance.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2912120"></a><h3>
<a name="gnome-client-disable-master-connection"></a>gnome_client_disable_master_connection ()</h3>
<a class="indexterm" name="id2912136"></a><pre class="programlisting">void        gnome_client_disable_master_connection
                                            (void);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gnome_client_disable_master_connection</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Don't connect the master client to the session manager. Usually
invoked by users when they pass the --sm-disable argument to a Gnome application.</p>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2912177"></a><h3>
<a name="gnome-client-new"></a>gnome_client_new ()</h3>
<a class="indexterm" name="id2912190"></a><pre class="programlisting"><a href="GnomeClient.html" title="GnomeClient">GnomeClient</a>* gnome_client_new               (void);</pre>
<p>
Allocates memory for a new GNOME session management client
object. After allocating, the client tries to connect to a session manager.
You probably want to use <a href="GnomeClient.html#gnome-master-client"><code class="function">gnome_master_client()</code></a> instead.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> Pointer to a newly allocated GNOME session management client object.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2912244"></a><h3>
<a name="gnome-client-new-without-connection"></a>gnome_client_new_without_connection ()</h3>
<a class="indexterm" name="id2912258"></a><pre class="programlisting"><a href="GnomeClient.html" title="GnomeClient">GnomeClient</a>* gnome_client_new_without_connection
                                            (void);</pre>
<p>
Allocates memory for a new GNOME session management client
object. You probably want to use <a href="GnomeClient.html#gnome-master-client"><code class="function">gnome_master_client()</code></a> instead.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> Pointer to a newly allocated GNOME session management client object.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2912311"></a><h3>
<a name="gnome-client-connect"></a>gnome_client_connect ()</h3>
<a class="indexterm" name="id2912324"></a><pre class="programlisting">void        gnome_client_connect            (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client);</pre>
<p>
Causes the client to connect to the session manager.
Usually happens automatically; no need to call this function.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> A <a href="GnomeClient.html" title="GnomeClient"><span class="type">GnomeClient</span></a> instance.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2912383"></a><h3>
<a name="gnome-client-disconnect"></a>gnome_client_disconnect ()</h3>
<a class="indexterm" name="id2912396"></a><pre class="programlisting">void        gnome_client_disconnect         (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client);</pre>
<p>
Disconnect the client from the session manager.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> A <a href="GnomeClient.html" title="GnomeClient"><span class="type">GnomeClient</span></a> instance.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2912454"></a><h3>
<a name="gnome-client-set-id"></a>gnome_client_set_id ()</h3>
<a class="indexterm" name="id2912467"></a><pre class="programlisting">void        gnome_client_set_id             (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *id);</pre>
<p>
Set the client's session management ID; must be done
before connecting to the session manager. There is usually no reason to call
this function.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> A <a href="GnomeClient.html" title="GnomeClient"><span class="type">GnomeClient</span></a> instance.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>id</code></em>&#160;:</span></td>
<td> Session management ID.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2912548"></a><h3>
<a name="gnome-client-get-id"></a>gnome_client_get_id ()</h3>
<a class="indexterm" name="id2912561"></a><pre class="programlisting">const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>* gnome_client_get_id            (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client);</pre>
<p>
Returns session management ID</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> A <a href="GnomeClient.html" title="GnomeClient"><span class="type">GnomeClient</span></a> instance.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>  Session management ID for this client; <a
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
><code class="literal">NULL</code></a> if not connected to a
session manager.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2912641"></a><h3>
<a name="gnome-client-get-previous-id"></a>gnome_client_get_previous_id ()</h3>
<a class="indexterm" name="id2912654"></a><pre class="programlisting">const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>* gnome_client_get_previous_id   (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client);</pre>
<p>
Get the session management ID from the previous session.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> A <a href="GnomeClient.html" title="GnomeClient"><span class="type">GnomeClient</span></a> instance.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> Pointer to the session management ID the client had in the last
session, or <a
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
><code class="literal">NULL</code></a> if it was not in a previous session.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2912736"></a><h3>
<a name="gnome-client-get-desktop-id"></a>gnome_client_get_desktop_id ()</h3>
<a class="indexterm" name="id2912750"></a><pre class="programlisting">const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>* gnome_client_get_desktop_id    (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client);</pre>
<p>
Get the client ID of the desktop's current instance, i.e.  if
you consider the desktop as a whole as a session managed app, this
returns its session ID using a GNOME extension to session
management. May return <a
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
><code class="literal">NULL</code></a> for apps not running under a recent
version of gnome-session; apps should handle that case.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> A <a href="GnomeClient.html" title="GnomeClient"><span class="type">GnomeClient</span></a> instance.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> Session ID of GNOME desktop instance, or <a
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
><code class="literal">NULL</code></a> if none.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2912844"></a><h3>
<a name="gnome-client-request-interaction"></a>gnome_client_request_interaction ()</h3>
<a class="indexterm" name="id2912858"></a><pre class="programlisting">void        gnome_client_request_interaction
                                            (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a href="GnomeClient.html#GnomeDialogType">GnomeDialogType</a> dialog_type,
                                             <a href="GnomeClient.html#GnomeInteractFunction">GnomeInteractFunction</a> function,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);</pre>
<p>
Use the following functions, if you want to interact with the
user during a "save_yourself" handler without being restricted to using the
dialog based commands <a href="GnomeClient.html#gnome-client-save-any-dialog"><code class="function">gnome_client_save_any_dialog()</code></a> or
<a href="GnomeClient.html#gnome-client-save-error-dialog"><code class="function">gnome_client_save_error_dialog()</code></a>. Note, however, that overriding the session
manager specified preference in this way (by using arbitrary dialog boxes)
is not very nice.
</p>
<p>
If and when the session manager decides that it's the app's turn to interact
then 'func' will be called with the specified arguments and a unique
'GnomeInteractionKey'. The session manager will block other
clients from interacting until this key is returned with
<a href="GnomeClient.html#gnome-interaction-key-return"><code class="function">gnome_interaction_key_return()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> A <a href="GnomeClient.html" title="GnomeClient"><span class="type">GnomeClient</span></a> object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>dialog_type</code></em>&#160;:</span></td>
<td> The type of dialog to create.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>function</code></em>&#160;:</span></td>
<td> Callback to invoke to perform the interaction.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></td>
<td> Callback data.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2913029"></a><h3>
<a name="gnome-client-request-interaction-interp"></a>gnome_client_request_interaction_interp ()</h3>
<a class="indexterm" name="id2913043"></a><pre class="programlisting">void        gnome_client_request_interaction_interp
                                            (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                             <a href="GnomeClient.html#GnomeDialogType">GnomeDialogType</a> dialog_type,
                                             <a
href="/usr/share/gtk-doc/html/gtk/gtk-Types.html#GtkCallbackMarshal"
>GtkCallbackMarshal</a> function,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data,
                                             <a
href="/usr/share/gtk-doc/html/gtk/gtk-Types.html#GtkDestroyNotify"
>GtkDestroyNotify</a> destroy);</pre>
<p>
Similar to <a href="GnomeClient.html#gnome-client-request-interaction"><code class="function">gnome_client_request_interaction()</code></a>, but used when
you need to destroy the callback data after the interaction.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td> Pointer to GNOME session client object.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>dialog_type</code></em>&#160;:</span></td>
<td> Type of dialog to show.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>function</code></em>&#160;:</span></td>
<td> Callback to perform the interaction (a <a href="GnomeClient.html#GnomeInteractFunction"><span class="type">GnomeInteractFunction</span></a>).
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></td>
<td> Callback data.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>destroy</code></em>&#160;:</span></td>
<td> Function to destroy callback data.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2913204"></a><h3>
<a name="gnome-interaction-key-return"></a>gnome_interaction_key_return ()</h3>
<a class="indexterm" name="id2913217"></a><pre class="programlisting">void        gnome_interaction_key_return    (<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> key,
                                             <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a> cancel_shutdown);</pre>
<p>
Used in interaction callback to tell the session manager
you are done interacting.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>key</code></em>&#160;:</span></td>
<td> Key passed to interaction callback
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>cancel_shutdown</code></em>&#160;:</span></td>
<td> If <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>, cancel the shutdown
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2913302"></a><h2>Signal Details</h2>
<div class="refsect2" lang="en">
<a name="id2913312"></a><h3>
<a name="GnomeClient-connect"></a>The "connect" signal</h3>
<a class="indexterm" name="id2913322"></a><pre class="programlisting">void        user_function                  (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>     arg1,
                                            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>     user_data)      : Run first</pre>
<p>
Called once the client has been connected to the signal manager.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td>the object which received the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>arg1</code></em>&#160;:</span></td>
<td>
<a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the application has been restarted.

</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2913422"></a><h3>
<a name="GnomeClient-die"></a>The "die" signal</h3>
<a class="indexterm" name="id2913433"></a><pre class="programlisting">void        user_function                  (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>     user_data)      : Run last</pre>
<p>
Called when the session manager wants the client to shut down.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td>the object which received the signal.

</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2913502"></a><h3>
<a name="GnomeClient-disconnect"></a>The "disconnect" signal</h3>
<a class="indexterm" name="id2913512"></a><pre class="programlisting">void        user_function                  (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>     user_data)      : Run first</pre>
<p>
Called when the client is disconnected from the session manager.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td>the object which received the signal.

</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2913581"></a><h3>
<a name="GnomeClient-save-complete"></a>The "save-complete" signal</h3>
<a class="indexterm" name="id2913592"></a><pre class="programlisting">void        user_function                  (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>     user_data)      : Run first</pre>
<p>
Called when the session manager has finished checkpointing all of the clients.
Clients are then free to change their state.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td>the object which received the signal.

</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2913662"></a><h3>
<a name="GnomeClient-save-yourself"></a>The "save-yourself" signal</h3>
<a class="indexterm" name="id2913673"></a><pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    user_function                  (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a>        *client,
                                            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                arg1,
                                            <a href="GnomeClient.html#GnomeSaveStyle">GnomeSaveStyle</a>     *arg2,
                                            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            arg3,
                                            <a href="GnomeClient.html#GnomeInteractStyle">GnomeInteractStyle</a> *arg4,
                                            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            arg5,
                                            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>            user_data)      : Run last</pre>
<p>
Called when either a "SaveYourself" or a "SaveYourselfPhase2" call is made by
the session manager.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td>the object which received the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>arg1</code></em>&#160;:</span></td>
<td>The phase of the "SaveYourself" command ('1' or '2').
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>arg2</code></em>&#160;:</span></td>
<td>The data which should be saved by the client (local, global or both).
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>arg3</code></em>&#160;:</span></td>
<td>
<a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the session manager is shutting down.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>arg4</code></em>&#160;:</span></td>
<td>How the client is allowed to interact with the user while saving.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>arg5</code></em>&#160;:</span></td>
<td>
<a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if this is to be a "fast" shutdown (saving minimal data).
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>
<a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the "SaveYourself" was completed succesfully, <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a>
otherwise.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2913904"></a><h3>
<a name="GnomeClient-shutdown-cancelled"></a>The "shutdown-cancelled" signal</h3>
<a class="indexterm" name="id2913914"></a><pre class="programlisting">void        user_function                  (<a href="GnomeClient.html" title="GnomeClient">GnomeClient</a> *client,
                                            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
>gpointer</a>     user_data)      : Run first</pre>
<p>
Called if the session manager had sent a "SaveYourself" to all clients in
preparation for shutting down and the shutdown was then cancelled. A client can
then continue running and change its state.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>client</code></em>&#160;:</span></td>
<td>the object which received the signal.

</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</body>
</html>

Anon7 - 2021