1XMBUF(3) X FUNCTIONS XMBUF(3)
2
3
4
6 XmbufQueryExtension, XmbufGetVersion, XmbufCreateBuffers, XmbufDestroy‐
7 Buffers, XmbufDisplayBuffers, XmbufGetWindowAttributes, XmbufChangeWin‐
8 dowAttributes, XmbufGetBufferAttributes, XmbufChangeBufferAttributes,
9 XmbufGetScreenInfo, XmbufCreateStereoWindow - X multibuffering func‐
10 tions
11
13 #include <X11/extensions/multibuf.h>
14
15 Bool XmbufQueryExtension(
16 Display *dpy,
17 Display *dpy,
18 int *event_base_return,
19 int *error_base_return);
20
21 Status XmbufGetVersion(
22 Display *dpy,
23 int *major_version_return,
24 int *minor_version_return);
25
26 int XmbufCreateBuffers(
27 Display *dpy,
28 Window window,
29 int count,
30 int update_action,
31 int update_hint,
32 Multibuffer *buffers_update);
33
34 void XmbufDestroyBuffers(
35 Display *dpy,
36 Window window);
37
38 void XmbufDisplayBuffers(
39 Display *dpy,
40 int count,
41 Multibuffer *buffers,
42 int min_delay,
43 int max_delay);
44
45 Status XmbufGetWindowAttributes(
46 Display *dpy,
47 Window window,
48 XmbufWindowAttributes *attributes);
49
50 void XmbufChangeWindowAttributes(
51 Display *dpy,
52 Window window,
53 unsigned long valuemask,
54 XmbufSetWindowAttributes *attributes);
55
56 Status XmbufGetBufferAttributes(
57 Display *dpy,
58 Multibuffer buffer,
59 XmbufBufferAttributes *attributes);
60
61 void XmbufChangeBufferAttributes(
62 Display *dpy,
63 Multibuffer buffer,
64 unsigned long valuemask,
65 XmbufSetBufferAttributes *attributes);
66
67 Status XmbufGetScreenInfo(
68 Display *dpy,
69 Drawable drawable,
70 int *nmono_return,
71 XmbufBufferInfo **mono_info_return,
72 int *nstereo_return,
73 XmbufBufferInfo **stereo_info_return);
74
75 Window XmbufCreateStereoWindow(
76 Display *dpy,
77 Window parent,
78 int x,
79 int y,
80 unsigned int width,
81 unsigned int height,
82 unsigned int border_width,
83 int depth,
84 unsigned int class, /* InputOutput, InputOnly*/
85 Visual *visual,
86 unsigned long valuemask,
87 XSetWindowAttributes *attributes,
88 Multibuffer *left_return,
89 Multibuffer *right_return);
90
92 Events:
93 typedef struct {
94 int type; /* of event */
95 unsigned long serial; /* # of last request processed by server */
96 int send_event; /* true if this came from a SendEvent request */
97 Display *display; /* Display the event was read from */
98 Multibuffer buffer; /* buffer of event */
99 int state; /* see Clobbered constants above */
100 } XmbufClobberNotifyEvent;
101
102 typedef struct {
103 int type; /* of event */
104 unsigned long serial; /* # of last request processed by server */
105 int send_event; /* true if this came from a SendEvent request */
106 Display *display; /* Display the event was read from */
107 Multibuffer buffer; /* buffer of event */
108 } XmbufUpdateNotifyEvent;
109
110 Per-window attributes that can be got:
111
112 typedef struct {
113 int displayed_index; /* which buffer is being displayed */
114 int update_action; /* Undefined, Background, Untouched, Copied */
115 int update_hint; /* Frequent, Intermittent, Static */
116 int window_mode; /* Mono, Stereo */
117 int nbuffers; /* Number of buffers */
118 Multibuffer *buffers; /* Buffers */
119 } XmbufWindowAttributes;
120
121 Per-window attributes that can be set:
122
123 typedef struct {
124 int update_hint; /* Frequent, Intermittent, Static */
125 } XmbufSetWindowAttributes;
126
127 Per-buffer attributes that can be got:
128
129 typedef struct {
130 Window window; /* which window this belongs to */
131 unsigned long event_mask; /* events that have been selected */
132 int buffer_index; /* which buffer is this */
133 int side; /* Mono, Left, Right */
134 } XmbufBufferAttributes;
135
136 Per-buffer attributes that can be set:
137
138 typedef struct {
139 unsigned long event_mask; /* events that have been selected */
140 } XmbufSetBufferAttributes;
141
142 Per-screen buffer info (there will be lists of them):
143
144 typedef struct {
145 VisualID visualid; /* visual usable at this depth */
146 int max_buffers; /* most buffers for this visual */
147 int depth; /* depth of buffers to be created */
148 } XmbufBufferInfo;
149
151 The application programming library for the X11 Double-Buffering,
152 Multi-Buffering, and Stereo Extension contains the interfaces described
153 below. With the exception of XmbufQueryExtension, if any of these rou‐
154 tines are called with a display that does not support the extension,
155 the ExtensionErrorHandler (which can be set with XSetExtensionErrorHan‐
156 dler and functions the same way as XSetErrorHandler) will be called and
157 the function will then return.
158
159 XmbufQueryExtension returns True if the multibuffering/stereo extension
160 is available on the given display. If the extension exists, the value
161 of the first event code (which should be added to the event type con‐
162 stants MultibufferClobberNotify and MultibufferUpdateNotify to get the
163 actual values) is stored into event_base_return and the value of the
164 first error code (which should be added to the error type constant
165 MultibufferBadBuffer to get the actual value) is stored into
166 error_base_return.
167
168 XmbufGetVersion gets the major and minor version numbers of the exten‐
169 sion. The return value is zero if an error occurs or non-zero if no
170 error happens.
171
172 XmbufCreateBuffers requests that "count" buffers be created with the
173 given update_action and update_hint and be associated with the indi‐
174 cated window. The number of buffers created is returned (zero if an
175 error occurred) and buffers_update is filled in with that many Multi‐
176 buffer identifiers.
177
178 XmbufDestroyBuffers destroys the buffers associated with the given win‐
179 dow.
180
181 XmbufDisplayBuffers displays the indicated buffers their appropriate
182 windows within max_delay milliseconds after min_delay milliseconds have
183 passed. No two buffers may be associated with the same window or else
184 a Match error is generated.
185
186 XmbufGetWindowAttributes gets the multibuffering attributes that apply
187 to all buffers associated with the given window. The list of buffers
188 returns may be freed with XFree. Returns non-zero on success and zero
189 if an error occurs.
190
191 XmbufChangeWindowAttributes sets the multibuffering attributes that
192 apply to all buffers associated with the given window. This is cur‐
193 rently limited to the update_hint.
194
195 XmbufGetBufferAttributes gets the attributes for the indicated buffer.
196 Returns non-zero on success and zero if an error occurs.
197
198 XmbufChangeBufferAttributes sets the attributes for the indicated buf‐
199 fer. This is currently limited to the event_mask.
200
201 XmbufGetScreenInfo gets the parameters controlling how mono and stereo
202 windows may be created on the screen of the given drawable. The num‐
203 bers of sets of visual and depths are returned in nmono_return and
204 nstereo_return. If nmono_return is greater than zero, then
205 mono_info_return is set to the address of an array of XmbufBufferInfo
206 structures describing the various visuals and depths that may be used.
207 Otherwise, mono_info_return is set to NULL. Similarly,
208 stereo_info_return is set according to nstereo_return. The storage
209 returned in mono_info_return and stereo_info_return may be released by
210 XFree. If no errors are encounted, non-zero will be returned.
211
212 XmbufCreateStereoWindow creates a stereo window in the same way that
213 XCreateWindow creates a mono window. The buffer ids for the left and
214 right buffers are returned in left_return and right_return, respec‐
215 tively. If an extension error handler that returns is installed, None
216 will be returned if the extension is not available on this display.
217
219 Update_action field:
220 MultibufferUpdateActionUndefined
221 MultibufferUpdateActionBackground
222 MultibufferUpdateActionUntouched
223 MultibufferUpdateActionCopied
224
225 Update_hint field:
226 MultibufferUpdateHintFrequent
227 MultibufferUpdateHintIntermittent
228 MultibufferUpdateHintStatic
229
230 Valuemask fields:
231 MultibufferWindowUpdateHint
232 MultibufferBufferEventMask
233
234 Mono vs. stereo and left vs. right:
235 MultibufferModeMono
236 MultibufferModeStereo
237 MultibufferSideMono
238 MultibufferSideLeft
239 MultibufferSideRight
240
241 Clobber state:
242 MultibufferUnclobbered
243 MultibufferPartiallyClobbered
244 MultibufferFullyClobbered
245
246 Event stuff:
247 MultibufferClobberNotifyMask
248 MultibufferUpdateNotifyMask
249 MultibufferClobberNotify
250 MultibufferUpdateNotify
251 MultibufferNumberEvents
252 MultibufferBadBuffer
253 MultibufferNumberErrors
254
256 This manual page needs more work.
257
259 Extending X for Double Buffering, Multi-Buffering, and Stereo
260
261
262
263X Version 11 libXext 1.3.4 XMBUF(3)