示例#1
0
/*****************************************************************************
 * FUNCTION
 *  wgui_mini_tab_bar_goto_prev
 * DESCRIPTION
 *  Goto previous item of mini tab bar
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void wgui_mini_tab_bar_goto_prev(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    /* decrease index */
    if (wgui_mini_tab_bar.curr_index == 0)
    {
        wgui_mini_tab_bar.curr_index = wgui_mini_tab_bar.num_of_items - 1;
    }
    else
    {
        wgui_mini_tab_bar.curr_index--;
    }

    /* execute entry function */
    ExecuteItemHiliteHandler(wgui_mini_tab_bar.menu_item_id[wgui_mini_tab_bar.curr_index]);
    execute_left_softkey_function(KEY_EVENT_UP);

    /* delete toppest history */
    DeleteNHistory(1);
}
示例#2
0
/*****************************************************************************
 * FUNCTION
 *  csb_frm_show_error_message
 * DESCRIPTION
 *  shows the error string and NULLs the csb_buffer
 * PARAMETERS
 *  nIndex				[IN]            
 * RETURNS				void
 *****************************************************************************/
void csb_frm_show_error_message(void)
{
	DisplayPopup((PU8) GetString(STR_ID_CSB_SCR_NOT_EXIST_TEXT), IMG_GLOBAL_ERROR, 1, CSB_NOTIFY_DURATION, 0);
	/* reset the buffer */
	memset(csb_buffer, CSB_NULL, MAX_CSB_SCREEN_NAME_LENGTH);
	DeleteNHistory(1);
}
示例#3
0
void jmms_GoBactToMainScreen()
{	
	MESSAGE_LIST 	*pMsglist = JC_NULL ;
	JC_UINT32		uiCount = 0 ;
	JC_RETCODE 		rCode ;
	RETRIEVE_FILTERS	retFilter ={0,};	

	rCode = jmms_SetActiveFolder (g_pstJMmsAppInfo->eCurrentFolderID) ;
	if (JC_OK == rCode)
	{
		retFilter.bIsBufRequired = E_FALSE;
		retFilter.eRetrieve = E_RETRIEVE_BY_INDEX;
		retFilter.uiStartIndex = 1;
		retFilter.uiNumMessage = 0;
		rCode = jmms_GetMsgList (g_pstJMmsAppInfo->hMsgStore, &pMsglist, &retFilter) ;
		if (JC_OK == rCode && pMsglist)
		{
			while (pMsglist)
			{			
				uiCount++ ;
				pMsglist = pMsglist->pNext ;
			}
		}
	}
	mmi_trace(TRUE,"JDD_LOG: Func: %s uiCount=%d", __FUNCTION__, uiCount);
	if (0 == uiCount)
	{
		DeleteUptoScrID(SCR_ID_MMS_MAIN_SCREEN);
	}
	else
	{
		DeleteNHistory(2);
	}
}
示例#4
0
void Select_hltd_template()
{
	U16 hltd_index=0;
	JC_CHAR *pStrItem;
	JC_INT32 len = 0;
	JC_CHAR *psInputValue = JC_NULL ;
	JC_UINT32 uiStrLen = 0 ;
	JC_RETCODE rCode = JC_OK;

	jc_tcsncat(TEST1,TEST2,0) ;
	
	hltd_index =(U8) GetHighlightedItem();
		
	len = jc_wstrlen(GetString(g_str_templates[hltd_index].strId));
	pStrItem = (JC_CHAR*) jdd_MemAlloc((len + 1), sizeof(JC_CHAR));
	jc_wstrcpy(pStrItem, (UINT16*)GetString(g_str_templates[hltd_index].strId));
	
	//mmi_trace(1,"Select_hltd_template [%s]",GetString(g_str_templates[hltd_index].strId)) ;
	//mmi_trace(1,"Select_hltd_template [%s]",pStrItem) ;
	//mmi_trace(1,"Select_hltd_template [%d]",len) ;
	
	if(g_pstJMmsAppInfo->pActiveTextBuffer)
	{
		mmi_trace(1, " length in if  [%d]", jc_tcslen(g_pstJMmsAppInfo->pcInputBuff));
		jc_tcsncpy((JC_CHAR*)g_pstJMmsAppInfo->pcInputBuff,  
		 				(JC_CHAR*)g_pstJMmsAppInfo->pActiveTextBuffer,
		 				jMMS_MAX_INPUT_SIZE) ;				
	}
	mmi_trace(1, " length in afer if  [%d]", jc_tcslen(g_pstJMmsAppInfo->pcInputBuff));	
		
	uiStrLen = jMMS_MAX_INPUT_SIZE - jc_tcslen(g_pstJMmsAppInfo->pcInputBuff);
	
	jc_tcsncat((JC_CHAR*)g_pstJMmsAppInfo->pcInputBuff,(JC_CHAR*)pStrItem,\
				uiStrLen) ;
	
	mmi_trace(1, " length in sdgsd if  [%d], [%d]", jc_tcslen(g_pstJMmsAppInfo->pcInputBuff),uiStrLen);
	jMMS_MMIGetInputBoxValue (&psInputValue); 

	if(psInputValue)
	{
	   rCode =jmms_AddTextMediaToCurrSlide(psInputValue);
	}
	//raj change mem leak
	jdd_MemFree(pStrItem);
      if(rCode == JC_OK)
        {
	DeleteNHistory(1);	
	GoBackHistory();
        }
	
}
/**************************************************************

	FUNCTION NAME		: SelectInputMethodHandler

  	PURPOSE				: Exit function for input method screen

	INPUT PARAMETERS	: nil

	OUTPUT PARAMETERS	: nil

	RETURNS				: void



**************************************************************/
void SelectInputMethodHandler(void)
{
    U16 data;
    S16 error;
    U16 index;
    index = GetCurrHiliteID();
    SetInputMethod(currInputMethodIndex);
    data = MMI_prefered_input_type;
    WriteValue( NVRAM_SETTING_PREFER_INPUT_METHOD, &data, DS_SHORT , &error);
    pfnUnicodeStrcpy((PS8)hintData[index],(PS8)inputMethodList[currInputMethodIndex]);
    Category52ChangeItemDescription(index,hintData[index]);
    RedrawCategoryFunction();
    DisplayPopup((PU8)GetString(STR_GLOBAL_DONE) ,IMG_GLOBAL_ACTIVATED, 1,ST_NOTIFYDURATION,SUCCESS_TONE);
    DeleteNHistory(1);
    return;
}
示例#6
0
/*****************************************************************************
 * FUNCTION
 *  csb_frm_save_manual_mode
 * DESCRIPTION
 *  Confirms the manual mode change
 * PARAMETERS
 *  nIndex				[IN]            
 * RETURNS				void
 *****************************************************************************/
