sgl

view include/sgl.h @ 4:648f8604d2b2

cont. x11 module
author John Tsiombikas <nuclear@siggraph.org>
date Thu, 12 May 2011 11:04:10 +0300
parents 0c13a30be2c1
children 0570e27e5ebc
line source
1 #ifndef SGL_H_
2 #define SGL_H_
4 #define SGL_DOUBLE 1
5 #define SGL_DEPTH 2
6 #define SGL_STENCIL 4
7 #define SGL_STEREO 8
8 #define SGL_MULTISAMPLE 16
10 enum {
11 SGL_CREATE,
12 SGL_CLOSE,
13 SGL_DISPLAY,
14 SGL_RESHAPE,
15 SGL_KEYBOARD,
16 SGL_MOUSE,
17 SGL_MOTION,
18 SGL_PASSIVE,
19 SGL_IDLE,
21 SGL_NUM_CALLBACKS
22 };
24 int sgl_init(void);
25 void sgl_shutdown(void);
27 int sgl_set_video_mode(int xsz, int ysz);
28 int sgl_get_video_mode(int *xsz, int *ysz);
30 int sgl_create_window(int xsz, int ysz, unsigned int mode);
31 void sgl_close_window(int win);
33 int sgl_set_active(int id);
34 int sgl_set_title(const char *str);
36 int sgl_process_events(void);
37 int sgl_event_loop(void);
39 int sgl_push_callbacks(void);
40 int sgl_pop_callbacks(void);
41 void sgl_clear_callbacks(void);
42 void sgl_set_callback(int idx, void (*func)());
43 void (*sgl_get_callback(int idx))();
45 #endif /* SGL_H_ */