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

📄 mmistart.c

📁 GSM手机设计软件代码
💻 C
📖 第 1 页 / 共 2 页
字号:
    /* setup signalling and AUTOFOCUS
    */
    mfwSetSignallingMethod( 1 );
    winAutoFocus( TRUE );

    //API/GW - Set Colour of displays
    colour_initial_colours();

	//GW-SPR#1035-Added SAT changes by Nebi (changed initialisation order).
	/* initialise network services */
	simToolkitInit( 0 );
	bookInitialise( 0 );
	callInit( 0 );
	iconsInit();

	/* Handlers created on windows */
	pin_init( 0 );
	networkInit( 0 );	
	smsidle_start(0, NULL); 
	servicesInit( 0 );

	idleInit( 0 );  
	voice_memo_init ();
	voice_mail_init ();
	sms_cb_init ();
	
	mmi_cphs_init();	
	/* SH...17/01/02. */
#ifdef MMI_GPRS_ENABLED
	mmiGprsInit();
#endif /* GPRS */
#ifdef FF_EM_MODE
	mmi_em_init();/*MC SPR1209 engineering mode*/
#endif
	/* SH - PIN screen now comes before welcome screen */
	startregis();	
}

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

 $Function:    	startExit

 $Description:	Stops the MMI start windows, basically reverses the effect
				of the startInit above

 $Returns:		None.

 $Arguments:	None.
 
*******************************************************************************/

void startExit( void )
{
	/* remove keyboard handlers
	*/
    kbdDelete(kbd);
	kbd = 0;

	/* SH - GPRS */
	#ifdef MMI_GPRS_ENABLED
    mmiGprsExit( );
	#endif /* GPRS */
	
	
	/* shut down the sim toolkit
	*/
    simToolkitExit();

	/* close the phonebook, calls, idle, services, icons, sounds
	   and network handlers
	*/
	bookExit();
	callExit();
	idleExit();
	smsidle_destroy ();
    iconsExit();
    cphs_exit(); //MC
#ifdef FF_EM_MODE
    mmi_em_exit();/*MC, SPR1209 engineering mode */
#endif
}

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

 $Function:    	startExec

 $Description:	start window execute method

 $Returns:		None.

 $Arguments:	reason, for invoking the execute method,
				next, not used passed for compatibility
 
*******************************************************************************/

void startExec( int reason, MmiState next )
{
    switch (reason)
    {
		case PhoneInit:
		{
			/* initialising, run the animation
			*/
		    sim_init();                     /* init SIM handler         */
		    nm_init();                      /* init REG handler         */
	    	startInit();                        /* init startup module      */
	    	
		}
        break;

		case FirstTimeNMFound:
		{
			/* first time through setup window and idle handlers
			*/
			TRACE_EVENT("NM Found");

			winFocus( win );
			winShow( win );
			idleExec( IdleNormal, 0 );
			
		}
		break;

		case NmSearching:
		{
			/* just trace on the search event for now
			*/
			TRACE_EVENT("Search");
			
		}
		break;

		default:
		{
			/* no default handling
			*/
			break;
		}
    }
}

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

 $Function:    	startWhoIsFocused

 $Description:	provides handle of currently focussed window

 $Returns:		mfwFocus

 $Arguments:	None.
 
*******************************************************************************/

MfwHnd startWhoIsFocused( void )
{
    return( mfwFocus );
}

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

 $Function:    	showwelcome

 $Description:	 shows a welcome Message when swiching on the mobile
 
 $Returns:		none

 $Arguments:	
 				
*******************************************************************************/

void showwelcome (T_MFW_HND win)			/* SH - not static, as now externally called */
{
   	T_DISPLAY_DATA   display_info;

	TRACE_FUNCTION("showwelcome ()");

    idle_set_starting_up(FALSE); /*SPR#1662-NH Starting is finished for Idle */

	dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtNull, TxtNull , COLOUR_STATUS_WELCOME);
	dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)show_welcome_cb, FOUR_SECS, 0 );
	
      /*
       * Call Icon
       */
	
	mmi_dialogs_insert_animation (info_dialog (win, &display_info), 400 ,(MfwIcnAttr*)&welcome_Attr,animwelcome);

}

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

 $Function:    	show_welcome_cb

 $Description:	 shows a welcome Message when swiching on the mobile
 
 $Returns:		none

 $Arguments:	
 				
