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

« back to all changes in this revision

Viewing changes to src/include/ui.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 interface for talking to GTK+ UI module */
4
 
 
5
 
/* 
6
 
 * Copyright (C) 2001 Havoc Pennington
7
 
 * 
8
 
 * This program is free software; you can redistribute it and/or
9
 
 * modify it under the terms of the GNU General Public License as
10
 
 * published by the Free Software Foundation; either version 2 of the
11
 
 * License, or (at your option) any later version.
12
 
 *
13
 
 * This program is distributed in the hope that it will be useful, but
14
 
 * WITHOUT ANY WARRANTY; without even the implied warranty of
15
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
 
 * General Public License for more details.
17
 
 * 
18
 
 * You should have received a copy of the GNU General Public License
19
 
 * along with this program; if not, write to the Free Software
20
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21
 
 * 02111-1307, USA.
22
 
 */
23
 
 
24
 
#ifndef META_UI_H
25
 
#define META_UI_H
26
 
 
27
 
/* Don't include gtk.h or gdk.h here */
28
 
#include "common.h"
29
 
#include <X11/Xlib.h>
30
 
#include <X11/Xutil.h>
31
 
#include <glib.h>
32
 
#include <gdk-pixbuf/gdk-pixbuf.h>
33
 
 
34
 
typedef struct _MetaUI MetaUI;
35
 
 
36
 
typedef gboolean (* MetaEventFunc) (XEvent *xevent, gpointer data);
37
 
 
38
 
typedef enum
39
 
{
40
 
  META_UI_DIRECTION_LTR,
41
 
  META_UI_DIRECTION_RTL
42
 
} MetaUIDirection;
43
 
 
44
 
void meta_ui_init (int *argc, char ***argv);
45
 
 
46
 
Display* meta_ui_get_display (void);
47
 
 
48
 
void meta_ui_add_event_func    (Display       *xdisplay,
49
 
                                MetaEventFunc  func,
50
 
                                gpointer       data);
51
 
void meta_ui_remove_event_func (Display       *xdisplay,
52
 
                                MetaEventFunc  func,
53
 
                                gpointer       data);
54
 
 
55
 
MetaUI* meta_ui_new (Display *xdisplay,
56
 
                     Screen  *screen);
57
 
void    meta_ui_free (MetaUI *ui);
58
 
 
59
 
void meta_ui_theme_get_frame_borders (MetaUI *ui,
60
 
                                      MetaFrameType      type,
61
 
                                      MetaFrameFlags     flags,
62
 
                                      int               *top_height,
63
 
                                      int               *bottom_height,
64
 
                                      int               *left_width,
65
 
                                      int               *right_width);
66
 
void meta_ui_get_frame_geometry (MetaUI *ui,
67
 
                                 Window frame_xwindow,
68
 
                                 int *top_height, int *bottom_height,
69
 
                                 int *left_width, int *right_width);
70
 
Window meta_ui_create_frame_window (MetaUI *ui,
71
 
                                    Display *xdisplay,
72
 
                                    Visual *xvisual,
73
 
                                    gint x,
74
 
                                    gint y,
75
 
                                    gint width,
76
 
                                    gint height,
77
 
                                    gint screen_no,
78
 
                                    gulong *create_serial);
79
 
void meta_ui_destroy_frame_window (MetaUI *ui,
80
 
                                   Window  xwindow);
81
 
void meta_ui_move_resize_frame (MetaUI *ui,
82
 
                                Window frame,
83
 
                                int x,
84
 
                                int y,
85
 
                                int width,
86
 
                                int height);
87
 
 
88
 
/* GDK insists on tracking map/unmap */
89
 
void meta_ui_map_frame   (MetaUI *ui,
90
 
                          Window  xwindow);
91
 
void meta_ui_unmap_frame (MetaUI *ui,
92
 
                          Window  xwindow);
93
 
 
94
 
void meta_ui_unflicker_frame_bg (MetaUI *ui,
95
 
                                 Window  xwindow,
96
 
                                 int     target_width,
97
 
                                 int     target_height);
98
 
void meta_ui_reset_frame_bg     (MetaUI *ui,
99
 
                                 Window  xwindow);
