~muktupavels/metacity/adwaita-icon-theme-lp-1414613

« back to all changes in this revision

Viewing changes to src/util.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2005-10-03 22:44:28 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20051003224428-ft31gkmz12qpzohj
Tags: 1:2.12.1-0ubuntu1
* New upstream release:
  - Thanks to Ray Strode, Havoc Pennington, and Elijah Newren for
    improvements in this release.
  - Truncate ridiculously long titles to avoid crashing or letting the
    pager crash (Ray, Havoc, Elijah) [#315070] (Ubuntu: #15995)
  - Get the tabbing window outline to work with gtk+ 2.8.4 again
    (Elijah) [#317528] (Ubuntu: #16589)
  - Translations: Mahay Alam Khan (bn), Francisco Javier F. Serrador (es), 
    Ivar Smolin (et), I\uffffaki Larra\uffffaga Murgoitio (eu), Luca 
    Ferretti (it), Christian Rose (sv), Clytie Siddall (vi), Funda 
    Wang (zh_CN)
* debian/control.in:
  - Bumped Standards-Version.
* debian/patches/003_bordersdrawingfix.patch:
  - dropped, fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Metacity utilities */
 
2
 
 
3
/* 
 
4
 * Copyright (C) 2001 Havoc Pennington
 
5
 * 
 
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.
 
10
 *
 
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.
 
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., 59 Temple Place - Suite 330, Boston, MA
 
19
 * 02111-1307, USA.
 
20
 */
 
21
 
 
22
#ifndef META_UTIL_H
 
23
#define META_UTIL_H
 
24
 
 
25
#include <glib.h>
 
26
 
 
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);
 
35
 
 
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);
 
40
 
 
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);
 
47
 
 
48
typedef enum
 
49
{
 
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
 
71
 
 
72
} MetaDebugTopic;
 
73
 
 
74
void meta_topic_real      (MetaDebugTopic topic,
 
75
                           const char    *format,
 
76
                           ...) G_GNUC_PRINTF (2, 3);
 
77
 
 
78
void meta_push_no_msg_prefix (void);
 
79
void meta_pop_no_msg_prefix  (void);
 
80
 
 
81
gint  meta_unsigned_long_equal (gconstpointer v1,
 
82
                                gconstpointer v2);
 
83
guint meta_unsigned_long_hash  (gconstpointer v);
 
84
 
 
85
void meta_print_backtrace (void);
 
86
 
 
87
#include <libintl.h>
 
88
#define _(x) dgettext (GETTEXT_PACKAGE, x)
 
89
#define N_(x) x
 
90
 
 
91
char* meta_g_utf8_strndup (const gchar *src, gsize n);
 
92
 
 
93
/* To disable verbose mode, we make these functions into no-ops */
 
94
#ifdef WITH_VERBOSE_MODE
 
95
 
 
96
#define meta_debug_spew meta_debug_spew_real
 
97
#define meta_verbose    meta_verbose_real
 
98
#define meta_topic      meta_topic_real
 
99
 
 
100
#else
 
101
 
 
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...)
 
110
#  else
 
111
#    error "This compiler does not support varargs macros and thus verbose mode can't be disabled meaningfully"
 
112
#  endif
 
113
 
 
114
#endif /* !WITH_VERBOSE_MODE */
 
115
 
 
116
#endif /* META_UTIL_H */
 
117
 
 
118