1 /* $Id$ */ 2 /*- 3 * Copyright (c) 2003-2004 Benedikt Meurer <benny@xfce.org> 4 * All rights reserved. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2, or (at your option) 9 * any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 * MA 02110-1301 USA. 20 */ 21 22 #ifndef __XFSM_GLOBAL_H__ 23 #define __XFSM_GLOBAL_H__ 24 25 #include <glib.h> 26 #include <gdk/gdkx.h> 27 #include <X11/SM/SMlib.h> 28 29 #include <xfce4-session/xfsm-shutdown.h> /* XfsmShutdownType */ 30 31 #include "settings/xfae-model.h" /* XfsmRunHook */ 32 33 34 #define DEFAULT_SESSION_NAME "Default" 35 36 extern gboolean verbose; 37 38 #if defined(G_HAVE_ISO_VARARGS) 39 40 #define xfsm_verbose(...)\ 41 G_STMT_START{ \ 42 if (G_UNLIKELY (verbose)) \ 43 xfsm_verbose_real (__func__, __FILE__, __LINE__, __VA_ARGS__); \ 44 }G_STMT_END 45 46 #else 47 48 #define xfsm_verbose(...) 49 50 #endif 51 52 void xfsm_enable_verbose (void); 53 gboolean xfsm_is_verbose_enabled (void); 54 void xfsm_verbose_real (const char *func, 55 const char *file, 56 int line, 57 const char *format, 58 ...) G_GNUC_PRINTF (4, 5); 59 60 gchar *xfsm_generate_client_id (SmsConn sms_conn) G_GNUC_PURE; 61 62 GValue *xfsm_g_value_new (GType gtype); 63 void xfsm_g_value_free (GValue *value); 64 65 gint xfsm_launch_desktop_files_on_login (gboolean start_at_spi); 66 gint xfsm_launch_desktop_files_on_shutdown (gboolean start_at_spi, 67 XfsmShutdownType shutdown_type); 68 gint xfsm_launch_desktop_files_on_run_hook (gboolean start_at_spi, 69 XfsmRunHook run_hook); 70 71 #endif /* !__XFSM_GLOBAL_H__ */ 72