65fea56f17cd614bc8908264df980a62e1931468vboxsync/***********************************************************
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCopyright 1987, 1998 The Open Group
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncPermission to use, copy, modify, distribute, and sell this software and its
65fea56f17cd614bc8908264df980a62e1931468vboxsyncdocumentation for any purpose is hereby granted without fee, provided that
65fea56f17cd614bc8908264df980a62e1931468vboxsyncthe above copyright notice appear in all copies and that both that
65fea56f17cd614bc8908264df980a62e1931468vboxsynccopyright notice and this permission notice appear in supporting
65fea56f17cd614bc8908264df980a62e1931468vboxsyncdocumentation.
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncThe above copyright notice and this permission notice shall be included in
65fea56f17cd614bc8908264df980a62e1931468vboxsyncall copies or substantial portions of the Software.
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
65fea56f17cd614bc8908264df980a62e1931468vboxsyncIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
65fea56f17cd614bc8908264df980a62e1931468vboxsyncFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
65fea56f17cd614bc8908264df980a62e1931468vboxsyncOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
65fea56f17cd614bc8908264df980a62e1931468vboxsyncAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncExcept as contained in this notice, the name of The Open Group shall not be
65fea56f17cd614bc8908264df980a62e1931468vboxsyncused in advertising or otherwise to promote the sale, use or other dealings
65fea56f17cd614bc8908264df980a62e1931468vboxsyncin this Software without prior written authorization from The Open Group.
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCopyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync All Rights Reserved
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncPermission to use, copy, modify, and distribute this software and its
65fea56f17cd614bc8908264df980a62e1931468vboxsyncdocumentation for any purpose and without fee is hereby granted,
65fea56f17cd614bc8908264df980a62e1931468vboxsyncprovided that the above copyright notice appear in all copies and that
65fea56f17cd614bc8908264df980a62e1931468vboxsyncboth that copyright notice and this permission notice appear in
65fea56f17cd614bc8908264df980a62e1931468vboxsyncsupporting documentation, and that the name of Digital not be
65fea56f17cd614bc8908264df980a62e1931468vboxsyncused in advertising or publicity pertaining to distribution of the
65fea56f17cd614bc8908264df980a62e1931468vboxsyncsoftware without specific, written prior permission.
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
65fea56f17cd614bc8908264df980a62e1931468vboxsyncALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
65fea56f17cd614bc8908264df980a62e1931468vboxsyncDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
65fea56f17cd614bc8908264df980a62e1931468vboxsyncANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
65fea56f17cd614bc8908264df980a62e1931468vboxsyncWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
65fea56f17cd614bc8908264df980a62e1931468vboxsyncARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
65fea56f17cd614bc8908264df980a62e1931468vboxsyncSOFTWARE.
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync******************************************************************/
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifndef WINDOW_H
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define WINDOW_H
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "misc.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "region.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "screenint.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include <X11/Xproto.h>
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define TOTALLY_OBSCURED 0
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define UNOBSCURED 1
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define OBSCURED 2
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define VisibilityNotViewable 3
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* return values for tree-walking callback procedures */
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define WT_STOPWALKING 0
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define WT_WALKCHILDREN 1
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define WT_DONTWALKCHILDREN 2
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define WT_NOMATCH 3
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define NullWindow ((WindowPtr) 0)
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* Forward declaration, we can't include input.h here */
65fea56f17cd614bc8908264df980a62e1931468vboxsyncstruct _DeviceIntRec;
65fea56f17cd614bc8908264df980a62e1931468vboxsyncstruct _Cursor;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct _BackingStore *BackingStorePtr;
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct _Window *WindowPtr;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef int (*VisitWindowProcPtr) (WindowPtr /*pWin */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync pointer /*data */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT int TraverseTree(WindowPtr /*pWin */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync VisitWindowProcPtr /*func */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync pointer /*data */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT int WalkTree(ScreenPtr /*pScreen */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync VisitWindowProcPtr /*func */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync pointer /*data */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool CreateRootWindow(ScreenPtr /*pScreen */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void InitRootWindow(WindowPtr /*pWin */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef WindowPtr (*RealChildHeadProc) (WindowPtr pWin);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void RegisterRealChildHeadProc(RealChildHeadProc proc);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT WindowPtr RealChildHead(WindowPtr /*pWin */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT WindowPtr CreateWindow(Window /*wid */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync WindowPtr /*pParent */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int /*x */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int /*y */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned int /*w */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned int /*h */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned int /*bw */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned int /*class */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync Mask /*vmask */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync XID * /*vlist */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int /*depth */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync ClientPtr /*client */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync VisualID /*visual */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int * /*error */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT int DeleteWindow(pointer /*pWin */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync XID /*wid */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT int DestroySubwindows(WindowPtr /*pWin */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync ClientPtr /*client */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* Quartz support on Mac OS X uses the HIToolbox
65fea56f17cd614bc8908264df980a62e1931468vboxsync framework whose ChangeWindowAttributes function conflicts here. */
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifdef __APPLE__
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define ChangeWindowAttributes Darwin_X_ChangeWindowAttributes
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT int ChangeWindowAttributes(WindowPtr /*pWin */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync Mask /*vmask */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync XID * /*vlist */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync ClientPtr /*client */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT int ChangeWindowDeviceCursor(WindowPtr /*pWin */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync struct _DeviceIntRec * /*pDev */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync struct _Cursor * /*pCursor */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT struct _Cursor *WindowGetDeviceCursor(WindowPtr /*pWin */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync struct _DeviceIntRec *
65fea56f17cd614bc8908264df980a62e1931468vboxsync /*pDev */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* Quartz support on Mac OS X uses the HIToolbox
65fea56f17cd614bc8908264df980a62e1931468vboxsync framework whose GetWindowAttributes function conflicts here. */
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifdef __APPLE__
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define GetWindowAttributes(w,c,x) Darwin_X_GetWindowAttributes(w,c,x)
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern void Darwin_X_GetWindowAttributes(
65fea56f17cd614bc8908264df980a62e1931468vboxsync#else
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void GetWindowAttributes(
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync WindowPtr /*pWin */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync ClientPtr /*client */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync xGetWindowAttributesReply *
65fea56f17cd614bc8908264df980a62e1931468vboxsync /* wa */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void GravityTranslate(int /*x */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int /*y */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int /*oldx */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int /*oldy */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int /*dw */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int /*dh */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned /*gravity */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int * /*destx */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int * /*desty */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT int ConfigureWindow(WindowPtr /*pWin */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync Mask /*mask */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync XID * /*vlist */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync ClientPtr /*client */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT int CirculateWindow(WindowPtr /*pParent */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int /*direction */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync ClientPtr /*client */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT int ReparentWindow(WindowPtr /*pWin */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync WindowPtr /*pParent */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int /*x */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int /*y */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync ClientPtr /*client */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT int MapWindow(WindowPtr /*pWin */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync ClientPtr /*client */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void MapSubwindows(WindowPtr /*pParent */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync ClientPtr /*client */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT int UnmapWindow(WindowPtr /*pWin */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync Bool /*fromConfigure */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void UnmapSubwindows(WindowPtr /*pWin */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void HandleSaveSet(ClientPtr /*client */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool PointInWindowIsVisible(WindowPtr /*pWin */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int /*x */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int /*y */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT RegionPtr NotClippedByChildren(WindowPtr /*pWin */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void SendVisibilityNotify(WindowPtr /*pWin */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT int dixSaveScreens(ClientPtr client, int on, int mode);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT int SaveScreens(int on, int mode);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT WindowPtr FindWindowWithOptional(WindowPtr /*w */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void CheckWindowOptionalNeed(WindowPtr /*w */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT Bool MakeWindowOptional(WindowPtr /*pWin */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT WindowPtr MoveWindowInStack(WindowPtr /*pWin */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync WindowPtr /*pNextSib */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void SetWinSize(WindowPtr /*pWin */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void SetBorderSize(WindowPtr /*pWin */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void ResizeChildrenWinSize(WindowPtr /*pWin */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int /*dx */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int /*dy */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int /*dw */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int /*dh */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void SendShapeNotify(WindowPtr /* pWin */ ,
65fea56f17cd614bc8908264df980a62e1931468vboxsync int /* which */);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT RegionPtr CreateBoundingShape(WindowPtr /* pWin */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT RegionPtr CreateClipShape(WindowPtr /* pWin */ );
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void SetRootClip(ScreenPtr pScreen, Bool enable);
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT void PrintWindowTree(void);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncextern _X_EXPORT VisualPtr WindowGetVisual(WindowPtr /*pWin*/);
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif /* WINDOW_H */