📄 mainmenu.c
字号:
SetLeftSoftkeyFunction(makecallmalataphone, KEY_EVENT_UP);
SetKeyHandler(makecallmalataphone, KEY_SEND, KEY_EVENT_DOWN);
//gqy add begin 20070712
#ifdef __MALATA_STANDARD_441_MEMU__
SetCenterSoftkeyFunction(makecallmalataphone, KEY_EVENT_UP);
#endif
//gqy add end 20070712
#if defined(__MMI_VERSION_2__) && !defined(__MMI_MESSAGES_CLUB__)
SetRightSoftkeyFunction(handle_mainmenu_right_softkey_up, KEY_EVENT_UP);
#else /* defined(__MMI_VERSION_2__) && !defined(__MMI_MESSAGES_CLUB__) */
SetKeyHandler(makecallmalataphone, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
#endif /* defined(__MMI_VERSION_2__) && !defined(__MMI_MESSAGES_CLUB__) */
}
void makecallmalataphoneWeb(void)
{
char url[40];
U8 *guiBuffer;
S8 input_string[80];
strcpy((char*) url, "http://www.malatamobile.com");
AnsiiToUnicodeString((PS8) input_string, (PS8) url);
//mmi_frm_sms_startup_wap_browser_req(2,url);
EntryNewScreen(SCR_ASSISTANT_MALATA_SERVICE_WEB, NULL,makecallmalataphoneWeb , NULL); // zrx del 20070208
guiBuffer = GetCurrGuiBuffer(SCR_ASSISTANT_MALATA_SERVICE_WEB);
ShowCategory74Screen(MAIN_MENU_MALATA_SERVICE_WEB, 0, 0,0,
STR_GLOBAL_BACK,IMG_GLOBAL_BACK,
(PU8)input_string,strlen(input_string), NULL);
SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
}
void highlight_mainmenu_malata_service_web(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
/* 030705 Calvin modified */
#ifdef __MMI_MATRIX_MAIN_MENU_FULL_BACKGROUND__
if (inMatrixNoTitleFlag)
{
ChangeLeftSoftkeyByStringLength(MMI_highlighted_item_text, NULL);
ChangeRightSoftkeyByStringLength((UI_string_type) GetString(STR_GLOBAL_BACK), (PU8) GetImage(IMG_GLOBAL_BACK));
}
else /* 041105 Calvin added */
{
ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
}
#else /* __MMI_MATRIX_MAIN_MENU_FULL_BACKGROUND__ */
ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
#endif /* __MMI_MATRIX_MAIN_MENU_FULL_BACKGROUND__ */
SetLeftSoftkeyFunction(makecallmalataphoneWeb, KEY_EVENT_UP);
SetKeyHandler(makecallmalataphoneWeb, KEY_WAP, KEY_EVENT_DOWN);
//gqy add begin 20070712
#ifdef __MALATA_STANDARD_441_MEMU__
SetCenterSoftkeyFunction(makecallmalataphoneWeb, KEY_EVENT_UP);
#endif
//gqy add end 20070712
#if defined(__MMI_VERSION_2__) && !defined(__MMI_MESSAGES_CLUB__)
SetRightSoftkeyFunction(handle_mainmenu_right_softkey_up, KEY_EVENT_UP);
#else /* defined(__MMI_VERSION_2__) && !defined(__MMI_MESSAGES_CLUB__) */
SetKeyHandler(makecallmalataphoneWeb, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
#endif /* defined(__MMI_VERSION_2__) && !defined(__MMI_MESSAGES_CLUB__) */
}
void HintMalataserviceOnline(U16 index)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
S8 string_out[20];
S8 input_string[(MAX_DIGITS_USSD * ENCODING_LENGTH)];
memset((PS8) hintData[index], 0, sizeof(hintData[index]));
memset(string_out,0,sizeof(string_out));
memset(input_string,0,sizeof(input_string));
strcpy((S8*) string_out, "95105928");
AnsiiToUnicodeString((PS8) input_string, (PS8) string_out);
pfnUnicodeStrncpy((S8*) hintData[index], (S8*)input_string, pfnUnicodeStrlen(input_string));
return;
}
//end add by luo ren 2007/06/01
/*****************************************************************************
* FUNCTION
* highlight_mainmenu_connection
* DESCRIPTION
* Associate the key handler
* with left and rt soft key
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void highlight_mainmenu_connection(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
/* 030705 Calvin modified */
#ifdef __MMI_MATRIX_MAIN_MENU_FULL_BACKGROUND__
if (inMatrixNoTitleFlag)
{
ChangeLeftSoftkeyByStringLength(MMI_highlighted_item_text, NULL);
ChangeRightSoftkeyByStringLength((UI_string_type) GetString(STR_GLOBAL_BACK), (PU8) GetImage(IMG_GLOBAL_BACK));
}
else /* 041105 Calvin added */
{
ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
}
#else /* __MMI_MATRIX_MAIN_MENU_FULL_BACKGROUND__ */
ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
#endif /* __MMI_MATRIX_MAIN_MENU_FULL_BACKGROUND__ */
SetLeftSoftkeyFunction(EntryMainConnection, KEY_EVENT_UP);
//gqy add begin 20070712
#ifdef __MALATA_STANDARD_441_MEMU__
SetCenterSoftkeyFunction(EntryMainConnection, KEY_EVENT_UP);
#endif
//gqy add end 20070712
#if defined(__MMI_VERSION_2__) && !defined(__MMI_MESSAGES_CLUB__)
SetRightSoftkeyFunction(handle_mainmenu_right_softkey_up, KEY_EVENT_UP);
#else /* defined(__MMI_VERSION_2__) && !defined(__MMI_MESSAGES_CLUB__) */
SetKeyHandler(EntryMainConnection, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
#endif /* defined(__MMI_VERSION_2__) && !defined(__MMI_MESSAGES_CLUB__) */
}
#endif /* __MALATA_STANDARD_4X4_MEMU__ */
//zx add end 20070507
/*****************************************************************************
* FUNCTION
* highlight_mainmenu_services
* DESCRIPTION
* Associate the key handler
* with left and rt soft key
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void highlight_mainmenu_services(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
/* 030705 Calvin modified */
#ifdef __MMI_MATRIX_MAIN_MENU_FULL_BACKGROUND__
if (inMatrixNoTitleFlag)
{
ChangeLeftSoftkeyByStringLength(MMI_highlighted_item_text, NULL);
ChangeRightSoftkeyByStringLength((UI_string_type) GetString(STR_GLOBAL_BACK), (PU8) GetImage(IMG_GLOBAL_BACK));
}
else /* 041105 Calvin added */
{
ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
}
#else /* __MMI_MATRIX_MAIN_MENU_FULL_BACKGROUND__ */
ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
#endif /* __MMI_MATRIX_MAIN_MENU_FULL_BACKGROUND__ */
/* micha1223 */
#ifdef __MMI_MERGE_SAT_TO_MAINMENU__
/* micha1217 */
#ifndef WAP_SUPPORT
/* micha0601 */
if (IsSATPresent())
{
SetLeftSoftkeyFunction(GoToSATMainMenu, KEY_EVENT_UP);
//gqy add begin 20070712
#ifdef __MALATA_STANDARD_441_MEMU__
SetCenterSoftkeyFunction(GoToSATMainMenu, KEY_EVENT_UP);
#endif
//gqy add end 20070712
}
else
{
SetLeftSoftkeyFunction(GoToServicesMenu, KEY_EVENT_UP);
//gqy add begin 20070712
#ifdef __MALATA_STANDARD_441_MEMU__
SetCenterSoftkeyFunction(GoToSATMainMenu, KEY_EVENT_UP);
#endif
//gqy add end 20070712
}
#else /* WAP_SUPPORT */
SetLeftSoftkeyFunction(GoToServicesMenu, KEY_EVENT_UP);
//gqy add begin 20070712
#ifdef __MALATA_STANDARD_441_MEMU__
SetCenterSoftkeyFunction(GoToSATMainMenu, KEY_EVENT_UP);
#endif
//gqy add end 20070712
#endif /* WAP_SUPPORT */
#else /* __MMI_MERGE_SAT_TO_MAINMENU__ */
SetLeftSoftkeyFunction(GoToServicesMenu, KEY_EVENT_UP);
//gqy add begin 20070712
#ifdef __MALATA_STANDARD_441_MEMU__
SetCenterSoftkeyFunction(GoToSATMainMenu, KEY_EVENT_UP);
#endif
//gqy add end 20070712
#endif /* __MMI_MERGE_SAT_TO_MAINMENU__ */
SetRightSoftkeyFunction(handle_mainmenu_right_softkey_up, KEY_EVENT_UP);
}
/*****************************************************************************
* FUNCTION
* initalize_main_menu_application
* DESCRIPTION
* Set all highlte handler for main menu
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void initalize_main_menu_application(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
//zx del begin 20070404
#ifndef __MMI_MAIN_MENU_3X3_MATRIX__
SetHiliteHandler(MAIN_MENU_PROFILES_MENUID, highlight_mainmenu_profiles);
#endif
//zx del end
SetHiliteHandler(MAIN_MENU_PHONEBOOK_MENUID, highlight_mainmenu_phonebook);
SetHiliteHandler(MAIN_MENU_PHONEBOOK_NO_SIM_MENUID, highlight_mainmenu_phonebook);
SetHiliteHandler(MAIN_MENU_MESSAGES_MENUID, highlight_mainmenu_messages);
SetHiliteHandler(MAIN_MENU_FUNANDGAMES_MENUID, highlight_mainmenu_funandgames);
SetHiliteHandler(MAIN_MENU_ORGANIZER_MENUID, highlight_mainmenu_organizer);
//add by liuxn begin 20070622
#ifdef __CAIVS_SUPPORT__
SetHiliteHandler(MAIN_MENU_ORGANIZER_NO_SIM_MENUID,highlight_mainmenu_organizer);
#endif
//add by liuxn end 20070622
SetHiliteHandler(MAIN_MENU_SETTINGS_MENUID, highlight_mainmenu_settings);
SetHiliteHandler(MAIN_MENU_SETTINGS_NO_SIM_MENUID, highlight_mainmenu_settings); /* diamond, 2005/12/23 Phone setup in option menu */
#ifdef __MMI_MESSAGES_CLUB__
SetHiliteHandler(MAIN_MENU_MSGCLUB_MENUID, highlight_mainmenu_msgclub);
#endif
#ifndef __DISABLE_SHORTCUTS_MENU__
//zx del begin 20070404
#ifndef __MMI_MAIN_MENU_3X3_MATRIX__
SetHiliteHandler(EXTRA_SHORTCUTS_MENUID, highlight_mainmenu_shortcuts);
#endif
//zx del end
#endif
//zx add begin 20070507
#ifdef __MALATA_STANDARD_4X4_MEMU__
SetHiliteHandler(MAIN_MENU_ASSISTANT_MENUID, highlight_mainmenu_assistant);
SetHiliteHandler(MAIN_MENU_CONNECTION_MENUID, highlight_mainmenu_connection);
//begin add by luo ren 2007/06/01
SetHiliteHandler(MAIN_MENU_MALATA_SERVICE, highlight_mainmenu_malata_service);
SetHiliteHandler(MENU_MALATA_SERVICE_ONLINE, highlight_mainmenu_malata_service_online);
SetHiliteHandler(MENU_MALATA_SERVICE_WEB, highlight_mainmenu_malata_service_web);
SetHintHandler(MENU_MALATA_SERVICE_ONLINE, HintMalataserviceOnline);
// end add by luo ren 2007/06/01
#endif
//zx add end
SetHiliteHandler(MAIN_MENU_SERVICES_MENUID, highlight_mainmenu_services);
SetHiliteHandler(MAIN_MENU_CALL_HISTORY, highlight_mainmenu_callhistory);
SetHiliteHandler(MAIN_MENU_MULTIMEDIA_MENUID, highlight_mainmenu_multimedia);
#ifdef __MMI_BI_DEGREE_MAIN_MENU_STYLE__
SetHiliteHandler(MAIN_MENU_OPTION_AVZONE_MENUID, highlight_mainmenu_avzone);
#endif
#if defined(__MMI_FILE_MANAGER__)
SetHiliteHandler(MAIN_MENU_FILE_MNGR_MENUID, highlight_mainmenu_filemngr);
#endif
#if defined(__MMI_VERSION_2__)
//zx del begin 20070404
#ifndef __MMI_MAIN_MENU_3X3_MATRIX__
SetHiliteHandler(MAIN_MENU_EXTRA_MENUID, highlight_mainmenu_extra);
#endif
//zx del end
#endif
// wangbei add start 20070712
#ifdef __MMI_MAIN_MENU_PAGE__
SetHiliteHandler(MAIN_MENU_ASSISTANTT_MENUID, highlight_mainmenu_assistantt);
#endif
// wangbei add end
mmi_frm_set_highlight_handler();
initialize_mainmenu_title_icons();
// zrx add beign 20070420
#ifdef __CAIVS_SUPPORT__
mmi_Caivs_Init();
#endif
// zrx add end
}
/*****************************************************************************
* FUNCTION
* main_menu_shortcut_executer
* DESCRIPTION
* Shortcut handler to main menu
* PARAMETERS
* index [IN]
* RETURNS
* void
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -