app_window.h
4.05 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
#ifndef _APP_WINDOW_H_
#define _APP_WINDOW_H_
//#include "app_sdram.h"
#include "app_nav.h"
#include "LCDdevice.h"
#if 1//simple window
#define MAX_WINDOW_DEEPTH 6
#define MAX_CDDA_LIST_ENTRY 100
#define MAX_FOLDER_DEPTH 32
#define RTC_FLASH_CONT 20
//#define RTC_VIEW_DISP_COUNT 5
#define RTC_VIEW_DISP_COUNT 10
#define DELETE_FLASH_COUNT 21
enum {
ITEM_NORMAL,
ITEM_SEPERATE,
ITEM_ENTRY,
ITEM_FOLDER,
ITEM_ARTIST,
ITEM_TITLE,
ITEM_ALBUM,
ITEM_GENRE,
ITEM_PLAYLIST_ENTRY
};
enum {
ITEM_NOT_SELECTED,
ITEM_PART_SELECTED,
ITEM_ALL_SEELECT
};
typedef struct {
U16 index; //index to string menu or to disc info
U8 attribute;
U8 status;
} WINDOW_LIST;
typedef struct {
I16 start_line;
I16 end_line;
I16 start_pos;
I16 end_pos;
} REGION;
#define MAX_WINDOW_DEEPTH 6
/*
typedef struct {
void (*draw_region) (void); //func to draw region
APP_NAV_KEY *window_key; //window key handler
U32 window_key_number; //window key number
U32 window_time; //window time
void (*time) (void); //window time fuction
} WINDOW;
*/
typedef struct {
REGION region; //window region
unsigned char const *title; //window title name
void (*draw_title) (void); //func to draw title
WINDOW_LIST *list; //list
I16 list_entry; //total list items. if 0, pease refer dynamic list
void (*draw_region) (void); //func to draw region
APP_NAV_KEY *window_key; //window key handler
U32 window_key_number; //window key number U32 window_time; //window time
U32 window_time; //window time
void (*time) (void); //window time fuction
} WINDOW;
typedef struct {
WINDOW *window; //please note, it may be const, so save sram space
I16 list_index; //first showing list entry
I16 list_cursor; //cursor pos
u8 win_state; //state for this window
u16 win_cn; //cn for this window
} APP_WINDOW;
typedef struct {
APP_WINDOW app_window[MAX_WINDOW_DEEPTH];
I16 window_index;
} APP_WINDOW_DATA;
#define WINDOW_RESERVES {0,MAX_LCD_LINE,0,MAX_LCD_POS},\
NULL,\
NULL,\
NULL,\
0\
#define KEY_TABLE(x) x, (sizeof(x)/sizeof(x[0]))
#else
#define MAX_WINDOW_DEEPTH 6
#define MAX_CDDA_LIST_ENTRY 100
#define MAX_FOLDER_DEPTH 32
#define RTC_FLASH_CONT 20
//#define RTC_VIEW_DISP_COUNT 5
#define RTC_VIEW_DISP_COUNT 10
#define DELETE_FLASH_COUNT 21
enum {
ITEM_NORMAL,
ITEM_SEPERATE,
ITEM_ENTRY,
ITEM_FOLDER,
ITEM_ARTIST,
ITEM_TITLE,
ITEM_ALBUM,
ITEM_GENRE,
ITEM_PLAYLIST_ENTRY
};
enum {
ITEM_NOT_SELECTED,
ITEM_PART_SELECTED,
ITEM_ALL_SEELECT
};
typedef struct {
U16 index; //index to string menu or to disc info
U8 attribute;
U8 status;
} WINDOW_LIST;
typedef struct {
I16 start_line;
I16 end_line;
I16 start_pos;
I16 end_pos;
} REGION;
typedef struct {
REGION region; //window region
unsigned char const *title; //window title name
void (*draw_title) (void); //func to draw title
WINDOW_LIST *list; //list
I16 list_entry; //total list items. if 0, pease refer dynamic list
void (*draw_region) (void); //func to draw region
APP_NAV_KEY *window_key; //window key handler
U32 window_time; //window time
void (*time) (void); //window time fuction
} WINDOW;
typedef struct {
WINDOW *window; //please note, it may be const, so save sram space
I16 list_index; //first showing list entry
I16 list_cursor; //cursor pos
u8 win_state; //state for this window
u16 win_cn; //cn for this window
} APP_WINDOW;
typedef struct {
U16 node;
I16 index;
I16 cursor;
} DYNAMIC_NODE;
typedef struct {
APP_WINDOW app_window[MAX_WINDOW_DEEPTH];
I16 window_index;
DYNAMIC_NODE dynamic_node [MAX_FOLDER_DEPTH];
U8 dynamic_node_index;
} APP_WINDOW_DATA;
#endif
//for different application, include different pin define
#include "..\ui\oem\app_window_oem.h"
#endif //_APP_WINDOW_H_