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 | /* $XFree86$ */
|
---|
49 |
|
---|
50 | #ifndef WINDOW_H
|
---|
51 | #define WINDOW_H
|
---|
52 |
|
---|
53 | #include "misc.h"
|
---|
54 | #include "region.h"
|
---|
55 | #include "screenint.h"
|
---|
56 | #include <X11/Xproto.h>
|
---|
57 |
|
---|
58 | #define TOTALLY_OBSCURED 0
|
---|
59 | #define UNOBSCURED 1
|
---|
60 | #define OBSCURED 2
|
---|
61 |
|
---|
62 | #define VisibilityNotViewable 3
|
---|
63 |
|
---|
64 | /* return values for tree-walking callback procedures */
|
---|
65 | #define WT_STOPWALKING 0
|
---|
66 | #define WT_WALKCHILDREN 1
|
---|
67 | #define WT_DONTWALKCHILDREN 2
|
---|
68 | #define WT_NOMATCH 3
|
---|
69 | #define NullWindow ((WindowPtr) 0)
|
---|
70 |
|
---|
71 | typedef struct _BackingStore *BackingStorePtr;
|
---|
72 | typedef struct _Window *WindowPtr;
|
---|
73 |
|
---|
74 | typedef int (*VisitWindowProcPtr)(
|
---|
75 | WindowPtr /*pWin*/,
|
---|
76 | pointer /*data*/);
|
---|
77 |
|
---|
78 | extern int TraverseTree(
|
---|
79 | WindowPtr /*pWin*/,
|
---|
80 | VisitWindowProcPtr /*func*/,
|
---|
81 | pointer /*data*/);
|
---|
82 |
|
---|
83 | extern int WalkTree(
|
---|
84 | ScreenPtr /*pScreen*/,
|
---|
85 | VisitWindowProcPtr /*func*/,
|
---|
86 | pointer /*data*/);
|
---|
87 |
|
---|
88 | extern WindowPtr AllocateWindow(
|
---|
89 | ScreenPtr /*pScreen*/);
|
---|
90 |
|
---|
91 | extern Bool CreateRootWindow(
|
---|
92 | ScreenPtr /*pScreen*/);
|
---|
93 |
|
---|
94 | extern void InitRootWindow(
|
---|
95 | WindowPtr /*pWin*/);
|
---|
96 |
|
---|
97 | extern void ClippedRegionFromBox(
|
---|
98 | WindowPtr /*pWin*/,
|
---|
99 | RegionPtr /*Rgn*/,
|
---|
100 | int /*x*/,
|
---|
101 | int /*y*/,
|
---|
102 | int /*w*/,
|
---|
103 | int /*h*/);
|
---|
104 |
|
---|
105 | extern WindowPtr RealChildHead(
|
---|
106 | WindowPtr /*pWin*/);
|
---|
107 |
|
---|
108 | extern WindowPtr CreateWindow(
|
---|
109 | Window /*wid*/,
|
---|
110 | WindowPtr /*pParent*/,
|
---|
111 | int /*x*/,
|
---|
112 | int /*y*/,
|
---|
113 | unsigned int /*w*/,
|
---|
114 | unsigned int /*h*/,
|
---|
115 | unsigned int /*bw*/,
|
---|
116 | unsigned int /*class*/,
|
---|
117 | Mask /*vmask*/,
|
---|
118 | XID* /*vlist*/,
|
---|
119 | int /*depth*/,
|
---|
120 | ClientPtr /*client*/,
|
---|
121 | VisualID /*visual*/,
|
---|
122 | int* /*error*/);
|
---|
123 |
|
---|
124 | extern int DeleteWindow(
|
---|
125 | pointer /*pWin*/,
|
---|
126 | XID /*wid*/);
|
---|
127 |
|
---|
128 | extern void DestroySubwindows(
|
---|
129 | WindowPtr /*pWin*/,
|
---|
130 | ClientPtr /*client*/);
|
---|
131 |
|
---|
132 | /* Quartz support on Mac OS X uses the HIToolbox
|
---|
133 | framework whose ChangeWindowAttributes function conflicts here. */
|
---|
134 | #ifdef __DARWIN__
|
---|
135 | #define ChangeWindowAttributes Darwin_X_ChangeWindowAttributes
|
---|
136 | #endif
|
---|
137 | extern int ChangeWindowAttributes(
|
---|
138 | WindowPtr /*pWin*/,
|
---|
139 | Mask /*vmask*/,
|
---|
140 | XID* /*vlist*/,
|
---|
141 | ClientPtr /*client*/);
|
---|
142 |
|
---|
143 | /* Quartz support on Mac OS X uses the HIToolbox
|
---|
144 | framework whose GetWindowAttributes function conflicts here. */
|
---|
145 | #ifdef __DARWIN__
|
---|
146 | #define GetWindowAttributes(w,c,x) Darwin_X_GetWindowAttributes(w,c,x)
|
---|
147 | extern void Darwin_X_GetWindowAttributes(
|
---|
148 | #else
|
---|
149 | extern void GetWindowAttributes(
|
---|
150 | #endif
|
---|
151 | WindowPtr /*pWin*/,
|
---|
152 | ClientPtr /*client*/,
|
---|
153 | xGetWindowAttributesReply* /* wa */);
|
---|
154 |
|
---|
155 | extern RegionPtr CreateUnclippedWinSize(
|
---|
156 | WindowPtr /*pWin*/);
|
---|
157 |
|
---|
158 | extern void GravityTranslate(
|
---|
159 | int /*x*/,
|
---|
160 | int /*y*/,
|
---|
161 | int /*oldx*/,
|
---|
162 | int /*oldy*/,
|
---|
163 | int /*dw*/,
|
---|
164 | int /*dh*/,
|
---|
165 | unsigned /*gravity*/,
|
---|
166 | int* /*destx*/,
|
---|
167 | int* /*desty*/);
|
---|
168 |
|
---|
169 | extern int ConfigureWindow(
|
---|
170 | WindowPtr /*pWin*/,
|
---|
171 | Mask /*mask*/,
|
---|
172 | XID* /*vlist*/,
|
---|
173 | ClientPtr /*client*/);
|
---|
174 |
|
---|
175 | extern int CirculateWindow(
|
---|
176 | WindowPtr /*pParent*/,
|
---|
177 | int /*direction*/,
|
---|
178 | ClientPtr /*client*/);
|
---|
179 |
|
---|
180 | extern int ReparentWindow(
|
---|
181 | WindowPtr /*pWin*/,
|
---|
182 | WindowPtr /*pParent*/,
|
---|
183 | int /*x*/,
|
---|
184 | int /*y*/,
|
---|
185 | ClientPtr /*client*/);
|
---|
186 |
|
---|
187 | extern int MapWindow(
|
---|
188 | WindowPtr /*pWin*/,
|
---|
189 | ClientPtr /*client*/);
|
---|
190 |
|
---|
191 | extern void MapSubwindows(
|
---|
192 | WindowPtr /*pParent*/,
|
---|
193 | ClientPtr /*client*/);
|
---|
194 |
|
---|
195 | extern int UnmapWindow(
|
---|
196 | WindowPtr /*pWin*/,
|
---|
197 | Bool /*fromConfigure*/);
|
---|
198 |
|
---|
199 | extern void UnmapSubwindows(
|
---|
200 | WindowPtr /*pWin*/);
|
---|
201 |
|
---|
202 | extern void HandleSaveSet(
|
---|
203 | ClientPtr /*client*/);
|
---|
204 |
|
---|
205 | extern Bool VisibleBoundingBoxFromPoint(
|
---|
206 | WindowPtr /*pWin*/,
|
---|
207 | int /*x*/,
|
---|
208 | int /*y*/,
|
---|
209 | BoxPtr /*box*/);
|
---|
210 |
|
---|
211 | extern Bool PointInWindowIsVisible(
|
---|
212 | WindowPtr /*pWin*/,
|
---|
213 | int /*x*/,
|
---|
214 | int /*y*/);
|
---|
215 |
|
---|
216 | extern RegionPtr NotClippedByChildren(
|
---|
217 | WindowPtr /*pWin*/);
|
---|
218 |
|
---|
219 | extern void SendVisibilityNotify(
|
---|
220 | WindowPtr /*pWin*/);
|
---|
221 |
|
---|
222 | extern void SaveScreens(
|
---|
223 | int /*on*/,
|
---|
224 | int /*mode*/);
|
---|
225 |
|
---|
226 | extern WindowPtr FindWindowWithOptional(
|
---|
227 | WindowPtr /*w*/);
|
---|
228 |
|
---|
229 | extern void CheckWindowOptionalNeed(
|
---|
230 | WindowPtr /*w*/);
|
---|
231 |
|
---|
232 | extern Bool MakeWindowOptional(
|
---|
233 | WindowPtr /*pWin*/);
|
---|
234 |
|
---|
235 | extern void DisposeWindowOptional(
|
---|
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 SendShapeNotify(
|
---|
256 | WindowPtr /* pWin */,
|
---|
257 | int /* which */ );
|
---|
258 |
|
---|
259 | extern RegionPtr CreateBoundingShape(
|
---|
260 | WindowPtr /* pWin */ );
|
---|
261 |
|
---|
262 | extern RegionPtr CreateClipShape(
|
---|
263 | WindowPtr /* pWin */ );
|
---|
264 |
|
---|
265 | #endif /* WINDOW_H */
|
---|