dmx.c File Reference
`#include <X11/X.h>`
`#include <X11/Xproto.h>`
`#include "misc.h"`
`#include "os.h"`
`#include "dixstruct.h"`
`#include "extnsionst.h"`
`#include "opaque.h"`
`#include "dmxextension.h"`
`#include <X11/extensions/dmxproto.h>`
`#include <X11/extensions/dmx.h>`
`#include "protocol-versions.h"`

## Functions

void | DMXExtensionInit (void)
static int | _DMXXineramaActive (void)
static void | dmxSetScreenAttribute (int bit, DMXScreenAttributesPtr attr, CARD32 value)
static int | dmxFetchScreenAttributes (unsigned int mask, DMXScreenAttributesPtr attr, CARD32 *value_list)
static void | dmxSetDesktopAttribute (int bit, DMXDesktopAttributesPtr attr, CARD32 value)
static int | dmxFetchDesktopAttributes (unsigned int mask, DMXDesktopAttributesPtr attr, CARD32 *value_list)
static void | dmxSetInputAttribute (int bit, DMXInputAttributesPtr attr, CARD32 value)
static int | dmxFetchInputAttributes (unsigned int mask, DMXInputAttributesPtr attr, CARD32 *value_list)
static int | ProcDMXQueryVersion (ClientPtr client)
static int | ProcDMXSync (ClientPtr client)
static int | ProcDMXForceWindowCreation (ClientPtr client)
static int | ProcDMXGetScreenCount (ClientPtr client)
static int | ProcDMXGetScreenAttributes (ClientPtr client)
static int | ProcDMXChangeScreensAttributes (ClientPtr client)
static int | ProcDMXAddScreen (ClientPtr client)
static int | ProcDMXRemoveScreen (ClientPtr client)
static int | dmxPopulate (ClientPtr client, Window window, CARD32 *screens, CARD32 *windows, xRectangle *pos, xRectangle *vis)
static int | dmxMaxNumScreens (void)
static int | ProcDMXGetWindowAttributes (ClientPtr client)
static int | ProcDMXGetDesktopAttributes (ClientPtr client)
static int | ProcDMXChangeDesktopAttributes (ClientPtr client)
static int | ProcDMXGetInputCount (ClientPtr client)
static int | ProcDMXGetInputAttributes (ClientPtr client)
static int | ProcDMXAddInput (ClientPtr client)
static int | ProcDMXRemoveInput (ClientPtr client)
static int | ProcDMXDispatch (ClientPtr client)
static int | SProcDMXQueryVersion (ClientPtr client)
static int | SProcDMXSync (ClientPtr client)
static int | SProcDMXForceWindowCreation (ClientPtr client)
static int | SProcDMXGetScreenCount (ClientPtr client)
static int | SProcDMXGetScreenAttributes (ClientPtr client)
static int | SProcDMXChangeScreensAttributes (ClientPtr client)
static int | SProcDMXAddScreen (ClientPtr client)
static int | SProcDMXRemoveScreen (ClientPtr client)
static int | SProcDMXGetWindowAttributes (ClientPtr client)
static int | SProcDMXGetDesktopAttributes (ClientPtr client)
static int | SProcDMXChangeDesktopAttributes (ClientPtr client)
static int | SProcDMXGetInputCount (ClientPtr client)
static int | SProcDMXGetInputAttributes (ClientPtr client)
static int | SProcDMXAddInput (ClientPtr client)
static int | SProcDMXRemoveInput (ClientPtr client)
static int | SProcDMXDispatch (ClientPtr client)

## Variables

static unsigned char | DMXCode

## Detailed Description

This file implements the server-side part of the DMX protocol. A vector of fucntions is provided at extension initialization time, so most all of the useful functions in this file are declared static and do not appear in the doxygen documentation.

Much of the low-level work is done by functions in dmxextension.c

Please see the Client-to-Server DMX Extension to the X Protocol document for details about the protocol.

## Function Documentation

static int _DMXXineramaActive | ( | void |  | ) | `[static]`

Referenced by ProcDMXChangeDesktopAttributes(), and ProcDMXChangeScreensAttributes().

