amiga_imgv

diff src/gfx.h @ 0:a4788c959918

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 25 Oct 2017 19:34:53 +0300
parents
children 663471a80c21
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/gfx.h	Wed Oct 25 19:34:53 2017 +0300
     1.3 @@ -0,0 +1,69 @@
     1.4 +#ifndef GFX_H_
     1.5 +#define GFX_H_
     1.6 +
     1.7 +enum {
     1.8 +	GFX_HIRES	= 1,
     1.9 +	GFX_ILACE	= 2,
    1.10 +	GFX_HAM		= 4,
    1.11 +	GFX_DBLPF	= 8
    1.12 +};
    1.13 +
    1.14 +enum { GFX_EVLOOP_BLOCK, GFX_EVLOOP_NONBLOCK };
    1.15 +
    1.16 +enum {
    1.17 +	GFX_EV_QUIT,
    1.18 +	GFX_EV_KEY,
    1.19 +	GFX_EV_BUTTON,
    1.20 +	GFX_EV_MOTION
    1.21 +};
    1.22 +
    1.23 +struct gfx_event_key {
    1.24 +	int type;
    1.25 +	int key;
    1.26 +	int pressed;
    1.27 +};
    1.28 +
    1.29 +struct gfx_event_button {
    1.30 +	int type;
    1.31 +	int bn;
    1.32 +	int pressed;
    1.33 +	int x, y;
    1.34 +};
    1.35 +
    1.36 +struct gfx_event_motion {
    1.37 +	int type;
    1.38 +	int x, y;
    1.39 +};
    1.40 +
    1.41 +union gfx_event {
    1.42 +	int type;
    1.43 +	struct gfx_event_key key;
    1.44 +	struct gfx_event_button button;
    1.45 +	struct gfx_event_motion motion;
    1.46 +};
    1.47 +
    1.48 +struct gfx_rect {
    1.49 +	int x, y;
    1.50 +	int width, height;
    1.51 +};
    1.52 +
    1.53 +int gfx_init(int nbpl, unsigned int flags);
    1.54 +void gfx_shutdown(void);
    1.55 +
    1.56 +int gfx_screen_width(void);
    1.57 +int gfx_screen_height(void);
    1.58 +
    1.59 +void *gfx_set_framebuffer(void *fb, int width, int height);
    1.60 +void *gfx_get_framebuffer(void);
    1.61 +
    1.62 +int get_framebuffer_width(void);
    1.63 +int get_framebuffer_height(void);
    1.64 +
    1.65 +void gfx_begin_copperlist(void);
    1.66 +
    1.67 +int gfx_next_event(union gfx_event *ev, int block);
    1.68 +
    1.69 +void gfx_wait_vpos(int x);
    1.70 +void gfx_wait_vblank(void);
    1.71 +
    1.72 +#endif	/* GFX_H_ */