1 | /*
|
---|
2 | * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina.
|
---|
3 | *
|
---|
4 | * All Rights Reserved.
|
---|
5 | *
|
---|
6 | * Permission is hereby granted, free of charge, to any person obtaining
|
---|
7 | * a copy of this software and associated documentation files (the
|
---|
8 | * "Software"), to deal in the Software without restriction, including
|
---|
9 | * without limitation on the rights to use, copy, modify, merge,
|
---|
10 | * publish, distribute, sublicense, and/or sell copies of the Software,
|
---|
11 | * and to permit persons to whom the Software is furnished to do so,
|
---|
12 | * subject to the following conditions:
|
---|
13 | *
|
---|
14 | * The above copyright notice and this permission notice (including the
|
---|
15 | * next paragraph) shall be included in all copies or substantial
|
---|
16 | * portions of the Software.
|
---|
17 | *
|
---|
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
---|
19 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
---|
20 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
---|
21 | * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
|
---|
22 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
---|
23 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
---|
24 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
---|
25 | * SOFTWARE.
|
---|
26 | */
|
---|
27 |
|
---|
28 | /*
|
---|
29 | * Author:
|
---|
30 | * Rickard E. (Rik) Faith <[email protected]>
|
---|
31 | * Kevin E. Martin <[email protected]>
|
---|
32 | *
|
---|
33 | */
|
---|
34 |
|
---|
35 | /** \file
|
---|
36 | * Interface for DMX extension support. These routines are called by
|
---|
37 | * function in Xserver/Xext/dmx.c. \see dmxextension.c */
|
---|
38 |
|
---|
39 | #ifndef _DMXEXTENSION_H_
|
---|
40 | #define _DMXEXTENSION_H_
|
---|
41 |
|
---|
42 | /** Screen attributes. Used by #ProcDMXGetScreenAttributes and
|
---|
43 | * \a ProcDMXChangeScreensAttributes. */
|
---|
44 | typedef struct {
|
---|
45 | const char *displayName;
|
---|
46 | int logicalScreen;
|
---|
47 |
|
---|
48 | unsigned int screenWindowWidth; /* displayName's coordinate system */
|
---|
49 | unsigned int screenWindowHeight; /* displayName's coordinate system */
|
---|
50 | int screenWindowXoffset; /* displayName's coordinate system */
|
---|
51 | int screenWindowYoffset; /* displayName's coordinate system */
|
---|
52 |
|
---|
53 | unsigned int rootWindowWidth; /* screenWindow's coordinate system */
|
---|
54 | unsigned int rootWindowHeight; /* screenWindow's coordinate system */
|
---|
55 | int rootWindowXoffset; /* screenWindow's coordinate system */
|
---|
56 | int rootWindowYoffset; /* screenWindow's coordinate system */
|
---|
57 |
|
---|
58 | int rootWindowXorigin; /* global coordinate system */
|
---|
59 | int rootWindowYorigin; /* global coordinate system */
|
---|
60 | } DMXScreenAttributesRec, *DMXScreenAttributesPtr;
|
---|
61 |
|
---|
62 | /** Window attributes. Used by #ProcDMXGetWindowAttributes. */
|
---|
63 | typedef struct {
|
---|
64 | int screen;
|
---|
65 | Window window;
|
---|
66 | xRectangle pos;
|
---|
67 | xRectangle vis;
|
---|
68 | } DMXWindowAttributesRec, *DMXWindowAttributesPtr;
|
---|
69 |
|
---|
70 | /** Desktop attributes. Used by #ProcDMXGetDesktopAttributes and
|
---|
71 | * #ProcDMXChangeDesktopAttributes. */
|
---|
72 | typedef struct {
|
---|
73 | int width;
|
---|
74 | int height;
|
---|
75 | int shiftX;
|
---|
76 | int shiftY;
|
---|
77 | } DMXDesktopAttributesRec, *DMXDesktopAttributesPtr;
|
---|
78 |
|
---|
79 | /** Input attributes. Used by #ProcDMXGetInputAttributes. */
|
---|
80 | typedef struct {
|
---|
81 | const char *name;
|
---|
82 | int inputType;
|
---|
83 | int physicalScreen;
|
---|
84 | int physicalId;
|
---|
85 | int isCore;
|
---|
86 | int sendsCore;
|
---|
87 | int detached;
|
---|
88 | } DMXInputAttributesRec, *DMXInputAttributesPtr;
|
---|
89 |
|
---|
90 |
|
---|
91 | extern unsigned long dmxGetNumScreens(void);
|
---|
92 | extern void dmxForceWindowCreation(WindowPtr pWindow);
|
---|
93 | extern void dmxFlushPendingSyncs(void);
|
---|
94 | extern Bool dmxGetScreenAttributes(int physical,
|
---|
95 | DMXScreenAttributesPtr attr);
|
---|
96 | extern Bool dmxGetWindowAttributes(WindowPtr pWindow,
|
---|
97 | DMXWindowAttributesPtr attr);
|
---|
98 | extern void dmxGetDesktopAttributes(DMXDesktopAttributesPtr attr);
|
---|
99 | extern int dmxGetInputCount(void);
|
---|
100 | extern int dmxGetInputAttributes(int deviceId,
|
---|
101 | DMXInputAttributesPtr attr);
|
---|
102 | extern int dmxAddInput(DMXInputAttributesPtr attr, int *deviceId);
|
---|
103 | extern int dmxRemoveInput(int deviceId);
|
---|
104 |
|
---|
105 | extern int dmxConfigureScreenWindows(int nscreens,
|
---|
106 | CARD32 *screens,
|
---|
107 | DMXScreenAttributesPtr attribs,
|
---|
108 | int *errorScreen);
|
---|
109 |
|
---|
110 | extern int dmxConfigureDesktop(DMXDesktopAttributesPtr attribs);
|
---|
111 |
|
---|
112 | /* dmxUpdateScreenResources exposed for dmxCreateWindow in dmxwindow.c */
|
---|
113 | extern void dmxUpdateScreenResources(ScreenPtr pScreen,
|
---|
114 | int x, int y, int w, int h);
|
---|
115 |
|
---|
116 | extern int dmxAttachScreen(int idx, DMXScreenAttributesPtr attr);
|
---|
117 | extern int dmxDetachScreen(int idx);
|
---|
118 | #endif
|
---|