github.com/rajveermalviya/gamen@v0.1.2-0.20220930195403-9be15877c1aa/internal/xcb/include/X11/extensions/multibufproto.h (about) 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; /* associated visual */ 54 CARD16 maxBuffers; /* 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; 64 CARD32 buffer; /* affected buffer */ 65 BYTE state; /* current status */ 66 CARD8 unused1; 67 CARD16 unused2; 68 CARD32 unused3; 69 CARD32 unused4; 70 CARD32 unused5; 71 CARD32 unused6; 72 CARD32 unused7; 73 } xMbufClobberNotifyEvent; 74 75 typedef struct { 76 BYTE type; 77 BYTE unused; 78 CARD16 sequenceNumber; 79 CARD32 buffer; /* affected buffer */ 80 CARD32 timeStamp; /* update time */ 81 CARD32 unused1; 82 CARD32 unused2; 83 CARD32 unused3; 84 CARD32 unused4; 85 CARD32 unused5; 86 CARD32 unused6; 87 } xMbufUpdateNotifyEvent; 88 89 typedef struct { 90 CARD8 reqType; /* always codes->major_opcode */ 91 CARD8 mbufReqType; /* always X_MbufGetBufferVersion */ 92 CARD16 length; 93 } xMbufGetBufferVersionReq; 94 #define sz_xMbufGetBufferVersionReq 4 95 96 typedef struct { 97 BYTE type; /* X_Reply */ 98 CARD8 unused; /* not used */ 99 CARD16 sequenceNumber; 100 CARD32 length; 101 CARD8 majorVersion; /* major version of Multi-Buffering protocol */ 102 CARD8 minorVersion; /* minor version of Multi-Buffering protocol */ 103 CARD16 pad1; 104 CARD32 pad2; 105 CARD32 pad3; 106 CARD32 pad4; 107 CARD32 pad5; 108 CARD32 pad6; 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; 116 CARD32 window; /* 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; 127 CARD32 length; 128 CARD16 numberBuffer; /* number successfully allocated */ 129 CARD16 unused1; 130 CARD32 unused2; 131 CARD32 unused3; 132 CARD32 unused4; 133 CARD32 unused5; 134 CARD32 unused6; 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; 142 CARD32 window; /* 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; 150 CARD16 minDelay; /* minimum time between last update and now */ 151 CARD16 maxDelay; /* 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; 159 CARD32 window; /* associated window */ 160 CARD32 valueMask; /* 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; 168 CARD32 window; /* 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; 176 CARD32 length; 177 CARD16 displayedBuffer; /* currently visible buffer */ 178 CARD8 updateAction; 179 CARD8 updateHint; 180 CARD8 windowMode; 181 CARD8 unused0; 182 CARD16 unused1; 183 CARD32 unused2; 184 CARD32 unused3; 185 CARD32 unused4; 186 CARD32 unused5; 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; 194 CARD32 buffer; 195 CARD32 valueMask; 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; 203 CARD32 buffer; 204 } xMbufGetBufferAttributesReq; 205 #define sz_xMbufGetBufferAttributesReq 8 206 207 typedef struct { 208 BYTE type; /* X_Reply */ 209 CARD8 unused; /* not used */ 210 CARD16 sequenceNumber; 211 CARD32 length; 212 CARD32 window; 213 CARD32 eventMask; 214 CARD16 bufferIndex; 215 CARD8 side; 216 CARD8 unused0; 217 CARD32 unused1; 218 CARD32 unused2; 219 CARD32 unused3; 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; 227 Drawable drawable; 228 } xMbufGetBufferInfoReq; 229 #define sz_xMbufGetBufferInfoReq 8 230 231 typedef struct { 232 BYTE type; /* X_Reply */ 233 CARD8 unused; /* not used */ 234 CARD16 sequenceNumber; 235 CARD32 length; 236 CARD16 normalInfo; 237 CARD16 stereoInfo; 238 CARD32 unused1; 239 CARD32 unused2; 240 CARD32 unused3; 241 CARD32 unused4; 242 CARD32 unused5; 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; 251 CARD8 unused0; 252 CARD8 unused1; 253 CARD8 unused2; 254 CARD8 depth; 255 Window wid; 256 Window parent; 257 Multibuffer left; /* associated buffers */ 258 Multibuffer right; 259 INT16 x; 260 INT16 y; 261 CARD16 width; 262 CARD16 height; 263 CARD16 borderWidth; 264 #if defined(__cplusplus) || defined(c_plusplus) 265 CARD16 c_class; 266 #else 267 CARD16 class; 268 #endif 269 VisualID visual; 270 CARD32 mask; 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; 278 Multibuffer buffer; 279 INT16 x; 280 INT16 y; 281 CARD16 width; 282 CARD16 height; 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_ */