📄 wgui_categories.c
字号:
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
status_bar_flag[0] = get_status_icon_bar_type(0);
hide_status_icon_bar(0);
status_bar_flag[1] = get_status_icon_bar_type(1);
hide_status_icon_bar(1);
ExitCategoryFunction = ExitCategoryDummyScreen;
RedrawCategoryFunction = dm_redraw_category_screen;
GetCategoryHistory = dummy_get_history;
GetCategoryHistorySize = dummy_get_history_size;
} /* end of ShowCategoryDummyScreen */
/* 061306 dummy category End */
/* Start of Common List Category Screen */
extern PU8 subMenuDataPtrs[MAX_SUB_MENUS];
/*****************************************************************************
* FUNCTION
* RedrawListCategoryScreen
*
* DESCRIPTION
* Redraw category function of current main lcd category scrren using list menu
*
* PARAMETERS
*
* RETURNS
* void
*
* GLOBALS AFFECTED
* none
*****************************************************************************/
void RedrawListCategoryScreen(void)
{
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
#ifdef __MMI_UI_TITLE_TRANSITION__
S32 no_transition_in_title=0;
{
#ifdef __MMI_UI_TAB_PANE__
if(is_enabled_tab_pane())
tab_pane_modify_data();
#endif
if((gOnFullScreen & MMI_IN_FULL_SCREEN || gOnFullScreen & MMI_LEAVE_FULL_SCREEN) && !(gOnFullScreen & MMI_LEAVE_FULL_IDLE_SCREEN))
no_transition_in_title=1;
if(get_title_transition()!=WGUI_TRANSITION_NONE && !no_transition_in_title)
{
draw_title();
}
}
#else
#ifdef __MMI_UI_TAB_PANE__
if(is_enabled_tab_pane())
tab_pane_modify_data();
#endif
#endif
#ifdef __MMI_UI_LIST_TRANSITION__
if(get_list_transition()==WGUI_TRANSITION_T2D)
{
draw_title();
show_fixed_list();
}
#endif
gdi_layer_lock_frame_buffer();
#if(UI_ENABLE_POP_UP_DESCRIPTIONS)
pixtel_UI_pop_up_description_stop_scroll();
#endif
#ifdef __MMI_WGUI_MINI_TAB_BAR__
if ( mmi_wgui_if_mini_tab_bar_enable() ==MMI_TRUE )
{
move_fixed_list(MMI_fixed_list_menu.x, MMI_content_y+5);
resize_fixed_list(MMI_fixed_list_menu.width,MMI_fixed_list_menu.height-5);
mmi_wgui_show_mini_tab_bar();
}
#endif
clear_buttonbar();
show_title_status_icon();
#ifdef __MMI_UI_TITLE_TRANSITION__
if(no_transition_in_title || get_title_transition()==WGUI_TRANSITION_NONE)
#endif
//PMT VIKAS START 20051209
//For transition, title function call should be from here
draw_title();
//PMT VIKAS END 20051209
#ifdef __MMI_UI_LIST_TRANSITION__
if(get_list_transition()==WGUI_TRANSITION_NONE)
#endif
show_fixed_list();
show_softkey_background();
show_left_softkey();
show_right_softkey();
#ifdef __MMI_UI_TAB_PANE__
if(is_enabled_tab_pane())
{
show_tab_pane();
}
#endif /* __MMI_UI_TAB_PANE__ */
gdi_layer_unlock_frame_buffer();
#ifdef __MMI_UI_LIST_TRANSITION__
if(get_list_transition()==WGUI_TRANSITION_D2T)
{
show_fixed_list();
}
#endif
//PMT VIKAS START 20051209
#if defined(__MMI_UI_LIST_TRANSITION__)&&(LIST_TRANSITION_STYLE_NON_BLOCKING==1)
if(get_list_transition()==WGUI_TRANSITION_T2D && is_in_nonblocking_list_transition()==1)
{
gdi_layer_blt_previous(0,get_original_prev_list_y_value(),UI_device_width-1,UI_device_height-1);
}
else
#endif
//PMT VIKAS END 20051209
gdi_layer_blt_previous(0,0,UI_device_width-1,UI_device_height-1);
}/* end of RedrawListCategoryScreen */
/*****************************************************************************
* FUNCTION
* ExitListCategoryScreen
*
* DESCRIPTION
* Exit category function of current main lcd category scrren using list menu
*
* PARAMETERS
*
* RETURNS
* void
*
* GLOBALS AFFECTED
* none
*****************************************************************************/
void ExitListCategoryScreen(void)
{
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
MMI_disable_title_shortcut_display=0;//042905 Calvin added
disable_menu_shortcut_box_display=0;
ClearHighlightHandler();
reset_softkeys();
reset_menu_shortcut_handler();
reset_fixed_list();
reset_pop_up_descriptions();
#ifdef __MMI_UI_HINTS_IN_MENUITEM__
reset_all_force_flags_for_hints();
#ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
pixtel_UI_unblock_list_effect();
#endif
#endif
}/* end of ExitListCategoryScreen */
/*****************************************************************************
* FUNCTION
* GetListCategoryHistory
*
* DESCRIPTION
* Get category history function of current main lcd category scrren
* using list menu
*
* PARAMETERS
* history IN buffer store the valeu of history
*
* RETURNS
* void
*
* GLOBALS AFFECTED
* pointer to the history buffer
*****************************************************************************/
U8* GetListCategoryHistory(U8* history_buffer)
{
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
get_list_menu_category_history((word)g_gui_current_catid,history_buffer);
return(history_buffer);
}/* end of GetListCategoryHistory */
/*****************************************************************************
* FUNCTION
* SetListScreenFunctions
*
* DESCRIPTION
* Common functions to set ExitCategory, RedrawCategory, GetCategoryHistory
* GetCategoryHistorySize functions.
*
* PARAMETERS
* cat_id IN current category id
*
* RETURNS
* void
*
* GLOBALS AFFECTED
* g_gui_current_catid
*****************************************************************************/
void SetListScreenFunctions(S32 cat_id)
{
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
ExitCategoryFunction=ExitListCategoryScreen;
RedrawCategoryFunction=RedrawListCategoryScreen;
GetCategoryHistory=GetListCategoryHistory;
GetCategoryHistorySize=get_list_menu_category_history_size;
g_gui_current_catid=cat_id;
}/* end of SetListScreenFunctions */
/*****************************************************************************
* FUNCTION
* ShowListCategoryScreen
*
* DESCRIPTION
* Common function to show category screens containing list menu.
*
* PARAMETERS
* title IN string of title
* title_icon IN icon of title
* left_softkey IN string of left softkey
* left_softkey_icon IN icon of left softkey
* right_softkey IN string of right softkey
* right_softkey_icon IN icon of right softkey
* number_of_items IN number of items in list menu
*
* RETURNS
* void
*
* GLOBALS AFFECTED
* none
*****************************************************************************/
void ShowListCategoryScreen(UI_string_type title,UI_image_type title_icon,UI_string_type left_softkey,UI_image_type left_softkey_icon,UI_string_type right_softkey,UI_image_type right_softkey_icon,S32 number_of_items)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
S32 shortcut_width;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
gdi_layer_lock_frame_buffer();
/*Title*/
MMI_title_string=title;
MMI_title_icon=title_icon;
/*ShortCut*/
MMI_menu_shortcut_number=-1;
register_fixed_list_shortcut_handler();
shortcut_width=set_menu_item_count(number_of_items)+7;
resize_menu_shortcut_handler(shortcut_width,MMI_title_height);
move_menu_shortcut_handler(MMI_title_x + MMI_title_width-MMI_menu_shortcut_box.width,MMI_title_y);
register_hide_menu_shortcut(mmi_gui_redraw_menu_shortcut);
/*Softkeys*/
set_left_softkey_label(left_softkey);
set_left_softkey_icon(left_softkey_icon);
set_right_softkey_label(right_softkey);
set_right_softkey_icon(right_softkey_icon);
SetupCategoryKeyHandlers();
/*List*/
MMI_current_menu_type=LIST_MENU;
register_fixed_list_keys();
resize_fixed_icontext_menuitems(0,MMI_MENUITEM_HEIGHT);
resize_fixed_icontext_menuitems(MMI_fixed_list_menu.width-MMI_fixed_list_menu.vbar.width-1,MMI_fixed_icontext_menuitem.height);//062705 Calvin added for width
register_fixed_list_highlight_handler(standard_list_highlight_handler);
set_fixed_icontext_positions(MMI_MENUITEM_HEIGHT+2,0,1,0);
gdi_layer_unlock_frame_buffer();
}/* end of ShowListCategoryScreen */
/* End of Common List Category Screen */
/*****************************************************************************
* FUNCTION
* ShowCategory1Screen
*
* DESCRIPTION
* Displays the category1 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 Icon for the right softkey
* number_of_items IN Number of items
* list_of_items IN List of text items
* highlighted_item IN Index of the item to be highlighted by default
* history_buffer IN history buffer
*
* RETURNS
* void
*
* GLOBALS AFFECTED
* none
******************************************************************************/
void ShowCategory1Screen(U16 title,U16 title_icon,U16 left_softkey,U16 left_softkey_icon,U16 right_softkey,U16 right_softkey_icon,S32 number_of_items,U16* list_of_items,S32 highlighted_item,U8* history_buffer)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U8 i =0;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
for (i=0;i<number_of_items;i++)
{
subMenuDataPtrs[i]=(PU8)get_string(list_of_items[i]);
}
#ifdef __MMI_UI_LIST_TRANSITION__
if(!history_buffer)
set_list_transition(WGUI_TRANSITION_D2T);
#endif
ShowCategory6Screen( title, title_icon, left_softkey, left_softkey_icon, right_softkey, right_softkey_icon, number_of_items, subMenuDataPtrs,NULL, highlighted_item, history_buffer);
#ifdef __MMI_UI_LIST_TRANSITION__
#if(!LIST_TRANSITION_STYLE_NON_BLOCKING)
reset_list_transition();
#endif
#endif
}/* end of ShowCategory1Screen */
/*****************************************************************************
* FUNCTION
* ShowCategory2Screen
*
* DESCRIPTION
* Displays the category2 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 Icon for the right softkey
* message IN Message string
* history_buffer IN history buffer
*
* RETURNS
* void
*
* GLOBALS AFFECTED
* ExitCategoryFunction, RedrawCategoryFunction, GetCategoryHistory
* GetCategoryHistorySize, g_dm_data_struct
* *****************************************************************************/
void ShowCategory2Screen(U16 title,U16 title_icon,U16 left_softkey,U16 left_softkey_icon,U16 right_softkey,U16 right_softkey_icon,U16 message,U8* history_buffer)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U8* message_str=NULL;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
message_str = (U8*) get_string((UI_string_ID_type)message);
ShowCategory7Screen( title, title_icon, left_softkey, left_softkey_icon, right_softkey, right_softkey_icon, message_str, history_buffer);
}/* end of ShowCategory2Screen */
/*****************************************************************************
* FUNCTION
* ShowCategory6Screen
*
* DESCRIPTION
* Displays the category6 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 Icon for the right softkey
* number_of_items IN Number of items
* list_of_items IN List of text items.
* highlighted_item IN This is the default item that will be highlighted (if there is no history)
* history_buffer IN history buffer
*
* RETURNS
* void
*
* GLOBALS AFFECTED
* ExitCategoryFunction, RedrawCategoryFunction, GetCategoryHistory
* GetCategoryHistorySize, g_dm_data_struct
* *****************************************************************************/
void ShowCategory6Screen(U16 title,U16 title_icon,U16 left_softkey,U16 left_softkey_icon,U16 right_softkey,U16 right_softkey_icon,S32 number_of_items,U8** list_of_items,U8** list_of_descriptions,S32 highlighted_item,U8* history_buffer)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
dm_data_struct dm_data;
S32 i=0;
byte h_flag;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -