comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/X11/extensions/multibuf.h @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
comparison
equal deleted inserted replaced
67:0e9998148a16 69:33d812a61356
1 /*
2 *
3 Copyright 1989, 1998 The Open Group
4
5 Permission to use, copy, modify, distribute, and sell this software and its
6 documentation for any purpose is hereby granted without fee, provided that
7 the above copyright notice appear in all copies and that both that
8 copyright notice and this permission notice appear in supporting
9 documentation.
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 THE
17 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
21 Except as contained in this notice, the name of The Open Group shall not be
22 used in advertising or otherwise to promote the sale, use or other dealings
23 in this Software without prior written authorization from The Open Group.
24 */
25
26 #ifndef _MULTIBUF_H_
27 #define _MULTIBUF_H_
28
29 #include <X11/Xfuncproto.h>
30
31 #include <X11/extensions/multibufconst.h>
32
33 #define MbufGetReq(name,req,info) GetReq (name, req); \
34 req->reqType = info->codes->major_opcode; \
35 req->mbufReqType = X_##name;
36
37 /*
38 * Extra definitions that will only be needed in the client
39 */
40 typedef XID Multibuffer;
41
42 typedef struct {
43 int type; /* of event */
44 unsigned long serial; /* # of last request processed by server */
45 int send_event; /* true if this came from a SendEvent request */
46 Display *display; /* Display the event was read from */
47 Multibuffer buffer; /* buffer of event */
48 int state; /* see Clobbered constants above */
49 } XmbufClobberNotifyEvent;
50
51 typedef struct {
52 int type; /* of event */
53 unsigned long serial; /* # of last request processed by server */
54 int send_event; /* true if this came from a SendEvent request */
55 Display *display; /* Display the event was read from */
56 Multibuffer buffer; /* buffer of event */
57 } XmbufUpdateNotifyEvent;
58
59
60 /*
61 * per-window attributes that can be got
62 */
63 typedef struct {
64 int displayed_index; /* which buffer is being displayed */
65 int update_action; /* Undefined, Background, Untouched, Copied */
66 int update_hint; /* Frequent, Intermittent, Static */
67 int window_mode; /* Mono, Stereo */
68 int nbuffers; /* Number of buffers */
69 Multibuffer *buffers; /* Buffers */
70 } XmbufWindowAttributes;
71
72 /*
73 * per-window attributes that can be set
74 */
75 typedef struct {
76 int update_hint; /* Frequent, Intermittent, Static */
77 } XmbufSetWindowAttributes;
78
79
80 /*
81 * per-buffer attributes that can be got
82 */
83 typedef struct {
84 Window window; /* which window this belongs to */
85 unsigned long event_mask; /* events that have been selected */
86 int buffer_index; /* which buffer is this */
87 int side; /* Mono, Left, Right */
88 } XmbufBufferAttributes;
89
90 /*
91 * per-buffer attributes that can be set
92 */
93 typedef struct {
94 unsigned long event_mask; /* events that have been selected */
95 } XmbufSetBufferAttributes;
96
97
98 /*
99 * per-screen buffer info (there will be lists of them)
100 */
101 typedef struct {
102 VisualID visualid; /* visual usable at this depth */
103 int max_buffers; /* most buffers for this visual */
104 int depth; /* depth of buffers to be created */
105 } XmbufBufferInfo;
106
107 _XFUNCPROTOBEGIN
108
109 extern Bool XmbufQueryExtension(
110 Display* /* dpy */,
111 int* /* event_base_return */,
112 int* /* error_base_return */
113 );
114
115 extern Status XmbufGetVersion(
116 Display* /* dpy */,
117 int* /* major_version_return */,
118 int* /* minor_version_return */
119 );
120
121 extern int XmbufCreateBuffers(
122 Display* /* dpy */,
123 Window /* w */,
124 int /* count */,
125 int /* update_action */,
126 int /* update_hint */,
127 Multibuffer* /* buffers */
128 );
129
130 extern void XmbufDestroyBuffers(
131 Display* /* dpy */,
132 Window /* window */
133 );
134
135 extern void XmbufDisplayBuffers(
136 Display* /* dpy */,
137 int /* count */,
138 Multibuffer* /* buffers */,
139 int /* min_delay */,
140 int /* max_delay */
141 );
142
143 extern Status XmbufGetWindowAttributes(
144 Display* /* dpy */,
145 Window /* w */,
146 XmbufWindowAttributes* /* attr */
147 );
148
149 extern void XmbufChangeWindowAttributes(
150 Display* /* dpy */,
151 Window /* w */,
152 unsigned long /* valuemask */,
153 XmbufSetWindowAttributes* /* attr */
154 );
155
156 extern Status XmbufGetBufferAttributes(
157 Display* /* dpy */,
158 Multibuffer /* b */,
159 XmbufBufferAttributes* /* attr */
160 );
161
162 extern void XmbufChangeBufferAttributes(
163 Display* /* dpy */,
164 Multibuffer /* b */,
165 unsigned long /* valuemask */,
166 XmbufSetBufferAttributes* /* attr */
167 );
168
169 extern Status XmbufGetScreenInfo(
170 Display* /* dpy */,
171 Drawable /* d */,
172 int* /* nmono_return */,
173 XmbufBufferInfo** /* mono_info_return */,
174 int* /* nstereo_return */,
175 XmbufBufferInfo** /* stereo_info_return */
176 );
177
178 extern Window XmbufCreateStereoWindow(
179 Display* /* dpy */,
180 Window /* parent */,
181 int /* x */,
182 int /* y */,
183 unsigned int /* width */,
184 unsigned int /* height */,
185 unsigned int /* border_width */,
186 int /* depth */,
187 unsigned int /* class */,
188 Visual* /* visual */,
189 unsigned long /* valuemask */,
190 XSetWindowAttributes* /* attr */,
191 Multibuffer* /* leftp */,
192 Multibuffer* /* rightp */
193 );
194
195 extern void XmbufClearBufferArea(
196 Display* /* dpy */,
197 Multibuffer /* buffer */,
198 int /* x */,
199 int /* y */,
200 unsigned int /* width */,
201 unsigned int /* height */,
202 Bool /* exposures */
203 );
204
205 _XFUNCPROTOEND
206
207 #endif /* _MULTIBUF_H_ */