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