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