📄 jbrowserstartup.c
字号:
jdd_MMINotificationMessage((JC_INT32) iRet, E_NOTIFICATION_ERR, NULL, NULL);
}
}
/*****************************************************************************
* FUNCTION
* JBrowserKeyUpArrowEventHdlr
* DESCRIPTION
* JBrowserKeyUpArrowEventHdlr
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void JBrowserKeyUpArrowEventHdlr(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
EJCScrollDirection eScrollDirection;
JC_RETCODE iRet = JC_OK;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
eScrollDirection = E_JC_SCROLL_UP;
iRet = jdi_BrowserHandleScroll(pBrowserCtxt, eScrollDirection);
if (JC_OK != iRet)
{
jdd_MMINotificationMessage((JC_INT32) iRet, E_NOTIFICATION_ERR, NULL, NULL);
}
}
/*****************************************************************************
* FUNCTION
* JBrowserKeyDownArrowEventHdlr
* DESCRIPTION
* JBrowserKeyDownArrowEventHdlr
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void JBrowserKeyDownArrowEventHdlr(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
EJCScrollDirection eScrollDirection;
JC_RETCODE iRet = JC_OK;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
eScrollDirection = E_JC_SCROLL_DOWN;
iRet = jdi_BrowserHandleScroll(pBrowserCtxt, eScrollDirection);
if (JC_OK != iRet)
{
jdd_MMINotificationMessage((JC_INT32) iRet, E_NOTIFICATION_ERR, NULL, NULL);
}
}
/*****************************************************************************
* FUNCTION
* JBrowserGoEvent
* DESCRIPTION
* Go event handler
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void JBrowserGoEvent(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
JC_RETCODE iRet = JC_OK;
JC_EVENT_DATA eventData = {0, };
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
eventData.pEventInfo = NULL;
eventData.uiEventInfoSize = 0;
eventData.iEventType = E_BRW_START_FETCH_EVENT;
eventData.destTaskInfo.iAppID = E_TASK_BROWSER_UI;
eventData.destTaskInfo.iTaskID = E_TASK_BROWSER_UI;
eventData.srcTaskInfo.iAppID = E_TASK_BROWSER_UI;
eventData.srcTaskInfo.iTaskID = E_TASK_BROWSER_UI;
iRet = jdd_QueueSend(&eventData);
if (JC_OK != iRet)
{
return;
}
}
/*****************************************************************************
* FUNCTION
* mmi_brw_deinit_event
* DESCRIPTION
* Deinit event handler
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_brw_deinit_event(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
JC_RETCODE iRet = JC_OK;
JC_EVENT_DATA eventData = {0, };
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
eventData.pEventInfo = NULL;
eventData.uiEventInfoSize = 0;
eventData.iEventType = E_BRW_DEINIT_EVENT;
eventData.destTaskInfo.iAppID = E_TASK_BROWSER_UI;
eventData.destTaskInfo.iTaskID = E_TASK_BROWSER_UI;
eventData.srcTaskInfo.iAppID = E_TASK_BROWSER_UI;
eventData.srcTaskInfo.iTaskID = E_TASK_BROWSER_UI;
iRet = jdd_QueueSend(&eventData);
if (JC_OK != iRet)
{
return;
}
}
/*****************************************************************************
* FUNCTION
* mmi_brw_dataconn_auto_disc_timeout_event
* DESCRIPTION
* Dataconn auto disconnect event handler.It disconn csd call on the basic
* of timeout event handler
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_brw_dataconn_auto_disc_timeout_event(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
JC_RETCODE iRet = JC_OK;
JC_EVENT_DATA eventData = {0, };
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
eventData.pEventInfo = NULL;
eventData.uiEventInfoSize = 0;
eventData.iEventType = E_BRW_DATACONN_AUTO_DISC_TIMEOUT_EVENT;
eventData.destTaskInfo.iAppID = E_TASK_BROWSER_UI;
eventData.destTaskInfo.iTaskID = E_TASK_BROWSER_UI;
eventData.srcTaskInfo.iAppID = E_TASK_BROWSER_UI;
eventData.srcTaskInfo.iTaskID = E_TASK_BROWSER_UI;
iRet = jdd_QueueSend(&eventData);
if (JC_OK != iRet)
{
return;
}
}
/*****************************************************************************
* FUNCTION
* JBrowserRefreshDisplayHdlr
* DESCRIPTION
* Refresh event handler
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void JBrowserRefreshDisplayHdlr(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
JC_RETCODE iRet = JC_OK;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
jdd_MemSetActiveModuleID(E_TASK_BROWSER_CORE);
iRet = jdi_BrowserRefreshDisplay(pBrowserCtxt);
if (JC_OK != iRet)
{
jdd_MMINotificationMessage((JC_INT32) iRet, E_NOTIFICATION_ERR, NULL, NULL);
}
}
/*****************************************************************************
* FUNCTION
* mmi_brw_multimedia_callback_hdlr
* DESCRIPTION
*
* PARAMETERS
* pAppArg [?]
* pObjectInfo [?]
* RETURNS
*
*****************************************************************************/
JC_RETCODE mmi_brw_multimedia_callback_hdlr(void *pAppArg, JC_OBJECT_INFO *pObjectInfo)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
JC_RETCODE eRet;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (pObjectInfo)
{
eRet = mmi_jdd_audio_play(pObjectInfo);
}
else
{
eRet = mmi_jdd_audio_stop();
}
if (eRet != JC_OK)
{
jdd_MMINotificationMessage((JC_INT32) eRet, E_NOTIFICATION_ERR, NULL, NULL);
}
return JC_OK;
}
/*****************************************************************************
* FUNCTION
* mmi_brw_mime_content_callback_hdlr
* DESCRIPTION
* mime callback handler for cached content
* PARAMETERS
* pAppArg [?]
* pMimeContent [?]
* RETURNS
* void
*****************************************************************************/
void mmi_brw_mime_content_callback_hdlr(void *pAppArg, COMM_URL_IND *pMimeContent)
{
S8 download_msg[200] = {0};
S8 tmp_str_ascii[50] = {0};
S8 tmp_str_ucs2[100] = {0};
g_brw_cntx.isDownloading = FALSE;
memset((void*)&g_brw_cntx.dwnld_mime_info, 0, sizeof(JC_MIME_INFO));
g_brw_cntx.dwnld_mime_info.psContentType = jdi_UtilsStrdup(pMimeContent->pszContentType);
if(!g_brw_cntx.dwnld_mime_info.psContentType)
{
goto error_handle;
}
g_brw_cntx.dwnld_mime_info.psUrl = jdi_UtilsTcsDup(pMimeContent->psUrl);
if(!g_brw_cntx.dwnld_mime_info.psUrl)
{
goto error_handle;
}
g_brw_cntx.dwnld_mime_info.pBuffer = jdd_MemAlloc(pMimeContent->uiLength, 1);
if(!g_brw_cntx.dwnld_mime_info.pBuffer)
{
goto error_handle;
}
memcpy(g_brw_cntx.dwnld_mime_info.pBuffer, pMimeContent->pBuffer, pMimeContent->uiLength);
g_brw_cntx.dwnld_mime_info.iBufferLen = pMimeContent->uiLength;
pfnUnicodeStrcpy(download_msg, GetString(STR_ID_BRW_DOWNLOAD_QUERY));
pfnUnicodeStrcat(download_msg, "\n");
if (pMimeContent->uiLength)
{
pfnUnicodeStrcat(download_msg, GetString(STR_ID_BRW_CONTENT_SIZE));
pfnUnicodeStrcat(download_msg, ":");
if (pMimeContent->uiLength >= 1000)
{
sprintf(tmp_str_ascii, "%.1f ", (pMimeContent->uiLength / 1024.0));
}
else
{
sprintf(tmp_str_ascii, "%d ", pMimeContent->uiLength);
}
AnsiiToUnicodeString(tmp_str_ucs2, tmp_str_ascii);
pfnUnicodeStrcat(download_msg, tmp_str_ucs2);
if (pMimeContent->uiLength >= 1000)
{
pfnUnicodeStrcat(download_msg, GetString(STR_ID_BRW_KB));
}
else
{
pfnUnicodeStrcat(download_msg, GetString(STR_ID_BRW_BYTES));
}
}
mmi_brw_entry_download_confirm((UI_string_type) download_msg, mmi_brw_save_mime_content, mmi_brw_cancel_save_mime_content);
return;
error_handle:
mmi_brw_free_dwnld_info_memory();
DisplayPopup((PU8) GetString(STR_ID_JATAAYU_JDD_BROWSER_NOT_ENOUGH_MEMORY), IMG_GLOBAL_ERROR, 1, JBROWSER_POPUP_TIME, ERROR_TONE);
}
/*****************************************************************************
* FUNCTION
* mmi_brw_save_mime_content
* DESCRIPTION
* Save mime content
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_brw_save_mime_content(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
JC_CHAR *filename;
JC_RETCODE eRet;
JC_UINT32 navlist_count;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
g_brw_cntx.isDownloading = TRUE;
jdi_BrowserGetNavListCount(pBrowserCtxt, &navlist_count);
if (!navlist_count)
{
DeleteScreenIfPresent(SCR_ID_BRW_JBROWSER_MAIN);
}
#ifdef __USB_IN_NORMAL_MODE__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -