1 | /* $TOG: panoramiX.h /main/4 1998/03/17 06:51:02 kaleb $ */
|
---|
2 | /*****************************************************************
|
---|
3 |
|
---|
4 | Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
|
---|
5 |
|
---|
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
|
---|
7 | of this software and associated documentation files (the "Software"), to deal
|
---|
8 | in the Software without restriction, including without limitation the rights
|
---|
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
---|
10 | copies of the Software.
|
---|
11 |
|
---|
12 | The above copyright notice and this permission notice shall be included in
|
---|
13 | all copies or substantial portions of the Software.
|
---|
14 |
|
---|
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
---|
18 | DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
|
---|
19 | BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
|
---|
20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
---|
21 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
---|
22 |
|
---|
23 | Except as contained in this notice, the name of Digital Equipment Corporation
|
---|
24 | shall not be used in advertising or otherwise to promote the sale, use or other
|
---|
25 | dealings in this Software without prior written authorization from Digital
|
---|
26 | Equipment Corporation.
|
---|
27 |
|
---|
28 | ******************************************************************/
|
---|
29 |
|
---|
30 |
|
---|
31 | /* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */
|
---|
32 |
|
---|
33 | /*
|
---|
34 | * PanoramiX definitions
|
---|
35 | */
|
---|
36 |
|
---|
37 | #ifdef HAVE_DIX_CONFIG_H
|
---|
38 | #include <dix-config.h>
|
---|
39 | #endif
|
---|
40 |
|
---|
41 | #ifndef _PANORAMIX_H_
|
---|
42 | #define _PANORAMIX_H_
|
---|
43 |
|
---|
44 | #include <X11/extensions/panoramiXext.h>
|
---|
45 | #include "gcstruct.h"
|
---|
46 |
|
---|
47 |
|
---|
48 | typedef struct _PanoramiXData {
|
---|
49 | int x;
|
---|
50 | int y;
|
---|
51 | int width;
|
---|
52 | int height;
|
---|
53 | } PanoramiXData;
|
---|
54 |
|
---|
55 | typedef struct _PanoramiXInfo {
|
---|
56 | XID id ;
|
---|
57 | } PanoramiXInfo;
|
---|
58 |
|
---|
59 | typedef struct {
|
---|
60 | PanoramiXInfo info[MAXSCREENS];
|
---|
61 | RESTYPE type;
|
---|
62 | union {
|
---|
63 | struct {
|
---|
64 | char visibility;
|
---|
65 | char class;
|
---|
66 | char root;
|
---|
67 | } win;
|
---|
68 | struct {
|
---|
69 | Bool shared;
|
---|
70 | } pix;
|
---|
71 | #ifdef RENDER
|
---|
72 | struct {
|
---|
73 | Bool root;
|
---|
74 | } pict;
|
---|
75 | #endif
|
---|
76 | char raw_data[4];
|
---|
77 | } u;
|
---|
78 | } PanoramiXRes;
|
---|
79 |
|
---|
80 | #define FOR_NSCREENS_FORWARD(j) for(j = 0; j < PanoramiXNumScreens; j++)
|
---|
81 | #define FOR_NSCREENS_BACKWARD(j) for(j = PanoramiXNumScreens - 1; j >= 0; j--)
|
---|
82 | #define FOR_NSCREENS(j) FOR_NSCREENS_FORWARD(j)
|
---|
83 |
|
---|
84 | #define BREAK_IF(a) if ((a)) break
|
---|
85 | #define IF_RETURN(a,b) if ((a)) return (b)
|
---|
86 |
|
---|
87 | #define FORCE_ROOT(a) { \
|
---|
88 | int _j; \
|
---|
89 | for (_j = PanoramiXNumScreens - 1; _j; _j--) \
|
---|
90 | if ((a).root == WindowTable[_j]->drawable.id) \
|
---|
91 | break; \
|
---|
92 | (a).rootX += panoramiXdataPtr[_j].x; \
|
---|
93 | (a).rootY += panoramiXdataPtr[_j].y; \
|
---|
94 | (a).root = WindowTable[0]->drawable.id; \
|
---|
95 | }
|
---|
96 |
|
---|
97 | #define FORCE_WIN(a) { \
|
---|
98 | if ((win = PanoramiXFindIDOnAnyScreen(XRT_WINDOW, a))) { \
|
---|
99 | (a) = win->info[0].id; /* Real ID */ \
|
---|
100 | } \
|
---|
101 | }
|
---|
102 |
|
---|
103 | #define FORCE_CMAP(a) { \
|
---|
104 | if ((win = PanoramiXFindIDOnAnyScreen(XRT_COLORMAP, a))) { \
|
---|
105 | (a) = win->info[0].id; /* Real ID */ \
|
---|
106 | } \
|
---|
107 | }
|
---|
108 |
|
---|
109 | #define IS_SHARED_PIXMAP(r) (((r)->type == XRT_PIXMAP) && (r)->u.pix.shared)
|
---|
110 |
|
---|
111 | #define SKIP_FAKE_WINDOW(a) if(!LookupIDByType(a, XRT_WINDOW)) return
|
---|
112 |
|
---|
113 | #endif /* _PANORAMIX_H_ */
|
---|