16747b715Smrg/* $XFree86: xc/lib/GL/dri/xf86dri.h,v 1.7 2000/12/07 20:26:02 dawes Exp $ */ 24642e01fSmrg/************************************************************************** 34642e01fSmrg 435c4bbdfSmrg Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. 535c4bbdfSmrg Copyright 2000 VA Linux Systems, Inc. 635c4bbdfSmrg Copyright (c) 2002-2012 Apple Computer, Inc. 735c4bbdfSmrg All Rights Reserved. 835c4bbdfSmrg 935c4bbdfSmrg Permission is hereby granted, free of charge, to any person obtaining a 1035c4bbdfSmrg copy of this software and associated documentation files (the 1135c4bbdfSmrg "Software"), to deal in the Software without restriction, including 1235c4bbdfSmrg without limitation the rights to use, copy, modify, merge, publish, 1335c4bbdfSmrg distribute, sub license, and/or sell copies of the Software, and to 1435c4bbdfSmrg permit persons to whom the Software is furnished to do so, subject to 1535c4bbdfSmrg the following conditions: 1635c4bbdfSmrg 1735c4bbdfSmrg The above copyright notice and this permission notice (including the 1835c4bbdfSmrg next paragraph) shall be included in all copies or substantial portions 1935c4bbdfSmrg of the Software. 2035c4bbdfSmrg 2135c4bbdfSmrg THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 2235c4bbdfSmrg OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2335c4bbdfSmrg MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 2435c4bbdfSmrg IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 2535c4bbdfSmrg ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 2635c4bbdfSmrg TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 2735c4bbdfSmrg SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 284642e01fSmrg 294642e01fSmrg**************************************************************************/ 304642e01fSmrg 314642e01fSmrg/* 324642e01fSmrg * Authors: 334642e01fSmrg * Kevin E. Martin <martin@valinux.com> 344642e01fSmrg * Jens Owen <jens@valinux.com> 354642e01fSmrg * Rickard E. (Rik) Faith <faith@valinux.com> 3635c4bbdfSmrg * Jeremy Huddleston <jeremyhu@apple.com> 374642e01fSmrg * 384642e01fSmrg */ 394642e01fSmrg 404642e01fSmrg#ifndef _APPLEDRI_H_ 414642e01fSmrg#define _APPLEDRI_H_ 424642e01fSmrg 434642e01fSmrg#include <X11/Xfuncproto.h> 444642e01fSmrg 4535c4bbdfSmrg#define X_AppleDRIQueryVersion 0 4635c4bbdfSmrg#define X_AppleDRIQueryDirectRenderingCapable 1 4735c4bbdfSmrg#define X_AppleDRICreateSurface 2 4835c4bbdfSmrg#define X_AppleDRIDestroySurface 3 4935c4bbdfSmrg#define X_AppleDRIAuthConnection 4 5035c4bbdfSmrg#define X_AppleDRICreateSharedBuffer 5 5135c4bbdfSmrg#define X_AppleDRISwapBuffers 6 5235c4bbdfSmrg#define X_AppleDRICreatePixmap 7 5335c4bbdfSmrg#define X_AppleDRIDestroyPixmap 8 546747b715Smrg 554642e01fSmrg/* Requests up to and including 18 were used in a previous version */ 564642e01fSmrg 574642e01fSmrg/* Events */ 5835c4bbdfSmrg#define AppleDRIObsoleteEvent1 0 5935c4bbdfSmrg#define AppleDRIObsoleteEvent2 1 6035c4bbdfSmrg#define AppleDRIObsoleteEvent3 2 6135c4bbdfSmrg#define AppleDRISurfaceNotify 3 6235c4bbdfSmrg#define AppleDRINumberEvents 4 634642e01fSmrg 644642e01fSmrg/* Errors */ 6535c4bbdfSmrg#define AppleDRIClientNotLocal 0 6635c4bbdfSmrg#define AppleDRIOperationNotSupported 1 6735c4bbdfSmrg#define AppleDRINumberErrors (AppleDRIOperationNotSupported + 1) 684642e01fSmrg 694642e01fSmrg/* Kinds of SurfaceNotify events: */ 7035c4bbdfSmrg#define AppleDRISurfaceNotifyChanged 0 7135c4bbdfSmrg#define AppleDRISurfaceNotifyDestroyed 1 724642e01fSmrg 734642e01fSmrg#ifndef _APPLEDRI_SERVER_ 744642e01fSmrg 754642e01fSmrgtypedef struct { 7635c4bbdfSmrg int type; /* of event */ 774642e01fSmrg unsigned long serial; /* # of last request processed by server */ 7835c4bbdfSmrg Bool send_event; /* true if this came frome a SendEvent request */ 7935c4bbdfSmrg Display *display; /* Display the event was read from */ 8035c4bbdfSmrg Window window; /* window of event */ 8135c4bbdfSmrg Time time; /* server timestamp when event happened */ 8235c4bbdfSmrg int kind; /* subtype of event */ 834642e01fSmrg int arg; 844642e01fSmrg} XAppleDRINotifyEvent; 854642e01fSmrg 864642e01fSmrg_XFUNCPROTOBEGIN 874642e01fSmrg 8835c4bbdfSmrgBool 8935c4bbdfSmrgXAppleDRIQueryExtension(Display *dpy, int *event_base, int *error_base); 904642e01fSmrg 9135c4bbdfSmrgBool 9235c4bbdfSmrgXAppleDRIQueryVersion(Display *dpy, int *majorVersion, int *minorVersion, 9335c4bbdfSmrg int *patchVersion); 944642e01fSmrg 9535c4bbdfSmrgBool 9635c4bbdfSmrgXAppleDRIQueryDirectRenderingCapable(Display *dpy, int screen, 9735c4bbdfSmrg Bool *isCapable); 984642e01fSmrg 9935c4bbdfSmrgvoid * 10035c4bbdfSmrgXAppleDRISetSurfaceNotifyHandler(void (*fun)(Display *dpy, unsigned uid, 10135c4bbdfSmrg int kind)); 1024642e01fSmrg 10335c4bbdfSmrgBool 10435c4bbdfSmrgXAppleDRIAuthConnection(Display *dpy, int screen, unsigned int magic); 1054642e01fSmrg 10635c4bbdfSmrgBool XAppleDRICreateSurface(Display * dpy, int screen, Drawable drawable, 10735c4bbdfSmrg unsigned int client_id, unsigned int key[2], 10835c4bbdfSmrg unsigned int* uid); 1094642e01fSmrg 11035c4bbdfSmrgBool 11135c4bbdfSmrgXAppleDRIDestroySurface(Display *dpy, int screen, Drawable drawable); 1124642e01fSmrg 11335c4bbdfSmrgBool 11435c4bbdfSmrgXAppleDRISynchronizeSurfaces(Display *dpy); 1154642e01fSmrg 11635c4bbdfSmrgBool 11735c4bbdfSmrgXAppleDRICreateSharedBuffer(Display *dpy, int screen, Drawable drawable, 11835c4bbdfSmrg Bool doubleSwap, char *path, size_t pathlen, 11935c4bbdfSmrg int *width, 12035c4bbdfSmrg int *height); 1216747b715Smrg 12235c4bbdfSmrgBool 12335c4bbdfSmrgXAppleDRISwapBuffers(Display *dpy, int screen, Drawable drawable); 1246747b715Smrg 12535c4bbdfSmrgBool 12635c4bbdfSmrgXAppleDRICreatePixmap(Display *dpy, int screen, Drawable drawable, int *width, 12735c4bbdfSmrg int *height, int *pitch, int *bpp, size_t *size, 12835c4bbdfSmrg char *bufname, 12935c4bbdfSmrg size_t bufnamesize); 1306747b715Smrg 13135c4bbdfSmrgBool 13235c4bbdfSmrgXAppleDRIDestroyPixmap(Display *dpy, Pixmap pixmap); 1336747b715Smrg 1344642e01fSmrg_XFUNCPROTOEND 1354642e01fSmrg 1364642e01fSmrg#endif /* _APPLEDRI_SERVER_ */ 1374642e01fSmrg#endif /* _APPLEDRI_H_ */ 138