DEADSOFTWARE

menu: change videomode at runtime
[flatwaifu.git] / src / system.h
1 #ifndef SYSTEM_H_INCLUDED
2 #define SYSTEM_H_INCLUDED
4 #include "glob.h"
6 typedef struct videomode_size_t {
7 int w, h, r;
8 } videomode_size_t;
10 typedef struct videomode_t {
11 int n;
12 videomode_size_t *modes;
13 } videomode_t;
15 /* common video subsystem routines */
16 void Y_get_videomode (int *w, int *h);
17 int Y_videomode_setted (void);
18 void Y_unset_videomode (void);
19 void Y_set_fullscreen (int yes);
20 int Y_get_fullscreen (void);
22 /* hardware specific rendering */
23 int Y_set_videomode_opengl (int w, int h, int fullscreen);
24 const videomode_t *Y_get_videomode_list_opengl (int fullscreen);
25 void Y_swap_buffers (void);
27 /* software specific rendering */
28 int Y_set_videomode_software (int w, int h, int fullscreen);
29 const videomode_t *Y_get_videomode_list_software (int fullscreen);
30 void Y_get_buffer (byte **buf, int *w, int *h, int *pitch);
31 void Y_set_vga_palette (byte *vgapal);
32 void Y_repaint_rect (int x, int y, int w, int h);
33 void Y_repaint (void);
35 /* input */
36 void Y_enable_text_input (void);
37 void Y_disable_text_input (void);
39 #endif /* SYSTEM_H_INCLUDED */