Merge branch 'mesa_7_6_branch'
[mesa.git] / src / egl / main / egldriver.h
index df0eb7fc4cbc706d70fb4a05789417f3b03b5518..6c848eb35eab5f2fe72d7bd08c936ff5c68c8861 100644 (file)
@@ -4,19 +4,6 @@
 
 #include "egltypedefs.h"
 #include "eglapi.h"
-#include "egldefines.h"
-
-
-/**
- * Optional EGL extensions info.
- */
-struct _egl_extensions
-{
-   EGLBoolean MESA_screen_surface;
-   EGLBoolean MESA_copy_context;
-
-   char String[_EGL_MAX_EXTENSIONS_LEN];
-};
 
 
 /**
@@ -24,36 +11,37 @@ struct _egl_extensions
  */
 struct _egl_driver
 {
-   EGLBoolean Initialized; /**< set by driver after initialized */
-
    void *LibHandle; /**< dlopen handle */
+   const char *Path;  /**< path to this driver */
+   const char *Args;  /**< args to load this driver */
 
-   _EGLDisplay *Display;
-
-   int APImajor, APIminor; /**< as returned by eglInitialize() */
-   char Version[10];       /**< initialized from APImajor/minor */
-
-   const char *ClientAPIs;
+   const char *Name;  /**< name of this driver */
+   /**< probe a display to see if it is supported */
+   EGLBoolean (*Probe)(_EGLDriver *drv, _EGLDisplay *dpy);
+   /**< called before dlclose to release this driver */
+   void (*Unload)(_EGLDriver *drv);
 
    _EGLAPI API;  /**< EGL API dispatch table */
-
-   _EGLExtensions Extensions;
 };
 
 
-extern _EGLDriver *_eglMain(_EGLDisplay *dpy, const char *args);
+extern _EGLDriver *_eglMain(const char *args);
 
 
 extern const char *
-_eglChooseDriver(_EGLDisplay *dpy);
+_eglPreloadDriver(_EGLDisplay *dpy);
 
 
 extern _EGLDriver *
-_eglOpenDriver(_EGLDisplay *dpy, const char *driverName, const char *args);
+_eglOpenDriver(_EGLDisplay *dpy);
 
 
 extern EGLBoolean
-_eglCloseDriver(_EGLDriver *drv, EGLDisplay dpy);
+_eglCloseDriver(_EGLDriver *drv, _EGLDisplay *dpy);
+
+
+void
+_eglUnloadDrivers(void);
 
 
 extern _EGLDriver *
@@ -64,4 +52,8 @@ extern void
 _eglInitDriverFallbacks(_EGLDriver *drv);
 
 
+extern EGLint
+_eglFindAPIs(void);
+
+
 #endif /* EGLDRIVER_INCLUDED */