Sun compilers now support some gcc __attribute__ values
[mesa.git] / src / egl / main / egldriver.h
index e0cedb22c35977148fc6809b8423504a415ef3e7..59bd1954aa87585e09fef23e305e44ee3230c13f 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,44 +11,50 @@ 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 */
 
    const char *Name;  /**< name of this driver */
-
-   int APImajor, APIminor; /**< as returned by eglInitialize() */
-   char Version[1000];       /**< initialized from APImajor/minor, Name */
-
-   const char *ClientAPIs;
+   /**< 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);
+PUBLIC _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 *
 _eglLookupDriver(EGLDisplay d);
 
 
-extern void
+PUBLIC void
 _eglInitDriverFallbacks(_EGLDriver *drv);
 
 
+PUBLIC EGLint
+_eglFindAPIs(void);
+
+
 #endif /* EGLDRIVER_INCLUDED */