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

📄 mmibookshared.c

📁 GSM手机设计软件代码
💻 C
📖 第 1 页 / 共 4 页
字号:
/*******************************************************************************

          CONDAT (UK)

********************************************************************************

 This software product is the property of Condat (UK) Ltd and may not be
 disclosed to any third party without the express permission of the owner.

********************************************************************************

 $Project name: Basic MMI
 $Project code: BMI (6349)
 $Module:   PhoneBook
 $File:       MmiBookShared.c
 $Revision:   1.0

 $Author:   Condat(UK)
 $Date:       25/10/00

********************************************************************************

 Description:

    Shared definitions of data elements are made in here
    and accessed via the primitive operations supplied

********************************************************************************

 $History: MmiBookShared.c

  25/10/00      Original Condat(UK) BMI version.

 $End

*******************************************************************************/


/*******************************************************************************

                                Include Files

*******************************************************************************/
 

#define ENTITY_MFW

/* includes */
#include <string.h>
#include <stdio.h>
#include <stdlib.h>

#if defined (NEW_FRAME)

#include "typedefs.h"
#include "vsi.h"
#include "pei.h"
#include "custom.h"
#include "gsm.h"

#else

#include "stddefs.h"
#include "custom.h"
#include "gsm.h"
#include "vsi.h"

#endif
#include "mfw_sys.h"

#include "mfw_mfw.h"
#include "mfw_win.h"
#include "mfw_kbd.h"
#include "mfw_lng.h"
/* SPR#1428 - SH -New Editor changes */
#ifndef NEW_EDITOR
#include "mfw_edt.h"
#endif
#include "mfw_icn.h"
#include "mfw_mnu.h"
#include "mfw_tim.h"

#include "mfw_sim.h"
#include "mfw_cm.h"
#include "mfw_nm.h"
#include "mfw_phb.h"
#include "mfw_mme.h"
#include "mfw_sat.h"
#include "mfw_sms.h"

#include "dspl.h"

#include "ksd.h"
#include "psa.h"

#include "MmiMain.h"
#include "MmiBookController.h"
#include "MmiDummy.h"
#include "MmiDialogs.h"
#include "MmiLists.h"
#include "MmiMenu.h"
#include "MmiCall.h"
#include "MmiIcons.h"
#include "MmiIdle.h"

#include "MmiSoftKeys.h"
#include "MmiSounds.h"
#include "MmiIdle.h"
#include "MmiNetwork.h"
#include "MmiSat_i.h"
#include "MmiAoc.h"

#include "gdi.h"
#include "audio.h"

#include "cus_aci.h"
#include "p_sim.h"
#include "MmiTimers.h"

/* SPR#1428 - SH -New Editor changes */
#ifdef NEW_EDITOR
#include "ATBCommon.h"
#include "ATBDisplay.h"
#include "ATBEditor.h"
#include "AUIEditor.h"
#else
#include "MmiEditor.h"
#endif

#include "MmiBookShared.h"
#include "MmiBookController.h"
#include "MmiResources.h"

#include "MmiNetwork.h"
#include "MmiSettings.h"
#include "MmiServices.h"
#include "MmiPins.h"
#include "MmiTimeDate.h"
#include "mmiSmsBroadcast.h"
#include "mmiSimToolkit.h"
#include "mmiSmsMenu.h"
#include "mmiSmssend.h"
#include "MmiCalculatorMain.h"
#include "AUIWapext.h"
#include "MmiSounds.h"
#include "MmiLists.h"
#include "MmiTimers.h"
#include "MmiVoiceMemo.h"
#include "MmiIcons.h"
#include "MmiAoc.h"
#ifdef MMI_EM_ENABLED
#include "MmiEm.h" /*SPR1209*/
#endif

#include "MmiMenu.h"
#ifdef MMIGAME
#include "Mmigame.h"
#endif
/* SPR890 - SH - Test mode menu */
#ifdef MMI_TEST_MODE
#include "MmiTest.h"
#endif

#include "MmiCPHS.h"
#include "MmiBand.h"
#ifdef MMI_GPRS_ENABLED
#include "MmiGprs.h"
#endif
extern int M_exeSendNew(MfwMnu* m, MfwMnuItem* i); // MZ
extern int M_exeRead(MfwMnu* m, MfwMnuItem* i);    // MZ 6/2/01
#include "mmiColours.h" 

