示例#1
0
文件: SP.c 项目: jprothwell/sc-fix
/*****************************************************************************

	FUNCTION NAME		: Draw_MobileEdenScreen

  PURPOSE	:draw Level1.
	INPUT PARAMETERS	: void
	OUTPUT PARAMETERS	: void

	RETURNS				:



                         Entry_MobileEden   Entry_SP_Level1  SP_Pre_Entry_Level2
                              |                   |             |
                              |    /Level1/       | /Level2/    |
              Mobile Paradise |        |          |    |        |
                              ->New Style World        |        |
                                                ---->Joke
                                                           -------->Request
                                                           -------->Price Explanation
                                                      ...

                           <-----              <-----
                   SP_EDEN_GoBackHistory  SP_Level1_GoBackHistory

******************************************************************************/
void Draw_MobileEdenScreen(void)
{
    U16 nStrItemList[5];
    U16 nTempStrItemList[5];
    int i = 0;
    U16 nNumofItem = 0; 	 /* Stores no of children in the submenu*/
    U8* guiBuffer = NULL;		 /* Buffer holding history data */


    mmi_trace(g_sw_SP,"niej Draw_MobileEdenScreen");

    EntryNewScreen(SCR_SP_MOBILE_EDEN, NULL, Draw_MobileEdenScreen, NULL);

    guiBuffer = GetCurrGuiBuffer(SCR_SP_MOBILE_EDEN);
    GetSequenceStringIds_Ext(MENU_ID_SP_MOBILE_EDEN,nTempStrItemList);
    /*in the submenu of MENU_ID_SP_MOBILE_EDEN,
    the first 3 items support China Telecom, the last item support China Unicom*/

    if(sp_network_name == SP_NETWORK_CU)
    {
        mmi_trace(g_sw_SP,"niej sp_network_name is SP_NETWORK_CU");
        nNumofItem = 1;
        nStrItemList[0] = nTempStrItemList[3];
        // SetLeftSoftkeyFunction(Entry_Fun_Interact_CU,KEY_EVENT_UP);
    }
    else if (sp_network_name == SP_NETWORK_CT)
    {
        mmi_trace(g_sw_SP,"niej sp_network_name is SP_NETWORK_CT nNumofItem[%d]", nNumofItem);
        nNumofItem = 3;
        for(i=0; i<nNumofItem; i++)
        {
            nStrItemList[i] = nTempStrItemList[i];
            mmi_trace(g_sw_SP,"niej nStrItemList[%d]:[%d]",i, nStrItemList[i]);
        }
        RegisterHighlightHandler(ExecuteCurrHiliteHandler);
    }
    else
    {
        mmi_trace(g_sw_SP,"niej sp_network_name[%d] can't support this function", sp_network_name);
    }

    SetParentHandler(MENU_ID_SP_MOBILE_EDEN);

    mmi_trace(g_sw_SP,"niej ShowCategory52Screen ");
    ShowCategory52Screen(STR_MOBILE_EDEN,MAIN_MENU_TITLE_FUNANDGAMES_ICON,
                         STR_GLOBAL_OK, IMG_GLOBAL_OK,
                         STR_GLOBAL_BACK, IMG_GLOBAL_BACK,
                         nNumofItem,nStrItemList,(PU16)gIndexIconsImageList,
                         NULL,
                         0,0,guiBuffer);

    if(sp_network_name == SP_NETWORK_CU)
    {
        SetLeftSoftkeyFunction(Entry_Fun_Interact_CU,KEY_EVENT_UP);
    }

    SetRightSoftkeyFunction(SP_EDEN_GoBackHistory,KEY_EVENT_UP);
    SetKeyHandler(SP_EDEN_GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);

}
示例#2
0
文件: SP.c 项目: jprothwell/sc-fix
/*****************************************************************************

	FUNCTION NAME		: Entry_SP_Level2

  PURPOSE	: From level2 go to next screen .
            SP_Pre_Entry_Level2 will do some preparation for SP_Pre_Entry_Level2.

	INPUT PARAMETERS	: void
	OUTPUT PARAMETERS	: void

	RETURNS				:



                         Entry_MobileEden   Entry_SP_Level1  SP_Pre_Entry_Level2
                              |                   |             |
                              |    /Level1/       | /Level2/    |
              Mobile Paradise |        |          |    |        |
                              ->New Style World        |        |
                                                ---->Joke
                                                           -------->Request
                                                           -------->Price Explanation
                                                      ...

                           <-----              <-----
                    SP_EDEN_GoBackHistory  SP_Level1_GoBackHistory

******************************************************************************/
void Entry_SP_Level2(void)
{
    U16 nStrItemList[SP_MAX_SUB_MENUS]; /* Stores the strings id of submenus returned */
    U16 nNumofItem = 0; 	 /* Stores no of children in the submenu*/
    U8* guiBuffer = NULL;		 /* Buffer holding history data */

    U16 ScrId = sp_level1_scr.sp_scr_id+sp_level_2_index+1;
    U16 MenuId = sp_level1_scr.sp_menu_id+sp_level_2_index+1;

    EntryNewScreen(ScrId, NULL, Entry_SP_Level2, NULL);

    guiBuffer = GetCurrGuiBuffer(ScrId);
    nNumofItem = GetNumOfChild(MenuId);
    GetSequenceStringIds_Ext(MenuId, nStrItemList);

    SetParentHandler(MenuId);
    RegisterHighlightHandler(ExecuteCurrHiliteHandler);
    ShowCategory52Screen(GetStringIdOfItem(MenuId),
                         MAIN_MENU_TITLE_FUNANDGAMES_ICON,
                         STR_GLOBAL_OK, IMG_GLOBAL_OK,
                         STR_GLOBAL_BACK, IMG_GLOBAL_BACK,
                         nNumofItem,nStrItemList,(PU16)gIndexIconsImageList,
                         NULL,
                         0,0,guiBuffer);

    SetRightSoftkeyFunction(GoBackHistory,KEY_EVENT_UP);
    SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);

}
示例#3
0
文件: SP.c 项目: jprothwell/sc-fix
/*****************************************************************************

	FUNCTION NAME		: void Entry_SP_Level1(void)

  PURPOSE		: From level1 go to next screen .
              The association between entry function and menu as following

                         Entry_MobileEden   Entry_SP_Level1  SP_Pre_Entry_Level2
                              |                   |             |
                              |    /Level1/       | /Level2/    |
              Mobile Paradise |                   |             |
                              ->New Style World                 |
                                                ---->Joke
                                                           -------->Request
                                                           -------->Price Explanation
                                                      ...
                          <-----              <-----
                   SP_EDEN_GoBackHistory  SP_Level1_GoBackHistory

              eg. when into Mobile Paradise ->New Style World->, this function will be
                  called.

	INPUT PARAMETERS	: void

	OUTPUT PARAMETERS	: void

	RETURNS				: void



******************************************************************************/
void Entry_SP_Level1(void)
{
    U16 nStrItemList[SP_MAX_SUB_MENUS]; /* Stores the strings id of submenus returned */
    U16 nNumofItem; 	 /* Stores no of children in the submenu*/
    U8* guiBuffer;		 /* Buffer holding history data */
    mmi_trace(g_sw_SP,"niej Entry_SP_Level1 sp_level1_scr.sp_scr_id[%d],sp_level1_scr.sp_menu_id[%d]",
              sp_level1_scr.sp_scr_id, sp_level1_scr.sp_menu_id);

    EntryNewScreen(sp_level1_scr.sp_scr_id, NULL, Entry_SP_Level1, NULL);

    guiBuffer = GetCurrGuiBuffer(sp_level1_scr.sp_scr_id);

    nNumofItem = GetNumOfChild(sp_level1_scr.sp_menu_id);
    GetSequenceStringIds_Ext(sp_level1_scr.sp_menu_id, nStrItemList);
    SetParentHandler(sp_level1_scr.sp_menu_id);

    RegisterHighlightHandler (SP_Level_2_Get_Index);
    ShowCategory52Screen(GetStringIdOfItem(sp_level1_scr.sp_menu_id),
                         MAIN_MENU_TITLE_FUNANDGAMES_ICON,
                         STR_GLOBAL_OK, IMG_GLOBAL_OK,
                         STR_GLOBAL_BACK, IMG_GLOBAL_BACK,
                         nNumofItem,nStrItemList,(PU16)gIndexIconsImageList,
                         NULL,
                         0,0,guiBuffer);

    SetLeftSoftkeyFunction (SP_Pre_Entry_Level2, KEY_EVENT_UP);
    SetKeyHandler (SP_Pre_Entry_Level2, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);

    SetRightSoftkeyFunction(SP_Level1_GoBackHistory,KEY_EVENT_UP);
    SetKeyHandler(SP_Level1_GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);

}
示例#4
0
文件: RightsMgr.c 项目: 12019/mtktest
/*****************************************************************************
 * FUNCTION
 *  mmi_rmgr_entry_main
 * DESCRIPTION
 *  Entry function of the rights manager main screen
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
static void mmi_rmgr_entry_main(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U16 ItemList[MAX_SUB_MENUS];
    U16 ItemIcons[MAX_SUB_MENUS];
    U8 *hints[MAX_SUB_MENUS];
    U16 nItems;

    U8 *guiBuffer;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    EntryNewScreen(SCR_ID_RMGR_MAIN, NULL, mmi_rmgr_entry_main, NULL);
    if (g_mmi_rmgr_switch_cermgr)
    {
        mmi_frm_unhide_menu_item(MENU_ID_RMGR_CERMGR);
    }
    else
    {
        mmi_frm_hide_menu_item(MENU_ID_RMGR_CERMGR);
    }

    nItems = GetNumOfChild_Ext(MENU_ID_RMGR);
    GetSequenceStringIds_Ext(MENU_ID_RMGR, ItemList);
    GetSequenceImageIds_Ext(MENU_ID_RMGR, ItemIcons);
    SetParentHandler(MENU_ID_RMGR);

    ConstructHintsList(MENU_ID_RMGR, (U8 **) hints);

    RegisterHighlightHandler(mmi_rmgr_highlight_hdlr);

    guiBuffer = GetCurrGuiBuffer(SCR_ID_RMGR_MAIN);
    
    
    ShowCategory52Screen(
        STR_ID_RMGR,
        GetRootTitleIcon(MAIN_MENU_SERVICES_MENUID),
        STR_GLOBAL_OK,
        IMG_GLOBAL_OK,
        STR_GLOBAL_BACK,
        IMG_GLOBAL_BACK,
        nItems,
        ItemList,
        ItemIcons,
        0,
        0,
        mmi_rmgr_p->rmgr_sel_idx,
        guiBuffer);

    SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
    SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);

    SetDelScrnIDCallbackHandler(SCR_ID_RMGR_LIST_RO_MAIN, (HistoryDelCBPtr)DRM_free_ro_list);
}
示例#5
0
/*****************************************************************************
 * FUNCTION
 *  mmi_vrsdscut_entry_tag_option
 * DESCRIPTION
 *  This function is just for template.
 * PARAMETERS
 *  void
 *  a(?)        [IN/OUT]        First variable, used as returns
 *  b(?)        [IN]            Second variable
 * RETURNS
 *  the description of return value, if any.(?)
 *****************************************************************************/
