egl: include egldefines.h
[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 _EGLDisplay *Display;
32
33 int ABIversion;
34 int APImajor, APIminor; /* returned through eglInitialize */
35 const char *ClientAPIs;
36
37 _EGLAPI API;
38
39 _EGLExtensions Extensions;
40 };
41
42
43 extern _EGLDriver *_eglMain(_EGLDisplay *dpy, const char *args);
44
45
46 extern const char *
47 _eglChooseDriver(_EGLDisplay *dpy);
48
49
50 extern _EGLDriver *
51 _eglOpenDriver(_EGLDisplay *dpy, const char *driverName, const char *args);
52
53
54 extern EGLBoolean
55 _eglCloseDriver(_EGLDriver *drv, EGLDisplay dpy);
56
57
58 extern _EGLDriver *
59 _eglLookupDriver(EGLDisplay d);
60
61
62 extern void
63 _eglInitDriverFallbacks(_EGLDriver *drv);
64
65
66 extern const char *
67 _eglQueryString(_EGLDriver *drv, EGLDisplay dpy, EGLint name);
68
69
70 extern EGLBoolean
71 _eglWaitGL(_EGLDriver *drv, EGLDisplay dpy);
72
73
74 extern EGLBoolean
75 _eglWaitNative(_EGLDriver *drv, EGLDisplay dpy, EGLint engine);
76
77
78
79 #endif /* EGLDRIVER_INCLUDED */