dmxwindow.h
Go to the documentation of this file.00001 /* $XFree86$ */ 00002 /* 00003 * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina. 00004 * 00005 * All Rights Reserved. 00006 * 00007 * Permission is hereby granted, free of charge, to any person obtaining 00008 * a copy of this software and associated documentation files (the 00009 * "Software"), to deal in the Software without restriction, including 00010 * without limitation on the rights to use, copy, modify, merge, 00011 * publish, distribute, sublicense, and/or sell copies of the Software, 00012 * and to permit persons to whom the Software is furnished to do so, 00013 * subject to the following conditions: 00014 * 00015 * The above copyright notice and this permission notice (including the 00016 * next paragraph) shall be included in all copies or substantial 00017 * portions of the Software. 00018 * 00019 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00020 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00021 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00022 * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS 00023 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 00024 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 00025 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 00026 * SOFTWARE. 00027 */ 00028 00029 /* 00030 * Authors: 00031 * Kevin E. Martin <kem@redhat.com> 00032 * 00033 */ 00034 00038 #ifndef DMXWINDOW_H 00039 #define DMXWINDOW_H 00040 00041 #include "windowstr.h" 00042 00044 typedef struct _dmxWinPriv { 00045 Window window; 00046 Bool offscreen; 00047 Bool mapped; 00048 Bool restacked; 00049 unsigned long attribMask; 00050 Colormap cmap; 00051 Visual *visual; 00052 #ifdef SHAPE 00053 Bool isShaped; 00054 #endif 00055 #ifdef RENDER 00056 Bool hasPict; 00057 #endif 00058 #ifdef GLXEXT 00059 void *swapGroup; 00060 int barrier; 00061 void (*windowDestroyed)(WindowPtr); 00062 void (*windowUnmapped)(WindowPtr); 00063 #endif 00064 } dmxWinPrivRec, *dmxWinPrivPtr; 00065 00066 00067 extern Bool dmxInitWindow(ScreenPtr pScreen); 00068 00069 extern Window dmxCreateRootWindow(WindowPtr pWindow); 00070 00071 extern void dmxGetDefaultWindowAttributes(WindowPtr pWindow, 00072 Colormap *cmap, 00073 Visual **visual); 00074 extern void dmxCreateAndRealizeWindow(WindowPtr pWindow, Bool doSync); 00075 00076 extern Bool dmxCreateWindow(WindowPtr pWindow); 00077 extern Bool dmxDestroyWindow(WindowPtr pWindow); 00078 extern Bool dmxPositionWindow(WindowPtr pWindow, int x, int y); 00079 extern Bool dmxChangeWindowAttributes(WindowPtr pWindow, unsigned long mask); 00080 extern Bool dmxRealizeWindow(WindowPtr pWindow); 00081 extern Bool dmxUnrealizeWindow(WindowPtr pWindow); 00082 extern void dmxRestackWindow(WindowPtr pWindow, WindowPtr pOldNextSib); 00083 extern void dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn, 00084 RegionPtr other_exposed); 00085 extern void dmxPaintWindowBackground(WindowPtr pWindow, RegionPtr pRegion, 00086 int what); 00087 extern void dmxPaintWindowBorder(WindowPtr pWindow, RegionPtr pRegion, 00088 int what); 00089 extern void dmxCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, 00090 RegionPtr prgnSrc); 00091 00092 extern void dmxResizeWindow(WindowPtr pWindow, int x, int y, 00093 unsigned int w, unsigned int h, WindowPtr pSib); 00094 extern void dmxReparentWindow(WindowPtr pWindow, WindowPtr pPriorParent); 00095 00096 extern void dmxChangeBorderWidth(WindowPtr pWindow, unsigned int width); 00097 00098 extern void dmxResizeScreenWindow(ScreenPtr pScreen, 00099 int x, int y, int w, int h); 00100 extern void dmxResizeRootWindow(WindowPtr pRoot, 00101 int x, int y, int w, int h); 00102 00103 extern Bool dmxBEDestroyWindow(WindowPtr pWindow); 00104 00105 #ifdef SHAPE 00106 /* Support for shape extension */ 00107 extern void dmxSetShape(WindowPtr pWindow); 00108 #endif 00109 00111 extern int dmxWinPrivateIndex; 00112 00114 #define DMX_GET_WINDOW_PRIV(_pWin) \ 00115 ((dmxWinPrivPtr)(_pWin)->devPrivates[dmxWinPrivateIndex].ptr) 00116 00117 /* All of these macros are only used in dmxwindow.c */ 00118 #define DMX_WINDOW_FUNC_PROLOGUE(_pGC) \ 00119 do { \ 00120 dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(_pGC); \ 00121 DMX_UNWRAP(funcs, pGCPriv, (_pGC)); \ 00122 if (pGCPriv->ops) \ 00123 DMX_UNWRAP(ops, pGCPriv, (_pGC)); \ 00124 } while (0) 00125 00126 #define DMX_WINDOW_FUNC_EPILOGUE(_pGC) \ 00127 do { \ 00128 dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(_pGC); \ 00129 DMX_WRAP(funcs, &dmxGCFuncs, pGCPriv, (_pGC)); \ 00130 if (pGCPriv->ops) \ 00131 DMX_WRAP(ops, &dmxGCOps, pGCPriv, (_pGC)); \ 00132 } while (0) 00133 00134 #define DMX_WINDOW_X1(_pWin) \ 00135 ((_pWin)->drawable.x - wBorderWidth(_pWin)) 00136 #define DMX_WINDOW_Y1(_pWin) \ 00137 ((_pWin)->drawable.y - wBorderWidth(_pWin)) 00138 #define DMX_WINDOW_X2(_pWin) \ 00139 ((_pWin)->drawable.x + wBorderWidth(_pWin) + (_pWin)->drawable.width) 00140 #define DMX_WINDOW_Y2(_pWin) \ 00141 ((_pWin)->drawable.y + wBorderWidth(_pWin) + (_pWin)->drawable.height) 00142 00143 #define DMX_WINDOW_OFFSCREEN(_pWin) \ 00144 (DMX_WINDOW_X1(_pWin) >= (_pWin)->drawable.pScreen->width || \ 00145 DMX_WINDOW_Y1(_pWin) >= (_pWin)->drawable.pScreen->height || \ 00146 DMX_WINDOW_X2(_pWin) <= 0 || \ 00147 DMX_WINDOW_Y2(_pWin) <= 0) 00148 00149 #endif /* DMXWINDOW_H */
Generated June 29, 2004 for Distributed Multihead X by doxygen 1.3.4.