forked from servo/rust-glut
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathandroid-glue.c
234 lines (230 loc) · 5.34 KB
/
android-glue.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
typedef void (*fty_glutMainLoopEvent)();
typedef void (*fty_glutInit)(int*, char**);
typedef void (*fty_glutInitDisplayMode)(int);
typedef int (*fty_glutCreateWindow)(char*);
typedef void (*fty_glutDestroyWindow)(int);
typedef void (*fty_glutPostRedisplay)();
typedef void (*fty_glutSwapBuffers)();
typedef int (*fty_glutGetWindow)();
typedef void (*fty_glutSetWindow)(int);
typedef void (*fty_glutReshapeWindow)(int ,int);
typedef void (*fty_glutDisplayFunc)(void*);
typedef void (*fty_glutReshapeFunc)(void*);
typedef void (*fty_glutKeyboardFunc)(void*);
typedef void (*fty_glutMouseFunc)(void*);
typedef void (*fty_glutMotionFunc)(void*);
typedef void (*fty_glutPassiveMotionFunc)(void*);
typedef void (*fty_glutTimerFunc)(unsigned int,void*, int);
typedef int (*fty_glutGet)(int);
typedef int (*fty_glutGetModifiers)();
typedef void (*fty_glutSetWindowTitle)(char*);
typedef void (*fty_glutIdleFunc)(void*);
typedef void (*fty_glutInitWindowSize)(int, int);
typedef void (*fty_glutMouseWheelFunc)(void*);
fty_glutMainLoopEvent fn_glutMainLoopEvent;
fty_glutInit fn_glutInit;
fty_glutInitDisplayMode fn_glutInitDisplayMode;
fty_glutCreateWindow fn_glutCreateWindow;
fty_glutDestroyWindow fn_glutDestroyWindow;
fty_glutPostRedisplay fn_glutPostRedisplay;
fty_glutSwapBuffers fn_glutSwapBuffers;
fty_glutGetWindow fn_glutGetWindow;
fty_glutSetWindow fn_glutSetWindow;
fty_glutReshapeWindow fn_glutReshapeWindow;
fty_glutDisplayFunc fn_glutDisplayFunc;
fty_glutReshapeFunc fn_glutReshapeFunc;
fty_glutKeyboardFunc fn_glutKeyboardFunc;
fty_glutMouseFunc fn_glutMouseFunc;
fty_glutMotionFunc fn_glutMotionFunc;
fty_glutPassiveMotionFunc fn_glutPassiveMotionFunc;
fty_glutTimerFunc fn_glutTimerFunc;
fty_glutGet fn_glutGet;
fty_glutGetModifiers fn_glutGetModifiers;
fty_glutSetWindowTitle fn_glutSetWindowTitle;
fty_glutIdleFunc fn_glutIdleFunc;
fty_glutInitWindowSize fn_glutInitWindowSize;
fty_glutMouseWheelFunc fn_glutMouseWheelFunc;
void reg_fn_glutMainLoopEvent(fty_glutMainLoopEvent fn)
{
fn_glutMainLoopEvent = fn;
}
void reg_fn_glutInit(fty_glutInit fn)
{
fn_glutInit = fn;
}
void reg_fn_glutInitDisplayMode(fty_glutInitDisplayMode fn)
{
fn_glutInitDisplayMode = fn;
}
void reg_fn_glutCreateWindow(fty_glutCreateWindow fn)
{
fn_glutCreateWindow = fn;
}
void reg_fn_glutDestroyWindow(fty_glutDestroyWindow fn)
{
fn_glutDestroyWindow = fn;
}
void reg_fn_glutPostRedisplay(fty_glutPostRedisplay fn)
{
fn_glutPostRedisplay = fn;
}
void reg_fn_glutSwapBuffers(fty_glutSwapBuffers fn)
{
fn_glutSwapBuffers = fn;
}
void reg_fn_glutGetWindow(fty_glutGetWindow fn)
{
fn_glutGetWindow = fn;
}
void reg_fn_glutSetWindow(fty_glutSetWindow fn)
{
fn_glutSetWindow = fn;
}
void reg_fn_glutReshapeWindow(fty_glutReshapeWindow fn)
{
fn_glutReshapeWindow = fn;
}
void reg_fn_glutDisplayFunc(fty_glutDisplayFunc fn)
{
fn_glutDisplayFunc = fn;
}
void reg_fn_glutReshapeFunc(fty_glutReshapeFunc fn)
{
fn_glutReshapeFunc = fn;
}
void reg_fn_glutKeyboardFunc(fty_glutKeyboardFunc fn)
{
fn_glutKeyboardFunc = fn;
}
void reg_fn_glutMouseFunc(fty_glutMouseFunc fn)
{
fn_glutMouseFunc = fn;
}
void reg_fn_glutMotionFunc(fty_glutMotionFunc fn)
{
fn_glutMotionFunc = fn;
}
void reg_fn_glutPassiveMotionFunc(fty_glutPassiveMotionFunc fn)
{
fn_glutPassiveMotionFunc = fn;
}
void reg_fn_glutTimerFunc(fty_glutTimerFunc fn)
{
fn_glutTimerFunc = fn;
}
void reg_fn_glutGet(fty_glutGet fn)
{
fn_glutGet = fn;
}
void reg_fn_glutGetModifiers(fty_glutGetModifiers fn)
{
fn_glutGetModifiers = fn;
}
void reg_fn_glutSetWindowTitle(fty_glutSetWindowTitle fn)
{
fn_glutSetWindowTitle = fn;
}
void reg_fn_glutIdleFunc(fty_glutIdleFunc fn)
{
fn_glutIdleFunc = fn;
}
void reg_fn_glutInitWindowSize(fty_glutInitWindowSize fn)
{
fn_glutInitWindowSize = fn;
}
void reg_fn_glutMouseWheelFunc(fty_glutMouseWheelFunc fn)
{
fn_glutMouseWheelFunc = fn;
}
void glutMainLoopEvent()
{
fn_glutMainLoopEvent();
}
void glutInit(int* argcp, char** argv)
{
fn_glutInit(argcp, argv);
}
void glutInitDisplayMode(int mode)
{
fn_glutInitDisplayMode(mode);
}
int glutCreateWindow(char* title)
{
return fn_glutCreateWindow(title);
}
void glutDestroyWindow(int win)
{
fn_glutDestroyWindow(win);
}
void glutPostRedisplay()
{
fn_glutPostRedisplay();
}
void glutSwapBuffers()
{
fn_glutSwapBuffers();
}
int glutGetWindow()
{
return fn_glutGetWindow();
}
void glutSetWindow(int win)
{
fn_glutSetWindow(win);
}
void glutReshapeWindow(int width, int height)
{
fn_glutReshapeWindow(width, height);
}
void glutDisplayFunc(void* fn)
{
fn_glutDisplayFunc(fn);
}
void glutReshapeFunc(void* fn)
{
fn_glutReshapeFunc(fn);
}
void glutKeyboardFunc(void* fn)
{
fn_glutKeyboardFunc(fn);
}
void glutMouseFunc(void* fn)
{
fn_glutMouseFunc(fn);
}
void glutMotionFunc(void* fn)
{
fn_glutMotionFunc(fn);
}
void glutPassiveMotionFunc(void* fn)
{
fn_glutPassiveMotionFunc(fn);
}
void glutTimerFunc(unsigned int millis,void* fn, int value)
{
fn_glutTimerFunc(millis, fn, value);
}
int glutGet(int type)
{
return fn_glutGet(type);
}
int glutGetModifiers()
{
return fn_glutGetModifiers();
}
void glutSetWindowTitle(char* title)
{
fn_glutSetWindowTitle(title);
}
void glutIdleFunc(void* fn)
{
fn_glutIdleFunc(fn);
}
void glutInitWindowSize(int width, int height)
{
fn_glutInitWindowSize(width, height);
}
void glutMouseWheelFunc(void* fn)
{
fn_glutMouseWheelFunc(fn);
}