dtcm: Coverity 88353
[oweals/cde.git] / cde / programs / dtwm / WmICCC.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these libraries and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* 
24  * (c) Copyright 1989, 1990, 1991, 1992, 1993, 1994 OPEN SOFTWARE FOUNDATION, INC. 
25  * ALL RIGHTS RESERVED 
26 */ 
27 /* 
28  * Motif Release 1.2.4
29 */ 
30 /*
31  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
32
33 #ifndef _Dt_WmICCC_h_
34 #define _Dt_WmICCC_h_
35 /*
36  * Included Files:
37  */
38
39 #include <X11/Xatom.h>
40 #include <X11/Xmd.h>
41
42
43 /*
44  * Value definitions and macros:
45  */
46
47
48 \f
49 /*************************************<->*************************************
50  *
51  *  ICCC property data structures ...
52  *
53  *
54  *  Description:
55  *  -----------
56  *  These data structures are mwm versions of the window manager data
57  *  stuctures that are specified in the ICCCM and the Xlib specification
58  *  for client/window manager communication.  In general these data
59  *  structures correspond to client window property values.
60  *
61  *************************************<->***********************************/
62
63
64 /* mwm version of the xPropSizeHints structure: */
65
66 typedef struct _PropSizeHints
67 {
68     unsigned long       flags;
69     long                x;                      /* R2 conventions */
70     long                y;                      /* R2 conventions */
71     long                width;                  /* R2 conventions */
72     long                height;                 /* R2 conventions */
73     long                minWidth;
74     long                minHeight;
75     long                maxWidth;
76     long                maxHeight;
77     long                widthInc;
78     long                heightInc;
79     long                minAspectX;
80     long                minAspectY;
81     long                maxAspectX;
82     long                maxAspectY;
83     long                baseWidth;              /* current conventions */
84     long                baseHeight;             /* current conventions */
85     long                winGravity;             /* current conventions */
86
87 } PropSizeHints;
88
89 #define PROP_SIZE_HINTS_ELEMENTS        18
90
91
92 /* mwm version of the XSizeHints structure: */
93
94 typedef struct _SizeHints
95 {
96     int         icccVersion;
97     long        flags;
98     int         x;                              /* R2 conventions */
99     int         y;                              /* R2 conventions */
100     int         width;                          /* R2 conventions */
101     int         height;                         /* R2 conventions */
102     int         min_width;
103     int         min_height;
104     int         max_width;
105     int         max_height;
106     int         width_inc;
107     int         height_inc;
108     AspectRatio min_aspect;
109     AspectRatio max_aspect;
110     int         base_width;                     /* current conventions */
111     int         base_height;                    /* current conventions */
112     int         win_gravity;                    /* current conventions */
113
114 } SizeHints;
115
116 /* mwm version of the xPropWMState structure: */
117
118 typedef struct _PropWMState
119 {
120     unsigned long       state;
121     unsigned long       icon;
122 } PropWMState;
123
124 #define PROP_WM_STATE_ELEMENTS          2
125
126
127 /* ICCC versions (icccVersion): */
128 #define ICCC_R2         0
129 #define ICCC_CURRENT    1
130 #define ICCC_UNKNOWN    ICCC_CURRENT
131
132
133 /* SizeHints flags field values: */
134 #define US_POSITION             (1L << 0)
135 #define US_SIZE                 (1L << 1)
136 #define P_POSITION              (1L << 2)
137 #define P_SIZE                  (1L << 3)
138 #define P_MIN_SIZE              (1L << 4)
139 #define P_MAX_SIZE              (1L << 5)
140 #define P_RESIZE_INC            (1L << 6)
141 #define P_ASPECT                (1L << 7)
142 #define P_BASE_SIZE             (1L << 8)
143 #define P_WIN_GRAVITY           (1L << 9)
144
145 /* PropWMState state field value: */
146 #define WithdrawnSTATE          0
147 #endif /* _Dt_WmICCC_h_ */