chiark / gitweb /
debian/changelog: start -4~
[vtwm.git] / regions.h
1 /*
2  * Copyright 1989 Massachusetts Institute of Technology
3  *
4  * Permission to use, copy, modify, and distribute this software and its
5  * documentation for any purpose and without fee is hereby granted, provided
6  * that the above copyright notice appear in all copies and that both that
7  * copyright notice and this permission notice appear in supporting
8  * documentation, and that the name of M.I.T. not be used in advertising
9  * or publicity pertaining to distribution of the software without specific,
10  * written prior permission.  M.I.T. makes no representations about the
11  * suitability of this software for any purpose.  It is provided "as is"
12  * without express or implied warranty.
13  *
14  * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
16  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
18  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
19  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20  */
21
22 /**********************************************************************
23  *
24  * regions.h (was icons.h)
25  *
26  * Region related definitions
27  *
28  * 4/26/99 D. J. Hawkey Jr.
29  *
30  **********************************************************************/
31
32 #ifndef REGIONS_H
33 #define REGIONS_H
34
35 #define USEDBY_TWIN 1
36 #define USEDBY_NAME 2
37
38 /* djhjr - 10/20/01 */
39 #ifndef NO_REGEX_SUPPORT
40 #include <sys/types.h>
41 #include <regex.h>
42 #endif
43
44 typedef struct RootRegion
45 {
46     struct RootRegion   *next;
47     int                 x, y, w, h;
48     int                 grav1, grav2;
49     int                 stepx, stepy;
50     struct RegionEntry  *entries;
51 } RootRegion;
52
53 typedef struct RegionEntry
54 {
55     struct RegionEntry  *next;
56     int                 x, y, w, h;
57
58     /* icons use twm_win, applets use both - djhjr - 4/26/99 */
59     union
60     {
61         TwmWindow       *twm_win;
62         char            *name;
63     } u;
64
65 /* djhjr - 10/20/01 */
66 #ifndef NO_REGEX_SUPPORT
67     regex_t             re;
68 #else
69     char                re;
70 #endif
71     short               type;
72
73     short               usedby;
74 } RegionEntry;
75
76 #endif /* REGIONS_H */