XNWindow.h revision 4642e01f
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  RegionPtr bounding_shape;
2805b261ecSmrg  RegionPtr clip_shape;
2905b261ecSmrg} xnestPrivWin;
3005b261ecSmrg
3105b261ecSmrgtypedef struct {
3205b261ecSmrg  WindowPtr pWin;
3305b261ecSmrg  Window window;
3405b261ecSmrg} xnestWindowMatch;
3505b261ecSmrg
364642e01fSmrgextern DevPrivateKey xnestWindowPrivateKey;
3705b261ecSmrg
384642e01fSmrg#define xnestWindowPriv(pWin) ((xnestPrivWin *) \
394642e01fSmrg    dixLookupPrivate(&(pWin)->devPrivates, xnestWindowPrivateKey))
4005b261ecSmrg
4105b261ecSmrg#define xnestWindow(pWin) (xnestWindowPriv(pWin)->window)
4205b261ecSmrg
4305b261ecSmrg#define xnestWindowParent(pWin) \
4405b261ecSmrg  ((pWin)->parent ? \
4505b261ecSmrg   xnestWindow((pWin)->parent) : \
4605b261ecSmrg   xnestDefaultWindows[pWin->drawable.pScreen->myNum])
4705b261ecSmrg
4805b261ecSmrg#define xnestWindowSiblingAbove(pWin) \
4905b261ecSmrg  ((pWin)->prevSib ? xnestWindow((pWin)->prevSib) : None)
5005b261ecSmrg
5105b261ecSmrg#define xnestWindowSiblingBelow(pWin) \
5205b261ecSmrg  ((pWin)->nextSib ? xnestWindow((pWin)->nextSib) : None)
5305b261ecSmrg
5405b261ecSmrg#define CWParent CWSibling
5505b261ecSmrg#define CWStackingOrder CWStackMode
5605b261ecSmrg
5705b261ecSmrgWindowPtr xnestWindowPtr(Window window);
5805b261ecSmrgBool xnestCreateWindow(WindowPtr pWin);
5905b261ecSmrgBool xnestDestroyWindow(WindowPtr pWin);
6005b261ecSmrgBool xnestPositionWindow(WindowPtr pWin, int x, int y);
6105b261ecSmrgvoid xnestConfigureWindow(WindowPtr pWin, unsigned int mask);
6205b261ecSmrgBool xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask);
6305b261ecSmrgBool xnestRealizeWindow(WindowPtr pWin);
6405b261ecSmrgBool xnestUnrealizeWindow(WindowPtr pWin);
6505b261ecSmrgvoid xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion);
6605b261ecSmrgvoid xnestClipNotify(WindowPtr pWin, int dx, int dy);
6705b261ecSmrgvoid xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn,
6805b261ecSmrg			  RegionPtr other_exposed);
6905b261ecSmrgvoid xnestSetShape(WindowPtr pWin);
7005b261ecSmrgvoid xnestShapeWindow(WindowPtr pWin);
7105b261ecSmrg
7205b261ecSmrg#endif /* XNESTWINDOW_H */
73