Move all the EGL API function pointers into a new _egl_api struct.
[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 /* should probably use a dynamic-lengh string, but this will do */
9 #define MAX_EXTENSIONS_LEN 1000
10
11
12 /**
13 * Base class for device drivers.
14 */
15 struct _egl_driver
16 {
17 EGLBoolean Initialized; /* set by driver after initialized */
18
19 void *LibHandle; /* dlopen handle */
20
21 _EGLDisplay *Display;
22
23 int ABIversion;
24 int APImajor, APIminor; /* returned through eglInitialize */
25
26 _EGLAPI API;
27
28 /* Extension enable flags */
29 EGLBoolean MESA_screen_surface;
30 EGLBoolean MESA_copy_context;
31
32 /* Extensions string */
33 char Extensions[MAX_EXTENSIONS_LEN];
34 };
35
36
37 extern _EGLDriver *_eglMain(_EGLDisplay *dpy);
38
39
40 extern _EGLDriver *
41 _eglChooseDriver(EGLDisplay dpy);
42
43
44 extern _EGLDriver *
45 _eglOpenDriver(_EGLDisplay *dpy, const char *driverName);
46
47
48 extern EGLBoolean
49 _eglCloseDriver(_EGLDriver *drv, EGLDisplay dpy);
50
51
52 extern _EGLDriver *
53 _eglLookupDriver(EGLDisplay d);
54
55
56 extern void
57 _eglInitDriverFallbacks(_EGLDriver *drv);
58
59
60 extern const char *
61 _eglQueryString(_EGLDriver *drv, EGLDisplay dpy, EGLint name);
62
63
64 extern EGLBoolean
65 _eglWaitGL(_EGLDriver *drv, EGLDisplay dpy);
66
67
68 extern EGLBoolean
69 _eglWaitNative(_EGLDriver *drv, EGLDisplay dpy, EGLint engine);
70
71
72
73 #endif /* EGLDRIVER_INCLUDED */