PhnsetDisplay.c
上传用户:dengyu
上传日期:2022-05-01
资源大小:153k
文件大小:111k
- /*****************************************************************************
- * Copyright Statement:
- * --------------------
- * This software is protected by Copyright and the information contained
- * herein is confidential. The software may not be copied and the information
- * contained herein may not be used or disclosed except with the written
- * permission of MediaTek Inc. (C) 2005
- *
- * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
- * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
- * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
- * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
- * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
- * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
- * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
- * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
- * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
- * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
- *
- * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
- * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
- * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
- * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
- * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
- *
- * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
- * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
- * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
- * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
- * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
- *
- *****************************************************************************/
- /*****************************************************************************
- *
- * Filename:
- * ---------
- * PhnsetMenuService.c
- *
- * Project:
- * --------
- * MAUI
- *
- * Description:
- * ------------
- * This file is intends for phone setup menu service interface
- *
- * Author:
- * -------
- * -------
- *
- *============================================================================
- * HISTORY
- * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *------------------------------------------------------------------------------
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- ****************************************************************************/
- /*****************************************************************************
- * Include
- *****************************************************************************/
- /* Include: MMI header file */
- #include "MMI_include.h"
- #include "SettingMenuService.h"
- #include "settingGprots.h"
- #include "SettingDefs.h"
- #include "PhnsetProt.h"
- #include "CommonScreens.h"
- #include "MainMenuDef.h"
- #include "PhoneSetup.h"
- #include "PhoneSetupGprots.h"
- #include "IdleHomescreenGprot.h"
- /*****************************************************************************
- * Define
- *****************************************************************************/
- #ifdef __MMI_MOTION_DIAL__
- #ifndef PHNSET_MOTION_DIAL_NUM
- #define PHNSET_MOTION_DIAL_NUM 2
- #endif /* PHNSET_MOTION_DIAL_NUM */
- #endif /* __MMI_MOTION_DIAL__ */
- #ifdef __MMI_MOTION_MAINMENU__
- #ifndef PHNSET_MOTION_MAINMENU_NUM
- #define PHNSET_MOTION_MAINMENU_NUM 2
- #endif /* PHNSET_MOTION_DIAL_NUM */
- #endif /* __MMI_MOTION_MAINMENU__ */
- /*****************************************************************************
- * Typedef
- *****************************************************************************/
- /*****************************************************************************
- * Local Variable
- *****************************************************************************/
- /*****************************************************************************
- * Global Variable
- *****************************************************************************/
- extern PHNSET_CNTX *g_phnset_cntx_p;
- extern PU8 subMenuDataPtrs[MAX_SUB_MENUS];
- /*****************************************************************************
- * External Variable
- *****************************************************************************/
- /*****************************************************************************
- * Global Function
- *****************************************************************************/
- /*****************************************************************************
- * External Function
- *****************************************************************************/
- /*****************************************************************************
- * Local Function
- *****************************************************************************/
- /* Phone Setup Display */
- static void EntryPhnsetIdleScrDisp(void);
- static void ExitPhnsetIdleScrDisp(void);
- /* Display -> Main Menu Style */
- #ifdef __MMI_MAINMENU_STYLE_CHANGE_EN__
- static U8 PhnsetMainMenuStyleList(U8** pMainMenuStyleList, U16 total_style);
- static void EntryPhnsetMainMenuStyle(void);
- static void PhnsetMainMenuStyleSelectLskHdlr(void);
- #endif /* __MMI_MAINMENU_STYLE_CHANGE_EN__ */
- /* Display -> Dial Style */
- #ifdef __MMI_MOTION_DIAL__
- static U8 PhnsetDialStyleList(U8** pMainMenuStyleList, U16 total_style);
- static void EntryPhnsetDialStyle(void);
- static void PhnsetDialStyleSelectLskHdlr(void);
- #endif /* __MMI_MOTION_DIAL__ */
- /* Display -> VUI HomeScreen */
- #ifdef __MMI_VUI_HOMESCREEN__
- static void mmi_phnset_set_vui_homescreen_status(void);
- static void mmi_entry_phnset_vui_homescreen(void);
- #endif /* __MMI_VUI_HOMESCREEN__ */
- /* Display -> VUI Main Menu Effect */
- #ifdef __MMI_VUI_MAINMENU__
- static void mmi_entry_phnset_vui_mainmenu_effect(void);
- #endif /* __MMI_VUI_MAINMENU__ */
- /* Display -> Calendar In Idle */
- #ifdef __MMI_CALENDAR_ON_IDLE_SCREEN__
- static void PhnsetToggleShowCalendarIdleScreen(void);
- #endif /* __MMI_CALENDAR_ON_IDLE_SCREEN__ */
- /* Display -> Dual Clock In Idle */
- #ifdef __MMI_DUAL_CLOCK__
- static void PhnsetToggleDualClockState(void);
- #endif
- /* Display -> Operator HomeScreen */
- #ifdef __MMI_OP11_HOMESCREEN__
- /* under construction !*/
- /* under construction !*/
- #endif /* __MMI_OP11_HOMESCREEN__ */
- /* Display -> Operator ToolBar */
- /* Display -> Show Date And Time In Idle */
- static void PhnsetToggleShowDtTime(void);
- /* Display -> Show Owner Number In Idle */
- static void PhnsetToggleShowOwnNo(void);
- /* Display -> Show Operator Name In Idle */
- #ifdef __MMI_OPERATOR_NAME_MENU__
- static void PhnsetToggleShowOPN(void);
- #endif
- /* Display -> Clock Type In Idle */
- #ifdef __MMI_UI_TECHNO_IDLESCREEN_BAR__
- static void EntryPhnsetIdleClockType(void);
- static void ExitPhnsetIdleClockType(void);
- #endif
- /* Display -> Screen Switch Effect */
- #ifdef __MMI_SCREEN_SWITCH_EFFECT__
- static void EntryPhnsetScreenSwitchEffectScreen(void);
- #endif
- /*****************************************************************************
- * FUNCTION
- * HighlightPhnsetIdleScrDisp
- * DESCRIPTION
- * This function is highlight handler for Phone setup-> Display
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void HighlightPhnsetIdleScrDisp(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Change right soft key icon and label */
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- /* Register function for left soft key */
- SetLeftSoftkeyFunction(EntryPhnsetIdleScrDisp, KEY_EVENT_UP);
- SetKeyHandler(EntryPhnsetIdleScrDisp, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- /* Register function for right soft key */
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * EntryPhnsetIdleScrDisp
- * DESCRIPTION
- * This function is Exit function for Phone setup -> Display
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void EntryPhnsetIdleScrDisp(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 i = 0;
- U16 nStrItemList[MAX_SUB_MENUS]; /* Stores the strings id of submenus returned */
- U16 nNumofItem; /* Stores no of children in the submenu */
- U16 nDispAttribute; /* Stores display attribute */
- U8 *guiBuffer; /* Buffer holding history data */
- U8 *IdleScrDispType[MAX_SUB_MENUS];
- #ifdef __MMI_OP11_HOMESCREEN__
- /* under construction !*/
- #endif
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Call Exit Handler */
- EntryNewScreen(SCR_IDLE_SCR_DISP, ExitPhnsetIdleScrDisp, EntryPhnsetIdleScrDisp, NULL);
- /* Get current screen to guibuffer for history purposes */
- guiBuffer = GetCurrGuiBuffer(SCR_IDLE_SCR_DISP);
- for (i = 0; mmi_phnset_disp_hide_menu[i].menu_id != 0; i++)
- {
- if (mmi_phnset_disp_hide_menu[i].is_hide_func())
- {
- mmi_frm_hide_menu_item(mmi_phnset_disp_hide_menu[i].menu_id);
- }
- else
- {
- mmi_frm_unhide_menu_item(mmi_phnset_disp_hide_menu[i].menu_id);
- }
- }
- #ifdef __R301__
- mmi_frm_hide_menu_item(MENU_SETTING_IDLE_CLOCK_TYPE);
- #endif
- /* Retrieve no of child of menu item to be displayed */
- nNumofItem = GetNumOfChild_Ext(MENU_IDLE_SCR_DISP);
- /* Get attribute of menu to be displayed */
- nDispAttribute = GetDispAttributeOfItem(MENU_IDLE_SCR_DISP);
- /* Retrieve string ids in sequence of given menu item to be displayed */
- GetSequenceStringIds_Ext(MENU_IDLE_SCR_DISP, nStrItemList);
- /* Set current parent id */
- SetParentHandler(MENU_IDLE_SCR_DISP);
- /* Register highlight handler to be called in menu screen */
- RegisterHighlightHandler(ExecuteCurrHiliteHandler);
- /* Constrct Hint for Idle Screen Display */
- ConstructHintsList(MENU_IDLE_SCR_DISP, IdleScrDispType);
- /* Display Category Screen */
- ShowCategory52Screen(
- STR_IDLE_SCR_DISP,
- MAIN_MENU_TITLE_SETTINGS_ICON,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- nNumofItem,
- nStrItemList,
- (PU16) gIndexIconsImageList,
- IdleScrDispType,
- 0,
- 0,
- guiBuffer);
- DeleteScreenIfPresent(SCR_IDLE_SCR_DISP);
- #ifdef __MMI_OP11_HOMESCREEN__
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- #endif /* __MMI_OP11_HOMESCREEN__ */
- /* Register function with soft key */
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * ExitPhnsetIdleScrDisp
- * DESCRIPTION
- * This function is Exit function for Phone setup->Display
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void ExitPhnsetIdleScrDisp(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 error;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Save NVRAM only when value is changed for date time and
- own type on idle screen */
- if (g_phnset_cntx_p->ShowDtDirtyFlag == TRUE)
- {
- WriteValue(NVRAM_SETTING_STATUS_DT_TIME, &(g_phnset_cntx_p->curShowDtStatus), DS_BYTE, &error);
- g_phnset_cntx_p->ShowDtDirtyFlag = FALSE;
- }
- if (g_phnset_cntx_p->ShowOwnNumDirtyFlag == TRUE)
- {
- WriteValue(NVRAM_SETTING_OWNER_NO, &(g_phnset_cntx_p->curShowOwnNumStatus), DS_BYTE, &error);
- g_phnset_cntx_p->ShowOwnNumDirtyFlag = FALSE;
- }
- /* Lisen 0921-1 */
- #if defined(__MMI_OPERATOR_NAME_MENU__)
- if (g_phnset_cntx_p->ShowOPNDirtyFlag == TRUE)
- {
- WriteValue(NVRAM_SETTING_OPN_DISPLAY, &(g_phnset_cntx_p->curShowOPNStatus), DS_BYTE, &error);
- g_phnset_cntx_p->ShowOPNDirtyFlag = FALSE;
- }
- #endif /* defined(__MMI_OPERATOR_NAME_MENU__) */
- #ifdef __MMI_DUAL_CLOCK__
- /* Flag to write NVRAM in Exit Handler */
- if (g_phnset_cntx_p->ShowDualClockDirtyFlag == TRUE)
- {
- WriteValue(NVRAM_SET_DUALCLOCK_IDLESCREEN, &(g_phnset_cntx_p->curDualClockStatus), DS_BYTE, &error);
- g_phnset_cntx_p->ShowDualClockDirtyFlag = FALSE;
- }
- #endif /* __MMI_DUAL_CLOCK__ */
- #ifdef __MMI_CALENDAR_ON_IDLE_SCREEN__
- if (g_phnset_cntx_p->ShowCalendarIdleSrcDirtyFlag == TRUE)
- {
- if (GetActiveScreenId() != SCR_IDLE_SCR_DISP)
- {
- WriteValue(NVRAM_SET_CALENDAR_IDLESCREEN, &(g_phnset_cntx_p->curCalendarIdleScrStatus), DS_BYTE, &error);
- g_phnset_cntx_p->ShowCalendarIdleSrcDirtyFlag = FALSE;
- }
- }
- #endif /* __MMI_CALENDAR_ON_IDLE_SCREEN__ */
- }
- /* main menu style and motion main menu */
- #ifdef __MMI_MAINMENU_STYLE_CHANGE_EN__
- /*****************************************************************************
- * FUNCTION
- * HintPhnsetMainMenuStyle
- * DESCRIPTION
- * This function is Hint handler for Phone setup-> Display --> Main menu style
- * Follow functions:
- * PARAMETERS
- * index [IN]
- * a(?) [IN/OUT]
- * b(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void HintPhnsetMainMenuStyle(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- PS8 p = NULL;
- U8 style = PhnsetGetMainMenuStyle();
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- switch (style)
- {
- #ifdef __MMI_MAINMENU_MATRIX_SUPPORT__ /* 071705 Calvin added */
- case PHNSET_MAINMENU_STYLE_MATRIX:
- p = GetString(STR_MAINMENU_STYLE_MATRIX);
- break;
- #endif /* __MMI_MAINMENU_MATRIX_SUPPORT__ */
- #ifdef __MMI_MAINMENU_PAGE_SUPPORT__ /* 071705 Calvin added */
- case PHNSET_MAINMENU_STYLE_PAGE:
- p = GetString(STR_MAINMENU_STYLE_PAGE);
- break;
- #endif /* __MMI_MAINMENU_PAGE_SUPPORT__ */
- #ifdef __MMI_MAINMENU_LIST_SUPPORT__ /* 071705 Calvin added */
- case PHNSET_MAINMENU_STYLE_LIST:
- p = GetString(STR_MAINMENU_STYLE_LIST);
- break;
- #endif /* __MMI_MAINMENU_LIST_SUPPORT__ */
- #ifdef __MMI_MAINMENU_CIRCULAR_SUPPORT__ /* 071705 Calvin modified */
- case PHNSET_MAINMENU_STYLE_CIRCULE:
- p = GetString(STR_MAINMENU_STYLE_CIRCULAR);
- break;
- #endif /* __MMI_MAINMENU_CIRCULAR_SUPPORT__ */
- #ifdef __MMI_MAINMENU_ROTATE_SUPPORT__
- case PHNSET_MAINMENU_STYLE_ROTATE:
- p = GetString(STR_MAINMENU_STYLE_ROTATE); /* PDG1 Manish */
- break;
- #endif /* __MMI_MAINMENU_ROTATE_SUPPORT__ */
- #ifdef __MMI_MOTION_MAINMENU__
- case PHNSET_MAINMENU_STYLE_MOTION:
- {
- U16 motion_style = 0;
-
- motion_style = (U16)(g_phnset_cntx_p->MenuStyle - PHNSET_MAINMENU_STYLE_MOTION);
- switch(motion_style)
- {
- case 0:
- p = GetString(STR_ID_PHNSET_MOTION_MAINMENU_1);
- break;
-
- case 1:
- p = GetString(STR_ID_PHNSET_MOTION_MAINMENU_2);
- break;
-
- case 2:
- p = GetString(STR_ID_PHNSET_MOTION_MAINMENU_3);
- break;
-
- case 3:
- p = GetString(STR_ID_PHNSET_MOTION_MAINMENU_4);
- break;
-
- case 4:
- p = GetString(STR_ID_PHNSET_MOTION_MAINMENU_5);
- break;
-
- default:
- p = GetString(STR_GLOBAL_EMPTY);
- break;
- }
- }
- break;
- #endif /* __MMI_MOTION_MAINMENU__ */
- default:
- {
- p = GetString(STR_GLOBAL_EMPTY);
- }
- break;
- }
- mmi_ucs2cpy((PS8) hintData[index], (PS8) p);
- }
- /*****************************************************************************
- * FUNCTION
- * HighlightPhnsetMainMenuStyle
- * DESCRIPTION
- * This function is Highlight handler for Phonesetup->IdleScreenDisplay --> Mainmenu style
- * Follow functions: EntryPhnsetMainMenuStyle
- * PARAMETERS
- * void
- * a(?) [IN/OUT]
- * b(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void HighlightPhnsetMainMenuStyle(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Change right soft key icon and label */
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- /* Register function for left soft key */
- SetLeftSoftkeyFunction(EntryPhnsetMainMenuStyle, KEY_EVENT_UP);
- SetKeyHandler(EntryPhnsetMainMenuStyle, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- /* Register function for right soft key */
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * PhnsetMainMenuStyleList
- * DESCRIPTION
- * This function is construct string list for Phone setup->IdleScreenDisplay --> Main Menu Style
- * PARAMETERS
- * void
- * a(?) [IN/OUT]
- * b(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- static U8 PhnsetMainMenuStyleList(U8** pMainMenuStyleList, U16 total_style)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 i;
- U16 comm_style_str_id[12] = {0};
- U8 style_count = 0; /* count of style string */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_MAINMENU_MATRIX_SUPPORT__
- comm_style_str_id[0] = STR_MAINMENU_STYLE_MATRIX;
- #endif
- #ifdef __MMI_MAINMENU_PAGE_SUPPORT__
- comm_style_str_id[1] = STR_MAINMENU_STYLE_PAGE;
- #endif
- #ifdef __MMI_MAINMENU_LIST_SUPPORT__
- comm_style_str_id[2] = STR_MAINMENU_STYLE_LIST;
- #endif
- #ifdef __MMI_MAINMENU_CIRCULAR_SUPPORT__
- comm_style_str_id[3] = STR_MAINMENU_STYLE_CIRCULAR;
- #endif
- #ifdef __MMI_MAINMENU_ROTATE_SUPPORT__
- comm_style_str_id[4] = STR_MAINMENU_STYLE_ROTATE;
- #endif
- /* set common style string */
- for (i = 0; i < 6; i++)
- {
- if (comm_style_str_id[i] != 0)
- {
- pMainMenuStyleList[style_count] = (U8*)GetString(comm_style_str_id[i]);
- style_count++;
- }
- }
- #ifdef __MMI_MOTION_MAINMENU__
- /* set motion style string */
- for (i = 0; i < PHNSET_MOTION_MAINMENU_NUM; i++)
- {
- switch(i)
- {
- case 0:
- pMainMenuStyleList[style_count] = (U8*)GetString(STR_ID_PHNSET_MOTION_MAINMENU_1);
- break;
-
- case 1:
- pMainMenuStyleList[style_count] = (U8*)GetString(STR_ID_PHNSET_MOTION_MAINMENU_2);
- break;
-
- case 2:
- pMainMenuStyleList[style_count] = (U8*)GetString(STR_ID_PHNSET_MOTION_MAINMENU_3);
- break;
-
- case 3:
- pMainMenuStyleList[style_count] = (U8*)GetString(STR_ID_PHNSET_MOTION_MAINMENU_4);
- break;
-
- case 4:
- pMainMenuStyleList[style_count] = (U8*)GetString(STR_ID_PHNSET_MOTION_MAINMENU_5);
- break;
-
- default:
- pMainMenuStyleList[style_count] = (U8*)GetString(STR_GLOBAL_EMPTY);
- break;
- }
-
- style_count++;
- }
- #endif /* __MMI_MOTION_MAINMENU__ */
- return style_count;
- }
- /*****************************************************************************
- * FUNCTION
- * EntryPhnsetMainMenuStyle
- * DESCRIPTION
- * This function is Entry function for Phone setup->IdleScreenDisplay --> Main Menu Style
- * Following functions: HighlightPhnsetMainMenuStyleSelect
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void EntryPhnsetMainMenuStyle(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 nNumofItem; /* Stores no of children in the submenu */
- U16 nDispAttribute; /* Stores display attribue */
- U8 *guiBuffer; /* Buffer holding history data */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- //S16 Err=0;
- //U8 *IdleScrDispType[MAX_SUB_MENUS];
- /* Call Exit Handler */
- EntryNewScreen(SCR_MAINMENU_STYLE, NULL, EntryPhnsetMainMenuStyle, NULL);
- /* Get current screen to gui buffer for history purposes */
- guiBuffer = GetCurrGuiBuffer(SCR_MAINMENU_STYLE);
- /* Retrieve no of child of menu item to be displayed */
- #ifdef __MMI_MOTION_MAINMENU__
- nNumofItem = PHNSET_MAINMENU_STYLE_MOTION + PHNSET_MOTION_MAINMENU_NUM; /* Yvonne provide this marco */
- #else /* __MMI_MOTION_MAINMENU__ */
- nNumofItem = PHNSET_MAINMENU_STYLE_MAX;
- #endif /* __MMI_MOTION_MAINMENU__ */
- /* Get attribute of menu to be displayed */
- nDispAttribute = GetDispAttributeOfItem(MENU_SETTING_MAINMENU_STYLE);
- /* Retrieve string ids in sequence of given menu item to be displayed */
- PhnsetMainMenuStyleList(subMenuDataPtrs, nNumofItem);
- /* Set current parent id */
- SetParentHandler(MENU_SETTING_MAINMENU_STYLE);
- /* Display Category Screen */
- ShowCategory36Screen(
- STR_MAINMENU_STYLE,
- MAIN_MENU_TITLE_SETTINGS_ICON,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- nNumofItem,
- subMenuDataPtrs,
- (U16)g_phnset_cntx_p->MenuStyle,
- guiBuffer);
- /* Register function with softkey */
- SetLeftSoftkeyFunction(PhnsetMainMenuStyleSelectLskHdlr, KEY_EVENT_UP);
- SetKeyHandler(NULL, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * PhnsetMainMenuStyleSelectLskHdlr
- * DESCRIPTION
- * This function is left softkey handling function
- * for Phonesetup->IdleScreenDisplay -> MainMenu style -> Select
- * Functionality: Save the setting menu style
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void PhnsetMainMenuStyleSelectLskHdlr(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 HighlightItem = 0;
- S16 Err;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- HighlightItem = (U8) GetHighlightedItem();
- if (g_phnset_cntx_p->MenuStyle != HighlightItem)
- {
- g_phnset_cntx_p->MenuStyle = HighlightItem;
- WriteValue(NVRAM_SET_MAINMENU_STYLE, &(g_phnset_cntx_p->MenuStyle), DS_BYTE, &Err);
- }
- mmi_display_popup((UI_string_type) GetString(STR_GLOBAL_DONE), MMI_EVENT_SUCCESS);
- DeleteNScrId(SCR_MAINMENU_STYLE);
- }
- /*****************************************************************************
- * FUNCTION
- * PhnsetGetMainMenuStyle
- * DESCRIPTION
- * This function is to get setting main menu style
- * PARAMETERS
- * void
- * a(?) [IN/OUT]
- * b(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- U8 PhnsetGetMainMenuStyle(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_MOTION_MAINMENU__
- if (g_phnset_cntx_p->MenuStyle >= PHNSET_MAINMENU_STYLE_MOTION)
- {
- return PHNSET_MAINMENU_STYLE_MOTION;
- }
- #endif /* __MMI_MOTION_MAINMENU__ */
- return g_phnset_cntx_p->MenuStyle;
- }
- #ifdef __MMI_MOTION_MAINMENU__
- /*****************************************************************************
- * FUNCTION
- * GetMainMenuMotionStyle
- * DESCRIPTION
- * This function is to get content id of motion style
- * PARAMETERS
- * void
- * RETURNS
- * U16
- *****************************************************************************/
- U16 GetMainMenuMotionStyle(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
-
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if ((g_phnset_cntx_p->MenuStyle >= PHNSET_MAINMENU_STYLE_MOTION)
- && ((g_phnset_cntx_p->MenuStyle - PHNSET_MAINMENU_STYLE_MOTION) < PHNSET_MOTION_MAINMENU_NUM))
- {
- U16 motion_img_id;
- motion_img_id = (U16)(g_phnset_cntx_p->MenuStyle - PHNSET_MAINMENU_STYLE_MOTION);
- switch(motion_img_id)
- {
- case 0:
- return IMG_ID_SWFLASH_MAINMENU1;
- break;
- case 1:
- return IMG_ID_SWFLASH_MAINMENU2;
- break;
- case 2:
- return IMG_ID_SWFLASH_MAINMENU3;
- break;
- case 3:
- return IMG_ID_SWFLASH_MAINMENU3;
- break;
- case 4:
- return IMG_ID_SWFLASH_MAINMENU4;
- break;
- default:
- return 0;
- break;
- }
- }
- return 0;
- }
- #endif /* __MMI_MOTION_MAINMENU__ */
- #endif /* __MMI_MAINMENU_STYLE_CHANGE_EN__ */
- /* main menu style and motion main menu */
- /* motion dial style */
- #ifdef __MMI_MOTION_DIAL__
- /*****************************************************************************
- * FUNCTION
- * HighlightPhnsetDialStyle
- * DESCRIPTION
- * This function is Highlight handler for Phone setup->IdleScreenDisplay --> Dial style
- * Follow functions: EntryPhnsetDialStyle
- * PARAMETERS
- * void
- * a(?) [IN/OUT]
- * b(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void HighlightPhnsetDialStyle(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Change right soft key icon and label */
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- /* Register function for left soft key */
- SetLeftSoftkeyFunction(EntryPhnsetDialStyle, KEY_EVENT_UP);
- SetKeyHandler(EntryPhnsetDialStyle, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- /* Register function for right soft key */
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * HintPhnsetDialStyle
- * DESCRIPTION
- * This function is Hint handler for Phone setup->IdleScreenDisplay --> Dial style
- * Follow functions:
- * PARAMETERS
- * index [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void HintPhnsetDialStyle(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S8 *p = NULL;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_phnset_cntx_p->DialStyle < PHNSET_MOTION_DIAL_NUM)
- {
- switch(g_phnset_cntx_p->DialStyle)
- {
- case 0:
- p = GetString(STR_ID_PHNSET_MOTION_DIAL_1);
- break;
- case 1:
- p = GetString(STR_ID_PHNSET_MOTION_DIAL_2);
- break;
- case 2:
- p = GetString(STR_ID_PHNSET_MOTION_DIAL_3);
- break;
- case 3:
- p = GetString(STR_ID_PHNSET_MOTION_DIAL_4);
- break;
- case 4:
- p = GetString(STR_ID_PHNSET_MOTION_DIAL_5);
- break;
- default:
- p = GetString(STR_GLOBAL_EMPTY);
- break;
- }
- }
- else
- {
- p = GetString(STR_GLOBAL_EMPTY);
- }
- mmi_ucs2cpy((PS8) hintData[index], (PS8) p);
- }
- /*****************************************************************************
- * FUNCTION
- * PhnsetDialStyleList
- * DESCRIPTION
- * This function is construct string list for Phone setup->IdleScreenDisplay --> Dial Style
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static U8 PhnsetDialStyleList(U8** pMainMenuStyleList, U16 total_style)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 i;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- for (i = 0; i < total_style; i++)
- {
- switch(i)
- {
- case 0:
- pMainMenuStyleList[i] = (U8*)GetString(STR_ID_PHNSET_MOTION_DIAL_1);
- break;
-
- case 1:
- pMainMenuStyleList[i] = (U8*)GetString(STR_ID_PHNSET_MOTION_DIAL_2);
- break;
-
- case 2:
- pMainMenuStyleList[i] = (U8*)GetString(STR_ID_PHNSET_MOTION_DIAL_3);
- break;
-
- case 3:
- pMainMenuStyleList[i] = (U8*)GetString(STR_ID_PHNSET_MOTION_DIAL_4);
- break;
-
- case 4:
- pMainMenuStyleList[i] = (U8*)GetString(STR_ID_PHNSET_MOTION_DIAL_5);
- break;
-
- default:
- pMainMenuStyleList[i] = (U8*)GetString(STR_GLOBAL_EMPTY);
- break;
- }
- }
- return i;
- }
- /*****************************************************************************
- * FUNCTION
- * EntryPhnsetDialStyle
- * DESCRIPTION
- * This function is Entry function for Phone setup->IdleScreenDisplay --> Dial Style
- * Following functions: HighlightPhnsetDialStyle
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void EntryPhnsetDialStyle(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 nNumofItem; /* Stores no of children in the sub menu */
- U16 nDispAttribute; /* Stores display attribute */
- U8 *guiBuffer; /* Buffer holding history data */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Call Exit Handler */
- EntryNewScreen(SCR_ID_SETTING_DIAL_STYLE, NULL, EntryPhnsetDialStyle, NULL);
- /* Get current screen to GUI buffer for history purposes */
- guiBuffer = GetCurrGuiBuffer(SCR_ID_SETTING_DIAL_STYLE);
- /* Retrieve no of child of menu item to be displayed */
- nNumofItem = PHNSET_MOTION_DIAL_NUM;
- /* Get attribute of menu to be displayed */
- nDispAttribute = GetDispAttributeOfItem(MENU_SETTING_DIAL_STYLE);
- /* Retrieve string ids in sequence of given menu item to be displayed */
- //GetSequenceStringIds(MENU_SETTING_MAINMENU_STYLE, nStrItemList);
- PhnsetDialStyleList(subMenuDataPtrs, nNumofItem);
- /* Set current parent id */
- SetParentHandler(MENU_SETTING_DIAL_STYLE);
- /* Display Category Screen */
- ShowCategory36Screen(
- STR_ID_PHNSET_DIAL_STYLE,
- MAIN_MENU_TITLE_SETTINGS_ICON,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- nNumofItem,
- subMenuDataPtrs,
- (U16)g_phnset_cntx_p->DialStyle,
- guiBuffer);
- SetLeftSoftkeyFunction(PhnsetDialStyleSelectLskHdlr, KEY_EVENT_UP);
- SetKeyHandler(NULL, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- /* Register function with soft key */
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * PhnsetDialStyleSelectLskHdlr
- * DESCRIPTION
- * This function is left soft key handling function
- * for Phone setup->IdleScreenDisplay -> Dial style -> Select
- * Functionality: Save the setting dial style
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void PhnsetDialStyleSelectLskHdlr(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 HighlightItem = 0;
- S16 Err;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- HighlightItem = (U8) GetHighlightedItem();
- if (g_phnset_cntx_p->DialStyle != HighlightItem)
- {
- g_phnset_cntx_p->DialStyle = HighlightItem;
- WriteValue(NVRAM_SET_DIAL_STYLE, &(g_phnset_cntx_p->DialStyle), DS_BYTE, &Err);
- }
- mmi_display_popup((UI_string_type) GetString(STR_GLOBAL_DONE), MMI_EVENT_SUCCESS);
- DeleteNScrId(SCR_ID_SETTING_DIAL_STYLE);
- }
- /*****************************************************************************
- * FUNCTION
- * PhnsetGetDialStyle
- * DESCRIPTION
- * This function is to get value of dial motion style
- * PARAMETERS
- * void
- * RETURNS
- * U16
- *****************************************************************************/
- U16 PhnsetGetDialStyle(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
-
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- switch(g_phnset_cntx_p->DialStyle)
- {
- case 0:
- return IMG_ID_SWFLASH_DIALER1;
- break;
- case 1:
- return IMG_ID_SWFLASH_DIALER2;
- break;
- case 2:
- return IMG_ID_SWFLASH_DIALER3;
- break;
- case 3:
- return IMG_ID_SWFLASH_DIALER4;
- break;
- case 4:
- return IMG_ID_SWFLASH_DIALER5;
- break;
- default:
- return 0;
- break;
- }
-
- return 0;
- }
- #endif /* __MMI_MOTION_DIAL__ */
- /* motion dial style */
- /* VUI Home screen */
- #ifdef __MMI_VUI_HOMESCREEN__
- /*****************************************************************************
- * FUNCTION
- * mmi_phnset_get_vui_homescreen_status
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- U8 mmi_phnset_get_vui_homescreen_status(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return g_phnset_cntx_p->vui_home_screen;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_hint_phnset_vui_homescreen
- * DESCRIPTION
- *
- * PARAMETERS
- * index [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_hint_phnset_vui_homescreen(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- switch (g_phnset_cntx_p->vui_home_screen)
- {
- case 0:
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
- break;
- case 1:
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
- break;
- default:
- MMI_ASSERT(0);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_phnset_set_vui_homescreen_status
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void mmi_phnset_set_vui_homescreen_status(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 error;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_phnset_cntx_p->vui_home_screen = (U8)GetHighlightedItem();
- WriteValue(NVRAM_VUI_PHNSET_HOMESCREEN, &(g_phnset_cntx_p->vui_home_screen), DS_BYTE, &error);
- mmi_display_popup((UI_string_type) GetString(STR_GLOBAL_DONE), MMI_EVENT_SUCCESS);
- DeleteScreenIfPresent(SCR_ID_VUI_PHNSET_HOMESCREEN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_entry_phnset_vui_homescreen
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void mmi_entry_phnset_vui_homescreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *gui_buffer;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_VUI_PHNSET_HOMESCREEN, NULL, mmi_entry_phnset_vui_homescreen, NULL);
- gui_buffer = GetCurrGuiBuffer(SCR_ID_VUI_PHNSET_HOMESCREEN);
- subMenuDataPtrs[0] = (PU8) GetString(STR_GLOBAL_OFF);
- subMenuDataPtrs[1] = (PU8) GetString(STR_GLOBAL_ON);
- ShowCategory36Screen(
- STR_ID_VUI_PHNSET_HOMESCREEN,
- MAIN_MENU_TITLE_SETTINGS_ICON,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- 2,
- (U8 **)subMenuDataPtrs,
- g_phnset_cntx_p->vui_home_screen,
- gui_buffer);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- SetLeftSoftkeyFunction(mmi_phnset_set_vui_homescreen_status, KEY_EVENT_UP);
- SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_highlight_phnset_vui_homescreen
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_highlight_phnset_vui_homescreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* 1 Change left soft key icon and label */
- ChangeLeftSoftkey(STR_GLOBAL_OK, 0);
- /* 2 Change right soft key icon and label */
- ChangeRightSoftkey(STR_GLOBAL_BACK, 0);
- SetLeftSoftkeyFunction(mmi_entry_phnset_vui_homescreen, KEY_EVENT_UP);
- SetKeyHandler(mmi_entry_phnset_vui_homescreen, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- #endif /* __MMI_VUI_HOMESCREEN__ */
- /* VUI Home screen */
- /* VUI Main menu effect */
- #ifdef __MMI_VUI_MAINMENU__
- /*****************************************************************************
- * FUNCTION
- * mmi_phnset_get_vui_mm_effect_status
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- U8 mmi_phnset_get_vui_mm_effect_status(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return g_phnset_cntx_p->vui_mm_effect;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_hint_phnset_vui_mainmenu_effect
- * DESCRIPTION
- *
- * PARAMETERS
- * index [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_hint_phnset_vui_mainmenu_effect(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- switch (g_phnset_cntx_p->vui_mm_effect)
- {
- case 0:
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_ID_VUI_PHNSET_MAINMENU_EFFECT1));
- break;
- case 1:
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_ID_VUI_PHNSET_MAINMENU_EFFECT2));
- break;
-
- case 2:
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_ID_VUI_PHNSET_MAINMENU_EFFECT3));
- break;
-
- case 3:
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_ID_VUI_PHNSET_MAINMENU_EFFECT4));
- break;
-
- case 4:
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_ID_VUI_PHNSET_MAINMENU_EFFECT5));
- break;
- case 5:
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_NONE));
- break;
-
- default:
- MMI_ASSERT(0);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_phnset_set_vui_mainmenu_effect
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_phnset_set_vui_mainmenu_effect(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 error;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_phnset_cntx_p->vui_mm_effect = (U8)GetHighlightedItem();
- WriteValue(NVRAM_VUI_PHNSET_MAINMENU_EFFECT, &(g_phnset_cntx_p->vui_mm_effect), DS_BYTE, &error);
-
- mmi_display_popup((UI_string_type) GetString(STR_GLOBAL_DONE), MMI_EVENT_SUCCESS);
-
- DeleteScreenIfPresent(SCR_ID_VUI_PHNSET_MAINMENU_EFFECT);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_entry_phnset_vui_mainmenu_effect
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void mmi_entry_phnset_vui_mainmenu_effect(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *gui_buffer;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_VUI_PHNSET_MAINMENU_EFFECT, NULL, mmi_entry_phnset_vui_mainmenu_effect, NULL);
- gui_buffer = GetCurrGuiBuffer(SCR_ID_VUI_PHNSET_MAINMENU_EFFECT);
- subMenuDataPtrs[0] = (PU8) GetString(STR_ID_VUI_PHNSET_MAINMENU_EFFECT1);
- subMenuDataPtrs[1] = (PU8) GetString(STR_ID_VUI_PHNSET_MAINMENU_EFFECT2);
- subMenuDataPtrs[2] = (PU8) GetString(STR_ID_VUI_PHNSET_MAINMENU_EFFECT3);
- subMenuDataPtrs[3] = (PU8) GetString(STR_ID_VUI_PHNSET_MAINMENU_EFFECT4);
- subMenuDataPtrs[4] = (PU8) GetString(STR_ID_VUI_PHNSET_MAINMENU_EFFECT5);
- subMenuDataPtrs[5] = (PU8) GetString(STR_GLOBAL_NONE);
- ShowCategory36Screen(
- STR_ID_VUI_PHNSET_MAINMENU_EFFECT,
- MAIN_MENU_TITLE_SETTINGS_ICON,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- 6,
- (U8 **)subMenuDataPtrs,
- g_phnset_cntx_p->vui_mm_effect,
- gui_buffer);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- SetLeftSoftkeyFunction(mmi_phnset_set_vui_mainmenu_effect, KEY_EVENT_UP);
- SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_highlight_phnset_vui_mainmenu_effect
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_highlight_phnset_vui_mainmenu_effect(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* 1 Change left soft key icon and label */
- ChangeLeftSoftkey(STR_GLOBAL_OK, 0);
- /* 2 Change right soft key icon and label */
- ChangeRightSoftkey(STR_GLOBAL_BACK, 0);
- SetLeftSoftkeyFunction(mmi_entry_phnset_vui_mainmenu_effect, KEY_EVENT_UP);
- SetKeyHandler(mmi_entry_phnset_vui_mainmenu_effect, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- #endif /* __MMI_VUI_MAINMENU__ */
- /* VUI Main menu effect */
- /* calendar in idle screen */
- #ifdef __MMI_CALENDAR_ON_IDLE_SCREEN__
- /*****************************************************************************
- * FUNCTION
- * PhnsetGetCalendarIdleScreen
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * current calendar screen status
- *****************************************************************************/
- U8 PhnsetGetCalendarIdleScreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
-
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return g_phnset_cntx_p->curCalendarIdleScrStatus;
- }
- /*****************************************************************************
- * FUNCTION
- * PhnsetToggleShowCalendarIdleScreen
- * DESCRIPTION
- * This function is Left soft key handler
- * for Phone setup->IdleScreenDisplay-> Show Calendar IdleScreen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void PhnsetToggleShowCalendarIdleScreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 index;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- index = GetCurrHiliteID();
- /* If Own Number Display if Off then turn it On Pressing LSK */
- if (g_phnset_cntx_p->curCalendarIdleScrStatus == 0)
- {
- g_phnset_cntx_p->curCalendarIdleScrStatus = 1;
- }
- else
- {
- g_phnset_cntx_p->curCalendarIdleScrStatus = 0;
- }
- if (g_phnset_cntx_p->curCalendarIdleScrStatus)
- {
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
- Category52ChangeItemDescription(index, hintData[index]);
- ChangeLeftSoftkey(STR_GLOBAL_OFF, 0);
- }
- else
- {
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
- Category52ChangeItemDescription(index, hintData[index]);
- ChangeLeftSoftkey(STR_GLOBAL_ON, 0);
- }
- g_phnset_cntx_p->ShowCalendarIdleSrcDirtyFlag = TRUE;
- EntryPhnsetIdleScrDisp();
- }
- /*****************************************************************************
- * FUNCTION
- * HighlightPhnsetFontSize
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void HintPhnsetCalendarIdleScreen(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (PhnsetGetCalendarIdleScreen())
- {
- g_phnset_cntx_p->curCalendarIdleScrStatus = 1;
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
- }
- else
- {
- g_phnset_cntx_p->curCalendarIdleScrStatus = 0;
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
- }
- }
- /*****************************************************************************
- * FUNCTION
- * HighlightPhnsetCalendarIdleScreen
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void HighlightPhnsetCalendarIdleScreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
-
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* If Owner Number Is On Change The LSK to OFF otherwise ON. */
- if (PhnsetGetCalendarIdleScreen() == 1)
- {
- ChangeLeftSoftkey(STR_GLOBAL_OFF, 0);
- }
- else
- {
- ChangeLeftSoftkey(STR_GLOBAL_ON, 0);
- }
-
- /* Change right soft key icon and label */
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
-
- SetLeftSoftkeyFunction(PhnsetToggleShowCalendarIdleScreen, KEY_EVENT_UP);
- SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
-
- /* Register function for right soft key */
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- #endif /* __MMI_CALENDAR_ON_IDLE_SCREEN__ */
- /* calendar in idle screen */
- /* dual clock in idle */
- #ifdef __MMI_DUAL_CLOCK__
- /*****************************************************************************
- * FUNCTION
- * HighlightPhnsetCalendarIdleScreen
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void HighlightPhnsetDualClockIdleScreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
-
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (PhnsetGetDualClockState() == 1)
- {
- ChangeLeftSoftkey(STR_GLOBAL_OFF, 0);
- }
- else
- {
- ChangeLeftSoftkey(STR_GLOBAL_ON, 0);
- }
-
- /* Change right soft key icon and label */
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
-
- SetLeftSoftkeyFunction(PhnsetToggleDualClockState, KEY_EVENT_UP);
- SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
-
- /* Register function for right soft key */
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * HighlightPhnsetDualClockIdleScreen
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void HintPhnsetDualClockIdleScreen(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (PhnsetGetDualClockState())
- {
- g_phnset_cntx_p->curDualClockStatus = 1;
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
- }
- else
- {
- g_phnset_cntx_p->curDualClockStatus = 0;
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
- }
- }
- /*****************************************************************************
- * FUNCTION
- * PhnsetGetDualClockState
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * current calendar screen status
- *****************************************************************************/
- U8 PhnsetGetDualClockState(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
-
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_WC_TZ_SUPPORT__
- return g_phnset_cntx_p->curDualClockStatus;
- #else
- /* if not support world clock time zone user can't set foreign city and dual clock */
- return 0;
- #endif
- }
- /*****************************************************************************
- * FUNCTION
- * PhnsetToggleDualClockState
- * DESCRIPTION
- * This function is Left soft key handler
- * for Phone setup->IdleScreenDisplay-> Show Calendar IdleScreen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void PhnsetToggleDualClockState(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 index;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- index = (U16)GetCurrHiliteID();
- /* If Own Number Display if Off then turn it On Pressing LSK */
- if (PhnsetGetDualClockState() == 0)
- {
- g_phnset_cntx_p->curDualClockStatus = 1;
- }
- else
- {
- g_phnset_cntx_p->curDualClockStatus = 0;
- }
- /* Flag to write NVRAM in Exit Handler */
- g_phnset_cntx_p->ShowDualClockDirtyFlag = TRUE;
- if (PhnsetGetDualClockState())
- {
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
- Category52ChangeItemDescription(index, hintData[index]);
- ChangeLeftSoftkey(STR_GLOBAL_OFF, 0);
- }
- else
- {
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
- Category52ChangeItemDescription(index, hintData[index]);
- ChangeLeftSoftkey(STR_GLOBAL_ON, 0);
- }
- RedrawCategoryFunction();
- HighlightPhnsetDualClockIdleScreen();
-
- }
- #endif /* __MMI_DUAL_CLOCK__ */
- /* dual clock in idle */
- /* operator home screen */
- #ifdef __MMI_OP11_HOMESCREEN__
- /* 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 !*/
- /* 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 !*/
- /* 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 !*/
- /* 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 !*/
- /* 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 !*/
- /* 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 !*/
- /* 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 !*/
- /* 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 !*/
- /* 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 /* __MMI_OP11_HOMESCREEN__ */
- /* operator home screen */
- /* operator toolbar */
- #ifdef __MMI_OP12_TOOLBAR__
- /*****************************************************************************
- * FUNCTION
- * HighlightPhnsetToolBarStatus
- * DESCRIPTION
- * high light handler for phone setup tool bar menu item
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void HighlightPhnsetToolBarStatus(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
-
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ChangeLeftSoftkey(STR_GLOBAL_OK, 0);
-
- /* Change right soft key icon and label */
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
-
- SetLeftSoftkeyFunction(mmi_tb_entry_toolbar_setting, KEY_EVENT_UP);
- SetKeyHandler(mmi_tb_entry_toolbar_setting, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
-
- /* Register function for right soft key */
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * HintPhnsetHomeScreenStatus
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void HintPhnsetToolBarStatus(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (mmi_tb_is_set_on())
- {
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
- }
- else
- {
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
- }
- }
- #endif /* __MMI_OP12_TOOLBAR__ */
- /* operator toolbar */
- /* show date and time in idle */
- /*****************************************************************************
- * FUNCTION
- * HighlightPhnsetShowDtTime
- * DESCRIPTION
- * This function is highlight handler for Phonesetup->IdleScreenDisplay-> Show Date and Time
- * Follow functions:
- * PARAMETERS
- * void
- * a(?) [IN/OUT]
- * b(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void HighlightPhnsetShowDtTime(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* If Show Date Time if On Show LSK as OFF otherwise On. */
- if (g_phnset_cntx_p->curShowDtStatus)
- {
- ChangeLeftSoftkey(STR_GLOBAL_OFF, 0);
- }
- else
- {
- ChangeLeftSoftkey(STR_GLOBAL_ON, 0);
- }
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(PhnsetToggleShowDtTime, KEY_EVENT_UP);
- SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * HintPhnsetShowDateTime
- * DESCRIPTION
- * This function is hint handling function
- * for Phonesetup -> Language
- * Functionality:
- * PARAMETERS
- * index [IN]
- * a(?) [IN/OUT]
- * b(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void HintPhnsetShowDateTime(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (PhnsetGetShowDateTimeStatus())
- {
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
- }
- else
- {
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
- }
- }
- /*****************************************************************************
- * FUNCTION
- * PhnsetToggleShowDtTime
- * DESCRIPTION
- * This function is Left softkey handler
- * for Phonesetup->IdleScreenDisplay-> Show Date and Time
- * PARAMETERS
- * void
- * a(?) [IN/OUT]
- * b(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- static void PhnsetToggleShowDtTime(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 index;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- index = GetCurrHiliteID();
- /* if show date time is on change it off */
- if (g_phnset_cntx_p->curShowDtStatus)
- {
- g_phnset_cntx_p->curShowDtStatus = 0;
- }
- /* else change it on */
- else
- {
- g_phnset_cntx_p->curShowDtStatus = 1;
- }
- /* Flag to Indicate Value is changed, will be used on exit Handler of menu */
- g_phnset_cntx_p->ShowDtDirtyFlag = TRUE;
- if (g_phnset_cntx_p->curShowDtStatus)
- {
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
- Category52ChangeItemDescription(index, hintData[index]);
- ChangeLeftSoftkey(STR_GLOBAL_OFF, 0);
- }
- else
- {
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
- Category52ChangeItemDescription(index, hintData[index]);
- ChangeLeftSoftkey(STR_GLOBAL_ON, 0);
- }
- /* Redraw the Category Screen As Hint Handler and LSK are going to Change */
- RedrawCategoryFunction();
- /* After redraw hight the ShowDateTime */
- HighlightPhnsetShowDtTime();
- }
- /*****************************************************************************
- * FUNCTION
- * PhnsetSetShowDTStatus
- * DESCRIPTION
- * This function is to set show data time statu on/off
- * Follow functions:
- * PARAMETERS
- * status [IN]
- * a(?) [IN/OUT]
- * b(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void PhnsetSetShowDTStatus(U8 status)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_phnset_cntx_p->curShowDtStatus = status;
- }
- /*****************************************************************************
- * FUNCTION
- * PhnsetGetShowDateTimeStatus
- * DESCRIPTION
- * This function is to get show date/time on/off status
- * Functionality:
- * PARAMETERS
- * void
- * a(?) [IN/OUT]
- * b(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- MMI_BOOL PhnsetGetShowDateTimeStatus(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 data = 0;
- S16 error;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ReadValue(NVRAM_SETTING_STATUS_DT_TIME, &data, DS_BYTE, &error);
- if (data == 0)
- {
- return MMI_FALSE;
- }
- else
- {
- return MMI_TRUE;
- }
- }
- /* show date and time in idle */
- /* show owner number in idle */
- /*****************************************************************************
- * FUNCTION
- * HighlightPhnsetShowOwnNo
- * DESCRIPTION
- * This function is highlight handler for Phonesetup->IdleScreenDisplay->Show Owner Number
- * Follow functions:
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void HighlightPhnsetShowOwnNo(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* If Owner Number Is On Change The LSK to OFF otherwise ON. */
- if (g_phnset_cntx_p->curShowOwnNumStatus == 1)
- {
- ChangeLeftSoftkey(STR_GLOBAL_OFF, 0);
- }
- else
- {
- ChangeLeftSoftkey(STR_GLOBAL_ON, 0);
- }
- /* Change right soft key icon and label */
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(PhnsetToggleShowOwnNo, KEY_EVENT_UP);
- SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- /* Register function for right soft key */
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * HintPhnsetOwnerNum
- * DESCRIPTION
- * This function is hint handling function
- * for Phonesetup -> Language
- * Functionality:
- * PARAMETERS
- * index [IN]
- * a(?) [IN/OUT]
- * b(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void HintPhnsetOwnerNum(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (PhnsetGetShowOwnerNumStatus())
- {
- g_phnset_cntx_p->curShowOwnNumStatus = 1;
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
- }
- else
- {
- g_phnset_cntx_p->curShowOwnNumStatus = 0;
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
- }
- }
- /*****************************************************************************
- * FUNCTION
- * PhnsetToggleShowOwnNo
- * DESCRIPTION
- * This function is Left soft key handler
- * for Phone setup-> Display-> Show owner number
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void PhnsetToggleShowOwnNo(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 index;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- index = GetCurrHiliteID();
- if (g_phnset_cntx_p->curShowOwnNumStatus == 0)
- {
- g_phnset_cntx_p->curShowOwnNumStatus = 1;
- }
- else
- {
- g_phnset_cntx_p->curShowOwnNumStatus = 0;
- }
- /* Flag to write NVRAM in Exit Handler */
- g_phnset_cntx_p->ShowOwnNumDirtyFlag = TRUE;
- if (g_phnset_cntx_p->curShowOwnNumStatus)
- {
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
- Category52ChangeItemDescription(index, hintData[index]);
- ChangeLeftSoftkey(STR_GLOBAL_OFF, 0);
- }
- else
- {
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
- Category52ChangeItemDescription(index, hintData[index]);
- ChangeLeftSoftkey(STR_GLOBAL_ON, 0);
- }
- RedrawCategoryFunction();
- HighlightPhnsetShowOwnNo();
- }
- /*****************************************************************************
- * FUNCTION
- * PhnsetGetShowOwnerNumStatus
- * DESCRIPTION
- * This function is to get show owner number on/off status
- * Functionality:
- * PARAMETERS
- * void
- * a(?) [IN/OUT]
- * b(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- MMI_BOOL PhnsetGetShowOwnerNumStatus(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 data = 0;
- S16 error;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ReadValue(NVRAM_SETTING_OWNER_NO, &data, DS_BYTE, &error);
- if (data == 1)
- {
- return MMI_TRUE;
- }
- else
- {
- return MMI_FALSE;
- }
- }
- /* show owner number in idle */
- /* show operator name in idle */
- #ifdef __MMI_OPERATOR_NAME_MENU__
- /*****************************************************************************
- * FUNCTION
- * HighlightPhnsetShowOPN
- * DESCRIPTION
- * This function is highlight handler for Phonesetup->IdleScreenDisplay->Show Operator Name
- * Follow functions:
- * PARAMETERS
- * void
- * a(?) [IN/OUT]
- * b(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void HighlightPhnsetShowOPN(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_phnset_cntx_p->curShowOPNStatus == 1)
- {
- ChangeLeftSoftkey(STR_GLOBAL_OFF, 0);
- }
- else
- {
- ChangeLeftSoftkey(STR_GLOBAL_ON, 0);
- }
- /* Change right soft key icon and label */
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(PhnsetToggleShowOPN, KEY_EVENT_UP);
- SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- /* Register function for right soft key */
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * HintPhnsetOPN
- * DESCRIPTION
- * This function is hint handling function
- * for Phonesetup -> Language
- * Functionality:
- * PARAMETERS
- * index [IN]
- * a(?) [IN/OUT]
- * b(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void HintPhnsetOPN(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (PhnsetGetShowOPNStatus())
- {
- g_phnset_cntx_p->curShowOPNStatus = 1;
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
- }
- else
- {
- g_phnset_cntx_p->curShowOPNStatus = 0;
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
- }
- }
- /*****************************************************************************
- * FUNCTION
- * PhnsetToggleShowOPN
- * DESCRIPTION
- * This function is Left softkey handler
- * for Phonesetup->IdleScreenDisplay-> Show Operator Name
- * PARAMETERS
- * void
- * a(?) [IN/OUT]
- * b(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- static void PhnsetToggleShowOPN(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 index;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- index = GetCurrHiliteID();
- if (g_phnset_cntx_p->curShowOPNStatus == 0)
- {
- g_phnset_cntx_p->curShowOPNStatus = 1;
- }
- else
- {
- g_phnset_cntx_p->curShowOPNStatus = 0;
- }
- /* Flag to write NVRAM in Exit Handler */
- g_phnset_cntx_p->ShowOPNDirtyFlag = TRUE;
- if (g_phnset_cntx_p->curShowOPNStatus)
- {
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
- Category52ChangeItemDescription(index, hintData[index]);
- ChangeLeftSoftkey(STR_GLOBAL_OFF, 0);
- }
- else
- {
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
- Category52ChangeItemDescription(index, hintData[index]);
- ChangeLeftSoftkey(STR_GLOBAL_ON, 0);
- }
- RedrawCategoryFunction();
- HighlightPhnsetShowOPN();
- }
- /*****************************************************************************
- * FUNCTION
- * PhnsetGetShowOPNStatus
- * DESCRIPTION
- * This function is to get show owner number on/off status
- * Functionality:
- * PARAMETERS
- * void
- * a(?) [IN/OUT]
- * b(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- MMI_BOOL PhnsetGetShowOPNStatus(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 data = 0;
- S16 error;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ReadValue(NVRAM_SETTING_OPN_DISPLAY, &data, DS_BYTE, &error);
- if (data == 0)
- {
- return MMI_FALSE;
- }
- else
- {
- return MMI_TRUE;
- }
- }
- #endif /* __MMI_OPERATOR_NAME_MENU__ */
- /* show operator name in idle */
- /* clock type in idle */
- #ifdef __MMI_UI_TECHNO_IDLESCREEN_BAR__
- /*****************************************************************************
- * FUNCTION
- * PhnsetReadIdleClockType
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void PhnsetReadIdleClockType(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 error;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ReadValue(NVRAM_PHNSET_IDLE_CLOCK_TYPE, &(g_phnset_cntx_p->curtCLKType), DS_BYTE, &error);
- if (g_phnset_cntx_p->curtCLKType > 1)
- {
- /* different default value for HVGA Main LCD modify */
- #ifdef __MMI_MAINLCD_320X480__
- g_phnset_cntx_p->curtCLKType = 1;
- #else
- g_phnset_cntx_p->curtCLKType = 1; // 0; modified by licjd
- #endif /* __MMI_MAINLCD_320X480__ */
- WriteValue(NVRAM_PHNSET_IDLE_CLOCK_TYPE, &(g_phnset_cntx_p->curtCLKType), DS_BYTE, &error);
- }
- wgui_set_clock_type((U8) g_phnset_cntx_p->curtCLKType);
- }
- /*****************************************************************************
- * FUNCTION
- * HintPhnsetIdleClockType
- * DESCRIPTION
- *
- * PARAMETERS
- * index [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void HintPhnsetIdleClockType(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- switch (g_phnset_cntx_p->curtCLKType)
- {
- /*
- * case MMI_PHNSET_IDLECLKTYPE_NONE:
- * mmi_ucs2cpy((PS8)hintData[index],(PS8)GetString(STR_GLOBAL_NONE));
- * break;
- */
- case MMI_PHNSET_IDLECLKTYPE_DIGITAL:
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_ID_PHNSET_DISPCHAR_DIGITAL));
- break;
- case MMI_PHNSET_IDLECLKTYPE_ANALOG:
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_ID_PHNSET_DISPCHAR_ANALOG));
- break;
- default:
- MMI_ASSERT(0);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * PhnsetIdleClockType
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void PhnsetIdleClockType(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 error;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_phnset_cntx_p->curtCLKType = (U8)GetHighlightedItem();
- WriteValue(NVRAM_PHNSET_IDLE_CLOCK_TYPE, &(g_phnset_cntx_p->curtCLKType), DS_BYTE, &error);
- wgui_set_clock_type((U8) g_phnset_cntx_p->curtCLKType);
- g_phnset_cntx_p->isCorrectSet = 1;
- mmi_display_popup((UI_string_type) GetString(STR_GLOBAL_DONE), MMI_EVENT_SUCCESS);
- }
- /*****************************************************************************
- * FUNCTION
- * ExitPhnsetIdleClockType
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void ExitPhnsetIdleClockType(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_phnset_cntx_p->isCorrectSet)
- {
- DeleteUptoScrID(SCR_IDLE_SCR_DISP);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * EntryPhnsetIdleClockType
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void EntryPhnsetIdleClockType(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *pGuiBuffer;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_PHNSET_IDLE_CLOCK_TYPE, ExitPhnsetIdleClockType, EntryPhnsetIdleClockType, NULL);
- g_phnset_cntx_p->isCorrectSet = 0;
- pGuiBuffer = GetCurrGuiBuffer(SCR_ID_PHNSET_IDLE_CLOCK_TYPE);
- /*
- * subMenuDataPtrs[MMI_PHNSET_IDLECLKTYPE_NONE] = (PU8)GetString( STR_GLOBAL_NONE );;
- */
- subMenuDataPtrs[MMI_PHNSET_IDLECLKTYPE_ANALOG] = (PU8) GetString(STR_ID_PHNSET_DISPCHAR_ANALOG);
- subMenuDataPtrs[MMI_PHNSET_IDLECLKTYPE_DIGITAL] = (PU8) GetString(STR_ID_PHNSET_DISPCHAR_DIGITAL);
- if (g_phnset_cntx_p->curtCLKType > 1)
- {
- PhnsetReadIdleClockType(); /* __USB_IN_NORMAL_MODE__ */
- }
- ShowCategory36Screen(
- STR_ID_IDLE_CLOCK_TYPE,
- MAIN_MENU_TITLE_SETTINGS_ICON,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- MMI_PHNSET_IDLECLKTYPE_MAX,
- (U8 **) subMenuDataPtrs,
- g_phnset_cntx_p->curtCLKType,
- pGuiBuffer);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- SetLeftSoftkeyFunction(PhnsetIdleClockType, KEY_EVENT_UP);
- SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * HighlightPhnsetIdleClockType
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void HighlightPhnsetIdleClockType(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ChangeLeftSoftkey(STR_GLOBAL_OK, 0);
- ChangeRightSoftkey(STR_GLOBAL_BACK, 0);
- SetLeftSoftkeyFunction(EntryPhnsetIdleClockType, KEY_EVENT_UP);
- SetKeyHandler(EntryPhnsetIdleClockType, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- #endif /* defined(__MMI_UI_TECHNO_IDLESCREEN_BAR__) */
- /* clock type in idle */
- /* screen switch effect */
- #ifdef __MMI_SCREEN_SWITCH_EFFECT__
- /*****************************************************************************
- * FUNCTION
- * HighlightPhnsetScreenSwitchEffectStatus
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void HighlightPhnsetScreenSwitchEffectStatus(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
-
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
-
- SetLeftSoftkeyFunction(EntryPhnsetScreenSwitchEffectScreen, KEY_EVENT_UP);
- SetKeyHandler(EntryPhnsetScreenSwitchEffectScreen, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
-
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * HintPhnsetScreenSwitchEffectStatus
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void HintPhnsetScreenSwitchEffectStatus(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- mmi_phnset_sse_status_enum ss_status = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ss_status = PhnsetGetScreenSwitchEffectStatus();
- switch(ss_status)
- {
- case MMI_PHNSET_SSE_NONE:
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_NONE));
- break;
- case MMI_PHNSET_SSE_SIMPLE:
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_ID_PHNSET_SSE_SIMPLE));
- break;
- case MMI_PHNSET_SSE_FULL:
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_ID_PHNSET_SSE_FULL));
- break;
- default:
- break;
- }
-
- }
- /*****************************************************************************
- * FUNCTION
- * PhnsetGetScreenSwitchEffectStatus
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * current screen switch effect status
- *****************************************************************************/
- mmi_phnset_sse_status_enum PhnsetGetScreenSwitchEffectStatus(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return g_phnset_cntx_p->curScrSwitchEffect;
- }
- /*****************************************************************************
- * FUNCTION
- * PhnsetScreenSwitchEffectHandler
- * DESCRIPTION
- * set LSK of screen switch effect screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void PhnsetScreenSwitchEffectHandler(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- mmi_phnset_sse_status_enum status = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- status = (mmi_phnset_sse_status_enum)GetHighlightedItem();
- PhnsetSetScreenSwitchEffectStatus(status);
- mmi_display_popup((UI_string_type) GetString(STR_GLOBAL_DONE), MMI_EVENT_SUCCESS);
- DeleteScreenIfPresent(SCR_ID_PHNSET_SCREENSWITCH_SCREEN);
- }
- /*****************************************************************************
- * FUNCTION
- * EntryPhnsetScreenSwitchEffectScreen
- * DESCRIPTION
- * This function is Left soft key handler for Phone setup->IdleScreenDisplay-> Screen Switch Effect
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void EntryPhnsetScreenSwitchEffectScreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer; /* Buffer holding history data */
- U16 nStrItemList[3] = {STR_GLOBAL_NONE, STR_ID_PHNSET_SSE_SIMPLE, STR_ID_PHNSET_SSE_FULL};
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_PHNSET_SCREENSWITCH_SCREEN, NULL, EntryPhnsetScreenSwitchEffectScreen, NULL);
-
- guiBuffer = GetCurrGuiBuffer(SCR_ID_PHNSET_SCREENSWITCH_SCREEN);
- SetParentHandler(MENU_ID_PHNSET_SCRSWITCH_EFFECT);
-
- ShowCategory11Screen(STR_ID_PHNSET_SCREEN_SWITCH_EFFECT,
- MAIN_MENU_TITLE_SETTINGS_ICON,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- MMI_PHNSET_SSE_NUM,
- nStrItemList,
- (U16)g_phnset_cntx_p->curScrSwitchEffect,
- guiBuffer);
-
- /* 10.Register function with soft key */
- SetLeftSoftkeyFunction(PhnsetScreenSwitchEffectHandler, KEY_EVENT_UP);
- SetKeyHandler(NULL, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * PhnsetSetScreenSwitchEffectStatus
- * DESCRIPTION
- * Set current ScreenSwitchEffect Status
- * PARAMETERS
- * MMI_BOOL
- * RETURNS
- * void
- *****************************************************************************/
- void PhnsetSetScreenSwitchEffectStatus(mmi_phnset_sse_status_enum status)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 error;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_phnset_cntx_p->curScrSwitchEffect = status;
- WriteValue(NVRAM_SET_SCREFFECT_STYLE, &(g_phnset_cntx_p->curScrSwitchEffect), DS_BYTE, &error);
- }
- #endif /* __MMI_SCREEN_SWITCH_EFFECT__ */
- /* screen switch effect */
- #ifdef __MMI_FREETYPE_SETTING_SUPPORT__
- extern void gui_freetype_set_size(U8 size);
- extern MMI_theme **MMI_themes;
- mmi_phnset_freetype_status_enum PhnsetGetFreeTypeSetting(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 data = 0;
- S16 error;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ReadValue(NVRAM_FREETYPE_SETTING, &data, DS_BYTE, &error);
- if (data == 0xff)
- {
- data = 1;
- WriteValue(NVRAM_FREETYPE_SETTING, &data, DS_BYTE, &error);
- }
- return (mmi_phnset_freetype_status_enum) (data);
- }
- static void PhnsetFreeTypeSettingHandler(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- mmi_phnset_freetype_status_enum status = 0;
- S16 error;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- status = (mmi_phnset_freetype_status_enum)GetHighlightedItem();
- gui_freetype_set_size(status);
- WriteValue(NVRAM_FREETYPE_SETTING, &status, DS_BYTE, &error);
-
- wgui_softkey_reset_theme(MMI_LEFT_SOFTKEY);
- wgui_softkey_reset_theme(MMI_RIGHT_SOFTKEY);
-
- set_MMI_theme((MMI_theme*) MMI_themes[0]);
-
- DisplayPopup((PU8) GetString(STR_GLOBAL_PLEASE_WAIT),
- IMG_GLOBAL_UNFINISHED,
- 1,
- ST_NOTIFYDURATION,
- 0
- );
- DeleteScreenIfPresent(SCR_ID_PHNSET_FREETYPE_SETTING);
- }
- static void EntryFreeTypeSetting(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 nStrItemList[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 */
- U8 data1 = 0;
- S16 error1 = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_PHNSET_FREETYPE_SETTING, NULL, EntryFreeTypeSetting, NULL);
- /* 2 Get current screen to gui buffer for history purposes */
- guiBuffer = GetCurrGuiBuffer(SCR_ID_PHNSET_FREETYPE_SETTING);
- /* 3 Retrieve no of child of menu item to be displayed */
- nNumofItem = GetNumOfChild(MENU_ID_PHNSET_FREETYPE_SETTING);
- /* 4 Retrieve string ids in sequence of given menu item to be displayed */
- GetSequenceStringIds(MENU_ID_PHNSET_FREETYPE_SETTING, nStrItemList);
- /* 5 Set current parent id */
- SetParentHandler(MENU_ID_PHNSET_FREETYPE_SETTING);
- /* 6 Register highlight handler to be called in menu screen */
- //RegisterHighlightHandler(AutoKeyPadLockTimeHandler);
- data1 = PhnsetGetFreeTypeSetting();
- /* 8 Display Category11 Screen */
- ShowCategory11Screen(
- STR_ID_PHNSET_FREETYPE_SETTING,
- MAIN_MENU_TITLE_SETTINGS_ICON,
- STR_GLOBAL_OK,
- 0,
- STR_GLOBAL_BACK,
- 0,
- nNumofItem,
- nStrItemList,
- (U16) data1,
- guiBuffer);
- /* 9 Register function with right softkey */
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetLeftSoftkeyFunction(PhnsetFreeTypeSettingHandler, KEY_EVENT_UP);
- SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- void HighlightFreeTypeSetting(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* 1 Change left soft key icon and label */
- ChangeLeftSoftkey(STR_GLOBAL_OK, 0);
- /* 2 Change right soft key icon and label */
- ChangeRightSoftkey(STR_GLOBAL_BACK, 0);
- /* 3 Register function for left soft key */
- SetLeftSoftkeyFunction(EntryFreeTypeSetting, KEY_EVENT_UP);
- SetKeyHandler(EntryFreeTypeSetting, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- /* 4 Register function for right soft key */
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- void HintFreeTypeSetting(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- mmi_phnset_freetype_status_enum freetype_status = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- freetype_status = PhnsetGetFreeTypeSetting();
- memset((S8*) hintData[(index)], 0, MAX_SUB_MENU_SIZE);
-
- switch(freetype_status)
- {
- case MMI_PHNSET_FREETYPE_SMALL:
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_ID_PHNSET_FREETYPE_SMALL));
- break;
- case MMI_PHNSET_FREETYPE_MEDIUM:
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_ID_PHNSET_FREETYPE_MEDIUM));
- break;
- case MMI_PHNSET_FREETYPE_LARGE:
- mmi_ucs2cpy((PS8) hintData[index], (PS8) GetString(STR_ID_PHNSET_FREETYPE_LARGE));
- break;
- default:
- break;
- }
-
- }
- #endif