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

« back to all changes in this revision

Viewing changes to src/window.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2005-12-13 23:03:47 UTC
  • mto: (2.2.1 sid) (1.4.2)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20051213230347-8dnaprp18n18dz1y
Tags: upstream-2.13.5
ImportĀ upstreamĀ versionĀ 2.13.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 * Copyright (C) 2001 Havoc Pennington
5
5
 * Copyright (C) 2002 Red Hat, Inc.
6
6
 * Copyright (C) 2003, 2004 Rob Adams
 
7
 * Copyright (C) 2004, 2005 Elijah Newren
7
8
 * 
8
9
 * This program is free software; you can redistribute it and/or
9
10
 * modify it under the terms of the GNU General Public License as
51
52
  META_WINDOW_SPLASHSCREEN
52
53
} MetaWindowType;
53
54
 
 
55
typedef enum
 
56
{
 
57
  META_MAXIMIZE_HORIZONTAL = 1 << 0,
 
58
  META_MAXIMIZE_VERTICAL   = 1 << 1
 
59
} MetaMaximizeFlags;
 
60
 
54
61
struct _MetaStruts
55
62
{
56
63
  /* struts */
107
114
  Time initial_timestamp;  
108
115
  
109
116
  /* Whether we're maximized */
110
 
  guint maximized : 1;
111
 
  guint maximize_after_placement : 1;
 
117
  guint maximized_horizontally : 1;
 
118
  guint maximized_vertically : 1;
 
119
  guint maximize_horizontally_after_placement : 1;
 
120
  guint maximize_vertically_after_placement : 1;
112
121
 
113
122
  /* Whether we're shaded */
114
123
  guint shaded : 1;
116
125
  /* Whether we're fullscreen */
117
126
  guint fullscreen : 1;
118
127
  
 
128
  /* Whether we're trying to constrain the window to be fully onscreen */
 
129
  guint require_fully_onscreen : 1;
 
130
 
 
131
  /* Whether we're trying to constrain the window to be on a single xinerama */
 
132
  guint require_on_single_xinerama : 1;
 
133
 
119
134
  /* Whether we're sticky in the multi-workspace sense
120
135
   * (vs. the not-scroll-with-viewport sense, we don't
121
136
   * have no stupid viewports)
124
139
 
125
140
  /* Minimize is the state controlled by the minimize button */
126
141
  guint minimized : 1;
 
142
  guint tab_unminimized : 1;
127
143
 
128
144
  /* Whether the window is mapped; actual server-side state
129
145
   * see also unmaps_pending
285
301
  /* The size we set the window to last (i.e. what we believe
286
302
   * to be its actual size on the server). The x, y are
287
303
   * the actual server-side x,y so are relative to the frame
288
 
   * or the root window as appropriate.
 
304
   * (meaning that they just hold the frame width and height) 
 
305
   * or the root window (meaning they specify the location
 
306
   * of the top left of the inner window) as appropriate.
289
307
   */
290
308
  MetaRectangle rect;
291
309
 
292
 
  /* The geometry to restore when we unmaximize.
293
 
   * The position is in root window coords, even if
294
 
   * there's a frame, which contrasts with window->rect
295
 
   * above.
 
310
  /* The geometry to restore when we unmaximize.  The position is in
 
311
   * root window coords, even if there's a frame, which contrasts with
 
312
   * window->rect above.  Note that this gives the position and size
 
313
   * of the client window (i.e. ignoring the frame).
296
314
   */
297
315
  MetaRectangle saved_rect;
298
316
 
299
317
  /* This is the geometry the window had after the last user-initiated
300
318
   * move/resize operations. We use this whenever we are moving the
301
 
   * implicitly (for example, if we move to avoid a panel, we
302
 
   * can snap back to this position if the panel moves again)
 
319
   * implicitly (for example, if we move to avoid a panel, we can snap
 
320
   * back to this position if the panel moves again).  Note that this
 
321
   * gives the position and size of the client window (i.e. ignoring
 
322
   * the frame).
303
323
   *
304
324
   * Position valid if user_has_moved, size valid if user_has_resized
305
325
   *
306
 
   * Position always in root coords, unlike window->rect
 
326
   * Position always in root coords, unlike window->rect.
307
327
   */
308
328
  MetaRectangle user_rect;
309
329
  
328
348
 * the dynamic window state such as "maximized", not just the
329
349
 * window's type
330
350
 */
 
351
#define META_WINDOW_MAXIMIZED(w)       ((w)->maximized_horizontally && \
 
352
                                        (w)->maximized_vertically)
331
353
#define META_WINDOW_ALLOWS_MOVE(w)     ((w)->has_move_func && !(w)->fullscreen)
332
 
#define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w)   ((w)->has_resize_func && !(w)->maximized && !(w)->fullscreen && !(w)->shaded)
 
354
#define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w)   ((w)->has_resize_func && !META_WINDOW_MAXIMIZED (w) && !(w)->fullscreen && !(w)->shaded)
333
355
#define META_WINDOW_ALLOWS_RESIZE(w)   (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) &&                \
334
356
                                        (((w)->size_hints.min_width < (w)->size_hints.max_width) ||  \
335
357
                                         ((w)->size_hints.min_height < (w)->size_hints.max_height)))
348
370
void        meta_window_queue_calc_showing (MetaWindow  *window);
349
371
void        meta_window_minimize           (MetaWindow  *window);
350
372
void        meta_window_unminimize         (MetaWindow  *window);
351
 
void        meta_window_maximize           (MetaWindow  *window);
352
 
void        meta_window_maximize_internal  (MetaWindow    *window,
353
 
                                            MetaRectangle *saved_rect);
354
 
void        meta_window_unmaximize         (MetaWindow  *window);
 
373
void        meta_window_maximize           (MetaWindow        *window,
 
374
                                            MetaMaximizeFlags  directions);
 
375
void        meta_window_maximize_internal  (MetaWindow        *window,
 
376
                                            MetaMaximizeFlags  directions,
 
377
                                            MetaRectangle     *saved_rect);
 
378
void        meta_window_unmaximize         (MetaWindow        *window,
 
379
                                            MetaMaximizeFlags  directions);
355
380
void        meta_window_make_above         (MetaWindow  *window);
356
381
void        meta_window_unmake_above       (MetaWindow  *window);
357
382
void        meta_window_shade              (MetaWindow  *window);
388
413
                                             int          gravity);
389
414
 
390
415
 
391
 
void        meta_window_fill_horizontal     (MetaWindow  *window);
392
 
void        meta_window_fill_vertical       (MetaWindow  *window);
393
 
 
394
416
/* Return whether the window would be showing if we were on its workspace */
395
417
gboolean    meta_window_showing_on_its_workspace (MetaWindow *window);
396
418
 
475
497
                            int         button,
476
498
                            Time        timestamp);
477
499
 
 
500
gboolean meta_window_titlebar_is_onscreen    (MetaWindow *window);
 
501
void     meta_window_shove_titlebar_onscreen (MetaWindow *window);
 
502
 
478
503
void meta_window_set_gravity (MetaWindow *window,
479
504
                              int         gravity);
480
505