|
void mmi_myapp_entry(void)
{
clear_screen();
gui_move_text_cursor(50,100);
gui_set_text_color(UI_COLOR_RED);
gui_print_text(L"Hello,World");
gui_BLT_double_buffer(0,0,UI_device_width -1,UI_device_height -1);
}[/COLOR]
void goto_main_menu(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
mmi_myapp_entry();
return;
[/COLOR]
MMI_ID_TYPE mm_stringIDs[MAX_MAIN_MENU_ITEMS];
MMI_ID_TYPE mm_iconIDs[MAX_MAIN_MENU_ITEMS];
#ifdef __MMI_BI_DEGREE_MAIN_MENU_STYLE__
MMI_ID_TYPE mm_iconID2[MAX_MAIN_MENU_ITEMS];
U16 nMenuItemList[MAX_SUB_MENUS];
#endif /* __MMI_BI_DEGREE_MAIN_MENU_STYLE__ */
U8 *history_buffer;
S32 n_items;
S32 attributes;
U8 HighlightMenu = 0;
MMI_ID_TYPE *iconList;
#ifdef __MMI_MAINMENU_STYLE_CHANGE_EN__
U8 menu_style = 0;
MMI_ID_TYPE mm_iconIDs_display[MAX_MAIN_MENU_ITEMS];
U8 i = 0;
#endif /* __MMI_MAINMENU_STYLE_CHANGE_EN__ */
#ifdef __MMI_BI_DEGREE_MAIN_MENU_STYLE__
U8 j = 0;
#endif 郁闷的很····一点半都还没n睡觉···我在MAINMENU.C中加了些蓝色的程序,但是编译总是出错,不知道我是否应该还要在其他函数定义什么,希望大家帮我,,,谢谢,,,,,郁闷hello,world
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
mmi_phb_reset_scr_id();
EntryNewScreen(MAIN_MENU_SCREENID, exit_main_menu, NULL, MMI_FULL_SCREEN);
history_buffer = GetCurrGuiBuffer(MAIN_MENU_SCREENID);
n_items = GetNumOfChild(IDLE_SCREEN_MENU_ID);
GetSequenceStringIds(IDLE_SCREEN_MENU_ID, mm_stringIDs);
GetSequenceImageIds(IDLE_SCREEN_MENU_ID, mm_iconIDs);
SetParentHandler(IDLE_SCREEN_MENU_ID);
attributes = GetDispAttributeOfItem(IDLE_SCREEN_MENU_ID);
#ifdef __MMI_BI_DEGREE_MAIN_MENU_STYLE__
GetSequenceItemIds(IDLE_SCREEN_MENU_ID, nMenuItemList);
#endif
/* MTK Leo add, for mini_tab_bar */
#ifdef __MMI_WGUI_MINI_TAB_BAR__
wgui_setup_mini_tab_bar(
MMI_content_x,
MMI_content_y,
MMI_content_width,
20,
UI_COLOR_BLACK,
UI_COLOR_RED,
UI_COLOR_GREY,
9 /* n_items */ ,
GetSeqItems(IDLE_SCREEN_MENU_ID),
NULL);
wgui_mini_tab_bar_set_flag_on(0x00000002 /* WGUI_MINI_TAB_BAR_IN_PARENT */ );
#endif /* __MMI_WGUI_MINI_TAB_BAR__ */
/* MTK Leo end */
/* RegisterHighlightHandler(main_menu_custom_highlight_handler); */
#ifdef __MMI_DEFAULT_MAIN_MENU_HIGHLIGHT_CENTER__
HighlightMenu = (n_items - 1) >> 1;
#endif /* __MMI_DEFAULT_MAIN_MENU_HIGHLIGHT_CENTER__ */
#ifdef __MMI_DEFAULT_MAIN_MENU_HIGHLIGHT_MESSAGE__
/* Specify the highlight item to the message */
HighlightMenu = (U8)GetChildMenuIDIndexByParentMenuID(IDLE_SCREEN_MENU_ID, MAIN_MENU_MESSAGES_MENUID);
#endif /* __MMI_DEFAULT_MAIN_MENU_HIGHLIGHT_MESSAGE__ */
#ifdef __MMI_MAINMENU_STYLE_CHANGE_EN__
menu_style = PhnsetGetMainMenuStyle();
switch (menu_style)
{
#ifdef __MMI_MAINMENU_MATRIX_SUPPORT__ /* 071705 Calvin added */
case PHNSET_MAINMENU_STYLE_MATRIX:
attributes = MATRIX_MENU;
for (i = 0; i < (MAIN_MENU_MATRIX_ICON_IMGBASE_MAX - MAIN_MENU_MATRIX_ICON_IMGBASE); i++)
{
/* U16 a = mm_iconIDs;
U16 b = MAIN_MENU_ICON_IMGBASE;
U16 c = MAIN_MENU_MATRIX_ICON_IMGBASE;
U16 d = ( mm_iconIDs -MAIN_MENU_ICON_IMGBASE );
U16 e = MAIN_MENU_MATRIX_ICON_IMGBASE+( mm_iconIDs -MAIN_MENU_ICON_IMGBASE );
printf( "%d %d %d %d %d ", a, b, c, d, e ); */
mm_iconIDs_display = MAIN_MENU_MATRIX_ICON_IMGBASE + (mm_iconIDs - MAIN_MENU_ICON_IMGBASE);
}
iconList = mm_iconIDs_display;
break;
#endif /* __MMI_MAINMENU_MATRIX_SUPPORT__ */
#ifdef __MMI_MAINMENU_PAGE_SUPPORT__ /* 071705 Calvin added */
case PHNSET_MAINMENU_STYLE_PAGE:
attributes = PAGE_MENU;
for (i = 0; i < (MAIN_MENU_PAGE_ICON_IMGBASE_MAX - MAIN_MENU_PAGE_ICON_IMGBASE); i++)
{
mm_iconIDs_display = MAIN_MENU_PAGE_ICON_IMGBASE + (mm_iconIDs - MAIN_MENU_ICON_IMGBASE);
}
iconList = mm_iconIDs_display;
break;
#endif /* __MMI_MAINMENU_PAGE_SUPPORT__ */
#ifdef __MMI_MAINMENU_LIST_SUPPORT__ /* 071705 Calvin added */
case PHNSET_MAINMENU_STYLE_LIST:
attributes = LIST_MENU; |
|