summaryrefslogtreecommitdiff
path: root/code/fe310/eos/eve/screen/tile.h
blob: 5fea8bfe58cc24af9e30e276f58ab55e18a0e2f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <stdint.h>

struct EVECanvas;

typedef int (*eve_canvas_touch_t) (struct EVECanvas *, uint8_t, int);
typedef uint8_t (*eve_canvas_draw_t) (struct EVECanvas *, uint8_t);

typedef struct EVECanvas {
    eve_canvas_touch_t touch;
    eve_canvas_draw_t draw;
} EVECanvas;

typedef struct EVETile {
    uint16_t x;
    uint16_t y;
    uint16_t w;
    uint16_t h;
    EVECanvas *canvas;
    EVEScreen *screen;
} EVETile;

void eve_tile_init(EVETile *tile, EVEScreen *screen, uint16_t x, uint16_t y, uint16_t w, uint16_t h, EVECanvas *canvas);
void eve_tile_get_pos(EVETile *tile, uint16_t *x, uint16_t *y, uint16_t *w, uint16_t *h);
void eve_canvas_init(EVECanvas *canvas, eve_canvas_touch_t touch, eve_canvas_draw_t draw);