extern void soundsSetVolume(void);
extern int SmsSend_R_OPTExeCentreEdit(MfwMnu* m, MfwMnuItem* i);
/*******************************************************************************

                                Static members

*******************************************************************************/
/*GW Changed all submenus to use the same colour definitions 'COLOUR_LIST_SUBMENU' */

/* Menu areas
*/


/* Call list buffer
*/
/*mc, need larger buffer for ASCII->UCS2 strings in chinese (up to 32 bytes)*/
static UBYTE callList[NAME_LIST_SIZE][NAME_SCREEN_MAX*3];


/* menu buffers
*/

/*This should cause an error if the size is changed
  if NAME_LIST_SIZE is not 3 or 10 then the structure is incorrect and must be updated*/
#ifndef LSCREEN
int zz_errCatcher[6-NAME_LIST_SIZE] = {1,2,3};
#else
int zz_errCatcher[20-NAME_LIST_SIZE] = {1,2,3,4,5,6,7,8,9,10};
#endif
static MfwMnuItem menuNamesItems [NAME_LIST_SIZE] =
{
#ifndef LSCREEN
	{ 0, 0, 0, (char *) callList[0], 0, 0, item_flag_none },
    { 0, 0, 0, (char *) callList[1], 0, 0, item_flag_none },
    { 0, 0, 0, (char *) callList[2], 0, 0, item_flag_none }
#else
	{ 0, 0, 0, (char *) callList[0], 0, 0, item_flag_none },
    { 0, 0, 0, (char *) callList[1], 0, 0, item_flag_none },
    { 0, 0, 0, (char *) callList[2], 0, 0, item_flag_none },
    { 0, 0, 0, (char *) callList[3], 0, 0, item_flag_none },
    { 0, 0, 0, (char *) callList[4], 0, 0, item_flag_none },
    { 0, 0, 0, (char *) callList[5], 0, 0, item_flag_none },
    { 0, 0, 0, (char *) callList[6], 0, 0, item_flag_none },
    { 0, 0, 0, (char *) callList[7], 0, 0, item_flag_none },
    { 0, 0, 0, (char *) callList[8], 0, 0, item_flag_none },
    { 0, 0, 0, (char *) callList[9], 0, 0, item_flag_none }
#endif
};

static const MfwMnuAttr menudetailsList =
{
    &menuNamesArea,
    MNU_LEFT | MNU_LIST | MNU_CUR_LINE,
    -1,
    (MfwMnuItem*)menuNamesItems,
    sizeof(menuNamesItems) / sizeof(MfwMnuItem),
    COLOUR_LIST_SUBMENU, TxtNull, NULL, MNUATTRSPARE

};

/*MC, added to prevent problem with different menu sizes for chinese and latin phonebook search screens*/
static MfwMnuAttr menudetailsListChinese =
{
    &menuNamesArea,
    MNU_LEFT | MNU_LIST | MNU_CUR_LINE,
    -1,
    menuNamesItems,
    sizeof(menuNamesItems) / sizeof(MfwMnuItem)
};


/* Global text message structure
*/
static int textMessage;

#ifdef MMI_TEST_MODE
EXTERN UBYTE testSelected;
#endif

/******************************************************************************
                                                                              
                                Menu Definitions
                                                                              
*******************************************************************************/

#define DEF_MENU_STYLE          	(MNU_LEFT | MNU_LIST | MNU_CUR_LINE)
#define DEF_COLOUR_MENU_STYLE   	(MNU_LEFT | MNU_LIST_COLOUR | MNU_CUR_LINE)
#define DEF_MENU_ICON_LIST_STYLE	(MNU_LEFT | MNU_LIST_ICONS | MNU_CUR_LINE)
#define BEGIN_MENU( name ) \
static const MfwMnuItem name##Items [] = {

#define MENU_ITEM_ICON( icon, msg, handler, attrFunction ) \
    { icon,0,0, (char*) msg, 0,                       (MenuFunc)handler, attrFunction }

#define MENU_ITEM( msg, handler, attrFunction ) \
    { 0,0,0,  (char*) msg, 0,                       (MenuFunc)handler, attrFunction }

