xref: /OK3568_Linux_fs/external/xserver/Xext/panoramiX.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*****************************************************************
2*4882a593Smuzhiyun 
3*4882a593Smuzhiyun Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
4*4882a593Smuzhiyun 
5*4882a593Smuzhiyun Permission is hereby granted, free of charge, to any person obtaining a copy
6*4882a593Smuzhiyun of this software and associated documentation files (the "Software"), to deal
7*4882a593Smuzhiyun in the Software without restriction, including without limitation the rights
8*4882a593Smuzhiyun to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9*4882a593Smuzhiyun copies of the Software.
10*4882a593Smuzhiyun 
11*4882a593Smuzhiyun The above copyright notice and this permission notice shall be included in
12*4882a593Smuzhiyun all copies or substantial portions of the Software.
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15*4882a593Smuzhiyun IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16*4882a593Smuzhiyun FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17*4882a593Smuzhiyun DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
18*4882a593Smuzhiyun BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
19*4882a593Smuzhiyun WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
20*4882a593Smuzhiyun IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21*4882a593Smuzhiyun 
22*4882a593Smuzhiyun Except as contained in this notice, the name of Digital Equipment Corporation
23*4882a593Smuzhiyun shall not be used in advertising or otherwise to promote the sale, use or other
24*4882a593Smuzhiyun dealings in this Software without prior written authorization from Digital
25*4882a593Smuzhiyun Equipment Corporation.
26*4882a593Smuzhiyun 
27*4882a593Smuzhiyun ******************************************************************/
28*4882a593Smuzhiyun 
29*4882a593Smuzhiyun /* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */
30*4882a593Smuzhiyun 
31*4882a593Smuzhiyun /*
32*4882a593Smuzhiyun  *	PanoramiX definitions
33*4882a593Smuzhiyun  */
34*4882a593Smuzhiyun 
35*4882a593Smuzhiyun #ifdef HAVE_DIX_CONFIG_H
36*4882a593Smuzhiyun #include <dix-config.h>
37*4882a593Smuzhiyun #endif
38*4882a593Smuzhiyun 
39*4882a593Smuzhiyun #ifndef _PANORAMIX_H_
40*4882a593Smuzhiyun #define _PANORAMIX_H_
41*4882a593Smuzhiyun 
42*4882a593Smuzhiyun #define _PANORAMIX_SERVER
43*4882a593Smuzhiyun #include <X11/extensions/panoramiXproto.h>
44*4882a593Smuzhiyun #undef _PANORAMIX_SERVER
45*4882a593Smuzhiyun #include "gcstruct.h"
46*4882a593Smuzhiyun #include "dixstruct.h"
47*4882a593Smuzhiyun 
48*4882a593Smuzhiyun typedef struct _PanoramiXInfo {
49*4882a593Smuzhiyun     XID id;
50*4882a593Smuzhiyun } PanoramiXInfo;
51*4882a593Smuzhiyun 
52*4882a593Smuzhiyun typedef struct {
53*4882a593Smuzhiyun     PanoramiXInfo info[MAXSCREENS];
54*4882a593Smuzhiyun     RESTYPE type;
55*4882a593Smuzhiyun     union {
56*4882a593Smuzhiyun         struct {
57*4882a593Smuzhiyun             char visibility;
58*4882a593Smuzhiyun             char class;
59*4882a593Smuzhiyun             char root;
60*4882a593Smuzhiyun         } win;
61*4882a593Smuzhiyun         struct {
62*4882a593Smuzhiyun             Bool shared;
63*4882a593Smuzhiyun         } pix;
64*4882a593Smuzhiyun         struct {
65*4882a593Smuzhiyun             Bool root;
66*4882a593Smuzhiyun         } pict;
67*4882a593Smuzhiyun         char raw_data[4];
68*4882a593Smuzhiyun     } u;
69*4882a593Smuzhiyun } PanoramiXRes;
70*4882a593Smuzhiyun 
71*4882a593Smuzhiyun #define FOR_NSCREENS_FORWARD(j) for(j = 0; j < PanoramiXNumScreens; j++)
72*4882a593Smuzhiyun #define FOR_NSCREENS_FORWARD_SKIP(j) for(j = 1; j < PanoramiXNumScreens; j++)
73*4882a593Smuzhiyun #define FOR_NSCREENS_BACKWARD(j) for(j = PanoramiXNumScreens - 1; j >= 0; j--)
74*4882a593Smuzhiyun #define FOR_NSCREENS(j) FOR_NSCREENS_FORWARD(j)
75*4882a593Smuzhiyun 
76*4882a593Smuzhiyun #define IS_SHARED_PIXMAP(r) (((r)->type == XRT_PIXMAP) && (r)->u.pix.shared)
77*4882a593Smuzhiyun 
78*4882a593Smuzhiyun #define IS_ROOT_DRAWABLE(d) (((d)->type == XRT_WINDOW) && (d)->u.win.root)
79*4882a593Smuzhiyun #endif                          /* _PANORAMIX_H_ */
80