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

« back to all changes in this revision

Viewing changes to src/ui.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 interface for talking to GTK+ UI module */
 
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_UI_H
 
23
#define META_UI_H
 
24
 
 
25
/* Don't include gtk.h or gdk.h here */
 
26
#include "common.h"
 
27
#include <X11/Xlib.h>
 
28
#include <X11/Xutil.h>
 
29
#include <glib.h>
 
30
#include <gdk-pixbuf/gdk-pixbuf.h>
 
31
 
 
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)
 
36
 
 
37
typedef struct _MetaUI MetaUI;
 
38
 
 
39
typedef struct _MetaImageWindow MetaImageWindow;
 
40
 
 
41
typedef gboolean (* MetaEventFunc) (XEvent *xevent, gpointer data);
 
42
 
 
43
void meta_ui_init (int *argc, char ***argv);
 
44
 
 
45
Display* meta_ui_get_display       (const char *name);
 
46
 
 
47
void meta_ui_add_event_func    (Display       *xdisplay,
 
48
                                MetaEventFunc  func,
 
49
                                gpointer       data);
 
50
void meta_ui_remove_event_func (Display       *xdisplay,
 
51
                                MetaEventFunc  func,
 
52
                                gpointer       data);
 
53
 
 
54
MetaUI* meta_ui_new (Display *xdisplay,
 
55
                     Screen  *screen);
 
56
void    meta_ui_free (MetaUI *ui);
 
57
 
 
58
void meta_ui_theme_get_frame_borders (MetaUI *ui,
 
59
                                      MetaFrameType      type,
 
60
                                      MetaFrameFlags     flags,
 
61
                                      int               *top_height,
 
62
                                      int               *bottom_height,
 
63
                                      int               *left_width,
 
64
                                      int               *right_width);
 
65
void meta_ui_get_frame_geometry (MetaUI *ui,
 
66
                                 Window frame_xwindow,
 
67
                                 int *top_height, int *bottom_height,
 
68
                                 int *left_width, int *right_width);
 
69
Window meta_ui_create_frame_window (MetaUI *ui,
 
70
                                    Display *xdisplay,
 
71
                                    Visual *xvisual,
 
72
                                    gint x,
 
73
                                    gint y,
 
74
                                    gint width,
 
75
                                    gint height,
 
76
                                    gint screen_no);
 
77
void meta_ui_destroy_frame_window (MetaUI *ui,
 
78
                                   Window  xwindow);
 
79
void meta_ui_move_resize_frame (MetaUI *ui,
 
80
                                Window frame,
 
81
                                int x,
 
82
                                int y,
 
83
                                int width,
 
84
                                int height);
 
85
 
 
86
/* GDK insists on tracking map/unmap */
 
87
void meta_ui_map_frame   (MetaUI *ui,
 
88
                          Window  xwindow);
 
89
void meta_ui_unmap_frame (MetaUI *ui,
 
90
                          Window  xwindow);
 
91
 
 
92
void meta_ui_unflicker_frame_bg (MetaUI *ui,
 
93
                                 Window  xwindow,
 
94
                                 int     target_width,
 
95
                                 int     target_height);
 
96
void meta_ui_reset_frame_bg     (MetaUI *ui,
 
97
                                 Window  xwindow);
 
98
 
 
99
void meta_ui_apply_frame_shape  (MetaUI  *ui,
 
100
                                 Window   xwindow,
 
101
                                 int      new_window_width,
 
102
                                 int      new_window_height,
 
103
                                 gboolean window_has_shape);
 
104
 
 
105
void meta_ui_queue_frame_draw (MetaUI *ui,
 
106
                               Window xwindow);
 
107
 
 
108
void meta_ui_set_frame_title (MetaUI *ui,
 
109
                              Window xwindow,
 
110
                              const char *title);
 
111
 
 
112
void meta_ui_repaint_frame (MetaUI *ui,
 
113
                            Window xwindow);
 
114
 
 
115
MetaWindowMenu* meta_ui_window_menu_new   (MetaUI             *ui,
 
116
                                           Window              client_xwindow,
 
117
                                           MetaMenuOp          ops,
 
118
                                           MetaMenuOp          insensitive,
 
119
                                           int                 active_workspace,
 
120
                                           int                 n_workspaces,
 
121
                                           MetaWindowMenuFunc  func,
 
122
                                           gpointer            data);
 
123
void            meta_ui_window_menu_popup (MetaWindowMenu     *menu,
 
124
                                           int                 root_x,
 
125
                                           int                 root_y,
 
126
                                           int                 button,
 
127
                                           guint32             timestamp);
 
128
void            meta_ui_window_menu_free  (MetaWindowMenu     *menu);
 
129
 
 
130
 
 
131
MetaImageWindow* meta_image_window_new          (Display         *xdisplay,
 
132
                                                 int              screen_number,
 
133
                                                 int              max_width,
 
134
                                                 int              max_height);
 
135
void             meta_image_window_free         (MetaImageWindow *iw);
 
136
void             meta_image_window_set_showing  (MetaImageWindow *iw,
 
137
                                                 gboolean         showing);
 
138
void             meta_image_window_set          (MetaImageWindow *iw,
 
139
                                                 GdkPixbuf       *pixbuf,
 
140
                                                 int              x,
 
141
                                                 int              y);
 
142
 
 
143
/* FIXME these lack a display arg */
 
144
GdkPixbuf* meta_gdk_pixbuf_get_from_window (GdkPixbuf   *dest,
 
145
                                            Window       xwindow,
 
146
                                            int          src_x,
 
147
                                            int          src_y,
 
148
                                            int          dest_x,
 
149
                                            int          dest_y,
 
150
                                            int          width,
 
151
                                            int          height);
 
152
 
 
153
GdkPixbuf* meta_gdk_pixbuf_get_from_pixmap (GdkPixbuf   *dest,
 
154
                                            Pixmap       xpixmap,
 
155
                                            int          src_x,
 
156
                                            int          src_y,
 
157
                                            int          dest_x,
 
158
                                            int          dest_y,
 
159
                                            int          width,
 
160
                                            int          height);
 
161
 
 
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
 
164
 * during it
 
165
 */
 
166
void      meta_ui_push_delay_exposes (MetaUI *ui);
 
167
void      meta_ui_pop_delay_exposes  (MetaUI *ui);
 
168
 
 
169
GdkPixbuf* meta_ui_get_default_window_icon (MetaUI *ui);
 
170
GdkPixbuf* meta_ui_get_default_mini_icon (MetaUI *ui);
 
171
 
 
172
gboolean  meta_ui_window_should_not_cause_focus (Display *xdisplay,
 
173
                                                 Window   xwindow);
 
174
 
 
175
char*     meta_text_property_to_utf8 (Display             *xdisplay,
 
176
                                      const XTextProperty *prop);
 
177
 
 
178
void     meta_ui_set_current_theme (const char *name,
 
179
                                    gboolean    force_reload);
 
180
gboolean meta_ui_have_a_theme      (void);
 
181
 
 
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);
 
187
 
 
188
gboolean meta_ui_window_is_widget (MetaUI *ui,
 
189
                                   Window  xwindow);
 
190
 
 
191
int      meta_ui_get_double_click_timeout (MetaUI *ui);
 
192
int      meta_ui_get_drag_threshold       (MetaUI *ui);
 
193
 
 
194
#include "tabpopup.h"
 
195
 
 
196
#endif