1706f2543Smrg
2706f2543Smrg
3706f2543Smrg            Client-to-Server DMX Extension to the X Protocol
4706f2543Smrg
5706f2543Smrg           $Date: 2016/06/09 09:07:57 $, $Revision: 1.1.1.1 $
6706f2543Smrg
7706f2543Smrg               Rickard E. (Rik) Faith (faith@redhat.com)
8706f2543Smrg                    Kevin E. Martin (kem@redhat.com)
9706f2543Smrg
10706f2543Smrg    Copyright 2002-2004 Red Hat Inc., Raleigh, North Carolina.
11706f2543Smrg
12706f2543Smrg    Permission is hereby granted, free of charge, to any person
13706f2543Smrg    obtaining a copy of this software and associated documentation files
14706f2543Smrg    (the "Software"), to deal in the Software without restriction,
15706f2543Smrg    including without limitation on the rights to use, copy, modify,
16706f2543Smrg    merge, publish, distribute, sublicense, and/or sell copies of the
17706f2543Smrg    Software, and to permit persons to whom the Software is furnished to
18706f2543Smrg    do so, subject to the following conditions:
19706f2543Smrg
20706f2543Smrg    The above copyright notice and this permission notice (including the
21706f2543Smrg    next paragraph) shall be included in all copies or substantial
22706f2543Smrg    portions of the Software.
23706f2543Smrg
24706f2543Smrg    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25706f2543Smrg    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26706f2543Smrg    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27706f2543Smrg    NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
28706f2543Smrg    BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
29706f2543Smrg    ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
30706f2543Smrg    CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31706f2543Smrg    SOFTWARE.
32706f2543Smrg
33706f2543Smrg
34706f2543Smrg
35706f2543Smrg1. Overview
36706f2543Smrg
37706f2543Smrg    The client-to-server DMX extension to the X protocol (DMX) provides
38706f2543Smrg    normal client applications with the ability to determine information
39706f2543Smrg    about the characteristics of the Xdmx server and the back-end X
40706f2543Smrg    servers that DMX is using.
41706f2543Smrg
42706f2543Smrg    The name for this extension is "DMX".
43706f2543Smrg
44706f2543Smrg
45706f2543Smrg
46706f2543Smrg2. Syntactic conventions
47706f2543Smrg
48706f2543Smrg    This document uses the same syntactic conventions requests and data
49706f2543Smrg    types as [X11R6.4].
50706f2543Smrg
51706f2543Smrg
52706f2543Smrg
53706f2543Smrg3. Data types
54706f2543Smrg
55706f2543Smrg    No new data types are defined by this extension.  All data types
56706f2543Smrg    referenced in this document are defined in [X11R6.4].
57706f2543Smrg
58706f2543Smrg
59706f2543Smrg
60706f2543Smrg4. Requests
61706f2543Smrg
62706f2543Smrg    DMXQueryVersion
63706f2543Smrg        ==>
64706f2543Smrg        majorVersion: CARD32
65706f2543Smrg        minorVersion: CARD32
66706f2543Smrg        patchVersion: CARD32
67706f2543Smrg
68706f2543Smrg        Errors: None
69706f2543Smrg
70706f2543Smrg    The protocol this extension actually supports is indicated by
71706f2543Smrg    majorVersion and minorVersion (patchVersion indicates the
72706f2543Smrg    patchlevel and is for informational purposes only).
73706f2543Smrg
74706f2543Smrg    Any incompatible changes to the protocol should be indicated by
75706f2543Smrg    incrementing majorVersion.
76706f2543Smrg
77706f2543Smrg    Small, upward-compatible changes should be indicated by incrementing
78706f2543Smrg    minorVersion.
79706f2543Smrg
80706f2543Smrg    Servers that support the protocol defined in this document will
81706f2543Smrg    return a majorVersion of 2 and a minorVersion of 2.
82706f2543Smrg
83706f2543Smrg    (Version 1.5 was the last version in the 1.x series; version 2.0 was
84706f2543Smrg    a testing version that was poorly defined.)
85706f2543Smrg
86706f2543Smrg
87706f2543Smrg
88706f2543Smrg    DMXSync
89706f2543Smrg        ==>
90706f2543Smrg        status: CARD32
91706f2543Smrg
92706f2543Smrg        Errors: None
93706f2543Smrg
94706f2543Smrg    This request was first supported in version 1.5 of this protocol.
95706f2543Smrg    The status field in the reply was introduced in version 2.0 of this
96706f2543Smrg    protocol.  Since the status field is ignored, no changes to the
97706f2543Smrg    underlying protocol were required.
98706f2543Smrg
99706f2543Smrg    This request flushes all pending protocol requests between the Xdmx
100706f2543Smrg    server and each back-end X server.  It is used by clients that
101706f2543Smrg    talk directly to back-end X servers to ensure that all pending Xdmx
102706f2543Smrg    requests have reached all back-end servers and have been processed
103706f2543Smrg    by those servers.
104706f2543Smrg
105706f2543Smrg    The value of status is always 0.
106706f2543Smrg
107706f2543Smrg
108706f2543Smrg
109706f2543Smrg    DMXForceWindowCreation
110706f2543Smrg        window: CARD32
111706f2543Smrg        ==>
112706f2543Smrg        status: CARD32
113706f2543Smrg
114706f2543Smrg        Errors: Window
115706f2543Smrg
116706f2543Smrg    This request was first supported in version 1.2 of this protocol.
117706f2543Smrg    This request was changed to have a reply in version 2.0 of this
118706f2543Smrg    protocol.  The old version of this request was deprecated and will
119706f2543Smrg    return BadImplementation.
120706f2543Smrg
121706f2543Smrg    When using the lazy window creation optimization, windows are not
122706f2543Smrg    created on the back-end X servers until they are required.  This
123706f2543Smrg    request forces the immediate creation of the window requested.
124706f2543Smrg
125706f2543Smrg    The value of status is always 0.
126706f2543Smrg
127706f2543Smrg
128706f2543Smrg
129706f2543Smrg
130706f2543Smrg    DMXGetScreenCount
131706f2543Smrg        ==>
132706f2543Smrg        screenCount: CARD32
133706f2543Smrg
134706f2543Smrg        Errors: None
135706f2543Smrg
136706f2543Smrg    This request returns the number of screens that the Xdmx server
137706f2543Smrg    controls.  Since a DMX screen usually fills all of the available
138706f2543Smrg    area on a back-end server, there is usually a one-to-one
139706f2543Smrg    correspondence between DMX screens and backend servers.  However, it
140706f2543Smrg    is also possible for a DMX screen to cover only part of the
141706f2543Smrg    available area on a back-end server, and for more than one DMX
142706f2543Smrg    screen to occupy different parts of the visible area on the same
143706f2543Smrg    back-end server.
144706f2543Smrg
145706f2543Smrg    A DMX screen may be managed as a regular X screen in the Xdmx server
146706f2543Smrg    or may be joined with other DMX screens using Xinerama.
147706f2543Smrg    
148706f2543Smrg
149706f2543Smrg
150706f2543Smrg    DMXGetScreenAttributes
151706f2543Smrg        physicalScreen: CARD32
152706f2543Smrg        ==>
153706f2543Smrg        displayName: STRING8
154706f2543Smrg        logicalScreen: CARD32
155706f2543Smrg        screenWindowWidth: CARD16
156706f2543Smrg        screenWindowHeight: CARD16
157706f2543Smrg        screenWindowXoffset: INT16
158706f2543Smrg        screenWindowYoffset: INT16
159706f2543Smrg        rootWindowWidth: CARD16
160706f2543Smrg        rootWindowHeight: CARD16
161706f2543Smrg        rootWindowXoffset: INT16
162706f2543Smrg        rootWindowYoffset: INT16
163706f2543Smrg        rootWindowXorigin: INT16
164706f2543Smrg        rootWindowYorigin: INT16
165706f2543Smrg
166706f2543Smrg        Errors: Value
167706f2543Smrg
168706f2543Smrg    This request is new in version 2.0 of this protocol.  The old
169706f2543Smrg    DMXGetScreenInformation request is deprecated and will now return
170706f2543Smrg    BadImplementation.
171706f2543Smrg
172706f2543Smrg    This request returns attributes about a single DMX screen.
173706f2543Smrg
174706f2543Smrg    The physicalScreen value is between 0 and screenCount-1, inclusive
175706f2543Smrg    (values outside this range will result in a Value error).
176706f2543Smrg
177706f2543Smrg    The displayname is the name used to open the display, either from
178706f2543Smrg    the Xdmx command-line or from the configuration file.
179706f2543Smrg
180706f2543Smrg    The logicalScreen value is the value of the screen that that Xdmx
181706f2543Smrg    server exports to clients.  When Xinerama is in use, this value is
182706f2543Smrg    typically 0 for all values of physicalScreen.  If Xinerama is in
183706f2543Smrg    use, the rootWindowXOrigin and rootWindowYOrigin values specify
184706f2543Smrg    where the physical screen is positioned in the global Xinerama
185706f2543Smrg    coordinate system.  Otherwise, these values are set to 0.
186706f2543Smrg
187706f2543Smrg    The screenWindow values comprise a geometry specification (see
188706f2543Smrg    X(7x)) for the location of the DMX screen on the back-end screen.
189706f2543Smrg    The coordinant system of the back-end display is used.
190706f2543Smrg
191706f2543Smrg    The first four rootWindow values comprise a geometry specification
192706f2543Smrg    (see X(7x)) for the location of the root window on the screen
193706f2543Smrg    window.  The coordinant system of the screen window is used.  In
194706f2543Smrg    most cases, the root window will have the same geometry as the DMX
195706f2543Smrg    screen window, and will occupy the same area of the back-end
196706f2543Smrg    display.  (This would not be the case, for example, if automatic
197706f2543Smrg    projector alignment is used.)
198706f2543Smrg
199706f2543Smrg
200706f2543Smrg
201706f2543Smrg    DMXChangeScreensAttributes
202706f2543Smrg        screenCount: CARD32
203706f2543Smrg        maskCount: CARD32
204706f2543Smrg        screens: LISTofCARD32
205706f2543Smrg        valueMasks: LISTofCARD32
206706f2543Smrg        valueList: LISTofVALUES
207706f2543Smrg        ==>
208706f2543Smrg        status: CARD32
209706f2543Smrg        errorScreen: CARD32
210706f2543Smrg
211706f2543Smrg        Errors: Length, Alloc
212706f2543Smrg
213706f2543Smrg    This request was first supported in version 2.0 of this protocol.
214706f2543Smrg    (A singular version of this request with the ability to change some
215706f2543Smrg    RootWindow attributes was supported in version 1.3 of this protocol,
216706f2543Smrg    has been deprecated, and will return BadImplementation.)
217706f2543Smrg
218706f2543Smrg    This request changes the geometries and positions of the DMX screen
219706f2543Smrg    and DMX root windows on the back-end X servers.
220706f2543Smrg   
221706f2543Smrg    The valueMask and valueList specify which attributes are to be
222706f2543Smrg    changed.  The possible values are:
223706f2543Smrg
224706f2543Smrg        Attribute               Type
225706f2543Smrg
226706f2543Smrg        ScreenWindowWidth       CARD16
227706f2543Smrg        ScreenWindowHeight      CARD16
228706f2543Smrg        ScreenWindowXoffset     INT16
229706f2543Smrg        ScreenWindowYoffset     INT16
230706f2543Smrg        RootWindowWidth         CARD16
231706f2543Smrg        RootWindowHeight        CARD16
232706f2543Smrg        RootWindowXoffset       INT16
233706f2543Smrg        RootWindowYoffset       INT16
234706f2543Smrg        RootWindowXorigin       INT16
235706f2543Smrg        RootWindowYorigin       INT16
236706f2543Smrg
237706f2543Smrg    The attribute values have the same meaning as do the corresponding
238706f2543Smrg    values for DMXGetScreenAttributes.
239706f2543Smrg
240706f2543Smrg    Non-fatal errors will be returned in status (0 otherwise):
241706f2543Smrg        DmxBadXinerama: Xinerama is not active
242706f2543Smrg        DmxBadValue:    The resulting position is not allowed
243706f2543Smrg                        (e.g., one corner is outside the bounding box)
244706f2543Smrg    On error, errorScreen will contain the number of the screen that
245706f2543Smrg    caused the first error.
246706f2543Smrg
247706f2543Smrg
248706f2543Smrg
249706f2543Smrg    DMXAddScreen
250706f2543Smrg        displayName: STRING8
251706f2543Smrg        physicalScreen: CARD32
252706f2543Smrg        valueMask: CARD32
253706f2543Smrg        valueList: LISTofVALUES
254706f2543Smrg        ==>
255706f2543Smrg        status: CARD32
256706f2543Smrg        physicalScreen: CARD32
257706f2543Smrg
258706f2543Smrg        Errors: Length, Alloc, Value
259706f2543Smrg
260706f2543Smrg    This request was first supported in version 2.2 of this protocol.
261706f2543Smrg
262706f2543Smrg    This request re-attaches the back-end physicalScreen to the Xdmx
263706f2543Smrg    server.  Only back-end screens that have been previously detached
264706f2543Smrg    with DMXRemoveScreen may be added.  The name of the back-end display
265706f2543Smrg    is given in displayName, and this will replace the name of the
266706f2543Smrg    back-end screen that was detached.  Both the displayName and
267706f2543Smrg    physicalScreen must be correct for this request to work.
268706f2543Smrg
269706f2543Smrg    The valueMask and valueList specify the attributes to be used.  The
270706f2543Smrg    possible values are:
271706f2543Smrg
272706f2543Smrg        Attribute               Type
273706f2543Smrg
274706f2543Smrg        ScreenWindowWidth       CARD16
275706f2543Smrg        ScreenWindowHeight      CARD16
276706f2543Smrg        ScreenWindowXoffset     INT16
277706f2543Smrg        ScreenWindowYoffset     INT16
278706f2543Smrg        RootWindowWidth         CARD16
279706f2543Smrg        RootWindowHeight        CARD16
280706f2543Smrg        RootWindowXoffset       INT16
281706f2543Smrg        RootWindowYoffset       INT16
282706f2543Smrg        RootWindowXorigin       INT16
283706f2543Smrg        RootWindowYorigin       INT16
284706f2543Smrg
285706f2543Smrg    The attribute values have the same meaning as do the corresponding
286706f2543Smrg    values for DMXGetScreenAttributes.
287706f2543Smrg
288706f2543Smrg    On success, status will be 0 and physicalScreen will contain the new
289706f2543Smrg    screen number.  On failure, status will be non-zero.  The status
290706f2543Smrg    will be 1 if any of the following occured:
291706f2543Smrg        * the -addremovescreens command-line option was not specified on
292706f2543Smrg          the Xdmx command line
293706f2543Smrg        * the value of physicalScreen is out of range
294706f2543Smrg        * physicalScreen has not been detached (with DMXRemoveScreen)
295706f2543Smrg        * displayName cannot be opened
296706f2543Smrg        * the visuals of displayname do not match the visuals that Xdmx
297706f2543Smrg          is using
298706f2543Smrg        * the screen data for displayName does not match the data for the
299706f2543Smrg          previously removed display
300706f2543Smrg    The status will be DmxBadValue if the attribute values are out of
301706f2543Smrg    range.
302706f2543Smrg
303706f2543Smrg
304706f2543Smrg
305706f2543Smrg    DMXRemoveScreen
306706f2543Smrg        physicalScreen: CARD32
307706f2543Smrg        ==>
308706f2543Smrg        status: CARD32
309706f2543Smrg
310706f2543Smrg        Errors: None
311706f2543Smrg
312706f2543Smrg    This request was first supported in version 2.2 of this protocol.
313706f2543Smrg
314706f2543Smrg    This request detaches the physicalScreen screen.
315706f2543Smrg
316706f2543Smrg    On success, status will be 0.  On failure, the status will 1 if any
317706f2543Smrg    of the following occur:
318706f2543Smrg        * the -addremovescreens command-line option was not specified on
319706f2543Smrg          the Xdmx command line
320706f2543Smrg        * the value of physicalScreen is out of range
321706f2543Smrg        * the back-end screen has already been detached.
322706f2543Smrg
323706f2543Smrg
324706f2543Smrg
325706f2543Smrg    DMXGetWindowAttributes
326706f2543Smrg        window: CARD32
327706f2543Smrg        ==>
328706f2543Smrg        screenCount: CARD32
329706f2543Smrg        screens: LISTofCARD32
330706f2543Smrg        windows: LISTofCARD32
331706f2543Smrg        pos: LISTofRECTANGLE
332706f2543Smrg        vis: LISTofRECTANGLE
333706f2543Smrg
334706f2543Smrg        Errors: Window, Alloc
335706f2543Smrg
336706f2543Smrg    This request computes the return values incorrectly for version 1.0
337706f2543Smrg    of this protocol.  Version 1.1 of this protocol conforms to this
338706f2543Smrg    description.  In version 2.0, the name of this request was changed
339706f2543Smrg    from DMXGetWindowInformation.  However, since the request itself did
340706f2543Smrg    not change, no changes to the underlying protocol were made.
341706f2543Smrg
342706f2543Smrg    Given a window ID on the Xdmx server, this request returns data
343706f2543Smrg    about how the window is represented on the back-end X servers.  For
344706f2543Smrg    each back-end X server that displays a portion of the window, the
345706f2543Smrg    following information is returned:
346706f2543Smrg        1) the number of the physical screen containing that portion
347706f2543Smrg           (which can be used with the DMXGetScreenAttributes request
348706f2543Smrg           to obtain more information about the screen),
349706f2543Smrg        2) the window ID on the back-end X server of the window
350706f2543Smrg           containing that portion,
351706f2543Smrg        3) the position and dimensions of the window on the back-end, in
352706f2543Smrg           screen coordinates, and
353706f2543Smrg        4) the visible area of the window on the back-end, in
354706f2543Smrg           window-relative coordinates (all zeros for windows that are
355706f2543Smrg           not visible).
356706f2543Smrg    Note that DMX allows multiple back-end windows to overlap in their
357706f2543Smrg    view of the DMX logical window.  Further, a logical window does not
358706f2543Smrg    have to be completely covered by back-end windows -- there may be
359706f2543Smrg    gaps.
360706f2543Smrg
361706f2543Smrg    As an example, consider a 500x500 window that spans the top two
362706f2543Smrg    1024x768 back-end displays (A and B) of a 2048x1536 DMX display
363706f2543Smrg    composed of 4 1024x768 back-end displays arranged in a cube:
364706f2543Smrg        A B
365706f2543Smrg        C D
366706f2543Smrg
367706f2543Smrg    In this case, the DMXGetWindowAttributes call would return the
368706f2543Smrg    following information for the 500x500 window:
369706f2543Smrg
370706f2543Smrg    display A: 500x500 window at 1024-250,0 (relative to back end)
371706f2543Smrg               with 250x500 visible at 0,0 (relative to window origin)
372706f2543Smrg
373706f2543Smrg    display B: 500x500 window at -250,0 (relative to back end)
374706f2543Smrg               with 250x500 visible at 250,0 (relative to window origin)
375706f2543Smrg
376706f2543Smrg    display C: 500x500 window at 1024-250,-768 with 0x0 visible at 0,0
377706f2543Smrg
378706f2543Smrg    display D: 500x500 window at -250,-768 with 0x0 visible at 0,0
379706f2543Smrg
380706f2543Smrg    Note that if the specified window has not yet been mapped when
381706f2543Smrg    DMXGetWindowAttributes is called, then a subsequent XMapWindow call
382706f2543Smrg    might be buffered in xlib while requests directly to the back-end X
383706f2543Smrg    servers are processed.  This race condition can be solved by calling
384706f2543Smrg    DMXSync before talking directly to the back-end X servers.
385706f2543Smrg
386706f2543Smrg
387706f2543Smrg
388706f2543Smrg    DMXGetDesktopAttributes
389706f2543Smrg        ==>
390706f2543Smrg        width: INT16
391706f2543Smrg        height: INT16
392706f2543Smrg        shiftX: INT16
393706f2543Smrg        shiftY: INT16
394706f2543Smrg
395706f2543Smrg        Errors: None
396706f2543Smrg
397706f2543Smrg    This request was first supported in version 2.0 of this protocol.
398706f2543Smrg
399706f2543Smrg    This request returns the size of the bounding box of the whole
400706f2543Smrg    screen in width and height.  The shiftX and shiftY values will
401706f2543Smrg    always be 0.  The global bounding box is computed whether or not
402706f2543Smrg    Xinerama is active, and may be larger than the Xinerama screen size
403706f2543Smrg    because of information in the configuration file.
404706f2543Smrg
405706f2543Smrg
406706f2543Smrg
407706f2543Smrg    DMXChangeDesktopAttributes
408706f2543Smrg        valueMask: BITMASK
409706f2543Smrg        valueList: LISTofVALUE
410706f2543Smrg        ==>
411706f2543Smrg        status: CARD32
412706f2543Smrg
413706f2543Smrg        Errors: Length, Value
414706f2543Smrg
415706f2543Smrg    This request was first supported in version 2.0 of this protocol.
416706f2543Smrg
417706f2543Smrg    This request resizes the bounding box of the whole screen when using
418706f2543Smrg    the Xinerama extension.  Otherwise, it has no effect on the screen
419706f2543Smrg    layout.  The valueMask and valueList specify which attributes are to
420706f2543Smrg    be changed.  The possible values are:
421706f2543Smrg
422706f2543Smrg        Attriubute      Type
423706f2543Smrg
424706f2543Smrg        Width           INT16
425706f2543Smrg        Height          INT16
426706f2543Smrg        ShiftX          INT16
427706f2543Smrg        ShiftY          INT16
428706f2543Smrg
429706f2543Smrg    Width and Height specify the new width and height for the bounding
430706f2543Smrg    box.  ShiftX and ShiftY specify where the Xinerama origin will be
431706f2543Smrg    placed with respect to the origin of the new bounding box.  This
432706f2543Smrg    allows the left and upper edges of the bounding box to be changed
433706f2543Smrg    without changing the visual position of the windows on the desktop.
434706f2543Smrg    If Width or Height is not specified, the current values will be
435706f2543Smrg    used.  If ShiftX or ShiftY is not specified, 0 will be used.
436706f2543Smrg
437706f2543Smrg    All coordinants are in the global DMX coordinant system.  If
438706f2543Smrg    Xinerama is not active, this request is not useful.
439706f2543Smrg
440706f2543Smrg    Non-fatal errors will be returned in status (0 otherwise):
441706f2543Smrg        DmxBadXinerama: Xinerama is not active
442706f2543Smrg        DmxBadValue:    The size of the bounding box is too large
443706f2543Smrg
444706f2543Smrg
445706f2543Smrg
446706f2543Smrg    DMXGetInputCount
447706f2543Smrg        ==>
448706f2543Smrg        inputCount: CARD32
449706f2543Smrg
450706f2543Smrg    This request was first supported in version 1.1 of this protocol.
451706f2543Smrg
452706f2543Smrg    This request returns the number of input devices connected to the
453706f2543Smrg    Xdmx server.  This number is the same as that returned by
454706f2543Smrg    XListInputDevices, but is available even when the XInput extension
455706f2543Smrg    is not supported.
456706f2543Smrg
457706f2543Smrg
458706f2543Smrg
459706f2543Smrg    DMXGetInputAttributes
460706f2543Smrg        deviceId: CARD32
461706f2543Smrg        ==>
462706f2543Smrg        inputType: CARD32
463706f2543Smrg        physicalScreen: CARD32
464706f2543Smrg        physicalId: CARD32
465706f2543Smrg        isCore: BOOL
466706f2543Smrg        sendsCore: BOOL
467706f2543Smrg        detached: BOOL
468706f2543Smrg        name: STRING8
469706f2543Smrg
470706f2543Smrg        Errors: Value
471706f2543Smrg
472706f2543Smrg    This request was first supported in version 1.1 of this protocol.
473706f2543Smrg    In version 2.0, the name of this request was changed from
474706f2543Smrg    DMXGetInputInformation.  However, since the request itself did not
475706f2543Smrg    change, no changes to the underlying protocol were made.  In version
476706f2543Smrg    2.2, the name of detached was changed from reservation.  There was
477706f2543Smrg    no change in underlying protocol.
478706f2543Smrg
479706f2543Smrg    This request returns information about the specified input device
480706f2543Smrg    that cannot be obtained from the XListInputDeivices call.  The
481706f2543Smrg    deviceId is the same as that used by the XListInputDevices call, and
482706f2543Smrg    must be in the range 0 to inputCount-1, inclusive (values outside
483706f2543Smrg    this range will result in a Value error).
484706f2543Smrg
485706f2543Smrg    The value of inputType will always be valid, and will be one of the
486706f2543Smrg    following values:
487706f2543Smrg        0 for local (and dummy) devices,
488706f2543Smrg        1 for console devices, and
489706f2543Smrg        2 for back-end devices.
490706f2543Smrg
491706f2543Smrg    For local devices, all other fields returned, except isCore and
492706f2543Smrg    sendsCore, are invalid.
493706f2543Smrg
494706f2543Smrg    For console devices, the physicalScreen and physicalID will be
495706f2543Smrg    invalid, and the name will return the name of the X server on which
496706f2543Smrg    the console window is displayed.
497706f2543Smrg
498706f2543Smrg    For back-end devices, the physicalScreen will identify the back-end
499706f2543Smrg    display and can be used as an argument to DMXGetScreenAttributes to
500706f2543Smrg    obtain more information; the physicalId will be the XInput device id
501706f2543Smrg    on the back-end X server; and the name will be invalid (since it
502706f2543Smrg    does not provide any additional information that cannot be obtained
503706f2543Smrg    with DMXGetScreenAttributes).
504706f2543Smrg
505706f2543Smrg    If isCore is True, then this device is active as a true core input
506706f2543Smrg    device and will send core events.  If sendsCore is True, then this
507706f2543Smrg    device is an XInput extension device, but sends core events instead
508706f2543Smrg    of extension events.  Note that this behavior is different from that
509706f2543Smrg    of XFree86 or Xorg, where XInput extension devices may send both
510706f2543Smrg    extension events and core events.
511706f2543Smrg
512706f2543Smrg    If detached is True, then this device has been detached and is no
513706f2543Smrg    longer producing input events.  The device may be reattached using
514706f2543Smrg    DMXAddInput.
515706f2543Smrg
516706f2543Smrg    
517706f2543Smrg
518706f2543Smrg    DMXAddInput
519706f2543Smrg        displayName: STRING8
520706f2543Smrg        valueMask: CARD32
521706f2543Smrg        valueList: LISTofVALUES
522706f2543Smrg        ==>
523706f2543Smrg        status: CARD32
524706f2543Smrg        physicalId: CARD32
525706f2543Smrg
526706f2543Smrg        Errors: Value, Access
527706f2543Smrg
528706f2543Smrg    This request was first supported in version 2.2 of this protocol.
529706f2543Smrg
530706f2543Smrg    The valueMask and valueList specify the attributes to be used.  The
531706f2543Smrg    possible values are:
532706f2543Smrg
533706f2543Smrg        Attribute               Type
534706f2543Smrg
535706f2543Smrg        InputType               CARD32
536706f2543Smrg        InputPhysicalScreen     CARD32
537706f2543Smrg        InputSendsCore          BOOL
538706f2543Smrg
539706f2543Smrg    This request attaches an input device to the Xdmx server.  The value
540706f2543Smrg    of inputType will be one:
541706f2543Smrg        1 for console devices, and
542706f2543Smrg        2 for back-end devices.
543706f2543Smrg    Other values of InputType will return a BadValue error.  Local
544706f2543Smrg    devices (inputType=0 in DMXGetInputAttributes) cannot be attached or
545706f2543Smrg    removed.  For console devices, displayName will store the name of
546706f2543Smrg    the display to be used.
547706f2543Smrg
548706f2543Smrg    For back-end devices, InputPhysicalScreen will specify the screen
549706f2543Smrg    number.  BadValue will be returned if the screen number is out of
550706f2543Smrg    range.  BadAccess will be returned if the input has already been
551706f2543Smrg    attached or if the backend screen is currently detached.
552706f2543Smrg
553706f2543Smrg    If InputSendsCore is True, the new device will be added as a true
554706f2543Smrg    core device.
555706f2543Smrg
556706f2543Smrg    If a device was removed with DMXRemoveInput an attempt will be made
557706f2543Smrg    to reconnect the previous devices (InputSendsCore is ignored in this
558706f2543Smrg    case).
559706f2543Smrg
560706f2543Smrg
561706f2543Smrg
562706f2543Smrg    DMXRemoveInput
563706f2543Smrg        physicalId: CARD32
564706f2543Smrg        ==>
565706f2543Smrg        status: CARD32
566706f2543Smrg
567706f2543Smrg        Errors: Value, Access
568706f2543Smrg
569706f2543Smrg    This request was first supported in version 2.2 of this protocol.
570706f2543Smrg
571706f2543Smrg    This request detaches the input device with physicalId, and all
572706f2543Smrg    associated inputs (e.g., if the physicalId is a backend mouse, and a
573706f2543Smrg    keyboard is also attached to the backend, then both devices will be
574706f2543Smrg    detached).  If the physicalId is outside the valid range (0 to one
575706f2543Smrg    less than the value returned by DMXInputCount), BadValue is
576706f2543Smrg    returned.  If the physicalId has already been detached, BadAccess is
577706f2543Smrg    returned.  The status is always 0.
578706f2543Smrg
579706f2543Smrg
580706f2543Smrg
581706f2543Smrg5. Events
582706f2543Smrg
583706f2543Smrg    No new events are defined by this extension.
584706f2543Smrg
585706f2543Smrg
586706f2543Smrg
587706f2543Smrg6. Errors
588706f2543Smrg
589706f2543Smrg    No new events are defined by this extension.
590706f2543Smrg
591706f2543Smrg
592706f2543Smrg
593706f2543Smrg7. Encoding
594706f2543Smrg
595706f2543Smrg    Deprecated DMX opcodes:
596706f2543Smrg        DMXGetScreenInformation           2
597706f2543Smrg        DMXForceWindowCreation            6
598706f2543Smrg        DMXReconfigureScreen              7
599706f2543Smrg
600706f2543Smrg    Valid DMX opcodes:
601706f2543Smrg        DMXQueryVersion                   0
602706f2543Smrg        DMXSync                           8
603706f2543Smrg        DMXForceWindowCreation            9
604706f2543Smrg
605706f2543Smrg        DMXGetScreenCount                 1
606706f2543Smrg        DMXGetScreenAttributes           10
607706f2543Smrg        DMXChangeScreensAttributes       11
608706f2543Smrg        DMXAddScreen                     12
609706f2543Smrg        DMXRemoveScreen                  13
610706f2543Smrg
611706f2543Smrg        DMXGetWindowAttributes            3
612706f2543Smrg
613706f2543Smrg        DMXGetDesktopAttributes          14
614706f2543Smrg        DMXChangeDesktopAttributes       15
615706f2543Smrg
616706f2543Smrg        DMXGetInputCount                  4
617706f2543Smrg        DMXGetInputAttributes             5
618706f2543Smrg        DMXAddInput                      16
619706f2543Smrg        DMXRemoveInput                   17
620706f2543Smrg
621706f2543Smrg    DMXQueryVersion
622706f2543Smrg        1           CARD8           opcode (X assigned)
623706f2543Smrg        1           0               DMX opcode (X_DMXQueryVersion)
624706f2543Smrg        2           1               request length
625706f2543Smrg    ==>
626706f2543Smrg        1           1               Reply
627706f2543Smrg        1                           unused
628706f2543Smrg        2           CARD16          sequence number
629706f2543Smrg        4           0               reply length
630706f2543Smrg        4           CARD32          majorVersion
631706f2543Smrg        4           CARD32          minorVersion
632706f2543Smrg        4           CARD32          patchVersion
633706f2543Smrg        12                          unused
634706f2543Smrg
635706f2543Smrg    DMXSync
636706f2543Smrg        1           CARD8           opcode (X assigned)
637706f2543Smrg        1           8               DMX opcode (X_DMXSync)
638706f2543Smrg        2           1               request length
639706f2543Smrg    ==>
640706f2543Smrg        1           1               Reply
641706f2543Smrg        1                           unused
642706f2543Smrg        2           CARD16          sequence number
643706f2543Smrg        4           0               reply length
644706f2543Smrg        4           CARD32          status
645706f2543Smrg        20                          unused
646706f2543Smrg
647706f2543Smrg    DMXForceWindowCreation
648706f2543Smrg        1           CARD8           opcode (X assigned)
649706f2543Smrg        1           9               DMX opcode (X_DMXForceWindowCreation)
650706f2543Smrg        2           2               request length
651706f2543Smrg        4           CARD32          window
652706f2543Smrg    ==>
653706f2543Smrg        1           1               Reply
654706f2543Smrg        1                           unused
655706f2543Smrg        2           CARD16          sequence number
656706f2543Smrg        4           0               reply length
657706f2543Smrg        4           CARD32          status
658706f2543Smrg        20                          unused
659706f2543Smrg
660706f2543Smrg
661706f2543Smrg    DMXGetScreenCount
662706f2543Smrg        1           CARD8           opcode (X assigned)
663706f2543Smrg        1           1               DMX opcode (X_DMXGetScreenCount)
664706f2543Smrg        2           1               request length
665706f2543Smrg    ==>
666706f2543Smrg        1           1               Reply
667706f2543Smrg        1                           unused
668706f2543Smrg        2           CARD16          sequence number
669706f2543Smrg        4           0               reply length
670706f2543Smrg        4           CARD32          screenCount
671706f2543Smrg        20                          unused
672706f2543Smrg
673706f2543Smrg    DMXGetScreenAttributes
674706f2543Smrg        1           CARD8           opcode (X assigned)
675706f2543Smrg        1           10               DMX opcode (X_DMXGetScreenAttributes)
676706f2543Smrg        2           2               request length
677706f2543Smrg        4           CARD32          physicalScreen
678706f2543Smrg    ==>
679706f2543Smrg        1           1               Reply
680706f2543Smrg        1                           unused
681706f2543Smrg        2           CARD16          sequence number
682706f2543Smrg        4           1+(n+p)/4       reply length
683706f2543Smrg        4           n               displayNameLength
684706f2543Smrg        4           CARD32          logicalScreen
685706f2543Smrg        2           CARD16          screenWindowWidth
686706f2543Smrg        2           CARD16          screenWindowHeight
687706f2543Smrg        2           INT16           screenWindowXoffset
688706f2543Smrg        2           INT16           screenWindowYoffset
689706f2543Smrg        2           CARD16          rootWindowWidth
690706f2543Smrg        2           CARD16          rootWindowHeight
691706f2543Smrg        2           INT16           rootWindowXoffset
692706f2543Smrg        2           INT16           rootWindowYoffset
693706f2543Smrg        2           INT16           rootWindowXorigin
694706f2543Smrg        2           INT16           rootWindowYorigin
695706f2543Smrg        n                           displayName
696706f2543Smrg        p                           pad(n)
697706f2543Smrg
698706f2543Smrg    DMXChangeScreensAttributes
699706f2543Smrg        1           CARD8           opcode (X assigned)
700706f2543Smrg        1           11              DMX opcode (X_DMXChangeScreenAttributes)
701706f2543Smrg        2           3+s+m+n         request length
702706f2543Smrg        4           s               screenCount
703706f2543Smrg        4           m               maskCount
704706f2543Smrg        4s          LISTofCARD32    screens
705706f2543Smrg        4m          LISTofCARD32    valueMasks
706706f2543Smrg        4n          LISTofVALUES    valueList
707706f2543Smrg    ==>
708706f2543Smrg        1           1               Reply
709706f2543Smrg        1                           unused
710706f2543Smrg        2           CARD16          sequence number
711706f2543Smrg        4           0               reply length
712706f2543Smrg        4           CARD32          status
713706f2543Smrg        4           CARD32          errorScreen
714706f2543Smrg        16                          unused
715706f2543Smrg
716706f2543Smrg
717706f2543Smrg    DMXAddScreen
718706f2543Smrg        1           CARD8           opcode (X assigned)
719706f2543Smrg        1           12              DMX opcode (X_DMXAddScreen)
720706f2543Smrg        2           3+m+(n+p)/4     request length
721706f2543Smrg        4           n               displayNameLength
722706f2543Smrg        4           CARD32          physicalScreen
723706f2543Smrg        4           CARD32          valueMask
724706f2543Smrg        4m          LISTofVALUES    valueList
725706f2543Smrg        n                           displayName
726706f2543Smrg        p                           pad(n)
727706f2543Smrg    ==>
728706f2543Smrg        1           1               Reply
729706f2543Smrg        1                           unused
730706f2543Smrg        2           CARD16          sequence number
731706f2543Smrg        4           0               reply length
732706f2543Smrg        4           CARD32          status
733706f2543Smrg        4           CARD32          physicalScreen
734706f2543Smrg        16                          unused
735706f2543Smrg
736706f2543Smrg    DMXRemoveScreen
737706f2543Smrg        1           CARD8           opcode (X assigned)
738706f2543Smrg        1           13              DMX opcode (X_DMXRemoveScreen)
739706f2543Smrg        2           2               request length
740706f2543Smrg        4           CARD32          physicalScreen
741706f2543Smrg    ==>
742706f2543Smrg        1           1               Reply
743706f2543Smrg        1                           unused
744706f2543Smrg        2           CARD16          sequence number
745706f2543Smrg        4           0               reply length
746706f2543Smrg        4           CARD32          status
747706f2543Smrg        20                          unused
748706f2543Smrg
749706f2543Smrg    DMXGetWindowAttributes
750706f2543Smrg        1           CARD8           opcode (X assigned)
751706f2543Smrg        1           3               DMX opcode (X_DMXGetWindowAttributes)
752706f2543Smrg        2           2               request length
753706f2543Smrg        4           CARD32          window
754706f2543Smrg    ==>
755706f2543Smrg        1           1               Reply
756706f2543Smrg        1                           unused
757706f2543Smrg        2           CARD16          sequence number
758706f2543Smrg        4           n*6             reply length
759706f2543Smrg        4           n               screenCount
760706f2543Smrg        20                          unused
761706f2543Smrg        n*4         LISTofCARD32    screens
762706f2543Smrg        n*4         LISTofCARD32    windows
763706f2543Smrg        n*8         LISTofRECTANGLE pos
764706f2543Smrg        n*8         LISTofRECTANGLE vis
765706f2543Smrg
766706f2543Smrg    DMXGetDesktopAttributes
767706f2543Smrg        1           CARD8           opcode (X assigned)
768706f2543Smrg        1           14              DMX opcode (X_DMXGetDesktopAttributes)
769706f2543Smrg        2           1               request length
770706f2543Smrg    ==>
771706f2543Smrg        1           1               Reply
772706f2543Smrg        1                           unused
773706f2543Smrg        2           CARD16          sequence number
774706f2543Smrg        4           0               reply length
775706f2543Smrg        2           INT16           width
776706f2543Smrg        2           INT16           height
777706f2543Smrg        2           INT16           shiftX
778706f2543Smrg        2           INT16           shiftY
779706f2543Smrg        16                          unused
780706f2543Smrg
781706f2543Smrg    DMXChangeDesktopAttributes
782706f2543Smrg        1           CARD8           opcode (X assigned)
783706f2543Smrg        1           15              DMX opcode (X_DMXChangeDesktopAttributes)
784706f2543Smrg        2           2+n             request length
785706f2543Smrg        4           BITMASK         valueMask
786706f2543Smrg        4n          LISTofVALUES    valueList
787706f2543Smrg    ==>
788706f2543Smrg        1           1               Reply
789706f2543Smrg        1                           unused
790706f2543Smrg        2           CARD16          sequence number
791706f2543Smrg        4           0               reply length
792706f2543Smrg        4           CARD32          status
793706f2543Smrg        20                          unused
794706f2543Smrg
795706f2543Smrg    DMXGetInputCount
796706f2543Smrg        1           CARD8           opcode (X assigned)
797706f2543Smrg        1           4               DMX opcode (X_DMXGetInputCount)
798706f2543Smrg        2           1               request length
799706f2543Smrg    ==>
800706f2543Smrg        1           1               Reply
801706f2543Smrg        1                           unused
802706f2543Smrg        2           CARD16          sequence number
803706f2543Smrg        4           0               reply length
804706f2543Smrg        4           CARD32          inputCount
805706f2543Smrg        20                          unused
806706f2543Smrg
807706f2543Smrg    DMXGetInputAttributes
808706f2543Smrg        1           CARD8           opcode (X assigned)
809706f2543Smrg        1           5               DMX opcode (X_DMXGetInputAttributes)
810706f2543Smrg        2           2               request length
811706f2543Smrg        4           CARD32          deviceId
812706f2543Smrg    ==>
813706f2543Smrg        1           1               Reply
814706f2543Smrg        1                           unused
815706f2543Smrg        2           CARD16          sequence number
816706f2543Smrg        4           (n+p)/4         reply length
817706f2543Smrg        4           CARD32          inputType
818706f2543Smrg        4           CARD32          physicalScreen
819706f2543Smrg        4           CARD32          physicalId
820706f2543Smrg        4           n               nameLength
821706f2543Smrg        1           BOOL            isCore
822706f2543Smrg        1           BOOL            sendsCore
823706f2543Smrg        1           BOOL            detached
824706f2543Smrg        5                           unused
825706f2543Smrg        n                           name
826706f2543Smrg        p                           pad(n)
827706f2543Smrg
828706f2543Smrg    DMXAddInput
829706f2543Smrg        1           CARD8           opcode (X assigned)
830706f2543Smrg        1           16              DMX opcode (X_DMXAddInput)
831706f2543Smrg        2           3+m+(n+p)/4     request length
832706f2543Smrg        4           n               displayNameLength
833706f2543Smrg        4           CARD32          valueMask
834706f2543Smrg        4m          LISTofVALUES    valueList
835706f2543Smrg        n                           displayName
836706f2543Smrg        p                           pad(n)
837706f2543Smrg    ==>
838706f2543Smrg        1           1               Reply
839706f2543Smrg        1                           unused
840706f2543Smrg        2           CARD16          sequence number
841706f2543Smrg        4           0               reply length
842706f2543Smrg        4           CARD32          status
843706f2543Smrg        4           CARD32          physicalId
844706f2543Smrg        16                          unused
845706f2543Smrg
846706f2543Smrg    DMXRemoveInput
847706f2543Smrg        1           CARD8           opcode (X assigned)
848706f2543Smrg        1           17              DMX opcode (X_DMXRemoveInput)
849706f2543Smrg        2           3               request length
850706f2543Smrg        4           CARD32          physicalId
851706f2543Smrg    ==>
852706f2543Smrg        1           1               Reply
853706f2543Smrg        1                           unused
854706f2543Smrg        2           CARD16          sequence number
855706f2543Smrg        4           0               reply length
856706f2543Smrg        4           CARD32          status
857706f2543Smrg        20                          unused
858706f2543Smrg
859706f2543Smrg
860706f2543Smrg8. Changes to existing requests/replies/events
861706f2543Smrg
862706f2543Smrg    No changes to existing requests, replies, or events are necessitated
863706f2543Smrg    by this extension.
864706f2543Smrg
865706f2543Smrg
866706f2543Smrg
867706f2543Smrg9. Acknowledgments
868706f2543Smrg
869706f2543Smrg
870706f2543Smrg
871706f2543Smrg10. References
872706f2543Smrg
873706f2543Smrg    [X11R6.4] Robert W. Sheifler.  X Window System Protocol, X Consortium
874706f2543Smrg              Standard, X Version 11, Release 6.4.  Available from
875706f2543Smrg              xc/doc/specs/XProtocol and xc/doc/hardcopy/XProtocol.
876