XNWindow.h revision 4642e01f
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 DevPrivateKey xnestWindowPrivateKey; 37 38#define xnestWindowPriv(pWin) ((xnestPrivWin *) \ 39 dixLookupPrivate(&(pWin)->devPrivates, xnestWindowPrivateKey)) 40 41#define xnestWindow(pWin) (xnestWindowPriv(pWin)->window) 42 43#define xnestWindowParent(pWin) \ 44 ((pWin)->parent ? \ 45 xnestWindow((pWin)->parent) : \ 46 xnestDefaultWindows[pWin->drawable.pScreen->myNum]) 47 48#define xnestWindowSiblingAbove(pWin) \ 49 ((pWin)->prevSib ? xnestWindow((pWin)->prevSib) : None) 50 51#define xnestWindowSiblingBelow(pWin) \ 52 ((pWin)->nextSib ? xnestWindow((pWin)->nextSib) : None) 53 54#define CWParent CWSibling 55#define CWStackingOrder CWStackMode 56 57WindowPtr xnestWindowPtr(Window window); 58Bool xnestCreateWindow(WindowPtr pWin); 59Bool xnestDestroyWindow(WindowPtr pWin); 60Bool xnestPositionWindow(WindowPtr pWin, int x, int y); 61void xnestConfigureWindow(WindowPtr pWin, unsigned int mask); 62Bool xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask); 63Bool xnestRealizeWindow(WindowPtr pWin); 64Bool xnestUnrealizeWindow(WindowPtr pWin); 65void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion); 66void xnestClipNotify(WindowPtr pWin, int dx, int dy); 67void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, 68 RegionPtr other_exposed); 69void xnestSetShape(WindowPtr pWin); 70void xnestShapeWindow(WindowPtr pWin); 71 72#endif /* XNESTWINDOW_H */ 73