libwallaby  v24
The wallaby standard library
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
graphics_key_code.h
get_mouse_middle_button
VF EXPORT_SYM int get_mouse_middle_button()
graphics_pixel
VF EXPORT_SYM void graphics_pixel(int x, int y, int r, int g, int b)
graphics_line
VF EXPORT_SYM void graphics_line(int x1, int y1, int x2, int y2, int r, int g, int b)
graphics_clear
VF EXPORT_SYM void graphics_clear()
graphics_circle
VF EXPORT_SYM void graphics_circle(int cx, int cy, int radius, int r, int g, int b)
Encoding
Encoding
Definition: graphics.h:49
graphics_fill
VF EXPORT_SYM void graphics_fill(int r, int g, int b)
vtable.h
graphics_blit_region
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)
graphics_circle_fill
VF EXPORT_SYM void graphics_circle_fill(int cx, int cy, int radius, int r, int g, int b)
graphics_rectangle_fill
VF EXPORT_SYM void graphics_rectangle_fill(int x1, int y1, int x2, int y2, int r, int g, int b)
get_key_state
VF EXPORT_SYM int get_key_state(enum KeyCode key)
RGB
Definition: graphics.h:50
graphics_blit_region_enc
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)
graphics_close
VF EXPORT_SYM void graphics_close()
graphics_blit
VF EXPORT_SYM void graphics_blit(const unsigned char *data, int x, int y, int width, int height)
VFL
#define VFL
Definition: vtable.h:20
BGR
Definition: graphics.h:51
graphics_triangle
VF EXPORT_SYM void graphics_triangle(int x1, int y1, int x2, int y2, int x3, int y3, int r, int g, int b)
get_mouse_right_button
VF EXPORT_SYM int get_mouse_right_button()
KeyCode
KeyCode
Definition: graphics_key_code.h:24
graphics_rectangle
VF EXPORT_SYM void graphics_rectangle(int x1, int y1, int x2, int y2, int r, int g, int b)
graphics_update
VF EXPORT_SYM void graphics_update()
graphics_triangle_fill
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)
get_mouse_left_button
VF EXPORT_SYM int get_mouse_left_button()
EXPORT_SYM
#define EXPORT_SYM
Definition: export.h:14
VF
#define VF
Definition: vtable.h:19
graphics_open
VF EXPORT_SYM int graphics_open(int width, int height)
graphics_blit_enc
VF EXPORT_SYM void graphics_blit_enc(const unsigned char *data, Encoding enc, int x, int y, int width, int height)
get_mouse_position
VF EXPORT_SYM void get_mouse_position(int *x, int *y)
export.h