示例#1
0
文件: SFApi.c 项目: 12019/mtktest
void SFApp_Entry(void)
{
	//create the app first
	EntryNewScreen(SCR_ID_VDOPLY_STREAM_EDITOR,SFApp_Leave,SFApp_Entry,SFNull);
	SetDelScrnIDCallbackHandler( SCR_ID_VDOPLY_STREAM_EDITOR, (HistoryDelCBPtr)mmi_game_simu_delete_history_hdlr );
	
	/* stop bg music */
	mdi_audio_suspend_background_play();
	SFApp_SetupHandlers();
	SFApp_SetupGDI();
	//SFApp_LoadGameSetting();
	
	if(SFApp_IsFirstTime())
	{
		//do init
		SFApp_SetFirstTime(SFFalse);
		g_kernal.bAppRunning=SFTrue;
		
		SFSystem_Initialize();

		//g_kernal.pApplication=SFApp_Create(1);

		g_kernal.pApplication->pfnEvtHandler(g_kernal.pApplication,EVT_APP_START,0,0);
	}
	else
	{
		//resume
		ISFApplication*pApp=SFGetApp();
		pApp->pfnEvtHandler(pApp,EVT_APP_RESUME,0,0);
	}
}
/*****************************************************************************
* FUNCTION
*  InitEngineerModeSetting
* DESCRIPTION
*  
* PARAMETERS
*  void
* RETURNS
*  void
*****************************************************************************/
void InitEngineerModeSetting(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    gCurrentMode = ENGINEERING_MODE;
    mdi_audio_suspend_background_play();
    srv_gpio_play_pattern((srv_gpio_pattern_id_enum)srv_led_pattern_get_bg_pattern(), SRV_GPIO_PATN_PLAY_STOP);
}
示例#3
0
文件: i51Port.c 项目: magicjva/i51
static void i51EntryScreen(void)
{
	//	author : Miki
	//	since : 2011.12.2
	// 	(C) PKIG Tech. Co., Ltd.
    

	#if( I51_MTK_VS >= VS_11B_1212 )
	MMI_ID parent_id;  

   // parent_id=mmi_frm_group_get_active_id();

    parent_id = mmi_frm_group_get_top_parent_group_id(mmi_frm_group_get_active_id());

	mmi_frm_group_create(parent_id, 

                          I51_GROUP_ID, 

                          NULL,

                          NULL);
    mmi_frm_group_enter(I51_GROUP_ID, MMI_FRM_NODE_SMART_CLOSE_FLAG);
	
    if (!mmi_frm_scrn_enter(

            I51_GROUP_ID,//group id

            I51_SCREEN_ID,//screnn id 

            i51ExitSreen,

            (FuncPtr)i51PortCreateFrontEnd,

            MMI_FRM_FULL_SCRN))

    {
        return;
    }
	#else
	EntryNewScreen (I51_SCREEN_ID, i51ExitSreen, (FuncPtr)i51PortCreateFrontEnd, NULL);
	#endif	

    i51AdeOsLog( i51_LOG_SC, "PORT : EntrySreen , S , Front app run = %d", l_InI51 );
    gdi_layer_set_source_key(0,0);
    
    #ifdef __MTK_TARGET__
    #ifdef __MMI_AUDIO_PLAYER__
    mdi_audio_suspend_background_play();       
    #endif 
    #endif 
   
    i51AdeMmiMediaPlayerSetVolume( i51AdeMmiMediaPlayerGetVolume(0) );

    {
        stFontAttribute f={0};
        f.size = MEDIUM_FONT;
        gui_set_font(&f);
    }
#ifdef __MMI_TOUCH_SCREEN__
    mmi_pen_config_sampling_period(MMI_PEN_SAMPLING_PERIOD_2, MMI_PEN_SAMPLING_PERIOD_2);
#endif
}
示例#4
0
/*****************************************************************************
 * FUNCTION
 *  mmi_sample_3dgame_entry_app_screen
 * DESCRIPTION
 *  enter dev3dgame screen - init an MMI  environment for 3D game
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_sample_3dgame_entry_app_screen(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    PU8 gui_buffer;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    EntryNewScreen(SCR_ID_3D_GAME, mmi_sample_3dgame_exit_app_screen, mmi_sample_3dgame_entry_app_screen, NULL);

    gui_buffer = GetCurrGuiBuffer(SCR_ID_3D_GAME);

    /* reset clip */
    gdi_layer_reset_clip();
    gdi_layer_reset_text_clip();

    /* enable multilayer */
    gdi_layer_multi_layer_enable();

    /* entry full screen app - will force status bar update */
    entry_full_screen();

    /* force all playing keypad tone off */
    mmi_frm_kbd_set_tone_state(MMI_KEY_TONE_DISABLED);

    /* set audio volumn */
    mdi_audio_set_volume(MDI_VOLUME_MEDIA, 4);  /* vol level : 0 - 6 */

    /* suspend background play */
    mdi_audio_suspend_background_play();

    /* stop MMI sleep */
    TurnOnBacklight(0);

    /* clear keys */
    ClearInputEventHandler(MMI_DEVICE_ALL);
    clear_category_screen_key_handlers();

    /* set RSK-up to exit */
    SetKeyHandler(GoBackHistory, KEY_RSK, KEY_EVENT_UP);

    /* clear background as black */
    gdi_layer_clear(GDI_COLOR_BLACK);
    gdi_layer_blt_previous(0, 0, UI_device_width - 1, UI_device_height - 1);

#ifndef WIN32
    /* enable faster key handling */
    mmi_frm_set_key_handle_in_high_frequency(MMI_TRUE);
#endif /* WIN32 */ 

#ifdef __MMI_SUBLCD__
    /* draw game icon on sublcd */
    ForceSubLCDScreen(mmi_sample_3dgame_entry_sublcd);
#endif /* __MMI_SUBLCD__ */ 

    /* disalbe align timer, this will let timer more accurate */
    UI_disable_alignment_timers();

    /* start game */
    if (gui_buffer == NULL)
    {
        /* TODO: start new game here .. */

    }
    else
    {
        /* back from interrupt */
        /* TODO: resume a existing game here .. */
    }

}