void csb_frm_save_manual_mode(void)
{
	/*----------------------------------------------------------*/
    /* Local Variables                                          */
    /*----------------------------------------------------------*/
    
    /*----------------------------------------------------------*/
    /* Code Body                                                */
    /*----------------------------------------------------------*/

	g_CSB_struct.csb_settings.manual_mode = (U8) g_csb_highlighted_item;

	/* Write the updated value in NVRAM */
	csb_frm_write_in_nvram();

	DisplayPopup((PU8) GetString(STR_GLOBAL_DONE), IMG_GLOBAL_ACTIVATED, 1, CSB_NOTIFY_DURATION, 0);
	DeleteNHistory(1);
}
示例#7
0
/*****************************************************************************
 * FUNCTION
 *  csb_frm_save_auto_mode_time
 * DESCRIPTION
 *  Confirms the Auto mode timer change
 * PARAMETERS
 *  nIndex				[IN]            
 * RETURNS				void
 *****************************************************************************/
void csb_frm_save_auto_mode_time(void)
{
	/*----------------------------------------------------------*/
    /* Local Variables                                          */
    /*----------------------------------------------------------*/
    
    /*----------------------------------------------------------*/
    /* Code Body                                                */
    /*----------------------------------------------------------*/

	/* Multiply the "g_csb_timer" value with 1000, as the time shouldbe stored in milli seconds */
	g_CSB_struct.csb_settings.timer_value = (U16)(g_csb_timer * 1000);

	/* Write the updated value in NVRAM */
	csb_frm_write_in_nvram();

	DisplayPopup((PU8) GetString(STR_GLOBAL_DONE), IMG_GLOBAL_ACTIVATED, 1, CSB_NOTIFY_DURATION, 0);
	DeleteNHistory(1);

}
示例#8
0
/*****************************************************************************
 * FUNCTION
 *  mmi_brw_new_push_msg_ind_on_idlescreen
 * DESCRIPTION
 *  Entry Function to display screen for push message arrived indication
 *  on idle-screen.
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_brw_new_push_msg_ind_on_idlescreen(void)   /* added by puneet */
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    S8 buf[4] = {0};
    S8 pOutBuffer[8] = {0};
    S8 message_string[40] = {0};
    U32 brw_total_msg_count = 0;
    U32 brw_unread_msg_count = 0;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    mmi_brw_get_push_statistics(&brw_total_msg_count, &brw_unread_msg_count);

    if (SCR_ID_BRW_NEW_PUSH_MESSAGE_IND == GetActiveScreenId())
    {
        DeleteNHistory(1);
    }

    if (0 == brw_unread_msg_count)
    {
        DisplayIdleScreen();
        return;
    }

    if (brw_unread_msg_count < 10)
    {
        sprintf(buf, "%01d", brw_unread_msg_count);
    }
    else
    {
        sprintf(buf, "%02d", brw_unread_msg_count);
    }

    mmi_asc_to_ucs2(pOutBuffer, buf);
    mmi_ucs2cpy((S8*) message_string, pOutBuffer);
    mmi_ucs2cat((S8*) message_string, " ");
    mmi_ucs2cat((S8*) message_string, GetString(STR_ID_BRW_SERVICE_MESSAGE_RCVD));

    EntryNewScreen(SCR_ID_BRW_NEW_PUSH_MESSAGE_IND, NULL, mmi_brw_new_push_msg_ind_on_idlescreen, NULL);
    ShowStatusIcon(STATUS_ICON_WAP);

    if (0 == g_keylock_context.gKeyPadLockFlag)
    {
        /*
         * ShowCategory154Screen(
         * 0,
         * 0,
         * STR_ID_BRW_READ,
         * IMG_GLOBAL_YES,
         * STR_GLOBAL_BACK,
         * IMG_GLOBAL_BACK,
         * (PU8) message_string,
         * 0,
         * IMG_NEW_MESSAGE_NOTIFICATION_MSG,
         * NULL);
         */

        /* Modified by vikas lal - 29032007 Category 154 will be replaced(By Category 66) here for text wraping */
        ShowCategory66Screen(
            0,
            0,
            STR_ID_BRW_READ,
            IMG_GLOBAL_YES,
            STR_GLOBAL_BACK,
            IMG_GLOBAL_BACK,
            (PU8) message_string,
            IMG_NEW_MESSAGE_NOTIFICATION_MSG,
            NULL);

        g_mmi_brw_cntx.push_msg_rcvd_flag = MMI_FALSE;

        if (1 == brw_unread_msg_count)
        {
            SetLeftSoftkeyFunction(mmi_brw_read_arrived_push_message, KEY_EVENT_UP);
        }
        else
        {
            SetLeftSoftkeyFunction(mmi_brw_entry_service_inbox, KEY_EVENT_UP);
        }

        SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
    }
    else    /* Keypad is locked */
    {
        extern void EntryScrAfterPessingRSK(void);

#if defined(__MMI_KEYPAD_LOCK_PROMPT_TEXT__)
        extern void EntryScrKeyPadLockOnPessingAnyKey(void);
#endif

        /*
         * ShowCategory154Screen(
         * 0,
         * 0,
         * g_keylock_context.KeyLockLSKStringID,
         * g_keylock_context.KeyLockLSKIconID,
         * g_keylock_context.KeyLockRSKStringID,
         * g_keylock_context.KeyLockRSKIconID,
         * (PU8) message_string,
         * 0,
         * IMG_NEW_MESSAGE_NOTIFICATION_MSG,
         * NULL);
         */
        /* Modified by vikas lal - 29032007 Category 154 will be replaced(By Category 66) here for text wraping */
        ShowCategory66Screen(
            0,
            0,
            g_keylock_context.KeyLockLSKStringID,
            g_keylock_context.KeyLockLSKIconID,
            g_keylock_context.KeyLockRSKStringID,
            g_keylock_context.KeyLockRSKIconID,
            (PU8) message_string,
            IMG_NEW_MESSAGE_NOTIFICATION_MSG,
            NULL);

#if defined(__MMI_KEYPAD_LOCK_PROMPT_TEXT__)
        SetGroupKeyHandler(
            EntryScrKeyPadLockOnPessingAnyKey,
            (PU16) PresentAllKeys,
            (U8) TOTAL_KEYS,
            (U16) KEY_EVENT_DOWN);
#endif /* defined(__MMI_KEYPAD_LOCK_PROMPT_TEXT__) */

#ifdef __MMI_TOUCH_SCREEN__

#ifdef __MMI_KEYPAD_LOCK_PROMPT_TEXT__
#ifdef __MMI_KEYPAD_LOCK_PATTERN_1__
        SetRightSoftkeyFunction(EntryScrKeyPadLockOnPessingAnyKey, KEY_EVENT_DOWN);
#endif
#ifdef __MMI_KEYPAD_LOCK_PATTERN_2__
        SetLeftSoftkeyFunction(EntryScrKeyPadLockOnPessingAnyKey, KEY_EVENT_DOWN);
#endif
#else /* __MMI_KEYPAD_LOCK_PROMPT_TEXT__ */
        ClearKeyHandler(KEY_LSK, KEY_EVENT_DOWN);
        ClearKeyHandler(KEY_LSK, KEY_EVENT_UP);
        ClearKeyHandler(KEY_RSK, KEY_EVENT_DOWN);
        ClearKeyHandler(KEY_RSK, KEY_EVENT_UP);
#endif /* __MMI_KEYPAD_LOCK_PROMPT_TEXT__ */
        SetKeyHandler(EntryScrAfterPessingRSK, KEY_SEND, KEY_EVENT_DOWN);

#else /* __MMI_TOUCH_SCREEN__ */

#ifdef __MMI_KEYPAD_LOCK_PATTERN_1__
        SetRightSoftkeyFunction(EntryScrAfterPessingRSK, KEY_EVENT_DOWN);
#endif
#ifdef __MMI_KEYPAD_LOCK_PATTERN_2__
        SetLeftSoftkeyFunction(EntryScrAfterPessingRSK, KEY_EVENT_DOWN);
#endif

#endif /* __MMI_TOUCH_SCREEN__ */

        ClearKeyHandler(KEY_END, KEY_EVENT_DOWN);
#ifdef __MMI_TOUCH_SCREEN__
        mmi_idle_pen_block();
#endif
    }
}
示例#9
0
/*****************************************************************************
 * FUNCTION
 *  mmi_brw_entry_service_inbox
 * DESCRIPTION
 *  Entry function for service inbox
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_brw_entry_service_inbox(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U8 *guiBuffer;
    U32 ret_code = 0;
    JC_UINT32 brw_total_msg_count = 0;
    JC_UINT32 brw_unread_msg_count = 0;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (NULL == g_mmi_brw_push_cntx.service_msg_list_p)
    {
        DisplayPopup(
            (PU8) GetString(STR_ID_BRW_PUSH_MEMORY_NOT_ENOUGH),
            IMG_GLOBAL_ERROR,
            1,
            UI_POPUP_NOTIFYDURATION_TIME,
            ERROR_TONE);
        return;
    }

    ret_code = mmi_brw_get_push_statistics(&brw_total_msg_count, &brw_unread_msg_count);
    if (ret_code != JC_OK)
    {
        PRINT_INFORMATION_2(MMI_TRACE_INFO, "%s %u", "PUSH- Inside Push Inbox", ret_code);
        ASSERT(0);
    }

    /* While reading the messsage from idle screen when user will press back.
       at that time while displying the message list local buffer should clear
       Vivek - 12082006 */
    mmi_brw_push_free_service_value_struct(&g_mmi_brw_push_cntx.current_service_message);

    g_mmi_brw_cntx.push_msg_rcvd_flag = MMI_FALSE;
    g_mmi_brw_push_cntx.push_delete_notification = MMI_FALSE;

    /* Display 'Empty' if no push messages are present */
    if ((brw_total_msg_count) == 0)
    {
        DisplayPopup(
            (PU8) GetString(STR_GLOBAL_EMPTY),
            IMG_GLOBAL_EMPTY,
            1,
            UI_POPUP_NOTIFYDURATION_TIME,
            EMPTY_LIST_TONE);

        /* Added by Vivek - 30july, 2006. If push inbox is open from the 'idle screen
           push indication'. After showing the empty pop up it should return to
           idle screen */
        if (SCR_ID_BRW_NEW_PUSH_MESSAGE_IND == GetCurrScrnId())
        {
            DeleteNHistory(1);
        }
    }
    else
    {
        EntryNewScreen(SCR_ID_BRW_SERVICE_INBOX, NULL, mmi_brw_entry_service_inbox, NULL);

        /* Added by Vivek - 11july, 2006. If push inbox is open from the 'idle screen
           push indication' */
        if (SCR_ID_BRW_NEW_PUSH_MESSAGE_IND == GetCurrScrnId())
        {
            DeleteNHistory(1);
        }

        guiBuffer = GetCurrGuiBuffer(SCR_ID_BRW_SERVICE_INBOX);

        mmi_brw_create_push_msg_list();

        ShowCategory184Screen(
            STR_ID_BRW_SERVICE_INBOX,
            GetRootTitleIcon(SERVICES_WAP_MENU_ID),
            STR_GLOBAL_OPTIONS,
            0,
            STR_GLOBAL_BACK,
            0,
            brw_total_msg_count,
            mmi_brw_service_inbox_list_get_item,
            0,
            0,
            guiBuffer);

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

        SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
        SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
    }
}
示例#10
0
文件: SFApi.c 项目: 12019/mtktest
/*
void mmi_gamesimu_exit_from_fmgr(void *filename, int is_short)
{
    
    //DeleteUptoScrID(SCREENID_GAMESIMU_LIST);
    DeleteNHistory(1);
    GoBackHistory();
}
*/
void EntryRomList(void)
{
#if 0
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    S8 buf_filepath[FMGR_PATH_BUFFER_SIZE];
    FS_HANDLE file_handle;
    FMGR_FILTER filter;
    S32 create_result;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
   memset(buf_filepath,0x00,FMGR_PATH_BUFFER_SIZE);
   pfnUnicodeStrcpy((S8 *)buf_filepath,(const S8 *)u8_g_game_dir);

    #ifndef NAND_SUPPORT
    if(fmgr_is_msdc_present() == FALSE)
    {
          DisplayPopup((PU8)GetString(STR_GLOBAL_NOTIFY_NO_MEMORY_CARD), IMG_GLOBAL_EMPTY,0, 1000, EMPTY_LIST_TONE);
          return;
    }
    #endif

    EntryNewScreen(SCREENID_GAMESIMU_LIST, NULL, EntryRomList, NULL);

    create_result = mmi_gamesimu_create_file_dir(buf_filepath);

    /* check if it is valid path */
    file_handle = FS_Open((PU16) buf_filepath, FS_OPEN_DIR | FS_READ_ONLY);

    if (file_handle >= 0)
    {
        FS_Close(file_handle);

        FMGR_FILTER_INIT(&filter);
	
	FMGR_FILTER_SET(&filter,FMGR_TYPE_NES);

        mmi_fmgr_select_path_and_enter(
            APP_GAME_SIMU,
            FMGR_SELECT_BROWSE,
            filter,
            buf_filepath,
            (PsExtFuncPtr) mmi_gamesimu_exit_from_fmgr);

        /* check if device is busy or not */
        if (FS_GetDevStatus(buf_filepath[0], FS_FEATURE_STATE_ENUM) == FS_DEVICE_BUSY)
        {
            /*  mmi_fmgr_select_path_and_enter will also add screen to histry */
            DeleteUptoScrID(SCREENID_GAMESIMU_LIST);

            /* Delete up to previous screen */
            DeleteNHistory(1);
        }
    }
    else
    {
        {
            /* storage is card */

            /* photo's path is not exist, and card is write protected, cant create photo folder */
            if (create_result == FS_WRITE_PROTECTION)
            {
                DisplayPopup(
                    (PU8) GetString(FMGR_FS_WRITE_PROTECTION_TEXT),
                    IMG_GLOBAL_WARNING,
                    1,
                    ST_NOTIFYDURATION,
                    WARNING_TONE);
            }
            else if (create_result == FS_DISK_FULL)
            {
                DisplayPopup(
                    (PU8) GetString(FMGR_FS_DISK_FULL_TEXT),
                    IMG_GLOBAL_WARNING,
                    1,
                    ST_NOTIFYDURATION,
                    WARNING_TONE);
            }
            else if (create_result == FS_ROOT_DIR_FULL)
            {
                DisplayPopup(
                    (PU8) GetString(FMGR_FS_ROOT_DIR_FULL_TEXT),
                    IMG_GLOBAL_WARNING,
                    1,
                    ST_NOTIFYDURATION,
                    WARNING_TONE);
            }
            else
            {
                DisplayPopup(
                    (PU8) GetString(STR_GLOBAL_NOTIFY_NO_MEMORY_CARD),
                    IMG_GLOBAL_WARNING,
                    1,
                    ST_NOTIFYDURATION,
                    WARNING_TONE);
            }

            DeleteUptoScrID(SCREENID_GAMESIMU);
            return;

        }
    }
#endif
}