amiga_imgv
view src/gfx.h @ 7:4c36d0f44aa6
lbm loading
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 29 Oct 2017 13:21:11 +0200 |
parents | a4788c959918 |
children |
line source
1 #ifndef GFX_H_
2 #define GFX_H_
4 enum {
5 GFX_HIRES = 1,
6 GFX_ILACE = 2,
7 GFX_HAM = 4,
8 GFX_DBLPF = 8
9 };
11 enum { GFX_EVLOOP_BLOCK, GFX_EVLOOP_NONBLOCK };
13 enum {
14 GFX_EV_QUIT,
15 GFX_EV_KEY,
16 GFX_EV_BUTTON,
17 GFX_EV_MOTION
18 };
20 struct gfx_event_key {
21 int type;
22 int key;
23 int pressed;
24 };
26 struct gfx_event_button {
27 int type;
28 int bn;
29 int pressed;
30 int x, y;
31 };
33 struct gfx_event_motion {
34 int type;
35 int x, y;
36 };
38 union gfx_event {
39 int type;
40 struct gfx_event_key key;
41 struct gfx_event_button button;
42 struct gfx_event_motion motion;
43 };
45 struct gfx_rect {
46 int x, y;
47 int width, height;
48 };
50 struct ham_image;
52 int gfx_init(int nbpl, unsigned int flags);
53 void gfx_shutdown(void);
55 int gfx_screen_width(void);
56 int gfx_screen_height(void);
58 void *gfx_set_framebuffer(void *fb, int width, int height);
59 void *gfx_get_framebuffer(void);
61 int get_framebuffer_width(void);
62 int get_framebuffer_height(void);
64 void gfx_begin_copperlist(void);
66 int gfx_next_event(union gfx_event *ev, int block);
68 void gfx_wait_vpos(int x);
69 void gfx_wait_vblank(void);
71 void gfx_show_image(struct ham_image *img);
73 #endif /* GFX_H_ */