nuclear@0: #ifndef SGL_H_ nuclear@0: #define SGL_H_ nuclear@0: nuclear@0: #define SGL_DOUBLE 1 nuclear@0: #define SGL_DEPTH 2 nuclear@0: #define SGL_STENCIL 4 nuclear@0: #define SGL_STEREO 8 nuclear@4: #define SGL_MULTISAMPLE 16 nuclear@0: nuclear@0: enum { nuclear@0: SGL_CREATE, nuclear@0: SGL_CLOSE, nuclear@0: SGL_DISPLAY, nuclear@0: SGL_RESHAPE, nuclear@0: SGL_KEYBOARD, nuclear@0: SGL_MOUSE, nuclear@0: SGL_MOTION, nuclear@0: SGL_PASSIVE, nuclear@0: SGL_IDLE, nuclear@0: nuclear@0: SGL_NUM_CALLBACKS nuclear@0: }; nuclear@0: nuclear@5: enum { nuclear@5: SGL_LEFT_BUTTON, nuclear@5: SGL_MIDDLE_BUTTON, nuclear@5: SGL_RIGHT_BUTTON nuclear@5: }; nuclear@5: nuclear@1: int sgl_init(void); nuclear@5: void sgl_quit(void); nuclear@1: nuclear@4: int sgl_set_video_mode(int xsz, int ysz); nuclear@4: int sgl_get_video_mode(int *xsz, int *ysz); nuclear@0: nuclear@4: int sgl_create_window(int xsz, int ysz, unsigned int mode); nuclear@1: void sgl_close_window(int win); nuclear@0: nuclear@4: int sgl_set_active(int id); nuclear@4: int sgl_set_title(const char *str); nuclear@4: nuclear@5: void sgl_redisplay(void); nuclear@5: void sgl_swap_buffers(void); nuclear@5: nuclear@4: int sgl_process_events(void); nuclear@5: void sgl_event_loop(void); nuclear@4: nuclear@0: int sgl_push_callbacks(void); nuclear@0: int sgl_pop_callbacks(void); nuclear@0: void sgl_clear_callbacks(void); nuclear@4: void sgl_set_callback(int idx, void (*func)()); nuclear@4: void (*sgl_get_callback(int idx))(); nuclear@0: nuclear@0: #endif /* SGL_H_ */