*******************************************************************************/

static int show_welcome_cb(T_MFW_HND win, USHORT identifier, UBYTE reason)
{
	TRACE_FUNCTION("show_welcome_cb");

   	/* SH - removed call to startregis, now in startInit */
    	
    mmeInit();  //fieldstrength driver

    /* SPR759 - SH. Initialise homezone */
#ifdef MMI_HOMEZONE_ENABLED
   	homezoneInit();
#endif /* HOMEZONE */

	/* SPR#1983 - SH - Initialise flash files for WAP */
#ifdef MMI_WAP_ENABLED
	flash_wap_init();
#endif /* WAP */

	/* SPR#1112 - SH - Check which phonebook is active.  If FFS is formatted and
	 * FFS phonebook is selected, initialise it. */
 
#ifdef INT_PHONEBOOK
	bookInitInternal();
#endif

	/* SPR#1352 - SH - Initialise TTY */
#ifdef MMI_TTY_ENABLED
	call_tty_init();
#endif
	/* end SH */

	animation_complete = TRUE;

    idleEvent(IdleUpdate);
	
	return;
}

/* GW return when animation is complete (and the idle screen can be displayed*/
int mmiStart_animationComplete( void )
{
	return (animation_complete);
}


#ifdef NEW_KEY_INPUT
#include "kpd_cfg.h"
#include "mfw_kbd.h"
#define MAX_KEY 255
U32 mfw_kbd_map [MAX_KEY] = 
{
	KEY_0,
	KEY_1,
	KEY_2,
	KEY_3,
	KEY_4,
	KEY_5,
	KEY_6,
	KEY_7,
	KEY_8,
	KEY_9,
	KEY_STAR,
	
};
	
void mfw_keyMap(int mfw_key, int hw_key)
{
	if ((hw_key >0) && (hw_key<MAX_KEY))
		mfw_kbd_map[hw_key] = mfw_key;
}

void start_setKeys( void )
{	
	mfw_keyMap(KEY_0,		KPD_KEY_0);
	mfw_keyMap(KEY_1,		KPD_KEY_1);
	mfw_keyMap(KEY_2,		KPD_KEY_2);
	mfw_keyMap(KEY_3,		KPD_KEY_3);
	mfw_keyMap(KEY_4,		KPD_KEY_4);
	mfw_keyMap(KEY_5,		KPD_KEY_5);
	mfw_keyMap(KEY_6,		KPD_KEY_6);
	mfw_keyMap(KEY_7,		KPD_KEY_7);
	mfw_keyMap(KEY_8,		KPD_KEY_8);
	mfw_keyMap(KEY_9,		KPD_KEY_9);
	mfw_keyMap(KEY_STAR,	KPD_KEY_STAR);
	mfw_keyMap(KEY_HASH,	KPD_KEY_DIESE);
	mfw_keyMap(KEY_LEFT,	KPD_KEY_SOFT_LEFT);
	mfw_keyMap(KEY_RIGHT,	KPD_KEY_SOFT_RIGHT);
	mfw_keyMap(KEY_CALL,	KPD_KEY_CONNECT);
	mfw_keyMap(KEY_HUP,		KPD_KEY_DISCONNECT);
	mfw_keyMap(KEY_POWER,	KPD_PWR);

	mfw_keyMap(KEY_VOLUP,		KPD_KEY_VOL_UP);
	mfw_keyMap(KEY_VOLDOWN,		KPD_KEY_VOL_DOWN);

	mfw_keyMap(KEY_MNUUP,		KPD_KEY_UP);
	mfw_keyMap(KEY_MNUDOWN,		KPD_KEY_DOWN);
	mfw_keyMap(KEY_MNULEFT,		KPD_KEY_LEFT);
	mfw_keyMap(KEY_MNURIGHT,	KPD_KEY_RIGHT);


}

#endif

/*******************************************************************************
                                                                             
                                End of File
                                                                              
*******************************************************************************/

⌨️ 快捷键说明

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