1
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
6
* Copyright (C) 2001 Havoc Pennington
7
* Copyright (C) 2005 Elijah Newren
9
* This program is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU General Public License as
11
* published by the Free Software Foundation; either version 2 of the
12
* License, or (at your option) any later version.
14
* This program is distributed in the hope that it will be useful, but
15
* WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
* General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, write to the Free Software
21
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
29
#include <glib-object.h>
33
gboolean meta_is_verbose (void);
34
void meta_set_verbose (gboolean setting);
35
gboolean meta_is_debugging (void);
36
void meta_set_debugging (gboolean setting);
37
gboolean meta_is_syncing (void);
38
void meta_set_syncing (gboolean setting);
39
gboolean meta_get_replace_current_wm (void);
40
void meta_set_replace_current_wm (gboolean setting);
42
void meta_debug_spew_real (const char *format,
43
...) G_GNUC_PRINTF (1, 2);
44
void meta_verbose_real (const char *format,
45
...) G_GNUC_PRINTF (1, 2);
47
void meta_bug (const char *format,
48
...) G_GNUC_PRINTF (1, 2);
49
void meta_warning (const char *format,
50
...) G_GNUC_PRINTF (1, 2);
51
void meta_fatal (const char *format,
52
...) G_GNUC_PRINTF (1, 2);
56
META_DEBUG_VERBOSE = -1,
57
META_DEBUG_FOCUS = 1 << 0,
58
META_DEBUG_WORKAREA = 1 << 1,
59
META_DEBUG_STACK = 1 << 2,
60
META_DEBUG_THEMES = 1 << 3,
61
META_DEBUG_SM = 1 << 4,
62
META_DEBUG_EVENTS = 1 << 5,
63
META_DEBUG_WINDOW_STATE = 1 << 6,
64
META_DEBUG_WINDOW_OPS = 1 << 7,
65
META_DEBUG_GEOMETRY = 1 << 8,
66
META_DEBUG_PLACEMENT = 1 << 9,
67
META_DEBUG_PING = 1 << 10,
68
META_DEBUG_XINERAMA = 1 << 11,
69
META_DEBUG_KEYBINDINGS = 1 << 12,
70
META_DEBUG_SYNC = 1 << 13,
71
META_DEBUG_ERRORS = 1 << 14,
72
META_DEBUG_STARTUP = 1 << 15,
73
META_DEBUG_PREFS = 1 << 16,
74
META_DEBUG_GROUPS = 1 << 17,
75
META_DEBUG_RESIZING = 1 << 18,
76
META_DEBUG_SHAPES = 1 << 19,
77
META_DEBUG_COMPOSITOR = 1 << 20,
78
META_DEBUG_EDGE_RESISTANCE = 1 << 21
81
void meta_topic_real (MetaDebugTopic topic,
83
...) G_GNUC_PRINTF (2, 3);
84
void meta_add_verbose_topic (MetaDebugTopic topic);
85
void meta_remove_verbose_topic (MetaDebugTopic topic);
87
void meta_push_no_msg_prefix (void);
88
void meta_pop_no_msg_prefix (void);
90
gint meta_unsigned_long_equal (gconstpointer v1,
92
guint meta_unsigned_long_hash (gconstpointer v);
94
void meta_print_backtrace (void);
96
const char* meta_frame_type_to_string (MetaFrameType type);
97
const char* meta_gravity_to_string (int gravity);
100
#define _(x) dgettext (GETTEXT_PACKAGE, x)
103
char* meta_g_utf8_strndup (const gchar *src, gsize n);
105
void meta_free_gslist_and_elements (GSList *list_to_deep_free);
107
GPid meta_show_dialog (const char *type,
112
const char *cancel_text,
113
const int transient_for,
117
/* To disable verbose mode, we make these functions into no-ops */
118
#ifdef WITH_VERBOSE_MODE
120
#define meta_debug_spew meta_debug_spew_real
121
#define meta_verbose meta_verbose_real
122
#define meta_topic meta_topic_real
126
# ifdef G_HAVE_ISO_VARARGS
127
# define meta_debug_spew(...)
128
# define meta_verbose(...)
129
# define meta_topic(...)
130
# elif defined(G_HAVE_GNUC_VARARGS)
131
# define meta_debug_spew(format...)
132
# define meta_verbose(format...)
133
# define meta_topic(format...)
135
# error "This compiler does not support varargs macros and thus verbose mode can't be disabled meaningfully"
138
#endif /* !WITH_VERBOSE_MODE */
142
* @META_LATER_RESIZE: call in a resize processing phase that is done
143
* before GTK+ repainting (including window borders) is done.
144
* @META_LATER_BEFORE_REDRAW: call before the stage is redrawn
145
* @META_LATER_IDLE: call at a very low priority (can be blocked
146
* by running animations or redrawing applications)
150
META_LATER_BEFORE_REDRAW,
154
guint meta_later_add (MetaLaterType when,
157
GDestroyNotify notify);
158
void meta_later_remove (guint later_id);
160
#endif /* META_UTIL_H */