#define MENU_ITEM_SUB_MENU( msg, sub_menu,handler, attrFunction ) \
    { 0,0,0,  (char*) msg, (MfwMnuAttr*) &sub_menu,(MenuFunc)handler, attrFunction }


#define SUB_MENU( msg, sub_menu, attrFunction ) \
    { 0,0,0, (char*) msg, (MfwMnuAttr*) &sub_menu, 0,                 attrFunction }

#define SUB_MENU_ICON( icon, msg, sub_menu, attrFunction ) \
    { icon,0,0, (char*) msg, (MfwMnuAttr*) &sub_menu, 0,                 attrFunction }

#define END_MENU( name, area, col ) \
}; \
\
static const MfwMnuAttr name = { \
    (MfwRect *) &area, DEF_MENU_STYLE, -1, (MfwMnuItem *) name##Items, sizeof( name##Items ) / sizeof( MfwMnuItem ),  col, TxtNull, NULL, MNUATTRSPARE \
};

#define END_MENU_MULTICOLOUR( name, area, col, hdrId ) \
}; \
\
static const MfwMnuAttr name = { \
    (MfwRect *) &area, DEF_COLOUR_MENU_STYLE, -1, (MfwMnuItem *) name##Items, sizeof( name##Items ) / sizeof( MfwMnuItem ),  col, hdrId, NULL, MNUATTRSPARE \
};

#define END_MENU_HEADER( name, area, col, hdrId  ) \
}; \
\
static const MfwMnuAttr name = { \
    (MfwRect *) &area, DEF_MENU_STYLE, -1, (MfwMnuItem *) name##Items, sizeof( name##Items ) / sizeof( MfwMnuItem ),  col, hdrId , NULL, MNUATTRSPARE\
};

#define END_MENU_ICON_LIST( name, area, col, bitmap ) \
}; \
\
static const MfwMnuAttr name = { \
    (MfwRect *) &area, DEF_MENU_ICON_LIST_STYLE, -1, (MfwMnuItem *) name##Items, sizeof( name##Items ) / sizeof( MfwMnuItem ),  col, TxtNull, bitmap, MNUATTRSPARE \
};

#define DEF_MENU_PAGED_STYLE          (MNU_LEFT | MNU_HDR_CENTER | MNU_PAGED | MNU_CUR_LINE)
#define BEGIN_ICON_MENU( name ) \
static const MfwMnuItem name##Items [] = {

#define MENU_ICON_ITEM( icon, msg, handler, attrFunction ) \
    { (MfwIcnAttr *)icon,0,0, (char*) msg, 0,                       (MenuFunc)handler, attrFunction }


#define SUB_ICON_MENU( icon,msg, sub_menu, attrFunction ) \
    { (MfwIcnAttr *)icon,0,0, (char*) msg, (MfwMnuAttr*) &sub_menu, 0,                 attrFunction }

#define END_ICON_MENU( name, area, col, bitmap ) \
}; \
\
static const MfwMnuAttr name = { \
    (MfwRect *) &area, DEF_MENU_PAGED_STYLE, -1, (MfwMnuItem *) name##Items, sizeof( name##Items ) / sizeof( MfwMnuItem ), col, TxtNull , bitmap, MNUATTRSPARE\
};
#define END_MULTIPLE_ICON_MENU( name, area, fCol, bCol ) \
}; \
\
static const MfwMnuAttr name = { \
    (MfwRect *) &area, (MNU_LEFT | MNU_PAGE_ICONS | MNU_CUR_LINE), -1, (MfwMnuItem *) name##Items, sizeof( name##Items ) / sizeof( MfwMnuItem ), col, TxtNull, NULL, MNUATTRSPARE \
};

/*SPR949 - SH - new macros.  If the first item in a menu is a _SELECT, then the selected
value of this menu will be stored in the provided UBYTE variable 'var'.*/
#define MENU_ITEM_SELECT( msg, handler, attrFunction, var ) \
    { 0,(void *)&var,0, (char *) msg, 0, (MenuFunc)handler, attrFunction }

#define MENU_ITEM_SUB_MENU_SELECT( msg, sub_menu,handler, attrFunction, var ) \
    { 0,(void *)&var,0, (char *) msg, (MfwMnuAttr*) &sub_menu,(MenuFunc)handler, attrFunction }

