amiga_imgv

view src/gfx.h @ 2:f75893a33234

hammer -> ham image converter
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 26 Oct 2017 10:04:29 +0300
parents
children 663471a80c21
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 int gfx_init(int nbpl, unsigned int flags);
51 void gfx_shutdown(void);
53 int gfx_screen_width(void);
54 int gfx_screen_height(void);
56 void *gfx_set_framebuffer(void *fb, int width, int height);
57 void *gfx_get_framebuffer(void);
59 int get_framebuffer_width(void);
60 int get_framebuffer_height(void);
62 void gfx_begin_copperlist(void);
64 int gfx_next_event(union gfx_event *ev, int block);
66 void gfx_wait_vpos(int x);
67 void gfx_wait_vblank(void);
69 #endif /* GFX_H_ */