📄 wgui_categories_mm.c
字号:
#endif /* __MMI_MAINLCD_320X240__ */
shortcut_width = set_menu_item_count(number_of_items) + 7;
resize_menu_shortcut_handler(shortcut_width, MMI_title_height);
move_menu_shortcut_handler(UI_device_width - MMI_menu_shortcut_box.width, MMI_title_y);
register_hide_menu_shortcut(draw_title);
set_fixed_icontext_positions(0, 0, 0, 0);
MMI_fixed_icontext_menuitem.flags |= UI_MENUITEM_DISABLE_TEXT_DISPLAY;
MMI_disable_title_shortcut_display = 0;
#ifdef __MMI_WALLPAPER_ON_BOTTOM__
// title_bg_id = MAIN_MENU_MATRIX_TITLE_BG;
// wgui_set_wallpaper_on_bottom(MMI_TRUE);
// dm_get_scr_bg_image(&mm_bg_ID, &mm_bg_filename, &mm_bg_x, &mm_bg_y, &mm_bg_opacity);
// dm_set_scr_bg_image(IMG_MAIN_MENU_MATRIX_BG, NULL, -1, -1, current_MMI_theme->bg_opacity_full);
dm_get_scr_bg_flag(&mm_bg_flags);
dm_set_scr_bg_flag(mm_bg_flags | DM_SCR_BG_FORCE_SHOW);
#endif
h_flag = set_matrix_menu_category_history(MMI_CATEGORY14_MATRIX_ID, history_buffer);
if (h_flag)
#ifdef __MMI_WGUI_MINI_TAB_BAR__
if (wgui_if_mini_tab_bar_in_parent() == MMI_TRUE)
{
S32 idx = (S32) wgui_mini_tab_bar_get_index();
fixed_matrix_goto_item_no_redraw(idx);
}
else
#endif /* __MMI_WGUI_MINI_TAB_BAR__ */
fixed_matrix_goto_item_no_redraw(MMI_fixed_matrix_menu.highlighted_item);
else
{
if (history_buffer != NULL && main_menu_index != -1)
{
highlighted_item = main_menu_index;
}
fixed_matrix_goto_item_no_redraw(highlighted_item);
}
MMI_fixed_icontext_menuitem.flags |= UI_MENUITEM_FOCUSSED_ANIMATE;
SetKeyHandler(fixed_matrix_goto_previous_item, KEY_VOL_UP, KEY_EVENT_DOWN);
SetKeyHandler(fixed_matrix_goto_next_item, KEY_VOL_DOWN, KEY_EVENT_DOWN);
dm_data.s32CatId = MMI_CATEGORY14_MATRIX_ID;
#ifdef __MMI_MATRIX_MAIN_MENU_OPTIMIZE__
/* allocate matrix highlight buffer from SCR ASM */
MMI_fixed_matrix_menu.buffer.buf_ptr = (U8*)applib_mem_screen_alloc(MMI_MAIN_MENU_MATRIX_HIGHLIGHTED_BUF_SIZE);
MMI_ASSERT(MMI_fixed_matrix_menu.buffer.buf_ptr != NULL);
#endif /* __MMI_MATRIX_MAIN_MENU_OPTIMIZE__ */
break;
#if(ENABLE_CIRCULAR_3D_MENU)
case CIRCULAR_3D_MENU:
entry_full_screen();
MMI_current_menu_type = CIRCULAR_3D_MENU;
create_circular_3d_menu(number_of_items, list_of_items, list_of_icons);
register_circular_3d_menu_keys();
register_circular_3d_highlight_handler(standard_circular_3d_highlight_handler);
register_3d_menu_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(UI_device_width - MMI_menu_shortcut_box.width, MMI_title_y);
register_hide_menu_shortcut(show_circular_3d_menu);
h_flag = set_circular_menu_category_history(MMI_CATEGORY14_CIRCULAR_ID, history_buffer);
if (h_flag)
{
circular_3d_menu_goto_item_no_redraw(wgui_CM3D_menu.highlighted_item);
}
else
{
if (history_buffer != NULL && main_menu_index != -1)
{
highlighted_item = main_menu_index;
}
circular_3d_menu_goto_item_no_redraw(highlighted_item);
}
dm_data.s32CatId = MMI_CATEGORY14_CIRCULAR_ID;
break;
#endif /* (ENABLE_CIRCULAR_3D_MENU) */
#if(ENABLE_ROTATE_MENU)
case ROTATE_MENU:
entry_full_screen();
MMI_current_menu_type = ROTATE_MENU;
highlighted_item = number_of_items - 1;
create_circular_3d_menu(number_of_items, list_of_items, list_of_icons);
register_rotate_menu_keys();
register_circular_3d_highlight_handler(standard_circular_3d_highlight_handler);
register_3d_menu_shortcut_handler();
shortcut_width = set_menu_item_count(number_of_items) + 7;
resize_menu_shortcut_handler(shortcut_width, MMI_title_height);
#ifdef ROTATE_VERT_LINE_RIGHT
move_menu_shortcut_handler(0, MMI_title_y);
#else
move_menu_shortcut_handler(UI_device_width - MMI_menu_shortcut_box.width, MMI_title_y);
#endif
register_hide_menu_shortcut(show_circular_3d_menu);
h_flag = set_circular_menu_category_history(MMI_CATEGORY14_ROTATE_ID, history_buffer);
if (h_flag)
{
circular_3d_menu_goto_item_no_redraw(wgui_CM3D_menu.highlighted_item);
}
else
{
if (history_buffer != NULL && main_menu_index != -1)
{
highlighted_item = main_menu_index - 1;
}
circular_3d_menu_goto_item_no_redraw(highlighted_item);
}
dm_data.s32CatId = MMI_CATEGORY14_ROTATE_ID;
break;
#endif /* (ENABLE_ROTATE_MENU) */
}
#ifdef __MMI_UI_TECHNO_STATUS_ICON__
leave_full_screen();
#endif
gdi_layer_unlock_frame_buffer();
ExitCategoryFunction = ExitCategory14Screen;
UI_hide_animation_frame_function = hide_main_menu_animation_frame;
dm_setup_category_functions(dm_redraw_category_screen, GetCategory14History, GetCategory14HistorySize);
dm_data.s32ScrId = (S32) GetActiveScreenId();
dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
dm_setup_data(&dm_data);
dm_redraw_category_screen();
}
/*****************************************************************************
* FUNCTION
* ExitCategory14Screen
* DESCRIPTION
* Exits the category14 screen
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void ExitCategory14Screen(void)
{
#if((ENABLE_CIRCULAR_3D_MENU) || (ENABLE_ROTATE_MENU))
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (MMI_main_menu_type == CIRCULAR_3D_MENU || MMI_main_menu_type == ROTATE_MENU)
{
stop_rotate_circular_menu();
}
#endif /* ((ENABLE_CIRCULAR_3D_MENU) || (ENABLE_ROTATE_MENU)) */
UI_enable_alignment_timers();
ClearHighlightHandler();
#ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
gui_unblock_list_effect();
#endif
#ifdef __T5650__ //wangzhk 2009002.18
gdi_exit_mainmenu_free_timer();
#endif
UI_hide_animation_frame_function = UI_dummy_function;
gui_hide_animations();
#ifdef __MMI_UI_TECHNO_STATUS_ICON__
MMI_title_x = MMI_TITLE_X;
MMI_title_width = UI_device_width;
MMI_title_height = MMI_TITLE_HEIGHT;
MMI_content_y = MMI_CONTENT_Y;
MMI_content_height = MMI_CONTENT_HEIGHT;
#endif /* __MMI_UI_TECHNO_STATUS_ICON__ */
switch (MMI_current_menu_type)
{
case ANI_BG_LIST_MENU:
MMI_fixed_list_menu.flags &= ~UI_LIST_MENU_CENTER_HIGHLIGHTED;
MMI_fixed_list_menu.flags &= ~UI_LIST_MENU_DISABLE_SCROLLBAR;
MMI_fixed_list_menu.flags &= ~UI_LIST_MENU_DISABLE_BACKGROUND;
set_MMI_list_sub_menu_theme();
gui_set_fixed_list_menu_theme(&MMI_fixed_list_menu, current_UI_theme->fixed_list_menu_theme);
gui_set_fixed_icontext_menuitem_theme(
&MMI_fixed_icontext_menuitem,
current_UI_theme->fixed_icontext_menuitem_theme);
break;
case LIST_MENU:
case PAGE_MENU:
/* disable lines grids on this category screen */
#ifdef __MMI_UI_MM_LIST_NO_GRID__
gui_enable_fixed_list_line_draw();
#endif
MMI_fixed_icontext_menuitem.flags &= ~UI_MENUITEM_FOCUSSED_ANIMATE;
set_MMI_list_sub_menu_theme();
gui_set_fixed_list_menu_theme(&MMI_fixed_list_menu, current_UI_theme->fixed_list_menu_theme);
gui_set_fixed_icontext_menuitem_theme(
&MMI_fixed_icontext_menuitem,
current_UI_theme->fixed_icontext_menuitem_theme);
#ifdef __MMI_MAINLCD_240X320__
title_bg_id = 0;
#endif
#if(TITLE_TRANSITION_STYLE_NON_BLOCKING)
disable_title_transition();
#endif
if (MMI_current_menu_type == PAGE_MENU)
{
#ifdef __MMI_WALLPAPER_ON_BOTTOM__
title_bg_id = 0;
dm_set_scr_bg_flag(mm_bg_flags);
dm_set_scr_bg_image_no_draw(mm_bg_ID, mm_bg_filename, mm_bg_x, mm_bg_y, mm_bg_opacity);
wgui_reset_wallpaper_on_bottom();
#endif
}
break;
case MATRIX_MENU:
MMI_fixed_icontext_menuitem.flags &= ~UI_MENUITEM_FOCUSSED_ANIMATE;
MMI_fixed_matrix_menu.flags &= ~UI_MATRIX_MENU_FOR_MAINMENU;
set_MMI_matrix_sub_menu_theme();
gui_set_fixed_matrix_menu_theme(&MMI_fixed_matrix_menu, current_UI_theme->fixed_matrix_menu_theme);
gui_set_fixed_icontext_menuitem_theme(
&MMI_fixed_icontext_menuitem,
current_UI_theme->fixed_icontext_menuitem_theme);
#ifdef __MMI_WALLPAPER_ON_BOTTOM__
title_bg_id = 0;
dm_set_scr_bg_flag(mm_bg_flags);
// dm_set_scr_bg_image_no_draw(mm_bg_ID, mm_bg_filename, mm_bg_x, mm_bg_y, mm_bg_opacity);
// wgui_reset_wallpaper_on_bottom();
#endif
#ifdef __MMI_MATRIX_MAIN_MENU_OPTIMIZE__
/* free matrix highlight buffer */
applib_mem_screen_free(MMI_fixed_matrix_menu.buffer.buf_ptr);
#endif /* __MMI_MATRIX_MAIN_MENU_OPTIMIZE__ */
break;
}
reset_softkeys();
reset_menu_shortcut_handler();
reset_fixed_list();
reset_fixed_matrix();
#ifdef __MMI_UI_TECHNO_STATUS_ICON__
arrange_status_icons();
leave_full_screen();
#endif /* __MMI_UI_TECHNO_STATUS_ICON__ */
ExitCategoryFunction = MMI_dummy_function;
RedrawCategoryFunction = MMI_dummy_function;
GetCategoryHistory = dummy_get_history;
GetCategoryHistorySize = dummy_get_history_size;
}
/*****************************************************************************
* FUNCTION
* GetCategory14HistorySize
* DESCRIPTION
* Gets the history buffer size for the category14 screen
* PARAMETERS
* void
* RETURNS
* size in U8s of the history buffer
*****************************************************************************/
S32 GetCategory14HistorySize(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
switch (MMI_current_menu_type)
{
case ANI_BG_LIST_MENU:
case LIST_MENU:
case PAGE_MENU:
return (sizeof(list_menu_category_history));
break;
case MATRIX_MENU:
return (sizeof(matrix_menu_category_history));
break;
#if(ENABLE_CIRCULAR_3D_MENU)
case CIRCULAR_3D_MENU:
return (sizeof(circular_menu_category_history));
break;
#endif /* (ENABLE_CIRCULAR_3D_MENU) */
#if(ENABLE_ROTATE_MENU)
case ROTATE_MENU:
return (sizeof(circular_menu_category_history));
break;
#endif /* (ENABLE_ROTATE_MENU) */
}
return (0);
}
/*****************************************************************************
* FUNCTION
* GetCategory14History
* DESCRIPTION
* Gets the history buffer for the category14 screen
* PARAMETERS
* history_buffer [IN] Is the buffer into which the history data is stored (pre-allocated)
* RETURNS
* pointer to the history buffer
*****************************************************************************/
U8 *GetCategory14History(U8 *history_buffer)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
switch (MMI_current_menu_type)
{
case ANI_BG_LIST_MENU:
case LIST_MENU:
case PAGE_MENU:
get_list_menu_category_history(MMI_CATEGORY14_LIST_ID, history_buffer);
break;
case MATRIX_MENU:
get_matrix_menu_category_history(MMI_CATEGORY14_MATRIX_ID, history_buffer);
break;
#if(ENABLE_CIRCULAR_3D_MENU)
case CIRCULAR_3D_MENU:
get_circular_menu_category_history(MMI_CATEGORY14_CIRCULAR_ID, history_buffer);
break;
#endif /* (ENABLE_CIRCULAR_3D_MENU) */
#if(ENABLE_ROTATE_MENU)
case ROTATE_MENU:
get_circular_menu_category_history(MMI_CATEGORY14_ROTATE_ID, history_buffer);
break;
#endif /* (ENABLE_ROTATE_MENU) */
}
return (history_buffer);
}
/* for new list_matrix menu style */
#ifdef __MMI_BI_DEGREE_MAIN_MENU_STYLE__
#if defined(__MMI_MAINLCD_240X320__)
#define MMI_BI_DEGREE_MAIN_MENU_LIST_WIDTH 65
#define MMI_BI_DEGREE_MAIN_MENU_COLUMN_COUNT 2
#define MMI_BI_DEGREE_MAIN_MENU_ROW_COUNT 2
#define MMI_BI_DEGREE_MAIN_MENU_ROW_RATIO 3
#define MMI_BI_DEGREE_MAIN_MENU_NAVI_BAR_HEIGHT 20
#define MMI_BI_DEGREE_MAIN_MENU_ICON_TEXT_GAP 3
#define MMI_BI_DE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -