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