void mmi_vrsdscut_entry_tag_option(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U8 *guiBuffer;
    U16 nStrItemList[4];
    U16 nNumofItem;

    U32 HideItemId = -1;
    U32 maskingByte = -1;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    EntryNewScreen(SCR_ID_VRSD_SHORTCUT_OPTION, NULL, mmi_vrsdscut_entry_tag_option, NULL);
   
    guiBuffer = GetCurrGuiBuffer(SCR_ID_VRSD_SHORTCUT_OPTION);
    SetParentHandler(MENU_ID_VRSD_SHORTCUT_MAIN_MENU);
    RegisterHighlightHandler(ExecuteCurrHiliteHandler);

    /* Register all highlight handler again, because RsetBit() may change the highlight handler when hide menu. */
    mmi_vrsdscut_init_highlight_handler();

    mmi_frm_unhide_menu_item(MENU_ID_VRSD_SHORTCUT_MAIN_ADD);
    /* Display Change and Delete. */
    if (mmi_vrsd_util_get_tag_id(MMI_VRSD_APP_SHORTCUT, g_vrsdscut_highlight) != 0xffff)
    {
        mmi_frm_hide_menu_item(MENU_ID_VRSD_SHORTCUT_MAIN_ADD);
    }

    nNumofItem = GetNumOfChild_Ext(MENU_ID_VRSD_SHORTCUT_MAIN_MENU);
    GetSequenceStringIds_Ext(MENU_ID_VRSD_SHORTCUT_MAIN_MENU, nStrItemList);
    
    if (mmi_vrsd_util_get_tag_id(MMI_VRSD_APP_SHORTCUT, g_vrsdscut_highlight) == 0xffff)
    {
        nNumofItem = 1; /* Display add only */
    }

    ShowCategory15Screen(
        STR_ID_VRSD_SHORTCUT,
        MAIN_MENU_TITLE_MULTIMEDIA_ICON,
        STR_GLOBAL_OK,
        IMG_GLOBAL_OK,
        STR_GLOBAL_BACK,
        IMG_GLOBAL_BACK,
        nNumofItem,
        nStrItemList,
        (U16*) gIndexIconsImageList,
        LIST_MENU,
        0,
        guiBuffer);

    SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
    SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
}
示例#6
0
/*****************************************************************************
 * FUNCTION
 *  mmi_idle_entry_dial_pad_option
 * DESCRIPTION
 *  Entry function of dial pad screen option menu (only available for __MMI_UCM__)
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_idle_entry_dial_pad_option(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    PU8 guiBuffer;
    U16 nNumofItem;

#if defined(__MMI_WLAN_FEATURES__) && defined(__MMI_VOIP__)
    U16 nStrItemList[4];    /* dial, save, input method, and change dial mode */
