eglmode.h revision 6c7e0b95a4a16d268aa3ca74c5c8407779533314
1#ifndef EGLMODE_INCLUDED
2#define EGLMODE_INCLUDED
3
4#include "egltypedefs.h"
5
6
7#ifdef EGL_MESA_screen_surface
8
9
10#define EGL_NO_MODE_MESA 0
11
12
13/**
14 * Data structure which corresponds to an EGLModeMESA.
15 */
16struct _egl_mode
17{
18   EGLModeMESA Handle;     /* the public/opaque handle which names this mode */
19   EGLint Width, Height;   /* size in pixels */
20   EGLint RefreshRate;     /* rate * 1000.0 */
21   EGLint Optimal;
22   EGLint Interlaced;
23   const char *Name;
24
25   /* Other possible attributes */
26   /* interlaced */
27   /* external sync */
28};
29
30
31extern _EGLMode *
32_eglLookupMode(EGLModeMESA mode, _EGLDisplay *dpy);
33
34
35PUBLIC _EGLMode *
36_eglAddNewMode(_EGLScreen *screen, EGLint width, EGLint height,
37               EGLint refreshRate, const char *name);
38
39
40extern EGLBoolean
41_eglChooseModeMESA(_EGLDriver *drv, _EGLDisplay *dpy, _EGLScreen *scrn,
42                   const EGLint *attrib_list, EGLModeMESA *modes,
43                   EGLint modes_size, EGLint *num_modes);
44
45
46extern EGLBoolean
47_eglGetModesMESA(_EGLDriver *drv, _EGLDisplay *dpy, _EGLScreen *scrn,
48                 EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes);
49
50
51extern EGLBoolean
52_eglGetModeAttribMESA(_EGLDriver *drv, _EGLDisplay *dpy, _EGLMode *m,
53                      EGLint attribute, EGLint *value);
54
55
56extern const char *
57_eglQueryModeStringMESA(_EGLDriver *drv, _EGLDisplay *dpy, _EGLMode *m);
58
59
60#endif /* EGL_MESA_screen_surface */
61
62
63#endif /* EGLMODE_INCLUDED */
64