1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
|
.\" $XFree86$
.\"
.\" Copyright 2004 Red Hat Inc., Durham, North Carolina.
.\" All Rights Reserved.
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining
.\" a copy of this software and associated documentation files (the
.\" "Software"), to deal in the Software without restriction, including
.\" without limitation on the rights to use, copy, modify, merge,
.\" publish, distribute, sublicense, and/or sell copies of the Software,
.\" and to permit persons to whom the Software is furnished to do so,
.\" subject to the following conditions:
.\"
.\" he above copyright notice and this permission notice (including the
.\" next paragraph) shall be included in all copies or substantial
.\" portions of the Software.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
.\" NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
.\" SOFTWARE.
.TH DMXGetWindowAttributes 3X __vendorversion__
.SH NAME
DMXGetWindowAttributes \- determine back-end window attributes
.SH SYNOPSIS
.B #include <X11/extensions/dmxext.h>
.sp
.nf
.BI "Bool DMXGetWindowAttributes(Display " *dpy ,
.BI " Window " window ,
.BI " int " *screen_count ,
.BI " int " available_count ,
.BI " DMXWindowAttributes " *attr );
.fi
.SH DESCRIPTION
When calling
.BR DMXGetWindowAttributes() ,
.I window
specifies the window ID of a window on the
.BR Xdmx (1)
server and
.I available_count
specifies the length of
.I attr.
.PP
The number of screens for which information is available will be
returned in
.I screen_count
and information about those screen will be returned in
.IR attr .
If
.I screen_count
is less than
.IR available_count ,
then information for all of the screens will be returned. Otherwise,
information for the first
.I available_count
screens will be returned.
.PP
The
.I DMXWindowAttributes
structure is:
.sp
.nf
typedef struct {
int screen;
Window window;
XRectangle pos, vis;
} DMXWindowAttributes;
.fi
.PP
For each back-end X server that displays a portion of
.IR window ,
this structure contains the physical
.I screen
containing that portion, the
.I window
ID on the back-end X server of the window containing that portion, the
position and dimensions of the window on the back-end
.RI ( pos ,
in screen coordinates), and the visible area of the window on the
back-end
.RI ( vis ,
in window-relative coordinates -- all zeros if the window is not visible
on the backend).
.PP
To obtain more information about the physical screen use the
.BR DMXGetScreenAttributes (3X)
call.
.PP
Note that DMX allows multiple back-end windows to overlap in their
view of the DMX logical window. Further, a logical window does not
have to be completely covered by back-end windows -- there may be
gaps.
.PP
As an example, consider a 500x500 window that spans the top two
1024x768 back-end displays (A and B) of a 2048x1536 DMX display
composed of 4 1024x768 back-end displays arranged in a cube:
.sp
.nf
A B
C D
.fi
.sp
In this case, the DMXGetWindowAttributes call would return the
following information for the 500x500 window:
.sp
.nf
display A: 500x500 window at 1024-250,0 (relative to back end)
with 250x500 visible at 0,0 (relative to window origin)
display B: 500x500 window at -250,0 (relative to back end)
with 250x500 visible at 250,0 (relative to window origin)
display C: 500x500 window at 1024-250,-768 with 0x0 visible at 0,0
display D: 500x500 window at -250,-768 with 0x0 visible at 0,0
.fi
.SH "RETURN VALUE"
.B DMXGetWindowAttributes()
returns
.B True
unless there is a protocol error.
.PP
.B DMXGetWindowAttributes()
can generate
.B BadWindow
and
.B BadAlloc
errors.
.SH NOTES
Because this call transports a great deal of information over the wire,
please call
.BR DMXGetScreenCount (3X)
first, and make sure
.I attr
is sufficiently large.
.PP
On a particular back-end server, it is possible that the associated
window has not yet been mapped because the
.BR XMapWindow (3X)
call that will eventually map the window had been buffered by Xlib's
normal buffering system. To avoid this race condition, please call
.BR DMXSync (3X)
before communicating directly with the back-end X server.
.SH "SEE ALSO"
.BR DMXGetScreenCount "(3X), "
.BR DMXSync "(3X), "
.BR DMXGetScreenAttributes "(3X), "
.BR DMX "(3X), " Xdmx (1)
|