/* $XFree86: xc/lib/GL/dri/xf86dri.h,v 1.7 2000/12/07 20:26:02 dawes Exp $ */1/**************************************************************************23Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.4Copyright 2000 VA Linux Systems, Inc.5Copyright (c) 2002, 2008, 2009 Apple Computer, Inc.6All Rights Reserved.78Permission is hereby granted, free of charge, to any person obtaining a9copy of this software and associated documentation files (the10"Software"), to deal in the Software without restriction, including11without limitation the rights to use, copy, modify, merge, publish,12distribute, sub license, and/or sell copies of the Software, and to13permit persons to whom the Software is furnished to do so, subject to14the following conditions:1516The above copyright notice and this permission notice (including the17next paragraph) shall be included in all copies or substantial portions18of the Software.1920THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS21OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF22MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.23IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR24ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,25TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE26SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.2728**************************************************************************/2930/*31* Authors:32* Kevin E. Martin <[email protected]>33* Jens Owen <[email protected]>34* Rickard E. (Rik) Faith <[email protected]>35*36*/3738#ifndef _APPLEDRI_H_39#define _APPLEDRI_H_4041#include <X11/Xlib.h>42#include <X11/Xfuncproto.h>4344#define X_AppleDRIQueryVersion 045#define X_AppleDRIQueryDirectRenderingCapable 146#define X_AppleDRICreateSurface 247#define X_AppleDRIDestroySurface 348#define X_AppleDRIAuthConnection 449#define X_AppleDRICreateSharedBuffer 550#define X_AppleDRISwapBuffers 651#define X_AppleDRICreatePixmap 752#define X_AppleDRIDestroyPixmap 85354/* Requests up to and including 18 were used in a previous version */5556/* Events */57#define AppleDRIObsoleteEvent1 058#define AppleDRIObsoleteEvent2 159#define AppleDRIObsoleteEvent3 260#define AppleDRISurfaceNotify 361#define AppleDRINumberEvents 46263/* Errors */64#define AppleDRIClientNotLocal 065#define AppleDRIOperationNotSupported 166#define AppleDRINumberErrors (AppleDRIOperationNotSupported + 1)6768/* Kinds of SurfaceNotify events: */69#define AppleDRISurfaceNotifyChanged 070#define AppleDRISurfaceNotifyDestroyed 17172#ifndef _APPLEDRI_SERVER_7374typedef struct75{76int type; /* of event */77unsigned long serial; /* # of last request processed by server */78Bool send_event; /* true if this came frome a SendEvent request */79Display *display; /* Display the event was read from */80Window window; /* window of event */81Time time; /* server timestamp when event happened */82int kind; /* subtype of event */83int arg;84} XAppleDRINotifyEvent;8586_XFUNCPROTOBEGIN87Bool XAppleDRIQueryExtension(Display * dpy, int *event_base,88int *error_base);8990Bool XAppleDRIQueryVersion(Display * dpy, int *majorVersion,91int *minorVersion, int *patchVersion);9293Bool XAppleDRIQueryDirectRenderingCapable(Display * dpy, int screen,94Bool * isCapable);9596void *XAppleDRISetSurfaceNotifyHandler(void (*fun) (Display * dpy,97unsigned uid, int kind));9899Bool XAppleDRIAuthConnection(Display * dpy, int screen, unsigned int magic);100101Bool XAppleDRICreateSurface(Display * dpy, int screen, Drawable drawable,102unsigned int client_id, unsigned int key[2],103unsigned int *uid);104105Bool XAppleDRIDestroySurface(Display * dpy, int screen, Drawable drawable);106107Bool XAppleDRISynchronizeSurfaces(Display * dpy);108109Bool XAppleDRICreateSharedBuffer(Display * dpy, int screen, Drawable drawable,110Bool doubleSwap, char *path, size_t pathlen,111int *width, int *height);112113Bool XAppleDRISwapBuffers(Display * dpy, int screen, Drawable drawable);114115Bool XAppleDRICreatePixmap(Display * dpy, int screen, Drawable drawable,116int *width, int *height, int *pitch, int *bpp,117size_t * size, char *bufname, size_t bufnamesize);118119Bool XAppleDRIDestroyPixmap(Display * dpy, Pixmap pixmap);120121_XFUNCPROTOEND122#endif /* _APPLEDRI_SERVER_ */123#endif /* _APPLEDRI_H_ */124125126