221b0aa52654b8c09fe42114232f015ccff737aa
[winnie] / src / gfx.h
1 #ifndef GFX_H_
2 #define GFX_H_
3
4 #include "geom.h"
5 #include "pixmap.h"
6
7 bool init_gfx();
8 void destroy_gfx();
9
10 unsigned char *get_framebuffer();
11 Pixmap *get_framebuffer_pixmap();
12
13 Rect get_screen_size();
14 int get_color_depth();
15
16 void set_clipping_rect(const Rect &clip_rect);
17 const Rect &get_clipping_rect();
18
19 void clear_screen(int r, int g, int b);
20 void fill_rect(const Rect &rect, int r, int g, int b);
21
22 void set_cursor_visibility(bool visible);
23
24 void blit(unsigned char *src_img, const Rect &src_rect, unsigned char* dest_img,
25                 const Rect &dest_rect, int dest_x, int dest_y);
26
27 void blit_key(unsigned char *src_img, const Rect &src_rect, unsigned char* dest_img,
28                 const Rect &dest_rect, int dest_x, int dest_y, int key_r, int key_g, int key_b);
29
30 void gfx_update(const Rect &rect);
31
32 void wait_vsync(); // vertical synchronization
33
34 void get_rgb_order(int *r, int *g, int *b);
35
36 #endif //GFX_H_