1
/* Metacity utilities */
4
* Copyright (C) 2001 Havoc Pennington
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License as
8
* published by the Free Software Foundation; either version 2 of the
9
* License, or (at your option) any later version.
11
* This program is distributed in the hope that it will be useful, but
12
* WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* General Public License for more details.
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., 59 Temple Place - Suite 330, Boston, MA
27
gboolean meta_is_verbose (void);
28
void meta_set_verbose (gboolean setting);
29
gboolean meta_is_debugging (void);
30
void meta_set_debugging (gboolean setting);
31
gboolean meta_is_syncing (void);
32
void meta_set_syncing (gboolean setting);
33
gboolean meta_get_replace_current_wm (void);
34
void meta_set_replace_current_wm (gboolean setting);
36
void meta_debug_spew_real (const char *format,
37
...) G_GNUC_PRINTF (1, 2);
38
void meta_verbose_real (const char *format,
39
...) G_GNUC_PRINTF (1, 2);
41
void meta_bug (const char *format,
42
...) G_GNUC_PRINTF (1, 2);
43
void meta_warning (const char *format,
44
...) G_GNUC_PRINTF (1, 2);
45
void meta_fatal (const char *format,
46
...) G_GNUC_PRINTF (1, 2);
50
META_DEBUG_FOCUS = 1 << 0,
51
META_DEBUG_WORKAREA = 1 << 1,
52
META_DEBUG_STACK = 1 << 2,
53
META_DEBUG_THEMES = 1 << 3,
54
META_DEBUG_SM = 1 << 4,
55
META_DEBUG_EVENTS = 1 << 5,
56
META_DEBUG_WINDOW_STATE = 1 << 6,
57
META_DEBUG_WINDOW_OPS = 1 << 7,
58
META_DEBUG_GEOMETRY = 1 << 8,
59
META_DEBUG_PLACEMENT = 1 << 9,
60
META_DEBUG_PING = 1 << 10,
61
META_DEBUG_XINERAMA = 1 << 11,
62
META_DEBUG_KEYBINDINGS = 1 << 12,
63
META_DEBUG_SYNC = 1 << 13,
64
META_DEBUG_ERRORS = 1 << 14,
65
META_DEBUG_STARTUP = 1 << 15,
66
META_DEBUG_PREFS = 1 << 16,
67
META_DEBUG_GROUPS = 1 << 17,
68
META_DEBUG_RESIZING = 1 << 18,
69
META_DEBUG_SHAPES = 1 << 19,
70
META_DEBUG_COMPOSITOR = 1 << 20
74
void meta_topic_real (MetaDebugTopic topic,
76
...) G_GNUC_PRINTF (2, 3);
78
void meta_push_no_msg_prefix (void);
79
void meta_pop_no_msg_prefix (void);
81
gint meta_unsigned_long_equal (gconstpointer v1,
83
guint meta_unsigned_long_hash (gconstpointer v);
85
void meta_print_backtrace (void);
88
#define _(x) dgettext (GETTEXT_PACKAGE, x)
91
char* meta_g_utf8_strndup (const gchar *src, gsize n);
93
/* To disable verbose mode, we make these functions into no-ops */
94
#ifdef WITH_VERBOSE_MODE
96
#define meta_debug_spew meta_debug_spew_real
97
#define meta_verbose meta_verbose_real
98
#define meta_topic meta_topic_real
102
# ifdef G_HAVE_ISO_VARARGS
103
# define meta_debug_spew(...)
104
# define meta_verbose(...)
105
# define meta_topic(...)
106
# elif defined(G_HAVE_GNUC_VARARGS)
107
# define meta_debug_spew(format...)
108
# define meta_verbose(format...)
109
# define meta_topic(format...)
111
# error "This compiler does not support varargs macros and thus verbose mode can't be disabled meaningfully"
114
#endif /* !WITH_VERBOSE_MODE */
116
#endif /* META_UTIL_H */