egl: added Name field to _EGLDriver so a driver name string can propogate up through...
[mesa.git] / src / egl / main / egldriver.h
1 #ifndef EGLDRIVER_INCLUDED
2 #define EGLDRIVER_INCLUDED
3
4
5 #include "egltypedefs.h"
6 #include "eglapi.h"
7 #include "egldefines.h"
8
9
10 /**
11 * Optional EGL extensions info.
12 */
13 struct _egl_extensions
14 {
15 EGLBoolean MESA_screen_surface;
16 EGLBoolean MESA_copy_context;
17
18 char String[_EGL_MAX_EXTENSIONS_LEN];
19 };
20
21
22 /**
23 * Base class for device drivers.
24 */
25 struct _egl_driver
26 {
27 EGLBoolean Initialized; /**< set by driver after initialized */
28
29 void *LibHandle; /**< dlopen handle */
30
31 const char *Name; /**< name of this driver */
32
33 int APImajor, APIminor; /**< as returned by eglInitialize() */
34 char Version[1000]; /**< initialized from APImajor/minor, Name */
35
36 const char *ClientAPIs;
37
38 _EGLAPI API; /**< EGL API dispatch table */
39
40 _EGLExtensions Extensions;
41 };
42
43
44 extern _EGLDriver *_eglMain(_EGLDisplay *dpy, const char *args);
45
46
47 extern const char *
48 _eglChooseDriver(_EGLDisplay *dpy);
49
50
51 extern _EGLDriver *
52 _eglOpenDriver(_EGLDisplay *dpy, const char *driverName, const char *args);
53
54
55 extern EGLBoolean
56 _eglCloseDriver(_EGLDriver *drv, EGLDisplay dpy);
57
58
59 extern _EGLDriver *
60 _eglLookupDriver(EGLDisplay d);
61
62
63 extern void
64 _eglInitDriverFallbacks(_EGLDriver *drv);
65
66
67 #endif /* EGLDRIVER_INCLUDED */