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

📄 mmibooksearchwindow.c

📁 是一个手机功能的模拟程序
💻 C
📖 第 1 页 / 共 5 页
字号:
/*******************************************************************************

                    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:		    MmiSearchWindow.c
 $Revision:		1.0                                                       
                                                                              
 $Author:		Condat(UK)                                                         
 $Date:		    25/10/00                                                      
                                                                               
********************************************************************************
                                                                              
 Description:
 
    This module provides the phone book search window functionality for the
    phone book module of the basic MMI
                        
********************************************************************************
 $History: MmiBooksearchwindow.c

    25/10/00			Original Condat(UK) BMI version.	
    28/10/2003			sunsj **************************************************
                        modify for phone book record display
    ****************************************************************************
    01/11/2003			sunsj **************************************************
                        modify the method of input and display about phone book
                        record
    ****************************************************************************
    2003/11/10          sunsj **************************************************
                        Modify the display method of phone book record
    ****************************************************************************
    2003/11/19          sunsj add name icon
 $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"
#include "mfw_edt.h"
#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 "mfw_ffs.h"
#include "MmiTimers.h"
#include "mmiusersymbolinput.h"

#include "MmiBookShared.h"
#include "mmiSmsMenu.h"
#include "MmiSmsSend.h"
#include "MmiBookPhonebook.h"
#include "mmibooksearchwindow.h"
#include "mmiusersymbolinput.h"
#include "mmieditor_i.h"
#include "mmitextinput.h"		/* 2003/12/04 sunsj modify for new eidtor mode */
#include "mmiiconresource.h"/* 2004/06 sunsj modify for icon manage */

#define TDTRACE 1
#include "mmiutilapi.h"
#if(MAIN_LCD_SIZE==3)
BOOL phonebook_search_flag=FALSE;
#endif
typedef enum
{
    NONE,
    TOLEFT,
    TORIGHT
} T_BrowserWay;

typedef enum
{
    KEY0,
    KEY1,
    KEY2,
    KEY3,
    KEY4,
    KEY5,
    KEY6,
    KEY7,
    KEY8,
    KEY9
} T_KEY;  

typedef enum
{
    B_NUMBER,
    B_HOME,
    B_OFFICE,
    B_MEMO
} T_BrowserType;
#if(MAIN_LCD_SIZE==4)
#define		PHONEBOOK_RECORD_PERPAGE	3
#define SEARCH_NUMBER_SHOW			126
#elif(MAIN_LCD_SIZE==3)
#define		PHONEBOOK_RECORD_PERPAGE	4
#define SEARCH_NUMBER_SHOW			93
#endif

/* sunsj: 2003-10-26 use as a bar in ShowDetailNumber */

/* 2004/06/08 sunsj add */
static MfwMnuAttr Shortcut_menuAttrib =//the default menu attr
{
    0,
    &ShortCutDynamicArea,
    MNU_LEFT | MNU_LIST | MNU_CUR_LINE, /* centered page menu       */
    -1,                                 /* use default font         */
    NULL,                               /* with these items         */
    0                                   /* number of items     */
};

//end yq added
static MfwMnuAttr readName_menuAttrib =
{
    0,
    &menuDynamicArea,
    MNU_LEFT | MNU_LIST | MNU_CUR_LINE , /* centered page menu       */
    -1,                                 /* use default font         */
    NULL,                               /* with these items         */
    0                                  /* number of items     */

};

static MfwMnuAttr new_menuAttrib =
{
    0,
    &menuListArea,
    MNU_LEFT | MNU_LIST | MNU_CUR_LINE, /* centered page menu       */
    -1,                                 /* use default font         */
    NULL,                               /* with these items         */
    0 
};

static int      DoNextLongPress = FALSE;

static T_MFW_HND          GetWin;
//static unsigned char        LastKey;
static U8                  SetFlag;
T_BrowserType       CurrentType;
static T_CopyWay          CopyWay;
int                  SelectTotal;
int      menu_start_index;//the index of the start index of the dynamic menu
T_DynamicBuffer           DataItem[MAX_Grouping];

T_SearchResult            bookname[ALL_NUMBER_LIST];
T_DynamicBuffer           DynamicBuffer[PHONEBOOK_RECORD_PERPAGE];
extern T_DynamicBuffer Dynamic_menu[PHONEBOOK_RECORD_PERPAGE];
T_CopyResult              CopyResult;
int                       SearchTotal;
static   int                  freetotal=0;//yq added for the dynamicfree
int                       CopyNumber;
USHORT                  ShortName;
static char                temp[100];
int                       RingSelect;
int                      IconSelect;    //add by xzy for grouping icon
//yq added
/* 2004/05/17 sunsj modify */
//extern const unsigned char iconWaitting[];   //the cursor
T_MFW_HND show_timer=0;         //the timer for show_number
static unsigned short show_index;       //the index of the number to show
static unsigned char refresh_flag;      //the flag for need refresh or not
/* 2004/06 sunsj modify for icon manage */
//extern const unsigned char abc_bmp[];  // the cursor abc
T_MFW_HND edt_timer=0;       //the timer for the editor of input shorcut character
static unsigned char cursor_correct=1;   //the flag indicate the cursor correct or not
static unsigned char key_before=0xff;      //the key you pressed before this key
static unsigned char key_index=0;          //the index of the key in edt_key
static const unsigned char edt_key[8][5]={"abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};//the key array for edt
//end yq added
//yq add for voice dial

MfwHnd voice_win;//the voice_dial win
static unsigned char        LastKey;
static int current_voice_index;//the index of current add or modify voice_dial info in voice_dial
voice_info voice_dial[VOICEDIAL_MAX];
char voice_filename[VOICEDIAL_MAX][12]={"VoiceD1","VoiceD2","VoiceD3","VoiceD4","VoiceD5","VoiceD6","VoiceD7",
    "VoiceD8","VoiceD9","VoiceD10"};
static voice_mode current_mode;//the mode of current,use in kbdcb
static unsigned char dial_mode;
static char voice_namefile[20]="/voiceD/VoiceName";
static char voice_name[PHB_MAX_LEN+3];
static char voice_number[PHB_MAX_LEN+1];
static unsigned char current_operation;// indicate the window from,1 from search.0 from add.
unsigned char voice_total;//the total voice_dial info .
unsigned char voice_index[VOICEDIAL_MAX];//store the current list item's index in voice_total
unsigned char voice_buffer[PHONEBOOK_RECORD_PERPAGE][PHB_MAX_LEN+3];//the text for the list
static unsigned char dial_index;
extern UINT32 driverFlag;
static UBYTE Add_Modify;//the falg indicate the operation.add or modify.1 add.2 modify
static UBYTE needgetvoicedata=0;
static BYTE recoginze_call_index=-1;
static UBYTE fromwinshow=0;
//end yq added
static UBYTE Phbk_DynamicMenu;//yq added for indicate phbk
static int         SearchIndex(T_MFW_PHB_SORT_INDEX *SortData,int RecordLen,char * Inputchr,int *Index);

⌨️ 快捷键说明

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