Path: blob/21.2-virgl/src/glx/apple/appledristr.h
4560 views
/**************************************************************************12Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.3Copyright 2000 VA Linux Systems, Inc.4Copyright (c) 2002, 2008, 2009 Apple Computer, Inc.5All Rights Reserved.67Permission is hereby granted, free of charge, to any person obtaining a8copy of this software and associated documentation files (the9"Software"), to deal in the Software without restriction, including10without limitation the rights to use, copy, modify, merge, publish,11distribute, sub license, and/or sell copies of the Software, and to12permit persons to whom the Software is furnished to do so, subject to13the following conditions:1415The above copyright notice and this permission notice (including the16next paragraph) shall be included in all copies or substantial portions17of the Software.1819THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS20OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF21MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.22IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR23ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,24TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE25SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.2627**************************************************************************/2829/*30* Authors:31* Kevin E. Martin <[email protected]>32* Jens Owen <[email protected]>33* Rickard E. (Rik) Fiath <[email protected]>34*35*/3637#ifndef _APPLEDRISTR_H_38#define _APPLEDRISTR_H_3940#include "appledri.h"4142#define APPLEDRINAME "Apple-DRI"4344#define APPLE_DRI_MAJOR_VERSION 1 /* current version numbers */45#define APPLE_DRI_MINOR_VERSION 046#define APPLE_DRI_PATCH_VERSION 04748typedef struct _AppleDRIQueryVersion49{50CARD8 reqType; /* always DRIReqCode */51CARD8 driReqType; /* always X_DRIQueryVersion */52CARD16 length B16;53} xAppleDRIQueryVersionReq;54#define sz_xAppleDRIQueryVersionReq 45556typedef struct57{58BYTE type; /* X_Reply */59BOOL pad1;60CARD16 sequenceNumber B16;61CARD32 length B32;62CARD16 majorVersion B16; /* major version of DRI protocol */63CARD16 minorVersion B16; /* minor version of DRI protocol */64CARD32 patchVersion B32; /* patch version of DRI protocol */65CARD32 pad3 B32;66CARD32 pad4 B32;67CARD32 pad5 B32;68CARD32 pad6 B32;69} xAppleDRIQueryVersionReply;70#define sz_xAppleDRIQueryVersionReply 327172typedef struct _AppleDRIQueryDirectRenderingCapable73{74CARD8 reqType; /* always DRIReqCode */75CARD8 driReqType; /* X_DRIQueryDirectRenderingCapable */76CARD16 length B16;77CARD32 screen B32;78} xAppleDRIQueryDirectRenderingCapableReq;79#define sz_xAppleDRIQueryDirectRenderingCapableReq 88081typedef struct82{83BYTE type; /* X_Reply */84BOOL pad1;85CARD16 sequenceNumber B16;86CARD32 length B32;87BOOL isCapable;88BOOL pad2;89BOOL pad3;90BOOL pad4;91CARD32 pad5 B32;92CARD32 pad6 B32;93CARD32 pad7 B32;94CARD32 pad8 B32;95CARD32 pad9 B32;96} xAppleDRIQueryDirectRenderingCapableReply;97#define sz_xAppleDRIQueryDirectRenderingCapableReply 329899typedef struct _AppleDRIAuthConnection100{101CARD8 reqType; /* always DRIReqCode */102CARD8 driReqType; /* always X_DRICloseConnection */103CARD16 length B16;104CARD32 screen B32;105CARD32 magic B32;106} xAppleDRIAuthConnectionReq;107#define sz_xAppleDRIAuthConnectionReq 12108109typedef struct110{111BYTE type;112BOOL pad1;113CARD16 sequenceNumber B16;114CARD32 length B32;115CARD32 authenticated B32;116CARD32 pad2 B32;117CARD32 pad3 B32;118CARD32 pad4 B32;119CARD32 pad5 B32;120CARD32 pad6 B32;121} xAppleDRIAuthConnectionReply;122#define zx_xAppleDRIAuthConnectionReply 32123124typedef struct _AppleDRICreateSurface125{126CARD8 reqType; /* always DRIReqCode */127CARD8 driReqType; /* always X_DRICreateSurface */128CARD16 length B16;129CARD32 screen B32;130CARD32 drawable B32;131CARD32 client_id B32;132} xAppleDRICreateSurfaceReq;133#define sz_xAppleDRICreateSurfaceReq 16134135typedef struct136{137BYTE type; /* X_Reply */138BOOL pad1;139CARD16 sequenceNumber B16;140CARD32 length B32;141CARD32 key_0 B32;142CARD32 key_1 B32;143CARD32 uid B32;144CARD32 pad4 B32;145CARD32 pad5 B32;146CARD32 pad6 B32;147} xAppleDRICreateSurfaceReply;148#define sz_xAppleDRICreateSurfaceReply 32149150typedef struct _AppleDRIDestroySurface151{152CARD8 reqType; /* always DRIReqCode */153CARD8 driReqType; /* always X_DRIDestroySurface */154CARD16 length B16;155CARD32 screen B32;156CARD32 drawable B32;157} xAppleDRIDestroySurfaceReq;158#define sz_xAppleDRIDestroySurfaceReq 12159160typedef struct _AppleDRINotify161{162BYTE type; /* always eventBase + event type */163BYTE kind;164CARD16 sequenceNumber B16;165CARD32 time B32; /* time of change */166CARD32 pad1 B32;167CARD32 arg B32;168CARD32 pad3 B32;169CARD32 pad4 B32;170CARD32 pad5 B32;171CARD32 pad6 B32;172} xAppleDRINotifyEvent;173#define sz_xAppleDRINotifyEvent 32174175176typedef struct177{178CARD8 reqType;179CARD8 driReqType;180CARD16 length B16;181CARD32 screen B32;182CARD32 drawable B32;183BOOL doubleSwap;184CARD8 pad1, pad2, pad3;185} xAppleDRICreateSharedBufferReq;186187#define sz_xAppleDRICreateSharedBufferReq 16188189typedef struct190{191BYTE type;192BYTE data1;193CARD16 sequenceNumber B16;194CARD32 length B32;195CARD32 stringLength B32; /* 0 on error */196CARD32 width B32;197CARD32 height B32;198CARD32 pad1 B32;199CARD32 pad2 B32;200CARD32 pad3 B32;201} xAppleDRICreateSharedBufferReply;202203#define sz_xAppleDRICreateSharedBufferReply 32204205typedef struct206{207CARD8 reqType;208CARD8 driReqType;209CARD16 length B16;210CARD32 screen B32;211CARD32 drawable B32;212} xAppleDRISwapBuffersReq;213214#define sz_xAppleDRISwapBuffersReq 12215216typedef struct217{218CARD8 reqType; /*1 */219CARD8 driReqType; /*2 */220CARD16 length B16; /*4 */221CARD32 screen B32; /*8 */222CARD32 drawable B32; /*12 */223} xAppleDRICreatePixmapReq;224225#define sz_xAppleDRICreatePixmapReq 12226227typedef struct228{229BYTE type; /*1 */230BOOL pad1; /*2 */231CARD16 sequenceNumber B16; /*4 */232CARD32 length B32; /*8 */233CARD32 width B32; /*12 */234CARD32 height B32; /*16 */235CARD32 pitch B32; /*20 */236CARD32 bpp B32; /*24 */237CARD32 size B32; /*28 */238CARD32 stringLength B32; /*32 */239} xAppleDRICreatePixmapReply;240241#define sz_xAppleDRICreatePixmapReply 32242243typedef struct244{245CARD8 reqType; /*1 */246CARD8 driReqType; /*2 */247CARD16 length B16; /*4 */248CARD32 drawable B32; /*8 */249} xAppleDRIDestroyPixmapReq;250251#define sz_xAppleDRIDestroyPixmapReq 8252253#ifdef _APPLEDRI_SERVER_254255void AppleDRISendEvent(256#if NeedFunctionPrototypes257int /* type */ ,258unsigned int /* mask */ ,259int /* which */ ,260int /* arg */261#endif262);263264#endif /* _APPLEDRI_SERVER_ */265#endif /* _APPLEDRISTR_H_ */266267268