Use C++ linker
[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 librararies 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 /*   $XConsortium: WmICCC.h /main/3 1995/11/01 11:40:07 rswiston $ */
31 /*
32  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
33
34 /*
35  * Included Files:
36  */
37
38 #include <X11/Xatom.h>
39 #include <X11/Xmd.h>
40
41
42 /*
43  * Value definitions and macros:
44  */
45
46
47 \f
48 /*************************************<->*************************************
49  *
50  *  ICCC property data structures ...
51  *
52  *
53  *  Description:
54  *  -----------
55  *  These data structures are mwm versions of the window manager data
56  *  stuctures that are specified in the ICCCM and the Xlib specification
57  *  for client/window manager communication.  In general these data
58  *  structures correspond to client window property values.
59  *
60  *************************************<->***********************************/
61
62
63 /* mwm version of the xPropSizeHints structure: */
64
65 typedef struct _PropSizeHints
66 {
67     unsigned long       flags;
68     long                x;                      /* R2 conventions */
69     long                y;                      /* R2 conventions */
70     long                width;                  /* R2 conventions */
71     long                height;                 /* R2 conventions */
72     long                minWidth;
73     long                minHeight;
74     long                maxWidth;
75     long                maxHeight;
76     long                widthInc;
77     long                heightInc;
78     long                minAspectX;
79     long                minAspectY;
80     long                maxAspectX;
81     long                maxAspectY;
82     long                baseWidth;              /* current conventions */
83     long                baseHeight;             /* current conventions */
84     long                winGravity;             /* current conventions */
85
86 } PropSizeHints;
87
88 #define PROP_SIZE_HINTS_ELEMENTS        18
89
90
91 /* mwm version of the XSizeHints structure: */
92
93 typedef struct _SizeHints
94 {
95     int         icccVersion;
96     long        flags;
97     int         x;                              /* R2 conventions */
98     int         y;                              /* R2 conventions */
99     int         width;                          /* R2 conventions */
100     int         height;                         /* R2 conventions */
101     int         min_width;
102     int         min_height;
103     int         max_width;
104     int         max_height;
105     int         width_inc;
106     int         height_inc;
107     AspectRatio min_aspect;
108     AspectRatio max_aspect;
109     int         base_width;                     /* current conventions */
110     int         base_height;                    /* current conventions */
111     int         win_gravity;                    /* current conventions */
112
113 } SizeHints;
114
115 /* mwm version of the xPropWMState structure: */
116
117 typedef struct _PropWMState
118 {
119     unsigned long       state;
120     unsigned long       icon;
121 } PropWMState;
122
123 #define PROP_WM_STATE_ELEMENTS          2
124
125
126 /* ICCC versions (icccVersion): */
127 #define ICCC_R2         0
128 #define ICCC_CURRENT    1
129 #define ICCC_UNKNOWN    ICCC_CURRENT
130
131
132 /* SizeHints flags field values: */
133 #define US_POSITION             (1L << 0)
134 #define US_SIZE                 (1L << 1)
135 #define P_POSITION              (1L << 2)
136 #define P_SIZE                  (1L << 3)
137 #define P_MIN_SIZE              (1L << 4)
138 #define P_MAX_SIZE              (1L << 5)
139 #define P_RESIZE_INC            (1L << 6)
140 #define P_ASPECT                (1L << 7)
141 #define P_BASE_SIZE             (1L << 8)
142 #define P_WIN_GRAVITY           (1L << 9)
143
144 /* PropWMState state field value: */
145 #define WithdrawnSTATE          0