-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp_page.h
79 lines (63 loc) · 1.38 KB
/
app_page.h
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#ifndef __APP_PAGE_H__
#define __APP_PAGE_H__
enum app_page_id
{
ID_NONE = 0,
ID_MAIN,
ID_MSG,
ID_FUNCLIST,
ID_FUNC_UPDN,
ID_FUNC_LR,
};
enum
{
EXIT_SIDE_NONE = 0,
EXIT_SIDE_LEFT,
EXIT_SIDE_RIGHT,
EXIT_SIDE_TOP,
EXIT_SIDE_BOTTOM,
};
struct app_page_ops_t
{
void (*init)(void);
void (*enter)(void);
void (*change)(void);
void (*leave)(void);
void (*deinit)(void);
};
struct app_page_data_t
{
uint8_t id;
uint32_t fblen;
uint8_t *fb;
uint16_t w;
uint16_t h;
uint16_t vir_w;
uint8_t win_loop;
int16_t hor_page;
int16_t ver_page;
int16_t hor_offset;
int16_t ver_offset;
uint16_t hor_step;
uint16_t ver_step;
uint8_t exit_side;
uint8_t win_id;
uint8_t win_layer;
rt_uint8_t format;
rt_uint32_t *lut;
rt_uint32_t lutsize;
rt_uint32_t new_lut;
rt_uint32_t hide_win;
// struct app_page_ops_t ops;
struct app_touch_cb_t *touch_cb;
struct app_page_data_t *next;
struct app_page_data_t *left;
struct app_page_data_t *right;
struct app_page_data_t *top;
struct app_page_data_t *bottom;
struct app_page_data_t *last;
void *private;
};
extern const uint8_t format2depth[RTGRAPHIC_PIXEL_FORMAT_ARGB565 + 1];
rt_err_t app_page_refresh(struct app_page_data_t *page, uint8_t page_num, uint8_t auto_resize);
#endif