f78b12e570284aa8291f4ca1add24937fd107403vboxsync/*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * All Rights Reserved.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Permission is hereby granted, free of charge, to any person obtaining
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * a copy of this software and associated documentation files (the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * "Software"), to deal in the Software without restriction, including
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * without limitation on the rights to use, copy, modify, merge,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * publish, distribute, sublicense, and/or sell copies of the Software,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * and to permit persons to whom the Software is furnished to do so,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * subject to the following conditions:
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * The above copyright notice and this permission notice (including the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * next paragraph) shall be included in all copies or substantial
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * portions of the Software.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * SOFTWARE.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Author:
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Rickard E. (Rik) Faith <faith@redhat.com>
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Kevin E. Martin <kem@redhat.com>
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** \file
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Interface for DMX extension support. These routines are called by
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * function in Xserver/Xext/dmx.c. \see dmxextension.c */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#ifndef _DMXEXTENSION_H_
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define _DMXEXTENSION_H_
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** Screen attributes. Used by #ProcDMXGetScreenAttributes and
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * \a ProcDMXChangeScreensAttributes. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync const char *displayName;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int logicalScreen;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned int screenWindowWidth; /* displayName's coordinate system */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned int screenWindowHeight; /* displayName's coordinate system */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int screenWindowXoffset; /* displayName's coordinate system */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int screenWindowYoffset; /* displayName's coordinate system */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned int rootWindowWidth; /* screenWindow's coordinate system */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned int rootWindowHeight; /* screenWindow's coordinate system */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int rootWindowXoffset; /* screenWindow's coordinate system */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int rootWindowYoffset; /* screenWindow's coordinate system */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int rootWindowXorigin; /* global coordinate system */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int rootWindowYorigin; /* global coordinate system */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} DMXScreenAttributesRec, *DMXScreenAttributesPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** Window attributes. Used by #ProcDMXGetWindowAttributes. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int screen;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Window window;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xRectangle pos;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xRectangle vis;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} DMXWindowAttributesRec, *DMXWindowAttributesPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** Desktop attributes. Used by #ProcDMXGetDesktopAttributes and
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * #ProcDMXChangeDesktopAttributes. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int width;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int height;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int shiftX;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int shiftY;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} DMXDesktopAttributesRec, *DMXDesktopAttributesPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** Input attributes. Used by #ProcDMXGetInputAttributes. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync const char *name;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int inputType;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int physicalScreen;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int physicalId;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int isCore;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int sendsCore;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int detached;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} DMXInputAttributesRec, *DMXInputAttributesPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern unsigned long dmxGetNumScreens(void);
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern void dmxForceWindowCreation(WindowPtr pWindow);
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern void dmxFlushPendingSyncs(void);
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern Bool dmxGetScreenAttributes(int physical,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DMXScreenAttributesPtr attr);
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern Bool dmxGetWindowAttributes(WindowPtr pWindow,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DMXWindowAttributesPtr attr);
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern void dmxGetDesktopAttributes(DMXDesktopAttributesPtr attr);
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern int dmxGetInputCount(void);
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern int dmxGetInputAttributes(int deviceId,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DMXInputAttributesPtr attr);
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern int dmxAddInput(DMXInputAttributesPtr attr, int *deviceId);
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern int dmxRemoveInput(int deviceId);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern int dmxConfigureScreenWindows(int nscreens,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync CARD32 *screens,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DMXScreenAttributesPtr attribs,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int *errorScreen);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern int dmxConfigureDesktop(DMXDesktopAttributesPtr attribs);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* dmxUpdateScreenResources exposed for dmxCreateWindow in dmxwindow.c */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern void dmxUpdateScreenResources(ScreenPtr pScreen,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int x, int y, int w, int h);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern int dmxAttachScreen(int idx, DMXScreenAttributesPtr attr);
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern int dmxDetachScreen(int idx);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#endif