Revert "link mute/volumeup/volumedown keys to respective amixer commands"
[notion/jeffpc.git] / ioncore / group.h
blob894fd651321732525d780d176df244bbc0306f0b
1 /*
2 * ion/ioncore/group.h
4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
7 */
9 #ifndef ION_IONCORE_GROUP_H
10 #define ION_IONCORE_GROUP_H
12 #include <libextl/extl.h>
13 #include <ioncore/common.h>
14 #include <ioncore/region.h>
15 #include <ioncore/screen.h>
16 #include <ioncore/manage.h>
17 #include <ioncore/rectangle.h>
18 #include <ioncore/pholder.h>
19 #include <ioncore/stacking.h>
22 INTRSTRUCT(WGroupAttachParams);
24 typedef WRegionSimpleCreateFn WGroupMkFrameFn;
27 DECLSTRUCT(WGroupAttachParams){
28 uint level_set:1;
29 uint szplcy_set:1;
30 uint geom_set:1;
31 uint geom_weak_set:1;
32 uint switchto_set:1;
34 uint switchto:1;
35 uint bottom:1;
36 uint whatever:1;
38 int geom_weak;
39 WRectangle geom;
41 uint level;
42 WSizePolicy szplcy;
43 WRegion *stack_above;
46 #define GROUPATTACHPARAMS_INIT \
47 {0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0, 0}, 0, 0, NULL}
50 DECLCLASS(WGroup){
51 WRegion reg;
52 WStacking *managed_list;
53 WStacking *managed_stdisp;
54 WStacking *current_managed;
55 WStacking *bottom;
56 Window dummywin;
57 WGroupPHolder *phs;
61 extern bool group_init(WGroup *grp, WWindow *parent, const WFitParams *fp);
62 extern WGroup *create_group(WWindow *parent, const WFitParams *fp);
63 extern void group_deinit(WGroup *grp);
65 extern WRegion *group_load(WWindow *par, const WFitParams *fp,
66 ExtlTab tab);
67 extern void group_do_load(WGroup *ws, ExtlTab tab);
69 extern WRegion* group_current(WGroup *group);
71 DYNFUN WStacking *group_do_add_managed(WGroup *ws, WRegion *reg,
72 int level, WSizePolicy szplcy);
73 extern WStacking *group_do_add_managed_default(WGroup *ws, WRegion *reg,
74 int level, WSizePolicy szplcy);
76 extern void groupattachparams_get(WGroupAttachParams *par, ExtlTab tab,
77 const char *sub);
79 extern WRegion *group_do_attach(WGroup *ws,
80 WGroupAttachParams *param,
81 WRegionAttachData *data);
82 extern bool group_do_attach_final(WGroup *ws,
83 WRegion *reg,
84 const WGroupAttachParams *param);
86 extern WRegion *group_attach(WGroup *ws, WRegion *reg, ExtlTab param);
87 extern WRegion *group_attach_new(WGroup *ws, ExtlTab param);
89 extern void group_manage_stdisp(WGroup *ws, WRegion *stdisp,
90 const WMPlexSTDispInfo *di);
92 extern void group_managed_remove(WGroup *ws, WRegion *reg);
94 extern void group_managed_notify(WGroup *ws, WRegion *reg, WRegionNotify how);
96 extern WRegion *group_bottom(WGroup *ws);
97 extern bool group_set_bottom(WGroup *ws, WRegion *reg);
98 DYNFUN void group_bottom_set(WGroup *grp);
100 extern bool group_rescue_clientwins(WGroup *ws, WRescueInfo *info);
102 extern bool group_rqclose(WGroup *ws);
103 extern bool group_rqclose_relocate(WGroup *ws);
105 extern bool group_managed_rqorder(WGroup *grp, WRegion *sub,
106 WRegionOrder order);
108 extern WStacking *group_find_stacking(WGroup *ws, WRegion *r);
109 extern WStacking *group_find_to_focus(WGroup *ws, WStacking *to_try);
111 extern WRegion *region_groupleader_of(WRegion *reg);
112 /*extern WRegion *region_group_of(WRegion *reg);*/
115 typedef WStackingFilter WGroupIterFilter;
116 typedef WStackingIterTmp WGroupIterTmp;
118 extern void group_iter_init(WGroupIterTmp *tmp, WGroup *ws);
119 extern WRegion *group_iter(WGroupIterTmp *tmp);
120 extern WStacking *group_iter_nodes(WGroupIterTmp *tmp);
122 extern WStacking *group_get_stacking(WGroup *ws);
123 extern WStacking **group_get_stackingp(WGroup *ws);
125 #define FOR_ALL_MANAGED_BY_GROUP(WS, VAR, TMP) \
126 for(group_iter_init(&(TMP), WS), \
127 VAR=group_iter(&(TMP)); \
128 VAR!=NULL; \
129 VAR=group_iter(&(TMP)))
131 #define FOR_ALL_NODES_IN_GROUP(WS, VAR, TMP) \
132 for(group_iter_init(&(TMP), WS), \
133 VAR=group_iter_nodes(&(TMP)); \
134 VAR!=NULL; \
135 VAR=group_iter_nodes(&(TMP)))
137 extern WGroupIterTmp group_iter_default_tmp;
140 #endif /* ION_IONCORE_GROUP_H */