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.30; author mrg; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2008.07.31.19.50.30; author mrg; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2010.11.23.05.21.16; author mrg; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2011.08.02.06.56.50; author mrg; state Exp; branches; next ; desc @@ 1.2 log @first merge of netbsd changes. not tested yet. @ text @
#include "dmx.h"#include "dmxinit.h"#include "dmxextension.h"#include "dmxwindow.h"#include "dmxcb.h"#include "dmxcursor.h"#include "dmxpixmap.h"#include "dmxgc.h"#include "dmxfont.h"#include "dmxcmap.h"#include "dmxpict.h"#include "dmxinput.h"#include "dmxsync.h"#include "dmxscrinit.h"#include "input/dmxinputinit.h"#include "windowstr.h"#include "inputstr.h"#include "dmxproto.h"#include "cursorstr.h"Functions | |
| Bool | dmxGetScreenAttributes (int physical, DMXScreenAttributesPtr attr) |
| Bool | dmxGetWindowAttributes (WindowPtr pWindow, DMXWindowAttributesPtr attr) |
| int | dmxGetInputCount (void) |
| int | dmxGetInputAttributes (int deviceId, DMXInputAttributesPtr attr) |
| int | dmxAddInput (DMXInputAttributesPtr attr, int *id) |
| int | dmxRemoveInput (int id) |
| unsigned long | dmxGetNumScreens (void) |
| void | dmxForceWindowCreation (WindowPtr pWindow) |
| void | dmxFlushPendingSyncs (void) |
| int | dmxAttachScreen (int idx, DMXScreenAttributesPtr attr) |
| int | dmxDetachScreen (int idx) |
|
||||||||||||
|
Add an input with the specified attributes. If the input is added, the physical id is returned in deviceId. |
|
||||||||||||
|
Reattach previously detached back-end screen. |
|
|
Detach back-end screen. |
|
|
Flush pending syncs for all screens. |
|
|
Make sure that dmxCreateAndRealizeWindow has been called for pWindow. |
|
||||||||||||
|
Return information about the device with id = deviceId. This information is primarily for the ProcDMXGetInputAttributes() function, which does not have access to the appropriate data structure. |
|
|
Return the total number of devices, not just dmxNumInputs. The number returned should be the same as that returned by XListInputDevices. |
|
|
Return the value of dmxNumScreens -- the total number of backend screens in use (these are logical screens and may be larger than the number of backend displays). |
|
||||||||||||
|
This routine provides information to the DMX protocol extension about a particular screen. |
|
||||||||||||
|
This routine provides information to the DMX protocol extension about a particular window. |
|
|
Remove the input with physical id id. |
#include <stdlib.h>#include "dmx.h"#include "dmxinit.h"#include "dmxextension.h"#include "dmxwindow.h"#include "dmxcb.h"#include "dmxcursor.h"#include "dmxpixmap.h"#include "dmxgc.h"#include "dmxfont.h"#include "dmxcmap.h"#include "dmxpict.h"#include "dmxinput.h"#include "dmxsync.h"#include "dmxscrinit.h"#include "input/dmxinputinit.h"#include "windowstr.h"#include "inputstr.h"#include <X11/extensions/dmxproto.h>#include "cursorstr.h"Functions | |
| Bool | dmxGetScreenAttributes (int physical, DMXScreenAttributesPtr attr) |
| Bool | dmxGetWindowAttributes (WindowPtr pWindow, DMXWindowAttributesPtr attr) |
| void | dmxGetDesktopAttributes (DMXDesktopAttributesPtr attr) |
| int | dmxGetInputCount (void) |
| int | dmxGetInputAttributes (int deviceId, DMXInputAttributesPtr attr) |
| static void | dmxAdjustCursorBoundaries (void) |
| int | dmxAddInput (DMXInputAttributesPtr attr, int *id) |
| int | dmxRemoveInput (int id) |
| unsigned long | dmxGetNumScreens (void) |
| void | dmxForceWindowCreation (WindowPtr pWindow) |
| void | dmxFlushPendingSyncs (void) |
| void | dmxUpdateScreenResources (ScreenPtr pScreen, int x, int y, int w, int h) |
| static void | dmxBECreateScratchGCs (int scrnNum) |
| static void | dmxBERestorePixmap (PixmapPtr pPixmap) |
| static void | dmxBECreateResources (pointer value, XID id, RESTYPE type, pointer n) |
| static void | dmxBECreateWindowTree (int idx) |
| static void | dmxForceExposures (int idx) |
| static Bool | dmxCompareScreens (DMXScreenInfo *new, DMXScreenInfo *old) |
| static void | dmxBERestoreRenderPict (pointer value, XID id, pointer n) |
| static void | dmxBERestoreRenderGlyph (pointer value, XID id, pointer n) |
| int | dmxAttachScreen (int idx, DMXScreenAttributesPtr attr) |
| static void | dmxBESavePixmap (PixmapPtr pPixmap) |
| static void | dmxBEDestroyResources (pointer value, XID id, RESTYPE type, pointer n) |
| static void | dmxBEDestroyScratchGCs (int scrnNum) |
| static void | dmxBEDestroyWindowTree (int idx) |
| int | dmxDetachScreen (int idx) |
Variables | |
| FontPtr | defaultFont |
This file provides the only interface to the X server extension support in programs/Xserver/Xext. Those programs should only include dmxext.h
| int dmxAddInput | ( | DMXInputAttributesPtr | attr, | |
| int * | id | |||
| ) |
Add an input with the specified attributes. If the input is added, the physical id is returned in deviceId.
d47 1 a47 1References dmxAdjustCursorBoundaries(), dmxInputAttachBackend(), dmxInputAttachConsole(), dmxSync(), DMXInputAttributesRec::inputType, DMXInputAttributesRec::name, DMXInputAttributesRec::physicalScreen, and DMXInputAttributesRec::sendsCore.
d49 1 a49 1Referenced by ProcDMXAddInput().
d51 1 a51 18| static void dmxAdjustCursorBoundaries | ( | void | ) | [static] |
Reinitialized the cursor boundaries.
d53 1 a53 1References _DMXInputInfo::detached, DMX_NO_RECOMPUTE_BOUNDING_BOX, dmxCheckCursor(), dmxComputeWidthHeight(), dmxConnectionBlockCallback(), dmxInitOverlap(), dmxInputLateReInit(), dmxInputReInit(), dmxInputs, dmxNumInputs, and dmxReInitOrigins().
d55 8 a62 8Referenced by dmxAddInput(), and dmxDetachScreen().
| int dmxAttachScreen | ( | int | idx, | a69 1d71 3 a73 2 | DMXScreenAttributesPtr | attr | d77 2 a78 2 | ) | d80 1 d82 19 a100 20 |
| static void dmxBECreateResources | ( | pointer | value, | XID | id, | a107 1a108 5 | RESTYPE | type, |
| d110 2 a111 2 | pointer | n | d115 2 a116 2 | ) | [static] |
a117 6
Create resources on the back-end server. This function is called from dmxAttachScreen() via the dix layer's FindAllResources function. It walks all resources, compares them to the screen number passed in as n and calls the appropriate DMX function to create the associated resource on the back-end server.
References defaultFont, dmxBECreateColormap(), dmxBECreateCursor(), dmxBECreateGC(), dmxBECreatePixmap(), dmxBEFreeGlyphSet(), dmxBELoadFont(), dmxBERestorePixmap(), and dmxChangeGC().
a118 16Referenced by dmxAttachScreen().
| static void dmxBECreateScratchGCs | ( | int | scrnNum | ) | [static] |
| static void dmxBECreateWindowTree | ( | int | idx | ) | [static] |
a146 6
Create window hierachy on back-end server. The window tree is created in a special order (bottom most subwindow first) so that the dmxCreateNonRootWindow() function does not need to recursively call itself to create each window's parents. This is required so that we have the opportunity to create each window's border and background pixmaps (where appropriate) before the window is created.
References _DMXScreenInfo::beDisplay, _dmxWinPriv::cmap, DMX_GET_WINDOW_PRIV, dmxBECreatePixmap(), dmxBERestorePixmap(), dmxCreateAndRealizeWindow(), dmxCreateRootWindow(), dmxGetDefaultWindowAttributes(), dmxScreens, _dmxWinPriv::mapped, _dmxWinPriv::offscreen, _DMXScreenInfo::rootWin, _dmxWinPriv::visual, and _dmxWinPriv::window.
a147 37Referenced by dmxAttachScreen().
| static void dmxBEDestroyResources | ( | pointer | value, | ||||
| XID | id, | ||||||
| RESTYPE | type, | ||||||
| pointer | n | ||||||
| ) | [static] |
| static void dmxBEDestroyScratchGCs | ( | int | scrnNum | ) | [static] |
a175 6
Destroy the scratch GCs that are created per depth.
References dmxBEFreeGC().
a176 16Referenced by dmxDetachScreen().
| static void dmxBEDestroyWindowTree | ( | int | idx | ) | [static] |
| static void dmxBERestorePixmap | ( | PixmapPtr | pPixmap | ) | [static] |
a204 4
Restore the pixmap image either from another screen or from an image that was saved when the screen was previously detached.
a205 33References _DMXScreenInfo::beDisplay, _DMXScreenInfo::beNumPixmapFormats, _DMXScreenInfo::bePixmapFormats, _dmxPixPriv::detachedImage, DMX_GET_PIXMAP_PRIV, dmxLog(), dmxScreens, dmxWarning, _dmxPixPriv::pixmap, and _DMXScreenInfo::scrnDefDrawables.
Referenced by dmxAttachScreen(), dmxBECreateResources(), dmxBECreateWindowTree(), and dmxBERestoreRenderPict().
| static void dmxBERestoreRenderGlyph | ( | pointer | value, | ||||
| XID | id, | ||||||
| pointer | n | ||||||
| ) | [static] |
| static void dmxBERestoreRenderPict | ( | pointer | value, | a232 1a233 5 | XID | id, | |
| d235 2 a236 2 | pointer | n | d240 2 a241 2 | ) | [static] |
a242 8
Restore Render's picture
References dmxBECreatePicture(), dmxBECreatePixmap(), and dmxBERestorePixmap().
Referenced by dmxAttachScreen().
a243 14| static void dmxBESavePixmap | ( | PixmapPtr | pPixmap | ) | [static] |
| static Bool dmxCompareScreens | ( | DMXScreenInfo * | new, | |
| DMXScreenInfo * | old | a271 11 | ||
| ) | [static] |
Compare the new and old screens to see if they are compatible.
References _DMXScreenInfo::beBPP, _DMXScreenInfo::beDefVisualIndex, _DMXScreenInfo::beDepth, _DMXScreenInfo::beDepths, _DMXScreenInfo::beHeight, _DMXScreenInfo::beNumDepths, _DMXScreenInfo::beNumPixmapFormats, _DMXScreenInfo::beNumVisuals, _DMXScreenInfo::bePixmapFormats, _DMXScreenInfo::beVisuals, and _DMXScreenInfo::beWidth.
a272 16Referenced by dmxAttachScreen().
| int dmxDetachScreen | ( | int | idx | ) |
| void dmxFlushPendingSyncs | ( | void | ) | a300 8 |
Flush pending syncs for all screens.
References dmxSync().
Referenced by ProcDMXForceWindowCreation(), ProcDMXGetWindowAttributes(), and ProcDMXSync().
a301 14| static void dmxForceExposures | ( | int | idx | ) | [static] |
| void dmxForceWindowCreation | ( | WindowPtr | pWindow | ) | a327 15 |
Make sure that dmxCreateAndRealizeWindow has been called for pWindow.
References DMX_GET_WINDOW_PRIV, dmxCreateAndRealizeWindow(), and _dmxWinPriv::window.
Referenced by ProcDMXForceWindowCreation().
| void dmxGetDesktopAttributes | ( | DMXDesktopAttributesPtr | attr | ) | a329 23
| int dmxGetInputAttributes | ( | int | deviceId, | ||||
| d331 2 a332 2 | DMXInputAttributesPtr | attr | d336 2 a337 2 | ) | a338 6 |
Return information about the device with id = deviceId. This information is primarily for the ProcDMXGetInputAttributes() function, which does not have access to the appropriate data structure.
References _DMXInputInfo::detached, DMXInputAttributesRec::detached, _DMXLocalInputInfo::deviceId, _DMXInputInfo::devs, DMX_LOCAL_TYPE_BACKEND, DMX_LOCAL_TYPE_COMMON, DMX_LOCAL_TYPE_CONSOLE, DMX_LOCAL_TYPE_LOCAL, dmxInputs, dmxNumInputs, _DMXLocalInputInfo::extType, DMXInputAttributesRec::inputType, _DMXLocalInputInfo::isCore, DMXInputAttributesRec::isCore, _DMXInputInfo::name, DMXInputAttributesRec::name, _DMXInputInfo::numDevs, _DMXLocalInputInfo::pDevice, DMXInputAttributesRec::physicalId, DMXInputAttributesRec::physicalScreen, _DMXInputInfo::scrnIdx, _DMXLocalInputInfo::sendsCore, and DMXInputAttributesRec::sendsCore.
a339 16Referenced by ProcDMXGetInputAttributes().
| int dmxGetInputCount | ( | void | ) |
| unsigned long dmxGetNumScreens | ( | void | ) | a365 15 |
Return the value of dmxNumScreens -- the total number of backend screens in use (these are logical screens and may be larger than the number of backend displays).
References dmxNumScreens.
Referenced by ProcDMXGetScreenAttributes(), and ProcDMXGetScreenCount().
| Bool dmxGetScreenAttributes | ( | int | physical, | |
| a367 31 | DMXScreenAttributesPtr | attr | ||
| ) |
This routine provides information to the DMX protocol extension about a particular screen.
References DMXScreenAttributesRec::displayName, dmxNumScreens, dmxScreens, _DMXScreenInfo::index, DMXScreenAttributesRec::logicalScreen, _DMXScreenInfo::name, _DMXScreenInfo::rootHeight, _DMXScreenInfo::rootWidth, DMXScreenAttributesRec::rootWindowHeight, DMXScreenAttributesRec::rootWindowWidth, DMXScreenAttributesRec::rootWindowXoffset, DMXScreenAttributesRec::rootWindowXorigin, DMXScreenAttributesRec::rootWindowYoffset, DMXScreenAttributesRec::rootWindowYorigin, _DMXScreenInfo::rootX, _DMXScreenInfo::rootXOrigin, _DMXScreenInfo::rootY, _DMXScreenInfo::rootYOrigin, DMXScreenAttributesRec::screenWindowHeight, DMXScreenAttributesRec::screenWindowWidth, DMXScreenAttributesRec::screenWindowXoffset, DMXScreenAttributesRec::screenWindowYoffset, _DMXScreenInfo::scrnHeight, _DMXScreenInfo::scrnWidth, _DMXScreenInfo::scrnX, and _DMXScreenInfo::scrnY.
Referenced by ProcDMXAddScreen(), ProcDMXChangeScreensAttributes(), and ProcDMXGetScreenAttributes().
| Bool dmxGetWindowAttributes | ( | WindowPtr | pWindow, | ||||
| d369 2 a370 2 | DMXWindowAttributesPtr | attr | d374 2 a375 2 | ) | a376 4 |
This routine provides information to the DMX protocol extension about a particular window.
a377 18References DMX_GET_WINDOW_PRIV, _dmxWinPriv::offscreen, DMXWindowAttributesRec::pos, DMXWindowAttributesRec::screen, DMXWindowAttributesRec::vis, _dmxWinPriv::window, and DMXWindowAttributesRec::window.
Referenced by dmxPopulate().
| int dmxRemoveInput | ( | int | id | ) |
| void dmxUpdateScreenResources | ( | ScreenPtr | pScreen, | |
| int | x, | |||
| int | y, | |||
| int | w, | |||
| int | h | |||
| ) | a405 8 |
Update DMX's screen resources to match those of the newly moved and/or resized "root" window.
References _DMXScreenInfo::beXDPI, _DMXScreenInfo::beYDPI, and dmxScreens.
Referenced by dmxCreateWindow().
a406 10| FontPtr defaultFont |