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

📄 mmimain.h

📁 是一个手机功能的模拟程序
💻 H
字号:
#ifndef _DEF_MMI_MAIN_H_
#define _DEF_MMI_MAIN_H_

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

          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:   MMI
 $File:       MmiMain.h
 $Revision:   1.0

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

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

 Description:

    This provides the root mofule for the basic MMI

********************************************************************************
 $History: MmiMmi.h

  25/10/00      Original Condat(UK) BMI version.
  04/08/02      zy Mobile Innovation change 
  26/08/02		hxl add for charger
 $End

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




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

                    Type definitions

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




#include "Mfw_cphs.h"

#include "MmiResources.h"


#define PROMPT(x, y, a, id) dspl_TextOut(x, y, a|DSPL_TXTATTR_CURRENT_MODE, (char*)MmiRsrcGetText(id))
#define PROMPT_COLOR(x,y,a,id,color) dspl_colorTextOut(x, y, a|DSPL_TXTATTR_CURRENT_MODE, (char*)MmiRsrcGetText(id), color)//gdy add
#define ALIGNED_PROMPT(x_a, y, a, id) displayAlignedPrompt(x_a, y, a, id)
#define GET_TEXT(id) MmiRsrcGetText( id )

#define ETRACE(str) \
{   char buf[64];##str##;\
  TRACE_EVENT(buf);}

#define FTRACE(str) \
{   char buf[64];##str##;\
  TRACE_EVENT(buf);}


/* typedefs */
typedef enum {
  NM_UNDEFINED,
  NM_FULL_SERVICE,
  NM_LIMITED_SERVICE,
  NM_NO_SERVICE,
  NM_SEARCHING,
  NM_NO_NETWORK
} MMI_NM_SERVICE;


typedef enum
{
#if(MAIN_LCD_SIZE==3)//jhxu720
	LEFT,
    RIGHT,
    CENTER,
	CENTER_RIGHT//jhxu720
#elif(MAIN_LCD_SIZE==4)
	LEFT,
    RIGHT,
    CENTER
#endif
} T_MMI_ALIGN;


typedef enum {
  SIM_UNDEFINED,
  SIM_AVAIL,
  SIM_REJECTED,
  SIM_NOT_AVAIL
} MMI_SIM_STATUS;

typedef enum {
  TWELVE_HOUR=0,
  TWENTYFOUR_HOUR
} ClockFormats;

typedef enum {
  A,
  B,
  C,
  D,
  E,
  F,
  G
} BackGround;//zy Mobile Innovation for background
typedef struct{
  int hour;
  int min;
  int sec;
}CLOCK;


typedef struct{
  int day;
  int month;
  int year;
}Date;


extern Date currdate;
extern CLOCK currclock;

#define MAX_LINE 14

#define POS_BEGIN 0
#define POS_END 1
#define MAX_LINE 14
//#define EDITOR_SIZE 41 2003-04-04 nouse all is 22

                                       /* GLOBAL DATA              */
extern UBYTE editControls [KCD_MAX];
extern LngInfo mainLngInfo;             /* language control block   */
extern MfwHnd mainMmiLng;               /* global language handler  */
extern MfwHnd gtVibator;//zy 08/15

extern MMI_NM_SERVICE   g_nmService;  /* actual registered nm service */
extern MMI_SIM_STATUS   g_simStatus;  /* actual sim status */
extern T_MFW_NETWORK_STRUCT     g_plmnIdent;  /* registered plmn */
                                        /* PROTOTYPES               */
void mainInit (UBYTE InitCause);
void mainExit (UBYTE InitCause);

void setClockFormat(UBYTE format);
void getClockString(long time,char *timeString);
void showCLOCK(void);
void ClockSet(CLOCK *currclock);
void DateSet(Date *currdate);
void showDATE(void);
void truncateString(char* strDest,char* strOrig,unsigned int truncLength,int pos,char* trunChar);
void displayAlignedText( T_MMI_ALIGN x_alignment, USHORT y_lineNum, UBYTE attrib, char* string );
void displayAlignedPrompt( T_MMI_ALIGN x_alignment, USHORT y_lineNum, UBYTE attrib, int string_id);
void mainShutdown(void);

//extern char stringTrace[50];

