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