stack.h

Go to the documentation of this file.
00001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
00002 
00021 /* 
00022  * Copyright (C) 2001 Havoc Pennington
00023  * Copyright (C) 2005 Elijah Newren
00024  * 
00025  * This program is free software; you can redistribute it and/or
00026  * modify it under the terms of the GNU General Public License as
00027  * published by the Free Software Foundation; either version 2 of the
00028  * License, or (at your option) any later version.
00029  *
00030  * This program is distributed in the hope that it will be useful, but
00031  * WITHOUT ANY WARRANTY; without even the implied warranty of
00032  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00033  * General Public License for more details.
00034  * 
00035  * You should have received a copy of the GNU General Public License
00036  * along with this program; if not, write to the Free Software
00037  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00038  * 02111-1307, USA.
00039  */
00040 
00041 #ifndef META_STACK_H
00042 #define META_STACK_H
00043 
00044 #include "screen-private.h"
00045 
00050 typedef enum
00051 {
00052   META_LAYER_DESKTOP        = 0,
00053   META_LAYER_BOTTOM         = 1,
00054   META_LAYER_NORMAL         = 2,
00055   META_LAYER_TOP            = 4, /* Same as DOCK; see EWMH and bug 330717 */
00056   META_LAYER_DOCK           = 4,
00057   META_LAYER_FULLSCREEN     = 5,
00058   META_LAYER_FOCUSED_WINDOW = 6,
00059   META_LAYER_LAST           = 7
00060 } MetaStackLayer;
00061 
00069 struct _MetaStack
00070 {
00072   MetaScreen *screen;
00073 
00078   GArray *windows;
00079 
00081   GList *sorted;
00082 
00091   GList *added;
00092 
00101   GList *removed;
00102   
00111   int freeze_count;
00112 
00117   GArray *last_root_children_stacked;
00118 
00123   gint n_positions;
00124 
00126   unsigned int need_resort : 1;
00127 
00132   unsigned int need_relayer : 1;
00133 
00138   unsigned int need_constrain : 1;
00139 };
00140 
00147 MetaStack *meta_stack_new       (MetaScreen     *screen);
00148 
00154 void       meta_stack_free      (MetaStack      *stack);
00155 
00163 void       meta_stack_add       (MetaStack      *stack,
00164                                  MetaWindow     *window);
00165 
00173 void       meta_stack_remove    (MetaStack      *stack,
00174                                  MetaWindow     *window);
00183 void       meta_stack_update_layer    (MetaStack      *stack,
00184                                        MetaWindow     *window);
00185 
00194 void       meta_stack_update_transient (MetaStack     *stack,
00195                                         MetaWindow    *window);
00196 
00204 void       meta_stack_raise     (MetaStack      *stack,
00205                                  MetaWindow     *window);
00212 void       meta_stack_lower     (MetaStack      *stack,
00213                                  MetaWindow     *window);
00214 
00225 void       meta_stack_freeze    (MetaStack      *stack);
00226 
00234 void       meta_stack_thaw      (MetaStack      *stack);
00235 
00243 MetaWindow* meta_stack_get_top    (MetaStack  *stack);
00244 
00252 MetaWindow* meta_stack_get_bottom (MetaStack  *stack);
00253 
00266 MetaWindow* meta_stack_get_above  (MetaStack  *stack,
00267                                    MetaWindow *window,
00268                                    gboolean    only_within_layer);
00269 
00282 MetaWindow* meta_stack_get_below  (MetaStack  *stack,
00283                                    MetaWindow *window,
00284                                    gboolean    only_within_layer);
00285 
00305 MetaWindow* meta_stack_get_default_focus_window          (MetaStack     *stack,
00306                                                           MetaWorkspace *workspace,
00307                                                           MetaWindow    *not_this_one);
00308 
00329 MetaWindow* meta_stack_get_default_focus_window_at_point (MetaStack     *stack,
00330                                                           MetaWorkspace *workspace,
00331                                                           MetaWindow    *not_this_one,
00332                                                           int            root_x,
00333                                                           int            root_y);
00334 
00344 GList*      meta_stack_list_windows (MetaStack *stack,
00345                                      MetaWorkspace *workspace);
00346 
00364 int         meta_stack_windows_cmp  (MetaStack  *stack,
00365                                      MetaWindow *window_a,
00366                                      MetaWindow *window_b);
00367 
00378 void meta_window_set_stack_position (MetaWindow *window,
00379                                      int         position);
00380 
00390 GList* meta_stack_get_positions (MetaStack *stack);
00391 
00399 void   meta_stack_set_positions (MetaStack *stack,
00400                                  GList     *windows);
00401 
00402 #endif

Generated on Sat Aug 23 22:04:17 2008 for metacity by  doxygen 1.5.5