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

📄 jbrowsermmirecentpages.c

📁 MTK_MMI的部分源代码,从code中大致了解到MMI的执行流程
💻 C
📖 第 1 页 / 共 2 页
字号:
}


/*****************************************************************************
 * FUNCTION
 *  mmi_brw_entry_recent_page_options
 * DESCRIPTION
 *  Entry function for recent page options screen.
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_brw_entry_recent_page_options(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U16 UC_list_of_items[3];
    U8 *guiBuffer;
    S32 num_of_items;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    EntryNewScreen(SCR_ID_BRW_RECENT_PAGE_OPTIONS, NULL, mmi_brw_entry_recent_page_options, NULL);

    guiBuffer = GetCurrGuiBuffer(SCR_ID_BRW_RECENT_PAGE_OPTIONS);

    num_of_items = GetNumOfChild(MENU_ID_BRW_RECENT_PAGE_OPTIONS);
    GetSequenceStringIds(MENU_ID_BRW_RECENT_PAGE_OPTIONS, UC_list_of_items);
    SetParentHandler(MENU_ID_BRW_RECENT_PAGE_OPTIONS);
    RegisterHighlightHandler(ExecuteCurrHiliteHandler);

    ShowCategory15Screen(
        STR_ID_BRW_OPTION,
        GetRootTitleIcon(SERVICES_WAP_MENU_ID),
        STR_GLOBAL_OPTIONS,
        0,
        STR_GLOBAL_BACK,
        0,
        num_of_items,
        UC_list_of_items,
        (U16*) gIndexIconsImageList,
        LIST_MENU,
        0,
        guiBuffer);

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


/*****************************************************************************
 * FUNCTION
 *  mmi_brw_confirm_delete_recent_page
 * DESCRIPTION
 *  This function displays the confirmation screen for deletion of currently selected recent page.
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_brw_confirm_delete_recent_page(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
//	U16 stringID = 0;
	U8 *guiBuffer;
    JC_INT8 unicodeBuf[100] = {0, };

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
	if(IsScreenPresent(SCR_ID_BRW_JBROWSER_MAIN))
	{
//		stringID = STR_ID_BRW_DELETE_RECENT_PAGE_ENTRY;
        EntryNewScreen(SCR_ID_BRW_DELETE_RECENT_PAGE_SCREEN, NULL, NULL, NULL);
        guiBuffer = GetCurrGuiBuffer(SCR_ID_BRW_RECENT_PAGES);
		pfnUnicodeStrcpy(unicodeBuf, GetString(STR_ID_BRW_DELETE_RECENT_PAGE_ENTRY));

		ShowCategory74Screen(
			STR_GLOBAL_DELETE,
			GetRootTitleIcon(SERVICES_WAP_MENU_ID),
			STR_GLOBAL_YES,
			IMG_GLOBAL_YES,
			STR_GLOBAL_NO,
			IMG_GLOBAL_NO,
			(PU8) unicodeBuf,
			pfnUnicodeStrlen(unicodeBuf),
			guiBuffer);

		mmi_brw_clear_key_handler(KEY_VOL_UP);
		mmi_brw_clear_key_handler(KEY_VOL_DOWN);
	}
	else
	{
		//stringID = STR_GLOBAL_DELETE;
    DisplayConfirm(
        STR_GLOBAL_YES,
        IMG_GLOBAL_YES,
        STR_GLOBAL_NO,
        IMG_GLOBAL_NO,
			get_string(STR_GLOBAL_DELETE),
        IMG_GLOBAL_QUESTION,
        WARNING_TONE);
	}

    SetLeftSoftkeyFunction(mmi_brw_delete_recent_page, KEY_EVENT_UP);
    SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);   /* added by tk */
}


/*****************************************************************************
 * FUNCTION
 *  mmi_brw_delete_recent_page
 * DESCRIPTION
 *  Deletes the selected recent page from the list
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_brw_delete_recent_page(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    jdi_BrowserClearHistoryByIndex(pBrowserCtxt, g_brw_cntx.index_highlighted_item);

    jdi_BrowserHistorySave(pBrowserCtxt);

    DisplayPopup((PU8) GetString(STR_GLOBAL_DONE), IMG_GLOBAL_ACTIVATED, 1, JBROWSER_POPUP_TIME, SUCCESS_TONE);
    /* DeleteUptoScrID(SCR_ID_BRW_INTERNET_SERVICES); */
    DeleteUptoScrID(SCR_ID_BRW_RECENT_PAGES);   /* added by tk */
}


