egl: make _eglChooseDRMDriver() non-static
[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 _eglChooseDRMDriver(int card);
50
51 extern const char *
52 _eglChooseDriver(_EGLDisplay *dpy);
53
54
55 extern _EGLDriver *
56 _eglOpenDriver(_EGLDisplay *dpy, const char *driverName, const char *args);
57
58
59 extern EGLBoolean
60 _eglCloseDriver(_EGLDriver *drv, EGLDisplay dpy);
61
62
63 extern void
64 _eglSaveDriver(_EGLDriver *drv);
65
66
67 extern _EGLDriver *
68 _eglLookupDriver(EGLDisplay d);
69
70
71 extern void
72 _eglInitDriverFallbacks(_EGLDriver *drv);
73
74
75 #endif /* EGLDRIVER_INCLUDED */