amiga_imgv

annotate 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
rev   line source
nuclear@0 1 #ifndef GFX_H_
nuclear@0 2 #define GFX_H_
nuclear@0 3
nuclear@0 4 enum {
nuclear@0 5 GFX_HIRES = 1,
nuclear@0 6 GFX_ILACE = 2,
nuclear@0 7 GFX_HAM = 4,
nuclear@0 8 GFX_DBLPF = 8
nuclear@0 9 };
nuclear@0 10
nuclear@0 11 enum { GFX_EVLOOP_BLOCK, GFX_EVLOOP_NONBLOCK };
nuclear@0 12
nuclear@0 13 enum {
nuclear@0 14 GFX_EV_QUIT,
nuclear@0 15 GFX_EV_KEY,
nuclear@0 16 GFX_EV_BUTTON,
nuclear@0 17 GFX_EV_MOTION
nuclear@0 18 };
nuclear@0 19
nuclear@0 20 struct gfx_event_key {
nuclear@0 21 int type;
nuclear@0 22 int key;
nuclear@0 23 int pressed;
nuclear@0 24 };
nuclear@0 25
nuclear@0 26 struct gfx_event_button {
nuclear@0 27 int type;
nuclear@0 28 int bn;
nuclear@0 29 int pressed;
nuclear@0 30 int x, y;
nuclear@0 31 };
nuclear@0 32
nuclear@0 33 struct gfx_event_motion {
nuclear@0 34 int type;
nuclear@0 35 int x, y;
nuclear@0 36 };
nuclear@0 37
nuclear@0 38 union gfx_event {
nuclear@0 39 int type;
nuclear@0 40 struct gfx_event_key key;
nuclear@0 41 struct gfx_event_button button;
nuclear@0 42 struct gfx_event_motion motion;
nuclear@0 43 };
nuclear@0 44
nuclear@0 45 struct gfx_rect {
nuclear@0 46 int x, y;
nuclear@0 47 int width, height;
nuclear@0 48 };
nuclear@0 49
nuclear@0 50 int gfx_init(int nbpl, unsigned int flags);
nuclear@0 51 void gfx_shutdown(void);
nuclear@0 52
nuclear@0 53 int gfx_screen_width(void);
nuclear@0 54 int gfx_screen_height(void);
nuclear@0 55
nuclear@0 56 void *gfx_set_framebuffer(void *fb, int width, int height);
nuclear@0 57 void *gfx_get_framebuffer(void);
nuclear@0 58
nuclear@0 59 int get_framebuffer_width(void);
nuclear@0 60 int get_framebuffer_height(void);
nuclear@0 61
nuclear@0 62 void gfx_begin_copperlist(void);
nuclear@0 63
nuclear@0 64 int gfx_next_event(union gfx_event *ev, int block);
nuclear@0 65
nuclear@0 66 void gfx_wait_vpos(int x);
nuclear@0 67 void gfx_wait_vblank(void);
nuclear@0 68
nuclear@0 69 #endif /* GFX_H_ */