libwallaby  v23
The wallaby standard library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
graphics.h
Go to the documentation of this file.
1 #ifndef INCLUDE_WALLABY_GRAPHICS_H_
2 #define INCLUDE_WALLABY_GRAPHICS_H_
3 
12 #include "export.h"
13 #include "vtable.h"
14 
15 #include "graphics_key_code.h"
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
28 VF EXPORT_SYM int graphics_open(int width, int height);
29 
35 
42 
48 
49 typedef enum Encoding {
50  RGB,
52 } Encoding;
53 
54 
59 VF EXPORT_SYM void graphics_blit(const unsigned char *data, int x, int y, int width, int height);
60 
65 VF EXPORT_SYM void graphics_blit_region(const unsigned char *data, int sx, int sy, int ex, int ey, int width, int height, int dx, int dy);
66 
78 VF EXPORT_SYM void graphics_blit_enc(const unsigned char *data, Encoding enc, int x, int y, int width, int height);
79 
95 VF EXPORT_SYM void graphics_blit_region_enc(const unsigned char *data, Encoding enc, int sx, int sy, int ex, int ey, int width, int height, int dx, int dy);
96 
104 VF EXPORT_SYM void graphics_fill(int r, int g, int b);
105 
113 VF EXPORT_SYM void graphics_pixel(int x, int y, int r, int g, int b);
114 
122 VF EXPORT_SYM void graphics_line(int x1, int y1, int x2, int y2, int r, int g, int b);
123 
131 VF EXPORT_SYM void graphics_circle(int cx, int cy, int radius, int r, int g, int b);
132 
140 VF EXPORT_SYM void graphics_circle_fill(int cx, int cy, int radius, int r, int g, int b);
141 
153 VF EXPORT_SYM void graphics_rectangle(int x1, int y1, int x2, int y2, int r, int g, int b);
154 
166 VF EXPORT_SYM void graphics_rectangle_fill(int x1, int y1, int x2, int y2, int r, int g, int b);
167 
175 VF EXPORT_SYM void graphics_triangle(int x1, int y1, int x2, int y2, int x3, int y3, int r, int g, int b);
176 
184 VF EXPORT_SYM void graphics_triangle_fill(int x1, int y1, int x2, int y2, int x3, int y3, int r, int g, int b);
185 
194 VF EXPORT_SYM int get_key_state(enum KeyCode key);
195 
200 VF EXPORT_SYM void get_mouse_position(int *x, int *y);
201 
208 
215 
222 
223 VFL
224 
225 #ifdef __cplusplus
226 }
227 #endif
228 
229 #endif
VF EXPORT_SYM void graphics_blit_region(const unsigned char *data, int sx, int sy, int ex, int ey, int width, int height, int dx, int dy)
VF EXPORT_SYM void get_mouse_position(int *x, int *y)
Definition: graphics.h:50
VF EXPORT_SYM void graphics_line(int x1, int y1, int x2, int y2, int r, int g, int b)
VF EXPORT_SYM void graphics_pixel(int x, int y, int r, int g, int b)
VF EXPORT_SYM int get_mouse_middle_button()
VF EXPORT_SYM void graphics_clear()
VF EXPORT_SYM void graphics_circle(int cx, int cy, int radius, int r, int g, int b)
VF EXPORT_SYM void graphics_rectangle_fill(int x1, int y1, int x2, int y2, int r, int g, int b)
VF EXPORT_SYM void graphics_fill(int r, int g, int b)
VF EXPORT_SYM int get_key_state(enum KeyCode key)
VF EXPORT_SYM void graphics_blit(const unsigned char *data, int x, int y, int width, int height)
Encoding
Definition: graphics.h:49
VF EXPORT_SYM void graphics_circle_fill(int cx, int cy, int radius, int r, int g, int b)
Definition: graphics.h:51
VF EXPORT_SYM void graphics_close()
VF EXPORT_SYM void graphics_blit_region_enc(const unsigned char *data, Encoding enc, int sx, int sy, int ex, int ey, int width, int height, int dx, int dy)
VF EXPORT_SYM void graphics_triangle(int x1, int y1, int x2, int y2, int x3, int y3, int r, int g, int b)
VF EXPORT_SYM void graphics_update()
VF EXPORT_SYM int get_mouse_right_button()
VF EXPORT_SYM void graphics_rectangle(int x1, int y1, int x2, int y2, int r, int g, int b)
#define VF
Definition: vtable.h:19
KeyCode
Definition: graphics_key_code.h:24
#define VFL
Definition: vtable.h:20
VF EXPORT_SYM void graphics_triangle_fill(int x1, int y1, int x2, int y2, int x3, int y3, int r, int g, int b)
#define EXPORT_SYM
Definition: export.h:14
VF EXPORT_SYM int get_mouse_left_button()
VF EXPORT_SYM void graphics_blit_enc(const unsigned char *data, Encoding enc, int x, int y, int width, int height)
VF EXPORT_SYM int graphics_open(int width, int height)