dbe.xml revision 452262e1
1ea1d6981Smrg<?xml version="1.0" encoding="UTF-8" ?> 2ea1d6981Smrg<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" 3ea1d6981Smrg "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" 4ea1d6981Smrg[ 5ea1d6981Smrg<!ENTITY % defs SYSTEM "defs.ent"> %defs; 6ea1d6981Smrg]> 7ea1d6981Smrg 8ea1d6981Smrg 9ea1d6981Smrg<!-- 10ea1d6981Smrgby TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/) 11ea1d6981Smrgxhtml,docbook,html,refcaption --> 12ea1d6981Smrg 13ea1d6981Smrg<book id="dbe"> 14ea1d6981Smrg 15ea1d6981Smrg<bookinfo> 16ea1d6981Smrg <title>Double Buffer Extension Protocol</title> 17ea1d6981Smrg <subtitle>X Consortium Standard</subtitle> 18ea1d6981Smrg <authorgroup> 19ea1d6981Smrg <author> 20ea1d6981Smrg <firstname>Ian</firstname><surname>Elliott</surname> 21ea1d6981Smrg <affiliation><orgname>Hewlett-Packard Company</orgname></affiliation> 22ea1d6981Smrg </author> 23ea1d6981Smrg <othercredit> 24ea1d6981Smrg <firstname>David</firstname><othername>P.</othername><surname>Wiggins</surname> 25ea1d6981Smrg <affiliation><orgname>X Consortium</orgname></affiliation> 26ea1d6981Smrg </othercredit> 27ea1d6981Smrg </authorgroup> 28ea1d6981Smrg <copyright><year>1989</year><year>1992</year><year>1993</year><year>1994</year> 29ea1d6981Smrg <holder>X Consortium, Inc.</holder> 30ea1d6981Smrg </copyright> 31ea1d6981Smrg <copyright><year>1989</year><holder>Digital Equipment Corporation</holder></copyright> 32ea1d6981Smrg <copyright><year>1992</year><holder>Intergraph Corporation</holder></copyright> 33ea1d6981Smrg <copyright><year>1993</year><holder>Silicon Graphics, Inc.</holder></copyright> 34ea1d6981Smrg <copyright><year>1994</year><holder>Hewlett-Packard Company</holder></copyright> 35ea1d6981Smrg <releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo> 36ea1d6981Smrg <releaseinfo>Version 1.0</releaseinfo> 37ea1d6981Smrg 38ea1d6981Smrg<legalnotice> 39ea1d6981Smrg<para> 40ea1d6981SmrgPermission to use, copy, modify, and distribute this documentation for any 41ea1d6981Smrgpurpose and without fee is hereby granted, provided that the above copyright 42ea1d6981Smrgnotice and this permission notice appear in all copies. Digital Equipment 43ea1d6981SmrgCorporation, Intergraph Corporation, Silicon Graphics, Hewlett-Packard, and 44ea1d6981Smrgthe X Consortium make no representations about the suitability for any purpose 45ea1d6981Smrgof the information in this document. This documentation is provided “as is” 46ea1d6981Smrgwithout express or implied warranty. 47ea1d6981Smrg</para> 48ea1d6981Smrg</legalnotice> 49ea1d6981Smrg</bookinfo> 50ea1d6981Smrg 51ea1d6981Smrg<chapter id='Introduction'> 52ea1d6981Smrg<title>Introduction</title> 53ea1d6981Smrg<para>The Double Buffer Extension (DBE) provides a standard way to utilize 54ea1d6981Smrgdouble-buffering within the framework of the X Window System. Double-buffering 55ea1d6981Smrguses two buffers, called front and back, which hold images. The front buffer 56ea1d6981Smrgis visible to the user; the back buffer is not. Successive frames of an 57ea1d6981Smrganimation are rendered into the back buffer while the previously rendered 58ea1d6981Smrgframe is displayed in the front buffer. When a new frame is ready, the back 59ea1d6981Smrgand front buffers swap roles, making the new frame visible. Ideally, this 60ea1d6981Smrgexchange appears to happen instantaneously to the user and with no visual 61ea1d6981Smrgartifacts. Thus, only completely rendered images are presented to the user, 62ea1d6981Smrgand they remain visible during the entire time it takes to render a new frame. 63ea1d6981SmrgThe result is a flicker-free animation. 64ea1d6981Smrg</para> 65ea1d6981Smrg</chapter> 66ea1d6981Smrg 67ea1d6981Smrg<chapter id='Goals'> 68ea1d6981Smrg<title>Goals</title> 69ea1d6981Smrg<para>This extension should enable clients to: 70ea1d6981Smrg</para> 71ea1d6981Smrg 72ea1d6981Smrg<itemizedlist> 73ea1d6981Smrg <listitem> 74ea1d6981Smrg <para>Allocate and deallocate double-buffering for a window.</para> 75ea1d6981Smrg </listitem> 76ea1d6981Smrg <listitem> 77ea1d6981Smrg <para> 78ea1d6981SmrgDraw to and read from the front and back buffers associated with a window. 79ea1d6981Smrg </para> 80ea1d6981Smrg </listitem> 81ea1d6981Smrg <listitem> 82ea1d6981Smrg <para>Swap the front and back buffers associated with a window.</para> 83ea1d6981Smrg </listitem> 84ea1d6981Smrg <listitem> 85ea1d6981Smrg <para> 86ea1d6981SmrgSpecify a wide range of actions to be taken when a window is swapped. 87ea1d6981SmrgThis includes explicit, simple swap actions (defined below), and more 88ea1d6981Smrgcomplex actions (for example, clearing ancillary buffers) that can be put 89ea1d6981Smrgtogether within explicit "begin" and "end" requests (defined below). 90ea1d6981Smrg </para> 91ea1d6981Smrg </listitem> 92ea1d6981Smrg <listitem> 93ea1d6981Smrg <para> 94ea1d6981SmrgRequest that the front and back buffers associated with multiple 95ea1d6981Smrgdouble-buffered windows be swapped simultaneously. 96ea1d6981Smrg </para> 97ea1d6981Smrg </listitem> 98ea1d6981Smrg</itemizedlist> 99ea1d6981Smrg 100ea1d6981Smrg<para> 101ea1d6981SmrgIn addition, the extension should: 102ea1d6981Smrg</para> 103ea1d6981Smrg 104ea1d6981Smrg<itemizedlist> 105ea1d6981Smrg <listitem> 106ea1d6981Smrg <para> 107ea1d6981SmrgAllow multiple clients to use double-buffering on the same window.</para> 108ea1d6981Smrg </listitem> 109ea1d6981Smrg <listitem> 110ea1d6981Smrg <para> 111ea1d6981SmrgSupport a range of implementation methods that can capitalize on existing 112ea1d6981Smrghardware features. 113ea1d6981Smrg </para> 114ea1d6981Smrg </listitem> 115ea1d6981Smrg <listitem> 116ea1d6981Smrg <para>Add no new event types.</para> 117ea1d6981Smrg </listitem> 118ea1d6981Smrg <listitem> 119ea1d6981Smrg <para> 120ea1d6981SmrgBe reasonably easy to integrate with a variety of direct graphics hardware 121ea1d6981Smrgaccess (DGHA) architectures. 122ea1d6981Smrg </para> 123ea1d6981Smrg </listitem> 124ea1d6981Smrg</itemizedlist> 125ea1d6981Smrg 126ea1d6981Smrg</chapter> 127ea1d6981Smrg 128ea1d6981Smrg<chapter id='Concepts'> 129ea1d6981Smrg<title>Concepts</title> 130ea1d6981Smrg 131ea1d6981Smrg<para> 132ea1d6981SmrgNormal windows are created using the core <function>CreateWindow</function> 133ea1d6981Smrgrequest, which allocates a set of window attributes and, for InputOutput 134ea1d6981Smrgwindows, a front buffer, into which an image can be drawn. The contents of 135ea1d6981Smrgthis buffer will be displayed when the window is visible. 136ea1d6981Smrg</para> 137ea1d6981Smrg<para> 138ea1d6981SmrgThis extension enables applications to use double-buffering with a window. 139ea1d6981SmrgThis involves creating a second buffer, called a back buffer, and associating 140ea1d6981Smrgone or more back buffer names (XIDs) with the window for use when referring to 141ea1d6981Smrg(that is, drawing to or reading from) the window's back buffer. The back 142ea1d6981Smrgbuffer name is a DRAWABLE of type BACKBUFFER. 143ea1d6981Smrg</para> 144ea1d6981Smrg 145ea1d6981Smrg<para> 146ea1d6981SmrgDBE provides a relative double-buffering model. One XID, the window, always 147ea1d6981Smrgrefers to the front buffer. One or more other XIDs, the back buffer names, 148ea1d6981Smrgalways refer to the back buffer. After a buffer swap, the window continues to 149ea1d6981Smrgrefer to the (new) front buffer, and the back buffer name continues to refer 150ea1d6981Smrgto the (new) back buffer. Thus, applications and toolkits that want to just 151ea1d6981Smrgrender to the back buffer always use the back buffer name for all drawing 152ea1d6981Smrgrequests to the window. Portions of an application that want to render to 153ea1d6981Smrgthe front buffer always use the window XID for all drawing requests to the 154ea1d6981Smrgwindow. 155ea1d6981Smrg</para> 156ea1d6981Smrg 157ea1d6981Smrg<para> 158ea1d6981SmrgMultiple clients and toolkits can all use double-buffering on the same 159ea1d6981Smrgwindow. DBE does not provide a request for querying whether a window has 160ea1d6981Smrgdouble-buffering support, and if so, what the back buffer name is. Given 161ea1d6981Smrgthe asynchronous nature of the X Window System, this would cause race 162ea1d6981Smrgconditions. Instead, DBE allows multiple back buffer names to exist for 163ea1d6981Smrgthe same window; they all refer to the same physical back buffer. The first 164ea1d6981Smrgtime a back buffer name is allocated for a window, the window becomes 165ea1d6981Smrgdouble-buffered and the back buffer name is associated with the window. 166ea1d6981SmrgSubsequently, the window already is a double-buffered window, and nothing 167ea1d6981Smrgabout the window changes when a new back buffer name is allocated, except 168ea1d6981Smrgthat the new back buffer name is associated with the window. The window 169ea1d6981Smrgremains double-buffered until either the window is destroyed or until all of 170ea1d6981Smrgthe back buffer names for the window are deallocated. 171ea1d6981Smrg</para> 172ea1d6981Smrg 173ea1d6981Smrg<para> 174ea1d6981SmrgIn general, both the front and back buffers are treated the same. In 175ea1d6981Smrgparticular, here are some important characteristics: 176ea1d6981Smrg</para> 177ea1d6981Smrg 178ea1d6981Smrg<itemizedlist> 179ea1d6981Smrg <listitem> 180ea1d6981Smrg <para> 181ea1d6981SmrgOnly one buffer per window can be visible at a time (the front buffer). 182ea1d6981Smrg </para> 183ea1d6981Smrg </listitem> 184ea1d6981Smrg <listitem> 185ea1d6981Smrg <para> 186ea1d6981SmrgBoth buffers associated with a window have the same visual type, depth, 187ea1d6981Smrgwidth, height, and shape as the window. 188ea1d6981Smrg </para> 189ea1d6981Smrg </listitem> 190ea1d6981Smrg <listitem> 191ea1d6981Smrg <para> 192ea1d6981SmrgBoth buffers associated with a window are "visible" (or "obscured") in 193ea1d6981Smrgthe same way. When an Expose event is generated for a window, both 194ea1d6981Smrgbuffers should be considered to be damaged in the exposed area. Damage 195ea1d6981Smrgthat occurs to either buffer will result in an Expose event on the window. 196ea1d6981SmrgWhen a double-buffered window is exposed, both buffers are tiled with the 197ea1d6981Smrgwindow background, exactly as stated by the core protocol. Even though 198ea1d6981Smrgthe back buffer is not visible, terms such as obscure apply to the back 199ea1d6981Smrgbuffer as well as to the front buffer. 200ea1d6981Smrg </para> 201ea1d6981Smrg </listitem> 202ea1d6981Smrg <listitem> 203ea1d6981Smrg <para> 204ea1d6981SmrgIt is acceptable at any time to pass a BACKBUFFER in any 205ea1d6981Smrgrequest, notably any core or extension drawing request, that expects 206ea1d6981Smrga DRAWABLE. This enables an application to draw directly into 207ea1d6981SmrgBACKBUFFERs in the same fashion as it would draw into any other 208ea1d6981SmrgDRAWABLE. 209ea1d6981Smrg </para> 210ea1d6981Smrg </listitem> 211ea1d6981Smrg <listitem> 212ea1d6981Smrg <para> 213ea1d6981SmrgIt is an error (Window) to pass a BACKBUFFER in a core request that 214ea1d6981Smrgexpects a Window. 215ea1d6981Smrg </para> 216ea1d6981Smrg </listitem> 217ea1d6981Smrg <listitem> 218ea1d6981Smrg <para> 219ea1d6981SmrgA BACKBUFFER will never be sent by core X in a reply, event, or error 220ea1d6981Smrgwhere a Window is specified. 221ea1d6981Smrg </para> 222ea1d6981Smrg </listitem> 223ea1d6981Smrg <listitem> 224ea1d6981Smrg <para> 225ea1d6981SmrgIf core X11 backing-store and save-under applies to a double-buffered 226ea1d6981Smrgwindow, it applies to both buffers equally. 227ea1d6981Smrg </para> 228ea1d6981Smrg </listitem> 229ea1d6981Smrg <listitem> 230ea1d6981Smrg <para> 231ea1d6981SmrgIf the core <function>ClearArea</function> request is executed on a 232ea1d6981Smrgdouble-buffered window, the same area in both the front and back buffers 233ea1d6981Smrgis cleared. 234ea1d6981Smrg </para> 235ea1d6981Smrg </listitem> 236ea1d6981Smrg</itemizedlist> 237ea1d6981Smrg<para> 238ea1d6981SmrgThe effect of passing a window to a request that accepts a DRAWABLE is 239d63b911fSmrgunchanged by this extension. The window and front buffer are synonymous with 240ea1d6981Smrgeach other. This includes obeying the <function>GetImage</function> semantics 241ea1d6981Smrgand the subwindow-mode semantics if a core graphics context is involved. 242ea1d6981SmrgRegardless of whether the window was explicitly passed in a 243ea1d6981Smrg<function>GetImage</function> request, or implicitly referenced (that is, 244ea1d6981Smrgone of the windo's ancestors was passed in the request), the front (that is, 245ea1d6981Smrgvisible) buffer is always referenced. Thus, DBE-naive screen dump clients will 246ea1d6981Smrgalways get the front buffer. <function>GetImage</function> on a back buffer 247ea1d6981Smrgreturns undefined image contents for any obscured regions of the back buffer 248ea1d6981Smrgthat fall within the image. 249ea1d6981Smrg</para> 250ea1d6981Smrg 251ea1d6981Smrg<para> 252ea1d6981SmrgDrawing to a back buffer always uses the clip region that would be used to 253ea1d6981Smrgdraw to the front buffer with a GC subwindow-mode of 254ea1d6981Smrg<function>ClipByChildren</function>. If an 255ea1d6981Smrgancestor of a double-buffered window is drawn to with a core GC having a 256ea1d6981Smrgsubwindow-mode of <function>IncludeInferiors</function>, the effect on the 257ea1d6981Smrgdouble-buffered window's back buffer depends on the depth of the 258ea1d6981Smrgdouble-buffered window and the ancestor. If the depths are the same, the 259ea1d6981Smrgcontents of the back buffer of the double-buffered window are not changed. 260ea1d6981SmrgIf the depths are different, the contents of the back buffer of the 261ea1d6981Smrgdouble-buffered window are undefined for the pixels that the 262ea1d6981Smrg<function>IncludeInferiors</function> drawing touched. 263ea1d6981Smrg</para> 264ea1d6981Smrg 265ea1d6981Smrg<para> 266ea1d6981SmrgDBE adds no new events. DBE does not extend the semantics of any existing 267ea1d6981Smrgevents with the exception of adding a new DRAWABLE type called BACKBUFFER. If 268ea1d6981Smrgevents, replies, or errors that contain a DRAWABLE (for example, 269ea1d6981Smrg<function>GraphicsExpose</function>) are generated in response to a request, 270ea1d6981Smrgthe DRAWABLE returned will be the one specified in the request. 271ea1d6981Smrg</para> 272ea1d6981Smrg 273ea1d6981Smrg<para> 274ea1d6981SmrgDBE advertises which visuals support double-buffering. 275ea1d6981Smrg</para> 276ea1d6981Smrg 277ea1d6981Smrg<para> 278ea1d6981SmrgDBE does not include any timing or synchronization facilities. 279ea1d6981SmrgApplications that need such facilities (for example, to maintain a constant 280ea1d6981Smrgframe rate) should investigate the Synchronization Extension, an X 281ea1d6981SmrgConsortium standard. 282ea1d6981Smrg</para> 283ea1d6981Smrg 284ea1d6981Smrg<sect1 id='Window_Management_Operations'> 285ea1d6981Smrg<title>Window Management Operations</title> 286ea1d6981Smrg 287ea1d6981Smrg<para> 288ea1d6981SmrgThe basic philosophy of DBE is that both buffers are treated the same by core 289ea1d6981SmrgX window management operations. 290ea1d6981Smrg</para> 291ea1d6981Smrg 292ea1d6981Smrg<para> 293ea1d6981SmrgWhen the core <function>DestroyWindow</function> is executed on a 294ea1d6981Smrgdouble-buffered window, both buffers associated with the window are 295ea1d6981Smrgdestroyed, and all back buffer names associated with the window are freed. 296ea1d6981Smrg</para> 297ea1d6981Smrg 298ea1d6981Smrg<para> 299ea1d6981SmrgIf the core <function>ConfigureWindow</function> request changes the size of 300ea1d6981Smrga window, both buffers assume the new size. If the windo's size increases, 301ea1d6981Smrgthe effect on the buffers depends on whether the implementation honors bit 302ea1d6981Smrggravity for buffers. If bit gravity is implemented, then the contents of 303ea1d6981Smrgboth buffers are moved in accordance with the windo's bit gravity (see the 304ea1d6981Smrgcore <function>ConfigureWindow</function> request), and the remaining areas 305ea1d6981Smrgare tiled with the window background. If bit gravity is not implemented, then 306ea1d6981Smrgthe entire unobscured region of both buffers is tiled with the window 307ea1d6981Smrgbackground. In either case, <function>Expose</function> events are generated 308ea1d6981Smrgfor the region that is tiled with the window background. 309ea1d6981Smrg</para> 310ea1d6981Smrg 311ea1d6981Smrg<para> 312ea1d6981SmrgIf the core <function>GetGeometry</function> request is executed on a 313ea1d6981SmrgBACKBUFFER, the returned x, y, and border-width will be zero. 314ea1d6981Smrg</para> 315ea1d6981Smrg 316ea1d6981Smrg<para> 317ea1d6981SmrgIf the Shape extension <function>ShapeRectangles</function>, 318ea1d6981Smrg<function>ShapeMask</function>, 319ea1d6981Smrg<function>ShapeCombine</function>, or 320ea1d6981Smrg<function>ShapeOffset</function> 321ea1d6981Smrgrequest is executed on a double-buffered window, both buffers are reshaped 322ea1d6981Smrgto match the new window shape. The region difference is the following: 323ea1d6981Smrg</para> 324ea1d6981Smrg 325ea1d6981Smrg<literallayout> 326ea1d6981Smrg D = newshape - oldshape 327ea1d6981Smrg</literallayout> 328ea1d6981Smrg 329ea1d6981Smrg<para> 330ea1d6981SmrgIt is tiled with the window background in both buffers, and 331ea1d6981Smrg<function>Expose</function> events are generated for D. 332ea1d6981Smrg</para> 333ea1d6981Smrg 334ea1d6981Smrg</sect1> 335ea1d6981Smrg 336ea1d6981Smrg<sect1 id='Complex_Swap_Actions'> 337ea1d6981Smrg<title>Complex Swap Actions</title> 338ea1d6981Smrg<para> 339ea1d6981SmrgDBE has no explicit knowledge of ancillary buffers (for example, depth 340ea1d6981Smrgbuffers or alpha buffers), and only has a limited set of defined swap 341ea1d6981Smrgactions. Some applications may need a richer set of swap actions than DBE 342ea1d6981Smrgprovides. Some DBE implementations have knowledge of ancillary buffers, 343ea1d6981Smrgand/or can provide a rich set of swap actions. Instead of continually 344ea1d6981Smrgextending DBE to increase its set of swap actions, DBE provides a flexible 345ea1d6981Smrg"idiom" mechanism. If an application's needs are served by the defined swap 346ea1d6981Smrgactions, it should use them; otherwise, it should use the following method 347ea1d6981Smrgof expressing a complex swap action as an idiom. Following this policy will 348ea1d6981Smrgensure the best possible performance across a wide variety of implementations. 349ea1d6981Smrg</para> 350ea1d6981Smrg 351ea1d6981Smrg<para> 352ea1d6981SmrgAs suggested by the term "idiom," a complex swap action should be expressed 353ea1d6981Smrgas a group/series of requests. Taken together, this group of requests may be 354ea1d6981Smrgcombined into an atomic operation by the implementation, in order to maximize 355ea1d6981Smrgperformance. The set of idioms actually recognized for optimization is 356ea1d6981Smrgimplementation dependent. To help with idiom expression and interpretation, 357ea1d6981Smrgan idiom must be surrounded by two protocol requests: 358ea1d6981Smrg<function>DBEBeginIdiom</function> and 359ea1d6981Smrg<function>DBEEndIdiom</function>. Unless this begin-end pair 360ea1d6981Smrgsurrounds the idiom, it may not be recognized by a given implementation, and 361ea1d6981Smrgperformance will suffer. 362ea1d6981Smrg</para> 363ea1d6981Smrg 364ea1d6981Smrg<para> 365ea1d6981SmrgFor example, if an application wants to swap buffers for two windows, and 366ea1d6981Smrguse core X to clear only certain planes of the back buffers, the application 367ea1d6981Smrgwould issue the following protocol requests as a group, and in the following 368ea1d6981Smrgorder: 369ea1d6981Smrg</para> 370ea1d6981Smrg 371ea1d6981Smrg<itemizedlist> 372ea1d6981Smrg <listitem> 373ea1d6981Smrg <para>DBEBeginIdiom request.</para> 374ea1d6981Smrg </listitem> 375ea1d6981Smrg <listitem> 376ea1d6981Smrg <para> 377ea1d6981Smrg<function>DBESwapBuffers</function> request with XIDs for two windows, each of which uses 378ea1d6981Smrga swap action of Untouched. 379ea1d6981Smrg </para> 380ea1d6981Smrg </listitem> 381ea1d6981Smrg <listitem> 382ea1d6981Smrg <para> 383ea1d6981SmrgCore X PolyFillRectangle request to the back buffer of one window. 384ea1d6981Smrg </para> 385ea1d6981Smrg </listitem> 386ea1d6981Smrg <listitem> 387ea1d6981Smrg <para> 388ea1d6981SmrgCore X PolyFillRectangle request to the back buffer of the other window. 389ea1d6981Smrg </para> 390ea1d6981Smrg </listitem> 391ea1d6981Smrg <listitem> 392ea1d6981Smrg <para>DBEEndIdiom request.</para> 393ea1d6981Smrg </listitem> 394ea1d6981Smrg</itemizedlist> 395ea1d6981Smrg 396ea1d6981Smrg<para> 397ea1d6981SmrgThe <function>DBEBeginIdiom</function> and <function>DBEEndIdiom</function> 398ea1d6981Smrgrequests do not perform any actions themselves. They are treated as markers 399ea1d6981Smrgby implementations that can combine certain groups/series of requests as 400ea1d6981Smrgidioms, and are ignored by other implementations or for nonrecognized 401ea1d6981Smrggroups/series of requests. If these requests are sent out of order, or are 402ea1d6981Smrgmismatched, no errors are sent, and the requests are executed as usual, 403ea1d6981Smrgthough performance may suffer. 404ea1d6981Smrg</para> 405ea1d6981Smrg 406ea1d6981Smrg<para> 407ea1d6981SmrgAn idiom need not include a <function>DBESwapBuffers</function> request. For 408ea1d6981Smrgexample, if a swap action of Copied is desired, but only some of the planes 409ea1d6981Smrgshould be copied, a core X 410ea1d6981Smrg<function>CopyArea</function> request may be used instead of 411ea1d6981Smrg<function>DBESwapBuffers</function>. 412ea1d6981SmrgIf <function>DBESwapBuffers</function> is included in an idiom, it should 413ea1d6981Smrgimmediately follow the <function>DBEBeginIdiom</function> request. Also, when 414ea1d6981Smrgthe <function>DBESwapBuffers</function> is included in an idiom, that 415ea1d6981Smrgrequest's swap action will still be valid, and if the swap action might 416ea1d6981Smrgoverlap with another request, then the final result of the idiom must be as if 417ea1d6981Smrgthe separate requests were executed serially. For example, if the specified 418ea1d6981Smrgswap action is Untouched, and if a <function>PolyFillRectangle</function> 419ea1d6981Smrgusing a client clip rectangle is done to the windo's back buffer after the 420ea1d6981Smrg<function>DBESwapBuffers</function> request, then the contents of the new 421ea1d6981Smrgback buffer (after the idiom) will be the same as if the idiom was not 422ea1d6981Smrgrecognized by the implementation. 423ea1d6981Smrg</para> 424ea1d6981Smrg 425ea1d6981Smrg<para> 426ea1d6981SmrgIt is highly recommended that Application Programming Interface (API) 427ea1d6981Smrgproviders define, and application developers use, "convenience" functions 428ea1d6981Smrgthat allow client applications to call one procedure that encapsulates 429ea1d6981Smrgcommon idioms. These functions will generate the 430ea1d6981Smrg<function>DBEBeginIdiom</function> request, the idiom requests, and 431ea1d6981Smrg<function>DBEEndIdiom</function> request. Usage of these functions will 432ea1d6981Smrgensure best possible performance across a wide variety of implementations. 433ea1d6981Smrg</para> 434ea1d6981Smrg 435ea1d6981Smrg</sect1> 436ea1d6981Smrg</chapter> 437ea1d6981Smrg 438ea1d6981Smrg<chapter id='Requests'> 439ea1d6981Smrg<title>Requests</title> 440ea1d6981Smrg<para>The DBE defines the following requests.</para> 441ea1d6981Smrg 442ea1d6981Smrg<sect1 id='DBEGetVersion'> 443ea1d6981Smrg<title>DBEGetVersion</title> 444ea1d6981Smrg<para> 445ea1d6981SmrgThis request returns the major and minor version numbers of this extension. 446ea1d6981Smrg</para> 447ea1d6981Smrg 448ea1d6981Smrg<para>DBEGetVersion</para> 449ea1d6981Smrg<informaltable frame='none'> 450ea1d6981Smrg <?dbfo keep-together="always" ?> 451ea1d6981Smrg <tgroup cols="2" align='left' colsep='0' rowsep='0'> 452ea1d6981Smrg <colspec colname="c1" colwidth='1.0*'/> 453ea1d6981Smrg <colspec colname="c2" colwidth='2.0*'/> 454ea1d6981Smrg <tbody> 455ea1d6981Smrg <row> 456ea1d6981Smrg <entry>client-major-version</entry> 457ea1d6981Smrg <entry>CARD8</entry> 458ea1d6981Smrg </row> 459ea1d6981Smrg <row> 460ea1d6981Smrg <entry>client-minor-version </entry> 461ea1d6981Smrg <entry>CARD8</entry> 462ea1d6981Smrg </row> 463ea1d6981Smrg <row> 464ea1d6981Smrg <entry>=></entry> 465ea1d6981Smrg <entry></entry> 466ea1d6981Smrg </row> 467ea1d6981Smrg <row> 468ea1d6981Smrg <entry>server-major-version </entry> 469ea1d6981Smrg <entry>CARD8</entry> 470ea1d6981Smrg </row> 471ea1d6981Smrg <row> 472ea1d6981Smrg <entry>server-minor-version </entry> 473ea1d6981Smrg <entry>CARD8</entry> 474ea1d6981Smrg </row> 475ea1d6981Smrg </tbody> 476ea1d6981Smrg </tgroup> 477ea1d6981Smrg</informaltable> 478ea1d6981Smrg 479ea1d6981Smrg<para> 480ea1d6981SmrgThe client-major-version and client-minor-version numbers indicate what 481ea1d6981Smrgversion of the protocol the client wants the server to implement. The 482ea1d6981Smrgserver-major-version and the server-minor-version numbers returned indicate 483ea1d6981Smrgthe protocol this extension actually supports. This might not equal the 484ea1d6981Smrgversion sent by the client. An implementation can (but need not) support 485ea1d6981Smrgmore than one version simultaneously. The server-major-version and 486ea1d6981Smrgserver-minor-version allow the creation of future revisions of the DBE 487ea1d6981Smrgprotocol that may be necessary. In general, the major version 488ea1d6981Smrgwould increment for incompatible changes, and the minor version would increment 489ea1d6981Smrgfor small, upward-compatible changes. Servers that support the protocol 490ea1d6981Smrgdefined in this document will return a server-major-version of one (1), and a 491ea1d6981Smrgserver-minor-version of zero (0). 492ea1d6981Smrg</para> 493ea1d6981Smrg 494ea1d6981Smrg<para> 495ea1d6981SmrgThe DBE client must issue a DBEGetVersion request before any other double 496ea1d6981Smrgbuffering request in order to negotiate a compatible protocol version; 497ea1d6981Smrgotherwise, the client will get undefined behavior (DBE may or may not work). 498ea1d6981Smrg</para> 499ea1d6981Smrg 500ea1d6981Smrg</sect1> 501ea1d6981Smrg 502ea1d6981Smrg<sect1 id='DBEGetVisualInfo'> 503ea1d6981Smrg<title>DBEGetVisualInfo</title> 504ea1d6981Smrg<para> 505ea1d6981SmrgThis request returns information about which visuals support double buffering. 506ea1d6981Smrg</para> 507ea1d6981Smrg 508ea1d6981Smrg<para>DBEGetVisualInfo</para> 509ea1d6981Smrg 510ea1d6981Smrg<informaltable frame='none'> 511ea1d6981Smrg <?dbfo keep-together="always" ?> 512ea1d6981Smrg <tgroup cols="2" align='left' colsep='0' rowsep='0'> 513ea1d6981Smrg <colspec colname="c1" colwidth='1.0*'/> 514ea1d6981Smrg <colspec colname="c2" colwidth='2.0*'/> 515ea1d6981Smrg <tbody> 516ea1d6981Smrg <row> 517ea1d6981Smrg <entry>screen-specifiers</entry> 518ea1d6981Smrg <entry>LISTofDRAWABLE</entry> 519ea1d6981Smrg </row> 520ea1d6981Smrg <row> 521ea1d6981Smrg <entry>=></entry> 522ea1d6981Smrg <entry></entry> 523ea1d6981Smrg </row> 524ea1d6981Smrg <row> 525ea1d6981Smrg <entry>visinfo</entry> 526ea1d6981Smrg <entry>LISTofSCREENVISINFO</entry> 527ea1d6981Smrg </row> 528ea1d6981Smrg </tbody> 529ea1d6981Smrg </tgroup> 530ea1d6981Smrg</informaltable> 531ea1d6981Smrg<para>where:</para> 532ea1d6981Smrg 533ea1d6981Smrg<informaltable frame='none'> 534ea1d6981Smrg <?dbfo keep-together="always" ?> 535ea1d6981Smrg <tgroup cols="2" align='left' colsep='0' rowsep='0'> 536ea1d6981Smrg <colspec colname="c1" colwidth='1.0*'/> 537ea1d6981Smrg <colspec colname="c2" colwidth='2.0*'/> 538ea1d6981Smrg <tbody> 539ea1d6981Smrg <row> 540ea1d6981Smrg <entry>SCREENVISINFO</entry> 541ea1d6981Smrg <entry>LISTofVISINFO</entry> 542ea1d6981Smrg </row> 543ea1d6981Smrg <row> 544ea1d6981Smrg <entry>VISINFO</entry> 545ea1d6981Smrg <entry>[ visual: VISUALID</entry> 546ea1d6981Smrg </row> 547ea1d6981Smrg <row> 548ea1d6981Smrg <entry></entry> 549ea1d6981Smrg <entry>depth: CARD8</entry> 550ea1d6981Smrg </row> 551ea1d6981Smrg <row> 552ea1d6981Smrg <entry></entry> 553ea1d6981Smrg <entry>perflevel: CARD8 ]</entry> 554ea1d6981Smrg </row> 555ea1d6981Smrg </tbody> 556ea1d6981Smrg </tgroup> 557ea1d6981Smrg</informaltable> 558ea1d6981Smrg 559ea1d6981Smrg<para>Errors: Drawable</para> 560ea1d6981Smrg 561ea1d6981Smrg<para> 562ea1d6981SmrgAll of the values passed in screen-specifiers must be valid DRAWABLEs (or a 563ea1d6981Smrg<function>Drawable</function> error results). For each drawable in 564ea1d6981Smrgscreen-specifiers, the reply will contain a list of VISINFO structures for 565ea1d6981Smrgvisuals that support double-buffering on the screen on which the drawable 566ea1d6981Smrgresides. The visual member specifies the VISUALID. The depth member specifies 567ea1d6981Smrgthe depth in bits for the visual. The perflevel is a performance hint. The 568ea1d6981Smrgonly operation defined on a perflevel is comparison to a perflevel of another 569ea1d6981Smrgvisual on the same screen. The visual having the higher perflevel is likely 570ea1d6981Smrgto have better double-buffer graphics performance than the visual having the 571ea1d6981Smrglower perflevel. Nothing can be deduced from any of the following: the 572ea1d6981Smrgmagnitude of the difference of two perflevels, a perflevel value in isolation, 573ea1d6981Smrgor comparing perflevels from different servers. 574ea1d6981Smrg</para> 575ea1d6981Smrg 576ea1d6981Smrg<para> 577ea1d6981SmrgIf the list of screen-specifiers is empty, information for all screens is 578ea1d6981Smrgreturned, starting with screen zero. 579ea1d6981Smrg</para> 580ea1d6981Smrg 581ea1d6981Smrg</sect1> 582ea1d6981Smrg 583ea1d6981Smrg<sect1 id='DBEAllocateBackBufferName'> 584ea1d6981Smrg<title>DBEAllocateBackBufferName</title> 585ea1d6981Smrg 586ea1d6981Smrg<para> 587ea1d6981SmrgThis request allocates a drawable ID used to refer to the back buffer of a 588ea1d6981Smrgwindow. 589ea1d6981Smrg</para> 590ea1d6981Smrg 591ea1d6981Smrg<para>DBEAllocateBackBufferName</para> 592ea1d6981Smrg 593ea1d6981Smrg<informaltable frame='none'> 594ea1d6981Smrg <?dbfo keep-together="always" ?> 595ea1d6981Smrg <tgroup cols="2" align='left' colsep='0' rowsep='0'> 596ea1d6981Smrg <colspec colname="c1" colwidth='1.0*'/> 597ea1d6981Smrg <colspec colname="c2" colwidth='2.0*'/> 598ea1d6981Smrg <tbody> 599ea1d6981Smrg <row> 600ea1d6981Smrg <entry>window</entry> 601ea1d6981Smrg <entry>WINDOW</entry> 602ea1d6981Smrg </row> 603ea1d6981Smrg <row> 604ea1d6981Smrg <entry>back-buffer-name</entry> 605ea1d6981Smrg <entry>BACKBUFFER</entry> 606ea1d6981Smrg </row> 607ea1d6981Smrg <row> 608ea1d6981Smrg <entry>swap-action-hint</entry> 609ea1d6981Smrg <entry>SWAPACTION </entry> 610ea1d6981Smrg </row> 611ea1d6981Smrg </tbody> 612ea1d6981Smrg </tgroup> 613ea1d6981Smrg</informaltable> 614ea1d6981Smrg 615ea1d6981Smrg<para> 616ea1d6981SmrgErrors: Alloc, Value, IDChoice, Match, Window 617ea1d6981Smrg</para> 618ea1d6981Smrg 619ea1d6981Smrg<para> 620ea1d6981SmrgIf the window is not already a double-buffered window, the window becomes 621ea1d6981Smrgdouble-buffered, and the back-buffer-name is associated with the window. The 622ea1d6981Smrgswap-action-hint tells the server which swap action is most likely to be 623ea1d6981Smrgused with the window in subsequent <function>DBESwapBuffers</function> 624ea1d6981Smrgrequests. The swap-action-hint must have one of the values specified for type 625ea1d6981SmrgSWAPACTION (or a Value error results). See the description of the 626ea1d6981Smrg<function>DBESwapBuffers</function> request for a complete discussion of 627ea1d6981Smrgswap actions and the SWAPACTION type. 628ea1d6981Smrg</para> 629ea1d6981Smrg 630ea1d6981Smrg<para> 631ea1d6981SmrgIf the window already is a double-buffered window, nothing about the window 632ea1d6981Smrgchanges, except that an additional back-buffer-name is associated with the 633ea1d6981Smrgwindow. The window remains double-buffered until either the window is 634ea1d6981Smrgdestroyed, or until all of the back buffer names for the window are 635ea1d6981Smrgdeallocated. 636ea1d6981Smrg</para> 637ea1d6981Smrg 638ea1d6981Smrg<para> 639ea1d6981SmrgThe window passed into the request must be a valid WINDOW (or a Window error 640ea1d6981Smrgresults). The window passed into the request must be an InputOutput window (or 641ea1d6981Smrga Match error results). The visual of the window must be in the list returned 642ea1d6981Smrgby <function>DBEGetVisualInfo</function> (or a Match error results). The 643ea1d6981Smrgback-buffer-name must be in the range assigned to the client, and must not 644ea1d6981Smrgalready be in use (or an IDChoice error results). If the server cannot 645ea1d6981Smrgallocate all resources associated with turning on double-buffering for the 646ea1d6981Smrgwindow, an Alloc error results, the windo's double-buffer status (whether it 647ea1d6981Smrgis already double-buffered or not) remains unchanged, and the 648ea1d6981Smrgback-buffer-name is freed. 649ea1d6981Smrg</para> 650ea1d6981Smrg</sect1> 651ea1d6981Smrg 652ea1d6981Smrg<sect1 id='DBEDeallocateBackBufferName'> 653ea1d6981Smrg<title>DBEDeallocateBackBufferName</title> 654ea1d6981Smrg<para> 655ea1d6981SmrgThis request frees a drawable ID that was obtained by 656ea1d6981Smrg<function>DBEAllocateBackBufferName</function>. 657ea1d6981Smrg</para> 658ea1d6981Smrg 659ea1d6981Smrg<para>DBEDeallocateBackBufferName</para> 660ea1d6981Smrg 661ea1d6981Smrg<informaltable frame='none'> 662ea1d6981Smrg <?dbfo keep-together="always" ?> 663ea1d6981Smrg <tgroup cols="2" align='left' colsep='0' rowsep='0'> 664ea1d6981Smrg <colspec colname="c1" colwidth='1.0*'/> 665ea1d6981Smrg <colspec colname="c2" colwidth='2.0*'/> 666ea1d6981Smrg <tbody> 667ea1d6981Smrg <row> 668ea1d6981Smrg <entry>back-buffer-name</entry> 669ea1d6981Smrg <entry>BACKBUFFER</entry> 670ea1d6981Smrg </row> 671ea1d6981Smrg </tbody> 672ea1d6981Smrg </tgroup> 673ea1d6981Smrg</informaltable> 674ea1d6981Smrg 675ea1d6981Smrg<para>Errors: Buffer</para> 676ea1d6981Smrg 677ea1d6981Smrg<para> 678ea1d6981SmrgThe back-buffer-name passed in the request is freed and no longer associated 679ea1d6981Smrgwith the window. If this is the last back-buffer-name associated with the 680ea1d6981Smrgwindow, then the back buffer is no longer accessible to clients, and all 681ea1d6981Smrgdouble-buffering resources associated with the window may be freed. The 682ea1d6981Smrgwindow's current front buffer remains the front buffer. 683ea1d6981Smrg</para> 684ea1d6981Smrg 685ea1d6981Smrg<para> 686ea1d6981SmrgThe back-buffer-name must be a valid BACKBUFFER associated with a window (or 687ea1d6981Smrga Buffer error results). 688ea1d6981Smrg</para> 689ea1d6981Smrg</sect1> 690ea1d6981Smrg 691ea1d6981Smrg<sect1 id='DBESwapBuffers'> 692ea1d6981Smrg<title>DBESwapBuffers</title> 693ea1d6981Smrg<para> 694ea1d6981SmrgThis request swaps the buffers for all windows listed, applying the 695ea1d6981Smrgappropriate swap action for each window. 696ea1d6981Smrg</para> 697ea1d6981Smrg 698ea1d6981Smrg<para><function>DBESwapBuffers</function></para> 699ea1d6981Smrg 700ea1d6981Smrg<informaltable frame='none'> 701ea1d6981Smrg <?dbfo keep-together="always" ?> 702ea1d6981Smrg <tgroup cols="2" align='left' colsep='0' rowsep='0'> 703ea1d6981Smrg <colspec colname="c1" colwidth='1.0*'/> 704ea1d6981Smrg <colspec colname="c2" colwidth='3.0*'/> 705ea1d6981Smrg <tbody> 706ea1d6981Smrg <row> 707ea1d6981Smrg <entry>windows</entry> 708ea1d6981Smrg <entry>LISTofSWAPINFO</entry> 709ea1d6981Smrg </row> 710ea1d6981Smrg </tbody> 711ea1d6981Smrg </tgroup> 712ea1d6981Smrg</informaltable> 713ea1d6981Smrg<para>where:</para> 714ea1d6981Smrg<informaltable frame='none'> 715ea1d6981Smrg <?dbfo keep-together="always" ?> 716ea1d6981Smrg <tgroup cols="2" align='left' colsep='0' rowsep='0'> 717ea1d6981Smrg <colspec colname="c1" colwidth='1.0*'/> 718ea1d6981Smrg <colspec colname="c2" colwidth='2.0*'/> 719ea1d6981Smrg <tbody> 720ea1d6981Smrg <row> 721ea1d6981Smrg <entry>SWAPINFO</entry> 722ea1d6981Smrg <entry>[ window: WINDOW</entry> 723ea1d6981Smrg </row> 724ea1d6981Smrg <row> 725ea1d6981Smrg <entry></entry> 726ea1d6981Smrg <entry>swap-action: SWAPACTION ]</entry> 727ea1d6981Smrg </row> 728ea1d6981Smrg <row> 729ea1d6981Smrg <entry>SWAPACTION</entry> 730ea1d6981Smrg <entry>{ Undefined, Background, Untouched, Copied }</entry> 731ea1d6981Smrg </row> 732ea1d6981Smrg </tbody> 733ea1d6981Smrg </tgroup> 734ea1d6981Smrg</informaltable> 735ea1d6981Smrg 736ea1d6981Smrg<para>Errors: Match, Window, Value</para> 737ea1d6981Smrg 738ea1d6981Smrg<para> 739ea1d6981SmrgEach window passed into the request must be a valid WINDOW (or a 740ea1d6981Smrg<function>Window</function> error results). Each window passed into the 741ea1d6981Smrgrequest must be a double-buffered window (or a <function>Match</function> 742ea1d6981Smrgerror results). Each window passed into the request must only be listed 743ea1d6981Smrgonce (or a <function>Match</function> error results). Each swap-action in 744ea1d6981Smrgthe list must have one of the values specified for type SWAPACTION (or a 745ea1d6981Smrg<function>Value</function> error results). If an error results, none of 746ea1d6981Smrgthe valid double-buffered windows will have their buffers swapped. 747ea1d6981Smrg</para> 748ea1d6981Smrg 749ea1d6981Smrg<para> 750ea1d6981SmrgThe swap-action determines what will happen to the new back buffer of the 751ea1d6981Smrgwindow it is paired with in the list in addition to making the old back 752ea1d6981Smrgbuffer become visible. The defined actions are as follows: 753ea1d6981Smrg</para> 754ea1d6981Smrg 755ea1d6981Smrg<variablelist> 756ea1d6981Smrg <varlistentry> 757ea1d6981Smrg <term>Undefined</term> 758ea1d6981Smrg <listitem><para> 759ea1d6981SmrgThe contents of the new back buffer become undefined. This may be the 760ea1d6981Smrgmost efficient action since it allows the implementation to discard the 761ea1d6981Smrgcontents of the buffer if it needs to. 762ea1d6981Smrg </para></listitem> 763ea1d6981Smrg </varlistentry> 764ea1d6981Smrg <varlistentry> 765ea1d6981Smrg <term>Background</term> 766ea1d6981Smrg <listitem><para> 767ea1d6981SmrgThe unobscured region of the new back buffer will be tiled with the window 768ea1d6981Smrgbackground. The background action allows devices to use a fast clear 769ea1d6981Smrgcapability during a swap. 770ea1d6981Smrg </para></listitem> 771ea1d6981Smrg </varlistentry> 772ea1d6981Smrg <varlistentry> 773ea1d6981Smrg <term>Untouched</term> 774ea1d6981Smrg <listitem><para> 775ea1d6981SmrgThe unobscured region of the new back buffer will be unmodified by the swap. 776ea1d6981Smrg </para></listitem> 777ea1d6981Smrg </varlistentry> 778ea1d6981Smrg <varlistentry> 779ea1d6981Smrg <term>Copied</term> 780ea1d6981Smrg <listitem><para> 781ea1d6981SmrgThe unobscured region of the new back buffer will be the contents of the 782ea1d6981Smrgold back buffer. 783ea1d6981Smrg </para></listitem> 784ea1d6981Smrg </varlistentry> 785ea1d6981Smrg</variablelist> 786ea1d6981Smrg 787ea1d6981Smrg<para> 788ea1d6981SmrgIf <function>DBESwapBuffers</function> is included in a "swap and clear" 789ea1d6981Smrgtype of idiom, it must immediately follow the 790ea1d6981Smrg<function>DBEBeginIdiom</function> request. 791ea1d6981Smrg</para> 792ea1d6981Smrg</sect1> 793ea1d6981Smrg 794ea1d6981Smrg<sect1 id='DBEBeginIdiom'> 795ea1d6981Smrg<title>DBEBeginIdiom</title> 796ea1d6981Smrg<para> 797ea1d6981SmrgThis request informs the server that a complex swap will immediately follow 798ea1d6981Smrgthis request. 799ea1d6981Smrg</para> 800ea1d6981Smrg 801ea1d6981Smrg<para><function>DBEBeginIdiom</function></para> 802ea1d6981Smrg 803ea1d6981Smrg<para> 804ea1d6981SmrgAs previously discussed, a complex swap action is a group/series of 805ea1d6981Smrgrequests that, taken together, may be combined into an atomic operation by 806ea1d6981Smrgthe implementation. The sole function of this request is to serve as a 807ea1d6981Smrg"marker" that the server can use to aid in idiom processing. The server is 808ea1d6981Smrgfree to implement this request as a no-op. 809ea1d6981Smrg</para> 810ea1d6981Smrg</sect1> 811ea1d6981Smrg 812ea1d6981Smrg<sect1 id='DBEEndIdiom'> 813ea1d6981Smrg<title>DBEEndIdiom</title> 814ea1d6981Smrg 815ea1d6981Smrg 816ea1d6981Smrg<para> 817ea1d6981SmrgThis request informs the server that a complex swap has concluded. 818ea1d6981Smrg</para> 819ea1d6981Smrg 820ea1d6981Smrg<para><function>DBEEndIdiom</function></para> 821ea1d6981Smrg 822ea1d6981Smrg<para> 823ea1d6981SmrgThe sole function of this request is to serve as a "marker" that the server 824ea1d6981Smrgcan use to aid in idiom processing. The server is free to implement this 825ea1d6981Smrgrequest as a no-op. 826ea1d6981Smrg</para> 827ea1d6981Smrg 828ea1d6981Smrg</sect1> 829ea1d6981Smrg 830ea1d6981Smrg<sect1 id='DBEGetBackBufferAttributes'> 831ea1d6981Smrg<title>DBEGetBackBufferAttributes</title> 832ea1d6981Smrg 833ea1d6981Smrg<para>This request returns information about a back buffer.</para> 834ea1d6981Smrg 835ea1d6981Smrg<para><function>DBEGetBackBufferAttributes</function></para> 836ea1d6981Smrg 837ea1d6981Smrg<informaltable frame='none'> 838ea1d6981Smrg <?dbfo keep-together="always" ?> 839ea1d6981Smrg <tgroup cols="2" align='left' colsep='0' rowsep='0'> 840ea1d6981Smrg <colspec colname="c1" colwidth='1.0*'/> 841ea1d6981Smrg <colspec colname="c2" colwidth='2.0*'/> 842ea1d6981Smrg <tbody> 843ea1d6981Smrg <row> 844ea1d6981Smrg <entry>back-buffer-name</entry> 845ea1d6981Smrg <entry>BACKBUFFER</entry> 846ea1d6981Smrg </row> 847ea1d6981Smrg <row> 848ea1d6981Smrg <entry>=></entry> 849ea1d6981Smrg <entry></entry> 850ea1d6981Smrg </row> 851ea1d6981Smrg <row> 852ea1d6981Smrg <entry>attributes</entry> 853ea1d6981Smrg <entry>BUFFER_ATTRIBUTES</entry> 854ea1d6981Smrg </row> 855ea1d6981Smrg </tbody> 856ea1d6981Smrg </tgroup> 857ea1d6981Smrg</informaltable> 858ea1d6981Smrg 859ea1d6981Smrg<para>where:</para> 860ea1d6981Smrg 861ea1d6981Smrg<para>BUFFER_ATTRIBUTES: [ window: WINDOW ]</para> 862ea1d6981Smrg 863ea1d6981Smrg<para> 864ea1d6981SmrgIf back-buffer-name is a valid BACKBUFFER, the window field of the 865ea1d6981Smrgattributes in the reply will be the window which has the back buffer that 866ea1d6981Smrgback-buffer-name refers to. If back-buffer-name is not a valid BACKBUFFER, 867ea1d6981Smrgthe window field of the attributes in the reply will be None. 868ea1d6981Smrg</para> 869ea1d6981Smrg 870ea1d6981Smrg</sect1> 871ea1d6981Smrg</chapter> 872ea1d6981Smrg 873ea1d6981Smrg<chapter id='Encoding'> 874ea1d6981Smrg<title>Encoding</title> 875ea1d6981Smrg<para> 876ea1d6981SmrgPlease refer to the X11 Protocol Encoding document as this section uses 877ea1d6981Smrgsyntactic conventions and data types established there. 878ea1d6981Smrg</para> 879ea1d6981Smrg 880ea1d6981Smrg<para>The name of this extension is "DOUBLE-BUFFER".</para> 881ea1d6981Smrg 882ea1d6981Smrg<sect1 id='Type'> 883ea1d6981Smrg<title>Type</title> 884ea1d6981Smrg<para>The following new types are used by the extension. 885ea1d6981Smrg</para> 886ea1d6981Smrg 887ea1d6981Smrg<para>BACKBUFFER: XID</para> 888ea1d6981Smrg<para>SWAPACTION</para> 889ea1d6981Smrg<literallayout class="monospaced"> 890ea1d6981Smrg#x00 Undefined 891ea1d6981Smrg#x01 Background 892ea1d6981Smrg#x02 Untouched 893ea1d6981Smrg#x03 Copied 894ea1d6981Smrg</literallayout> 895ea1d6981Smrg 896ea1d6981Smrg<para>SWAPINFO</para> 897ea1d6981Smrg<literallayout class="monospaced"> 898ea1d6981Smrg4 WINDOW window 899ea1d6981Smrg1 SWAPACTION swap action 900ea1d6981Smrg3 unused 901ea1d6981Smrg</literallayout> 902ea1d6981Smrg 903452262e1Smrg<para>VISINFO</para> 904ea1d6981Smrg<literallayout class="monospaced"> 905ea1d6981Smrg4 VISUALID visual 906ea1d6981Smrg1 CARD8 depth 907ea1d6981Smrg1 CARD8 perflevel 908ea1d6981Smrg2 unused 909452262e1Smrg</literallayout> 910ea1d6981Smrg 911452262e1Smrg<para>SCREENVISINFO</para> 912452262e1Smrg<literallayout class="monospaced"> 913ea1d6981Smrg4 CARD32 n, number in list 914ea1d6981Smrg8n LISTofVISINFO n VISINFOs 915452262e1Smrg</literallayout> 916ea1d6981Smrg 917452262e1Smrg<para>BUFFER_ATTRIBUTES</para> 918452262e1Smrg<literallayout class="monospaced"> 919ea1d6981Smrg4 WINDOW window 920ea1d6981Smrg</literallayout> 921ea1d6981Smrg</sect1> 922ea1d6981Smrg 923ea1d6981Smrg<sect1 id='Error'> 924ea1d6981Smrg<title>Error</title> 925ea1d6981Smrg<para><function>Buffer</function></para> 926ea1d6981Smrg<literallayout class="monospaced"> 927ea1d6981Smrg1 0 error 928ea1d6981Smrg1 error base + 0 code 929ea1d6981Smrg2 CARD16 sequence number 930ea1d6981Smrg4 CARD32 bad buffer 931ea1d6981Smrg2 CARD16 minor-opcode 932ea1d6981Smrg1 CARD8 major-opcode 933ea1d6981Smrg21 unused 934ea1d6981Smrg</literallayout> 935ea1d6981Smrg</sect1> 936ea1d6981Smrg 937ea1d6981Smrg<sect1 id='Request'> 938ea1d6981Smrg<title>Request</title> 939ea1d6981Smrg 940452262e1Smrg<para><function>DBEGetVersion</function></para> 941ea1d6981Smrg<literallayout class="monospaced"> 942ea1d6981Smrg1 CARD8 major-opcode 943ea1d6981Smrg1 0 minor-opcode 944ea1d6981Smrg2 2 request length 945ea1d6981Smrg1 CARD8 client-major-version 946ea1d6981Smrg1 CARD8 client-minor-version 947ea1d6981Smrg2 unused 948ea1d6981Smrg=> 949ea1d6981Smrg1 unused 950ea1d6981Smrg2 CARD16 sequence number 951ea1d6981Smrg4 0 reply length 952ea1d6981Smrg1 CARD8 server-major-version 953ea1d6981Smrg1 CARD8 server-minor-version 954ea1d6981Smrg22 unused 955ea1d6981Smrg</literallayout> 956ea1d6981Smrg 957ea1d6981Smrg<para><function>DBEAllocateBackBufferName</function></para> 958ea1d6981Smrg<literallayout class="monospaced"> 959ea1d6981Smrg1 CARD8 major-opcode 960ea1d6981Smrg1 1 minor-opcode 961ea1d6981Smrg2 4 request length 962ea1d6981Smrg4 WINDOW window 963ea1d6981Smrg4 BACKBUFFER back buffer name 964ea1d6981Smrg1 SWAPACTION swap action hint 965ea1d6981Smrg3 unused 966ea1d6981Smrg</literallayout> 967ea1d6981Smrg 968ea1d6981Smrg<para><function>DBEDeallocateBackBufferName</function></para> 969ea1d6981Smrg<literallayout class="monospaced"> 970ea1d6981Smrg1 CARD8 major-opcode 971ea1d6981Smrg1 2 minor-opcode 972ea1d6981Smrg2 2 request length 973ea1d6981Smrg4 BACKBUFFER back buffer name 974ea1d6981Smrg</literallayout> 975ea1d6981Smrg 976ea1d6981Smrg 977ea1d6981Smrg<para><function>DBESwapBuffers</function></para> 978ea1d6981Smrg<literallayout class="monospaced"> 979ea1d6981Smrg1 CARD8 major-opcode 980ea1d6981Smrg1 3 minor-opcode 981ea1d6981Smrg2 2+2n request length 982ea1d6981Smrg4 CARD32 n, number of window/swap action pairs in list 983ea1d6981Smrg8n LISTofSWAPINFO window/swap action pairs 984ea1d6981Smrg</literallayout> 985ea1d6981Smrg 986ea1d6981Smrg 987ea1d6981Smrg<para><function>DBEBeginIdiom</function></para> 988ea1d6981Smrg<literallayout class="monospaced"> 989ea1d6981Smrg1 CARD8 major-opcode 990ea1d6981Smrg1 4 minor-opcode 991ea1d6981Smrg2 1 request length 992ea1d6981Smrg</literallayout> 993ea1d6981Smrg 994ea1d6981Smrg<para><function>DBEEndIdiom</function></para> 995ea1d6981Smrg<literallayout class="monospaced"> 996ea1d6981Smrg1 CARD8 major-opcode 997ea1d6981Smrg1 5 minor-opcode 998ea1d6981Smrg2 1 request length 999ea1d6981Smrg</literallayout> 1000ea1d6981Smrg 1001ea1d6981Smrg<para><function>DBEGetVisualInfo</function></para> 1002ea1d6981Smrg<literallayout class="monospaced"> 1003ea1d6981Smrg1 CARD8 major-opcode 1004ea1d6981Smrg1 6 minor-opcode 1005ea1d6981Smrg2 2+n request length 1006ea1d6981Smrg4 CARD32 n, number of screen specifiers in list 1007ea1d6981Smrg4n LISTofDRAWABLE n screen specifiers 1008ea1d6981Smrg=> 1009ea1d6981Smrg1 1 Reply 1010ea1d6981Smrg1 unused 1011ea1d6981Smrg2 CARD16 sequence number 1012452262e1Smrg4 CARD32 j, reply length 1013ea1d6981Smrg4 CARD32 m, number of SCREENVISINFOs in list 1014ea1d6981Smrg20 unused 1015ea1d6981Smrg4j LISTofSCREENVISINFO m SCREENVISINFOs 1016ea1d6981Smrg</literallayout> 1017ea1d6981Smrg 1018ea1d6981Smrg<para><function>DBEGetBackBufferAttributes</function></para> 1019ea1d6981Smrg<literallayout class="monospaced"> 1020ea1d6981Smrg1 CARD8 major-opcode 1021ea1d6981Smrg1 7 minor-opcode 1022ea1d6981Smrg2 2 request length 1023ea1d6981Smrg4 BACKBUFFER back-buffer-name 1024ea1d6981Smrg=> 1025ea1d6981Smrg1 unused 1026ea1d6981Smrg2 CARD16 sequence number 1027ea1d6981Smrg4 0 reply length 1028ea1d6981Smrg4 BUFFER_ATTRIBUTES attributes 1029ea1d6981Smrg20 unused 1030ea1d6981Smrg</literallayout> 1031ea1d6981Smrg</sect1> 1032ea1d6981Smrg 1033ea1d6981Smrg</chapter> 1034ea1d6981Smrg 1035ea1d6981Smrg<chapter id='Acknowledgements'> 1036ea1d6981Smrg<title>Acknowledgements</title> 1037ea1d6981Smrg<para> 1038ea1d6981SmrgWe wish to thank the following individuals who have contributed their time 1039ea1d6981Smrgand talent toward shaping the DBE specification: 1040ea1d6981Smrg</para> 1041ea1d6981Smrg<para>T. Alex Chen, IBM; Peter Daifuku, Silicon Graphics, Inc.; 1042ea1d6981SmrgIan Elliott, Hewlett-Packard Company; Stephen Gildea, X Consortium, Inc.; 1043ea1d6981SmrgJim Graham, Sun; Larry Hare, AGE Logic; Jay Hersh, X Consortium, Inc.; 1044ea1d6981SmrgDaryl Huff, Sun; Deron Dann Johnson, Sun; Louis Khouw, Sun; 1045ea1d6981SmrgMark Kilgard, Silicon Graphics, Inc.; Rob 1046ea1d6981SmrgLembree, Digital Equipment Corporation; Alan Ricker, Metheus; Michael 1047ea1d6981SmrgRosenblum, Digital Equipment Corporation; Bob Scheifler, X Consortium, Inc.; 1048ea1d6981SmrgLarry Seiler, Digital Equipment Corporation; Jeanne Sparlin Smith, IBM; 1049ea1d6981SmrgJeff Stevenson, Hewlett-Packard Company; Walter Strand, Metheus; Ken 1050ea1d6981SmrgTidwell, Hewlett-Packard Company; and David P. Wiggins, X Consortium, Inc. 1051ea1d6981Smrg</para> 1052ea1d6981Smrg 1053ea1d6981Smrg<para> 1054ea1d6981SmrgMark provided the impetus to start the DBE project. Ian wrote the first 1055ea1d6981Smrgdraft of the specification. David served as architect. 1056ea1d6981Smrg</para> 1057ea1d6981Smrg</chapter> 1058ea1d6981Smrg 1059ea1d6981Smrg<chapter id='References'> 1060ea1d6981Smrg<title>References</title> 1061ea1d6981Smrg<para> 1062ea1d6981SmrgJeffrey Friedberg, Larry Seiler, and Jeff Vroom, "Multi-buffering Extension 1063ea1d6981SmrgSpecification Version 3.3." 1064ea1d6981Smrg</para> 1065ea1d6981Smrg<para>Tim Glauert, Dave Carver, Jim Gettys, and David P. Wiggins, 1066ea1d6981Smrg"X Synchronization Extension Version 3.0." 1067ea1d6981Smrg</para> 1068ea1d6981Smrg</chapter> 1069ea1d6981Smrg</book> 1070