1XMBUF(3)                          X FUNCTIONS                         XMBUF(3)
2
3
4

NAME

6       XmbufQueryExtension, XmbufGetVersion, XmbufCreateBuffers, XmbufDestroy‐
7       Buffers, XmbufDisplayBuffers, XmbufGetWindowAttributes, XmbufChangeWin‐
8       dowAttributes,  XmbufGetBufferAttributes,  XmbufChangeBufferAttributes,
9       XmbufGetScreenInfo, XmbufCreateStereoWindow -  X  multibuffering  func‐
10       tions
11

SYNTAX

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

STRUCTURES

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       typedef struct {
112           int displayed_index;      /* which buffer is being displayed */
113           int update_action;        /* Undefined, Background, Untouched, Copied */
114           int update_hint;          /* Frequent, Intermittent, Static */
115           int window_mode;          /* Mono, Stereo */
116           int nbuffers;             /* Number of buffers */
117           Multibuffer *buffers;     /* Buffers */
118       } XmbufWindowAttributes;
119
120       Per-window attributes that can be set:
121       typedef struct {
122           int update_hint;          /* Frequent, Intermittent, Static */
123       } XmbufSetWindowAttributes;
124
125       Per-buffer attributes that can be got:
126       typedef struct {
127           Window window;            /* which window this belongs to */
128           unsigned long event_mask; /* events that have been selected */
129           int buffer_index;         /* which buffer is this */
130           int side;                 /* Mono, Left, Right */
131       } XmbufBufferAttributes;
132
133       Per-buffer attributes that can be set:
134       typedef struct {
135           unsigned long event_mask; /* events that have been selected */
136       } XmbufSetBufferAttributes;
137
138       Per-screen buffer info (there will be lists of them):
139       typedef struct {
140           VisualID visualid;        /* visual usable at this depth */
141           int max_buffers;          /* most buffers for this visual */
142           int depth;                /* depth of buffers to be created */
143       } XmbufBufferInfo;
144

DESCRIPTION

146       The  application  programming  library  for  the  X11 Double-Buffering,
147       Multi-Buffering, and Stereo Extension contains the interfaces described
148       below.  With the exception of XmbufQueryExtension, if any of these rou‐
149       tines are called with a display that does not  support  the  extension,
150       the ExtensionErrorHandler (which can be set with XSetExtensionErrorHan‐
151       dler and functions the same way as XSetErrorHandler) will be called and
152       the function will then return.
153
154       XmbufQueryExtension returns True if the multibuffering/stereo extension
155       is available on the given display.  If the extension exists, the  value
156       of  the  first event code (which should be added to the event type con‐
157       stants MultibufferClobberNotify and MultibufferUpdateNotify to get  the
158       actual  values)  is  stored into event_base_return and the value of the
159       first error code (which should be added  to  the  error  type  constant
160       MultibufferBadBuffer   to   get   the  actual  value)  is  stored  into
161       error_base_return.
162
163       XmbufGetVersion gets the major and minor version numbers of the  exten‐
164       sion.   The  return  value is zero if an error occurs or non-zero if no
165       error happens.
166
167       XmbufCreateBuffers requests that "count" buffers be  created  with  the
168       given  update_action  and  update_hint and be associated with the indi‐
169       cated window.  The number of buffers created is returned  (zero  if  an
170       error  occurred)  and buffers_update is filled in with that many Multi‐
171       buffer identifiers.
172
173       XmbufDestroyBuffers destroys the buffers associated with the given win‐
174       dow.
175
176       XmbufDisplayBuffers  displays  the  indicated buffers their appropriate
177       windows within max_delay milliseconds after min_delay milliseconds have
178       passed.   No two buffers may be associated with the same window or else
179       a Match error is generated.
180
181       XmbufGetWindowAttributes gets the multibuffering attributes that  apply
182       to  all  buffers associated with the given window.  The list of buffers
183       returns may be freed with XFree.  Returns non-zero on success and  zero
184       if an error occurs.
185
186       XmbufChangeWindowAttributes  sets  the  multibuffering  attributes that
187       apply to all buffers associated with the given window.   This  is  cur‐
188       rently limited to the update_hint.
189
190       XmbufGetBufferAttributes  gets the attributes for the indicated buffer.
191       Returns non-zero on success and zero if an error occurs.
192
193       XmbufChangeBufferAttributes sets the attributes for the indicated  buf‐
194       fer.  This is currently limited to the event_mask.
195
196       XmbufGetScreenInfo  gets the parameters controlling how mono and stereo
197       windows may be created on the screen of the given drawable.   The  num‐
198       bers  of  sets  of  visual  and depths are returned in nmono_return and
199       nstereo_return.   If  nmono_return   is   greater   than   zero,   then
200       mono_info_return  is  set to the address of an array of XmbufBufferInfo
201       structures describing the various visuals and depths that may be  used.
202       Otherwise,    mono_info_return    is    set    to   NULL.    Similarly,
203       stereo_info_return is set according  to  nstereo_return.   The  storage
204       returned  in mono_info_return and stereo_info_return may be released by
205       XFree.  If no errors are encounted, non-zero will be returned.
206
207       XmbufCreateStereoWindow creates a stereo window in the  same  way  that
208       XCreateWindow  creates  a mono window.  The buffer ids for the left and
209       right buffers are returned in  left_return  and  right_return,  respec‐
210       tively.   If an extension error handler that returns is installed, None
211       will be returned if the extension is not available on this display.
212

PREDEFINED VALUES

214       Update_action field:
215            MultibufferUpdateActionUndefined
216            MultibufferUpdateActionBackground
217            MultibufferUpdateActionUntouched
218            MultibufferUpdateActionCopied
219
220       Update_hint field:
221            MultibufferUpdateHintFrequent
222            MultibufferUpdateHintIntermittent
223            MultibufferUpdateHintStatic
224
225       Valuemask fields:
226            MultibufferWindowUpdateHint
227            MultibufferBufferEventMask
228
229       Mono vs. stereo and left vs. right:
230            MultibufferModeMono
231            MultibufferModeStereo
232            MultibufferSideMono
233            MultibufferSideLeft
234            MultibufferSideRight
235
236       Clobber state:
237            MultibufferUnclobbered
238            MultibufferPartiallyClobbered
239            MultibufferFullyClobbered
240
241       Event stuff:
242            MultibufferClobberNotifyMask
243            MultibufferUpdateNotifyMask
244            MultibufferClobberNotify
245            MultibufferUpdateNotify
246            MultibufferNumberEvents
247            MultibufferBadBuffer
248            MultibufferNumberErrors
249

BUGS

251       This manual page needs more work.
252

SEE ALSO

254       Extending X for Double Buffering, Multi-Buffering, and Stereo
255
256
257
258X Version 11                     libXext 1.1.2                        XMBUF(3)
Impressum