Distributed Multihead X
1.16.4
|
#include "windowstr.h"
Go to the source code of this file.
Data Structures | |
struct | _dmxWinPriv |
Macros | |
#define | DMX_GET_WINDOW_PRIV(_pWin) |
#define | DMX_WINDOW_FUNC_PROLOGUE(_pGC) |
#define | DMX_WINDOW_FUNC_EPILOGUE(_pGC) |
#define | DMX_WINDOW_X1(_pWin) ((_pWin)->drawable.x - wBorderWidth(_pWin)) |
#define | DMX_WINDOW_Y1(_pWin) ((_pWin)->drawable.y - wBorderWidth(_pWin)) |
#define | DMX_WINDOW_X2(_pWin) ((_pWin)->drawable.x + wBorderWidth(_pWin) + (_pWin)->drawable.width) |
#define | DMX_WINDOW_Y2(_pWin) ((_pWin)->drawable.y + wBorderWidth(_pWin) + (_pWin)->drawable.height) |
#define | DMX_WINDOW_OFFSCREEN(_pWin) |
Typedefs | |
typedef struct _dmxWinPriv | dmxWinPrivRec |
typedef struct _dmxWinPriv * | dmxWinPrivPtr |
Functions | |
Bool | dmxInitWindow (ScreenPtr pScreen) |
Window | dmxCreateRootWindow (WindowPtr pWindow) |
void | dmxGetDefaultWindowAttributes (WindowPtr pWindow, Colormap *cmap, Visual **visual) |
void | dmxCreateAndRealizeWindow (WindowPtr pWindow, Bool doSync) |
Bool | dmxCreateWindow (WindowPtr pWindow) |
Bool | dmxDestroyWindow (WindowPtr pWindow) |
Bool | dmxPositionWindow (WindowPtr pWindow, int x, int y) |
Bool | dmxChangeWindowAttributes (WindowPtr pWindow, unsigned long mask) |
Bool | dmxRealizeWindow (WindowPtr pWindow) |
Bool | dmxUnrealizeWindow (WindowPtr pWindow) |
void | dmxRestackWindow (WindowPtr pWindow, WindowPtr pOldNextSib) |
void | dmxWindowExposures (WindowPtr pWindow, RegionPtr prgn, RegionPtr other_exposed) |
void | dmxCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) |
void | dmxResizeWindow (WindowPtr pWindow, int x, int y, unsigned int w, unsigned int h, WindowPtr pSib) |
void | dmxReparentWindow (WindowPtr pWindow, WindowPtr pPriorParent) |
void | dmxChangeBorderWidth (WindowPtr pWindow, unsigned int width) |
void | dmxResizeScreenWindow (ScreenPtr pScreen, int x, int y, int w, int h) |
void | dmxResizeRootWindow (WindowPtr pRoot, int x, int y, int w, int h) |
Bool | dmxBEDestroyWindow (WindowPtr pWindow) |
void | dmxSetShape (WindowPtr pWindow, int kind) |
Interface for window support.
#define DMX_GET_WINDOW_PRIV | ( | _pWin | ) |
Get window private pointer.
Referenced by dmxBECreateWindowTree(), dmxBEDestroyWindow(), dmxChangeBorderWidth(), dmxChangeWindowAttributes(), dmxCopyWindow(), dmxCreateAndRealizeWindow(), dmxCreateNonRootWindow(), dmxCreateRootWindow(), dmxCreateWindow(), dmxDestroyWindow(), dmxDoCreatePicture(), dmxDoRestackWindow(), dmxDoSetShape(), dmxForceWindowCreation(), dmxGetWindowAttributes(), dmxPositionWindow(), dmxRealizeWindow(), dmxReparentWindow(), dmxResizeRootWindow(), dmxResizeWindow(), dmxRestackWindow(), dmxSetShape(), dmxUnrealizeWindow(), and dmxWindowExposures().
#define DMX_WINDOW_FUNC_EPILOGUE | ( | _pGC | ) |
#define DMX_WINDOW_FUNC_PROLOGUE | ( | _pGC | ) |
#define DMX_WINDOW_OFFSCREEN | ( | _pWin | ) |
Referenced by dmxCopyWindow(), dmxPositionWindow(), dmxRealizeWindow(), and dmxResizeWindow().
#define DMX_WINDOW_X1 | ( | _pWin | ) | ((_pWin)->drawable.x - wBorderWidth(_pWin)) |
#define DMX_WINDOW_X2 | ( | _pWin | ) | ((_pWin)->drawable.x + wBorderWidth(_pWin) + (_pWin)->drawable.width) |
#define DMX_WINDOW_Y1 | ( | _pWin | ) | ((_pWin)->drawable.y - wBorderWidth(_pWin)) |
#define DMX_WINDOW_Y2 | ( | _pWin | ) | ((_pWin)->drawable.y + wBorderWidth(_pWin) + (_pWin)->drawable.height) |
typedef struct _dmxWinPriv * dmxWinPrivPtr |
typedef struct _dmxWinPriv dmxWinPrivRec |
Window private area.
Bool dmxBEDestroyWindow | ( | WindowPtr | pWindow | ) |
Destroy pWindow on the back-end server.
References _DMXScreenInfo::beDisplay, DMX_GET_WINDOW_PRIV, dmxScreens, and _dmxWinPriv::window.
Referenced by dmxBEDestroyWindowTree(), and dmxDestroyWindow().
void dmxChangeBorderWidth | ( | WindowPtr | pWindow, |
unsigned int | width | ||
) |
Change border width for pWindow to width pixels.
References _DMXScreenInfo::beDisplay, DMX_GET_WINDOW_PRIV, DMX_UNWRAP, DMX_WRAP, dmxChangeBorderWidth(), dmxScreens, dmxSync(), and _dmxWinPriv::window.
Referenced by dmxChangeBorderWidth(), and dmxScreenInit().
Bool dmxChangeWindowAttributes | ( | WindowPtr | pWindow, |
unsigned long | mask | ||
) |
Change the window attributes of pWindow.
References _dmxWinPriv::attribMask, _DMXScreenInfo::beDisplay, DMX_GET_WINDOW_PRIV, DMX_UNWRAP, DMX_WRAP, dmxChangeWindowAttributes(), dmxDoChangeWindowAttributes(), dmxScreens, dmxSync(), and _dmxWinPriv::window.
Referenced by dmxChangeWindowAttributes(), and dmxScreenInit().
void dmxCopyWindow | ( | WindowPtr | pWindow, |
DDXPointRec | ptOldOrg, | ||
RegionPtr | prgnSrc | ||
) |
Move pWindow on the back-end server. Determine whether or not it is on or offscreen, and realize it if it is newly on screen and the lazy window creation optimization is enabled.
References _DMXScreenInfo::beDisplay, DMX_GET_WINDOW_PRIV, DMX_UNWRAP, DMX_UPDATE_COPY, DMX_WINDOW_OFFSCREEN, DMX_WRAP, dmxCopyWindow(), dmxCreateAndRealizeWindow(), dmxScreens, dmxSync(), dmxUpdateWindowInfo(), _dmxWinPriv::mapped, _dmxWinPriv::offscreen, and _dmxWinPriv::window.
Referenced by dmxCopyWindow(), and dmxScreenInit().
void dmxCreateAndRealizeWindow | ( | WindowPtr | pWindow, |
Bool | doSync | ||
) |
This function handles lazy window creation and realization. Window creation is handled by dmxCreateNonRootWindow(). It also handles any stacking changes that have occured since the window was originally created by calling dmxDoRestackWindow(). If the window is shaped, the shape is set on the back-end server by calling dmxDoSetShape(), and if the window has pictures (from RENDER) associated with it, those pictures are created on the back-end server by calling dmxCreatePictureList(). If doSync is TRUE, then dmxSync() is called.
References _DMXScreenInfo::beDisplay, DMX_GET_WINDOW_PRIV, dmxCreateNonRootWindow(), dmxCreatePictureList(), dmxDoRestackWindow(), dmxDoSetShape(), dmxScreens, dmxSync(), _dmxWinPriv::hasPict, _dmxWinPriv::isShaped, _dmxWinPriv::mapped, _dmxWinPriv::restacked, and _dmxWinPriv::window.
Referenced by dmxBECreateWindowTree(), dmxCopyWindow(), dmxCreateNonRootWindow(), dmxForceWindowCreation(), dmxPositionWindow(), dmxRealizeWindow(), dmxReparentWindow(), and dmxResizeWindow().
Window dmxCreateRootWindow | ( | WindowPtr | pWindow | ) |
References _dmxWinPriv::attribMask, _DMXScreenInfo::beDefVisualIndex, _DMXScreenInfo::beDisplay, _DMXScreenInfo::beVisuals, _dmxColormapPriv::cmap, DMX_GET_COLORMAP_PRIV, DMX_GET_WINDOW_PRIV, dmxDoChangeWindowAttributes(), dmxScreens, and _DMXScreenInfo::scrnWin.
Referenced by dmxBECreateWindowTree(), and dmxCreateWindow().
Bool dmxCreateWindow | ( | WindowPtr | pWindow | ) |
Create pWindow on the back-end server. If the lazy window creation optimization is enabled, then the actual creation and realization of the window is handled by dmxCreateAndRealizeWindow().
References _dmxWinPriv::attribMask, _DMXScreenInfo::beDisplay, _dmxWinPriv::cmap, DMX_GET_WINDOW_PRIV, DMX_UNWRAP, DMX_WRAP, dmxCreateNonRootWindow(), dmxCreateRootWindow(), dmxCreateWindow(), dmxGetDefaultWindowAttributes(), dmxLazyWindowCreation, dmxLookupVisualFromID(), dmxResizeRootWindow(), dmxScreens, dmxSync(), dmxUpdateScreenResources(), _dmxWinPriv::hasPict, _DMXScreenInfo::index, _dmxWinPriv::isShaped, _dmxWinPriv::mapped, _dmxWinPriv::offscreen, _dmxWinPriv::restacked, _DMXScreenInfo::rootHeight, _DMXScreenInfo::rootWidth, _DMXScreenInfo::rootWin, _DMXScreenInfo::rootX, _DMXScreenInfo::rootY, _DMXScreenInfo::scrnHeight, _DMXScreenInfo::scrnWidth, _DMXScreenInfo::scrnX, _DMXScreenInfo::scrnY, _dmxWinPriv::visual, and _dmxWinPriv::window.
Referenced by dmxCreateWindow(), and dmxScreenInit().
Bool dmxDestroyWindow | ( | WindowPtr | pWindow | ) |
Destroy pWindow on the back-end server. If any RENDER pictures were created, destroy them as well.
References DMX_GET_WINDOW_PRIV, DMX_UNWRAP, DMX_WRAP, dmxBEDestroyWindow(), dmxDestroyPictureList(), dmxDestroyWindow(), dmxScreens, and dmxSync().
Referenced by dmxDestroyWindow(), and dmxScreenInit().
void dmxGetDefaultWindowAttributes | ( | WindowPtr | pWindow, |
Colormap * | cmap, | ||
Visual ** | visual | ||
) |
References _dmxColormapPriv::cmap, DMX_GET_COLORMAP_PRIV, dmxColormapFromDefaultVisual(), and dmxLookupVisualFromID().
Referenced by dmxBECreateWindowTree(), and dmxCreateWindow().
Bool dmxInitWindow | ( | ScreenPtr | pScreen | ) |
Initialize the private area for the window functions.
References dmxWinPrivateKeyRec.
Referenced by dmxScreenInit().
Bool dmxPositionWindow | ( | WindowPtr | pWindow, |
int | x, | ||
int | y | ||
) |
Change the position of pWindow to be x, y.
References _DMXScreenInfo::beDisplay, DMX_GET_WINDOW_PRIV, DMX_UNWRAP, DMX_WINDOW_OFFSCREEN, DMX_WRAP, dmxCreateAndRealizeWindow(), dmxPositionWindow(), dmxScreens, dmxSync(), _dmxWinPriv::mapped, _dmxWinPriv::offscreen, and _dmxWinPriv::window.
Referenced by dmxPositionWindow(), and dmxScreenInit().
Bool dmxRealizeWindow | ( | WindowPtr | pWindow | ) |
Realize pWindow on the back-end server. If the lazy window creation optimization is enabled, the window is only realized when it at least partially overlaps the screen.
References _DMXScreenInfo::beDisplay, DMX_GET_WINDOW_PRIV, DMX_UNWRAP, DMX_UPDATE_REALIZE, DMX_WINDOW_OFFSCREEN, DMX_WRAP, dmxCreateAndRealizeWindow(), dmxRealizeWindow(), dmxScreens, dmxSync(), dmxUpdateWindowInfo(), _dmxWinPriv::mapped, _dmxWinPriv::offscreen, and _dmxWinPriv::window.
Referenced by dmxRealizeWindow(), and dmxScreenInit().
void dmxReparentWindow | ( | WindowPtr | pWindow, |
WindowPtr | pPriorParent | ||
) |
Reparent pWindow on the back-end server.
References _DMXScreenInfo::beDisplay, DMX_GET_WINDOW_PRIV, DMX_UNWRAP, DMX_UPDATE_REPARENT, DMX_WRAP, dmxCreateAndRealizeWindow(), dmxReparentWindow(), dmxScreens, dmxSync(), dmxUpdateWindowInfo(), and _dmxWinPriv::window.
Referenced by dmxReparentWindow(), and dmxScreenInit().
void dmxResizeRootWindow | ( | WindowPtr | pRoot, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h | ||
) |
Change the location and size of the "root" window. Called from dmxCreateWindow.
References _DMXScreenInfo::beDisplay, DMX_GET_WINDOW_PRIV, dmxScreens, dmxSync(), _dmxWinPriv::mapped, and _dmxWinPriv::window.
Referenced by dmxCreateWindow().
void dmxResizeScreenWindow | ( | ScreenPtr | pScreen, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h | ||
) |
Change the location and size of the "screen" window. Called from dmxextension.c dmxConfigureScreenWindow().
References _DMXScreenInfo::beDisplay, dmxScreens, dmxSync(), and _DMXScreenInfo::scrnWin.
void dmxResizeWindow | ( | WindowPtr | pWindow, |
int | x, | ||
int | y, | ||
unsigned int | w, | ||
unsigned int | h, | ||
WindowPtr | pSib | ||
) |
Resize pWindow on the back-end server. Determine whether or not it is on or offscreen, and realize it if it is newly on screen and the lazy window creation optimization is enabled.
References _DMXScreenInfo::beDisplay, DMX_GET_WINDOW_PRIV, DMX_UNWRAP, DMX_UPDATE_RESIZE, DMX_WINDOW_OFFSCREEN, DMX_WRAP, dmxCreateAndRealizeWindow(), dmxResizeWindow(), dmxScreens, dmxSync(), dmxUpdateWindowInfo(), _dmxWinPriv::mapped, _dmxWinPriv::offscreen, and _dmxWinPriv::window.
Referenced by dmxResizeWindow(), and dmxScreenInit().
void dmxRestackWindow | ( | WindowPtr | pWindow, |
WindowPtr | pOldNextSib | ||
) |
Handle window restacking. The actual restacking occurs in dmxDoRestackWindow().
References DMX_GET_WINDOW_PRIV, DMX_UNWRAP, DMX_UPDATE_RESTACK, DMX_WRAP, dmxDoRestackWindow(), dmxRestackWindow(), dmxScreens, dmxSync(), dmxUpdateWindowInfo(), _dmxWinPriv::restacked, and _dmxWinPriv::window.
Referenced by dmxRestackWindow(), and dmxScreenInit().
void dmxSetShape | ( | WindowPtr | pWindow, |
int | kind | ||
) |
Set shape of pWindow on the back-end server.
References DMX_GET_WINDOW_PRIV, DMX_UNWRAP, DMX_WRAP, dmxDoSetShape(), dmxScreens, dmxSetShape(), dmxSync(), _dmxWinPriv::isShaped, and _dmxWinPriv::window.
Referenced by dmxScreenInit(), and dmxSetShape().
Bool dmxUnrealizeWindow | ( | WindowPtr | pWindow | ) |
Unrealize pWindow on the back-end server.
References _DMXScreenInfo::beDisplay, DMX_GET_WINDOW_PRIV, DMX_UNWRAP, DMX_UPDATE_UNREALIZE, DMX_WRAP, dmxScreens, dmxSync(), dmxUnrealizeWindow(), dmxUpdateWindowInfo(), _dmxWinPriv::mapped, _dmxWinPriv::offscreen, and _dmxWinPriv::window.
Referenced by dmxScreenInit(), and dmxUnrealizeWindow().
void dmxWindowExposures | ( | WindowPtr | pWindow, |
RegionPtr | prgn, | ||
RegionPtr | other_exposed | ||
) |
Handle exposures on pWindow. Since window exposures are handled in DMX, the events that are generated by the back-end server are redundant, so we eat them here.
References _DMXScreenInfo::beDisplay, DMX_GET_WINDOW_PRIV, DMX_UNWRAP, DMX_WRAP, dmxScreens, dmxSync(), dmxWindowExposurePredicate(), dmxWindowExposures(), and _dmxWinPriv::window.
Referenced by dmxScreenInit(), and dmxWindowExposures().