#ifndef EGLDRIVER_INCLUDED
#define EGLDRIVER_INCLUDED
#include "egltypedefs.h"
#include "eglapi.h"
#define _EGL_DRIVER_TYPECAST(drvtype, egltype, code) \
static INLINE struct drvtype *drvtype(const egltype *obj) \
{ return (struct drvtype *) code; }
#define _EGL_DRIVER_STANDARD_TYPECASTS(drvname) \
_EGL_DRIVER_TYPECAST(drvname ## _driver, _EGLDriver, obj) \
\
_EGL_DRIVER_TYPECAST(drvname ## _display, _EGLDisplay, obj->DriverData) \
_EGL_DRIVER_TYPECAST(drvname ## _context, _EGLContext, obj) \
_EGL_DRIVER_TYPECAST(drvname ## _surface, _EGLSurface, obj) \
_EGL_DRIVER_TYPECAST(drvname ## _config, _EGLConfig, obj)
typedef _EGLDriver *(*_EGLMain_t)(const char *args);
struct _egl_driver
{
void *LibHandle;
const char *Path;
const char *Args;
const char *Name;
EGLint (*Probe)(_EGLDriver *drv, _EGLDisplay *dpy);
void (*Unload)(_EGLDriver *drv);
_EGLAPI API;
};
PUBLIC _EGLDriver *
_eglMain(const char *args);
extern _EGLDriver *
_eglMatchDriver(_EGLDisplay *dpy);
extern EGLBoolean
_eglPreloadDrivers(void);
extern void
_eglUnloadDrivers(void);
PUBLIC void
_eglInitDriverFallbacks(_EGLDriver *drv);
PUBLIC void
_eglSetProbeCache(EGLint key, const void *val);
PUBLIC const void *
_eglGetProbeCache(EGLint key);
#endif