1
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
3
/* Mutter interface for talking to GTK+ UI module */
6
* Copyright (C) 2001 Havoc Pennington
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.
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.
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
27
/* Don't include gtk.h or gdk.h here */
30
#include <X11/Xutil.h>
32
#include <gdk-pixbuf/gdk-pixbuf.h>
34
typedef struct _MetaUI MetaUI;
36
typedef gboolean (* MetaEventFunc) (XEvent *xevent, gpointer data);
40
META_UI_DIRECTION_LTR,
44
void meta_ui_init (int *argc, char ***argv);
46
Display* meta_ui_get_display (void);
48
void meta_ui_add_event_func (Display *xdisplay,
51
void meta_ui_remove_event_func (Display *xdisplay,
55
MetaUI* meta_ui_new (Display *xdisplay,
57
void meta_ui_free (MetaUI *ui);
59
void meta_ui_theme_get_frame_borders (MetaUI *ui,
66
void meta_ui_get_frame_geometry (MetaUI *ui,
68
int *top_height, int *bottom_height,
69
int *left_width, int *right_width);
70
Window meta_ui_create_frame_window (MetaUI *ui,
78
gulong *create_serial);
79
void meta_ui_destroy_frame_window (MetaUI *ui,
81
void meta_ui_move_resize_frame (MetaUI *ui,
88
/* GDK insists on tracking map/unmap */
89
void meta_ui_map_frame (MetaUI *ui,
91
void meta_ui_unmap_frame (MetaUI *ui,
94
void meta_ui_unflicker_frame_bg (MetaUI *ui,
98
void meta_ui_reset_frame_bg (MetaUI *ui,
101
void meta_ui_apply_frame_shape (MetaUI *ui,
103
int new_window_width,
104
int new_window_height,
105
gboolean window_has_shape);
107
void meta_ui_queue_frame_draw (MetaUI *ui,
110
void meta_ui_set_frame_title (MetaUI *ui,
114
void meta_ui_repaint_frame (MetaUI *ui,
117
MetaWindowMenu* meta_ui_window_menu_new (MetaUI *ui,
118
Window client_xwindow,
120
MetaMenuOp insensitive,
121
unsigned long active_workspace,
123
MetaWindowMenuFunc func,
125
void meta_ui_window_menu_popup (MetaWindowMenu *menu,
130
void meta_ui_window_menu_free (MetaWindowMenu *menu);
133
/* FIXME these lack a display arg */
134
GdkPixbuf* meta_gdk_pixbuf_get_from_pixmap (Pixmap xpixmap,
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
144
void meta_ui_push_delay_exposes (MetaUI *ui);
145
void meta_ui_pop_delay_exposes (MetaUI *ui);
147
GdkPixbuf* meta_ui_get_default_window_icon (MetaUI *ui);
148
GdkPixbuf* meta_ui_get_default_mini_icon (MetaUI *ui);
150
gboolean meta_ui_window_should_not_cause_focus (Display *xdisplay,
153
char* meta_text_property_to_utf8 (Display *xdisplay,
154
const XTextProperty *prop);
156
void meta_ui_set_current_theme (const char *name,
157
gboolean force_reload);
158
gboolean meta_ui_have_a_theme (void);
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
164
#define META_KEY_ABOVE_TAB 0x2f7259c9
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);
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,
179
int meta_ui_get_drag_threshold (MetaUI *ui);
181
MetaUIDirection meta_ui_get_direction (void);
183
#include "tabpopup.h"
184
#include "tile-preview.h"