diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/GL/internal/dri_interface.h | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index aaf2da8153..977a822859 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_interface.h @@ -38,9 +38,11 @@ #ifndef DRI_INTERFACE_H #define DRI_INTERFACE_H +#ifndef DRI_NEW_INTERFACE_ONLY /* FIXME: With a small amount of work, these two includes can be removed. */ #include <X11/Xlib.h> #include <GL/glx.h> +#endif #ifndef DRI_NEW_INTERFACE_ONLY #include <GL/glxint.h> @@ -65,6 +67,7 @@ typedef struct __DRIdriverRec __DRIdriver; typedef struct __DRIframebufferRec __DRIframebuffer; typedef struct __DRIversionRec __DRIversion; typedef unsigned long __DRIid; +typedef void __DRInativeDisplay; /*@}*/ @@ -72,7 +75,7 @@ typedef unsigned long __DRIid; * \name Functions provided by the driver loader. */ /*@{*/ -extern __DRIscreen *__glXFindDRIScreen(Display *dpy, int scrn); +extern __DRIscreen *__glXFindDRIScreen(__DRInativeDisplay *dpy, int scrn); /** @@ -89,7 +92,7 @@ typedef int (* PFNGLXGETINTERNALVERSIONPROC) ( void ); * * \sa __glXWindowExists, glXGetProcAddress */ -typedef Bool (* PFNGLXWINDOWEXISTSPROC) (Display *dpy, __DRIid draw); +typedef Bool (* PFNGLXWINDOWEXISTSPROC) (__DRInativeDisplay *dpy, __DRIid draw); /** * Type of a pointer to \c __glXGetUST, as returned by \c glXGetProcAddress. @@ -116,7 +119,7 @@ typedef __GLcontextModes * (* PFNGLXCREATECONTEXTMODES) ( unsigned count, * * \sa glXGetScreenDriver, glXGetProcAddress, glXGetDriverConfig */ -typedef const char * (* PFNGLXGETSCREENDRIVERPROC) (Display *dpy, int scrNum); +typedef const char * (* PFNGLXGETSCREENDRIVERPROC) (__DRInativeDisplay *dpy, int scrNum); /** * Type of a pointer to \c glXGetDriverConfig, as returned by @@ -143,7 +146,7 @@ typedef void (* PFNGLXSCRENABLEEXTENSIONPROC) ( void *psc, const char * name ); * * \sa __glXGetDrawableInfo, glXGetProcAddress */ -typedef Bool (* PFNGLXGETDRAWABLEINFOPROC) ( Display *dpy, int scrn, +typedef Bool (* PFNGLXGETDRAWABLEINFOPROC) ( __DRInativeDisplay *dpy, int scrn, __DRIid draw, unsigned int * index, unsigned int * stamp, int * x, int * y, int * width, int * height, int * numClipRects, drm_clip_rect_t ** pClipRects, @@ -157,7 +160,7 @@ typedef Bool (* PFNGLXGETDRAWABLEINFOPROC) ( Display *dpy, int scrn, */ /*@{*/ -extern void * __driCreateNewScreen( Display *dpy, int scrn, __DRIscreen *psc, +extern void * __driCreateNewScreen( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc, const __GLcontextModes * modes, const __DRIversion * ddx_version, const __DRIversion * dri_version, const __DRIversion * drm_version, const __DRIframebuffer * frame_buffer, drmAddress pSAREA, int fd, @@ -234,7 +237,7 @@ struct __DRIscreenRec { /** * Method to destroy the private DRI screen data. */ - void (*destroyScreen)(Display *dpy, int scrn, void *screenPrivate); + void (*destroyScreen)(__DRInativeDisplay *dpy, int scrn, void *screenPrivate); /** * Method to create the private DRI context data and initialize the @@ -259,14 +262,14 @@ struct __DRIscreenRec { * Method to create the private DRI drawable data and initialize the * drawable dependent methods. */ - void *(*createNewDrawable)(Display *dpy, const __GLcontextModes *modes, + void *(*createNewDrawable)(__DRInativeDisplay *dpy, const __GLcontextModes *modes, __DRIid draw, __DRIdrawable *pdraw, int renderType, const int *attrs); /** * Method to return a pointer to the DRI drawable data. */ - __DRIdrawable *(*getDrawable)(Display *dpy, __DRIid draw, + __DRIdrawable *(*getDrawable)(__DRInativeDisplay *dpy, __DRIid draw, void *drawablePrivate); /** @@ -300,13 +303,13 @@ struct __DRIscreenRec { * \since Internal API version 20030815. */ /*@{*/ - void *(*allocateMemory)(Display *dpy, int scrn, GLsizei size, + void *(*allocateMemory)(__DRInativeDisplay *dpy, int scrn, GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); - void (*freeMemory)(Display *dpy, int scrn, GLvoid *pointer); + void (*freeMemory)(__DRInativeDisplay *dpy, int scrn, GLvoid *pointer); - GLuint (*memoryOffset)(Display *dpy, int scrn, const GLvoid *pointer); + GLuint (*memoryOffset)(__DRInativeDisplay *dpy, int scrn, const GLvoid *pointer); /*@}*/ /** @@ -315,7 +318,7 @@ struct __DRIscreenRec { * * \since Internal API version 20031201. */ - void * (*createNewContext)(Display *dpy, const __GLcontextModes *modes, + void * (*createNewContext)(__DRInativeDisplay *dpy, const __GLcontextModes *modes, int render_type, void *sharedPrivate, __DRIcontext *pctx); }; @@ -328,7 +331,7 @@ struct __DRIcontextRec { /** * Method to destroy the private DRI context data. */ - void (*destroyContext)(Display *dpy, int scrn, void *contextPrivate); + void (*destroyContext)(__DRInativeDisplay *dpy, int scrn, void *contextPrivate); /** * Method to bind a DRI drawable to a DRI graphics context. @@ -399,7 +402,7 @@ struct __DRIcontextRec { * * \since Internal API version 20040415. */ - Bool (*bindContext3)(Display *dpy, int scrn, __DRIid draw, + Bool (*bindContext3)(__DRInativeDisplay *dpy, int scrn, __DRIid draw, __DRIid read, __DRIcontext *ctx); /** @@ -407,7 +410,7 @@ struct __DRIcontextRec { * * \since Internal API version 20040415. */ - Bool (*unbindContext3)(Display *dpy, int scrn, __DRIid draw, + Bool (*unbindContext3)(__DRInativeDisplay *dpy, int scrn, __DRIid draw, __DRIid read, __DRIcontext *ctx); }; @@ -421,12 +424,12 @@ struct __DRIdrawableRec { /** * Method to destroy the private DRI drawable data. */ - void (*destroyDrawable)(Display *dpy, void *drawablePrivate); + void (*destroyDrawable)(__DRInativeDisplay *dpy, void *drawablePrivate); /** * Method to swap the front and back buffers. */ - void (*swapBuffers)(Display *dpy, void *drawablePrivate); + void (*swapBuffers)(__DRInativeDisplay *dpy, void *drawablePrivate); /** * Opaque pointer to private per drawable direct rendering data. @@ -440,14 +443,14 @@ struct __DRIdrawableRec { * * \since Internal API version 20030317. */ - int (*getSBC)(Display *dpy, void *drawablePrivate, int64_t *sbc ); + int (*getSBC)(__DRInativeDisplay *dpy, void *drawablePrivate, int64_t *sbc ); /** * Wait for the SBC to be greater than or equal target_sbc. * * \since Internal API version 20030317. */ - int (*waitForSBC)( Display * dpy, void *drawablePriv, + int (*waitForSBC)( __DRInativeDisplay * dpy, void *drawablePriv, int64_t target_sbc, int64_t * msc, int64_t * sbc ); @@ -459,7 +462,7 @@ struct __DRIdrawableRec { * * \since Internal API version 20030317. */ - int (*waitForMSC)( Display * dpy, void *drawablePriv, + int (*waitForMSC)( __DRInativeDisplay * dpy, void *drawablePriv, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t * msc, int64_t * sbc ); @@ -472,7 +475,7 @@ struct __DRIdrawableRec { * * \since Internal API version 20030317. */ - int64_t (*swapBuffersMSC)(Display *dpy, void *drawablePrivate, + int64_t (*swapBuffersMSC)(__DRInativeDisplay *dpy, void *drawablePrivate, int64_t target_msc, int64_t divisor, int64_t remainder); @@ -481,14 +484,14 @@ struct __DRIdrawableRec { * * \since Internal API version 20030317. */ - int (*frameTracking)(Display *dpy, void *drawablePrivate, Bool enable); + int (*frameTracking)(__DRInativeDisplay *dpy, void *drawablePrivate, Bool enable); /** * Retrieve frame usage information. * * \since Internal API version 20030317. */ - int (*queryFrameTracking)(Display *dpy, void *drawablePrivate, + int (*queryFrameTracking)(__DRInativeDisplay *dpy, void *drawablePrivate, int64_t * sbc, int64_t * missedFrames, float * lastMissedUsage, float * usage ); |