⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mainmenu.c

📁 MTK6226修改平台UI的文件介绍
💻 C
📖 第 1 页 / 共 5 页
字号:


/*****************************************************************************
 * FUNCTION
 *  highlight_mainmenu_msgclub
 * DESCRIPTION
 *  Associate the key handler
 *  with left and rt soft key
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void highlight_mainmenu_msgclub(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__ */ 

#ifdef __MOD_SMSAL__
    SetLeftSoftkeyFunction(mmi_msg_club_entry_level_1, KEY_EVENT_UP);   /* sms-code */
    //gqy add begin 20070712
    #ifdef __MALATA_STANDARD_441_MEMU__    
    SetCenterSoftkeyFunction(mmi_msg_club_entry_level_1, KEY_EVENT_UP);  
    #endif
    //gqy add end 20070712

#endif 
    SetRightSoftkeyFunction(handle_mainmenu_right_softkey_up, KEY_EVENT_UP);
}
#endif /* __MMI_MESSAGES_CLUB__ */ 


/*****************************************************************************
 * FUNCTION
 *  highlight_mainmenu_shortcuts
 * DESCRIPTION
 *  Associate the key handler
 *  with left and rt soft key
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
#ifndef __DISABLE_SHORTCUTS_MENU__
void highlight_mainmenu_shortcuts(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(EntryShctInMainMenu, KEY_EVENT_UP);
    //gqy add begin 20070712
    #ifdef __MALATA_STANDARD_441_MEMU__    
    SetCenterSoftkeyFunction(EntryShctInMainMenu, 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(EntryShctInMainMenu, 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 /* __DISABLE_SHORTCUTS_MENU__ */ 
// wangbei add start 20070712
  #ifdef __MMI_MAIN_MENU_PAGE__
  void highlight_mainmenu_assistantt(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(EntryMainAssistantt, KEY_EVENT_UP);

#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(EntryMainAssistantt, 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 EntryMainAssistantt(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U16 ItemList[MAX_SUB_MENUS];
    U16 ItemIcons[MAX_SUB_MENUS];
    U16 nItems;
    U8 *guiBuffer;
    U8 i = 0, j = 0;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    EntryNewScreen(SCR_ASSISTANTT, NULL, EntryMainAssistantt, NULL);

    guiBuffer = GetCurrGuiBuffer(SCR_ASSISTANTT);
    nItems = GetNumOfChild(MAIN_MENU_ASSISTANTT_MENUID);
    GetSequenceStringIds(MAIN_MENU_ASSISTANTT_MENUID, ItemList);
    GetSequenceImageIds(MAIN_MENU_ASSISTANTT_MENUID, ItemIcons);
    SetParentHandler(MAIN_MENU_ASSISTANTT_MENUID);
    RegisterHighlightHandler(ExecuteCurrHiliteHandler);

    ShowCategory52Screen(MAIN_MENU_ASSISTANTT_TEXT,NULL,
        STR_GLOBAL_OK,IMG_GLOBAL_OK,
        STR_GLOBAL_BACK,IMG_GLOBAL_BACK,
        nItems,ItemList,ItemIcons,0,0,0,guiBuffer);

    SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
    SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
}
  #endif
  // wangbei add end


//zx add begin 20070507
#ifdef __MALATA_STANDARD_4X4_MEMU__
/*****************************************************************************
 * FUNCTION
 *  highlight_mainmenu_assistant
 * DESCRIPTION
 *  Associate the key handler
 *  with left and rt soft key
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void highlight_mainmenu_assistant(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(EntryMainAssistant, KEY_EVENT_UP);
    //gqy add begin 20070712
    #ifdef __MALATA_STANDARD_441_MEMU__    
    SetCenterSoftkeyFunction(EntryMainAssistant, 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(EntryMainAssistant, 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__) */ 
}
//begin add by luo ren 2007/06/01

void EntryMainMalataService(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U16 ItemList[MAX_SUB_MENUS];
    U16 ItemIcons[MAX_SUB_MENUS];
    U16 nItems;
    U8 *guiBuffer;
    U8* PopUpList[MAX_SUB_MENUS];
    
    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    EntryNewScreen(SCR_ASSISTANT_MALATA_SERVICE, NULL, EntryMainMalataService, NULL);

    guiBuffer = GetCurrGuiBuffer(SCR_ASSISTANT_MALATA_SERVICE);
    nItems = GetNumOfChild(MAIN_MENU_MALATA_SERVICE);
    GetSequenceStringIds(MAIN_MENU_MALATA_SERVICE, ItemList);
    GetSequenceImageIds(MAIN_MENU_MALATA_SERVICE, ItemIcons);
    SetParentHandler(MAIN_MENU_MALATA_SERVICE);
    RegisterHighlightHandler(ExecuteCurrHiliteHandler);
    ConstructHintsList(MAIN_MENU_MALATA_SERVICE, PopUpList);

    ShowCategory52Screen(MAIN_MENU_MALATA_SERVICE_TEXT,MAIN_MENU_TITLE_EXTRA_APP_ICON,/*zx remark use extra icon temp*/
        STR_GLOBAL_OK,IMG_GLOBAL_OK,
        STR_GLOBAL_BACK,IMG_GLOBAL_BACK,
        nItems,ItemList,ItemIcons,PopUpList,0,0,guiBuffer);

    SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
    SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
}
void highlight_mainmenu_malata_service(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(EntryMainMalataService, KEY_EVENT_UP);
    //gqy add begin 20070712
    #ifdef __MALATA_STANDARD_441_MEMU__    
    SetCenterSoftkeyFunction(EntryMainMalataService, 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(EntryMainMalataService, 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 makecallmalataphone(void)
{
	S8 string_out[20];
	S8 input_string[(MAX_DIGITS_USSD * ENCODING_LENGTH)];
	strcpy((S8*) string_out, "95105928");
	AnsiiToUnicodeString((PS8) input_string, (PS8) string_out);
	MakeCall((PS8) input_string);

}

void highlight_mainmenu_malata_service_online(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__ */ 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -