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

struct EVEPage;
struct EVEWidget;

typedef void (*eve_page_open_t) (struct EVEPage *, struct EVEPage *);
typedef void (*eve_page_close_t) (struct EVEPage *);
typedef void (*eve_page_evt_handler_t) (struct EVEPage *, struct EVEWidget *, EVETouch *, uint16_t, uint8_t, int);

typedef struct EVEPage {
    EVEView v;
    int16_t win_x;
    int16_t win_y;
    eve_page_open_t open;
    eve_page_close_t close;
    eve_page_evt_handler_t handle_evt;
    EVEWindow *window;
} EVEPage;

void eve_page_init(EVEPage *page, eve_view_touch_t touch, eve_view_draw_t draw, eve_page_open_t open, eve_page_close_t close, EVEWindow *window);
void eve_page_focus(EVEPage *page, EVERect *focus);
int eve_page_widget_visible(EVEPage *page, struct EVEWidget *widget);
void eve_page_handle_evt(EVEPage *page, struct EVEWidget *widget, EVETouch *touch, uint16_t evt, uint8_t tag0, int touch_idx);