/*****************************************************************************
 * FUNCTION
 *  mmi_brw_confirm_delete_all_recent_pages
 * DESCRIPTION
 *  This function displays the confirmation screen for deletion of entire recent page list
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_brw_confirm_delete_all_recent_pages(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
//	U16 stringID = 0;
	U8 *guiBuffer;
    JC_INT8 unicodeBuf[100] = {0, };

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
	if(IsScreenPresent(SCR_ID_BRW_JBROWSER_MAIN))
	{
	//	stringID = STR_ID_BRW_DELETE_ALL_RECENT_PAGE_ENTRY;
        EntryNewScreen(SCR_ID_BRW_DELETE_RECENT_PAGE_SCREEN, NULL, NULL, NULL);
        guiBuffer = GetCurrGuiBuffer(SCR_ID_BRW_RECENT_PAGES);
		pfnUnicodeStrcpy(unicodeBuf, GetString(STR_ID_BRW_DELETE_ALL_RECENT_PAGE_ENTRY));

		ShowCategory74Screen(
			STR_GLOBAL_DELETE_ALL,
			GetRootTitleIcon(SERVICES_WAP_MENU_ID),
			STR_GLOBAL_YES,
			IMG_GLOBAL_YES,
			STR_GLOBAL_NO,
			IMG_GLOBAL_NO,
			(PU8) unicodeBuf,
			pfnUnicodeStrlen(unicodeBuf),
			guiBuffer);
		mmi_brw_clear_key_handler(KEY_VOL_UP);
		mmi_brw_clear_key_handler(KEY_VOL_DOWN);
	}
	else
	{
	//	stringID = STR_GLOBAL_DELETE_ALL;

    DisplayConfirm(
        STR_GLOBAL_YES,
        IMG_GLOBAL_YES,
        STR_GLOBAL_NO,
        IMG_GLOBAL_NO,
			get_string(STR_GLOBAL_DELETE_ALL),
        IMG_GLOBAL_QUESTION,
        WARNING_TONE);
	}

    SetLeftSoftkeyFunction(mmi_brw_delete_all_recent_pages, KEY_EVENT_UP);
    SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);   /* added by tk */
}


/*****************************************************************************
 * FUNCTION
 *  mmi_brw_delete_all_recent_pages
 * DESCRIPTION
 *  Deletes the entire recent page list
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_brw_delete_all_recent_pages(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    jdi_BrowserClearHistory(pBrowserCtxt);

    jdi_BrowserHistorySave(pBrowserCtxt);

    DisplayPopup((PU8) GetString(STR_GLOBAL_DONE), IMG_GLOBAL_ACTIVATED, 1, JBROWSER_POPUP_TIME, SUCCESS_TONE);
    /* DeleteUptoScrID(SCR_ID_BRW_INTERNET_SERVICES); */
    DeleteUptoScrID(SCR_ID_BRW_RECENT_PAGES);   /* added by tk */

}


/*****************************************************************************
 * FUNCTION
 *  mmi_brw_goto_highlighted_recent_page
 * DESCRIPTION
 *  This function fetches the current url
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_brw_goto_highlighted_recent_page(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    JC_URL_HISTORY brw_rpl_list_p;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    jdi_BrowserGetHistoryByIndex(pBrowserCtxt, g_brw_cntx.index_highlighted_item, &brw_rpl_list_p);
#if 0
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif /* 0 */ 
    /* added by tk to set the current fetch url */
    mmi_brw_set_current_url((S8*) brw_rpl_list_p.pmURL);
    /* jdi call to fetch the url */
    mmi_brw_pre_entry_goto_url();
}

#endif /* defined (JATAAYU_SUPPORT) && defined (WAP_SUPPORT) */ 

#endif /* _MMI_JBROWSERMMIRECENTPAGES_C */ 

⌨️ 快捷键说明

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