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