void DMXExtensionInit | ( | void |  | ) |

Initialize the extension.

References DMXCode, ProcDMXDispatch(), and SProcDMXDispatch().

static int dmxFetchDesktopAttributes | ( | unsigned int | mask,
|  | DMXDesktopAttributesPtr | attr,
|  | CARD32 * | value_list
| ) |  | `[static]`

References dmxSetDesktopAttribute().

Referenced by ProcDMXChangeDesktopAttributes().

static int dmxFetchInputAttributes | ( | unsigned int | mask,
|  | DMXInputAttributesPtr | attr,
|  | CARD32 * | value_list
| ) |  | `[static]`

References dmxSetInputAttribute().

Referenced by ProcDMXAddInput().

static int dmxFetchScreenAttributes | ( | unsigned int | mask,
|  | DMXScreenAttributesPtr | attr,
|  | CARD32 * | value_list
| ) |  | `[static]`

References dmxSetScreenAttribute().

Referenced by ProcDMXAddScreen(), and ProcDMXChangeScreensAttributes().

static int dmxMaxNumScreens | ( | void |  | ) | `[static]`

Referenced by ProcDMXGetWindowAttributes().

static int dmxPopulate | ( | ClientPtr | client,
|  | Window | window,
|  | CARD32 * | screens,
|  | CARD32 * | windows,
|  | xRectangle * | pos,
|  | xRectangle * | vis
| ) |  | `[static]`

References dmxGetWindowAttributes(), DMXWindowAttributesRec::pos, DMXWindowAttributesRec::screen, DMXWindowAttributesRec::vis, and DMXWindowAttributesRec::window.

Referenced by ProcDMXGetWindowAttributes().

static void dmxSetDesktopAttribute | ( | int | bit,
|  | DMXDesktopAttributesPtr | attr,
|  | CARD32 | value
| ) |  | `[static]`

References DMXDesktopAttributesRec::height, DMXDesktopAttributesRec::shiftX, DMXDesktopAttributesRec::shiftY, and DMXDesktopAttributesRec::width.

Referenced by dmxFetchDesktopAttributes().

static void dmxSetInputAttribute | ( | int | bit,
|  | DMXInputAttributesPtr | attr,
|  | CARD32 | value
| ) |  | `[static]`

References DMXInputAttributesRec::inputType, DMXInputAttributesRec::physicalScreen, and DMXInputAttributesRec::sendsCore.

Referenced by dmxFetchInputAttributes().

static void dmxSetScreenAttribute | ( | int | bit,
|  | DMXScreenAttributesPtr | attr,
|  | CARD32 | value
| ) |  | `[static]`

References DMXScreenAttributesRec::rootWindowHeight, DMXScreenAttributesRec::rootWindowWidth, DMXScreenAttributesRec::rootWindowXoffset, DMXScreenAttributesRec::rootWindowXorigin, DMXScreenAttributesRec::rootWindowYoffset, DMXScreenAttributesRec::rootWindowYorigin, DMXScreenAttributesRec::screenWindowHeight, DMXScreenAttributesRec::screenWindowWidth, DMXScreenAttributesRec::screenWindowXoffset, and DMXScreenAttributesRec::screenWindowYoffset.

Referenced by dmxFetchScreenAttributes().

static int ProcDMXAddInput | ( | ClientPtr | client | ) | `[static]`

References dmxAddInput(), dmxFetchInputAttributes(), and DMXInputAttributesRec::name.

Referenced by ProcDMXDispatch(), and SProcDMXAddInput().

static int ProcDMXAddScreen | ( | ClientPtr | client | ) | `[static]`

References DMXScreenAttributesRec::displayName, dmxAttachScreen(), dmxFetchScreenAttributes(), and dmxGetScreenAttributes().

Referenced by ProcDMXDispatch(), and SProcDMXAddScreen().

static int ProcDMXChangeDesktopAttributes | ( | ClientPtr | client | ) | `[static]`

References _DMXXineramaActive(), dmxConfigureDesktop(), dmxFetchDesktopAttributes(), and dmxGetDesktopAttributes().

