egl: clean-up re-org of the client API state
[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 /** Bitmask of supported APIs (EGL_xx_BIT) set by the driver during init */
37 EGLint ClientAPIsMask;
38
39 _EGLAPI API; /**< EGL API dispatch table */
40
41 _EGLExtensions Extensions;
42 };
43
44
45 extern _EGLDriver *_eglMain(_EGLDisplay *dpy, const char *args);
46
47
48 extern const char *
49 _eglChooseDriver(_EGLDisplay *dpy);
50
51
52 extern _EGLDriver *
53 _eglOpenDriver(_EGLDisplay *dpy, const char *driverName, const char *args);
54
55
56 extern EGLBoolean
57 _eglCloseDriver(_EGLDriver *drv, EGLDisplay dpy);
58
59
60 extern _EGLDriver *
61 _eglLookupDriver(EGLDisplay d);
62
63
64 extern void
65 _eglInitDriverFallbacks(_EGLDriver *drv);
66
67
68 #endif /* EGLDRIVER_INCLUDED */