1 | /***********************************************************
|
---|
2 |
|
---|
3 | Copyright 1987, 1998 The Open Group
|
---|
4 |
|
---|
5 | Permission to use, copy, modify, distribute, and sell this software and its
|
---|
6 | documentation for any purpose is hereby granted without fee, provided that
|
---|
7 | the above copyright notice appear in all copies and that both that
|
---|
8 | copyright notice and this permission notice appear in supporting
|
---|
9 | documentation.
|
---|
10 |
|
---|
11 | The above copyright notice and this permission notice shall be included in
|
---|
12 | all copies or substantial portions of the Software.
|
---|
13 |
|
---|
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
---|
17 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
---|
18 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
---|
19 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
---|
20 |
|
---|
21 | Except as contained in this notice, the name of The Open Group shall not be
|
---|
22 | used in advertising or otherwise to promote the sale, use or other dealings
|
---|
23 | in this Software without prior written authorization from The Open Group.
|
---|
24 |
|
---|
25 |
|
---|
26 | Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
---|
27 |
|
---|
28 | All Rights Reserved
|
---|
29 |
|
---|
30 | Permission to use, copy, modify, and distribute this software and its
|
---|
31 | documentation for any purpose and without fee is hereby granted,
|
---|
32 | provided that the above copyright notice appear in all copies and that
|
---|
33 | both that copyright notice and this permission notice appear in
|
---|
34 | supporting documentation, and that the name of Digital not be
|
---|
35 | used in advertising or publicity pertaining to distribution of the
|
---|
36 | software without specific, written prior permission.
|
---|
37 |
|
---|
38 | DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
---|
39 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
---|
40 | DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
---|
41 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
---|
42 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
---|
43 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
---|
44 | SOFTWARE.
|
---|
45 |
|
---|
46 | ******************************************************************/
|
---|
47 |
|
---|
48 | #ifndef WINDOW_H
|
---|
49 | #define WINDOW_H
|
---|
50 |
|
---|
51 | #include "misc.h"
|
---|
52 | #include "region.h"
|
---|
53 | #include "screenint.h"
|
---|
54 | #include <X11/Xproto.h>
|
---|
55 |
|
---|
56 | #define TOTALLY_OBSCURED 0
|
---|
57 | #define UNOBSCURED 1
|
---|
58 | #define OBSCURED 2
|
---|
59 |
|
---|
60 | #define VisibilityNotViewable 3
|
---|
61 |
|
---|
62 | /* return values for tree-walking callback procedures */
|
---|
63 | #define WT_STOPWALKING 0
|
---|
64 | #define WT_WALKCHILDREN 1
|
---|
65 | #define WT_DONTWALKCHILDREN 2
|
---|
66 | #define WT_NOMATCH 3
|
---|
67 | #define NullWindow ((WindowPtr) 0)
|
---|
68 |
|
---|
69 | /* Forward declaration, we can't include input.h here */
|
---|
70 | struct _DeviceIntRec;
|
---|
71 | struct _Cursor;
|
---|
72 |
|
---|
73 | typedef struct _BackingStore *BackingStorePtr;
|
---|
74 | typedef struct _Window *WindowPtr;
|
---|
75 |
|
---|
76 | typedef int (*VisitWindowProcPtr)(
|
---|
77 | WindowPtr /*pWin*/,
|
---|
78 | pointer /*data*/);
|
---|
79 |
|
---|
80 | extern int TraverseTree(
|
---|
81 | WindowPtr /*pWin*/,
|
---|
82 | VisitWindowProcPtr /*func*/,
|
---|
83 | pointer /*data*/);
|
---|
84 |
|
---|
85 | extern int WalkTree(
|
---|
86 | ScreenPtr /*pScreen*/,
|
---|
87 | VisitWindowProcPtr /*func*/,
|
---|
88 | pointer /*data*/);
|
---|
89 |
|
---|
90 | extern Bool CreateRootWindow(
|
---|
91 | ScreenPtr /*pScreen*/);
|
---|
92 |
|
---|
93 | extern void InitRootWindow(
|
---|
94 | WindowPtr /*pWin*/);
|
---|
95 |
|
---|
96 | typedef WindowPtr (* RealChildHeadProc) (WindowPtr pWin);
|
---|
97 |
|
---|
98 | void RegisterRealChildHeadProc (RealChildHeadProc proc);
|
---|
99 |
|
---|
100 | extern WindowPtr RealChildHead(
|
---|
101 | WindowPtr /*pWin*/);
|
---|
102 |
|
---|
103 | extern WindowPtr CreateWindow(
|
---|
104 | Window /*wid*/,
|
---|
105 | WindowPtr /*pParent*/,
|
---|
106 | int /*x*/,
|
---|
107 | int /*y*/,
|
---|
108 | unsigned int /*w*/,
|
---|
109 | unsigned int /*h*/,
|
---|
110 | unsigned int /*bw*/,
|
---|
111 | unsigned int /*class*/,
|
---|
112 | Mask /*vmask*/,
|
---|
113 | XID* /*vlist*/,
|
---|
114 | int /*depth*/,
|
---|
115 | ClientPtr /*client*/,
|
---|
116 | VisualID /*visual*/,
|
---|
117 | int* /*error*/);
|
---|
118 |
|
---|
119 | extern int DeleteWindow(
|
---|
120 | pointer /*pWin*/,
|
---|
121 | XID /*wid*/);
|
---|
122 |
|
---|
123 | extern int DestroySubwindows(
|
---|
124 | WindowPtr /*pWin*/,
|
---|
125 | ClientPtr /*client*/);
|
---|
126 |
|
---|
127 | /* Quartz support on Mac OS X uses the HIToolbox
|
---|
128 | framework whose ChangeWindowAttributes function conflicts here. */
|
---|
129 | #ifdef __APPLE__
|
---|
130 | #define ChangeWindowAttributes Darwin_X_ChangeWindowAttributes
|
---|
131 | #endif
|
---|
132 | extern int ChangeWindowAttributes(
|
---|
133 | WindowPtr /*pWin*/,
|
---|
134 | Mask /*vmask*/,
|
---|
135 | XID* /*vlist*/,
|
---|
136 | ClientPtr /*client*/);
|
---|
137 |
|
---|
138 | extern int ChangeWindowDeviceCursor(
|
---|
139 | WindowPtr /*pWin*/,
|
---|
140 | struct _DeviceIntRec* /*pDev*/,
|
---|
141 | struct _Cursor* /*pCursor*/);
|
---|
142 |
|
---|
143 | extern struct _Cursor* WindowGetDeviceCursor(
|
---|
144 | WindowPtr /*pWin*/,
|
---|
145 | struct _DeviceIntRec* /*pDev*/);
|
---|
146 |
|
---|
147 | /* Quartz support on Mac OS X uses the HIToolbox
|
---|
148 | framework whose GetWindowAttributes function conflicts here. */
|
---|
149 | #ifdef __APPLE__
|
---|
150 | #define GetWindowAttributes(w,c,x) Darwin_X_GetWindowAttributes(w,c,x)
|
---|
151 | extern void Darwin_X_GetWindowAttributes(
|
---|
152 | #else
|
---|
153 | extern void GetWindowAttributes(
|
---|
154 | #endif
|
---|
155 | WindowPtr /*pWin*/,
|
---|
156 | ClientPtr /*client*/,
|
---|
157 | xGetWindowAttributesReply* /* wa */);
|
---|
158 |
|
---|
159 | extern RegionPtr CreateUnclippedWinSize(
|
---|
160 | WindowPtr /*pWin*/);
|
---|
161 |
|
---|
162 | extern void GravityTranslate(
|
---|
163 | int /*x*/,
|
---|
164 | int /*y*/,
|
---|
165 | int /*oldx*/,
|
---|
166 | int /*oldy*/,
|
---|
167 | int /*dw*/,
|
---|
168 | int /*dh*/,
|
---|
169 | unsigned /*gravity*/,
|
---|
170 | int* /*destx*/,
|
---|
171 | int* /*desty*/);
|
---|
172 |
|
---|
173 | extern int ConfigureWindow(
|
---|
174 | WindowPtr /*pWin*/,
|
---|
175 | Mask /*mask*/,
|
---|
176 | XID* /*vlist*/,
|
---|
177 | ClientPtr /*client*/);
|
---|
178 |
|
---|
179 | extern int CirculateWindow(
|
---|
180 | WindowPtr /*pParent*/,
|
---|
181 | int /*direction*/,
|
---|
182 | ClientPtr /*client*/);
|
---|
183 |
|
---|
184 | extern int ReparentWindow(
|
---|
185 | WindowPtr /*pWin*/,
|
---|
186 | WindowPtr /*pParent*/,
|
---|
187 | int /*x*/,
|
---|
188 | int /*y*/,
|
---|
189 | ClientPtr /*client*/);
|
---|
190 |
|
---|
191 | extern int MapWindow(
|
---|
192 | WindowPtr /*pWin*/,
|
---|
193 | ClientPtr /*client*/);
|
---|
194 |
|
---|
195 | extern void MapSubwindows(
|
---|
196 | WindowPtr /*pParent*/,
|
---|
197 | ClientPtr /*client*/);
|
---|
198 |
|
---|
199 | extern int UnmapWindow(
|
---|
200 | WindowPtr /*pWin*/,
|
---|
201 | Bool /*fromConfigure*/);
|
---|
202 |
|
---|
203 | extern void UnmapSubwindows(
|
---|
204 | WindowPtr /*pWin*/);
|
---|
205 |
|
---|
206 | extern void HandleSaveSet(
|
---|
207 | ClientPtr /*client*/);
|
---|
208 |
|
---|
209 | extern Bool PointInWindowIsVisible(
|
---|
210 | WindowPtr /*pWin*/,
|
---|
211 | int /*x*/,
|
---|
212 | int /*y*/);
|
---|
213 |
|
---|
214 | extern RegionPtr NotClippedByChildren(
|
---|
215 | WindowPtr /*pWin*/);
|
---|
216 |
|
---|
217 | extern void SendVisibilityNotify(
|
---|
218 | WindowPtr /*pWin*/);
|
---|
219 |
|
---|
220 | extern int dixSaveScreens(
|
---|
221 | ClientPtr client,
|
---|
222 | int on,
|
---|
223 | int mode);
|
---|
224 |
|
---|
225 | extern int SaveScreens(
|
---|
226 | int on,
|
---|
227 | int mode);
|
---|
228 |
|
---|
229 | extern WindowPtr FindWindowWithOptional(
|
---|
230 | WindowPtr /*w*/);
|
---|
231 |
|
---|
232 | extern void CheckWindowOptionalNeed(
|
---|
233 | WindowPtr /*w*/);
|
---|
234 |
|
---|
235 | extern Bool MakeWindowOptional(
|
---|
236 | WindowPtr /*pWin*/);
|
---|
237 |
|
---|
238 | extern WindowPtr MoveWindowInStack(
|
---|
239 | WindowPtr /*pWin*/,
|
---|
240 | WindowPtr /*pNextSib*/);
|
---|
241 |
|
---|
242 | void SetWinSize(
|
---|
243 | WindowPtr /*pWin*/);
|
---|
244 |
|
---|
245 | void SetBorderSize(
|
---|
246 | WindowPtr /*pWin*/);
|
---|
247 |
|
---|
248 | void ResizeChildrenWinSize(
|
---|
249 | WindowPtr /*pWin*/,
|
---|
250 | int /*dx*/,
|
---|
251 | int /*dy*/,
|
---|
252 | int /*dw*/,
|
---|
253 | int /*dh*/);
|
---|
254 |
|
---|
255 | extern void ShapeExtensionInit(void);
|
---|
256 |
|
---|
257 | extern void SendShapeNotify(
|
---|
258 | WindowPtr /* pWin */,
|
---|
259 | int /* which */ );
|
---|
260 |
|
---|
261 | extern RegionPtr CreateBoundingShape(
|
---|
262 | WindowPtr /* pWin */ );
|
---|
263 |
|
---|
264 | extern RegionPtr CreateClipShape(
|
---|
265 | WindowPtr /* pWin */ );
|
---|
266 |
|
---|
267 | extern void DisableMapUnmapEvents(
|
---|
268 | WindowPtr /* pWin */ );
|
---|
269 | extern void EnableMapUnmapEvents(
|
---|
270 | WindowPtr /* pWin */ );
|
---|
271 |
|
---|
272 | #endif /* WINDOW_H */
|
---|