#else 
    U16 nStrItemList[2];    /* dial and save */
#endif 

    historyNode *History;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    EntryNewScreen(IDLE_SCREEN_DIGIT_OPTIONS_ID, NULL, mmi_idle_entry_dial_pad_option, NULL);
    guiBuffer = GetCurrGuiBuffer(IDLE_SCREEN_DIGIT_OPTIONS_ID);

    nNumofItem = GetNumOfChild_Ext(MENU_ID_DIALER_SCREEN_OPTIONS);
    GetSequenceStringIds_Ext(MENU_ID_DIALER_SCREEN_OPTIONS, nStrItemList);
    SetParentHandler(MENU_ID_DIALER_SCREEN_OPTIONS);

    RegisterHighlightHandler(ExecuteCurrHiliteHandler);

    ShowCategory15Screen(
        STR_GLOBAL_OPTIONS,
        0,
        STR_GLOBAL_OK,
        IMG_GLOBAL_OK,
        STR_GLOBAL_BACK,
        IMG_GLOBAL_BACK,
        nNumofItem,
        nStrItemList,
        (PU16) gIndexIconsImageList,
        LIST_MENU,
        0,
        guiBuffer);

    SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
    SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);

    /* reset the guiBuffer to enable long press after go back to the digit dialer screen */
    if (GetHistoryScrID(IDLE_SCREEN_DIGIT_HANDLER_ID, &History) == ST_SUCCESS)
    {
        if (History->guiBuffer != NULL)
        {
            OslMfree(History->guiBuffer);
            History->guiBuffer = NULL;
        }
    }
}
示例#7
0
/**************************************************************

	FUNCTION NAME		: EntryCALLSETBarringMain(void)

  	PURPOSE				: entry function for call barring main menu

	INPUT PARAMETERS	: nil

	OUTPUT PARAMETERS	: nil

	RETURNS				: void

 

**************************************************************/
void EntryCALLSETBarringMain(void)
{
//micha1229
//	U16 nDispAttribute;  /* Stores display attribue */
	U8* guiBuffer;		/* Buffer holding history data */
	U16 nNumofItem;
	U16 nStrItemList[MAX_SUB_MENUS];
	/*U32 maskingByte=0xFF;
	U32 menuItemId=0xFFFFFFFF;*/

	EntryNewScreen(SCR_ID_CALLSET_BARRING_MAIN, NULL, EntryCALLSETBarringMain, NULL);

	/* Get current screen info into gui buffer  for history purposes*/
	guiBuffer = GetCurrGuiBuffer(SCR_ID_CALLSET_BARRING_MAIN);	
	/* Retrieve no of child of menu item to be displayed */
	nNumofItem = GetNumOfChild_Ext(MENU8237_SCR8093_MNGCALL_MENU_BARRING);  
	/* Get attribute of menu to be displayed */
//	nDispAttribute = GetDispAttributeOfItem(MENU8237_SCR8093_MNGCALL_MENU_BARRING);
	/* Retrieve string ids in sequence of given menu item to be displayed */
	GetSequenceStringIds_Ext(MENU8237_SCR8093_MNGCALL_MENU_BARRING, nStrItemList);  
	/* Set current parent id*/
	SetParentHandler(MENU8237_SCR8093_MNGCALL_MENU_BARRING);
	/* Register highlight handler to be called in menu screen */
	RegisterHighlightHandler(ExecuteCurrHiliteHandler);

 
#if 0
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif /* 0 */

	/* Display Screen */
	ShowCategory15Screen(STR_MENU_CALL_BARRING, MAIN_MENU_TITLE_SETTINGS_ICON,
						  STR_GLOBAL_OK, IMG_GLOBAL_OK,
						  STR_GLOBAL_BACK, IMG_GLOBAL_BACK,nNumofItem, nStrItemList,
						  (U16 *)gIndexIconsImageList,1,0,guiBuffer);
	/* Register function with right softkey */
	SetRightSoftkeyFunction(GoBackHistory,KEY_EVENT_UP);
	SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW,KEY_EVENT_DOWN);
	/* Register Exit handler */
	return;
}
示例#8
0
文件: Service.c 项目: 12019/mtktest
/*****************************************************************************
 * FUNCTION
 *  GoToServicesMenu
 * DESCRIPTION
 *  Displays Services Menu
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void GoToServicesMenu(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U16 nStrItemList[MAX_SUB_MENUS];
    U16 nIconItemList[MAX_SUB_MENUS];

    U8 *Strings[MAX_SUB_MENUS];
    U16 Icons[MAX_SUB_MENUS];
    U16 nNumofItem;

    U8 i = 0, j;
    U8 *guiBuffer;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
#ifdef __MMI_DUAL_SIM_MASTER__
    if ((MTPNP_AD_Get_Status() != MTPNP_AD_CARD1) &&
        (MTPNP_AD_Get_Status() != MTPNP_AD_CARD2) &&
        (MTPNP_AD_Get_Status() != MTPNP_AD_DUALCARD))
    {
        DisplayPopup(
            (PU8) GetString(SERVICES_NOT_PROVIDED_STRING_ID),
            IMG_GLOBAL_WARNING,
            0,
            UI_POPUP_NOTIFYDURATION_TIME,
            (U8) WARNING_TONE);
        return;
    }
#endif /* __MMI_DUAL_SIM_MASTER__ */

    /* Retrieve no of child of menu item to be displayed */
    nNumofItem = GetNumOfChild_Ext(MAIN_MENU_SERVICES_MENUID);

    /* Retrieve string ids in sequence of given menu item to be displayed */
    GetSequenceStringIds_Ext(MAIN_MENU_SERVICES_MENUID, nStrItemList);
    GetSequenceImageIds_Ext(MAIN_MENU_SERVICES_MENUID, nIconItemList);

