1706f2543Smrg/* 2706f2543Smrg 3706f2543SmrgCopyright 1993 by Davor Matic 4706f2543Smrg 5706f2543SmrgPermission to use, copy, modify, distribute, and sell this software 6706f2543Smrgand its documentation for any purpose is hereby granted without fee, 7706f2543Smrgprovided that the above copyright notice appear in all copies and that 8706f2543Smrgboth that copyright notice and this permission notice appear in 9706f2543Smrgsupporting documentation. Davor Matic makes no representations about 10706f2543Smrgthe suitability of this software for any purpose. It is provided "as 11706f2543Smrgis" without express or implied warranty. 12706f2543Smrg 13706f2543Smrg*/ 14706f2543Smrg 15706f2543Smrg#ifndef XNESTWINDOW_H 16706f2543Smrg#define XNESTWINDOW_H 17706f2543Smrg 18706f2543Smrgtypedef struct { 19706f2543Smrg Window window; 20706f2543Smrg Window parent; 21706f2543Smrg int x; 22706f2543Smrg int y; 23706f2543Smrg unsigned int width; 24706f2543Smrg unsigned int height; 25706f2543Smrg unsigned int border_width; 26706f2543Smrg Window sibling_above; 27706f2543Smrg RegionPtr bounding_shape; 28706f2543Smrg RegionPtr clip_shape; 29706f2543Smrg} xnestPrivWin; 30706f2543Smrg 31706f2543Smrgtypedef struct { 32706f2543Smrg WindowPtr pWin; 33706f2543Smrg Window window; 34706f2543Smrg} xnestWindowMatch; 35706f2543Smrg 36706f2543Smrgextern DevPrivateKeyRec xnestWindowPrivateKeyRec; 37706f2543Smrg#define xnestWindowPrivateKey (&xnestWindowPrivateKeyRec) 38706f2543Smrg 39706f2543Smrg#define xnestWindowPriv(pWin) ((xnestPrivWin *) \ 40706f2543Smrg dixLookupPrivate(&(pWin)->devPrivates, xnestWindowPrivateKey)) 41706f2543Smrg 42706f2543Smrg#define xnestWindow(pWin) (xnestWindowPriv(pWin)->window) 43706f2543Smrg 44706f2543Smrg#define xnestWindowParent(pWin) \ 45706f2543Smrg ((pWin)->parent ? \ 46706f2543Smrg xnestWindow((pWin)->parent) : \ 47706f2543Smrg xnestDefaultWindows[pWin->drawable.pScreen->myNum]) 48706f2543Smrg 49706f2543Smrg#define xnestWindowSiblingAbove(pWin) \ 50706f2543Smrg ((pWin)->prevSib ? xnestWindow((pWin)->prevSib) : None) 51706f2543Smrg 52706f2543Smrg#define xnestWindowSiblingBelow(pWin) \ 53706f2543Smrg ((pWin)->nextSib ? xnestWindow((pWin)->nextSib) : None) 54706f2543Smrg 55706f2543Smrg#define CWParent CWSibling 56706f2543Smrg#define CWStackingOrder CWStackMode 57706f2543Smrg 58706f2543SmrgWindowPtr xnestWindowPtr(Window window); 59706f2543SmrgBool xnestCreateWindow(WindowPtr pWin); 60706f2543SmrgBool xnestDestroyWindow(WindowPtr pWin); 61706f2543SmrgBool xnestPositionWindow(WindowPtr pWin, int x, int y); 62706f2543Smrgvoid xnestConfigureWindow(WindowPtr pWin, unsigned int mask); 63706f2543SmrgBool xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask); 64706f2543SmrgBool xnestRealizeWindow(WindowPtr pWin); 65706f2543SmrgBool xnestUnrealizeWindow(WindowPtr pWin); 66706f2543Smrgvoid xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion); 67706f2543Smrgvoid xnestClipNotify(WindowPtr pWin, int dx, int dy); 68706f2543Smrgvoid xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, 69706f2543Smrg RegionPtr other_exposed); 70706f2543Smrgvoid xnestSetShape(WindowPtr pWin, int kind); 71706f2543Smrgvoid xnestShapeWindow(WindowPtr pWin); 72706f2543Smrg 73706f2543Smrg#endif /* XNESTWINDOW_H */ 74