XNWindow.h revision 05b261ec
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#ifdef SHAPE 28 RegionPtr bounding_shape; 29 RegionPtr clip_shape; 30#endif /* SHAPE */ 31} xnestPrivWin; 32 33typedef struct { 34 WindowPtr pWin; 35 Window window; 36} xnestWindowMatch; 37 38extern int xnestWindowPrivateIndex; 39 40#define xnestWindowPriv(pWin) \ 41 ((xnestPrivWin *)((pWin)->devPrivates[xnestWindowPrivateIndex].ptr)) 42 43#define xnestWindow(pWin) (xnestWindowPriv(pWin)->window) 44 45#define xnestWindowParent(pWin) \ 46 ((pWin)->parent ? \ 47 xnestWindow((pWin)->parent) : \ 48 xnestDefaultWindows[pWin->drawable.pScreen->myNum]) 49 50#define xnestWindowSiblingAbove(pWin) \ 51 ((pWin)->prevSib ? xnestWindow((pWin)->prevSib) : None) 52 53#define xnestWindowSiblingBelow(pWin) \ 54 ((pWin)->nextSib ? xnestWindow((pWin)->nextSib) : None) 55 56#define CWParent CWSibling 57#define CWStackingOrder CWStackMode 58 59WindowPtr xnestWindowPtr(Window window); 60Bool xnestCreateWindow(WindowPtr pWin); 61Bool xnestDestroyWindow(WindowPtr pWin); 62Bool xnestPositionWindow(WindowPtr pWin, int x, int y); 63void xnestConfigureWindow(WindowPtr pWin, unsigned int mask); 64Bool xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask); 65Bool xnestRealizeWindow(WindowPtr pWin); 66Bool xnestUnrealizeWindow(WindowPtr pWin); 67void xnestPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what); 68void xnestPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what); 69void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion); 70void xnestClipNotify(WindowPtr pWin, int dx, int dy); 71void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, 72 RegionPtr other_exposed); 73#ifdef SHAPE 74void xnestSetShape(WindowPtr pWin); 75void xnestShapeWindow(WindowPtr pWin); 76#endif /* SHAPE */ 77 78#endif /* XNESTWINDOW_H */ 79