1706f2543Smrg/* 2706f2543Smrg * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina. 3706f2543Smrg * 4706f2543Smrg * All Rights Reserved. 5706f2543Smrg * 6706f2543Smrg * Permission is hereby granted, free of charge, to any person obtaining 7706f2543Smrg * a copy of this software and associated documentation files (the 8706f2543Smrg * "Software"), to deal in the Software without restriction, including 9706f2543Smrg * without limitation on the rights to use, copy, modify, merge, 10706f2543Smrg * publish, distribute, sublicense, and/or sell copies of the Software, 11706f2543Smrg * and to permit persons to whom the Software is furnished to do so, 12706f2543Smrg * subject to the following conditions: 13706f2543Smrg * 14706f2543Smrg * The above copyright notice and this permission notice (including the 15706f2543Smrg * next paragraph) shall be included in all copies or substantial 16706f2543Smrg * portions of the Software. 17706f2543Smrg * 18706f2543Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19706f2543Smrg * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20706f2543Smrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 21706f2543Smrg * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS 22706f2543Smrg * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 23706f2543Smrg * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 24706f2543Smrg * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 25706f2543Smrg * SOFTWARE. 26706f2543Smrg */ 27706f2543Smrg 28706f2543Smrg/* 29706f2543Smrg * Author: 30706f2543Smrg * Rickard E. (Rik) Faith <faith@redhat.com> 31706f2543Smrg * Kevin E. Martin <kem@redhat.com> 32706f2543Smrg * 33706f2543Smrg */ 34706f2543Smrg 35706f2543Smrg/** \file 36706f2543Smrg * Interface for DMX extension support. These routines are called by 37706f2543Smrg * function in Xserver/Xext/dmx.c. \see dmxextension.c */ 38706f2543Smrg 39706f2543Smrg#ifndef _DMXEXTENSION_H_ 40706f2543Smrg#define _DMXEXTENSION_H_ 41706f2543Smrg 42706f2543Smrg/** Screen attributes. Used by #ProcDMXGetScreenAttributes and 43706f2543Smrg * \a ProcDMXChangeScreensAttributes. */ 44706f2543Smrgtypedef struct { 45706f2543Smrg const char *displayName; 46706f2543Smrg int logicalScreen; 47706f2543Smrg 48706f2543Smrg unsigned int screenWindowWidth; /* displayName's coordinate system */ 49706f2543Smrg unsigned int screenWindowHeight; /* displayName's coordinate system */ 50706f2543Smrg int screenWindowXoffset; /* displayName's coordinate system */ 51706f2543Smrg int screenWindowYoffset; /* displayName's coordinate system */ 52706f2543Smrg 53706f2543Smrg unsigned int rootWindowWidth; /* screenWindow's coordinate system */ 54706f2543Smrg unsigned int rootWindowHeight; /* screenWindow's coordinate system */ 55706f2543Smrg int rootWindowXoffset; /* screenWindow's coordinate system */ 56706f2543Smrg int rootWindowYoffset; /* screenWindow's coordinate system */ 57706f2543Smrg 58706f2543Smrg int rootWindowXorigin; /* global coordinate system */ 59706f2543Smrg int rootWindowYorigin; /* global coordinate system */ 60706f2543Smrg} DMXScreenAttributesRec, *DMXScreenAttributesPtr; 61706f2543Smrg 62706f2543Smrg/** Window attributes. Used by #ProcDMXGetWindowAttributes. */ 63706f2543Smrgtypedef struct { 64706f2543Smrg int screen; 65706f2543Smrg Window window; 66706f2543Smrg xRectangle pos; 67706f2543Smrg xRectangle vis; 68706f2543Smrg} DMXWindowAttributesRec, *DMXWindowAttributesPtr; 69706f2543Smrg 70706f2543Smrg/** Desktop attributes. Used by #ProcDMXGetDesktopAttributes and 71706f2543Smrg * #ProcDMXChangeDesktopAttributes. */ 72706f2543Smrgtypedef struct { 73706f2543Smrg int width; 74706f2543Smrg int height; 75706f2543Smrg int shiftX; 76706f2543Smrg int shiftY; 77706f2543Smrg} DMXDesktopAttributesRec, *DMXDesktopAttributesPtr; 78706f2543Smrg 79706f2543Smrg/** Input attributes. Used by #ProcDMXGetInputAttributes. */ 80706f2543Smrgtypedef struct { 81706f2543Smrg const char *name; 82706f2543Smrg int inputType; 83706f2543Smrg int physicalScreen; 84706f2543Smrg int physicalId; 85706f2543Smrg int isCore; 86706f2543Smrg int sendsCore; 87706f2543Smrg int detached; 88706f2543Smrg} DMXInputAttributesRec, *DMXInputAttributesPtr; 89706f2543Smrg 90706f2543Smrg 91706f2543Smrgextern unsigned long dmxGetNumScreens(void); 92706f2543Smrgextern void dmxForceWindowCreation(WindowPtr pWindow); 93706f2543Smrgextern void dmxFlushPendingSyncs(void); 94706f2543Smrgextern Bool dmxGetScreenAttributes(int physical, 95706f2543Smrg DMXScreenAttributesPtr attr); 96706f2543Smrgextern Bool dmxGetWindowAttributes(WindowPtr pWindow, 97706f2543Smrg DMXWindowAttributesPtr attr); 98706f2543Smrgextern void dmxGetDesktopAttributes(DMXDesktopAttributesPtr attr); 99706f2543Smrgextern int dmxGetInputCount(void); 100706f2543Smrgextern int dmxGetInputAttributes(int deviceId, 101706f2543Smrg DMXInputAttributesPtr attr); 102706f2543Smrgextern int dmxAddInput(DMXInputAttributesPtr attr, int *deviceId); 103706f2543Smrgextern int dmxRemoveInput(int deviceId); 104706f2543Smrg 105706f2543Smrgextern int dmxConfigureScreenWindows(int nscreens, 106706f2543Smrg CARD32 *screens, 107706f2543Smrg DMXScreenAttributesPtr attribs, 108706f2543Smrg int *errorScreen); 109706f2543Smrg 110706f2543Smrgextern int dmxConfigureDesktop(DMXDesktopAttributesPtr attribs); 111706f2543Smrg 112706f2543Smrg/* dmxUpdateScreenResources exposed for dmxCreateWindow in dmxwindow.c */ 113706f2543Smrgextern void dmxUpdateScreenResources(ScreenPtr pScreen, 114706f2543Smrg int x, int y, int w, int h); 115706f2543Smrg 116706f2543Smrgextern int dmxAttachScreen(int idx, DMXScreenAttributesPtr attr); 117706f2543Smrgextern int dmxDetachScreen(int idx); 118706f2543Smrg#endif 119