~ubuntu-branches/ubuntu/wily/mutter/wily

« back to all changes in this revision

Viewing changes to src/include/util.h

  • Committer: Bazaar Package Importer
  • Author(s): Rico Tzschichholz
  • Date: 2011-04-10 22:27:59 UTC
  • mfrom: (0.7.1 upstream) (0.3.20 experimental)
  • Revision ID: james.westby@ubuntu.com-20110410222759-o6n1i5p0unsti44n
Tags: 3.0.0-0ubuntu1
* New upstream release

* Merge with debian experimental (LP: #742458), remaining changes:
  + debian/patches/03_link_gles2.patch: Link to clutter-glx-1.0
    explicitily at the end of link flags, to bring in libGLESv2 on armel.
* debian/control.in:
  + rename gir package to gir1.2-mutter-3.0
* debian/libmutter0.symbols:
  + updated
* debian/patches:
  + fix 03_link_gles2.patch 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2
 
 
3
 
/* Mutter utilities */
4
 
 
5
 
/* 
6
 
 * Copyright (C) 2001 Havoc Pennington
7
 
 * Copyright (C) 2005 Elijah Newren
8
 
 * 
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.
13
 
 *
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.
18
 
 * 
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
22
 
 * 02111-1307, USA.
23
 
 */
24
 
 
25
 
#ifndef META_UTIL_H
26
 
#define META_UTIL_H
27
 
 
28
 
#include <glib.h>
29
 
#include <glib-object.h>
30
 
 
31
 
#include "common.h"
32
 
 
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);
41
 
 
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);
46
 
 
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);
53
 
 
54
 
typedef enum
55
 
{
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
79
 
} MetaDebugTopic;
80
 
 
81
 
void meta_topic_real      (MetaDebugTopic topic,
82
 
                           const char    *format,
83
 
                           ...) G_GNUC_PRINTF (2, 3);
84
 
void meta_add_verbose_topic    (MetaDebugTopic topic);
85
 
void meta_remove_verbose_topic (MetaDebugTopic topic);
86
 
 
87
 
void meta_push_no_msg_prefix (void);
88
 
void meta_pop_no_msg_prefix  (void);
89
 
 
90
 
gint  meta_unsigned_long_equal (gconstpointer v1,
91
 
                                gconstpointer v2);
92
 
guint meta_unsigned_long_hash  (gconstpointer v);
93
 
 
94
 
void meta_print_backtrace (void);
95
 
 
96
 
const char* meta_frame_type_to_string (MetaFrameType type);
97
 
const char* meta_gravity_to_string (int gravity);
98
 
 
99
 
#include <libintl.h>
100
 
#define _(x) dgettext (GETTEXT_PACKAGE, x)
101
 
#define N_(x) x
102
 
 
103
 
char* meta_g_utf8_strndup (const gchar *src, gsize n);
104
 
 
105
 
void  meta_free_gslist_and_elements (GSList *list_to_deep_free);
106
 
 
107
 
GPid meta_show_dialog (const char *type,
108
 
                       const char *title,
109
 
                       const char *message,
110
 
                       gint timeout,
111
 
                       const char *ok_text,
112
 
                       const char *cancel_text,
113
 
                       const int transient_for,
114
 
                       GSList *columns,
115
 
                       GSList *entries);
116
 
 
117
 
/* To disable verbose mode, we make these functions into no-ops */
118
 
#ifdef WITH_VERBOSE_MODE
119
 
 
120
 
#define meta_debug_spew meta_debug_spew_real
121
 
#define meta_verbose    meta_verbose_real
122
 
#define meta_topic      meta_topic_real
123
 
 
124
 
#else
125
 
 
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...)
134
 
#  else
135
 
#    error "This compiler does not support varargs macros and thus verbose mode can't be disabled meaningfully"
136
 
#  endif
137
 
 
138
 
#endif /* !WITH_VERBOSE_MODE */
139
 
 
140
 
/**
141
 
 * MetaLaterType:
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)
147
 
 **/
148
 
typedef enum {
149
 
  META_LATER_RESIZE,
150
 
  META_LATER_BEFORE_REDRAW,
151
 
  META_LATER_IDLE
152
 
} MetaLaterType;
153
 
 
154
 
guint meta_later_add    (MetaLaterType  when,
155
 
                         GSourceFunc    func,
156
 
                         gpointer       data,
157
 
                         GDestroyNotify notify);
158
 
void  meta_later_remove (guint          later_id);
159
 
 
160
 
#endif /* META_UTIL_H */
161
 
 
162