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