1 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2 
3 /*
4  * PLEASE KEEP IN SYNC WITH GSETTINGS SCHEMAS!
5  */
6 
7 /*
8  * Copyright (C) 2001 Havoc Pennington
9  * Copyright (C) 2005 Elijah Newren
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License as
13  * published by the Free Software Foundation; either version 2 of the
14  * License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful, but
17  * WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, see <http://www.gnu.org/licenses/>.
23  */
24 
25 #ifndef META_COMMON_H
26 #define META_COMMON_H
27 
28 #include <X11/Xlib.h>
29 #include <X11/extensions/XInput.h>
30 #include <X11/extensions/XInput2.h>
31 #include <glib.h>
32 #include <gtk/gtk.h>
33 
34 #include "clutter/clutter.h"
35 
36 /**
37  * SECTION:common
38  * @Title: Common
39  * @Short_Description: Mutter common types
40  */
41 
42 /* This is set in stone and also hard-coded in GDK. */
43 #define META_VIRTUAL_CORE_POINTER_ID 2
44 #define META_VIRTUAL_CORE_KEYBOARD_ID 3
45 
46 /* Replacement for X11 CurrentTime */
47 #define META_CURRENT_TIME 0L
48 
49 #define META_EXPORT __attribute__((visibility("default"))) extern
50 
51 /**
52  * MetaFrameFlags:
53  * @META_FRAME_ALLOWS_DELETE: frame allows delete
54  * @META_FRAME_ALLOWS_MENU: frame allows menu
55  * @META_FRAME_ALLOWS_MINIMIZE: frame allows minimize
56  * @META_FRAME_ALLOWS_MAXIMIZE: frame allows maximize
57  * @META_FRAME_ALLOWS_VERTICAL_RESIZE: frame allows vertical resize
58  * @META_FRAME_ALLOWS_HORIZONTAL_RESIZE: frame allows horizontal resize
59  * @META_FRAME_HAS_FOCUS: frame has focus
60  * @META_FRAME_SHADED: frame is shaded
61  * @META_FRAME_STUCK: frame is stuck
62  * @META_FRAME_MAXIMIZED: frame is maximized
63  * @META_FRAME_ALLOWS_SHADE: frame allows shade
64  * @META_FRAME_ALLOWS_MOVE: frame allows move
65  * @META_FRAME_FULLSCREEN: frame allows fullscreen
66  * @META_FRAME_ABOVE: frame is above
67  * @META_FRAME_TILED_LEFT: frame is tiled to the left
68  * @META_FRAME_TILED_RIGHT: frame is tiled to the right
69  */
70 typedef enum
71 {
72   META_FRAME_ALLOWS_DELETE            = 1 << 0,
73   META_FRAME_ALLOWS_MENU              = 1 << 1,
74   META_FRAME_ALLOWS_MINIMIZE          = 1 << 2,
75   META_FRAME_ALLOWS_MAXIMIZE          = 1 << 3,
76   META_FRAME_ALLOWS_VERTICAL_RESIZE   = 1 << 4,
77   META_FRAME_ALLOWS_HORIZONTAL_RESIZE = 1 << 5,
78   META_FRAME_HAS_FOCUS                = 1 << 6,
79   META_FRAME_SHADED                   = 1 << 7,
80   META_FRAME_STUCK                    = 1 << 8,
81   META_FRAME_MAXIMIZED                = 1 << 9,
82   META_FRAME_ALLOWS_SHADE             = 1 << 10,
83   META_FRAME_ALLOWS_MOVE              = 1 << 11,
84   META_FRAME_FULLSCREEN               = 1 << 12,
85   META_FRAME_ABOVE                    = 1 << 13,
86   META_FRAME_TILED_LEFT               = 1 << 14,
87   META_FRAME_TILED_RIGHT              = 1 << 15
88 } MetaFrameFlags;
89 
90 /**
91  * MetaGrabOp:
92  * @META_GRAB_OP_NONE: None
93  * @META_GRAB_OP_MOVING: Moving with pointer
94  * @META_GRAB_OP_RESIZING_SE: Resizing SE with pointer
95  * @META_GRAB_OP_RESIZING_S: Resizing S with pointer
96  * @META_GRAB_OP_RESIZING_SW: Resizing SW with pointer
97  * @META_GRAB_OP_RESIZING_N: Resizing N with pointer
98  * @META_GRAB_OP_RESIZING_NE: Resizing NE with pointer
99  * @META_GRAB_OP_RESIZING_NW: Resizing NW with pointer
100  * @META_GRAB_OP_RESIZING_W: Resizing W with pointer
101  * @META_GRAB_OP_RESIZING_E: Resizing E with pointer
102  * @META_GRAB_OP_KEYBOARD_MOVING: Moving with keyboard
103  * @META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN: Resizing with keyboard
104  * @META_GRAB_OP_KEYBOARD_RESIZING_S: Resizing S with keyboard
105  * @META_GRAB_OP_KEYBOARD_RESIZING_N: Resizing N with keyboard
106  * @META_GRAB_OP_KEYBOARD_RESIZING_W: Resizing W with keyboard
107  * @META_GRAB_OP_KEYBOARD_RESIZING_E: Resizing E with keyboard
108  * @META_GRAB_OP_KEYBOARD_RESIZING_SE: Resizing SE with keyboard
109  * @META_GRAB_OP_KEYBOARD_RESIZING_NE: Resizing NE with keyboard
110  * @META_GRAB_OP_KEYBOARD_RESIZING_SW: Resizing SW with keyboard
111  * @META_GRAB_OP_KEYBOARD_RESIZING_NW: Resizing NS with keyboard
112  * @META_GRAB_OP_COMPOSITOR: Compositor asked for grab
113  */
114 
115 /* The lower 16 bits of the grab operation is its type.
116  *
117  * Window grab operations have the following layout:
118  *
119  * 0000  0000  | 0000 0011
120  * NSEW  flags | type
121  *
122  * Flags contains whether the operation is a keyboard operation,
123  * and whether the keyboard operation is "unknown".
124  *
125  * The rest of the flags tell you which direction the resize is
126  * going in.
127  *
128  * If the directions field is 0000, then the operation is a move,
129  * not a resize.
130  */
131 enum
132 {
133   META_GRAB_OP_WINDOW_FLAG_KEYBOARD = 0x0100,
134   META_GRAB_OP_WINDOW_FLAG_UNKNOWN  = 0x0200,
135   META_GRAB_OP_WINDOW_DIR_WEST      = 0x1000,
136   META_GRAB_OP_WINDOW_DIR_EAST      = 0x2000,
137   META_GRAB_OP_WINDOW_DIR_SOUTH     = 0x4000,
138   META_GRAB_OP_WINDOW_DIR_NORTH     = 0x8000,
139   META_GRAB_OP_WINDOW_DIR_MASK      = 0xF000,
140 
141   /* WGO = "window grab op". shorthand for below */
142   _WGO_K = META_GRAB_OP_WINDOW_FLAG_KEYBOARD,
143   _WGO_U = META_GRAB_OP_WINDOW_FLAG_UNKNOWN,
144   _WGO_W = META_GRAB_OP_WINDOW_DIR_WEST,
145   _WGO_E = META_GRAB_OP_WINDOW_DIR_EAST,
146   _WGO_S = META_GRAB_OP_WINDOW_DIR_SOUTH,
147   _WGO_N = META_GRAB_OP_WINDOW_DIR_NORTH,
148 };
149 
150 typedef enum
151 {
152   META_GRAB_OP_NONE,
153 
154   /* Window grab ops. */
155   META_GRAB_OP_WINDOW_BASE,
156 
157   /* Special grab op when the compositor asked for a grab */
158   META_GRAB_OP_COMPOSITOR,
159 
160   /* For when a Wayland client takes a popup grab. */
161   META_GRAB_OP_WAYLAND_POPUP,
162 
163   /* For when the user clicks on a frame button. */
164   META_GRAB_OP_FRAME_BUTTON,
165 
166   META_GRAB_OP_MOVING                     = META_GRAB_OP_WINDOW_BASE,
167   META_GRAB_OP_RESIZING_NW                = META_GRAB_OP_WINDOW_BASE | _WGO_N | _WGO_W,
168   META_GRAB_OP_RESIZING_N                 = META_GRAB_OP_WINDOW_BASE | _WGO_N,
169   META_GRAB_OP_RESIZING_NE                = META_GRAB_OP_WINDOW_BASE | _WGO_N | _WGO_E,
170   META_GRAB_OP_RESIZING_E                 = META_GRAB_OP_WINDOW_BASE |          _WGO_E,
171   META_GRAB_OP_RESIZING_SW                = META_GRAB_OP_WINDOW_BASE | _WGO_S | _WGO_W,
172   META_GRAB_OP_RESIZING_S                 = META_GRAB_OP_WINDOW_BASE | _WGO_S,
173   META_GRAB_OP_RESIZING_SE                = META_GRAB_OP_WINDOW_BASE | _WGO_S | _WGO_E,
174   META_GRAB_OP_RESIZING_W                 = META_GRAB_OP_WINDOW_BASE |          _WGO_W,
175   META_GRAB_OP_KEYBOARD_MOVING            = META_GRAB_OP_WINDOW_BASE |                   _WGO_K,
176   META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN  = META_GRAB_OP_WINDOW_BASE |                   _WGO_K | _WGO_U,
177   META_GRAB_OP_KEYBOARD_RESIZING_NW       = META_GRAB_OP_WINDOW_BASE | _WGO_N | _WGO_W | _WGO_K,
178   META_GRAB_OP_KEYBOARD_RESIZING_N        = META_GRAB_OP_WINDOW_BASE | _WGO_N |          _WGO_K,
179   META_GRAB_OP_KEYBOARD_RESIZING_NE       = META_GRAB_OP_WINDOW_BASE | _WGO_N | _WGO_E | _WGO_K,
180   META_GRAB_OP_KEYBOARD_RESIZING_E        = META_GRAB_OP_WINDOW_BASE |          _WGO_E | _WGO_K,
181   META_GRAB_OP_KEYBOARD_RESIZING_SW       = META_GRAB_OP_WINDOW_BASE | _WGO_S | _WGO_W | _WGO_K,
182   META_GRAB_OP_KEYBOARD_RESIZING_S        = META_GRAB_OP_WINDOW_BASE | _WGO_S |          _WGO_K,
183   META_GRAB_OP_KEYBOARD_RESIZING_SE       = META_GRAB_OP_WINDOW_BASE | _WGO_S | _WGO_E | _WGO_K,
184   META_GRAB_OP_KEYBOARD_RESIZING_W        = META_GRAB_OP_WINDOW_BASE |          _WGO_W | _WGO_K,
185 } MetaGrabOp;
186 
187 /**
188  * MetaCursor:
189  * @META_CURSOR_DEFAULT: Default cursor
190  * @META_CURSOR_NORTH_RESIZE: Resize northern edge cursor
191  * @META_CURSOR_SOUTH_RESIZE: Resize southern edge cursor
192  * @META_CURSOR_WEST_RESIZE: Resize western edge cursor
193  * @META_CURSOR_EAST_RESIZE: Resize eastern edge cursor
194  * @META_CURSOR_SE_RESIZE: Resize south-eastern corner cursor
195  * @META_CURSOR_SW_RESIZE: Resize south-western corner cursor
196  * @META_CURSOR_NE_RESIZE: Resize north-eastern corner cursor
197  * @META_CURSOR_NW_RESIZE: Resize north-western corner cursor
198  * @META_CURSOR_MOVE_OR_RESIZE_WINDOW: Move or resize cursor
199  * @META_CURSOR_BUSY: Busy cursor
200  * @META_CURSOR_DND_IN_DRAG: DND in drag cursor
201  * @META_CURSOR_DND_MOVE: DND move cursor
202  * @META_CURSOR_DND_COPY: DND copy cursor
203  * @META_CURSOR_DND_UNSUPPORTED_TARGET: DND unsupported target
204  * @META_CURSOR_POINTING_HAND: pointing hand
205  * @META_CURSOR_CROSSHAIR: crosshair (action forbidden)
206  * @META_CURSOR_IBEAM: I-beam (text input)
207  * @META_CURSOR_BLANK: Invisible cursor
208  */
209 typedef enum
210 {
211   META_CURSOR_NONE = 0,
212   META_CURSOR_DEFAULT,
213   META_CURSOR_NORTH_RESIZE,
214   META_CURSOR_SOUTH_RESIZE,
215   META_CURSOR_WEST_RESIZE,
216   META_CURSOR_EAST_RESIZE,
217   META_CURSOR_SE_RESIZE,
218   META_CURSOR_SW_RESIZE,
219   META_CURSOR_NE_RESIZE,
220   META_CURSOR_NW_RESIZE,
221   META_CURSOR_MOVE_OR_RESIZE_WINDOW,
222   META_CURSOR_BUSY,
223   META_CURSOR_DND_IN_DRAG,
224   META_CURSOR_DND_MOVE,
225   META_CURSOR_DND_COPY,
226   META_CURSOR_DND_UNSUPPORTED_TARGET,
227   META_CURSOR_POINTING_HAND,
228   META_CURSOR_CROSSHAIR,
229   META_CURSOR_IBEAM,
230   META_CURSOR_BLANK,
231   META_CURSOR_LAST
232 } MetaCursor;
233 
234 /**
235  * MetaFrameType:
236  * @META_FRAME_TYPE_NORMAL: Normal frame
237  * @META_FRAME_TYPE_DIALOG: Dialog frame
238  * @META_FRAME_TYPE_MODAL_DIALOG: Modal dialog frame
239  * @META_FRAME_TYPE_UTILITY: Utility frame
240  * @META_FRAME_TYPE_MENU: Menu frame
241  * @META_FRAME_TYPE_BORDER: Border frame
242  * @META_FRAME_TYPE_ATTACHED: Attached frame
243  * @META_FRAME_TYPE_LAST: Marks the end of the #MetaFrameType enumeration
244  */
245 typedef enum
246 {
247   META_FRAME_TYPE_NORMAL,
248   META_FRAME_TYPE_DIALOG,
249   META_FRAME_TYPE_MODAL_DIALOG,
250   META_FRAME_TYPE_UTILITY,
251   META_FRAME_TYPE_MENU,
252   META_FRAME_TYPE_BORDER,
253   META_FRAME_TYPE_ATTACHED,
254   META_FRAME_TYPE_LAST
255 } MetaFrameType;
256 
257 /**
258  * MetaVirtualModifier:
259  * @META_VIRTUAL_SHIFT_MASK: Shift mask
260  * @META_VIRTUAL_CONTROL_MASK: Control mask
261  * @META_VIRTUAL_ALT_MASK: Alt mask
262  * @META_VIRTUAL_META_MASK: Meta mask
263  * @META_VIRTUAL_SUPER_MASK: Super mask
264  * @META_VIRTUAL_HYPER_MASK: Hyper mask
265  * @META_VIRTUAL_MOD2_MASK: Mod2 mask
266  * @META_VIRTUAL_MOD3_MASK: Mod3 mask
267  * @META_VIRTUAL_MOD4_MASK: Mod4 mask
268  * @META_VIRTUAL_MOD5_MASK: Mod5 mask
269  */
270 typedef enum
271 {
272   /* Create gratuitous divergence from regular
273    * X mod bits, to be sure we find bugs
274    */
275   META_VIRTUAL_SHIFT_MASK    = 1 << 5,
276   META_VIRTUAL_CONTROL_MASK  = 1 << 6,
277   META_VIRTUAL_ALT_MASK      = 1 << 7,
278   META_VIRTUAL_META_MASK     = 1 << 8,
279   META_VIRTUAL_SUPER_MASK    = 1 << 9,
280   META_VIRTUAL_HYPER_MASK    = 1 << 10,
281   META_VIRTUAL_MOD2_MASK     = 1 << 11,
282   META_VIRTUAL_MOD3_MASK     = 1 << 12,
283   META_VIRTUAL_MOD4_MASK     = 1 << 13,
284   META_VIRTUAL_MOD5_MASK     = 1 << 14
285 } MetaVirtualModifier;
286 
287 /**
288  * MetaDirection:
289  * @META_DIRECTION_LEFT: Left
290  * @META_DIRECTION_RIGHT: Right
291  * @META_DIRECTION_TOP: Top
292  * @META_DIRECTION_BOTTOM: Bottom
293  * @META_DIRECTION_UP: Up
294  * @META_DIRECTION_DOWN: Down
295  * @META_DIRECTION_HORIZONTAL: Horizontal
296  * @META_DIRECTION_VERTICAL: Vertical
297  */
298 
299 /* Relative directions or sides seem to come up all over the place... */
300 /* FIXME: Replace
301  *   display.[ch]:MetaDisplayDirection,
302  *   workspace.[ch]:MetaMotionDirection,
303  * with the use of MetaDirection.
304  */
305 typedef enum
306 {
307   META_DIRECTION_LEFT       = 1 << 0,
308   META_DIRECTION_RIGHT      = 1 << 1,
309   META_DIRECTION_TOP        = 1 << 2,
310   META_DIRECTION_BOTTOM     = 1 << 3,
311 
312   /* Some aliases for making code more readable for various circumstances. */
313   META_DIRECTION_UP         = META_DIRECTION_TOP,
314   META_DIRECTION_DOWN       = META_DIRECTION_BOTTOM,
315 
316   /* A few more definitions using aliases */
317   META_DIRECTION_HORIZONTAL = META_DIRECTION_LEFT | META_DIRECTION_RIGHT,
318   META_DIRECTION_VERTICAL   = META_DIRECTION_UP   | META_DIRECTION_DOWN,
319 } MetaDirection;
320 
321 /**
322  * MetaMotionDirection:
323  * @META_MOTION_UP: Upwards motion
324  * @META_MOTION_DOWN: Downwards motion
325  * @META_MOTION_LEFT: Motion to the left
326  * @META_MOTION_RIGHT: Motion to the right
327  * @META_MOTION_UP_LEFT: Motion up and to the left
328  * @META_MOTION_UP_RIGHT: Motion up and to the right
329  * @META_MOTION_DOWN_LEFT: Motion down and to the left
330  * @META_MOTION_DOWN_RIGHT: Motion down and to the right
331  */
332 
333 /* Negative to avoid conflicting with real workspace
334  * numbers
335  */
336 typedef enum
337 {
338   META_MOTION_UP = -1,
339   META_MOTION_DOWN = -2,
340   META_MOTION_LEFT = -3,
341   META_MOTION_RIGHT = -4,
342   /* These are only used for effects */
343   META_MOTION_UP_LEFT = -5,
344   META_MOTION_UP_RIGHT = -6,
345   META_MOTION_DOWN_LEFT = -7,
346   META_MOTION_DOWN_RIGHT = -8
347 } MetaMotionDirection;
348 
349 /**
350  * MetaSide:
351  * @META_SIDE_LEFT: Left side
352  * @META_SIDE_RIGHT: Right side
353  * @META_SIDE_TOP: Top side
354  * @META_SIDE_BOTTOM: Bottom side
355  */
356 
357 /* Sometimes we want to talk about sides instead of directions; note
358  * that the values must be as follows or meta_window_update_struts()
359  * won't work. Using these values also is a safety blanket since
360  * MetaDirection used to be used as a side.
361  */
362 typedef enum
363 {
364   META_SIDE_LEFT            = META_DIRECTION_LEFT,
365   META_SIDE_RIGHT           = META_DIRECTION_RIGHT,
366   META_SIDE_TOP             = META_DIRECTION_TOP,
367   META_SIDE_BOTTOM          = META_DIRECTION_BOTTOM
368 } MetaSide;
369 
370 /**
371  * MetaButtonFunction:
372  * @META_BUTTON_FUNCTION_MENU: Menu
373  * @META_BUTTON_FUNCTION_MINIMIZE: Minimize
374  * @META_BUTTON_FUNCTION_MAXIMIZE: Maximize
375  * @META_BUTTON_FUNCTION_CLOSE: Close
376  * @META_BUTTON_FUNCTION_LAST: Marks the end of the #MetaButtonFunction enumeration
377  *
378  * Function a window button can have.  Note, you can't add stuff here
379  * without extending the theme format to draw a new function and
380  * breaking all existing themes.
381  */
382 typedef enum
383 {
384   META_BUTTON_FUNCTION_MENU,
385   META_BUTTON_FUNCTION_MINIMIZE,
386   META_BUTTON_FUNCTION_MAXIMIZE,
387   META_BUTTON_FUNCTION_CLOSE,
388   META_BUTTON_FUNCTION_LAST
389 } MetaButtonFunction;
390 
391 #define MAX_BUTTONS_PER_CORNER META_BUTTON_FUNCTION_LAST
392 
393 /* Keep array size in sync with MAX_BUTTONS_PER_CORNER */
394 /**
395  * MetaButtonLayout:
396  * @left_buttons: (array fixed-size=4):
397  * @right_buttons: (array fixed-size=4):
398  * @left_buttons_has_spacer: (array fixed-size=4):
399  * @right_buttons_has_spacer: (array fixed-size=4):
400  */
401 typedef struct _MetaButtonLayout MetaButtonLayout;
402 struct _MetaButtonLayout
403 {
404   /* buttons in the group on the left side */
405   MetaButtonFunction left_buttons[MAX_BUTTONS_PER_CORNER];
406   gboolean left_buttons_has_spacer[MAX_BUTTONS_PER_CORNER];
407 
408   /* buttons in the group on the right side */
409   MetaButtonFunction right_buttons[MAX_BUTTONS_PER_CORNER];
410   gboolean right_buttons_has_spacer[MAX_BUTTONS_PER_CORNER];
411 };
412 
413 /**
414  * MetaWindowMenuType:
415  * @META_WINDOW_MENU_WM: the window manager menu
416  * @META_WINDOW_MENU_APP: the (fallback) app menu
417  *
418  * Menu the compositor should display for a given window
419  */
420 typedef enum
421 {
422   META_WINDOW_MENU_WM,
423   META_WINDOW_MENU_APP
424 } MetaWindowMenuType;
425 
426 /**
427  * MetaFrameBorders:
428  * @visible: inner visible portion of frame border
429  * @invisible: outer invisible portion of frame border
430  * @total: sum of the two borders above
431  */
432 typedef struct _MetaFrameBorders MetaFrameBorders;
433 struct _MetaFrameBorders
434 {
435   /* The frame border is made up of two pieces - an inner visible portion
436    * and an outer portion that is invisible but responds to events.
437    */
438   GtkBorder visible;
439   GtkBorder invisible;
440 
441   /* For convenience, we have a "total" border which is equal to the sum
442    * of the two borders above. */
443   GtkBorder total;
444 };
445 
446 /* sets all dimensions to zero */
447 META_EXPORT
448 void meta_frame_borders_clear (MetaFrameBorders *self);
449 
450 /* should investigate changing these to whatever most apps use */
451 #define META_ICON_WIDTH 96
452 #define META_ICON_HEIGHT 96
453 #define META_MINI_ICON_WIDTH 16
454 #define META_MINI_ICON_HEIGHT 16
455 
456 #define META_DEFAULT_ICON_NAME "window"
457 
458 /* Main loop priorities determine when activity in the GLib
459  * will take precedence over the others. Priorities are sometimes
460  * used to enforce ordering: give A a higher priority than B if
461  * A must occur before B. But that poses a problem since then
462  * if A occurs frequently enough, B will never occur.
463  *
464  * Anything we want to occur more or less immediately should
465  * have a priority of G_PRIORITY_DEFAULT. When we want to
466  * coalesce multiple things together, the appropriate place to
467  * do it is usually META_PRIORITY_BEFORE_REDRAW.
468  *
469  * Note that its usually better to use meta_later_add() rather
470  * than calling g_idle_add() directly; this will make sure things
471  * get run when added from a clutter event handler without
472  * waiting for another repaint cycle.
473  *
474  * If something has a priority lower than the redraw priority
475  * (such as a default priority idle), then it may be arbitrarily
476  * delayed. This happens if the screen is updating rapidly: we
477  * are spending all our time either redrawing or waiting for a
478  * vblank-synced buffer swap. (When X is improved to allow
479  * clutter to do the buffer-swap asynchronously, this will get
480  * better.)
481  */
482 
483 /* G_PRIORITY_DEFAULT:
484  *  events
485  *  many timeouts
486  */
487 
488 /* GTK_PRIORITY_RESIZE:         (G_PRIORITY_HIGH_IDLE + 10) */
489 #define META_PRIORITY_RESIZE    (G_PRIORITY_HIGH_IDLE + 15)
490 /* GTK_PRIORITY_REDRAW:         (G_PRIORITY_HIGH_IDLE + 20) */
491 
492 #define META_PRIORITY_BEFORE_REDRAW  (G_PRIORITY_HIGH_IDLE + 40)
493 /*  calc-showing idle
494  *  update-icon idle
495  */
496 
497 /* CLUTTER_PRIORITY_REDRAW:     (G_PRIORITY_HIGH_IDLE + 50) */
498 #define META_PRIORITY_REDRAW    (G_PRIORITY_HIGH_IDLE + 50)
499 
500 /* ==== Anything below here can be starved arbitrarily ==== */
501 
502 /* G_PRIORITY_DEFAULT_IDLE:
503  *  Mutter plugin unloading
504  */
505 
506 #define META_PRIORITY_PREFS_NOTIFY   (G_PRIORITY_DEFAULT_IDLE + 10)
507 
508 /************************************************************/
509 
510 /**
511  * MetaStackLayer:
512  * @META_LAYER_DESKTOP: Desktop layer
513  * @META_LAYER_BOTTOM: Bottom layer
514  * @META_LAYER_NORMAL: Normal layer
515  * @META_LAYER_TOP: Top layer
516  * @META_LAYER_DOCK: Dock layer
517  * @META_LAYER_OVERRIDE_REDIRECT: Override-redirect layer
518  * @META_LAYER_LAST: Marks the end of the #MetaStackLayer enumeration
519  *
520  * Layers a window can be in.
521  * These MUST be in the order of stacking.
522  */
523 typedef enum
524 {
525   META_LAYER_DESKTOP	       = 0,
526   META_LAYER_BOTTOM	       = 1,
527   META_LAYER_NORMAL	       = 2,
528   META_LAYER_TOP	       = 4, /* Same as DOCK; see EWMH and bug 330717 */
529   META_LAYER_DOCK	       = 4,
530   META_LAYER_OVERRIDE_REDIRECT = 7,
531   META_LAYER_LAST	       = 8
532 } MetaStackLayer;
533 
534 /* MetaGravity: (skip)
535  *
536  * Identical to the corresponding gravity value macros from libX11.
537  */
538 typedef enum _MetaGravity
539 {
540   META_GRAVITY_NONE = 0,
541   META_GRAVITY_NORTH_WEST = 1,
542   META_GRAVITY_NORTH = 2,
543   META_GRAVITY_NORTH_EAST = 3,
544   META_GRAVITY_WEST = 4,
545   META_GRAVITY_CENTER = 5,
546   META_GRAVITY_EAST = 6,
547   META_GRAVITY_SOUTH_WEST = 7,
548   META_GRAVITY_SOUTH = 8,
549   META_GRAVITY_SOUTH_EAST = 9,
550   META_GRAVITY_STATIC = 10,
551 } MetaGravity;
552 
553 #endif
554