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