chiark / gitweb /
Imported Upstream version 1.0.0
[e16] / src / groups.h
1 /*
2  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
3  * Copyright (C) 2004-2009 Kim Woelders
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a copy
6  * of this software and associated documentation files (the "Software"), to
7  * deal in the Software without restriction, including without limitation the
8  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9  * sell copies of the Software, and to permit persons to whom the Software is
10  * furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in
13  * all copies of the Software, its documentation and marketing & publicity
14  * materials, and acknowledgment shall be given in the documentation, materials
15  * and software packages that this Software was used.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20  * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24 #ifndef _GROUPS_H_
25 #define _GROUPS_H_
26
27 #define GROUP_SELECT_ALL             0
28 #define GROUP_SELECT_EWIN_ONLY       1
29 #define GROUP_SELECT_ALL_EXCEPT_EWIN 2
30
31 /* For window group listing */
32 #define GROUP_ACTION_ANY                     0
33 #define GROUP_ACTION_MOVE                    1
34 #define GROUP_ACTION_STACKING                2
35 #define GROUP_ACTION_KILL                    3
36 #define GROUP_ACTION_STICK                   4
37 #define GROUP_ACTION_ICONIFY                 5
38 #define GROUP_ACTION_SHADE                   6
39 #define GROUP_ACTION_SET_WINDOW_BORDER       7
40
41 typedef struct _groupconfig {
42    char                iconify;
43    char                kill;
44    char                move;
45    char                raise;
46    char                set_border;
47    char                shade;
48    char                stick;
49 } GroupConfig;
50
51 struct _group {
52    int                 index;
53    EWin              **members;
54    int                 num_members;
55    GroupConfig         cfg;
56    char                save;    /* Used in snapshot - must save */
57 };
58
59 /* finders.c */
60 EWin              **ListWinGroupMembersForEwin(const EWin * ewin, int action,
61                                                char nogroup, int *num);
62
63 /* groups.c */
64 Group              *const *EwinGetGroups(const EWin * ewin, int *num);
65 Group              *EwinsInGroup(const EWin * ewin1, const EWin * ewin2);
66 void                GroupsEwinAdd(EWin * ewin, const int *pgid, int ngid);
67 void                GroupsEwinRemove(EWin * ewin);
68 void                GroupsLoad(void);
69 void                GroupsSave(void);
70 Group             **GroupsGetList(int *pnum);
71 int                 GroupsGetSwapmove(void);
72 void                GroupRemember(int gid);
73
74 #endif /* _GROUPS_H_ */