#ifdef __SAT__
#if (defined __MMI_DUAL_SIM_SINGLE_CALL__) || (defined __MMI_DUAL_SIM_MASTER__)
    if ((IsSATPresent() && MTPNP_AD_Get_Status() == MTPNP_AD_CARD1) ||
        (IsSATPresent() && MTPNP_AD_Get_Status() == MTPNP_AD_DUALCARD))
#else /* (defined __MMI_DUAL_SIM_SINGLE_CALL__) || (defined __MMI_DUAL_SIM_MASTER__) */
    if (IsSATPresent())
#endif /* (defined __MMI_DUAL_SIM_SINGLE_CALL__) || (defined __MMI_DUAL_SIM_MASTER__) */
    {
        Strings[0] = (mmi_ucs2strlen((S8*) gSATMainMenu.alphaId) == 0) ? (PU8) get_string(SAT_MENU_STRING_ID) : gSATMainMenu.alphaId;
        Icons[0] = SAT_TITLE_IMAGE_ID;
        i++;
    }

#if (defined __MMI_DUAL_SIM_SINGLE_CALL__) || (defined __MMI_DUAL_SIM_MASTER__)
    if (IsSAT2Present() && IsSATPresent() && MTPNP_AD_Get_Status() == MTPNP_AD_DUALCARD)
    {
        Strings[1] = (mmi_ucs2strlen((S8*) gSATMainMenu.alphaId_2) == 0) ? (PU8) get_string(SAT_MENU_STRING_ID) : gSATMainMenu.alphaId_2;
        Icons[1] = SAT_TITLE_IMAGE_ID_2;
        i++;
    }
    else if ((IsSAT2Present() && MTPNP_AD_Get_Status() == MTPNP_AD_CARD2) ||
             (IsSAT2Present() && !IsSATPresent() && MTPNP_AD_Get_Status() == MTPNP_AD_DUALCARD))
    {
        Strings[0] = (mmi_ucs2strlen((S8*) gSATMainMenu.alphaId_2) == 0) ? (PU8) get_string(SAT_MENU_STRING_ID) : gSATMainMenu.alphaId_2;
        Icons[0] = SAT_TITLE_IMAGE_ID_2;
        i++;
    }
