2 * ion/ioncore/stacking.h
4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
9 #ifndef ION_IONCORE_STACKING_H
10 #define ION_IONCORE_STACKING_H
14 #include "sizepolicy.h"
17 #define STACKING_LEVEL_BOTTOM 0
18 #define STACKING_LEVEL_NORMAL 1
19 #define STACKING_LEVEL_ON_TOP 2
20 #define STACKING_LEVEL_MODAL1 1024
22 #define STACKING_IS_HIDDEN(ST) ((ST)->hidden)
23 #define STACKING_IS_PSEUDOMODAL(ST) ((ST)->pseudomodal)
26 DECLSTRUCT(WStacking
){
28 WStacking
*next
, *prev
;
32 WStacking
*mgr_next
, *mgr_prev
;
44 typedef bool WStackingFilter(WStacking
*st
, void *data
);
45 typedef WStacking
*WStackingIterator(void *data
);
48 DECLSTRUCT(WStackingIterTmp
){
50 WStackingFilter
*filt
;
55 WStacking
**window_get_stackingp(WWindow
*wwin
);
56 WStacking
*window_get_stacking(WWindow
*wwin
);
59 WStacking
*create_stacking();
61 void stacking_free(WStacking
*st
);
63 /* Returns the topmost node with 'above' pointing to st. */
64 WStacking
*stacking_unstack(WWindow
*par
, WStacking
*st
);
66 void stacking_iter_init(WStackingIterTmp
*tmp
,
68 WStackingFilter
*filt
,
70 WRegion
*stacking_iter(WStackingIterTmp
*tmp
);
71 WStacking
*stacking_iter_nodes(WStackingIterTmp
*tmp
);
73 void stacking_iter_mgr_init(WStackingIterTmp
*tmp
,
75 WStackingFilter
*filt
,
77 WRegion
*stacking_iter_mgr(WStackingIterTmp
*tmp
);
78 WStacking
*stacking_iter_mgr_nodes(WStackingIterTmp
*tmp
);
80 void stacking_weave(WStacking
**stacking
, WStacking
**np
, bool below
);
81 WStacking
*stacking_unweave(WStacking
**stacking
,
82 WStackingFilter
*filt
, void *filt_data
);
84 void stacking_restack(WStacking
**stacking
, WStacking
*st
, Window fb_win
,
85 WStackingFilter
*filt
, void *filt_data
, bool lower
);
87 WStacking
*stacking_find_to_focus(WStacking
*stacking
, WStacking
*to_try
,
88 WStackingFilter
*include_filt
,
89 WStackingFilter
*approve_filt
,
91 WStacking
*stacking_find_to_focus_mapped(WStacking
*stacking
,
95 uint
stacking_min_level(WStacking
*stacking
,
96 WStackingFilter
*include_filt
,
99 uint
stacking_min_level_mapped(WStacking
*stacking
);
101 bool stacking_must_focus(WStacking
*stacking
, WStacking
*st
);
103 WStacking
*ioncore_find_stacking(WRegion
*reg
);
104 void stacking_unassoc(WStacking
*stacking
);
105 bool stacking_assoc(WStacking
*stacking
, WRegion
*reg
);
107 #endif /* ION_IONCORE_STACKING_H */