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