#endif /* (defined __MMI_DUAL_SIM_SINGLE_CALL__) || (defined __MMI_DUAL_SIM_MASTER__) */
#endif /* __SAT__ */

    for (j = 0; j < nNumofItem; j++)
    {
        if (isInfoNumPresent == 0 && nStrItemList[j] == SERVICES_INFO_NUM_STRING_ID)
        {
            continue;
        }
        Strings[i] = (PU8) GetString(nStrItemList[j]);
        Icons[i] = nIconItemList[j];
        i++;
    }

    nNumofItem = i;

#ifdef __MMI_MERGE_SAT_TO_MAINMENU__
    if (nNumofItem == 0)
    {
        DisplayPopup((PU8) GetString(SERVICES_NOT_PROVIDED_STRING_ID), IMG_GLOBAL_ERROR, 0, 1000, ERROR_TONE);
        return;
    }
    else if (nNumofItem == 1 && IsSATPresent())
    {
        GoToSATMainMenu();
        return;
    }
#endif /* __MMI_MERGE_SAT_TO_MAINMENU__ */ 

#ifdef __MMI_SERVICE_MENU_NUMERIC_LIST_ICON__
    EntryNewScreen(SERVICES_MAIN_MENU_SCREEN_ID, wgui_restore_list_menu_slim_style, GoToServicesMenu, NULL);
    wgui_override_list_menu_slim_style(WGUI_LIST_MENU_SLIM_STYLE_NUMBER);
