Blame man/DMXGetWindowAttributes.man

Packit ec660a
.\" Copyright 2004 Red Hat Inc., Durham, North Carolina.
Packit ec660a
.\" All Rights Reserved.
Packit ec660a
.\"
Packit ec660a
.\" Permission is hereby granted, free of charge, to any person obtaining
Packit ec660a
.\" a copy of this software and associated documentation files (the
Packit ec660a
.\" "Software"), to deal in the Software without restriction, including
Packit ec660a
.\" without limitation on the rights to use, copy, modify, merge,
Packit ec660a
.\" publish, distribute, sublicense, and/or sell copies of the Software,
Packit ec660a
.\" and to permit persons to whom the Software is furnished to do so,
Packit ec660a
.\" subject to the following conditions:
Packit ec660a
.\"
Packit ec660a
.\" he above copyright notice and this permission notice (including the
Packit ec660a
.\" next paragraph) shall be included in all copies or substantial
Packit ec660a
.\" portions of the Software.
Packit ec660a
.\"
Packit ec660a
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
Packit ec660a
.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Packit ec660a
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
Packit ec660a
.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
Packit ec660a
.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
Packit ec660a
.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
Packit ec660a
.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
Packit ec660a
.\" SOFTWARE.
Packit ec660a
.TH DMXGetWindowAttributes __libmansuffix__ __vendorversion__
Packit ec660a
.SH NAME
Packit ec660a
DMXGetWindowAttributes \- determine back-end window attributes
Packit ec660a
.SH SYNOPSIS
Packit ec660a
.B #include <X11/extensions/dmxext.h>
Packit ec660a
.sp
Packit ec660a
.nf
Packit ec660a
.BI "Bool DMXGetWindowAttributes(Display " *dpy ,
Packit ec660a
.BI "                            Window " window ,
Packit ec660a
.BI "                            int " *screen_count ,
Packit ec660a
.BI "                            int " available_count ,
Packit ec660a
.BI "                            DMXWindowAttributes " *attr );
Packit ec660a
.fi
Packit ec660a
.SH DESCRIPTION
Packit ec660a
When calling
Packit ec660a
.BR DMXGetWindowAttributes() ,
Packit ec660a
.I window
Packit ec660a
specifies the window ID of a window on the
Packit ec660a
.BR Xdmx (1)
Packit ec660a
server and
Packit ec660a
.I available_count
Packit ec660a
specifies the length of
Packit ec660a
.I attr.
Packit ec660a
.PP
Packit ec660a
The number of screens for which information is available will be
Packit ec660a
returned in
Packit ec660a
.I screen_count
Packit ec660a
and information about those screen will be returned in
Packit ec660a
.IR attr .
Packit ec660a
If
Packit ec660a
.I screen_count
Packit ec660a
is less than
Packit ec660a
.IR available_count ,
Packit ec660a
then information for all of the screens will be returned.  Otherwise,
Packit ec660a
information for the first
Packit ec660a
.I available_count
Packit ec660a
screens will be returned.
Packit ec660a
.PP
Packit ec660a
The
Packit ec660a
.I DMXWindowAttributes
Packit ec660a
structure is:
Packit ec660a
.sp
Packit ec660a
.nf
Packit ec660a
typedef struct {
Packit ec660a
    int          screen;
Packit ec660a
    Window       window;
Packit ec660a
    XRectangle   pos, vis;
Packit ec660a
} DMXWindowAttributes;
Packit ec660a
.fi
Packit ec660a
.PP
Packit ec660a
For each back-end X server that displays a portion of
Packit ec660a
.IR window ,
Packit ec660a
this structure contains the physical
Packit ec660a
.I screen
Packit ec660a
containing that portion, the
Packit ec660a
.I window
Packit ec660a
ID on the back-end X server of the window containing that portion, the
Packit ec660a
position and dimensions of the window on the back-end
Packit ec660a
.RI ( pos ,
Packit ec660a
in screen coordinates), and the visible area of the window on the
Packit ec660a
back-end
Packit ec660a
.RI ( vis ,
Packit ec660a
in window-relative coordinates -- all zeros if the window is not visible
Packit ec660a
on the backend).
Packit ec660a
.PP
Packit ec660a
To obtain more information about the physical screen use the
Packit ec660a
.BR DMXGetScreenAttributes (__libmansuffix__)
Packit ec660a
call.
Packit ec660a
.PP
Packit ec660a
Note that DMX allows multiple back-end windows to overlap in their
Packit ec660a
view of the DMX logical window.  Further, a logical window does not
Packit ec660a
have to be completely covered by back-end windows -- there may be
Packit ec660a
gaps.
Packit ec660a
.PP
Packit ec660a
As an example, consider a 500x500 window that spans the top two
Packit ec660a
1024x768 back-end displays (A and B) of a 2048x1536 DMX display
Packit ec660a
composed of 4 1024x768 back-end displays arranged in a cube:
Packit ec660a
.sp
Packit ec660a
.nf
Packit ec660a
    A B
Packit ec660a
    C D
Packit ec660a
.fi
Packit ec660a
.sp
Packit ec660a
In this case, the DMXGetWindowAttributes call would return the
Packit ec660a
following information for the 500x500 window:
Packit ec660a
.sp
Packit ec660a
.nf
Packit ec660a
display A: 500x500 window at 1024-250,0 (relative to back end)
Packit ec660a
           with 250x500 visible at 0,0 (relative to window origin)
Packit ec660a
Packit ec660a
display B: 500x500 window at -250,0 (relative to back end)
Packit ec660a
           with 250x500 visible at 250,0 (relative to window origin)
Packit ec660a
Packit ec660a
display C: 500x500 window at 1024-250,-768 with 0x0 visible at 0,0
Packit ec660a
Packit ec660a
display D: 500x500 window at -250,-768 with 0x0 visible at 0,0
Packit ec660a
.fi
Packit ec660a
.SH "RETURN VALUE"
Packit ec660a
.B DMXGetWindowAttributes()
Packit ec660a
returns
Packit ec660a
.B True
Packit ec660a
unless there is a protocol error.
Packit ec660a
.PP
Packit ec660a
.B DMXGetWindowAttributes()
Packit ec660a
can generate
Packit ec660a
.B BadWindow
Packit ec660a
and
Packit ec660a
.B BadAlloc
Packit ec660a
errors.
Packit ec660a
.SH NOTES
Packit ec660a
Because this call transports a great deal of information over the wire,
Packit ec660a
please call
Packit ec660a
.BR DMXGetScreenCount (__libmansuffix__)
Packit ec660a
first, and make sure
Packit ec660a
.I attr
Packit ec660a
is sufficiently large.
Packit ec660a
.PP
Packit ec660a
On a particular back-end server, it is possible that the associated
Packit ec660a
window has not yet been mapped because the
Packit ec660a
.BR XMapWindow (__libmansuffix__)
Packit ec660a
call that will eventually map the window had been buffered by Xlib's
Packit ec660a
normal buffering system.  To avoid this race condition, please call
Packit ec660a
.BR DMXSync (__libmansuffix__)
Packit ec660a
before communicating directly with the back-end X server.
Packit ec660a
.SH "SEE ALSO"
Packit ec660a
.BR DMXGetScreenCount "(__libmansuffix__), "
Packit ec660a
.BR DMXSync "(__libmansuffix__), "
Packit ec660a
.BR DMXGetScreenAttributes "(__libmansuffix__), "
Packit ec660a
.BR DMX "(__libmansuffix__), " Xdmx (1)