1
/* Metacity interface for talking to GTK+ UI module */
4
* Copyright (C) 2001 Havoc Pennington
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.
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.
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
25
/* Don't include gtk.h or gdk.h here */
28
#include <X11/Xutil.h>
30
#include <gdk-pixbuf/gdk-pixbuf.h>
32
/* This is between GTK_PRIORITY_RESIZE (+10) and GTK_PRIORITY_REDRAW (+20) */
33
#define META_PRIORITY_RESIZE (G_PRIORITY_HIGH_IDLE + 15)
34
/* lower than GTK_PRIORITY_REDRAW */
35
#define META_PRIORITY_COMPOSITE (G_PRIORITY_HIGH_IDLE + 25)
37
typedef struct _MetaUI MetaUI;
39
typedef struct _MetaImageWindow MetaImageWindow;
41
typedef gboolean (* MetaEventFunc) (XEvent *xevent, gpointer data);
43
void meta_ui_init (int *argc, char ***argv);
45
Display* meta_ui_get_display (const char *name);
47
void meta_ui_add_event_func (Display *xdisplay,
50
void meta_ui_remove_event_func (Display *xdisplay,
54
MetaUI* meta_ui_new (Display *xdisplay,
56
void meta_ui_free (MetaUI *ui);
58
void meta_ui_theme_get_frame_borders (MetaUI *ui,
65
void meta_ui_get_frame_geometry (MetaUI *ui,
67
int *top_height, int *bottom_height,
68
int *left_width, int *right_width);
69
Window meta_ui_create_frame_window (MetaUI *ui,
77
void meta_ui_destroy_frame_window (MetaUI *ui,
79
void meta_ui_move_resize_frame (MetaUI *ui,
86
/* GDK insists on tracking map/unmap */
87
void meta_ui_map_frame (MetaUI *ui,
89
void meta_ui_unmap_frame (MetaUI *ui,
92
void meta_ui_unflicker_frame_bg (MetaUI *ui,
96
void meta_ui_reset_frame_bg (MetaUI *ui,
99
void meta_ui_apply_frame_shape (MetaUI *ui,
101
int new_window_width,
102
int new_window_height,
103
gboolean window_has_shape);
105
void meta_ui_queue_frame_draw (MetaUI *ui,
108
void meta_ui_set_frame_title (MetaUI *ui,
112
void meta_ui_repaint_frame (MetaUI *ui,
115
MetaWindowMenu* meta_ui_window_menu_new (MetaUI *ui,
116
Window client_xwindow,
118
MetaMenuOp insensitive,
119
int active_workspace,
121
MetaWindowMenuFunc func,
123
void meta_ui_window_menu_popup (MetaWindowMenu *menu,
128
void meta_ui_window_menu_free (MetaWindowMenu *menu);
131
MetaImageWindow* meta_image_window_new (Display *xdisplay,
135
void meta_image_window_free (MetaImageWindow *iw);
136
void meta_image_window_set_showing (MetaImageWindow *iw,
138
void meta_image_window_set (MetaImageWindow *iw,
143
/* FIXME these lack a display arg */
144
GdkPixbuf* meta_gdk_pixbuf_get_from_window (GdkPixbuf *dest,
153
GdkPixbuf* meta_gdk_pixbuf_get_from_pixmap (GdkPixbuf *dest,
162
/* Used when we have a server grab and draw all over everything,
163
* then we need to handle exposes after doing that, instead of
166
void meta_ui_push_delay_exposes (MetaUI *ui);
167
void meta_ui_pop_delay_exposes (MetaUI *ui);
169
GdkPixbuf* meta_ui_get_default_window_icon (MetaUI *ui);
170
GdkPixbuf* meta_ui_get_default_mini_icon (MetaUI *ui);
172
gboolean meta_ui_window_should_not_cause_focus (Display *xdisplay,
175
char* meta_text_property_to_utf8 (Display *xdisplay,
176
const XTextProperty *prop);
178
void meta_ui_set_current_theme (const char *name,
179
gboolean force_reload);
180
gboolean meta_ui_have_a_theme (void);
182
gboolean meta_ui_parse_accelerator (const char *accel,
183
unsigned int *keysym,
184
MetaVirtualModifier *mask);
185
gboolean meta_ui_parse_modifier (const char *accel,
186
MetaVirtualModifier *mask);
188
gboolean meta_ui_window_is_widget (MetaUI *ui,
191
int meta_ui_get_double_click_timeout (MetaUI *ui);
192
int meta_ui_get_drag_threshold (MetaUI *ui);
194
#include "tabpopup.h"