/* Battery and Signal Status */
#define GlobalNothingIconFlag     0x00
#define GlobalBatteryIconFlag     0x01
#define GlobalSignalIconFlag      0x02
#define GlobalSMSIconFlag       0x04
#define GlobalVoiceMailIconFlag     0x08
#define GlobalCallForwardingIconFlag  0x10
#define GlobalSilentRingerIconFlag    0x20
#define GlobalKeyplockIconFlag      0x40
#define GlobalRingerIconFlag      0x80
#define GlobalVibratorIconFlag      0x100
#define GlobalRingVibrIconFlag      0x200
#define GlobalAlarmIconFlag         0x400
#define GlobalCipheringActivIconFlag       0x800
#define GlobalCipheringDeactivIconFlag       0x1000
/* SH 18/01/02.  Indication for GPRS */
    #define MMI_GPRS_ENABLED 1//zy add for GPRS define to use
#ifdef MMI_GPRS_ENABLED
#define GlobalGPRSOnIconFlag				0x2000
#endif
/* SPR877 - SH - Indication for Homezone */
#ifdef MMI_HOMEZONE_ENABLED
#define GlobalHomezoneIconFlag				0x4000
#endif
#define GlobalIconRoamFlag       0x4000//zy Mobile Innovation for roam icon
#define GlobalIconServiceFlag       0x8000//zy Mobile Innovation for service icon flag
#define GlobalIconTimerFlag       0x10000//gdy Mobile Innovation for timer
#define GlobalIconMissedCallFlag  0x20000//Sunny add for Missed Call
extern U32 GlobalIconStatus;
extern T_MFW_CFLAG_STATUS DivertStatus;

/* It could be helpful to check the      */
/* global status where the user is :     */

/* It is also possible to be in several  */
/* status  !                             */

#define ModuleIdle       0x001  /*in Idle Screen           */
#define ModuleCall       0x002  /*in during a call         */
#define ModuleInCall     0x004  /*in Incoming call         */
#define ModuleMenu       0x008  /*in Menu                  */
#define ModulePhon       0x010  /*in Phonebook             */
#define ModuleSms        0x020  /*in SMS                   */
#define ModuleBattLow    0x040  /*in Battery Status < 5%   */
#define ModuleSAT        0x080  /*in Sim Toolkit, like Idle*/
#define ModuleAlarm      0x100  /*in Organiser Alarm       */
#define ModuleFax        0x200  /*in Fax/Data              */
#define ModuleDialling   0x400  /*in Dialling state      */

extern int MmiModule;




/* PROTOTYPES */

void MmiModuleSet (int modul); /* Set the status where the user is       */
void MmiModuleDel (int modul); /* Delete the status where the user was   */




/* Settings status*/

#define SettingsAnyKeyAnswerOn      0x01
#define SettingsAutoAnswerOn      0x02
#define SettingsKeyPadLockOn      0x04
#define SettingsKeypadClick       0x08
#define SettingsKeypadDTMF        0x10
#define SettingsSilentMode        0x20
//#define SettingBGOn               0x40//zy add for BGOn flag
#define SettingGreetingWord        0x80//zy add for greetingword flag
//extern USHORT settingsStatus;

#define GlobalBatteryLesser5     1
#define GlobalBatteryGreater5    2
#define GlobalBatteryFull        3

extern UBYTE globalBatteryMode; /*  */


extern UBYTE globalSignalPicNumber;
extern int HallOffForbid;    /* 2004/07/09 sunsj add for forbidden hall off */

#define GlobalTimeout1sec     0x03e8         /* 1 second for flash the battery icon  */
#define GlobalTimeout2min     0x01d4c0       /* 2 min for battery beep  */
#define GlobalTimeout15min    0x0dbba0       /* 15 min for battery beep  */

#define CHGSTS    0x08  // Charger plug flag,hxl add for charger

void editActivate (MfwHnd e,int AlphaMode);
void editHiddenActivate (char *buffer);
void editDeactivate (void);
int editEventKey (MfwEvt e, MfwKbd *k);
MfwHnd activeEditor(void);

// sbh - functions for format mode (WAP)

void setFormatPointers (char *format, int *index, int *index2);
void editCharFindNext(char character);
int editFindPrev();

/*NM p032
this flag indicate when the TEST SIM
is inserted*/
extern UBYTE test_sim;


#endif

⌨️ 快捷键说明

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