📄 wgui_categories_cm.c
字号:
*
* DESCRIPTION
* Pen Abort events handler function for category16 control area.
*
* PARAMETERS
* mmi_pen_point_struct IN point
*
* RETURNS
* void
*
* GLOBALS AFFECTED
*
*****************************************************************************/
MMI_BOOL Cate16CategoryControlAreaPenAbortHandler(mmi_pen_point_struct point)
{
PlayDialKeyPadTone(KEY_EVENT_UP);
return MMI_TRUE;
}
#endif
#if (( defined ( __MMI_MAINLCD_176X220__ ) ||defined (__MMI_MAINLCD_240X320__) ) && defined (__GDI_MEMORY_PROFILE_2__) ) //041205 Calvin modified
/*****************************************************************************
* FUNCTION
* DrawCate16CategoryControlArea
*
* DESCRIPTION
* Draws the category16 category control area
*
* PARAMETERS
* coordinate IN/OUT coordinates of category controlled area.
*
* RETURNS
* void
*
* GLOBALS AFFECTED
*
*****************************************************************************/
void DrawCate16CategoryControlArea(dm_coordinates * coordinate)
{
#ifdef __MMI_TOUCH_DIAL_SCREEN__
/* initialize dialing_keypad */
/*draw background image */
gdi_layer_push_clip();
gdi_layer_reset_clip();
gdi_image_draw_id(0,0,IMG_DIALING_SCREEN);
/* 110105 dialing deflect Calvin Start */
#ifdef __MMI_TOUCH_DIAL_SCREEN_WITH_FUNCTION__
if ( mmi_bootup_get_active_flight_mode() )
pixtel_UI_show_dialing_key(MMI_DIALING_KEY_CALL,FALSE);
#endif
/* 110105 dialing deflect Calvin End */
gdi_layer_pop_clip();
/* show inputbox */
#else
/*-----------------------------------------------------------------*/
/* Local Variables */
/*-----------------------------------------------------------------*/
S32 iwidth,iheight;
S32 dial_height;
/*-----------------------------------------------------------------*/
/* Code Body */
/*-----------------------------------------------------------------*/
gdi_layer_lock_frame_buffer();
gdi_layer_clear(GDI_COLOR_TRANSPARENT);
gdi_image_get_dimension_id(IMG_POPUP_TITLE, &iwidth, &iheight);
dial_height = (s32)(iwidth/(1.5));
show_dialer_inputbox();
gdi_layer_push_clip();
gdi_layer_set_clip((UI_device_width>>1)-(iwidth>>1),MMI_title_y+MMI_title_height+(MMI_content_height>>1)-(dial_height>>1)-iheight,(UI_device_width>>1)+(iwidth>>1),MMI_title_y+MMI_title_height+(MMI_content_height>>1)-(dial_height>>1));
gdi_image_draw_id((UI_device_width>>1)-(iwidth>>1),MMI_title_y+MMI_title_height+(MMI_content_height>>1)-(dial_height>>1)-iheight, IMG_POPUP_TITLE);
gdi_layer_pop_clip();
gdi_layer_unlock_frame_buffer();
gdi_layer_blt(wgui_layer_1, wgui_base_layer, 0, 0, 0, 0, UI_device_width-1, UI_device_height-1);
#endif
}/* end of DrawCate16CategoryControlArea */
/*****************************************************************************
* FUNCTION
* DrawCate16CategoryControlArea2
*
* DESCRIPTION
* Draws the category16 category control area2
*
* PARAMETERS
* coordinate IN/OUT coordinates of category controlled area.
*
* RETURNS
* void
*
* GLOBALS AFFECTED
*
*****************************************************************************/
void DrawCate16CategoryControlArea2(dm_coordinates * coordinate)
{
draw_wallpaper();
}
#else /* ( defined ( __MMI_MAINLCD_176X220__ ) && defined (__GDI_MEMORY_PROFILE_2__) ) */
/*****************************************************************************
* FUNCTION
* DrawCate16CategoryControlArea
*
* DESCRIPTION
* This function is used to draw the category controlled area of category16 screen
*
* PARAMETERS
* coordinate IN/OUT coordinates of category controlled area.
*
* RETURNS
* void
*
* GLOBALS AFFECTED
*
*****************************************************************************/
void DrawCate16CategoryControlArea(dm_coordinates * coordinate)
{
/*-----------------------------------------------------------------*/
/* Local Variables */
/*-----------------------------------------------------------------*/
UI_filled_area *f=current_MMI_theme->CM_screen_background_filler;
/*-----------------------------------------------------------------*/
/* Code Body */
/*-----------------------------------------------------------------*/
gdi_layer_lock_frame_buffer();
gdi_layer_reset_clip();
pixtel_UI_draw_filled_area(0,0,UI_device_width-1,UI_device_height-1,f);
show_status_icons();
#ifndef __MMI_CM_SCREEN_HIDE_DATE_TIME__
CM_screens_draw_date_time_bar();
show_main_LCD_dt_display();
#endif
show_dialer_inputbox();
gdi_layer_unlock_frame_buffer();
gdi_layer_blt_previous(0,0,UI_device_width-1,UI_device_height-1);
}/* end of DrawCate16CategoryControlArea */
#endif /* ( defined ( __MMI_MAINLCD_176X220__ ) && defined (__GDI_MEMORY_PROFILE_2__) ) */
/*****************************************************************************
* FUNCTION
* RegisterCategory16NavigationKeys
*
* DESCRIPTION
* Register the keys ofdialing scrren.
*
* PARAMETERS
* void
*
* RETURNS
* void
*
* GLOBALS AFFECTED
*
*****************************************************************************/
void RegisterCategory16NavigationKeys(void)
{
register_left_softkey_handler();
register_right_softkey_handler();
register_dialer_inputbox_keys();
}/* end of RegisterCategory16NavigationKeys */
/*****************************************************************************
* FUNCTION
* SetCategory16RightSoftkeyFunction
*
* DESCRIPTION
* set the RSK function of dialing scrren.
*
* PARAMETERS
* f IN function pointer
* k IN event type
*
* RETURNS
* void
*
* GLOBALS AFFECTED
*
*****************************************************************************/
void SetCategory16RightSoftkeyFunction(void (*f)(void),MMI_key_event_type k)
{
UI_UNUSED_PARAMETER(k);
wgui_dialer_inputbox_RSK_function=f;
}/* end of SetCategory16RightSoftkeyFunction */
/*****************************************************************************
* FUNCTION
* ShowCategory16Screen
*
* DESCRIPTION
* Displays the category16 screen(Dialing Screen)
*
* PARAMETERS
* left_softkey IN Left softkey label
* left_softkey_icon IN Icon for the Left softkey
* right_softkey IN right softkey label
* right_softkey_icon IN Icon for the right softkey
* Buffer IN Message string
* BufferLength IN Length of buffer
* history_buffer IN history buffer
*
* RETURNS
* void
*
* GLOBALS AFFECTED
* ExitCategoryFunction, RedrawCategoryFunction, GetCategoryHistory
* GetCategoryHistorySize, g_dm_data_struct
* *****************************************************************************/
void ShowCategory16Screen(U16 left_softkey,U16 left_softkey_icon,U16 right_softkey,U16 right_softkey_icon,U8* Buffer, U32 BufferLength,U8* history_buffer)
{
/*-----------------------------------------------------------------*/
/* Local Variables */
/*-----------------------------------------------------------------*/
dm_data_struct dm_data;
#if (!defined (__MMI_TOUCH_DIAL_SCREEN__) && ( defined ( __MMI_MAINLCD_176X220__ ) || defined (__MMI_MAINLCD_240X320__)) && defined (__GDI_MEMORY_PROFILE_2__) && !defined(__MMI_UI_DALMATIAN_IDLESCREEN__))
S32 iheight=0;
S32 dial_height=0;
S32 iwidth=0;
#endif
/*-----------------------------------------------------------------*/
/* Code Body */
/*-----------------------------------------------------------------*/
UI_UNUSED_PARAMETER(history_buffer);
#if ( defined (__MMI_MAINLCD_240X320__) && defined (__MMI_TOUCH_DIAL_SCREEN__) && defined (__MMI_UI_SMALL_SCREEN_SUPPORT__) )
set_small_screen();
#endif
gdi_layer_lock_frame_buffer();
in_idle_screen();
clear_key_handlers();
clear_left_softkey();
clear_right_softkey();
change_right_softkey(right_softkey,right_softkey_icon);
change_left_softkey(left_softkey,left_softkey_icon);
register_left_softkey_handler();
register_right_softkey_handler();
#if ( (defined __MMI_WGUI_CSK_ENABLE__) && defined (__MMI_TOUCH_SCREEN__) && !defined (__MMI_TOUCH_DIAL_SCREEN_WITH_FUNCTION__))//100405 dial icon Calvin modified
if(mmi_bootup_get_active_flight_mode() != 1) /* diamond, 2006/01/04 Not enable center soft key to dial in flight mode */
EnableCenterSoftkey(0, IMG_CSK_DIAL_ICON);
#endif
#if (((defined ( __MMI_MAINLCD_176X220__ ) || defined (__MMI_MAINLCD_240X320__)) && defined (__GDI_MEMORY_PROFILE_2__)) &&!defined(__MMI_UI_DALMATIAN_IDLESCREEN__))
#ifdef __MMI_UI_DALMATIAN_STATUSBAR__
ShowStatusIconsTitle();
arrange_status_icons();
#else
on_idle_screen=1;
//PMT VIKAS START 20051202
set_on_idlescreen(1);
//PMT VIKAS END 20051202
#ifndef __MMI_TOUCH_DIAL_SCREEN__
register_hide_status_icon_bar(0,idle_screen_hide_status_icons_bar0);
register_hide_status_icon_bar(1,MMI_dummy_function);
#endif
set_status_icon_bar_clip(0,0,0,UI_device_width-1,MMI_status_bar_height-1);
show_status_icon_bar(0);
hide_status_icon_bar(1);
#endif
#else /* (((defined ( __MMI_MAINLCD_176X220__ ) || defined (__MMI_MAINLCD_240X320__)) && defined (__GDI_MEMORY_PROFILE_2__)) &&!defined(__MMI_UI_DALMATIAN_IDLESCREEN__)) */
#ifndef __MMI_TOUCH_DIAL_SCREEN__
set_main_LCD_dt_date_hide_function(CM_screens_hide_date_time_display);
set_main_LCD_dt_time_hide_function(CM_screens_hide_date_time_display);
set_dt_display(DT_MO_CALL_SCREEN);
#endif
ShowStatusIconsTitle();
#ifdef __MMI_UI_DALMATIAN_IDLESCREEN__
arrange_status_icons();
#endif /* __MMI_UI_DALMATIAN_IDLESCREEN__ */
#endif /* (((defined ( __MMI_MAINLCD_176X220__ ) || defined (__MMI_MAINLCD_240X320__)) && defined (__GDI_MEMORY_PROFILE_2__)) &&!defined(__MMI_UI_DALMATIAN_IDLESCREEN__)) */
#if (((defined ( __MMI_MAINLCD_176X220__ ) || defined (__MMI_MAINLCD_240X320__)) && defined (__GDI_MEMORY_PROFILE_2__)) && !defined(__MMI_UI_DALMATIAN_IDLESCREEN__))
#ifdef __MMI_TOUCH_DIAL_SCREEN__
/* initialize dialing_keypad */
setup_dialing_keypad(&dialing_keypad);
register_default_hide_softkeys();
#ifdef __MMI_TOUCH_SCREEN__
entry_full_screen();
#endif
#if defined (__MMI_MAINLCD_240X320__)
wgui_setup_dialer_inputbox(MMI_DIALING_KEYPAD_LAYER_X,MMI_DIALING_KEYPAD_LAYER_Y-MMI_DIALING_BOX_HEIGHT,
MMI_DIALING_KEYPAD_LAYER_WIDTH,MMI_DIALING_BOX_HEIGHT,(UI_buffer_type)Buffer,BufferLength,MMI_CATEGORY16_ID,
get_string(right_softkey),get_image(right_softkey_icon),history_buffer,0);
#else
wgui_setup_dialer_inputbox(0,MMI_status_bar_height,UI_device_width,29,(UI_buffer_type)Buffer,BufferLength,MMI_CATEGORY16_ID,
get_string(right_softkey),get_image(right_softkey_icon),history_buffer,0);
#endif
#else
disable_softkey_background();
register_hide_left_softkey(dialing_screen_hide_left_softkey);
register_hide_right_softkey(dialing_screen_hide_right_softkey);
gdi_image_get_dimension_id(IMG_POPUP_TITLE, &iwidth, &iheight);
dial_height = (s32)(iwidth/(1.5));
wgui_setup_dialer_inputbox((UI_device_width>>1)-(iwidth>>1),MMI_title_y+MMI_title_height+(MMI_content_height>>1)-(dial_height>>1),iwidth,dial_height,(UI_buffer_type)Buffer,BufferLength,MMI_CATEGORY16_ID,get_string(right_softkey),get_image(right_softkey_icon),history_buffer,0);
wgui_dialer_inputbox_set_border(MMI_TRUE,UI_COLOR_BLACK);
#endif
#else/* (((defined ( __MMI_MAINLCD_176X220__ ) || defined (__MMI_MAINLCD_240X320__)) && defined (__GDI_MEMORY_PROFILE_2__)) && !defined(__MMI_UI_DALMATIAN_IDLESCREEN__)) */
register_default_hide_softkeys();
wgui_setup_dialer_inputbox(0,main_LCD_dt_object.time.y+main_LCD_dt_object.time.height,UI_device_width,UI_device_height-(MMI_button_bar_height+main_LCD_dt_object.time.y+main_LCD_dt_object.time.height)
,(UI_buffer_type)Buffer,BufferLength,MMI_CATEGORY16_ID,get_string(right_softkey),get_image(right_softkey_icon),history_buffer,0);
#endif/* (((defined ( __MMI_MAINLCD_176X220__ ) || defined (__MMI_MAINLCD_240X320__)) && defined (__GDI_MEMORY_PROFILE_2__)) && !defined(__MMI_UI_DALMATIAN_IDLESCREEN__)) */
gdi_layer_unlock_frame_buffer();
ExitCategoryFunction = ExitCategory16Screen;
gdi_layer_restore_base_active();
gdi_layer_set_source_key(TRUE, GDI_COLOR_TRANSPARENT);
#if ( defined (__MMI_MAINLCD_240X320__) && defined (__MMI_TOUCH_DIAL_SCREEN__) )
gdi_layer_push_clip();
gdi_layer_reset_clip();
/*103105 Calvin added: After 6228, alpha channel is supported */
#ifndef __MMI_LITE_DISPLAY__
pixtel_UI_greyscale_rectangle(0,0, MAIN_LCD_DEVICE_WIDTH-1,MAIN_LCD_DEVICE_HEIGHT-1, MMI_BG_GREYSCALE_VALUE, MMI_BG_GREYSCALE_BLACK_VALUE);//102605 greyscale Calvin modified
#endif
gdi_draw_solid_rect(MMI_DIALING_KEYPAD_LAYER_X, MMI_DIALING_KEYPAD_LAYER_Y, MMI_DIALING_KEYPAD_LAYER_X+MMI_DIALING_KEYPAD_LAYER_WIDTH-1, MMI_DIALING_KEYPAD_LAYER_Y+MMI_DIALING_KEYPAD_LAYER_HEIGHT-1, GDI_COLOR_TRANSPARENT);
gdi_layer_pop_clip();
#else /* ( defined (__MMI_MAINLCD_240X320__) && defined (__MMI_TOUCH_DIAL_SCREEN__) ) */
gdi_layer_clear(GDI_COLOR_TRANSPARENT);
#endif /* ( defined (__MMI_MAINLCD_240X320__) && defined (__MMI_TOUCH_DIAL_SCREEN__) ) */
dm_setup_category_functions(dm_redraw_category_screen,dm_get_category_history,dm_get_category_history_size);
dm_register_category_controlled_callback(DrawCate16CategoryControlArea);
#if (( defined ( __MMI_MAINLCD_176X220__ ) ||defined (__MMI_MAINLCD_240X320__) ) && defined (__GDI_MEMORY_PROFILE_2__) ) //041205 Calvin modified
dm_register_category_controlled2_callback(DrawCate16CategoryControlArea2);
#endif
dm_data.s32ScrId = (s32)GetActiveScreenId();
dm_data.s32CatId = MMI_CATEGORY16_ID;
#ifndef __MMI_TOUCH_DIAL_SCREEN__
dm_data.s32flags = DM_SPECIFIC_HIDE_STATUS_BAR;
#else
dm_data.s32flags = 0;
#endif
dm_setup_data(&dm_data);
#ifdef __MMI_TOUCH_DIAL_SCREEN__
mmi_wgui_register_category_screen_control_area_pen_handlers(Cate16CategoryControlAreaPenDownHandler, MMI_PEN_EVENT_DOWN);
mmi_wgui_register_category_screen_control_area_pen_handlers(Cate16CategoryControlAreaPenUpHandler, MMI_PEN_EVENT_UP);
mmi_wgui_register_category_screen_control_area_pen_handlers(Cate16CategoryControlAreaPenMoveHandler, MMI_PEN_EVENT_MOVE);
mmi_wgui_register_category_screen_control_area_pen_handlers(Cate16CategoryControlAreaPenRepeatHandler, MMI_PEN_EVENT_REPEAT);
mmi_wgui_register_category_screen_control_area_pen_handlers(Cate16CategoryControlAreaPenLongTapHandler, MMI_PEN_EVENT_LONG_TAP);
mmi_wgui_register_category_screen_control_area_pen_handlers(Cate16CategoryControlAreaPenAbortHandler, MMI_PEN_EVENT_ABORT);
#endif
dm_redraw_category_screen();
}/* end of ShowCategory16Screen */
/*****************************************************************************
* FUNCTION
* ExitCategory16Screen
*
* DESCRIPTION
* Exits the category16 screen
*
* PARAMETERS
* void
*
* RETURNS
* void
*
* GLOBALS AFFECTED
*
*****************************************************************************/
void ExitCategory16Screen(void)
{
#if( defined (__MMI_MAINLCD_240X320__) && defined (__MMI_TOUCH_DIAL_SCREEN__) && defined (__MMI_UI_SMALL_SCREEN_SUPPORT__) )
reset_small_screen();
#endif
gdi_layer_lock_frame_buffer();
dialer_inputbox_handle_multitap_complete(WGUI_DIALER_BOX_ACTIVE_MULTITAP_ANY);
reset_multitaps();
close_dialer_inputbox();
close_main_LCD_dt_display();
close_status_icons();
reset_softkeys();
#if (( defined ( __MMI_MAINLCD_176X220__ ) || defined (__MMI_MAINLCD_240X320__)) && defined (__GDI_MEMORY_PROFILE_2__) )
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -