Merge branch 'gallium-docs'
[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
8
9 /**
10 * Base class for device drivers.
11 */
12 struct _egl_driver
13 {
14 void *LibHandle; /**< dlopen handle */
15 const char *Path; /**< path to this driver */
16 const char *Args; /**< args to load this driver */
17
18 const char *Name; /**< name of this driver */
19 /**< probe a display to see if it is supported */
20 EGLBoolean (*Probe)(_EGLDriver *drv, _EGLDisplay *dpy);
21 /**< called before dlclose to release this driver */
22 void (*Unload)(_EGLDriver *drv);
23
24 _EGLAPI API; /**< EGL API dispatch table */
25 };
26
27
28 PUBLIC _EGLDriver *
29 _eglMain(const char *args);
30
31
32 extern const char *
33 _eglPreloadDriver(_EGLDisplay *dpy);
34
35
36 extern _EGLDriver *
37 _eglOpenDriver(_EGLDisplay *dpy);
38
39
40 extern EGLBoolean
41 _eglCloseDriver(_EGLDriver *drv, _EGLDisplay *dpy);
42
43
44 void
45 _eglUnloadDrivers(void);
46
47
48 extern _EGLDriver *
49 _eglLookupDriver(EGLDisplay d);
50
51
52 PUBLIC void
53 _eglInitDriverFallbacks(_EGLDriver *drv);
54
55
56 PUBLIC EGLint
57 _eglFindAPIs(void);
58
59
60 #endif /* EGLDRIVER_INCLUDED */