wgui_title.h
8.42 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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
/*******************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2002
*
*******************************************************************************/
/*******************************************************************************
* Filename:
* ---------
* Wgui_title.h
*
* Project:
* --------
* MAUI
*
* Description:
* ------------
* This file is intends for title
*
* Author:
* -------
* -------
*
*==============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*==============================================================================
*******************************************************************************/
/*
* This file contains internal UI component API, and is intended to be used by category screen module only.
* It's not recommended to be included in application code directly.
* For application developers, please include category screen header files instead (e.g., wgui_categories.h).
*/
#ifndef __WGUI_TITLE_H__
#define __WGUI_TITLE_H__
#include "MMI_features.h"
#include "CustMenuRes.h"
#include "gui_config.h"
#include "wgui.h"
#include "gui_menu_shortcut.h"
#include "gui_title.h"
#include "wgui_include.h"
#define WGUI_TITLE_CHANGE_ICON 0x00000001
#define WGUI_TITLE_CHANGE_ICON2 0x00000002
#define WGUI_TITLE_CHANGE_TEXT 0x00000004
#define WGUI_TITLE_SHORTCUT_CHANGE_GOTO 0x00000001
#define WGUI_TITLE_SHORTCUT_CHANGE_PRE_GOTO 0x00000002
#define WGUI_TITLE_SHORTCUT_CHANGE_ALL (WGUI_TITLE_SHORTCUT_CHANGE_PRE_GOTO | WGUI_TITLE_SHORTCUT_CHANGE_GOTO)
extern UI_string_type MMI_title_string;
#ifndef __MMI_TITLE_BAR_NO_ICON_SHCT__
extern PU8 MMI_title_icon;
extern PU8 MMI_title_icon2;
#endif/*__MMI_TITLE_BAR_NO_ICON_SHCT__*/
extern gui_title_struct g_wgui_title_bar;
//huking
extern gui_title_struct* g_current_title;
#ifdef __MMI_VUI_ENGINE__
/*****************************************************************************
* <group dom_title_wgui_layer_property_setting>
* FUNCTION
* wgui_title_register_venus_update_screen
* DESCRIPTION
* Register the venus update screen callback function and handle
* PARAMETERS
* venus_update_screen_callback : [IN] The venus update sceen callback function
* venus_update_screen_handle : [IN] The venus update screen handle
* RETURNS
* void
*****************************************************************************/
extern void wgui_title_register_venus_update_screen(
void (*venus_update_screen_callback)(void *handle),
void *venus_update_screen_handle);
#endif /* __MMI_VUI_ENGINE__ */
/*****************************************************************************
* <group dom_title_wgui_layer_property_setting>
* FUNCTION
* wgui_title_get_string
* DESCRIPTION
* Get title's string
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
extern U8* wgui_title_get_string(void);
/*****************************************************************************
* <group dom_title_wgui_layer_property_setting>
* FUNCTION
* wgui_title_disable_menu_shortcut_display
* DESCRIPTION
* Set shortcut show or not
* PARAMETERS
* disable_displaye_menu_shortcut : [IN] Whether disable shortcut show or not
* RETURNS
* void
*****************************************************************************/
#ifndef __MMI_TITLE_BAR_NO_ICON_SHCT__
void wgui_title_disable_menu_shortcut_display(MMI_BOOL disable_displaye_menu_shortcut);
#else/*__MMI_TITLE_BAR_NO_ICON_SHCT__*/
#define wgui_title_disable_menu_shortcut_display(_arg)
#endif/*__MMI_TITLE_BAR_NO_ICON_SHCT__*/
/*****************************************************************************
* <group dom_title_wgui_layer_property_setting>
* FUNCTION
* wgui_title_set_shortcut_count
* DESCRIPTION
* Set the max number allowed in the menu shortcut
* This is based on the number of items in the menu.
* PARAMETERS
* n_items : [IN] The max number of allowed
* RETURNS
* void
* REMARKS
* This function will meansure the size of shortcut
* and according to the size of shortcut, move to the right position
*****************************************************************************/
void wgui_title_set_shortcut_count(S32 n_items);
/*****************************************************************************
* <group dom_title_wgui_layer_property_setting>
* FUNCTION
* set_menu_item_count
* DESCRIPTION
* Set the max allowed number of menu shortcut
* PARAMETERS
* n_items : [IN] The max allowed number of menu shortcut
* RETURNS
* return zero
*****************************************************************************/
#ifndef __MMI_TITLE_BAR_NO_ICON_SHCT__
S32 set_menu_item_count(S32 n_items);
#else/*__MMI_TITLE_BAR_NO_ICON_SHCT__*/
#define set_menu_item_count(_arg)
#endif/*__MMI_TITLE_BAR_NO_ICON_SHCT__*/
/*****************************************************************************
* <group dom_title_wgui_layer_basic>
* FUNCTION
* gui_redraw_menu_shortcut
* DESCRIPTION
* Redraw menu shortcut and blt out
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
#ifndef __MMI_TITLE_BAR_NO_ICON_SHCT__
void gui_redraw_menu_shortcut(void);
#else/*__MMI_TITLE_BAR_NO_ICON_SHCT__*/
#define gui_redraw_menu_shortcut()
//#define gui_redraw_menu_shortcut 0
#endif/*__MMI_TITLE_BAR_NO_ICON_SHCT__*/
/*****************************************************************************
* <group dom_title_wgui_layer_property_setting>
* FUNCTION
* wgui_title_set_no_icon_shct
* DESCRIPTION
* Set title have shortcut or not
* PARAMETERS
* no_icon_shct : [IN] Whether have shortcut or not
* RETURNS
* void
* REMARKS
* When the no_icon_shct set MMI_TRUE, the title will not show right icon and shortcut
* otherwise the one of right icon and shortcut will be showed
*****************************************************************************/
#ifndef __MMI_TITLE_BAR_NO_ICON_SHCT__
void wgui_title_set_no_icon_shct(MMI_BOOL no_icon_shct);
#else/*__MMI_TITLE_BAR_NO_ICON_SHCT__*/
#define wgui_title_set_no_icon_shct(_arg)
#endif/*__MMI_TITLE_BAR_NO_ICON_SHCT__*/
/*****************************************************************************
* <group dom_title_wgui_layer_property_setting>
* FUNCTION
* wgui_reset_disable_shortcut_display
* DESCRIPTION
* Enable shortcut display
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
#ifndef __MMI_TITLE_BAR_NO_ICON_SHCT__
void wgui_reset_disable_shortcut_display(void);
#else/*__MMI_TITLE_BAR_NO_ICON_SHCT__*/
#define wgui_reset_disable_shortcut_display()
#endif/*__MMI_TITLE_BAR_NO_ICON_SHCT__*/
#define MMI_menu_shortcut_box (g_wgui_title_bar.sc)
#ifdef __MMI_TITLE_BAR_NO_ICON_SHCT__
extern void wgui_title_change_ex(U8 *text, U32 flag);
#define wgui_title_change(icon_ID, icon2_ID, text, flag) wgui_title_change_ex(text, flag)
extern void ChangeTitleIcon_ex(void);
#define ChangeTitleIcon(i) ChangeTitleIcon_ex()
extern void ChangeTitle_ex(U8 *string);
#define ChangeTitle(img,string) ChangeTitle_ex(string);
#endif
//add by huking
extern void register_menu_shortcut_keys_and_handler(void (*f) (S32 i));
//end add by huking
#endif /* __WGUI_TITLE_H__ */