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