📄 jbrowsermmirenderedpage.c
字号:
jdd_MemFree(UC_list_of_items);
UC_list_of_items = NULL;
}
jdd_MMINotificationMessage((JC_INT32) JC_ERR_MEMORY_ALLOCATION, E_NOTIFICATION_ERR, NULL, NULL);
return;
}
*/
EntryNewScreen(SCR_ID_BRW_RENDERED_PAGE_OPTIONS, NULL, mmi_brw_rendered_page_options, NULL);
guiBuffer = GetCurrGuiBuffer(SCR_ID_BRW_RENDERED_PAGE_OPTIONS);
SetParentHandler(Parent_MenuID);
memset(subMenuDataPtrs , 0 , sizeof(subMenuDataPtrs));
/*for Go To menu*/
for (i = 0; i < gGotoMenuCount; i++)
{
subMenuDataPtrs[i] = (PU8) GetString(STR_ID_BRW_GOTO);
}
/* Do elements have to be shown in the begining of the list if exist on the page */
for (i = gGotoMenuCount; i < (g_brw_cntx.used_do_element_count+gGotoMenuCount); i++)
{
subMenuDataPtrs[i] = (PU8) g_brw_cntx.DoElementList[i-gGotoMenuCount]->pDoLabel;
}
for (i = (g_brw_cntx.used_do_element_count + gGotoMenuCount); i < nNumofItem; i++)
{
subMenuDataPtrs[i] = (PU8) GetString(UC_list_of_items[i - (g_brw_cntx.used_do_element_count+gGotoMenuCount)]);
}
if (UC_list_of_items != NULL)
{
jdd_MemFree(UC_list_of_items);
UC_list_of_items = NULL;
}
RegisterHighlightHandler(RenderedPageHighlightHdlr);
ShowCategory84Screen(
STR_ID_BRW_OPTION,
GetRootTitleIcon(SERVICES_WAP_MENU_ID),
STR_GLOBAL_OK,
0,
STR_GLOBAL_BACK,
0,
nNumofItem,
subMenuDataPtrs,
(U16*) gIndexIconsImageList,
0,
0,
guiBuffer);
SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
mmi_brw_ren_page_handle_do_element();
}
/*****************************************************************************
* FUNCTION
* RenderedPageHighlightHdlr
* DESCRIPTION
* Highlight handler for rendered page are registered with this function
* PARAMETERS
* index [IN] Index of highlighted item
* RETURNS
* void
*****************************************************************************/
void RenderedPageHighlightHdlr(S32 index)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (index < gGotoMenuCount)
{
/* Do Nothing, Do element is present at the index */
SetLeftSoftkeyFunction(mmi_brw_ren_page_goto, KEY_EVENT_UP);
}
else if (index < (gGotoMenuCount + g_brw_cntx.used_do_element_count))
{
/* Do Nothing, Do element is present at the index */
SetLeftSoftkeyFunction(mmi_brw_ren_page_process_do_element, KEY_EVENT_UP);
}
else
{
ExecuteCurrHiliteHandler(index - (g_brw_cntx.used_do_element_count +gGotoMenuCount));
}
}
/*****************************************************************************
* FUNCTION
* mmi_brw_download_menu_highlight_hdlr
* DESCRIPTION
* Highlight handler for download option
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_brw_download_menu_highlight_hdlr(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
SetLeftSoftkeyFunction(mmi_brw_ren_page_download_image, KEY_EVENT_UP);
SetKeyHandler(mmi_brw_ren_page_download_image, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
}
#if 0
/* 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 !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif
/*****************************************************************************
* FUNCTION
* mmi_brw_ren_page_goto
* DESCRIPTION
* Function to fetch link from rendered page
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_brw_ren_page_goto(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
mmi_brw_fill_control_info_and_send_event_to_queue();
g_brw_page_cntx.brw_isRefreshDisplay = MMI_TRUE;
mmi_brw_clear_brw_soft_keys();
GoBackHistory();
}
/*****************************************************************************
* FUNCTION
* mmi_brw_ren_page_goto_homepage_highlight_hdlr
* DESCRIPTION
* Highlight handler for goto homepage option
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_brw_ren_page_goto_homepage_highlight_hdlr(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
SetLeftSoftkeyFunction(mmi_brw_entry_ren_page_goto_homepage, KEY_EVENT_UP);
}
/*****************************************************************************
* FUNCTION
* mmi_brw_entry_ren_page_goto_homepage
* DESCRIPTION
* Highlight handler for goto homepage option
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_brw_entry_ren_page_goto_homepage(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U8 curr_act_profile_url[BRW_WAP_PROFILE_HOMEPAGE_URL_LEN * ENCODING_LENGTH];
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
jc_strcpy(curr_act_profile_url, mmi_ph_brw_get_activated_profile_homepage());
AnsiiToUnicodeString((S8*) brw_current_url, (S8*) curr_act_profile_url);
mmi_brw_set_current_url((S8*) brw_current_url);
g_brw_page_cntx.brw_isRefreshDisplay = MMI_TRUE;
mmi_brw_clear_brw_soft_keys();
g_option_refresh_page = TRUE;/*This flag prevents to refresh the controls on current page*/
GoBackHistory();
g_option_refresh_page = FALSE;
mmi_brw_goto_url();
}
/*****************************************************************************
* FUNCTION
* mmi_brw_refresh_menu_highlight_hdlr
* DESCRIPTION
* Highlight handler for refresh option
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_brw_refresh_menu_highlight_hdlr(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
SetLeftSoftkeyFunction(mmi_brw_refresh_page, KEY_EVENT_UP);
}
/*****************************************************************************
* FUNCTION
* mmi_brw_refresh_page
* DESCRIPTION
* Handler for refresh option
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_brw_refresh_page(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
g_option_refresh_page = TRUE;
g_brw_page_cntx.brw_isRefreshDisplay = MMI_TRUE;
mmi_brw_clear_brw_soft_keys();
GoBackHistory();
g_option_refresh_page = FALSE;
JBrowserRefreshPage();
}
/*****************************************************************************
* FUNCTION
* IsRefreshPagePressed
* DESCRIPTION
* Handler for refresh option
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
BOOL IsRefreshPagePressed(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
return g_option_refresh_page;
}
/*****************************************************************************
* FUNCTION
* mmi_brw_ren_page_set_as_homepage_menu_highlight_hdlr
* DESCRIPTION
* Highlight handler set as homepage option
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_brw_ren_page_set_as_homepage_menu_highlight_hdlr(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
SetLeftSoftkeyFunction(mmi_brw_ren_page_set_as_hompage, KEY_EVENT_UP);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -