1 | /* $Xorg: window.h,v 1.4 2001/02/09 02:05:16 xorgcvs Exp $ */
|
---|
2 | /***********************************************************
|
---|
3 |
|
---|
4 | Copyright 1987, 1998 The Open Group
|
---|
5 |
|
---|
6 | Permission to use, copy, modify, distribute, and sell this software and its
|
---|
7 | documentation for any purpose is hereby granted without fee, provided that
|
---|
8 | the above copyright notice appear in all copies and that both that
|
---|
9 | copyright notice and this permission notice appear in supporting
|
---|
10 | documentation.
|
---|
11 |
|
---|
12 | The above copyright notice and this permission notice shall be included in
|
---|
13 | all copies or substantial portions of the Software.
|
---|
14 |
|
---|
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
---|
18 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
---|
19 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
---|
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
---|
21 |
|
---|
22 | Except as contained in this notice, the name of The Open Group shall not be
|
---|
23 | used in advertising or otherwise to promote the sale, use or other dealings
|
---|
24 | in this Software without prior written authorization from The Open Group.
|
---|
25 |
|
---|
26 |
|
---|
27 | Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
---|
28 |
|
---|
29 | All Rights Reserved
|
---|
30 |
|
---|
31 | Permission to use, copy, modify, and distribute this software and its
|
---|
32 | documentation for any purpose and without fee is hereby granted,
|
---|
33 | provided that the above copyright notice appear in all copies and that
|
---|
34 | both that copyright notice and this permission notice appear in
|
---|
35 | supporting documentation, and that the name of Digital not be
|
---|
36 | used in advertising or publicity pertaining to distribution of the
|
---|
37 | software without specific, written prior permission.
|
---|
38 |
|
---|
39 | DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
---|
40 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
---|
41 | DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
---|
42 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
---|
43 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
---|
44 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
---|
45 | SOFTWARE.
|
---|
46 |
|
---|
47 | ******************************************************************/
|
---|
48 |
|
---|
49 | #ifndef WINDOW_H
|
---|
50 | #define WINDOW_H
|
---|
51 |
|
---|
52 | #include "misc.h"
|
---|
53 | #include "region.h"
|
---|
54 | #include "screenint.h"
|
---|
55 | #include "X11/Xproto.h"
|
---|
56 |
|
---|
57 | #define TOTALLY_OBSCURED 0
|
---|
58 | #define UNOBSCURED 1
|
---|
59 | #define OBSCURED 2
|
---|
60 |
|
---|
61 | #define VisibilityNotViewable 3
|
---|
62 |
|
---|
63 | /* return values for tree-walking callback procedures */
|
---|
64 | #define WT_STOPWALKING 0
|
---|
65 | #define WT_WALKCHILDREN 1
|
---|
66 | #define WT_DONTWALKCHILDREN 2
|
---|
67 | #define WT_NOMATCH 3
|
---|
68 | #define NullWindow ((WindowPtr) 0)
|
---|
69 |
|
---|
70 | typedef struct _BackingStore *BackingStorePtr;
|
---|
71 | typedef struct _Window *WindowPtr;
|
---|
72 |
|
---|
73 | typedef int (*VisitWindowProcPtr)(
|
---|
74 | #if NeedNestedPrototypes
|
---|
75 | WindowPtr /*pWin*/,
|
---|
76 | pointer /*data*/
|
---|
77 | #endif
|
---|
78 | );
|
---|
79 |
|
---|
80 | extern int TraverseTree(
|
---|
81 | #if NeedFunctionPrototypes
|
---|
82 | WindowPtr /*pWin*/,
|
---|
83 | VisitWindowProcPtr /*func*/,
|
---|
84 | pointer /*data*/
|
---|
85 | #endif
|
---|
86 | );
|
---|
87 |
|
---|
88 | extern int WalkTree(
|
---|
89 | #if NeedFunctionPrototypes
|
---|
90 | ScreenPtr /*pScreen*/,
|
---|
91 | VisitWindowProcPtr /*func*/,
|
---|
92 | pointer /*data*/
|
---|
93 | #endif
|
---|
94 | );
|
---|
95 |
|
---|
96 | extern WindowPtr AllocateWindow(
|
---|
97 | #if NeedFunctionPrototypes
|
---|
98 | ScreenPtr /*pScreen*/
|
---|
99 | #endif
|
---|
100 | );
|
---|
101 |
|
---|
102 | extern Bool CreateRootWindow(
|
---|
103 | #if NeedFunctionPrototypes
|
---|
104 | ScreenPtr /*pScreen*/
|
---|
105 | #endif
|
---|
106 | );
|
---|
107 |
|
---|
108 | extern void InitRootWindow(
|
---|
109 | #if NeedFunctionPrototypes
|
---|
110 | WindowPtr /*pWin*/
|
---|
111 | #endif
|
---|
112 | );
|
---|
113 |
|
---|
114 | extern void ClippedRegionFromBox(
|
---|
115 | #if NeedFunctionPrototypes
|
---|
116 | WindowPtr /*pWin*/,
|
---|
117 | RegionPtr /*Rgn*/,
|
---|
118 | int /*x*/,
|
---|
119 | int /*y*/,
|
---|
120 | int /*w*/,
|
---|
121 | int /*h*/
|
---|
122 | #endif
|
---|
123 | );
|
---|
124 |
|
---|
125 | extern WindowPtr RealChildHead(
|
---|
126 | #if NeedFunctionPrototypes
|
---|
127 | WindowPtr /*pWin*/
|
---|
128 | #endif
|
---|
129 | );
|
---|
130 |
|
---|
131 | extern WindowPtr CreateWindow(
|
---|
132 | #if NeedFunctionPrototypes
|
---|
133 | Window /*wid*/,
|
---|
134 | WindowPtr /*pParent*/,
|
---|
135 | int /*x*/,
|
---|
136 | int /*y*/,
|
---|
137 | unsigned int /*w*/,
|
---|
138 | unsigned int /*h*/,
|
---|
139 | unsigned int /*bw*/,
|
---|
140 | unsigned int /*class*/,
|
---|
141 | Mask /*vmask*/,
|
---|
142 | XID* /*vlist*/,
|
---|
143 | int /*depth*/,
|
---|
144 | ClientPtr /*client*/,
|
---|
145 | VisualID /*visual*/,
|
---|
146 | int* /*error*/
|
---|
147 | #endif
|
---|
148 | );
|
---|
149 |
|
---|
150 | extern int DeleteWindow(
|
---|
151 | #if NeedFunctionPrototypes
|
---|
152 | pointer /*pWin*/,
|
---|
153 | XID /*wid*/
|
---|
154 | #endif
|
---|
155 | );
|
---|
156 |
|
---|
157 | extern void DestroySubwindows(
|
---|
158 | #if NeedFunctionPrototypes
|
---|
159 | WindowPtr /*pWin*/,
|
---|
160 | ClientPtr /*client*/
|
---|
161 | #endif
|
---|
162 | );
|
---|
163 |
|
---|
164 | /* Quartz support on Mac OS X uses the HIToolbox
|
---|
165 | framework whose ChangeWindowAttributes function conflicts here. */
|
---|
166 | #ifdef __DARWIN__
|
---|
167 | #define ChangeWindowAttributes Darwin_X_ChangeWindowAttributes
|
---|
168 | #endif
|
---|
169 | extern int ChangeWindowAttributes(
|
---|
170 | #if NeedFunctionPrototypes
|
---|
171 | WindowPtr /*pWin*/,
|
---|
172 | Mask /*vmask*/,
|
---|
173 | XID* /*vlist*/,
|
---|
174 | ClientPtr /*client*/
|
---|
175 | #endif
|
---|
176 | );
|
---|
177 |
|
---|
178 | /* Quartz support on Mac OS X uses the HIToolbox
|
---|
179 | framework whose GetWindowAttributes function conflicts here. */
|
---|
180 | #ifdef __DARWIN__
|
---|
181 | #define GetWindowAttributes(w,c,x) Darwin_X_GetWindowAttributes(w,c,x)
|
---|
182 | extern void Darwin_X_GetWindowAttributes(
|
---|
183 | #else
|
---|
184 | extern void GetWindowAttributes(
|
---|
185 | #endif
|
---|
186 | #if NeedFunctionPrototypes
|
---|
187 | WindowPtr /*pWin*/,
|
---|
188 | ClientPtr /*client*/,
|
---|
189 | xGetWindowAttributesReply* /* wa */
|
---|
190 | #endif
|
---|
191 | );
|
---|
192 |
|
---|
193 | extern RegionPtr CreateUnclippedWinSize(
|
---|
194 | #if NeedFunctionPrototypes
|
---|
195 | WindowPtr /*pWin*/
|
---|
196 | #endif
|
---|
197 | );
|
---|
198 |
|
---|
199 | extern void GravityTranslate(
|
---|
200 | #if NeedFunctionPrototypes
|
---|
201 | int /*x*/,
|
---|
202 | int /*y*/,
|
---|
203 | int /*oldx*/,
|
---|
204 | int /*oldy*/,
|
---|
205 | int /*dw*/,
|
---|
206 | int /*dh*/,
|
---|
207 | unsigned /*gravity*/,
|
---|
208 | int* /*destx*/,
|
---|
209 | int* /*desty*/
|
---|
210 | #endif
|
---|
211 | );
|
---|
212 |
|
---|
213 | extern int ConfigureWindow(
|
---|
214 | #if NeedFunctionPrototypes
|
---|
215 | WindowPtr /*pWin*/,
|
---|
216 | Mask /*mask*/,
|
---|
217 | XID* /*vlist*/,
|
---|
218 | ClientPtr /*client*/
|
---|
219 | #endif
|
---|
220 | );
|
---|
221 |
|
---|
222 | extern int CirculateWindow(
|
---|
223 | #if NeedFunctionPrototypes
|
---|
224 | WindowPtr /*pParent*/,
|
---|
225 | int /*direction*/,
|
---|
226 | ClientPtr /*client*/
|
---|
227 | #endif
|
---|
228 | );
|
---|
229 |
|
---|
230 | extern int ReparentWindow(
|
---|
231 | #if NeedFunctionPrototypes
|
---|
232 | WindowPtr /*pWin*/,
|
---|
233 | WindowPtr /*pParent*/,
|
---|
234 | int /*x*/,
|
---|
235 | int /*y*/,
|
---|
236 | ClientPtr /*client*/
|
---|
237 | #endif
|
---|
238 | );
|
---|
239 |
|
---|
240 | extern int MapWindow(
|
---|
241 | #if NeedFunctionPrototypes
|
---|
242 | WindowPtr /*pWin*/,
|
---|
243 | ClientPtr /*client*/
|
---|
244 | #endif
|
---|
245 | );
|
---|
246 |
|
---|
247 | extern void MapSubwindows(
|
---|
248 | #if NeedFunctionPrototypes
|
---|
249 | WindowPtr /*pParent*/,
|
---|
250 | ClientPtr /*client*/
|
---|
251 | #endif
|
---|
252 | );
|
---|
253 |
|
---|
254 | extern int UnmapWindow(
|
---|
255 | #if NeedFunctionPrototypes
|
---|
256 | WindowPtr /*pWin*/,
|
---|
257 | Bool /*fromConfigure*/
|
---|
258 | #endif
|
---|
259 | );
|
---|
260 |
|
---|
261 | extern void UnmapSubwindows(
|
---|
262 | #if NeedFunctionPrototypes
|
---|
263 | WindowPtr /*pWin*/
|
---|
264 | #endif
|
---|
265 | );
|
---|
266 |
|
---|
267 | extern void HandleSaveSet(
|
---|
268 | #if NeedFunctionPrototypes
|
---|
269 | ClientPtr /*client*/
|
---|
270 | #endif
|
---|
271 | );
|
---|
272 |
|
---|
273 | extern Bool VisibleBoundingBoxFromPoint(
|
---|
274 | #if NeedFunctionPrototypes
|
---|
275 | WindowPtr /*pWin*/,
|
---|
276 | int /*x*/,
|
---|
277 | int /*y*/,
|
---|
278 | BoxPtr /*box*/
|
---|
279 | #endif
|
---|
280 | );
|
---|
281 |
|
---|
282 | extern Bool PointInWindowIsVisible(
|
---|
283 | #if NeedFunctionPrototypes
|
---|
284 | WindowPtr /*pWin*/,
|
---|
285 | int /*x*/,
|
---|
286 | int /*y*/
|
---|
287 | #endif
|
---|
288 | );
|
---|
289 |
|
---|
290 | extern RegionPtr NotClippedByChildren(
|
---|
291 | #if NeedFunctionPrototypes
|
---|
292 | WindowPtr /*pWin*/
|
---|
293 | #endif
|
---|
294 | );
|
---|
295 |
|
---|
296 | extern void SendVisibilityNotify(
|
---|
297 | #if NeedFunctionPrototypes
|
---|
298 | WindowPtr /*pWin*/
|
---|
299 | #endif
|
---|
300 | );
|
---|
301 |
|
---|
302 | extern void SaveScreens(
|
---|
303 | #if NeedFunctionPrototypes
|
---|
304 | int /*on*/,
|
---|
305 | int /*mode*/
|
---|
306 | #endif
|
---|
307 | );
|
---|
308 |
|
---|
309 | extern WindowPtr FindWindowWithOptional(
|
---|
310 | #if NeedFunctionPrototypes
|
---|
311 | WindowPtr /*w*/
|
---|
312 | #endif
|
---|
313 | );
|
---|
314 |
|
---|
315 | extern void CheckWindowOptionalNeed(
|
---|
316 | #if NeedFunctionPrototypes
|
---|
317 | WindowPtr /*w*/
|
---|
318 | #endif
|
---|
319 | );
|
---|
320 |
|
---|
321 | extern Bool MakeWindowOptional(
|
---|
322 | #if NeedFunctionPrototypes
|
---|
323 | WindowPtr /*pWin*/
|
---|
324 | #endif
|
---|
325 | );
|
---|
326 |
|
---|
327 | extern void DisposeWindowOptional(
|
---|
328 | #if NeedFunctionPrototypes
|
---|
329 | WindowPtr /*pWin*/
|
---|
330 | #endif
|
---|
331 | );
|
---|
332 |
|
---|
333 | extern WindowPtr MoveWindowInStack(
|
---|
334 | #if NeedFunctionPrototypes
|
---|
335 | WindowPtr /*pWin*/,
|
---|
336 | WindowPtr /*pNextSib*/
|
---|
337 | #endif
|
---|
338 | );
|
---|
339 |
|
---|
340 | void SetWinSize(
|
---|
341 | #if NeedFunctionPrototypes
|
---|
342 | WindowPtr /*pWin*/
|
---|
343 | #endif
|
---|
344 | );
|
---|
345 |
|
---|
346 | void SetBorderSize(
|
---|
347 | #if NeedFunctionPrototypes
|
---|
348 | WindowPtr /*pWin*/
|
---|
349 | #endif
|
---|
350 | );
|
---|
351 |
|
---|
352 | void ResizeChildrenWinSize(
|
---|
353 | #if NeedFunctionPrototypes
|
---|
354 | WindowPtr /*pWin*/,
|
---|
355 | int /*dx*/,
|
---|
356 | int /*dy*/,
|
---|
357 | int /*dw*/,
|
---|
358 | int /*dh*/
|
---|
359 | #endif
|
---|
360 | );
|
---|
361 |
|
---|
362 | #endif /* WINDOW_H */
|
---|