#else /* __MMI_SERVICE_MENU_NUMERIC_LIST_ICON__ */ 
    EntryNewScreen(SERVICES_MAIN_MENU_SCREEN_ID, NULL, GoToServicesMenu, NULL);
#endif /* __MMI_SERVICE_MENU_NUMERIC_LIST_ICON__ */ 

    SetParentHandler(MAIN_MENU_SERVICES_MENUID);
    guiBuffer = GetCurrGuiBuffer(SERVICES_MAIN_MENU_SCREEN_ID);
    RegisterHighlightHandler(ServicesMenuIndex);

#ifdef __MMI_WGUI_MINI_TAB_BAR__
    wgui_enable_mini_tab_bar(MAIN_MENU_SERVICES_MENUID);
#endif 

    ShowCategory84Screen(
        SERVICES_TITLE_STRING_ID,
        GetRootTitleIcon(MAIN_MENU_SERVICES_MENUID),
        STR_GLOBAL_OK,
        IMG_GLOBAL_OK,
        STR_GLOBAL_BACK,
        IMG_GLOBAL_BACK,
        nNumofItem,
        Strings,
        Icons,
        LIST_MENU,
        0,
        guiBuffer);

    if (nNumofItem == 0)
    {
        /* No menu item and no SAT in GSM only project */
        ChangeLeftSoftkey(0, 0);
    }

    SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
    SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
}
示例#9
0
/*****************************************************************************
 * FUNCTION
 *  EntryCHISTMainMenu
 * DESCRIPTION
 *  Main screen of call history
 * NA
 *  
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void EntryCHISTMainMenu(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    // U16                  nDispAttribute; /* Stores display attribue */
    U8 *guiBuffer;                          /* Buffer holding history data */
    U16 nStrItemList[MAX_SUB_MENUS];        /* Stores the strings id of submenus returned */
    U16 nNumofItem;                         /* Stores no of children in the submenu */
    U16 ItemIcons[MAX_SUB_MENUS];
    U8 *PopUpList[MAX_SUB_MENUS];
    U16 LSKStr;
    U16 LSKImg;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    /* S32       maskingByte=-1;
       S32               menuItemId=-1; */

