amiga_imgv

annotate src/gfx.h @ 11:3d9aaefb8ba6

interlace mode
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 30 Oct 2017 15:24:23 +0200
parents a4788c959918
children
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@3 50 struct ham_image;
nuclear@3 51
nuclear@0 52 int gfx_init(int nbpl, unsigned int flags);
nuclear@0 53 void gfx_shutdown(void);
nuclear@0 54
nuclear@0 55 int gfx_screen_width(void);
nuclear@0 56 int gfx_screen_height(void);
nuclear@0 57
nuclear@0 58 void *gfx_set_framebuffer(void *fb, int width, int height);
nuclear@0 59 void *gfx_get_framebuffer(void);
nuclear@0 60
nuclear@0 61 int get_framebuffer_width(void);
nuclear@0 62 int get_framebuffer_height(void);
nuclear@0 63
nuclear@0 64 void gfx_begin_copperlist(void);
nuclear@0 65
nuclear@0 66 int gfx_next_event(union gfx_event *ev, int block);
nuclear@0 67
nuclear@0 68 void gfx_wait_vpos(int x);
nuclear@0 69 void gfx_wait_vblank(void);
nuclear@0 70
nuclear@3 71 void gfx_show_image(struct ham_image *img);
nuclear@3 72
nuclear@0 73 #endif /* GFX_H_ */