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