#ifdef __MMI_UI_SMALL_SCREEN_SUPPORT__
    if (mmi_is_redrawing_bk_screens() == TRUE)
    {
        return;
    }
#endif /* __MMI_UI_SMALL_SCREEN_SUPPORT__ */

    /* Call Exit Handler */
#ifdef __MMI_CH_NUMERIC_LIST_ICON__
    EntryNewScreen(SCR_CALL_HISTORY_MAIN_MENU, wgui_restore_list_menu_slim_style, EntryCHISTMainMenu, NULL);
#else 
    EntryNewScreen(SCR_CALL_HISTORY_MAIN_MENU, NULL, EntryCHISTMainMenu, NULL);
#endif 

    /* reset the indicies for dialed/recived/missed call list menus */
    chis_p->currRecvdCallIndex = 0;
    chis_p->currMissedCallIndex = 0;
    chis_p->currDialedCallIndex = 0;

    /* Get current screen to gui buffer  for history purposes */
    guiBuffer = GetCurrGuiBuffer(SCR_CALL_HISTORY_MAIN_MENU);
    /* Retrieve no of child of menu item to be displayed */
    nNumofItem = GetNumOfChild_Ext(MAIN_MENU_CALL_HISTORY); /* diamond, 2005/07/01 add _Ext to menu item functions */
    /* Get attribute of menu to be displayed */
    /* nDispAttribute = GetDispAttributeOfItem( MAIN_MENU_CALL_HISTORY ); */
    /* Retrieve string/image ids in sequence of given menu item to be displayed */
    GetSequenceStringIds_Ext(MAIN_MENU_CALL_HISTORY, nStrItemList);     /* diamond, 2005/07/01 add _Ext to menu item functions */
    GetSequenceImageIds_Ext(MAIN_MENU_CALL_HISTORY, ItemIcons); /* diamond, 2005/07/01 add _Ext to menu item functions */
    /* Set current parent id */
    SetParentHandler(MAIN_MENU_CALL_HISTORY);
    /* Register highlight handler to be called in menu screen */
    RegisterHighlightHandler(ExecuteCurrHiliteHandler);

    /* diamond, 2005/07/01 removed for new menu item architecture to CPHS */
#if 0
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif /* 0 */ 

    /* construct hint popup strings for menu items */
    ConstructHintsList(MAIN_MENU_CALL_HISTORY, PopUpList);

#ifdef __MMI_CH_NUMERIC_LIST_ICON__
    wgui_override_list_menu_slim_style(WGUI_LIST_MENU_SLIM_STYLE_NUMBER);
#endif 

    /* MTK Leo add, mini_tab_bar */
#ifdef __MMI_WGUI_MINI_TAB_BAR__
    wgui_enable_mini_tab_bar(MAIN_MENU_CALL_HISTORY);
#endif 
    /* MTK Leo end */

    /* There may be no menu items in call log */
    if (nNumofItem == 0)
    {
        LSKStr = 0;
        LSKImg = 0;
    }
    else
    {
        LSKStr = STR_GLOBAL_OK;
        LSKImg = IMG_GLOBAL_OK;        
    }
    /* Display the call history main screen */
    ShowCategory52Screen(
    #ifdef __MMI_DUAL_SIM_MASTER__
        STRING_MTPNP_CARD1_CALL_HISTORY,
    #else /* __MMI_DUAL_SIM_MASTER__ */
        STR_SCR_CALL_HISTORY_MAIN_MENU_CAPTION,
    #endif /* __MMI_DUAL_SIM_MASTER__ */
        IMG_SCR_CALL_HISTORY_MAIN_MENU_CAPTION,
        LSKStr,
        LSKImg,
        STR_GLOBAL_BACK,
        IMG_GLOBAL_BACK,
        nNumofItem,
        nStrItemList,
        ItemIcons,
        (U8 **)PopUpList,
        0,
        0,  /* u16callhist_curindex, */
        guiBuffer);

    /* Register function with right softkey */
    SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
    SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
    return;
}