Example #1
0
void SFApp_SetupGDI(void)
{	gdi_handle gdi_hdlr;

#if 0	//forrest
	lcd_power_up();
#endif

	entry_full_screen();

	gdi_layer_reset_clip();
	gdi_layer_get_base_handle(&gdi_hdlr);
	gdi_layer_set_blt_layer(gdi_hdlr,0,0,0);
	gdi_layer_clear(GDI_COLOR_BLACK);    

	gdi_layer_set_active(gdi_hdlr);
	mmi_frm_kbd_set_tone_state(MMI_KEY_TONE_DISABLED);
}
Example #2
0
/*模块入口*/
void mmi_HelloWorld_entry(void)
{
#ifdef	__MMI_HELLOWORLD_ENABLED__
	/* 强制退出当前屏幕,之后进入到我们的模块了 */
	/* 上电缺省是idle屏幕,现进入MAIN_MENU_SCREENID屏 */
	/* 注意看第二个参数,这个是当我们模块被强制退出时执行的一些操作 */


#if 1

	//EntryNewScreen(MAIN_MENU_SCREENID, mmi_HelloWorld_exit, NULL, NULL);
    g_main_menu_group_id = mmi_frm_group_create(GRP_ID_ROOT, GRP_ID_AUTO_GEN, NULL, NULL);
    mmi_frm_group_enter(g_main_menu_group_id, 1);
    if(mmi_frm_scrn_enter(g_main_menu_group_id, MAIN_MENU_SCREENID, NULL, NULL, 2) == MMI_FALSE)
    {
        return;
    }


	/* 关掉屏幕顶部的状态条,我们要用整个屏幕 */
	entry_full_screen();

	/* 擦除当前背景 */
	clear_screen();

	/* 移动文本输出光标 */
	gui_move_text_cursor(50, 100);

	/* 设置字体颜色 */
	gui_set_text_color(UI_COLOR_RED);

	/* 输出文本到显示缓冲, 注意是Unicode编码 */
	gui_print_text(L"Hello, moring");

	/* 刷新屏幕显示,MMI用的是双缓冲绘图方式,而且需要显式刷新 */
	gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);

	/* 注册一个按键处理,右软键弹起时返回到之前被我们强制退出的模块 */
	SetKeyHandler(GoBackHistory, KEY_RSK, KEY_EVENT_UP);
#endif
#endif
}
Example #3
0
static void vm_frm_entry_func(mmi_scrn_essential_struct* data)
{
    MMI_TRACE(MMI_MRE_TRC_G8_FRM,TRC_MRE_FRM_ENTRY_FUNC,data->user_data);
    
    gui_screen_switch_effect_block(MMI_TRUE);
    
	mmi_frm_scrn_enter(data->group_id, data->scrn_id, (FuncPtr)vm_frm_exit_func, (FuncPtr)vm_frm_entry_func, MMI_FRM_FULL_SCRN);

	/* To resolve screen rotate UI error */
    mmi_frm_set_curr_scr_blt_mode(MMI_FRM_SCR_BLT_IMMEDIATE);
    
	entry_full_screen();
	
	vm_reg_key_handler();
    vm_reg_pen_handler();

	if (!vm_frm_scenario_is_lock((VM_P_HANDLE)data->user_data))
    {
    	vm_pmng_set_fg_ex((VM_P_HANDLE)data->user_data);
    }    
}
Example #4
0
void SFApp_SetupGDI(void)
{
	gdi_handle gdi_hdlr;
	lcd_power_up();
	entry_full_screen();

	gdi_layer_reset_clip();
	gdi_layer_get_base_handle(&gdi_hdlr);
	gdi_layer_set_blt_layer(gdi_hdlr,0,0,0);

	gdi_layer_set_active(gdi_hdlr);
	gdi_layer_clear(GDI_COLOR_BLACK);
		
	TurnOnBacklight(0);

	gdi_layer_blt_ext(GDI_LAYER_MAIN_BASE_LAYER_HANDLE, 0, 0, 0,
			#ifdef GDI_6_LAYERS
						0, 0,
			#endif
						0, 0, LCD_WIDTH-1, LCD_HEIGHT-1);	

    gdi_layer_lock_frame_buffer();

	mmi_frm_kbd_set_tone_state(MMI_KEY_TONE_DISABLED);
/*
	gdi_handle gdi_hdlr;
	lcd_power_up();
	entry_full_screen();

	gdi_layer_reset_clip();
	gdi_layer_get_base_handle(&gdi_hdlr);
	gdi_layer_set_blt_layer(gdi_hdlr,0,0,0);

	gdi_layer_set_active(gdi_hdlr);
	mmi_frm_kbd_set_tone_state(MMI_KEY_TONE_DISABLED);
*/
}
Example #5
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 .. */
    }

}