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