📄 wgui_categories.c
字号:
* message [IN] Notification message (string. Not string ID)
* history_buffer [IN] History buffer
* right_softkey_iconIN Icon for the right softkey(?)
* RETURNS
* void
*****************************************************************************/
void ShowCategory7Screen(
U16 title,
U16 title_icon,
U16 left_softkey,
U16 left_softkey_icon,
U16 right_softkey,
U16 right_softkey_icon,
U8 *message,
U8 *history_buffer)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
dm_data_struct dm_data;
S32 l;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
UI_UNUSED_PARAMETER(history_buffer);
gdi_layer_lock_frame_buffer();
MMI_menu_shortcut_number = -1;
change_left_softkey(left_softkey, left_softkey_icon);
change_right_softkey(right_softkey, right_softkey_icon);
SetupCategoryKeyHandlers();
MMI_title_string = (UI_string_type) get_string(title);
MMI_title_icon = (PU8) get_image(title_icon);
MMI_message_string = (UI_string_type) (message);
l = gui_strlen(MMI_message_string);
create_multiline_inputbox_set_buffer(MMI_message_string, l, l, 0);
//zx modify begin 20070404
#ifdef __MMI_BLACK_UI_STYLE__
MMI_multiline_inputbox.flags|=(UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW|UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR);
#else
MMI_multiline_inputbox.flags |=
(UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND |
UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR);
#endif
//zx modify end
gdi_layer_unlock_frame_buffer();
ExitCategoryFunction = ExitCategory7Screen;
RedrawCategoryFunction = dm_redraw_category_screen;
GetCategoryHistory = dm_get_category_history;
GetCategoryHistorySize = dm_get_category_history_size;
dm_data.s32ScrId = (S32) GetActiveScreenId();
dm_data.s32CatId = MMI_CATEGORY7_ID;
dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
dm_setup_data(&dm_data);
dm_redraw_category_screen();
} /* end of ShowCategory7Screen */
/*****************************************************************************
* FUNCTION
* ExitCategory7Screen
* DESCRIPTION
* Exits the category7 screen
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void ExitCategory7Screen(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
reset_softkeys();
} /* end of ExitCategory7Screen */
//zx add begin 20070404
#ifdef __MMI_MEMORY_SCREEN_WITH_PIC__
UI_image_type query_image1,query_image2;
UI_image_type GetTheCorrectImage(U16 count1,U16 count2)
{
U8 count;
UI_image_type query_image;
// zrx add begin 20061129
if(count2==0)
{
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_0);
return query_image;
}
// zrx add end
count=count1*100/count2;
if(count1==0) // zrx modify 20061209
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_0);
else if((count>=0)&&(count<=4))
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_1 );
else if((count>=5)&&(count<=9))
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_2 );
else if((count>=10)&&(count<=14))
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_3);
else if((count>=15)&&(count<=19))
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_4 );
else if((count>=20)&&(count<=24))
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_5 );
else if((count>=25)&&(count<=29))
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_6 );
else if((count>=30)&&(count<=34))
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_7 );
else if((count>=35)&&(count<=39))
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_8 );
else if((count>=40)&&(count<=44))
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_9 );
else if((count>=45)&&(count<=49))
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_10 );
else if((count>=50)&&(count<=54))
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_11 );
else if((count>=55)&&(count<=59))
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_12 );
else if((count>=60)&&(count<=64))
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_13 );
else if((count>=65)&&(count<=69))
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_14 );
else if((count>=70)&&(count<=74))
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_15 );
else if((count>=75)&&(count<=79))
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_16 );
else if((count>=80)&&(count<=86))
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_17 );
else if((count>=87)&&(count<=92))
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_18 );
else if((count>=93)&&(count<=99))
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_19 );
else if((count==100))
query_image=(UI_image_type) GetImage( IMG_ID_PHB_STATUS_QUERY_20);
return query_image;
}
void RedrawCategoryControlledArea7ExternScreen(dm_coordinates* coordinate)
{
gdi_layer_lock_frame_buffer();
gui_reset_clip();
gdi_layer_reset_clip();
// wangbei modify start 20070703
#ifdef __MT118_A_UI_STYLE__
gui_show_image(0,50,(UI_image_type)query_image1);
gui_show_image(0,100,(UI_image_type)query_image2);
#else
gui_show_image(0,66,(UI_image_type)query_image1);
gui_show_image(0,116,(UI_image_type)query_image2);
#endif
// wangbei modify end
gdi_layer_unlock_frame_buffer();
gdi_layer_blt_previous(0,0,UI_device_width-1,UI_device_height-1);
//In Category 200, redraw_category_screen() is being called here instead of ShowCategory,
//since RedrawCategory200Screen is doing many other things like drawing image etc.
}
/*****************************************************************************
* FUNCTION
* ShowCategory7ExtenScreen
*
* DESCRIPTION
* Displays the category7 screen
*
* PARAMETERS
* title IN Title for the screen
* title_icon IN Icon shown with the title
* left_softkey IN Left softkey label
* left_softkey_icon IN Icon for the left softkey
* right_softkey IN Right softkey label
* right_softkey_iconIN Icon for the right softkey
* message IN Notification message (string. Not string ID)
* history_buffer IN history buffer
*
* RETURNS
* void
*
* GLOBALS AFFECTED
* ExitCategoryFunction, RedrawCategoryFunction, GetCategoryHistory
* GetCategoryHistorySize, g_dm_data_struct
* *****************************************************************************/
void ShowCategory7ExtenScreen(U16 title,U16 title_icon,U16 left_softkey,U16 left_softkey_icon,U16 right_softkey,U16 right_softkey_icon,U8* message,U8* history_buffer,U16 count1,U16 total1,U16 count2,U16 total2)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
dm_data_struct dm_data;
S32 l;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
UI_UNUSED_PARAMETER(history_buffer);
gdi_layer_lock_frame_buffer();
MMI_menu_shortcut_number=-1;
change_left_softkey(left_softkey,left_softkey_icon);
change_right_softkey(right_softkey,right_softkey_icon);
SetupCategoryKeyHandlers();
MMI_title_string=(UI_string_type)get_string(title);
MMI_title_icon=(UI_image_type)get_image(title_icon);
MMI_message_string=(UI_string_type)(message);
l=gui_strlen(MMI_message_string);
statusFlag=TRUE;
create_multiline_inputbox_set_buffer(MMI_message_string,l,l,0);
#if 0
multiline_inputbox_input_callback=UI_dummy_function;
multiline_inputbox_navigate_callback=UI_dummy_function;
MMI_current_input_ext_type &= INPUT_TYPE_EXT_SIM_NUMERIC;
/* Warning: Temporary change only UCS2 / ASCII. This has to be done in a more formal manner */
#ifdef __UCS2_ENCODING
pixtel_UI_create_multi_line_input_box_set_buffer(&MMI_multiline_inputbox,MMI_multiline_inputbox_x,MMI_multiline_inputbox_y,MMI_multiline_inputbox_width,MMI_multiline_inputbox_height,MMI_message_string,l*2,(l+1)*2,0);
#endif
#ifdef __ASCII
pixtel_UI_create_multi_line_input_box_set_buffer(&MMI_multiline_inputbox,MMI_multiline_inputbox_x,MMI_multiline_inputbox_y,MMI_multiline_inputbox_width,MMI_multiline_inputbox_height,MMI_message_string,l,l+1,0);
#endif
#if((UI_ENABLE_FRAME_SKIPPING)&&(ENABLE_MULTILINE_INPUTBOX_FRAME_SKIPPING))
wgui_multiline_inputbox_frame_counter=0;
#endif
#endif
query_image1=GetTheCorrectImage(count1,total1);
query_image2=GetTheCorrectImage(count2, total2);
MMI_multiline_inputbox.flags|=(UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW|UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR);
gdi_layer_unlock_frame_buffer();
ExitCategoryFunction=ExitCategory7Screen;
RedrawCategoryFunction=dm_redraw_category_screen;
GetCategoryHistory = dm_get_category_history;
GetCategoryHistorySize = dm_get_category_history_size;
dm_data.s32ScrId = (S32)GetActiveScreenId();
dm_data.s32CatId = MMI_CATEGORY7Extern_ID;
dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
dm_setup_data(&dm_data);
dm_register_category_controlled_callback(RedrawCategoryControlledArea7ExternScreen); // zrx add 20061127
dm_redraw_category_screen();
}/* end of ShowCategory7Screen */
#endif
//zx add end
/*****************************************************************************
* FUNCTION
* ShowCategory8Screen
* DESCRIPTION
* Displays the category8 screen
* PARAMETERS
* title [IN] Title for the screen
* title_icon [IN] Icon shown with the title
* 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]
* message [IN] Notification message
* message_icon [IN]
* history_buffer [IN] History buffer
* image(?) [IN] Notification image
* right_softkey_iconIN Icon for the right softkey(?)
* RETURNS
* void
*****************************************************************************/
void ShowCategory8Screen(
U16 title,
U16 title_icon,
U16 left_softkey,
U16 left_softkey_icon,
U16 right_softkey,
U16 right_softkey_icon,
U16 message,
U16 message_icon,
U8 *history_buffer)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
ShowCategory66Screen(
title,
title_icon,
left_softkey,
left_softkey_icon,
right_softkey,
right_softkey_icon,
(U8*) get_string(message),
message_icon,
history_buffer);
} /* end of ShowCategory8Screen */
/*****************************************************************************
* FUNCTION
* ShowCategory208Screen
* DESCRIPTION
*
* PARAMETERS
* title [IN]
* title_icon [IN]
* left_softkey [IN]
* left_softkey_icon [IN]
* right_softkey [IN]
* right_softkey_icon [IN]
* message [?]
* message_icon [IN]
* history_buffer [?]
* RETURNS
* void
*****************************************************************************/
void ShowCategory208Screen(
U16 title,
U16 title_icon,
U16 left_softkey,
U16 left_softkey_icon,
U16 right_softkey,
U16 right_softkey_icon,
S8 *message,
U16 message_icon,
U8 *history_buffer)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
ShowCategory66Screen(
title,
title_icon,
left_softkey,
left_softkey_icon,
right_softkey,
right_softkey_icon,
(U8*) message,
message_icon,
history_buffer);
}
/*****************************************************************************
* FUNCTION
* ShowCategory9Screen
* DESCRIPTION
* Displays the category9 screen
* PARAMETERS
* message [IN] Message string
* message_icon [IN]
* history_buffer [IN] History buffer
* icon(?) [IN] Message icon
* RETURNS
* void
*****************************************************************************/
void ShowCategory9Screen(U16 message, U16 message_icon, U8 *history_buffer)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
dm_data_struct dm_data;
S32 l;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
dm_reset_context();
UI_UNUSED_PARAMETER(history_buffer);
gdi_layer_lock_frame_buffer();
entry_full_screen();
MMI_menu_shortcut_number = -1;
clear_category_screen_key_handlers();
clear_left_softkey();
clear_right_softkey();
if (message != 0)
{
MMI_message_string = (UI_string_type) get_string(message);
l = gui_strlen(MMI_message_string);
create_multiline_inputbox_set_buffer(MMI_message_string, l, l, 0);
MMI_multiline_inputbox.flags |=
(UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_CENTER_JUSTIFY |
UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND | UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR);
}
else
{
MMI_multiline_inputbox.flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
}
dm_add_image(get_image(message_icon), NULL, NULL);
//zx add start 20070404
#ifdef __MMI_BLACK_UI_STYLE__
dm_add_back_fill_area(current_MMI_theme->multitap_filler); //feller color defined by mtab_1
#endif
//zx add end
gdi_layer_unlock_frame_buffer();
ExitCategoryFunction = UI_dummy_function;
RedrawCategoryFunction = dm_redraw_category_screen;
GetCategoryHistory = dm_get_category_history;
GetCategoryHistorySize = dm_get_category_history_size;
dm_data.s32ScrId = (S32) GetActiveScreenId();
dm_data.s32CatId = MMI_CATEGORY9_ID;
dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
dm_setup_data(&dm_data);
dm_redraw_category_screen();
} /* end of ShowCategory9Screen */
/*****************************************************************************
* FUNCTION
* ExitCategory9Screen
* DESCRIPTION
* Exits the category9 screen
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void ExitCategory9Screen(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
gui_hide_animations();
} /* end of ExitCategory9Screen */
/*****************************************************************************
* FUNCTION
* ShowCategory11Screen
* DESCRIPTION
* Displays the category11 screen
* PARAMETERS
* title [IN]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -