19bd392adSmrg/* $XFree86: xc/lib/GL/dri/xf86dri.h,v 1.8 2002/10/30 12:51:25 alanh Exp $ */ 29bd392adSmrg/************************************************************************** 39bd392adSmrg 49bd392adSmrgCopyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. 59bd392adSmrgCopyright 2000 VA Linux Systems, Inc. 69bd392adSmrgAll Rights Reserved. 79bd392adSmrg 89bd392adSmrgPermission is hereby granted, free of charge, to any person obtaining a 99bd392adSmrgcopy of this software and associated documentation files (the 109bd392adSmrg"Software"), to deal in the Software without restriction, including 119bd392adSmrgwithout limitation the rights to use, copy, modify, merge, publish, 129bd392adSmrgdistribute, sub license, and/or sell copies of the Software, and to 139bd392adSmrgpermit persons to whom the Software is furnished to do so, subject to 149bd392adSmrgthe following conditions: 159bd392adSmrg 169bd392adSmrgThe above copyright notice and this permission notice (including the 179bd392adSmrgnext paragraph) shall be included in all copies or substantial portions 189bd392adSmrgof the Software. 199bd392adSmrg 209bd392adSmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 219bd392adSmrgOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 229bd392adSmrgMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 239bd392adSmrgIN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 249bd392adSmrgANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 259bd392adSmrgTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 269bd392adSmrgSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 279bd392adSmrg 289bd392adSmrg**************************************************************************/ 299bd392adSmrg 309bd392adSmrg/** 319bd392adSmrg * \file xf86dri.h 329bd392adSmrg * Protocol numbers and function prototypes for DRI X protocol. 339bd392adSmrg * 349bd392adSmrg * \author Kevin E. Martin <martin@valinux.com> 359bd392adSmrg * \author Jens Owen <jens@tungstengraphics.com> 369bd392adSmrg * \author Rickard E. (Rik) Faith <faith@valinux.com> 379bd392adSmrg */ 389bd392adSmrg 399bd392adSmrg#ifndef _XF86DRI_H_ 409bd392adSmrg#define _XF86DRI_H_ 419bd392adSmrg 429bd392adSmrg#include <X11/Xfuncproto.h> 439bd392adSmrg#include <drm/drm.h> 449bd392adSmrg 459bd392adSmrg#define X_XF86DRIQueryVersion 0 469bd392adSmrg#define X_XF86DRIQueryDirectRenderingCapable 1 479bd392adSmrg#define X_XF86DRIOpenConnection 2 489bd392adSmrg#define X_XF86DRICloseConnection 3 499bd392adSmrg#define X_XF86DRIGetClientDriverName 4 509bd392adSmrg#define X_XF86DRICreateContext 5 519bd392adSmrg#define X_XF86DRIDestroyContext 6 529bd392adSmrg#define X_XF86DRICreateDrawable 7 539bd392adSmrg#define X_XF86DRIDestroyDrawable 8 549bd392adSmrg#define X_XF86DRIGetDrawableInfo 9 559bd392adSmrg#define X_XF86DRIGetDeviceInfo 10 569bd392adSmrg#define X_XF86DRIAuthConnection 11 579bd392adSmrg#define X_XF86DRIOpenFullScreen 12 /* Deprecated */ 589bd392adSmrg#define X_XF86DRICloseFullScreen 13 /* Deprecated */ 599bd392adSmrg 609bd392adSmrg#define XF86DRINumberEvents 0 619bd392adSmrg 629bd392adSmrg#define XF86DRIClientNotLocal 0 639bd392adSmrg#define XF86DRIOperationNotSupported 1 649bd392adSmrg#define XF86DRINumberErrors (XF86DRIOperationNotSupported + 1) 659bd392adSmrg 669bd392adSmrg#ifndef _XF86DRI_SERVER_ 679bd392adSmrg 689bd392adSmrg_XFUNCPROTOBEGIN 699bd392adSmrg Bool uniDRIQueryExtension(Display * dpy, int *event_base, 709bd392adSmrg int *error_base); 719bd392adSmrg 729bd392adSmrgBool uniDRIQueryVersion(Display * dpy, int *majorVersion, int *minorVersion, 739bd392adSmrg int *patchVersion); 749bd392adSmrg 759bd392adSmrgBool uniDRIQueryDirectRenderingCapable(Display * dpy, int screen, 769bd392adSmrg Bool * isCapable); 779bd392adSmrg 789bd392adSmrgBool uniDRIOpenConnection(Display * dpy, int screen, drm_handle_t * hSAREA, 799bd392adSmrg char **busIDString); 809bd392adSmrg 819bd392adSmrgBool uniDRIAuthConnection(Display * dpy, int screen, drm_magic_t magic); 829bd392adSmrg 839bd392adSmrgBool uniDRICloseConnection(Display * dpy, int screen); 849bd392adSmrg 859bd392adSmrgBool uniDRIGetClientDriverName(Display * dpy, int screen, 869bd392adSmrg int *ddxDriverMajorVersion, int *ddxDriverMinorVersion, 879bd392adSmrg int *ddxDriverPatchVersion, char **clientDriverName); 889bd392adSmrg 899bd392adSmrgBool uniDRICreateContext(Display * dpy, int screen, Visual * visual, 909bd392adSmrg XID * ptr_to_returned_context_id, drm_context_t * hHWContext); 919bd392adSmrg 929bd392adSmrgBool uniDRICreateContextWithConfig(Display * dpy, int screen, int configID, 939bd392adSmrg XID * ptr_to_returned_context_id, drm_context_t * hHWContext); 949bd392adSmrg 959bd392adSmrgextern Bool uniDRIDestroyContext(Display * dpy, int screen, XID context_id); 969bd392adSmrg 979bd392adSmrgextern Bool uniDRICreateDrawable(Display * dpy, int screen, 989bd392adSmrg Drawable drawable, drm_drawable_t * hHWDrawable); 999bd392adSmrg 1009bd392adSmrgextern Bool uniDRIDestroyDrawable(Display * dpy, int screen, 1019bd392adSmrg Drawable drawable); 1029bd392adSmrg 1039bd392adSmrgBool uniDRIGetDrawableInfo(Display * dpy, int screen, Drawable drawable, 1049bd392adSmrg unsigned int *index, unsigned int *stamp, 1059bd392adSmrg int *X, int *Y, int *W, int *H, 1069bd392adSmrg int *numClipRects, drm_clip_rect_t ** pClipRects, 1079bd392adSmrg int *backX, int *backY, 1089bd392adSmrg int *numBackClipRects, drm_clip_rect_t ** pBackClipRects); 1099bd392adSmrg 1109bd392adSmrgBool uniDRIGetDeviceInfo(Display * dpy, int screen, 1119bd392adSmrg drm_handle_t * hFrameBuffer, int *fbOrigin, int *fbSize, 1129bd392adSmrg int *fbStride, int *devPrivateSize, void **pDevPrivate); 1139bd392adSmrg 1149bd392adSmrg_XFUNCPROTOEND 1159bd392adSmrg#endif /* _XF86DRI_SERVER_ */ 1169bd392adSmrg#endif /* _XF86DRI_H_ */ 117