Debian Codegraph @

man/Xmbuf.man

raw
1 .\" Copyright (c) 1989, 1994 X Consortium
2 .\"
3 .\" Permission is hereby granted, free of charge, to any person obtaining a
4 .\" copy of this software and associated documentation files (the "Software"),
5 .\" to deal in the Software without restriction, including without limitation
6 .\" the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 .\" and/or sell copies of the Software, and to permit persons to whom the
8 .\" Software furnished to do so, subject to the following conditions:
9 .\"
10 .\" The above copyright notice and this permission notice shall be included in
11 .\" all copies or substantial portions of the Software.
12 .\"
13 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 .\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 .\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16 .\" THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
17 .\" WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
18 .\" OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 .\" SOFTWARE.
20 .\"
21 .\" Except as contained in this notice, the name of the X Consortium shall not
22 .\" be used in advertising or otherwise to promote the sale, use or other
23 .\" dealing in this Software without prior written authorization from the
24 .\" X Consortium.
25 .\"
26 .\" Copyright 1989, Digital Equipment Corporation.
27 .\" Permission to use, copy, modify, distribute, and sell this documentation
28 .\" for any purpose and without fee is hereby granted, provided that the above
29 .\" copyright notice and this permission notice appear in all copies.
30 .\" Digital Equipment Corporation makes no representations
31 .\" about the suitability for any purpose of the information in
32 .\" this document. This documentation is provided "as is"
33 .\" without express or implied warranty.
34 .\"
35 .de ZN
36 .ie t \fB\^\\$1\^\fR\\$2
37 .el \fI\^\\$1\^\fP\\$2
38 ..
39 .de EX
40 .nf
41 .ft CW
42 ..
43 .de EE
44 .ft
45 .fi
46 ..
47 .TH XMBUF __libmansuffix__ __xorgversion__ "X FUNCTIONS"
48 .SH NAME
49 XmbufQueryExtension, XmbufGetVersion, XmbufCreateBuffers, XmbufDestroyBuffers, XmbufDisplayBuffers, XmbufGetWindowAttributes, XmbufChangeWindowAttributes, XmbufGetBufferAttributes, XmbufChangeBufferAttributes, XmbufGetScreenInfo, XmbufCreateStereoWindow - X multibuffering functions
50 .SH SYNTAX
51 .EX
52 \&#include <X11/extensions/multibuf.h>
53
54 Bool XmbufQueryExtension(
55 Display *dpy,
56 Display *dpy,
57 int *event_base_return,
58 int *error_base_return);
59
60 Status XmbufGetVersion(
61 Display *dpy,
62 int *major_version_return,
63 int *minor_version_return);
64
65 int XmbufCreateBuffers(
66 Display *dpy,
67 Window window,
68 int count,
69 int update_action,
70 int update_hint,
71 Multibuffer *buffers_update);
72
73 void XmbufDestroyBuffers(
74 Display *dpy,
75 Window window);
76
77 void XmbufDisplayBuffers(
78 Display *dpy,
79 int count,
80 Multibuffer *buffers,
81 int min_delay,
82 int max_delay);
83
84 Status XmbufGetWindowAttributes(
85 Display *dpy,
86 Window window,
87 XmbufWindowAttributes *attributes);
88
89 void XmbufChangeWindowAttributes(
90 Display *dpy,
91 Window window,
92 unsigned long valuemask,
93 XmbufSetWindowAttributes *attributes);
94
95 Status XmbufGetBufferAttributes(
96 Display *dpy,
97 Multibuffer buffer,
98 XmbufBufferAttributes *attributes);
99
100 void XmbufChangeBufferAttributes(
101 Display *dpy,
102 Multibuffer buffer,
103 unsigned long valuemask,
104 XmbufSetBufferAttributes *attributes);
105
106 Status XmbufGetScreenInfo(
107 Display *dpy,
108 Drawable drawable,
109 int *nmono_return,
110 XmbufBufferInfo **mono_info_return,
111 int *nstereo_return,
112 XmbufBufferInfo **stereo_info_return);
113
114 Window XmbufCreateStereoWindow(
115 Display *dpy,
116 Window parent,
117 int x,
118 int y,
119 unsigned int width,
120 unsigned int height,
121 unsigned int border_width,
122 int depth,
123 unsigned int class, /\&* InputOutput, InputOnly*/
124 Visual *visual,
125 unsigned long valuemask,
126 XSetWindowAttributes *attributes,
127 Multibuffer *left_return,
128 Multibuffer *right_return);
129 .EE
130 .SH STRUCTURES
131 \fIEvents:\fP
132 .EX
133 typedef struct {
134 int type; /\&* of event */
135 unsigned long serial; /\&* # of last request processed by server */
136 int send_event; /\&* true if this came from a SendEvent request */
137 Display *display; /\&* Display the event was read from */
138 Multibuffer buffer; /\&* buffer of event */
139 int state; /\&* see Clobbered constants above */
140 } XmbufClobberNotifyEvent;
141
142 typedef struct {
143 int type; /\&* of event */
144 unsigned long serial; /\&* # of last request processed by server */
145 int send_event; /\&* true if this came from a SendEvent request */
146 Display *display; /\&* Display the event was read from */
147 Multibuffer buffer; /\&* buffer of event */
148 } XmbufUpdateNotifyEvent;
149 .EE
150
151 \fIPer-window attributes that can be got:\fP
152
153 .EX
154 typedef struct {
155 int displayed_index; /\&* which buffer is being displayed */
156 int update_action; /\&* Undefined, Background, Untouched, Copied */
157 int update_hint; /\&* Frequent, Intermittent, Static */
158 int window_mode; /\&* Mono, Stereo */
159 int nbuffers; /\&* Number of buffers */
160 Multibuffer *buffers; /\&* Buffers */
161 } XmbufWindowAttributes;
162 .EE
163
164 \fIPer-window attributes that can be set:\fP
165
166 .EX
167 typedef struct {
168 int update_hint; /\&* Frequent, Intermittent, Static */
169 } XmbufSetWindowAttributes;
170 .EE
171
172 \fIPer-buffer attributes that can be got:\fP
173
174 .EX
175 typedef struct {
176 Window window; /\&* which window this belongs to */
177 unsigned long event_mask; /\&* events that have been selected */
178 int buffer_index; /\&* which buffer is this */
179 int side; /\&* Mono, Left, Right */
180 } XmbufBufferAttributes;
181 .EE
182
183 \fIPer-buffer attributes that can be set:\fP
184
185 .EX
186 typedef struct {
187 unsigned long event_mask; /\&* events that have been selected */
188 } XmbufSetBufferAttributes;
189 .EE
190
191 \fIPer-screen buffer info (there will be lists of them):\fP
192
193 .EX
194 typedef struct {
195 VisualID visualid; /\&* visual usable at this depth */
196 int max_buffers; /\&* most buffers for this visual */
197 int depth; /\&* depth of buffers to be created */
198 } XmbufBufferInfo;
199 .EE
200 .SH DESCRIPTION
201 The application programming library for the
202 \fIX11 Double-Buffering, Multi-Buffering, and Stereo Extension\fP
203 contains the interfaces described below.
204 With the exception of
205 .ZN XmbufQueryExtension ,
206 if any of these routines are
207 called with a display that does not support the extension, the
208 ExtensionErrorHandler (which can be set with
209 .ZN XSetExtensionErrorHandler
210 and functions the same way as
211 .ZN XSetErrorHandler )
212 will be called and the function will then return.
213 .PP
214 .ZN XmbufQueryExtension
215 returns
216 .ZN True
217 if the multibuffering/stereo
218 extension is available on the
219 given display. If the extension exists, the value of the first event
220 code (which should be added to the event type constants
221 .ZN MultibufferClobberNotify
222 and
223 .ZN MultibufferUpdateNotify
224 to get the actual
225 values) is stored into event_base_return and the value of the first
226 error code (which should be added to the error type constant
227 .ZN MultibufferBadBuffer
228 to get the actual value) is stored into error_base_return.
229 .PP
230 .ZN XmbufGetVersion
231 gets the major and minor version numbers of the extension.
232 The return
233 value is zero if an error occurs or non-zero if no error happens.
234 .PP
235 .ZN XmbufCreateBuffers
236 requests that "count" buffers be
237 created with the given update_action
238 and update_hint and be associated with the indicated window. The
239 number of buffers created is returned (zero if an error occurred)
240 and buffers_update is filled in with that many Multibuffer identifiers.
241 .PP
242 .ZN XmbufDestroyBuffers
243 destroys the buffers associated
244 with the given window.
245 .PP
246 .ZN XmbufDisplayBuffers
247 displays the indicated buffers their
248 appropriate windows within
249 max_delay milliseconds after min_delay milliseconds have passed.
250 No two buffers may be associated with the same window or else a Match
251 error is generated.
252 .PP
253 .ZN XmbufGetWindowAttributes
254 gets the multibuffering attributes that apply
255 to all buffers associated
256 with the given window.
257 The list of buffers returns may be freed with
258 .ZN XFree .
259 Returns non-zero on success and zero if an error occurs.
260 .PP
261 .ZN XmbufChangeWindowAttributes
262 sets the multibuffering attributes
263 that apply to all buffers associated
264 with the given window. This is currently limited to the update_hint.
265 .PP
266 .ZN XmbufGetBufferAttributes
267 gets the attributes for the indicated buffer.
268 Returns non-zero on
269 success and zero if an error occurs.
270 .PP
271 .ZN XmbufChangeBufferAttributes
272 sets the attributes for the indicated buffer.
273 This is currently limited to the event_mask.
274 .PP
275 .ZN XmbufGetScreenInfo
276 gets the parameters controlling how
277 mono and stereo windows may be
278 created on the screen of the given drawable. The numbers of sets of
279 visual and depths are returned in nmono_return and nstereo_return. If
280 nmono_return is greater than zero, then mono_info_return is set to the
281 address of an array of
282 .ZN XmbufBufferInfo
283 structures describing the
284 various visuals and depths that may be used. Otherwise,
285 mono_info_return is set to NULL. Similarly, stereo_info_return is set
286 according to nstereo_return. The storage returned in mono_info_return
287 and stereo_info_return may be released by
288 .ZN XFree .
289 If no errors are
290 encounted, non-zero will be returned.
291 .PP
292 .ZN XmbufCreateStereoWindow
293 creates a stereo window in the same way that
294 .ZN XCreateWindow
295 creates a mono window. The buffer ids for the left and right buffers are
296 returned in left_return and right_return, respectively. If an
297 extension error handler that returns is installed,
298 .ZN None
299 will be returned if the extension is not available on this display.
300 .SH PREDEFINED VALUES
301 .sp
302 Update_action field:
303 .RS
304 .nf
305 .ZN MultibufferUpdateActionUndefined
306 .ZN MultibufferUpdateActionBackground
307 .ZN MultibufferUpdateActionUntouched
308 .ZN MultibufferUpdateActionCopied
309 .fi
310 .RE
311 .sp
312 Update_hint field:
313 .RS
314 .nf
315 .ZN MultibufferUpdateHintFrequent
316 .ZN MultibufferUpdateHintIntermittent
317 .ZN MultibufferUpdateHintStatic
318 .fi
319 .RE
320 .sp
321 Valuemask fields:
322 .RS
323 .nf
324 .ZN MultibufferWindowUpdateHint
325 .ZN MultibufferBufferEventMask
326 .fi
327 .RE
328 .sp
329 Mono vs. stereo and left vs. right:
330 .RS
331 .nf
332 .ZN MultibufferModeMono
333 .ZN MultibufferModeStereo
334 .ZN MultibufferSideMono
335 .ZN MultibufferSideLeft
336 .ZN MultibufferSideRight
337 .fi
338 .RE
339 .sp
340 Clobber state:
341 .RS
342 .nf
343 .ZN MultibufferUnclobbered
344 .ZN MultibufferPartiallyClobbered
345 .ZN MultibufferFullyClobbered
346 .fi
347 .RE
348 .sp
349 Event stuff:
350 .RS
351 .nf
352 .ZN MultibufferClobberNotifyMask
353 .ZN MultibufferUpdateNotifyMask
354 .ZN MultibufferClobberNotify
355 .ZN MultibufferUpdateNotify
356 .ZN MultibufferNumberEvents
357 .ZN MultibufferBadBuffer
358 .ZN MultibufferNumberErrors
359 .fi
360 .RE
361 .SH BUGS
362 This manual page needs more work.
363 .SH SEE ALSO
364 \fIExtending X for Double Buffering, Multi-Buffering, and Stereo\fP