sgl

annotate include/sgl.h @ 5:0570e27e5ebc

pretty much done with the basic functionality and GLX shit
author John Tsiombikas <nuclear@siggraph.org>
date Fri, 13 May 2011 07:49:47 +0300
parents 648f8604d2b2
children 0cb438c86b98
rev   line source
nuclear@0 1 #ifndef SGL_H_
nuclear@0 2 #define SGL_H_
nuclear@0 3
nuclear@0 4 #define SGL_DOUBLE 1
nuclear@0 5 #define SGL_DEPTH 2
nuclear@0 6 #define SGL_STENCIL 4
nuclear@0 7 #define SGL_STEREO 8
nuclear@4 8 #define SGL_MULTISAMPLE 16
nuclear@0 9
nuclear@0 10 enum {
nuclear@0 11 SGL_CREATE,
nuclear@0 12 SGL_CLOSE,
nuclear@0 13 SGL_DISPLAY,
nuclear@0 14 SGL_RESHAPE,
nuclear@0 15 SGL_KEYBOARD,
nuclear@0 16 SGL_MOUSE,
nuclear@0 17 SGL_MOTION,
nuclear@0 18 SGL_PASSIVE,
nuclear@0 19 SGL_IDLE,
nuclear@0 20
nuclear@0 21 SGL_NUM_CALLBACKS
nuclear@0 22 };
nuclear@0 23
nuclear@5 24 enum {
nuclear@5 25 SGL_LEFT_BUTTON,
nuclear@5 26 SGL_MIDDLE_BUTTON,
nuclear@5 27 SGL_RIGHT_BUTTON
nuclear@5 28 };
nuclear@5 29
nuclear@1 30 int sgl_init(void);
nuclear@5 31 void sgl_quit(void);
nuclear@1 32
nuclear@4 33 int sgl_set_video_mode(int xsz, int ysz);
nuclear@4 34 int sgl_get_video_mode(int *xsz, int *ysz);
nuclear@0 35
nuclear@4 36 int sgl_create_window(int xsz, int ysz, unsigned int mode);
nuclear@1 37 void sgl_close_window(int win);
nuclear@0 38
nuclear@4 39 int sgl_set_active(int id);
nuclear@4 40 int sgl_set_title(const char *str);
nuclear@4 41
nuclear@5 42 void sgl_redisplay(void);
nuclear@5 43 void sgl_swap_buffers(void);
nuclear@5 44
nuclear@4 45 int sgl_process_events(void);
nuclear@5 46 void sgl_event_loop(void);
nuclear@4 47
nuclear@0 48 int sgl_push_callbacks(void);
nuclear@0 49 int sgl_pop_callbacks(void);
nuclear@0 50 void sgl_clear_callbacks(void);
nuclear@4 51 void sgl_set_callback(int idx, void (*func)());
nuclear@4 52 void (*sgl_get_callback(int idx))();
nuclear@0 53
nuclear@0 54 #endif /* SGL_H_ */