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

📄 mainmenu.c

📁 MTK主菜单,入口函数,显示,gui,按键的处理
💻 C
📖 第 1 页 / 共 5 页
字号:
{
    /*----------------------------------------------------------------*/
    /* 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);

#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__ */ 


/*****************************************************************************
 * 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);
    }
    else
    {
        SetLeftSoftkeyFunction(GoToServicesMenu, KEY_EVENT_UP);
    }
#else /* WAP_SUPPORT */ 
    SetLeftSoftkeyFunction(GoToServicesMenu, KEY_EVENT_UP);
#endif /* WAP_SUPPORT */ 

#else /* __MMI_MERGE_SAT_TO_MAINMENU__ */ 

    SetLeftSoftkeyFunction(GoToServicesMenu, KEY_EVENT_UP);

#endif /* __MMI_MERGE_SAT_TO_MAINMENU__ */ 

    SetRightSoftkeyFunction(handle_mainmenu_right_softkey_up, KEY_EVENT_UP);
}

#ifdef __MMI_OP01_MENU_9MATRIX__
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#ifdef __MMI_MATRIX_MAIN_MENU_FULL_BACKGROUND__
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#else /* __MMI_MATRIX_MAIN_MENU_FULL_BACKGROUND__ */ 
/* under construction !*/
/* under construction !*/
#endif /* __MMI_MATRIX_MAIN_MENU_FULL_BACKGROUND__ */ 
#ifdef WAP_SUPPORT
/* under construction !*/
#else
/* under construction !*/
#endif /* WAP_SUPPORT */ 
/* under construction !*/
#endif /* __MMI_OP01_MENU_9MATRIX__ */

#ifdef __MMI_CUSTOMER_SERVICE__
/*****************************************************************************
 * FUNCTION
 *  highlight_mainmenu_cust_service
 * DESCRIPTION
 *  
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void highlight_mainmenu_cust_services(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
#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
    {
        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(mmi_custser_entry_main_menu, KEY_EVENT_UP);
    SetRightSoftkeyFunction(handle_mainmenu_right_softkey_up, KEY_EVENT_UP);
}
#endif /* __MMI_CUSTOMER_SERVICE__ */

#ifdef __MMI_MOBILE_SERVICE__
/*****************************************************************************
 * FUNCTION
 *  highlight_mainmenu_op_service
 * DESCRIPTION
 *  
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void highlight_mainmenu_op_services(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
#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
    {
        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(mmi_optrser_entry_main_menu, KEY_EVENT_UP);
    SetRightSoftkeyFunction(handle_mainmenu_right_softkey_up, KEY_EVENT_UP);
}

#endif /* __MMI_MOBILE_SERVICE__ */

#ifdef __MMI_MY_FAVORITE__
/*****************************************************************************
 * FUNCTION
 *  highlight_mainmenu_my_favorite
 * DESCRIPTION
 *  
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void highlight_mainmenu_my_favorite(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
#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
    {
        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__ */ 

    ClearKeyHandler(KEY_LSK, KEY_EVENT_UP);
    SetLeftSoftkeyFunction(mmi_my_favorite_entry_main, KEY_EVENT_UP);
    SetRightSoftkeyFunction(handle_mainmenu_right_softkey_up, KEY_EVENT_UP);
}
#endif /* __MMI_MY_FAVORITE__ */

#ifdef __MMI_OP01_MENU_NOSIM_LIST__
/*****************************************************************************
 * FUNCTION
 *  highlight_mainmenu_multimedia_no_sim
 * DESCRIPTION
 *  Associate the key handler
 *  with left and rt soft key
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void highlight_mainmenu_multimedia_no_sim(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    
#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
    {
        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(EntryMainMultimediaNoSim, KEY_EVENT_UP);
    SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
    if (g_pwr_context.PrevScreenIndicator != ENTER_IDLE_SCR || mmi_bootup_get_active_flight_mode() != 0)
    {
        SetKeyHandler(EntryMainMultimediaNoSim, KEY_RIGHT_ARROW, KEY_EVENT_UP);
    }
}

/*****************************************************************************
 * FUNCTION
 *  highlight_mainmenu_organizer_no_sim
 * DESCRIPTION
 *  Associate the key handler
 *  with left and rt soft key
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void highlight_mainmenu_organizer_no_sim(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
#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
    {
        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(EntryOrganizerNoSim, KEY_EVENT_UP);
    SetRightSoftkeyFunction(handle_mainmenu_right_softkey_up, KEY_EVENT_UP);
   
    if (g_pwr_context.PrevScreenIndicator != ENTER_IDLE_SCR || mmi_bootup_get_active_flight_mode() != 0)
    {
        SetKeyHandler(EntryOrganizerNoSim, KEY_RIGHT_ARROW, KEY_EVENT_UP);
    }
}

#endif /* __MMI_OP01_MENU_NOSIM_LIST__ */


⌨️ 快捷键说明

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