1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun 3*4882a593Smuzhiyun Copyright 1993 by Davor Matic 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun Permission to use, copy, modify, distribute, and sell this software 6*4882a593Smuzhiyun and its documentation for any purpose is hereby granted without fee, 7*4882a593Smuzhiyun provided that the above copyright notice appear in all copies and that 8*4882a593Smuzhiyun both that copyright notice and this permission notice appear in 9*4882a593Smuzhiyun supporting documentation. Davor Matic makes no representations about 10*4882a593Smuzhiyun the suitability of this software for any purpose. It is provided "as 11*4882a593Smuzhiyun is" without express or implied warranty. 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun */ 14*4882a593Smuzhiyun 15*4882a593Smuzhiyun #ifndef XNESTWINDOW_H 16*4882a593Smuzhiyun #define XNESTWINDOW_H 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun typedef struct { 19*4882a593Smuzhiyun Window window; 20*4882a593Smuzhiyun Window parent; 21*4882a593Smuzhiyun int x; 22*4882a593Smuzhiyun int y; 23*4882a593Smuzhiyun unsigned int width; 24*4882a593Smuzhiyun unsigned int height; 25*4882a593Smuzhiyun unsigned int border_width; 26*4882a593Smuzhiyun Window sibling_above; 27*4882a593Smuzhiyun RegionPtr bounding_shape; 28*4882a593Smuzhiyun RegionPtr clip_shape; 29*4882a593Smuzhiyun } xnestPrivWin; 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun typedef struct { 32*4882a593Smuzhiyun WindowPtr pWin; 33*4882a593Smuzhiyun Window window; 34*4882a593Smuzhiyun } xnestWindowMatch; 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun extern DevPrivateKeyRec xnestWindowPrivateKeyRec; 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun #define xnestWindowPrivateKey (&xnestWindowPrivateKeyRec) 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun #define xnestWindowPriv(pWin) ((xnestPrivWin *) \ 41*4882a593Smuzhiyun dixLookupPrivate(&(pWin)->devPrivates, xnestWindowPrivateKey)) 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun #define xnestWindow(pWin) (xnestWindowPriv(pWin)->window) 44*4882a593Smuzhiyun 45*4882a593Smuzhiyun #define xnestWindowParent(pWin) \ 46*4882a593Smuzhiyun ((pWin)->parent ? \ 47*4882a593Smuzhiyun xnestWindow((pWin)->parent) : \ 48*4882a593Smuzhiyun xnestDefaultWindows[pWin->drawable.pScreen->myNum]) 49*4882a593Smuzhiyun 50*4882a593Smuzhiyun #define xnestWindowSiblingAbove(pWin) \ 51*4882a593Smuzhiyun ((pWin)->prevSib ? xnestWindow((pWin)->prevSib) : None) 52*4882a593Smuzhiyun 53*4882a593Smuzhiyun #define xnestWindowSiblingBelow(pWin) \ 54*4882a593Smuzhiyun ((pWin)->nextSib ? xnestWindow((pWin)->nextSib) : None) 55*4882a593Smuzhiyun 56*4882a593Smuzhiyun #define CWParent CWSibling 57*4882a593Smuzhiyun #define CWStackingOrder CWStackMode 58*4882a593Smuzhiyun 59*4882a593Smuzhiyun WindowPtr xnestWindowPtr(Window window); 60*4882a593Smuzhiyun Bool xnestCreateWindow(WindowPtr pWin); 61*4882a593Smuzhiyun Bool xnestDestroyWindow(WindowPtr pWin); 62*4882a593Smuzhiyun Bool xnestPositionWindow(WindowPtr pWin, int x, int y); 63*4882a593Smuzhiyun void xnestConfigureWindow(WindowPtr pWin, unsigned int mask); 64*4882a593Smuzhiyun Bool xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask); 65*4882a593Smuzhiyun Bool xnestRealizeWindow(WindowPtr pWin); 66*4882a593Smuzhiyun Bool xnestUnrealizeWindow(WindowPtr pWin); 67*4882a593Smuzhiyun void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion); 68*4882a593Smuzhiyun void xnestClipNotify(WindowPtr pWin, int dx, int dy); 69*4882a593Smuzhiyun void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn); 70*4882a593Smuzhiyun void xnestSetShape(WindowPtr pWin, int kind); 71*4882a593Smuzhiyun void xnestShapeWindow(WindowPtr pWin); 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun #endif /* XNESTWINDOW_H */ 74