Merge commit 'origin/7.8'
[mesa.git] / progs / egl / eglut / eglutint.h
1 #ifndef _EGLUTINT_H_
2 #define _EGLUTINT_H_
3
4 #include "EGL/egl.h"
5 #include "eglut.h"
6
7 struct eglut_window {
8 EGLConfig config;
9 EGLContext context;
10
11 /* initialized by native display */
12 struct {
13 union {
14 EGLNativeWindowType window;
15 EGLNativePixmapType pixmap;
16 EGLSurface surface; /* pbuffer or screen surface */
17 } u;
18 int width, height;
19 } native;
20
21 EGLSurface surface;
22
23 int index;
24
25 EGLUTreshapeCB reshape_cb;
26 EGLUTdisplayCB display_cb;
27 EGLUTkeyboardCB keyboard_cb;
28 EGLUTspecialCB special_cb;
29 };
30
31 struct eglut_state {
32 int api_mask;
33 int window_width, window_height;
34 const char *display_name;
35 int verbose;
36 int init_time;
37
38 EGLUTidleCB idle_cb;
39
40 int num_windows;
41
42 /* initialized by native display */
43 EGLNativeDisplayType native_dpy;
44 EGLint surface_type;
45
46 EGLDisplay dpy;
47 EGLint major, minor;
48
49 struct eglut_window *current;
50
51 int redisplay;
52 };
53
54 extern struct eglut_state *_eglut;
55
56 void
57 _eglutFatal(char *format, ...);
58
59 int
60 _eglutNow(void);
61
62 void
63 _eglutNativeInitDisplay(void);
64
65 void
66 _eglutNativeFiniDisplay(void);
67
68 void
69 _eglutNativeInitWindow(struct eglut_window *win, const char *title,
70 int x, int y, int w, int h);
71
72 void
73 _eglutNativeFiniWindow(struct eglut_window *win);
74
75 void
76 _eglutNativeEventLoop(void);
77
78 #endif /* _EGLUTINT_H_ */