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>
31
#include <meta/common.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
void meta_set_replace_current_wm (gboolean setting);
41
void meta_debug_spew_real (const char *format,
42
...) G_GNUC_PRINTF (1, 2);
43
void meta_verbose_real (const char *format,
44
...) G_GNUC_PRINTF (1, 2);
46
void meta_bug (const char *format,
47
...) G_GNUC_PRINTF (1, 2);
48
void meta_warning (const char *format,
49
...) G_GNUC_PRINTF (1, 2);
50
void meta_fatal (const char *format,
51
...) G_GNUC_PRINTF (1, 2);
55
META_DEBUG_VERBOSE = -1,
56
META_DEBUG_FOCUS = 1 << 0,
57
META_DEBUG_WORKAREA = 1 << 1,
58
META_DEBUG_STACK = 1 << 2,
59
META_DEBUG_THEMES = 1 << 3,
60
META_DEBUG_SM = 1 << 4,
61
META_DEBUG_EVENTS = 1 << 5,
62
META_DEBUG_WINDOW_STATE = 1 << 6,
63
META_DEBUG_WINDOW_OPS = 1 << 7,
64
META_DEBUG_GEOMETRY = 1 << 8,
65
META_DEBUG_PLACEMENT = 1 << 9,
66
META_DEBUG_PING = 1 << 10,
67
META_DEBUG_XINERAMA = 1 << 11,
68
META_DEBUG_KEYBINDINGS = 1 << 12,
69
META_DEBUG_SYNC = 1 << 13,
70
META_DEBUG_ERRORS = 1 << 14,
71
META_DEBUG_STARTUP = 1 << 15,
72
META_DEBUG_PREFS = 1 << 16,
73
META_DEBUG_GROUPS = 1 << 17,
74
META_DEBUG_RESIZING = 1 << 18,
75
META_DEBUG_SHAPES = 1 << 19,
76
META_DEBUG_COMPOSITOR = 1 << 20,
77
META_DEBUG_EDGE_RESISTANCE = 1 << 21
80
void meta_topic_real (MetaDebugTopic topic,
82
...) G_GNUC_PRINTF (2, 3);
83
void meta_add_verbose_topic (MetaDebugTopic topic);
84
void meta_remove_verbose_topic (MetaDebugTopic topic);
86
void meta_push_no_msg_prefix (void);
87
void meta_pop_no_msg_prefix (void);
89
gint meta_unsigned_long_equal (gconstpointer v1,
91
guint meta_unsigned_long_hash (gconstpointer v);
93
void meta_print_backtrace (void);
95
const char* meta_frame_type_to_string (MetaFrameType type);
96
const char* meta_gravity_to_string (int gravity);
99
#define _(x) dgettext (GETTEXT_PACKAGE, x)
102
char* meta_g_utf8_strndup (const gchar *src, gsize n);
104
void meta_free_gslist_and_elements (GSList *list_to_deep_free);
106
GPid meta_show_dialog (const char *type,
111
const char *cancel_text,
112
const int transient_for,
116
/* To disable verbose mode, we make these functions into no-ops */
117
#ifdef WITH_VERBOSE_MODE
119
#define meta_debug_spew meta_debug_spew_real
120
#define meta_verbose meta_verbose_real
121
#define meta_topic meta_topic_real
125
# ifdef G_HAVE_ISO_VARARGS
126
# define meta_debug_spew(...)
127
# define meta_verbose(...)
128
# define meta_topic(...)
129
# elif defined(G_HAVE_GNUC_VARARGS)
130
# define meta_debug_spew(format...)
131
# define meta_verbose(format...)
132
# define meta_topic(format...)
134
# error "This compiler does not support varargs macros and thus verbose mode can't be disabled meaningfully"
137
#endif /* !WITH_VERBOSE_MODE */
141
* @META_LATER_RESIZE: call in a resize processing phase that is done
142
* before GTK+ repainting (including window borders) is done.
143
* @META_LATER_BEFORE_REDRAW: call before the stage is redrawn
144
* @META_LATER_IDLE: call at a very low priority (can be blocked
145
* by running animations or redrawing applications)
149
META_LATER_BEFORE_REDRAW,
153
guint meta_later_add (MetaLaterType when,
156
GDestroyNotify notify);
157
void meta_later_remove (guint later_id);
159
#endif /* META_UTIL_H */