Referenced by ProcDMXDispatch(), and SProcDMXChangeDesktopAttributes().

static int ProcDMXChangeScreensAttributes | ( | ClientPtr | client | ) | `[static]`

References _DMXXineramaActive(), dmxConfigureScreenWindows(), dmxFetchScreenAttributes(), and dmxGetScreenAttributes().

Referenced by ProcDMXDispatch().

static int ProcDMXDispatch | ( | ClientPtr | client | ) | `[static]`

References ProcDMXAddInput(), ProcDMXAddScreen(), ProcDMXChangeDesktopAttributes(), ProcDMXChangeScreensAttributes(), ProcDMXForceWindowCreation(), ProcDMXGetDesktopAttributes(), ProcDMXGetInputAttributes(), ProcDMXGetInputCount(), ProcDMXGetScreenAttributes(), ProcDMXGetScreenCount(), ProcDMXGetWindowAttributes(), ProcDMXQueryVersion(), ProcDMXRemoveInput(), ProcDMXRemoveScreen(), and ProcDMXSync().

Referenced by DMXExtensionInit().

static int ProcDMXForceWindowCreation | ( | ClientPtr | client | ) | `[static]`

References dmxFlushPendingSyncs(), and dmxForceWindowCreation().

Referenced by ProcDMXDispatch(), and SProcDMXForceWindowCreation().

static int ProcDMXGetDesktopAttributes | ( | ClientPtr | client | ) | `[static]`

References dmxGetDesktopAttributes(), DMXDesktopAttributesRec::height, DMXDesktopAttributesRec::shiftX, DMXDesktopAttributesRec::shiftY, and DMXDesktopAttributesRec::width.

Referenced by ProcDMXDispatch(), and SProcDMXGetDesktopAttributes().

static int ProcDMXGetInputAttributes | ( | ClientPtr | client | ) | `[static]`

References DMXInputAttributesRec::detached, dmxGetInputAttributes(), DMXInputAttributesRec::inputType, DMXInputAttributesRec::isCore, DMXInputAttributesRec::name, DMXInputAttributesRec::physicalId, DMXInputAttributesRec::physicalScreen, and DMXInputAttributesRec::sendsCore.

Referenced by ProcDMXDispatch(), and SProcDMXGetInputAttributes().

static int ProcDMXGetInputCount | ( | ClientPtr | client | ) | `[static]`

References dmxGetInputCount().

Referenced by ProcDMXDispatch(), and SProcDMXGetInputCount().

static int ProcDMXGetScreenAttributes | ( | ClientPtr | client | ) | `[static]`

References DMXScreenAttributesRec::displayName, dmxGetNumScreens(), dmxGetScreenAttributes(), DMXScreenAttributesRec::logicalScreen, DMXScreenAttributesRec::rootWindowHeight, DMXScreenAttributesRec::rootWindowWidth, DMXScreenAttributesRec::rootWindowXoffset, DMXScreenAttributesRec::rootWindowXorigin, DMXScreenAttributesRec::rootWindowYoffset, DMXScreenAttributesRec::rootWindowYorigin, DMXScreenAttributesRec::screenWindowHeight, DMXScreenAttributesRec::screenWindowWidth, DMXScreenAttributesRec::screenWindowXoffset, and DMXScreenAttributesRec::screenWindowYoffset.

Referenced by ProcDMXDispatch(), SProcDMXChangeScreensAttributes(), and SProcDMXGetScreenAttributes().

static int ProcDMXGetScreenCount | ( | ClientPtr | client | ) | `[static]`

References dmxGetNumScreens().

Referenced by ProcDMXDispatch(), and SProcDMXGetScreenCount().

static int ProcDMXGetWindowAttributes | ( | ClientPtr | client | ) | `[static]`

References dmxFlushPendingSyncs(), dmxMaxNumScreens(), dmxPopulate(), and pos.

Referenced by ProcDMXDispatch(), and SProcDMXGetWindowAttributes().

static int ProcDMXQueryVersion | ( | ClientPtr | client | ) | `[static]`

Referenced by ProcDMXDispatch(), and SProcDMXQueryVersion().

