libgnomeuimm 2.28.0
client.h
Go to the documentation of this file.
1// -*- c++ -*-
2// Generated by gtkmmproc -- DO NOT MODIFY!
3#ifndef _LIBGNOMEUIMM_CLIENT_H
4#define _LIBGNOMEUIMM_CLIENT_H
5
6
7#include <glibmm.h>
8
9/* $Id: client.hg,v 1.13 2002/09/16 12:18:30 murrayc Exp $ */
10
11
12/* client.hg
13 *
14 * Copyright (C) 1999 The Gtk-- Development Team
15 *
16 * This library is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU Lesser General Public
18 * License as published by the Free Software Foundation; either
19 * version 2.1 of the License, or (at your option) any later version.
20 *
21 * This library is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * Lesser General Public License for more details.
25 *
26 * You should have received a copy of the GNU Lesser General Public
27 * License along with this library; if not, write to the Free
28 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29 */
30
31#include <glibmm/arrayhandle.h>
32#include <gtkmm/dialog.h>
33#include <libgnomeui/gnome-client.h>
34
35
36#ifndef DOXYGEN_SHOULD_SKIP_THIS
37typedef struct _GnomeClient GnomeClient;
38typedef struct _GnomeClientClass GnomeClientClass;
39#endif /* DOXYGEN_SHOULD_SKIP_THIS */
40
41
42namespace Gnome
43{
44
45namespace UI
46{ class Client_Class; } // namespace UI
47
48} // namespace Gnome
49namespace Gnome
50{
51
52namespace UI
53{
54
55
62{
66};
67
68} // namespace UI
69
70} // namespace Gnome
71
72
73#ifndef DOXYGEN_SHOULD_SKIP_THIS
74namespace Glib
75{
76
77template <>
78class Value<Gnome::UI::SaveStyle> : public Glib::Value_Enum<Gnome::UI::SaveStyle>
79{
80public:
81 static GType value_type() G_GNUC_CONST;
82};
83
84} // namespace Glib
85#endif /* DOXYGEN_SHOULD_SKIP_THIS */
86
87
88namespace Gnome
89{
90
91namespace UI
92{
93
98{
103
104} // namespace UI
105
106} // namespace Gnome
107
108
109#ifndef DOXYGEN_SHOULD_SKIP_THIS
110namespace Glib
111{
112
113template <>
114class Value<Gnome::UI::InteractStyle> : public Glib::Value_Enum<Gnome::UI::InteractStyle>
115{
116public:
117 static GType value_type() G_GNUC_CONST;
118};
119
120} // namespace Glib
121#endif /* DOXYGEN_SHOULD_SKIP_THIS */
122
123
124namespace Gnome
125{
126
127namespace UI
128{
129
130
131class Client : public Gtk::Object
132{
133 public:
134#ifndef DOXYGEN_SHOULD_SKIP_THIS
135 typedef Client CppObjectType;
136 typedef Client_Class CppClassType;
137 typedef GnomeClient BaseObjectType;
138 typedef GnomeClientClass BaseClassType;
139#endif /* DOXYGEN_SHOULD_SKIP_THIS */
140
141 virtual ~Client();
142
143#ifndef DOXYGEN_SHOULD_SKIP_THIS
144
145private:
146 friend class Client_Class;
147 static CppClassType client_class_;
148
149 // noncopyable
150 Client(const Client&);
151 Client& operator=(const Client&);
152
153protected:
154 explicit Client(const Glib::ConstructParams& construct_params);
155 explicit Client(GnomeClient* castitem);
156
157#endif /* DOXYGEN_SHOULD_SKIP_THIS */
158
159public:
160#ifndef DOXYGEN_SHOULD_SKIP_THIS
161 static GType get_type() G_GNUC_CONST;
162
163
164 static GType get_base_type() G_GNUC_CONST;
165#endif
166
168 GnomeClient* gobj() { return reinterpret_cast<GnomeClient*>(gobject_); }
169
171 const GnomeClient* gobj() const { return reinterpret_cast<GnomeClient*>(gobject_); }
172
173
174public:
175 //C++ methods used to invoke GTK+ virtual functions:
176#ifdef GLIBMM_VFUNCS_ENABLED
177#endif //GLIBMM_VFUNCS_ENABLED
178
179protected:
180 //GTK+ Virtual Functions (override these to change behaviour):
181#ifdef GLIBMM_VFUNCS_ENABLED
182#endif //GLIBMM_VFUNCS_ENABLED
183
184 //Default Signal Handlers::
185#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
186 virtual bool on_save_yourself(int phase, SaveStyle save_style, bool shutdown, InteractStyle interact_style, bool fast);
187 virtual void on_die();
188 virtual void on_save_complete();
189 virtual void on_shutdown_cancelled();
190 virtual void on_connect(bool restarted);
191 virtual void on_disconnect();
192#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
193
194
195private:
196
197public:
198
200
201
203
204 Glib::ustring get_config_prefix();
205
207
208 void set_global_config_prefix(const Glib::ustring& prefix);
209
210 GnomeClientFlags get_flags();
211
212 void set_restart_style(GnomeRestartStyle style);
213
214 void set_priority(guint priority);
215
216 // We keep the argc, argv versions because they can be more
217 // convenient that the vector<string> ones
218
219 void set_restart_command(gint argc, char** argv);
220 void set_restart_command(const Glib::ArrayHandle<Glib::ustring>& argv);
221
222// _WRAP_METHOD(void gnome_client_add_static_arg(GnomeClient*, ...),
223// void add_static_arg(...));
224
225
226 void set_discard_command(gint argc, char** argv);
227 void set_discard_command(const Glib::ArrayHandle<Glib::ustring>& argv);
228
229
230 void set_resign_command(gint argc, char** argv);
231 void set_resign_command(const Glib::ArrayHandle<Glib::ustring>& argv);
232
233
234 void set_shutdown_command(gint argc, char** argv);
235 void set_shutdown_command(const Glib::ArrayHandle<Glib::ustring>& argv);
236
237
238 void set_current_directory(const Glib::ustring& dir);
239
240 void set_environment(const Glib::ustring& name, const Glib::ustring& value);
241
242
243 void set_clone_command(gint argc, char** argv);
244 void set_clone_command(const Glib::ArrayHandle<Glib::ustring>& argv);
245
246
247 void set_process_id(pid_t pid);
248
249 void set_program(const Glib::ustring& program);
250
251 void set_user_id(const Glib::ustring& user_id);
252
253
254 void save_any_dialog(Gtk::Dialog& dialog);
255
256 void save_error_dialog(Gtk::Dialog& dialog);
257
259
260 void request_save(SaveStyle save_style, bool shutdown, InteractStyle interact_style, bool fast, bool global);
261
262 void flush();
263
264 // Note : there's a naming convention breach here, due to the
265 // existence of the connect() signal which isn't emitted after
266 // gnome_client_connect() is called
267 //
268
271
273
274
275 void set_id(const Glib::ustring& client_id);
276
277 Glib::ustring get_id() const;
278
279 Glib::ustring get_previous_id() const;
280
281 Glib::ustring get_desktop_id() const;
282
283 //TODO: Use a slot, using gnome_client_request_interaction_interp.
284
285 void request_interaction(GnomeDialogType dialog, GnomeInteractFunction func, gpointer client_data);
286
287
288 static void gnome_interaction_key_return(gint key, bool cancel_shutdown);
289
290
296 Glib::SignalProxy5< bool,int,SaveStyle,bool,InteractStyle,bool > signal_save_yourself();
297
298
304 Glib::SignalProxy0< void > signal_die();
305
306
312 Glib::SignalProxy0< void > signal_save_complete();
313
314
320 Glib::SignalProxy0< void > signal_shutdown_cancelled();
321
322
328 Glib::SignalProxy1< void,bool > signal_connect();
329
330
336 Glib::SignalProxy0< void > signal_disconnect();
337
338
339};
340
341} /* namespace UI */
342} /* namespace Gnome */
343
344
345namespace Glib
346{
355 Gnome::UI::Client* wrap(GnomeClient* object, bool take_copy = false);
356} //namespace Glib
357
358
359#endif /* _LIBGNOMEUIMM_CLIENT_H */
360
Definition: client.h:132
static void gnome_interaction_key_return(gint key, bool cancel_shutdown)
void set_clone_command(const Glib::ArrayHandle< Glib::ustring > &argv)
virtual void on_disconnect()
virtual void on_connect(bool restarted)
void set_discard_command(const Glib::ArrayHandle< Glib::ustring > &argv)
virtual bool on_save_yourself(int phase, SaveStyle save_style, bool shutdown, InteractStyle interact_style, bool fast)
void set_resign_command(const Glib::ArrayHandle< Glib::ustring > &argv)
static Client * master_client()
void set_restart_style(GnomeRestartStyle style)
void set_user_id(const Glib::ustring &user_id)
GnomeClientFlags get_flags()
void set_global_config_prefix(const Glib::ustring &prefix)
virtual void on_shutdown_cancelled()
void set_id(const Glib::ustring &client_id)
Gnome::UI::Client * wrap(GnomeClient *object, bool take_copy=false)
A Glib::wrap() method for this object.
void set_program(const Glib::ustring &program)
virtual void on_save_complete()
void set_environment(const Glib::ustring &name, const Glib::ustring &value)
void request_save(SaveStyle save_style, bool shutdown, InteractStyle interact_style, bool fast, bool global)
void set_discard_command(gint argc, char **argv)
void request_interaction(GnomeDialogType dialog, GnomeInteractFunction func, gpointer client_data)
void connect_to_session_manager()
void set_restart_command(gint argc, char **argv)
Glib::SignalProxy0< void > signal_shutdown_cancelled()
void save_error_dialog(Gtk::Dialog &dialog)
Glib::ustring get_previous_id() const
Glib::SignalProxy0< void > signal_disconnect()
void set_restart_command(const Glib::ArrayHandle< Glib::ustring > &argv)
Client(bool connect_to_session_manager=true)
Glib::SignalProxy0< void > signal_die()
void save_any_dialog(Gtk::Dialog &dialog)
Glib::ustring get_config_prefix()
Glib::SignalProxy5< bool, int, SaveStyle, bool, InteractStyle, bool > signal_save_yourself()
void set_resign_command(gint argc, char **argv)
void set_shutdown_command(gint argc, char **argv)
Glib::ustring get_desktop_id() const
Glib::SignalProxy1< void, bool > signal_connect()
const GnomeClient * gobj() const
Provides access to the underlying C GtkObject.
Definition: client.h:171
Glib::SignalProxy0< void > signal_save_complete()
Glib::ustring get_id() const
virtual void on_die()
void set_current_directory(const Glib::ustring &dir)
GnomeClient * gobj()
Provides access to the underlying C GtkObject.
Definition: client.h:168
Glib::ustring get_global_config_prefix()
void set_shutdown_command(const Glib::ArrayHandle< Glib::ustring > &argv)
void set_priority(guint priority)
void set_process_id(pid_t pid)
void set_clone_command(gint argc, char **argv)
SaveStyle
Definition: client.h:62
InteractStyle
Definition: client.h:98
@ SAVE_GLOBAL
Definition: client.h:63
@ SAVE_BOTH
Definition: client.h:65
@ SAVE_LOCAL
Definition: client.h:64
@ INTERACT_ERRORS
Definition: client.h:100
@ INTERACT_NONE
Definition: client.h:99
@ INTERACT_ANY
Definition: client.h:101
Definition: about.h:306
Definition: about.h:46