100
 
 
101
 
void meta_ui_apply_frame_shape  (MetaUI  *ui,
102
 
                                 Window   xwindow,
103
 
                                 int      new_window_width,
104
 
                                 int      new_window_height,
105
 
                                 gboolean window_has_shape);
106
 
 
107
 
void meta_ui_queue_frame_draw (MetaUI *ui,
108
 
                               Window xwindow);
109
 
 
110
 
void meta_ui_set_frame_title (MetaUI *ui,
111
 
                              Window xwindow,
112
 
                              const char *title);
113
 
 
114
 
void meta_ui_repaint_frame (MetaUI *ui,
115
 
                            Window xwindow);
116
 
 
117
 
MetaWindowMenu* meta_ui_window_menu_new   (MetaUI             *ui,
118
 
                                           Window              client_xwindow,
119
 
                                           MetaMenuOp          ops,
120
 
                                           MetaMenuOp          insensitive,
121
 
                                           unsigned long       active_workspace,
122
 
                                           int                 n_workspaces,
123
 
                                           MetaWindowMenuFunc  func,
124
 
                                           gpointer            data);
125
 
void            meta_ui_window_menu_popup (MetaWindowMenu     *menu,
126
 
                                           int                 root_x,
127
 
                                           int                 root_y,
128
 
                                           int                 button,
129
 
                                           guint32             timestamp);
130
 
void            meta_ui_window_menu_free  (MetaWindowMenu     *menu);
131
 
 
132
 
 
133
 
/* FIXME these lack a display arg */
134
 
GdkPixbuf* meta_gdk_pixbuf_get_from_pixmap (Pixmap       xpixmap,
135
 
                                            int          src_x,
136
 
                                            int          src_y,
137
 
                                            int          width,
138
 
                                            int          height);
139
 
 
140
 
/* Used when we have a server grab and draw all over everything,
141
 
 * then we need to handle exposes after doing that, instead of
142
 
 * during it
143
 
 */
144
 
void      meta_ui_push_delay_exposes (MetaUI *ui);
145
 
void      meta_ui_pop_delay_exposes  (MetaUI *ui);
146
 
 
147
 
GdkPixbuf* meta_ui_get_default_window_icon (MetaUI *ui);
148
 
GdkPixbuf* meta_ui_get_default_mini_icon (MetaUI *ui);
149
 
 
150
 
gboolean  meta_ui_window_should_not_cause_focus (Display *xdisplay,
151
 
                                                 Window   xwindow);
152
 
 
153
 
char*     meta_text_property_to_utf8 (Display             *xdisplay,
154
 
                                      const XTextProperty *prop);
155
 
 
156
 
void     meta_ui_set_current_theme (const char *name,
157
 
                                    gboolean    force_reload);
158
 
gboolean meta_ui_have_a_theme      (void);
159
 
 
160
 
/* Not a real key symbol but means "key above the tab key"; this is
161
 
 * used as the default keybinding for cycle_group.
162
 
 * 0x2xxxxxxx is a range not used by GDK or X. the remaining digits are
163
 
 * randomly chosen */
164
 
#define META_KEY_ABOVE_TAB 0x2f7259c9
165
 
 
166
 
gboolean meta_ui_parse_accelerator (const char          *accel,
167
 
                                    unsigned int        *keysym,
168
 
                                    unsigned int        *keycode,
169
 
                                    MetaVirtualModifier *mask);
170
 
gboolean meta_ui_parse_modifier    (const char          *accel,
171
 
                                    MetaVirtualModifier *mask);
172
 
 
173
 
/* Caller responsible for freeing return string of meta_ui_accelerator_name! */
174
 
gchar*   meta_ui_accelerator_name  (unsigned int        keysym,
175
 
                                    MetaVirtualModifier mask);
176
 
gboolean meta_ui_window_is_widget (MetaUI *ui,
177
 
                                   Window  xwindow);
178
 
 
179
 
int      meta_ui_get_drag_threshold       (MetaUI *ui);
180
 
 
181
 
MetaUIDirection meta_ui_get_direction (void);
182
 
 
183
 
#include "tabpopup.h"
184
 
#include "tile-preview.h"
185
 
 
186
 
#endif