head 1.2; access; symbols netbsd-7-2-RELEASE:1.1.1.3 netbsd-7-1-2-RELEASE:1.1.1.3 netbsd-7-1-1-RELEASE:1.1.1.3 netbsd-7-1:1.1.1.3.0.14 netbsd-7-1-RELEASE:1.1.1.3 netbsd-7-1-RC2:1.1.1.3 netbsd-7-1-RC1:1.1.1.3 netbsd-7-0-2-RELEASE:1.1.1.3 netbsd-7-0-1-RELEASE:1.1.1.3 netbsd-7-0:1.1.1.3.0.12 netbsd-7-0-RELEASE:1.1.1.3 netbsd-7-0-RC3:1.1.1.3 netbsd-7-0-RC2:1.1.1.3 netbsd-7-0-RC1:1.1.1.3 netbsd-5-2-3-RELEASE:1.1.1.1 netbsd-5-1-5-RELEASE:1.1.1.1 netbsd-6-0-6-RELEASE:1.1.1.3 netbsd-6-1-5-RELEASE:1.1.1.3 netbsd-7:1.1.1.3.0.10 netbsd-7-base:1.1.1.3 netbsd-6-1-4-RELEASE:1.1.1.3 netbsd-6-0-5-RELEASE:1.1.1.3 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.3 riastradh-drm2:1.1.1.3.0.8 riastradh-drm2-base:1.1.1.3 netbsd-6-1-3-RELEASE:1.1.1.3 netbsd-6-0-4-RELEASE:1.1.1.3 netbsd-5-2-2-RELEASE:1.1.1.1 netbsd-5-1-4-RELEASE:1.1.1.1 netbsd-6-1-2-RELEASE:1.1.1.3 netbsd-6-0-3-RELEASE:1.1.1.3 netbsd-5-2-1-RELEASE:1.1.1.1 netbsd-5-1-3-RELEASE:1.1.1.1 netbsd-6-1-1-RELEASE:1.1.1.3 xorg-server-1-10-6:1.1.1.3 netbsd-6-1:1.1.1.3.0.6 netbsd-6-0-2-RELEASE:1.1.1.3 netbsd-6-1-RELEASE:1.1.1.3 netbsd-6-1-RC4:1.1.1.3 netbsd-6-1-RC3:1.1.1.3 netbsd-6-1-RC2:1.1.1.3 netbsd-6-1-RC1:1.1.1.3 netbsd-5-2:1.1.1.1.0.8 netbsd-6-0-1-RELEASE:1.1.1.3 netbsd-5-2-RELEASE:1.1.1.1 netbsd-5-2-RC1:1.1.1.1 netbsd-6-0:1.1.1.3.0.4 netbsd-6-0-RELEASE:1.1.1.3 netbsd-6-0-RC2:1.1.1.3 netbsd-6-0-RC1:1.1.1.3 netbsd-6:1.1.1.3.0.2 netbsd-6-base:1.1.1.3 netbsd-5-1-2-RELEASE:1.1.1.1 netbsd-5-1-1-RELEASE:1.1.1.1 xorg-server-1-10-3:1.1.1.3 mrg-xorg-server-1-9-5-pre-1-10-3:1.1.1.2 xorg-server-1-9-5:1.1.1.2 xorg-server-1-9-2:1.1.1.2 netbsd-5-1:1.1.1.1.0.6 netbsd-5-1-RELEASE:1.1.1.1 netbsd-5-1-RC4:1.1.1.1 netbsd-5-1-RC3:1.1.1.1 netbsd-5-1-RC2:1.1.1.1 netbsd-5-1-RC1:1.1.1.1 netbsd-5-0-2-RELEASE:1.1.1.1 xorg-server-1-6-5:1.1.1.1 xorg-server-1-6-3:1.1.1.1 netbsd-5-0-1-RELEASE:1.1.1.1 xorg-server-1-6-2:1.1.1.1 xorg-server-1-6-1-901:1.1.1.1 netbsd-5-0:1.1.1.1.0.4 netbsd-5-0-RELEASE:1.1.1.1 netbsd-5-0-RC4:1.1.1.1 netbsd-5-0-RC3:1.1.1.1 netbsd-5-0-RC2:1.1.1.1 netbsd-5-0-RC1:1.1.1.1 netbsd-5:1.1.1.1.0.2 netbsd-5-base:1.1.1.1 xorg-server-1-4-2:1.1.1.1 xorg:1.1.1; locks; strict; comment @# @; 1.2 date 2016.08.11.00.04.28; author mrg; state dead; branches; next 1.1; commitid FQxwnZNPy5ZgOOhz; 1.1 date 2008.07.31.19.50.31; author mrg; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2008.07.31.19.50.31; author mrg; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2010.11.23.05.21.22; author mrg; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2011.08.02.06.56.51; author mrg; state Exp; branches; next ; desc @@ 1.2 log @first merge of netbsd changes. not tested yet. @ text @
#include "windowstr.h"Go to the source code of this file.
Data Structures | |
| struct | _dmxWinPriv |
Defines | |
| #define | DMX_GET_WINDOW_PRIV(_pWin) ((dmxWinPrivPtr)(_pWin)->devPrivates[dmxWinPrivateIndex].ptr) |
Typedefs | |
| typedef _dmxWinPriv | dmxWinPrivRec |
| typedef _dmxWinPriv * | dmxWinPrivPtr |
Functions | |
| Bool | dmxInitWindow (ScreenPtr pScreen) |
| 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 | dmxPaintWindowBackground (WindowPtr pWindow, RegionPtr pRegion, int what) |
| void | dmxPaintWindowBorder (WindowPtr pWindow, RegionPtr pRegion, int what) |
| 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) |
Variables | |
| int | dmxWinPrivateIndex |
|
|
Get window private pointer. |
|
|
Window private area. |
|
|
Window private area. |
|
|
Destroy pWindow on the back-end server. |
|
||||||||||||
|
Change border width for pWindow to width pixels. |
|
||||||||||||
|
Change the window attributes of pWindow. |
|
||||||||||||||||
|
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. |
|
||||||||||||
|
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. |
|
|
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(). |
|
|
Destroy pWindow on the back-end server. If any RENDER pictures were created, destroy them as well. |
|
|
Initialize the private area for the window functions. |
|
||||||||||||||||
|
Paint background of pWindow in pRegion. |
|
||||||||||||||||
|
Paint window border for pWindow in pRegion. |
|
||||||||||||||||
|
Change the position of pWindow to be x, y. |
|
|
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. |
|
||||||||||||
|
Reparent pWindow on the back-end server. |
|
||||||||||||||||||||||||
|
Change the location and size of the "root" window. Called from #dmxReconfigureRootWindow(). |
|
||||||||||||||||||||||||
|
Change the location and size of the "screen" window. Called from #dmxReconfigureScreenWindow(). |
|
||||||||||||||||||||||||||||
|
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. |
|
||||||||||||
|
Handle window restacking. The actual restacking occurs in dmxDoRestackWindow(). |
|
|
Set shape of pWindow on the back-end server. |
|
|
Unrealize pWindow on the back-end server. |
|
||||||||||||||||
|
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. |
|
|
Private index for Windows |
#include "windowstr.h"Go to the source code of this file.
Data Structures | |
| struct | _dmxWinPriv |
Defines | |
| #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 | ) |
((dmxWinPrivPtr) \ dixLookupPrivate(&(_pWin)->devPrivates, dmxWinPrivateKey))
Get window private pointer.
d62 1 a62 1Referenced 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().
d64 1 a64 71| #define DMX_WINDOW_FUNC_EPILOGUE | ( | _pGC | ) |
do { \ dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(_pGC); \ DMX_WRAP(funcs, &dmxGCFuncs, pGCPriv, (_pGC)); \ if (pGCPriv->ops) \ DMX_WRAP(ops, &dmxGCOps, pGCPriv, (_pGC)); \ } while (0)
| #define DMX_WINDOW_FUNC_PROLOGUE | ( | _pGC | ) |
do { \ dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(_pGC); \ DMX_UNWRAP(funcs, pGCPriv, (_pGC)); \ if (pGCPriv->ops) \ DMX_UNWRAP(ops, pGCPriv, (_pGC)); \ } while (0)
| #define DMX_WINDOW_OFFSCREEN | ( | _pWin | ) |
(DMX_WINDOW_X1(_pWin) >= (_pWin)->drawable.pScreen->width || \ DMX_WINDOW_Y1(_pWin) >= (_pWin)->drawable.pScreen->height || \ DMX_WINDOW_X2(_pWin) <= 0 || \ DMX_WINDOW_Y2(_pWin) <= 0)
Referenced by dmxCopyWindow(), dmxPositionWindow(), dmxRealizeWindow(), and dmxResizeWindow().
d66 1 a66 17| #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) | d111 19 a129 10
| typedef struct _dmxWinPriv * dmxWinPrivPtr | d133 27 a159 11
| typedef struct _dmxWinPriv dmxWinPrivRec | a160 4
Window private area.
a161 15| Bool dmxBEDestroyWindow | ( | WindowPtr | pWindow | ) |
| void dmxChangeBorderWidth | ( | WindowPtr | pWindow, | a188 1d190 3 a192 2 | unsigned int | width | d196 2 a197 2 | ) | d199 1 d201 19 a219 14 |
| Bool dmxChangeWindowAttributes | ( | WindowPtr | pWindow, | a226 1d228 3 a230 2 | unsigned long | mask | d234 2 a235 2 | ) | d237 1 d239 19 a257 14 |
| void dmxCopyWindow | ( | WindowPtr | pWindow, | a264 1d266 3 a268 2 | DDXPointRec | ptOldOrg, | a270 1d272 3 a274 2 | RegionPtr | prgnSrc | d278 2 a279 2 | ) | d281 1 d283 19 a301 14 |
| void dmxCreateAndRealizeWindow | ( | WindowPtr | pWindow, | a308 1d310 3 a312 2 | Bool | doSync | d316 2 a317 2 | ) | d319 1 d321 27 a347 3 |
| Window dmxCreateRootWindow | ( | WindowPtr | pWindow | ) | d435 3 a438 14
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 | ) | d441 3 a444 15
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 | ) | d447 2 d450 1 d452 19 a470 14
| void dmxGetDefaultWindowAttributes | ( | WindowPtr | pWindow, | a477 1d479 3 a481 2 | Colormap * | cmap, | a483 1d485 3 a487 2 | Visual ** | visual | d491 2 a492 2 | ) | a493 3 |
References _dmxColormapPriv::cmap, DMX_GET_COLORMAP_PRIV, dmxColormapFromDefaultVisual(), and dmxLookupVisualFromID().
Referenced by dmxBECreateWindowTree(), and dmxCreateWindow().
| Bool dmxInitWindow | ( | ScreenPtr | pScreen | ) |
| Bool dmxPositionWindow | ( | WindowPtr | pWindow, | a521 1d523 3 a525 2 | int | x, | a527 1d529 3 a531 2 | int | y | d535 2 a536 2 | ) | d538 1 d540 27 a566 5 |
| Bool dmxRealizeWindow | ( | WindowPtr | pWindow | ) |
| void dmxReparentWindow | ( | WindowPtr | pWindow, | a594 1d596 3 a598 2 | WindowPtr | pPriorParent | d602 2 a603 2 | ) | d605 1 d607 19 a625 14 |
| void dmxResizeRootWindow | ( | WindowPtr | pRoot, | a632 1d634 3 a636 2 | int | x, | a638 1d640 3 a642 2 | int | y, | a644 1d646 3 a648 2 | int | w, | a650 1d652 3 a654 2 | int | h | d658 2 a659 2 | ) | d661 1 d663 19 a681 14 |
| void dmxResizeScreenWindow | ( | ScreenPtr | pScreen, | a688 1d690 3 a692 2 | int | x, | a694 1d696 3 a698 2 | int | y, | a700 1d702 3 a704 2 | int | w, | a706 1d708 3 a710 2 | int | h | d714 2 a715 2 | ) | d717 1 d719 19 a737 12 |
| void dmxResizeWindow | ( | WindowPtr | pWindow, | a744 1d746 3 a748 2 | int | x, | a750 1d752 3 a754 2 | int | y, | a756 1d758 3 a760 2 | unsigned int | w, | a762 1d764 3 a766 2 | unsigned int | h, | a768 1d770 3 a772 2 | WindowPtr | pSib | d776 2 a777 2 | ) | d779 1 d781 19 a799 14 |
| void dmxRestackWindow | ( | WindowPtr | pWindow, | a806 1d808 3 a810 2 | WindowPtr | pOldNextSib | d814 2 a815 2 | ) | d817 1 d819 27 a845 3 |
| void dmxSetShape | ( | WindowPtr | pWindow, | a902 1a903 4 | int | kind |
| ) | a907 15 |
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 | ) | a909 24
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, | ||||||||
| d911 2 a912 2 | RegionPtr | prgn, | a914 1d916 2 a917 2 | RegionPtr | other_exposed | d919 22 d942 1 a942 4 | ) |