1 /* 2 Copyright 1989, 1998 The Open Group 3 4 Permission to use, copy, modify, distribute, and sell this software and its 5 documentation for any purpose is hereby granted without fee, provided that 6 the above copyright notice appear in all copies and that both that 7 copyright notice and this permission notice appear in supporting 8 documentation. 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 THE 16 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 17 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 20 Except as contained in this notice, the name of The Open Group shall not be 21 used in advertising or otherwise to promote the sale, use or other dealings 22 in this Software without prior written authorization from The Open Group. 23 */ 24 25 #ifndef _MULTIBUFPROTO_H_ 26 #define _MULTIBUFPROTO_H_ 27 28 #include <X11/extensions/multibufconst.h> 29 30 /* 31 * Protocol requests constants and alignment values 32 */ 33 34 #define Window CARD32 35 #define Drawable CARD32 36 #define VisualID CARD32 37 #define Multibuffer CARD32 38 39 #define X_MbufGetBufferVersion 0 40 #define X_MbufCreateImageBuffers 1 41 #define X_MbufDestroyImageBuffers 2 42 #define X_MbufDisplayImageBuffers 3 43 #define X_MbufSetMBufferAttributes 4 44 #define X_MbufGetMBufferAttributes 5 45 #define X_MbufSetBufferAttributes 6 46 #define X_MbufGetBufferAttributes 7 47 #define X_MbufGetBufferInfo 8 48 #define X_MbufCreateStereoWindow 9 49 #define X_MbufClearImageBufferArea 10 50 51 52 typedef struct xMbufBufferInfo { 53 CARD32 visualID B32; /* associated visual */ 54 CARD16 maxBuffers B16; /* maximum supported buffers */ 55 CARD8 depth; /* depth of visual (redundant) */ 56 CARD8 unused; 57 } xMbufBufferInfo; 58 #define sz_xMbufBufferInfo 8 59 60 typedef struct { 61 BYTE type; 62 BYTE unused; 63 CARD16 sequenceNumber B16; 64 CARD32 buffer B32; /* affected buffer */ 65 BYTE state; /* current status */ 66 CARD8 unused1; 67 CARD16 unused2 B16; 68 CARD32 unused3 B32; 69 CARD32 unused4 B32; 70 CARD32 unused5 B32; 71 CARD32 unused6 B32; 72 CARD32 unused7 B32; 73 } xMbufClobberNotifyEvent; 74 75 typedef struct { 76 BYTE type; 77 BYTE unused; 78 CARD16 sequenceNumber B16; 79 CARD32 buffer B32; /* affected buffer */ 80 CARD32 timeStamp B32; /* update time */ 81 CARD32 unused1 B32; 82 CARD32 unused2 B32; 83 CARD32 unused3 B32; 84 CARD32 unused4 B32; 85 CARD32 unused5 B32; 86 CARD32 unused6 B32; 87 } xMbufUpdateNotifyEvent; 88 89 typedef struct { 90 CARD8 reqType; /* always codes->major_opcode */ 91 CARD8 mbufReqType; /* always X_MbufGetBufferVersion */ 92 CARD16 length B16; 93 } xMbufGetBufferVersionReq; 94 #define sz_xMbufGetBufferVersionReq 4 95 96 typedef struct { 97 BYTE type; /* X_Reply */ 98 CARD8 unused; /* not used */ 99 CARD16 sequenceNumber B16; 100 CARD32 length B32; 101 CARD8 majorVersion; /* major version of Multi-Buffering protocol */ 102 CARD8 minorVersion; /* minor version of Multi-Buffering protocol */ 103 CARD16 pad1 B16; 104 CARD32 pad2 B32; 105 CARD32 pad3 B32; 106 CARD32 pad4 B32; 107 CARD32 pad5 B32; 108 CARD32 pad6 B32; 109 } xMbufGetBufferVersionReply; 110 #define sz_xMbufGetBufferVersionReply 32 111 112 typedef struct { 113 CARD8 reqType; /* always codes->major_opcode */ 114 CARD8 mbufReqType; /* always X_MbufCreateImageBuffers */ 115 CARD16 length B16; 116 CARD32 window B32; /* associated window */ 117 CARD8 updateAction; /* action at update */ 118 CARD8 updateHint; /* hint as to frequency of updates */ 119 CARD16 unused; 120 } xMbufCreateImageBuffersReq; /* followed by buffer ids */ 121 #define sz_xMbufCreateImageBuffersReq 12 122 123 typedef struct { 124 BYTE type; /* X_Reply */ 125 CARD8 unused; /* not used */ 126 CARD16 sequenceNumber B16; 127 CARD32 length B32; 128 CARD16 numberBuffer B16; /* number successfully allocated */ 129 CARD16 unused1 B16; 130 CARD32 unused2 B32; 131 CARD32 unused3 B32; 132 CARD32 unused4 B32; 133 CARD32 unused5 B32; 134 CARD32 unused6 B32; 135 } xMbufCreateImageBuffersReply; 136 #define sz_xMbufCreateImageBuffersReply 32 137 138 typedef struct { 139 CARD8 reqType; /* always codes->major_opcode */ 140 CARD8 mbufReqType; /* always X_MbufDestroyImageBuffers */ 141 CARD16 length B16; 142 CARD32 window B32; /* associated window */ 143 } xMbufDestroyImageBuffersReq; 144 #define sz_xMbufDestroyImageBuffersReq 8 145 146 typedef struct { 147 CARD8 reqType; /* always codes->major_opcode */ 148 CARD8 mbufReqType; /* always X_MbufDisplayImageBuffers */ 149 CARD16 length B16; 150 CARD16 minDelay B16; /* minimum time between last update and now */ 151 CARD16 maxDelay B16; /* maximum time between last update and now */ 152 } xMbufDisplayImageBuffersReq; /* followed by list of buffers */ 153 #define sz_xMbufDisplayImageBuffersReq 8 154 155 typedef struct { 156 CARD8 reqType; /* always codes->major_opcode */ 157 CARD8 mbufReqType; /* always X_MbufSetMBufferAttributes */ 158 CARD16 length B16; 159 CARD32 window B32; /* associated window */ 160 CARD32 valueMask B32; /* modified entries */ 161 } xMbufSetMBufferAttributesReq; /* followed by values */ 162 #define sz_xMbufSetMBufferAttributesReq 12 163 164 typedef struct { 165 CARD8 reqType; /* always codes->major_opcode */ 166 CARD8 mbufReqType; /* always X_MbufGetMBufferAttributes */ 167 CARD16 length B16; 168 CARD32 window B32; /* associated window */ 169 } xMbufGetMBufferAttributesReq; 170 #define sz_xMbufGetMBufferAttributesReq 8 171 172 typedef struct { 173 BYTE type; /* X_Reply */ 174 CARD8 unused; /* not used */ 175 CARD16 sequenceNumber B16; 176 CARD32 length B32; 177 CARD16 displayedBuffer B16; /* currently visible buffer */ 178 CARD8 updateAction; 179 CARD8 updateHint; 180 CARD8 windowMode; 181 CARD8 unused0; 182 CARD16 unused1 B16; 183 CARD32 unused2 B32; 184 CARD32 unused3 B32; 185 CARD32 unused4 B32; 186 CARD32 unused5 B32; 187 } xMbufGetMBufferAttributesReply; 188 #define sz_xMbufGetMBufferAttributesReply 32 189 190 typedef struct { 191 CARD8 reqType; /* always codes->major_opcode */ 192 CARD8 mbufReqType; /* always X_MbufSetBufferAttributes */ 193 CARD16 length B16; 194 CARD32 buffer B32; 195 CARD32 valueMask B32; 196 } xMbufSetBufferAttributesReq; /* followed by values */ 197 #define sz_xMbufSetBufferAttributesReq 12 198 199 typedef struct { 200 CARD8 reqType; /* always codes->major_opcode */ 201 CARD8 mbufReqType; /* always X_MbufGetBufferAttributes */ 202 CARD16 length B16; 203 CARD32 buffer B32; 204 } xMbufGetBufferAttributesReq; 205 #define sz_xMbufGetBufferAttributesReq 8 206 207 typedef struct { 208 BYTE type; /* X_Reply */ 209 CARD8 unused; /* not used */ 210 CARD16 sequenceNumber B16; 211 CARD32 length B32; 212 CARD32 window B32; 213 CARD32 eventMask B32; 214 CARD16 bufferIndex B16; 215 CARD8 side; 216 CARD8 unused0; 217 CARD32 unused1 B32; 218 CARD32 unused2 B32; 219 CARD32 unused3 B32; 220 } xMbufGetBufferAttributesReply; 221 #define sz_xMbufGetBufferAttributesReply 32 222 223 typedef struct { 224 CARD8 reqType; /* always codes->major_opcode */ 225 CARD8 mbufReqType; /* always X_MbufGetBufferInfo */ 226 CARD16 length B16; 227 Drawable drawable B32; 228 } xMbufGetBufferInfoReq; 229 #define sz_xMbufGetBufferInfoReq 8 230 231 typedef struct { 232 BYTE type; /* X_Reply */ 233 CARD8 unused; /* not used */ 234 CARD16 sequenceNumber B16; 235 CARD32 length B32; 236 CARD16 normalInfo B16; 237 CARD16 stereoInfo B16; 238 CARD32 unused1 B32; 239 CARD32 unused2 B32; 240 CARD32 unused3 B32; 241 CARD32 unused4 B32; 242 CARD32 unused5 B32; 243 } xMbufGetBufferInfoReply; /* followed by buffer infos */ 244 #define sz_xMbufGetBufferInfoReply 32 245 246 247 typedef struct { 248 CARD8 reqType; /* always codes->major_opcode */ 249 CARD8 mbufReqType; /* always X_MbufCreateStereoWindow */ 250 CARD16 length B16; 251 CARD8 unused0; 252 CARD8 unused1; 253 CARD8 unused2; 254 CARD8 depth; 255 Window wid B32; 256 Window parent B32; 257 Multibuffer left B32; /* associated buffers */ 258 Multibuffer right B32; 259 INT16 x B16; 260 INT16 y B16; 261 CARD16 width B16; 262 CARD16 height B16; 263 CARD16 borderWidth B16; 264 #if defined(__cplusplus) || defined(c_plusplus) 265 CARD16 c_class B16; 266 #else 267 CARD16 class B16; 268 #endif 269 VisualID visual B32; 270 CARD32 mask B32; 271 } xMbufCreateStereoWindowReq; /* followed by value list */ 272 #define sz_xMbufCreateStereoWindowReq 44 273 274 typedef struct { 275 CARD8 reqType; /* always codes->major_opcode */ 276 CARD8 mbufReqType; /* always X_MbufClearImageBufferArea */ 277 CARD16 length B16; 278 Multibuffer buffer B32; 279 INT16 x B16; 280 INT16 y B16; 281 CARD16 width B16; 282 CARD16 height B16; 283 CARD8 unused0; 284 CARD8 unused1; 285 CARD8 unused2; 286 BOOL exposures; 287 } xMbufClearImageBufferAreaReq; 288 #define sz_xMbufClearImageBufferAreaReq 20 289 290 #undef Window 291 #undef Drawable 292 #undef VisualID 293 #undef Multibuffer 294 295 #endif /* _MULTIBUFPROTO_H_ */ 296