Sun compilers now support some gcc __attribute__ values
[mesa.git] / src / egl / main / egldriver.h
index bde726e25e0fd1663fd4d5cbc0f95d049b1c083c..59bd1954aa87585e09fef23e305e44ee3230c13f 100644 (file)
@@ -5,77 +5,56 @@
 #include "egltypedefs.h"
 #include "eglapi.h"
 
-/* should probably use a dynamic-length string, but this will do */
-#define MAX_EXTENSIONS_LEN 1000
-
-
-/**
- * Optional EGL extensions info.
- */
-struct _egl_extensions
-{
-   EGLBoolean MESA_screen_surface;
-   EGLBoolean MESA_copy_context;
-
-   char String[MAX_EXTENSIONS_LEN];
-};
-
 
 /**
  * Base class for device drivers.
  */
 struct _egl_driver
 {
-   EGLBoolean Initialized; /* set by driver after initialized */
-
-   void *LibHandle; /* dlopen handle */
-
-   _EGLDisplay *Display;
-
-   int ABIversion;
-   int APImajor, APIminor; /* returned through eglInitialize */
-   const char *ClientAPIs;
+   void *LibHandle; /**< dlopen handle */
+   const char *Path;  /**< path to this driver */
+   const char *Args;  /**< args to load this driver */
 
-   _EGLAPI API;
+   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);
 
-   _EGLExtensions Extensions;
+   _EGLAPI API;  /**< EGL API dispatch table */
 };
 
 
-extern _EGLDriver *_eglMain(_EGLDisplay *dpy);
+PUBLIC _EGLDriver *
+_eglMain(const char *args);
 
 
 extern const char *
-_eglChooseDriver(_EGLDisplay *dpy);
+_eglPreloadDriver(_EGLDisplay *dpy);
 
 
 extern _EGLDriver *
-_eglOpenDriver(_EGLDisplay *dpy, const char *DriverName);
+_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);
 
 
-extern const char *
-_eglQueryString(_EGLDriver *drv, EGLDisplay dpy, EGLint name);
-
-
-extern EGLBoolean
-_eglWaitGL(_EGLDriver *drv, EGLDisplay dpy);
-
-
-extern EGLBoolean
-_eglWaitNative(_EGLDriver *drv, EGLDisplay dpy, EGLint engine);
-
+PUBLIC EGLint
+_eglFindAPIs(void);
 
 
 #endif /* EGLDRIVER_INCLUDED */