XNWindow.h revision 05b261ec
105b261ecSmrg/* 205b261ecSmrg 305b261ecSmrgCopyright 1993 by Davor Matic 405b261ecSmrg 505b261ecSmrgPermission to use, copy, modify, distribute, and sell this software 605b261ecSmrgand its documentation for any purpose is hereby granted without fee, 705b261ecSmrgprovided that the above copyright notice appear in all copies and that 805b261ecSmrgboth that copyright notice and this permission notice appear in 905b261ecSmrgsupporting documentation. Davor Matic makes no representations about 1005b261ecSmrgthe suitability of this software for any purpose. It is provided "as 1105b261ecSmrgis" without express or implied warranty. 1205b261ecSmrg 1305b261ecSmrg*/ 1405b261ecSmrg 1505b261ecSmrg#ifndef XNESTWINDOW_H 1605b261ecSmrg#define XNESTWINDOW_H 1705b261ecSmrg 1805b261ecSmrgtypedef struct { 1905b261ecSmrg Window window; 2005b261ecSmrg Window parent; 2105b261ecSmrg int x; 2205b261ecSmrg int y; 2305b261ecSmrg unsigned int width; 2405b261ecSmrg unsigned int height; 2505b261ecSmrg unsigned int border_width; 2605b261ecSmrg Window sibling_above; 2705b261ecSmrg#ifdef SHAPE 2805b261ecSmrg RegionPtr bounding_shape; 2905b261ecSmrg RegionPtr clip_shape; 3005b261ecSmrg#endif /* SHAPE */ 3105b261ecSmrg} xnestPrivWin; 3205b261ecSmrg 3305b261ecSmrgtypedef struct { 3405b261ecSmrg WindowPtr pWin; 3505b261ecSmrg Window window; 3605b261ecSmrg} xnestWindowMatch; 3705b261ecSmrg 3805b261ecSmrgextern int xnestWindowPrivateIndex; 3905b261ecSmrg 4005b261ecSmrg#define xnestWindowPriv(pWin) \ 4105b261ecSmrg ((xnestPrivWin *)((pWin)->devPrivates[xnestWindowPrivateIndex].ptr)) 4205b261ecSmrg 4305b261ecSmrg#define xnestWindow(pWin) (xnestWindowPriv(pWin)->window) 4405b261ecSmrg 4505b261ecSmrg#define xnestWindowParent(pWin) \ 4605b261ecSmrg ((pWin)->parent ? \ 4705b261ecSmrg xnestWindow((pWin)->parent) : \ 4805b261ecSmrg xnestDefaultWindows[pWin->drawable.pScreen->myNum]) 4905b261ecSmrg 5005b261ecSmrg#define xnestWindowSiblingAbove(pWin) \ 5105b261ecSmrg ((pWin)->prevSib ? xnestWindow((pWin)->prevSib) : None) 5205b261ecSmrg 5305b261ecSmrg#define xnestWindowSiblingBelow(pWin) \ 5405b261ecSmrg ((pWin)->nextSib ? xnestWindow((pWin)->nextSib) : None) 5505b261ecSmrg 5605b261ecSmrg#define CWParent CWSibling 5705b261ecSmrg#define CWStackingOrder CWStackMode 5805b261ecSmrg 5905b261ecSmrgWindowPtr xnestWindowPtr(Window window); 6005b261ecSmrgBool xnestCreateWindow(WindowPtr pWin); 6105b261ecSmrgBool xnestDestroyWindow(WindowPtr pWin); 6205b261ecSmrgBool xnestPositionWindow(WindowPtr pWin, int x, int y); 6305b261ecSmrgvoid xnestConfigureWindow(WindowPtr pWin, unsigned int mask); 6405b261ecSmrgBool xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask); 6505b261ecSmrgBool xnestRealizeWindow(WindowPtr pWin); 6605b261ecSmrgBool xnestUnrealizeWindow(WindowPtr pWin); 6705b261ecSmrgvoid xnestPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what); 6805b261ecSmrgvoid xnestPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what); 6905b261ecSmrgvoid xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion); 7005b261ecSmrgvoid xnestClipNotify(WindowPtr pWin, int dx, int dy); 7105b261ecSmrgvoid xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, 7205b261ecSmrg RegionPtr other_exposed); 7305b261ecSmrg#ifdef SHAPE 7405b261ecSmrgvoid xnestSetShape(WindowPtr pWin); 7505b261ecSmrgvoid xnestShapeWindow(WindowPtr pWin); 7605b261ecSmrg#endif /* SHAPE */ 7705b261ecSmrg 7805b261ecSmrg#endif /* XNESTWINDOW_H */ 79