static int ProcDMXRemoveInput | ( | ClientPtr | client | ) | `[static]`

References dmxRemoveInput().

Referenced by ProcDMXDispatch(), and SProcDMXRemoveInput().

static int ProcDMXRemoveScreen | ( | ClientPtr | client | ) | `[static]`

References dmxDetachScreen().

Referenced by ProcDMXDispatch(), and SProcDMXRemoveScreen().

static int ProcDMXSync | ( | ClientPtr | client | ) | `[static]`

References dmxFlushPendingSyncs().

Referenced by ProcDMXDispatch(), and SProcDMXSync().

static int SProcDMXAddInput | ( | ClientPtr | client | ) | `[static]`

References ProcDMXAddInput().

Referenced by SProcDMXDispatch().

static int SProcDMXAddScreen | ( | ClientPtr | client | ) | `[static]`

References ProcDMXAddScreen().

Referenced by SProcDMXDispatch().

static int SProcDMXChangeDesktopAttributes | ( | ClientPtr | client | ) | `[static]`

References ProcDMXChangeDesktopAttributes().

Referenced by SProcDMXDispatch().

static int SProcDMXChangeScreensAttributes | ( | ClientPtr | client | ) | `[static]`

References ProcDMXGetScreenAttributes().

Referenced by SProcDMXDispatch().

static int SProcDMXDispatch | ( | ClientPtr | client | ) | `[static]`

References SProcDMXAddInput(), SProcDMXAddScreen(), SProcDMXChangeDesktopAttributes(), SProcDMXChangeScreensAttributes(), SProcDMXForceWindowCreation(), SProcDMXGetDesktopAttributes(), SProcDMXGetInputAttributes(), SProcDMXGetInputCount(), SProcDMXGetScreenAttributes(), SProcDMXGetScreenCount(), SProcDMXGetWindowAttributes(), SProcDMXQueryVersion(), SProcDMXRemoveInput(), SProcDMXRemoveScreen(), and SProcDMXSync().

Referenced by DMXExtensionInit().

static int SProcDMXForceWindowCreation | ( | ClientPtr | client | ) | `[static]`

References ProcDMXForceWindowCreation().

Referenced by SProcDMXDispatch().

static int SProcDMXGetDesktopAttributes | ( | ClientPtr | client | ) | `[static]`

References ProcDMXGetDesktopAttributes().

Referenced by SProcDMXDispatch().

static int SProcDMXGetInputAttributes | ( | ClientPtr | client | ) | `[static]`

References ProcDMXGetInputAttributes().

Referenced by SProcDMXDispatch().

static int SProcDMXGetInputCount | ( | ClientPtr | client | ) | `[static]`

References ProcDMXGetInputCount().

Referenced by SProcDMXDispatch().

static int SProcDMXGetScreenAttributes | ( | ClientPtr | client | ) | `[static]`

References ProcDMXGetScreenAttributes().

Referenced by SProcDMXDispatch().

static int SProcDMXGetScreenCount | ( | ClientPtr | client | ) | `[static]`

References ProcDMXGetScreenCount().

Referenced by SProcDMXDispatch().

static int SProcDMXGetWindowAttributes | ( | ClientPtr | client | ) | `[static]`

References ProcDMXGetWindowAttributes().

Referenced by SProcDMXDispatch().

static int SProcDMXQueryVersion | ( | ClientPtr | client | ) | `[static]`

References ProcDMXQueryVersion().

Referenced by SProcDMXDispatch().

static int SProcDMXRemoveInput | ( | ClientPtr | client | ) | `[static]`

References ProcDMXRemoveInput().

Referenced by SProcDMXDispatch().

static int SProcDMXRemoveScreen | ( | ClientPtr | client | ) | `[static]`

References ProcDMXRemoveScreen().

Referenced by SProcDMXDispatch().

static int SProcDMXSync | ( | ClientPtr | client | ) | `[static]`

References ProcDMXSync().

Referenced by SProcDMXDispatch().

## Variable Documentation

unsigned char DMXCode `[static]`

Referenced by DMXExtensionInit().