1 .\" Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
3 .\" Permission is hereby granted, free of charge, to any person obtaining a
4 .\" copy of this software and associated documentation files (the "Software"),
5 .\" to deal in the Software without restriction, including without limitation
6 .\" the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 .\" and/or sell copies of the Software, and to permit persons to whom the
8 .\" Software is furnished to do so, subject to the following conditions:
10 .\" The above copyright notice and this permission notice (including the next
11 .\" paragraph) shall be included in all copies or substantial portions of the
14 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 .\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 .\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 .\" THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 .\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 .\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 .\" DEALINGS IN THE SOFTWARE.
22 .TH XReadScreen __libmansuffix__ __xorgversion__ "X FUNCTIONS"
23 .IX "XReadScreen" "" "\f3XReadScreen\f1(3) \(em returns the displayed colors in a rectangle of the screen.
25 XReadScreen \- returns the displayed colors in a rectangle of the screen
28 \&#include <X11/extensions/transovl.h>
49 Specifies the connection to the X server.
52 Specifies the window from whose screen the data is read.
55 Specify the X and Y coordinates of the upper-left corner
56 of the rectangle relative to the origin of the window
60 Specify the width and height of the rectangle.
63 Specifies whether the cursor image is to be included in the colors returned.
65 This routine provides access to the colors displayed on the screen of the given
66 window. On some types of advanced display devices, the displayed colors can be
67 a composite of the data contained in several different frame stores and these
68 frame stores can be of different depth and visual types.
70 In addition, there can be overlay/underlay window pairs in which part of the
71 underlay is visible beneath the overlay. Because the data returned by
73 is undefined for portions of the rectangle that have different depths,
75 is inadequate to return a picture of the what user is actually seeing on the
78 cannot composite pixel information for an overlay/underlay window pair because
79 the pixel information lies in different drawables.
81 addresses these problems.
83 Rather than returning pixel information,
85 returns color information-the actual displayed colors visible on the screen.
86 It returns the color information from any window within the boundaries of the
87 specified rectangle. Unlike
89 the returned contents of visible regions of inferior or overlapping windows of
90 a different depth than the specified window's depth are not undefined.
91 Instead, the actual displayed colors for these windows is returned.
93 \f3Note:\f1 The colors returned are the ones that would be displayed if an
94 unlimited number of hardware color LUTs were available on the screen. Thus, the
95 colors returned are the theoretical display colors. If colormap flashing is
96 present on the screen because there aren't enough hardware color LUTs to
97 display all of the software colormaps simultaneously, the returned colors may
98 be different from the colors that are actually displayed.
102 is an overlay window, the overlay color information is returned everywhere
103 there is opaque paint in the specified rectangle. The color information of
104 the underlay is returned everywhere there is transparent paint in the overlay.
105 In general, since this underlay can be an overlay window containing transparent
106 paint, the color information for a coordinate (x, y) which contains transparent
107 paint is the youngest non-inferior that has opaque paint at (x, y).
109 The color data is returned as an
111 The returned image has the same width and height as the arguments specified.
112 The format of the image is
114 The depth of the image is 24 and the bits_per_pixel is 32.
115 The most significant 8 bits of color information for each color channel
116 (red, green blue) will be returned in the bit positions defined by
123 The values of the following attributes of the
125 are server dependent:
126 .I byte_order, bitmap_unit,
138 the cursor image is included in the returned colors. Otherwise, it is excluded.
140 Note that the borders of the argument window (and other windows) can be included
141 and read with this request.