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 | /* $XFree86$ */
|
---|
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 | WindowPtr /*pWin*/,
|
---|
75 | pointer /*data*/);
|
---|
76 |
|
---|
77 | extern int TraverseTree(
|
---|
78 | WindowPtr /*pWin*/,
|
---|
79 | VisitWindowProcPtr /*func*/,
|
---|
80 | pointer /*data*/);
|
---|
81 |
|
---|
82 | extern int WalkTree(
|
---|
83 | ScreenPtr /*pScreen*/,
|
---|
84 | VisitWindowProcPtr /*func*/,
|
---|
85 | pointer /*data*/);
|
---|
86 |
|
---|
87 | extern WindowPtr AllocateWindow(
|
---|
88 | ScreenPtr /*pScreen*/);
|
---|
89 |
|
---|
90 | extern Bool CreateRootWindow(
|
---|
91 | ScreenPtr /*pScreen*/);
|
---|
92 |
|
---|
93 | extern void InitRootWindow(
|
---|
94 | WindowPtr /*pWin*/);
|
---|
95 |
|
---|
96 | extern void ClippedRegionFromBox(
|
---|
97 | WindowPtr /*pWin*/,
|
---|
98 | RegionPtr /*Rgn*/,
|
---|
99 | int /*x*/,
|
---|
100 | int /*y*/,
|
---|
101 | int /*w*/,
|
---|
102 | int /*h*/);
|
---|
103 |
|
---|
104 | typedef WindowPtr (* RealChildHeadProc) (WindowPtr pWin);
|
---|
105 |
|
---|
106 | void RegisterRealChildHeadProc (RealChildHeadProc proc);
|
---|
107 |
|
---|
108 | extern WindowPtr RealChildHead(
|
---|
109 | WindowPtr /*pWin*/);
|
---|
110 |
|
---|
111 | extern WindowPtr CreateWindow(
|
---|
112 | Window /*wid*/,
|
---|
113 | WindowPtr /*pParent*/,
|
---|
114 | int /*x*/,
|
---|
115 | int /*y*/,
|
---|
116 | unsigned int /*w*/,
|
---|
117 | unsigned int /*h*/,
|
---|
118 | unsigned int /*bw*/,
|
---|
119 | unsigned int /*class*/,
|
---|
120 | Mask /*vmask*/,
|
---|
121 | XID* /*vlist*/,
|
---|
122 | int /*depth*/,
|
---|
123 | ClientPtr /*client*/,
|
---|
124 | VisualID /*visual*/,
|
---|
125 | int* /*error*/);
|
---|
126 |
|
---|
127 | extern int DeleteWindow(
|
---|
128 | pointer /*pWin*/,
|
---|
129 | XID /*wid*/);
|
---|
130 |
|
---|
131 | extern void DestroySubwindows(
|
---|
132 | WindowPtr /*pWin*/,
|
---|
133 | ClientPtr /*client*/);
|
---|
134 |
|
---|
135 | /* Quartz support on Mac OS X uses the HIToolbox
|
---|
136 | framework whose ChangeWindowAttributes function conflicts here. */
|
---|
137 | #ifdef __DARWIN__
|
---|
138 | #define ChangeWindowAttributes Darwin_X_ChangeWindowAttributes
|
---|
139 | #endif
|
---|
140 | extern int ChangeWindowAttributes(
|
---|
141 | WindowPtr /*pWin*/,
|
---|
142 | Mask /*vmask*/,
|
---|
143 | XID* /*vlist*/,
|
---|
144 | ClientPtr /*client*/);
|
---|
145 |
|
---|
146 | /* Quartz support on Mac OS X uses the HIToolbox
|
---|
147 | framework whose GetWindowAttributes function conflicts here. */
|
---|
148 | #ifdef __DARWIN__
|
---|
149 | #define GetWindowAttributes(w,c,x) Darwin_X_GetWindowAttributes(w,c,x)
|
---|
150 | extern void Darwin_X_GetWindowAttributes(
|
---|
151 | #else
|
---|
152 | extern void GetWindowAttributes(
|
---|
153 | #endif
|
---|
154 | WindowPtr /*pWin*/,
|
---|
155 | ClientPtr /*client*/,
|
---|
156 | xGetWindowAttributesReply* /* wa */);
|
---|
157 |
|
---|
158 | extern RegionPtr CreateUnclippedWinSize(
|
---|
159 | WindowPtr /*pWin*/);
|
---|
160 |
|
---|
161 | extern void GravityTranslate(
|
---|
162 | int /*x*/,
|
---|
163 | int /*y*/,
|
---|
164 | int /*oldx*/,
|
---|
165 | int /*oldy*/,
|
---|
166 | int /*dw*/,
|
---|
167 | int /*dh*/,
|
---|
168 | unsigned /*gravity*/,
|
---|
169 | int* /*destx*/,
|
---|
170 | int* /*desty*/);
|
---|
171 |
|
---|
172 | extern int ConfigureWindow(
|
---|
173 | WindowPtr /*pWin*/,
|
---|
174 | Mask /*mask*/,
|
---|
175 | XID* /*vlist*/,
|
---|
176 | ClientPtr /*client*/);
|
---|
177 |
|
---|
178 | extern int CirculateWindow(
|
---|
179 | WindowPtr /*pParent*/,
|
---|
180 | int /*direction*/,
|
---|
181 | ClientPtr /*client*/);
|
---|
182 |
|
---|
183 | extern int ReparentWindow(
|
---|
184 | WindowPtr /*pWin*/,
|
---|
185 | WindowPtr /*pParent*/,
|
---|
186 | int /*x*/,
|
---|
187 | int /*y*/,
|
---|
188 | ClientPtr /*client*/);
|
---|
189 |
|
---|
190 | extern int MapWindow(
|
---|
191 | WindowPtr /*pWin*/,
|
---|
192 | ClientPtr /*client*/);
|
---|
193 |
|
---|
194 | extern void MapSubwindows(
|
---|
195 | WindowPtr /*pParent*/,
|
---|
196 | ClientPtr /*client*/);
|
---|
197 |
|
---|
198 | extern int UnmapWindow(
|
---|
199 | WindowPtr /*pWin*/,
|
---|
200 | Bool /*fromConfigure*/);
|
---|
201 |
|
---|
202 | extern void UnmapSubwindows(
|
---|
203 | WindowPtr /*pWin*/);
|
---|
204 |
|
---|
205 | extern void HandleSaveSet(
|
---|
206 | ClientPtr /*client*/);
|
---|
207 |
|
---|
208 | extern Bool VisibleBoundingBoxFromPoint(
|
---|
209 | WindowPtr /*pWin*/,
|
---|
210 | int /*x*/,
|
---|
211 | int /*y*/,
|
---|
212 | BoxPtr /*box*/);
|
---|
213 |
|
---|
214 | extern Bool PointInWindowIsVisible(
|
---|
215 | WindowPtr /*pWin*/,
|
---|
216 | int /*x*/,
|
---|
217 | int /*y*/);
|
---|
218 |
|
---|
219 | extern RegionPtr NotClippedByChildren(
|
---|
220 | WindowPtr /*pWin*/);
|
---|
221 |
|
---|
222 | extern void SendVisibilityNotify(
|
---|
223 | WindowPtr /*pWin*/);
|
---|
224 |
|
---|
225 | extern void 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 void DisposeWindowOptional(
|
---|
239 | WindowPtr /*pWin*/);
|
---|
240 |
|
---|
241 | extern WindowPtr MoveWindowInStack(
|
---|
242 | WindowPtr /*pWin*/,
|
---|
243 | WindowPtr /*pNextSib*/);
|
---|
244 |
|
---|
245 | void SetWinSize(
|
---|
246 | WindowPtr /*pWin*/);
|
---|
247 |
|
---|
248 | void SetBorderSize(
|
---|
249 | WindowPtr /*pWin*/);
|
---|
250 |
|
---|
251 | void ResizeChildrenWinSize(
|
---|
252 | WindowPtr /*pWin*/,
|
---|
253 | int /*dx*/,
|
---|
254 | int /*dy*/,
|
---|
255 | int /*dw*/,
|
---|
256 | int /*dh*/);
|
---|
257 |
|
---|
258 | extern void ShapeExtensionInit(void);
|
---|
259 |
|
---|
260 | extern void SendShapeNotify(
|
---|
261 | WindowPtr /* pWin */,
|
---|
262 | int /* which */ );
|
---|
263 |
|
---|
264 | extern RegionPtr CreateBoundingShape(
|
---|
265 | WindowPtr /* pWin */ );
|
---|
266 |
|
---|
267 | extern RegionPtr CreateClipShape(
|
---|
268 | WindowPtr /* pWin */ );
|
---|
269 |
|
---|
270 | extern void DisableMapUnmapEvents(
|
---|
271 | WindowPtr /* pWin */ );
|
---|
272 | extern void EnableMapUnmapEvents(
|
---|
273 | WindowPtr /* pWin */ );
|
---|
274 | extern Bool MapUnmapEventsEnabled(
|
---|
275 | WindowPtr /* pWin */ );
|
---|
276 |
|
---|
277 | #endif /* WINDOW_H */
|
---|