#define SUB_MENU_SELECT( msg, sub_menu, attrFunction, var ) \
    { 0,(void *)&var,0, (char *) msg, (MfwMnuAttr*) &sub_menu, 0, attrFunction }
/* end SPR949 */

#ifdef MMI_TTY_ENABLED
/* SPR#1352 - SH - TTY menu */
BEGIN_MENU( menuTTY )
	MENU_ITEM( TxtOff, call_tty_menuselect, item_flag_none),
	MENU_ITEM( TxtAlwaysOn, call_tty_menuselect, item_flag_none),
	MENU_ITEM( TxtOnNextCall, call_tty_menuselect, item_flag_none)
END_MENU( menuTTY, menuListArea, COLOUR_LIST_SUBMENU1 )
#endif

#ifdef MMI_EM_ENABLED
/*Engineering mode menus - MC SPR1209*/
BEGIN_MENU( menuEngMode )
    MENU_ITEM( TxtMobileInfo,    Mmi_em_display_mobile_info_data,   item_flag_none ),
  	MENU_ITEM( TxtServingCell,   Mmi_em_display_serving_cell_params,    item_flag_none ),
    MENU_ITEM( TxtNeighbourCell,    Mmi_em_display_neighbour_cell_params,    item_flag_none ),
    MENU_ITEM( TxtLocation,    Mmi_em_display_location_params,    item_flag_none ),
    MENU_ITEM( TxtCiphHopDTX,    Mmi_em_display_ciph_hop_DTX_params,    item_flag_none ),
     MENU_ITEM( TxtGPRS,    Mmi_em_display_GPRS_params,    item_flag_none )

END_MENU( menuEngMode, menuListArea, COLOUR_LIST_SUBMENU )
/*MC end*/
#endif


/* SPR#1112 - SH - Internal phonebook menus */

#ifdef INT_PHONEBOOK

BEGIN_MENU( menuSelectBook )
    MENU_ITEM( TxtSIM, 		bookSelectBookSIM,     	item_flag_none ),
    MENU_ITEM( TxtPhone,     bookSelectBookPhone,        item_flag_none ),
END_MENU( menuSelectBook, menuListArea, COLOUR_LIST_SUBMENU  )

BEGIN_MENU( menuCopy )
    MENU_ITEM( TxtThisEntry,  bookCopyEntry,     	item_flag_none ),
    MENU_ITEM( TxtAll,    	bookCopyAll,     		item_flag_none ),
END_MENU( menuCopy, menuListArea, COLOUR_LIST_SUBMENU  )

BEGIN_MENU( menuMove )
    MENU_ITEM( TxtThisEntry,  bookMoveEntry,     	item_flag_none ),
    MENU_ITEM( TxtAll,    	bookMoveAll,     		item_flag_none ),
END_MENU( menuMove, menuListArea, COLOUR_LIST_SUBMENU  )

#endif

#ifdef MMI_WAP_ENABLED

/*
 *  WAP menus
 */

// Scale Images sub-menu

BEGIN_MENU( menuScaleImages )
  MENU_ITEM( TxtOff,        (MenuFunc)AUI_scaleimages_set,  item_flag_none ),
  MENU_ITEM( TxtOn,       (MenuFunc)AUI_scaleimages_set,  item_flag_none )
END_MENU( menuScaleImages, menuListArea, COLOUR_LIST_SUBMENU )

// Save History sub-menu

BEGIN_MENU( menuSaveHistory )
  MENU_ITEM( TxtOff,        (MenuFunc)AUI_savehist_set,   item_flag_none ),
  MENU_ITEM( TxtOn,       (MenuFunc)AUI_savehist_set,   item_flag_none )
END_MENU( menuSaveHistory, menuListArea, COLOUR_LIST_SUBMENU )	

// Access Type sub-menu

BEGIN_MENU( menuAccessType )
  MENU_ITEM( TxtGPRSData,     (MenuFunc)AUI_access_set, item_flag_none ),
  MENU_ITEM( TxtCSData,     (MenuFunc)AUI_access_set, item_flag_none ),

⌨️ 快捷键说明

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