Distributed Multihead X  1.16.4
dmxwindow.h
Go to the documentation of this file.
1 /*
2  * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
3  *
4  * All Rights Reserved.
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining
7  * a copy of this software and associated documentation files (the
8  * "Software"), to deal in the Software without restriction, including
9  * without limitation on the rights to use, copy, modify, merge,
10  * publish, distribute, sublicense, and/or sell copies of the Software,
11  * and to permit persons to whom the Software is furnished to do so,
12  * subject to the following conditions:
13  *
14  * The above copyright notice and this permission notice (including the
15  * next paragraph) shall be included in all copies or substantial
16  * portions of the Software.
17  *
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21  * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
22  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
23  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25  * SOFTWARE.
26  */
27 
28 /*
29  * Authors:
30  * Kevin E. Martin <kem@redhat.com>
31  *
32  */
33 
37 #ifndef DMXWINDOW_H
38 #define DMXWINDOW_H
39 
40 #include "windowstr.h"
41 
43 typedef struct _dmxWinPriv {
44  Window window;
45  Bool offscreen;
46  Bool mapped;
47  Bool restacked;
48  unsigned long attribMask;
49  Colormap cmap;
50  Visual *visual;
51  Bool isShaped;
52  Bool hasPict;
53 #ifdef GLXEXT
54  void *swapGroup;
55  int barrier;
56  void (*windowDestroyed) (WindowPtr);
57  void (*windowUnmapped) (WindowPtr);
58 #endif
60 
61 extern Bool dmxInitWindow(ScreenPtr pScreen);
62 
63 extern Window dmxCreateRootWindow(WindowPtr pWindow);
64 
65 extern void dmxGetDefaultWindowAttributes(WindowPtr pWindow,
66  Colormap * cmap, Visual ** visual);
67 extern void dmxCreateAndRealizeWindow(WindowPtr pWindow, Bool doSync);
68 
69 extern Bool dmxCreateWindow(WindowPtr pWindow);
70 extern Bool dmxDestroyWindow(WindowPtr pWindow);
71 extern Bool dmxPositionWindow(WindowPtr pWindow, int x, int y);
72 extern Bool dmxChangeWindowAttributes(WindowPtr pWindow, unsigned long mask);
73 extern Bool dmxRealizeWindow(WindowPtr pWindow);
74 extern Bool dmxUnrealizeWindow(WindowPtr pWindow);
75 extern void dmxRestackWindow(WindowPtr pWindow, WindowPtr pOldNextSib);
76 extern void dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn,
77  RegionPtr other_exposed);
78 extern void dmxCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg,
79  RegionPtr prgnSrc);
80 
81 extern void dmxResizeWindow(WindowPtr pWindow, int x, int y,
82  unsigned int w, unsigned int h, WindowPtr pSib);
83 extern void dmxReparentWindow(WindowPtr pWindow, WindowPtr pPriorParent);
84 
85 extern void dmxChangeBorderWidth(WindowPtr pWindow, unsigned int width);
86 
87 extern void dmxResizeScreenWindow(ScreenPtr pScreen,
88  int x, int y, int w, int h);
89 extern void dmxResizeRootWindow(WindowPtr pRoot, int x, int y, int w, int h);
90 
91 extern Bool dmxBEDestroyWindow(WindowPtr pWindow);
92 
93 /* Support for shape extension */
94 extern void dmxSetShape(WindowPtr pWindow, int kind);
95 
97 #define DMX_GET_WINDOW_PRIV(_pWin) ((dmxWinPrivPtr) \
98  dixLookupPrivate(&(_pWin)->devPrivates, dmxWinPrivateKey))
99 
100 /* All of these macros are only used in dmxwindow.c */
101 #define DMX_WINDOW_FUNC_PROLOGUE(_pGC) \
102 do { \
103  dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(_pGC); \
104  DMX_UNWRAP(funcs, pGCPriv, (_pGC)); \
105  if (pGCPriv->ops) \
106  DMX_UNWRAP(ops, pGCPriv, (_pGC)); \
107 } while (0)
108 
109 #define DMX_WINDOW_FUNC_EPILOGUE(_pGC) \
110 do { \
111  dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(_pGC); \
112  DMX_WRAP(funcs, &dmxGCFuncs, pGCPriv, (_pGC)); \
113  if (pGCPriv->ops) \
114  DMX_WRAP(ops, &dmxGCOps, pGCPriv, (_pGC)); \
115 } while (0)
116 
117 #define DMX_WINDOW_X1(_pWin) \
118  ((_pWin)->drawable.x - wBorderWidth(_pWin))
119 #define DMX_WINDOW_Y1(_pWin) \
120  ((_pWin)->drawable.y - wBorderWidth(_pWin))
121 #define DMX_WINDOW_X2(_pWin) \
122  ((_pWin)->drawable.x + wBorderWidth(_pWin) + (_pWin)->drawable.width)
123 #define DMX_WINDOW_Y2(_pWin) \
124  ((_pWin)->drawable.y + wBorderWidth(_pWin) + (_pWin)->drawable.height)
125 
126 #define DMX_WINDOW_OFFSCREEN(_pWin) \
127  (DMX_WINDOW_X1(_pWin) >= (_pWin)->drawable.pScreen->width || \
128  DMX_WINDOW_Y1(_pWin) >= (_pWin)->drawable.pScreen->height || \
129  DMX_WINDOW_X2(_pWin) <= 0 || \
130  DMX_WINDOW_Y2(_pWin) <= 0)
131 
132 #endif /* DMXWINDOW_H */
void dmxResizeScreenWindow(ScreenPtr pScreen, int x, int y, int w, int h)
Definition: dmxwindow.c:119
Bool dmxPositionWindow(WindowPtr pWindow, int x, int y)
Definition: dmxwindow.c:438
Window dmxCreateRootWindow(WindowPtr pWindow)
Definition: dmxwindow.c:72
void dmxResizeWindow(WindowPtr pWindow, int x, int y, unsigned int w, unsigned int h, WindowPtr pSib)
Definition: dmxwindow.c:854
unsigned long attribMask
Definition: dmxwindow.h:48
void dmxResizeRootWindow(WindowPtr pRoot, int x, int y, int w, int h)
Definition: dmxwindow.c:142
Bool dmxRealizeWindow(WindowPtr pWindow)
Definition: dmxwindow.c:612
Bool dmxBEDestroyWindow(WindowPtr pWindow)
Definition: dmxwindow.c:384
void dmxSetShape(WindowPtr pWindow, int kind)
Definition: dmxwindow.c:1026
struct _dmxWinPriv * dmxWinPrivPtr
Bool dmxCreateWindow(WindowPtr pWindow)
Definition: dmxwindow.c:308
Colormap cmap
Definition: dmxwindow.h:49
Bool dmxDestroyWindow(WindowPtr pWindow)
Definition: dmxwindow.c:402
Bool isShaped
Definition: dmxwindow.h:51
Bool mapped
Definition: dmxwindow.h:46
struct _dmxWinPriv dmxWinPrivRec
void dmxCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
Definition: dmxwindow.c:811
Window window
Definition: dmxwindow.h:44
Bool restacked
Definition: dmxwindow.h:47
void dmxReparentWindow(WindowPtr pWindow, WindowPtr pPriorParent)
Definition: dmxwindow.c:900
Bool offscreen
Definition: dmxwindow.h:45
Bool dmxInitWindow(ScreenPtr pScreen)
Definition: dmxwindow.c:62
Bool hasPict
Definition: dmxwindow.h:52
Bool dmxUnrealizeWindow(WindowPtr pWindow)
Definition: dmxwindow.c:652
void dmxCreateAndRealizeWindow(WindowPtr pWindow, Bool doSync)
Definition: dmxwindow.c:281
void dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn, RegionPtr other_exposed)
Definition: dmxwindow.c:775
void dmxRestackWindow(WindowPtr pWindow, WindowPtr pOldNextSib)
Definition: dmxwindow.c:738
Bool dmxChangeWindowAttributes(WindowPtr pWindow, unsigned long mask)
Definition: dmxwindow.c:576
void dmxGetDefaultWindowAttributes(WindowPtr pWindow, Colormap *cmap, Visual **visual)
Definition: dmxwindow.c:178
Visual * visual
Definition: dmxwindow.h:50
Definition: dmxwindow.h:43
void dmxChangeBorderWidth(WindowPtr pWindow, unsigned int width)
Definition: dmxwindow.c:932

Generated on Tue Aug 18 2015 01:27:31 for Distributed Multihead X by doxygen 1.8.8