summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/eve/widget/togglew.h
blob: aa5485de1849f56d95be52f4a6941dd15d42fce4 (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
25
26
27
28
#include <stdint.h>

#define EVE_TOGGLEW_MARGIN      50

struct EVEWidgetSpec;

typedef struct EVEToggleWidget {
    EVEWidget w;
    EVEFont *font;
    char *labels;
    uint8_t state;
} EVEToggleWidget;

typedef struct EVEToggleSpec {
    EVEFont *font;
    char *labels;
    uint8_t state;
} EVEToggleSpec;

void eve_togglew_init(EVEToggleWidget *widget, EVERect *g, EVEPage *page, EVEFont *font, char *labels);

int eve_togglew_create(EVEWidget *_widget, struct EVEWidgetSpec *spec, EVEPage *page);
uint8_t eve_togglew_draw(EVEWidget *_widget, uint8_t tag0);
int eve_togglew_touch(EVEWidget *_widget, EVETouch *touch, uint16_t evt);

void eve_togglew_set(EVEToggleWidget *widget);
void eve_togglew_clr(EVEToggleWidget *widget);
uint8_t eve_togglew_get(EVEToggleWidget *widget);