/*1* Copyright © 2007,2008 Red Hat, Inc.2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and associated documentation files (the "Soft-5* ware"), to deal in the Software without restriction, including without6* limitation the rights to use, copy, modify, merge, publish, distribute,7* and/or sell copies of the Software, and to permit persons to whom the8* Software is furnished to do so, provided that the above copyright9* notice(s) and this permission notice appear in all copies of the Soft-10* ware and that both the above copyright notice(s) and this permission11* notice appear in supporting documentation.12*13* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS14* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-15* ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY16* RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN17* THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE-18* QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,19* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER20* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR-21* MANCE OF THIS SOFTWARE.22*23* Except as contained in this notice, the name of a copyright holder shall24* not be used in advertising or otherwise to promote the sale, use or25* other dealings in this Software without prior written authorization of26* the copyright holder.27*28* Authors:29* Kristian Høgsberg ([email protected])30*/3132#ifndef _DRI2_H_33#define _DRI2_H_3435#include <xf86drm.h>36#include <X11/extensions/Xfixes.h>37#include <X11/extensions/dri2tokens.h>3839typedef struct40{41unsigned int attachment;42unsigned int name;43unsigned int pitch;44unsigned int cpp;45unsigned int flags;46} DRI2Buffer;4748struct glx_screen;4950extern Bool51DRI2QueryExtension(Display * display, int *eventBase, int *errorBase);5253extern Bool54DRI2QueryVersion(Display * display, int *major, int *minor);5556extern Bool57DRI2Connect(Display * display, XID window,58char **driverName, char **deviceName);5960extern Bool61DRI2Authenticate(Display * display, XID window, drm_magic_t magic);6263extern void64DRI2CreateDrawable(Display * display, XID drawable);6566extern void67DRI2DestroyDrawable(Display * display, XID handle);6869extern DRI2Buffer*70DRI2GetBuffers(Display * dpy, XID drawable,71int *width, int *height,72unsigned int *attachments, int count,73int *outCount);7475/**76* \note77* This function is only supported with DRI2 version 1.1 or later.78*/79extern DRI2Buffer*80DRI2GetBuffersWithFormat(Display * dpy, XID drawable,81int *width, int *height,82unsigned int *attachments,83int count, int *outCount);8485extern void86DRI2CopyRegion(Display * dpy, XID drawable,87XserverRegion region,88CARD32 dest, CARD32 src);8990#endif919293