forked from servo/rust-glut
-
Notifications
You must be signed in to change notification settings - Fork 0
/
glut.rs
702 lines (524 loc) · 17.5 KB
/
glut.rs
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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
// Copyright 2013 The Servo Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
/* automatically generated by rust-bindgen */
use std::cast;
use std::libc::{c_int, c_uint, c_uchar, c_char};
use std::local_data;
use std::ptr::{null, to_unsafe_ptr};
/* FIXME: global variable glutStrokeRoman */
/* FIXME: global variable glutStrokeMonoRoman */
/* FIXME: global variable glutBitmap9By15 */
/* FIXME: global variable glutBitmap8By13 */
/* FIXME: global variable glutBitmapTimesRoman10 */
/* FIXME: global variable glutBitmapTimesRoman24 */
/* FIXME: global variable glutBitmapHelvetica10 */
/* FIXME: global variable glutBitmapHelvetica12 */
/* FIXME: global variable glutBitmapHelvetica18 */
pub type GLenum = i32;
pub type GLint = i32;
pub type GLfloat = f32;
pub type GLdouble = f64;
pub struct Window(c_int);
pub static DOUBLE: c_uint = 2 as c_uint;
pub static ACTIVE_SHIFT: c_int = 1;
pub static ACTIVE_CTRL: c_int = 2;
pub static ACTIVE_ALT: c_int = 4;
// mouse buttons
pub static LEFT_BUTTON: c_int = 0;
pub static MIDDLE_BUTTON: c_int = 1;
pub static RIGHT_BUTTON: c_int = 2;
// mouse button callback state
pub static MOUSE_DOWN: c_int = 0;
pub static MOUSE_UP: c_int = 1;
static WINDOW_WIDTH: GLenum = 102;
static WINDOW_HEIGHT: GLenum = 103;
#[cfg(target_os="linux")]
#[cfg(target_os="android")]
pub static HAVE_PRECISE_MOUSE_WHEEL: bool = false;
#[cfg(target_os="macos")]
pub static HAVE_PRECISE_MOUSE_WHEEL: bool = true;
pub trait DisplayCallback { fn call(&self); }
pub trait KeyboardCallback { fn call(&self, key: c_uchar, x: c_int, y: c_int); }
pub trait MouseCallback { fn call(&self, button: c_int, state: c_int, x: c_int, y: c_int); }
pub trait MotionCallback { fn call(&self, x: c_int, y: c_int); }
pub trait PassiveMotionCallback { fn call(&self, x: c_int, y: c_int); }
pub trait TimerCallback { fn call(&self); }
pub trait ReshapeCallback { fn call(&self, x: c_int, y: c_int); }
pub trait IdleCallback { fn call(&self); }
pub trait MouseWheelCallback { fn call(&self, wheel: c_int, direction: c_int, x: c_int, y: c_int); }
macro_rules! local_data_key(
($name:ident, $func:ty) => (
static $name: local_data::Key<$func> = &local_data::Key;
);
)
local_data_key!(display_tls_key, ~DisplayCallback)
local_data_key!(keyboard_tls_key, ~KeyboardCallback)
local_data_key!(mouse_tls_key, ~MouseCallback)
local_data_key!(motion_tls_key, ~MotionCallback)
local_data_key!(passive_motion_tls_key, ~PassiveMotionCallback)
local_data_key!(timer_tls_key, ~TimerCallback)
local_data_key!(reshape_tls_key, ~ReshapeCallback)
local_data_key!(idle_tls_key, ~IdleCallback)
local_data_key!(mouse_wheel_tls_key, ~MouseWheelCallback)
pub enum State {
WindowWidth,
WindowHeight
}
pub fn init() {
unsafe {
let argc = 0 as c_int;
let glut = ~"glut";
glut.to_c_str().with_ref(|command| {
let argv: (*u8, *u8) = (command as *u8, null());
let argv_p = cast::transmute(to_unsafe_ptr(&argv));
glutInit(to_unsafe_ptr(&argc), argv_p);
});
}
}
pub fn create_window(name: ~str) -> Window {
unsafe {
name.to_c_str().with_ref(|bytes| {
Window(glutCreateWindow(bytes as *c_char))
})
}
}
pub fn destroy_window(window: Window) {
unsafe {
glutDestroyWindow(*window);
}
}
pub fn set_window(window: Window) {
unsafe {
glutSetWindow(*window);
}
}
pub fn set_window_title(_window: Window, title: &str) {
unsafe {
let title = title.to_owned();
title.to_c_str().with_ref(|bytes| {
glutSetWindowTitle(bytes as *c_char);
});
}
}
pub fn reshape_window(window: Window, width: c_int, height: c_int) {
unsafe {
let current_window = glutGetWindow();
glutSetWindow(*window);
glutReshapeWindow(width, height);
glutSetWindow(current_window);
}
}
pub extern "C" fn display_callback() {
local_data::get(display_tls_key, |callback| {
callback.as_ref().map(|&ref cb| {
cb.call();
});
});
}
pub fn display_func(callback: ~DisplayCallback) {
local_data::set(display_tls_key, callback);
unsafe {
glutDisplayFunc(display_callback);
}
}
pub extern "C" fn keyboard_callback(key: c_uchar, x: c_int, y: c_int) {
local_data::get(keyboard_tls_key, |callback| {
callback.as_ref().map(|&ref cb| {
cb.call(key, x, y);
});
});
}
pub fn keyboard_func(callback: ~KeyboardCallback) {
local_data::set(keyboard_tls_key, callback);
unsafe {
glutKeyboardFunc(keyboard_callback);
}
}
pub extern "C" fn mouse_callback(button: c_int, state: c_int, x: c_int, y: c_int) {
local_data::get(mouse_tls_key, |callback| {
callback.as_ref().map(|&ref cb| {
cb.call(button, state, x, y);
});
});
}
pub fn mouse_func(callback: ~MouseCallback) {
local_data::set(mouse_tls_key, callback);
unsafe {
glutMouseFunc(mouse_callback);
}
}
pub extern "C" fn motion_callback(x: c_int, y: c_int) {
local_data::get(motion_tls_key, |callback| {
callback.as_ref().map(|&ref cb| {
cb.call(x, y);
});
});
}
pub fn motion_func(callback: ~MotionCallback) {
local_data::set(motion_tls_key, callback);
unsafe {
glutMotionFunc(motion_callback);
}
}
pub extern "C" fn passive_motion_callback(x: c_int, y: c_int) {
local_data::get(passive_motion_tls_key, |callback| {
callback.as_ref().map(|&ref cb| {
cb.call(x, y);
});
});
}
pub fn passive_motion_func(callback: ~PassiveMotionCallback) {
local_data::set(passive_motion_tls_key, callback);
unsafe {
glutPassiveMotionFunc(passive_motion_callback);
}
}
pub extern "C" fn timer_callback(_index: int) {
local_data::get(timer_tls_key, |callback| {
callback.as_ref().map(|&ref cb| {
cb.call();
});
});
}
pub fn timer_func(msecs: u32, callback: ~TimerCallback) {
local_data::set(timer_tls_key, callback);
unsafe {
glutTimerFunc(msecs, timer_callback, 0);
}
}
pub extern "C" fn reshape_callback(width: c_int, height: c_int) {
local_data::get(reshape_tls_key, |callback| {
callback.as_ref().map(|&ref cb| {
cb.call(width, height);
});
});
}
pub fn reshape_func(_window: Window, callback: ~ReshapeCallback) {
local_data::set(reshape_tls_key, callback);
unsafe {
glutReshapeFunc(reshape_callback);
}
}
pub extern "C" fn idle_callback() {
local_data::get(idle_tls_key, |callback| {
callback.as_ref().map(|&ref cb| {
cb.call();
});
});
}
pub fn idle_func(callback: ~IdleCallback) {
local_data::set(idle_tls_key, callback);
unsafe {
glutIdleFunc(idle_callback);
}
}
// Mouse wheel handling.
//
// This is not part of the standard, but it's supported by freeglut and our Mac hack.
#[cfg(target_os="linux")]
#[cfg(target_os="android")]
pub extern "C" fn mouse_wheel_callback(wheel: c_int, direction: c_int, x: c_int, y: c_int) {
local_data::get(mouse_wheel_tls_key, |callback| {
callback.as_ref().map(|&ref cb| {
cb.call(wheel, direction, x, y);
});
});
}
#[cfg(target_os="linux")]
#[cfg(target_os="android")]
pub fn mouse_wheel_func(callback: ~MouseWheelCallback) {
local_data::set(mouse_wheel_tls_key, callback);
unsafe {
glutMouseWheelFunc(mouse_wheel_callback);
}
}
#[cfg(target_os="macos")]
pub fn mouse_wheel_func(callback: ~MouseWheelCallback) {
local_data::set(mouse_wheel_tls_key, callback);
}
#[cfg(target_os="macos")]
pub fn check_loop() {
unsafe {
glutCheckLoop();
}
}
#[cfg(target_os="linux")]
#[cfg(target_os="android")]
pub fn check_loop() {
unsafe {
glutMainLoopEvent();
}
}
pub fn init_display_mode(mode: c_uint) {
unsafe {
glutInitDisplayMode(mode);
}
}
pub fn swap_buffers() {
unsafe {
glutSwapBuffers();
}
}
pub fn post_redisplay() {
unsafe {
glutPostRedisplay();
}
}
pub fn get(state: State) -> c_int {
unsafe {
let glut_state;
match state {
WindowWidth => glut_state = WINDOW_WIDTH,
WindowHeight => glut_state = WINDOW_HEIGHT
}
glutGet(glut_state)
}
}
pub fn get_modifiers() -> c_int {
unsafe {
glutGetModifiers()
}
}
pub fn init_window_size(width:uint, height:uint) {
unsafe {
glutInitWindowSize(width as c_int, height as c_int);
}
}
#[cfg(target_os="android")]
#[link(name="android-glue")]
extern {}
#[cfg(target_os="macos")]
#[link(name="GLUT", kind="framework")]
extern {
// Mac GLUT extension.
fn glutCheckLoop();
}
#[cfg(target_os="linux")]
#[link(name="glut")]
extern {}
#[cfg(target_os="linux")]
#[cfg(target_os="android")]
extern {
// freeglut extension.
fn glutMainLoopEvent();
}
extern {
pub fn glutInit(argcp: *c_int, argv: **c_char);
pub fn glutInitDisplayMode(mode: c_uint);
#[cfg(not(target_os="android"))]
pub fn glutInitDisplayString(string: *c_char);
#[cfg(not(target_os="android"))]
pub fn glutInitWindowPosition(x: c_int, y: c_int);
pub fn glutInitWindowSize(width: c_int, height: c_int);
#[cfg(not(target_os="android"))]
pub fn glutMainLoop();
pub fn glutCreateWindow(title: *c_char) -> c_int;
#[cfg(not(target_os="android"))]
pub fn glutCreateSubWindow(win: c_int, x: c_int, y: c_int, width: c_int, height: c_int) -> c_int;
pub fn glutDestroyWindow(win: c_int);
pub fn glutPostRedisplay();
#[cfg(not(target_os="android"))]
pub fn glutPostWindowRedisplay(win: c_int);
pub fn glutSwapBuffers();
pub fn glutGetWindow() -> c_int;
pub fn glutSetWindow(win: c_int);
pub fn glutSetWindowTitle(title: *c_char);
#[cfg(not(target_os="android"))]
pub fn glutSetIconTitle(title: *c_char);
#[cfg(not(target_os="android"))]
pub fn glutPositionWindow(x: c_int, y: c_int);
pub fn glutReshapeWindow(width: c_int, height: c_int);
#[cfg(not(target_os="android"))]
pub fn glutPopWindow();
#[cfg(not(target_os="android"))]
pub fn glutPushWindow();
#[cfg(not(target_os="android"))]
pub fn glutIconifyWindow();
#[cfg(not(target_os="android"))]
pub fn glutShowWindow();
#[cfg(not(target_os="android"))]
pub fn glutHideWindow();
#[cfg(not(target_os="android"))]
pub fn glutFullScreen();
#[cfg(not(target_os="android"))]
pub fn glutSetCursor(cursor: c_int);
#[cfg(not(target_os="android"))]
pub fn glutWarpPointer(x: c_int, y: c_int);
#[cfg(not(target_os="android"))]
pub fn glutEstablishOverlay();
#[cfg(not(target_os="android"))]
pub fn glutRemoveOverlay();
#[cfg(not(target_os="android"))]
pub fn glutUseLayer(layer: GLenum);
#[cfg(not(target_os="android"))]
pub fn glutPostOverlayRedisplay();
#[cfg(not(target_os="android"))]
pub fn glutPostWindowOverlayRedisplay(win: c_int);
#[cfg(not(target_os="android"))]
pub fn glutShowOverlay();
#[cfg(not(target_os="android"))]
pub fn glutHideOverlay();
#[cfg(not(target_os="android"))]
pub fn glutCreateMenu(arg1: *u8) -> c_int;
#[cfg(not(target_os="android"))]
pub fn glutDestroyMenu(menu: c_int);
#[cfg(not(target_os="android"))]
pub fn glutGetMenu() -> c_int;
#[cfg(not(target_os="android"))]
pub fn glutSetMenu(menu: c_int);
#[cfg(not(target_os="android"))]
pub fn glutAddMenuEntry(label: *c_char, value: c_int);
#[cfg(not(target_os="android"))]
pub fn glutAddSubMenu(label: *c_char, submenu: c_int);
#[cfg(not(target_os="android"))]
pub fn glutChangeToMenuEntry(item: c_int, label: *c_char, value: c_int);
#[cfg(not(target_os="android"))]
pub fn glutChangeToSubMenu(item: c_int, label: *c_char, submenu: c_int);
#[cfg(not(target_os="android"))]
pub fn glutRemoveMenuItem(item: c_int);
#[cfg(not(target_os="android"))]
pub fn glutAttachMenu(button: c_int);
#[cfg(not(target_os="android"))]
pub fn glutDetachMenu(button: c_int);
pub fn glutDisplayFunc(func: extern "C" fn());
pub fn glutReshapeFunc(func: extern "C" fn(i32, i32));
pub fn glutKeyboardFunc(func: extern "C" fn(u8, i32, i32));
pub fn glutMouseFunc(func: extern "C" fn(i32, i32, i32, i32));
#[cfg(target_os="linux")]
#[cfg(target_os="android")]
pub fn glutMouseWheelFunc(func: extern "C" fn(i32, i32, i32, i32));
pub fn glutMotionFunc(func: extern "C" fn(i32, i32));
pub fn glutPassiveMotionFunc(func: extern "C" fn(i32, i32));
#[cfg(not(target_os="android"))]
pub fn glutEntryFunc(func: *u8);
#[cfg(not(target_os="android"))]
pub fn glutVisibilityFunc(func: *u8);
pub fn glutIdleFunc(func: extern "C" fn());
pub fn glutTimerFunc(millis: c_uint, func: extern "C" fn(int), value: c_int);
#[cfg(not(target_os="android"))]
pub fn glutMenuStateFunc(func: *u8);
#[cfg(not(target_os="android"))]
pub fn glutSpecialFunc(func: *u8);
#[cfg(not(target_os="android"))]
pub fn glutSpaceballMotionFunc(func: *u8);
#[cfg(not(target_os="android"))]
pub fn glutSpaceballRotateFunc(func: *u8);
#[cfg(not(target_os="android"))]
pub fn glutSpaceballButtonFunc(func: *u8);
#[cfg(not(target_os="android"))]
pub fn glutButtonBoxFunc(func: *u8);
#[cfg(not(target_os="android"))]
pub fn glutDialsFunc(func: *u8);
#[cfg(not(target_os="android"))]
pub fn glutTabletMotionFunc(func: *u8);
#[cfg(not(target_os="android"))]
pub fn glutTabletButtonFunc(func: *u8);
#[cfg(not(target_os="android"))]
pub fn glutMenuStatusFunc(func: *u8);
#[cfg(not(target_os="android"))]
pub fn glutOverlayDisplayFunc(func: *u8);
#[cfg(not(target_os="android"))]
pub fn glutWindowStatusFunc(func: *u8);
#[cfg(not(target_os="android"))]
pub fn glutKeyboardUpFunc(func: *u8);
#[cfg(not(target_os="android"))]
pub fn glutSpecialUpFunc(func: *u8);
#[cfg(not(target_os="android"))]
pub fn glutJoystickFunc(func: *u8, pollInterval: c_int);
#[cfg(not(target_os="android"))]
pub fn glutSetColor(arg1: c_int, red: GLfloat, green: GLfloat, blue: GLfloat);
#[cfg(not(target_os="android"))]
pub fn glutGetColor(ndx: c_int, component: c_int) -> GLfloat;
#[cfg(not(target_os="android"))]
pub fn glutCopyColormap(win: c_int);
pub fn glutGet(_type: GLenum) -> c_int;
#[cfg(not(target_os="android"))]
pub fn glutDeviceGet(_type: GLenum) -> c_int;
#[cfg(not(target_os="android"))]
pub fn glutExtensionSupported(name: *c_char) -> c_int;
pub fn glutGetModifiers() -> c_int;
#[cfg(not(target_os="android"))]
pub fn glutLayerGet(_type: GLenum) -> c_int;
#[cfg(not(target_os="android"))]
pub fn glutGetProcAddress(procName: *c_char) -> *c_void;
#[cfg(not(target_os="android"))]
pub fn glutBitmapCharacter(font: *c_void, character: c_int);
#[cfg(not(target_os="android"))]
pub fn glutBitmapWidth(font: *c_void, character: c_int) -> c_int;
#[cfg(not(target_os="android"))]
pub fn glutStrokeCharacter(font: *c_void, character: c_int);
#[cfg(not(target_os="android"))]
pub fn glutStrokeWidth(font: *c_void, character: c_int) -> c_int;
#[cfg(not(target_os="android"))]
pub fn glutBitmapLength(font: *c_void, string: *c_uchar) -> c_int;
#[cfg(not(target_os="android"))]
pub fn glutStrokeLength(font: *c_void, string: *c_uchar) -> c_int;
#[cfg(not(target_os="android"))]
pub fn glutWireSphere(radius: GLdouble, slices: GLint, stacks: GLint);
#[cfg(not(target_os="android"))]
pub fn glutSolidSphere(radius: GLdouble, slices: GLint, stacks: GLint);
#[cfg(not(target_os="android"))]
pub fn glutWireCone(base: GLdouble, height: GLdouble, slices: GLint, stacks: GLint);
#[cfg(not(target_os="android"))]
pub fn glutSolidCone(base: GLdouble, height: GLdouble, slices: GLint, stacks: GLint);
#[cfg(not(target_os="android"))]
pub fn glutWireCube(size: GLdouble);
#[cfg(not(target_os="android"))]
pub fn glutSolidCube(size: GLdouble);
#[cfg(not(target_os="android"))]
pub fn glutWireTorus(innerRadius: GLdouble, outerRadius: GLdouble, sides: GLint, rings: GLint);
#[cfg(not(target_os="android"))]
pub fn glutSolidTorus(innerRadius: GLdouble, outerRadius: GLdouble, sides: GLint, rings: GLint);
#[cfg(not(target_os="android"))]
pub fn glutWireDodecahedron();
#[cfg(not(target_os="android"))]
pub fn glutSolidDodecahedron();
#[cfg(not(target_os="android"))]
pub fn glutWireTeapot(size: GLdouble);
#[cfg(not(target_os="android"))]
pub fn glutSolidTeapot(size: GLdouble);
#[cfg(not(target_os="android"))]
pub fn glutWireOctahedron();
#[cfg(not(target_os="android"))]
pub fn glutSolidOctahedron();
#[cfg(not(target_os="android"))]
pub fn glutWireTetrahedron();
#[cfg(not(target_os="android"))]
pub fn glutSolidTetrahedron();
#[cfg(not(target_os="android"))]
pub fn glutWireIcosahedron();
#[cfg(not(target_os="android"))]
pub fn glutSolidIcosahedron();
#[cfg(not(target_os="android"))]
pub fn glutVideoResizeGet(param: GLenum) -> c_int;
#[cfg(not(target_os="android"))]
pub fn glutSetupVideoResizing();
#[cfg(not(target_os="android"))]
pub fn glutStopVideoResizing();
#[cfg(not(target_os="android"))]
pub fn glutVideoResize(x: c_int, y: c_int, width: c_int, height: c_int);
#[cfg(not(target_os="android"))]
pub fn glutVideoPan(x: c_int, y: c_int, width: c_int, height: c_int);
#[cfg(not(target_os="android"))]
pub fn glutReportErrors();
#[cfg(not(target_os="android"))]
pub fn glutIgnoreKeyRepeat(ignore: c_int);
#[cfg(not(target_os="android"))]
pub fn glutSetKeyRepeat(repeatMode: c_int);
#[cfg(not(target_os="android"))]
pub fn glutForceJoystickFunc();
#[cfg(not(target_os="android"))]
pub fn glutGameModeString(string: *c_char);
#[cfg(not(target_os="android"))]
pub fn glutEnterGameMode() -> c_int;
#[cfg(not(target_os="android"))]
pub fn glutLeaveGameMode();
#[cfg(not(target_os="android"))]
pub fn glutGameModeGet(mode: GLenum) -> c_int;
}