wgui_categories.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:657k
源码类别:
MTK
开发平台:
C/C++
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- } /* end of ShowCategory32Screen */
- /*****************************************************************************
- * FUNCTION
- * ExitCategory32Screen
- * DESCRIPTION
- * Exits the dynamic menu screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory32Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- disable_menu_shortcut_box_display = 0;
- #if(UI_BLINKING_CURSOR_SUPPORT)
- StopMyTimer(BLINKING_CURSOR);
- #endif
- ClearHighlightHandler();
- reset_softkeys();
- reset_menu_shortcut_handler();
- reset_fixed_list();
- } /* end of ExitCategory32Screen */
- /*****************************************************************************
- * FUNCTION
- * GetCategory32History
- * DESCRIPTION
- * Get category32 history.
- * PARAMETERS
- * history_buffer [IN] History buffer
- * RETURNS
- * hitsory buffer
- *****************************************************************************/
- U8 *GetCategory32History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- get_list_menu_category_history(MMI_CATEGORY32_ID, history_buffer);
- return (history_buffer);
- } /* end of GetCategory32History */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory36Screen
- * DESCRIPTION
- * Displays the Dynamic radio list 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] Zero based index of the highlighed item (used if there is no history)
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory36Screen(
- 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,
- U16 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 i;
- U8 h_flag;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- create_fixed_twostate_menuitems(get_image(RADIO_ON_IMAGE_ID), get_image(RADIO_OFF_IMAGE_ID));
- associate_fixed_twostate_list();
- ShowListCategoryScreen(
- get_string(title),
- get_image(title_icon),
- get_string(left_softkey),
- get_image(left_softkey_icon),
- get_string(right_softkey),
- get_image(right_softkey_icon),
- number_of_items);
- resize_fixed_twostate_menuitems(0, MMI_MENUITEM_HEIGHT);
- set_fixed_twostate_positions(MMI_MENUITEM_HEIGHT, 0, 1, 0);
- for (i = 0; i < number_of_items; i++)
- {
- add_fixed_twostate_item((UI_string_type) list_of_items[i]);
- }
- register_fixed_list_highlight_handler(standard_radio_list_highlight_handler);
- h_flag = set_list_menu_category_history(MMI_CATEGORY36_ID, history_buffer);
- if (h_flag)
- {
- fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
- }
- else
- {
- fixed_list_goto_item_no_redraw(highlighted_item);
- }
- select_fixed_twostate_item(MMI_fixed_list_menu.highlighted_item);
- resize_fixed_twostate_menuitems_to_list_width();
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitListCategoryScreen;
- 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_CATEGORY36_ID;
- dm_data.s32flags = 0;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- } /* end of ShowCategory36Screen */
- /*****************************************************************************
- * Category52ChangeItemText
- * GetCategory32History
- *
- * DESCRIPTION
- * change the text of menu item of particular index of category52.
- *
- * PARAMETERS
- * index IN item index
- * text IN item text
- *
- * RETURNS
- * hitsory buffer
- *
- * GLOBALS AFFECTED
- *
- *****************************************************************************/
- /*****************************************************************************
- * FUNCTION
- * Category52ChangeItemText
- * DESCRIPTION
- *
- * PARAMETERS
- * index [IN]
- * text [?]
- * RETURNS
- * void
- *****************************************************************************/
- void Category52ChangeItemText(S32 index, U8 *text)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_fixed_icontext_menuitems[index].item_text = (UI_string_type) text;
- } /* end of Category52ChangeItemText */
- /*****************************************************************************
- * Category52ChangeItemText
- * Category52ChangeItemIcon
- *
- * DESCRIPTION
- * change the icon of menu item of particular index of category52
- *
- * PARAMETERS
- * index IN item index
- * image_ID IN item image_ID
- *
- * RETURNS
- * hitsory buffer
- *
- * GLOBALS AFFECTED
- *
- *****************************************************************************/
- /*****************************************************************************
- * FUNCTION
- * Category52ChangeItemIcon
- * DESCRIPTION
- *
- * PARAMETERS
- * index [IN]
- * image_ID [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void Category52ChangeItemIcon(S32 index, U16 image_ID)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_fixed_icontext_menuitems[index].item_icon = (PU8) get_image(image_ID);
- } /* end of Category52ChangeItemIcon */
- /*****************************************************************************
- * FUNCTION
- * Category52ChangeItemDescription
- * DESCRIPTION
- * change the popup text of menu item of particular index of category52
- * PARAMETERS
- * index [IN] Item index
- * text [IN] Description text
- * RETURNS
- * hitsory buffer(?)
- *****************************************************************************/
- void Category52ChangeItemDescription(S32 index, U8 *text)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_pop_up_description_strings[index].text_strings[0] = (UI_string_type) text;
- #ifdef __MMI_UI_HINT_TOGGLE_TRANSITION__
- wgui_setup_pop_up_description_transition();
- #endif
- } /* end of Category52ChangeItemDescription */
- /*****************************************************************************
- * FUNCTION
- * Category52ChangeItemDescriptionNoAnimation
- * DESCRIPTION
- * change the popup text of menu item of particular index of category52 but
- * we do not start transition animation even if __MMI_UI_HINT_TOGGLE_TRANSITION__
- * PARAMETERS
- * index [IN] Item index
- * text [IN] Description text
- * RETURNS
- * hitsory buffer(?)
- *****************************************************************************/
- void Category52ChangeItemDescriptionNoAnimation(S32 index, U8 *text)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_pop_up_description_strings[index].text_strings[0] = (UI_string_type) text;
- } /* end of Category52ChangeItemDescriptionNoAnimation */
- /*****************************************************************************
- * FUNCTION
- * Category52DisablePenMove
- * DESCRIPTION
- * Forcefully disable pen move for a particular menu
- * PARAMETERS
- * none
- * RETURNS
- * hitsory buffer(?)
- *****************************************************************************/
- void Category52DisablePenMove(void)
- {
- #ifdef __MMI_TOUCH_SCREEN__
- gui_set_fixed_list_menu_item_pen_function(
- &MMI_fixed_list_menu,
- gui_fixed_icontext_menuitem_translate_pen_event,
- MMI_TRUE,
- MMI_FALSE);
- #endif /* __MMI_TOUCH_SCREEN__ */
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory52Screen
- * DESCRIPTION
- * Displays the category52 screen ( List menu with description )
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon displayed with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Left softkey icon
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Right softkey icon
- * number_of_items [IN] Number of items in the menu
- * list_of_items [IN] Array of items
- * list_of_icons [IN] Array of icons
- * list_of_descriptions [IN] Array of Pop up description strings
- * flags [IN] Flags (see explanation below)
- * highlighted_item [IN] Default item to be highlighted (if there is no history)
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory52Screen(
- 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,
- U16 *list_of_icons,
- U8 **list_of_descriptions,
- S32 flags,
- 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]);
- }
- ShowCategory353Screen(
- (U8*) GetString(title),
- title_icon,
- left_softkey,
- left_softkey_icon,
- right_softkey,
- right_softkey_icon,
- number_of_items,
- subMenuDataPtrs,
- list_of_icons,
- list_of_descriptions,
- flags,
- highlighted_item,
- history_buffer);
- } /* end of ShowCategory52Screen */
- /*****************************************************************************
- * Category53ChangeItemText
- * Category53ChangeItemDescription
- *
- * DESCRIPTION
- * change the popup text of menu item of particular index of category53
- *
- * PARAMETERS
- * index IN item index
- * text IN description text
- *
- * RETURNS
- * hitsory buffer
- *
- * GLOBALS AFFECTED
- *
- *****************************************************************************/
- /*****************************************************************************
- * FUNCTION
- * Category53ChangeItemDescription
- * DESCRIPTION
- *
- * PARAMETERS
- * index [IN]
- * text [?]
- * RETURNS
- * void
- *****************************************************************************/
- void Category53ChangeItemDescription(S32 index, U8 *text)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_pop_up_description_strings[index].text_strings[0] = (UI_string_type) text;
- #ifdef __MMI_UI_HINT_TOGGLE_TRANSITION__
- wgui_setup_pop_up_description_transition();
- #endif
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory53Screen
- * DESCRIPTION
- * Displays the category53 screen ( List menu with description )
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon displayed with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Left softkey icon
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Right softkey icon
- * number_of_items [IN] Number of items in the menu
- * list_of_items [IN] Array of items
- * list_of_icons [IN] Array of icons
- * list_of_descriptions [IN] Array of Pop up description strings
- * flags [IN] Flags (see explanation below)
- * highlighted_item [IN] Default item to be highlighted (if there is no history)
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory53Screen(
- 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,
- U16 *list_of_icons,
- U8 **list_of_descriptions,
- S32 flags,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ShowCategory353Screen(
- (U8*) GetString(title),
- title_icon,
- left_softkey,
- left_softkey_icon,
- right_softkey,
- right_softkey_icon,
- number_of_items,
- list_of_items,
- list_of_icons,
- list_of_descriptions,
- flags,
- highlighted_item,
- history_buffer);
- } /* end of ShowCategory53Screen */
- #if defined __MMI_DRAW_MANAGER__ && defined __MMI_UI_TAB_PANE__
- void dm_list_category_controlled_area(dm_coordinates *coordinate)
- {
- show_tab_pane();
- }
- #endif
- /*****************************************************************************
- * FUNCTION
- * ShowCategory353Screen
- * DESCRIPTION
- * Displays the category353 screen ( List menu with description )
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon displayed with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Left softkey icon
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Right softkey icon
- * number_of_items [IN] Number of items in the menu
- * list_of_items [IN] Array of items
- * list_of_icons [IN] Array of icons
- * list_of_descriptions [IN] Array of Pop up description strings
- * flags [IN] Flags (see explanation below)
- * highlighted_item [IN] Default item to be highlighted (if there is no history)
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory353Screen(
- U8 *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,
- U16 *list_of_icons,
- U8 **list_of_descriptions,
- S32 flags,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 i;
- U8 h_flag,mm_bg_flags;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- create_fixed_icontext_menuitems();
- associate_fixed_icontext_list();
- MMI_disable_title_shortcut_display = 1;
- MMI_fixed_list_menu.flags |= UI_LIST_MENU_LOOP | UI_LIST_MENU_DISABLE_BACKGROUND | UI_LIST_MENU_DISABLE_BKGRND_IN_LAYER;
- ShowListCategoryScreen(
- (UI_string_type) title,
- get_image(title_icon),
- get_string(left_softkey),
- get_image(left_softkey_icon),
- get_string(right_softkey),
- get_image(right_softkey_icon),
- number_of_items);
- if (list_of_descriptions == NULL)
- {
- for (i = 0; i < number_of_items; i++)
- {
- add_fixed_icontext_item((UI_string_type) list_of_items[i], wgui_get_list_menu_icon(i, list_of_icons[i]));
- wgui_pop_up_description_strings[i].text_strings[0] = NULL;
- }
- }
- else
- {
- for (i = 0; i < number_of_items; i++)
- {
- add_fixed_icontext_item((UI_string_type) list_of_items[i], wgui_get_list_menu_icon(i, list_of_icons[i]));
- wgui_pop_up_description_strings[i].text_strings[0] = (UI_string_type) list_of_descriptions[i];
- }
- }
- h_flag = set_list_menu_category_history(MMI_CATEGORY52_ID, history_buffer);
- #ifdef __MMI_UI_HINTS_IN_MENUITEM__
- if (list_of_descriptions != NULL)
- {
- S32 hints = 0;
- for (i = 0; i < number_of_items; i++)
- {
- if (wgui_pop_up_description_strings[i].text_strings[0])
- {
- hints = 1;
- break;
- }
- }
- if (hints)
- {
- if (is_set_force_icon_on_highlight_only_in_menuitem())
- {
- wgui_show_icon_only_highlight_in_icontext_menuitem();
- }
- if (is_set_force_all_hints_in_menuitem())
- {
- wgui_enable_hints_in_icontext_menuitem();
- }
- else if (is_set_force_hints_on_highlight_in_menuitem())
- {
- wgui_enable_hint_highlight_in_icontext_menuitem();
- }
- else
- {
- wgui_enable_hint_highlight_in_icontext_menuitem();
- }
- set_pop_up_descriptions(1, number_of_items, MMI_fixed_list_menu.highlighted_item);
- #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
- gui_block_list_effect();
- #endif
- }
- }
- #endif /* __MMI_UI_HINTS_IN_MENUITEM__ */
- if (h_flag)
- {
- fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
- }
- else
- {
- fixed_list_goto_item_no_redraw(highlighted_item);
- }
- MMI_title_string = (UI_string_type) title;
- MMI_title_icon = (PU8) get_image(title_icon);
- set_pop_up_descriptions(1, number_of_items, MMI_fixed_list_menu.highlighted_item);
- gdi_layer_unlock_frame_buffer();
- disable_softkey_background();
- wgui_set_title_bknd_display(MMI_FALSE);
- dm_set_scr_bg_image(IMG_GLOBAL_SUB_MENU_BG_2, 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);
- ExitCategoryFunction = ExitListCategoryScreen;
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- #ifdef __MMI_UI_TAB_PANE__
- if(is_enabled_tab_pane())
- {
- if(MMI_tab_control.type == TAB_CONTROL_WITH_THREE_ICON
- || MMI_tab_control.type == TAB_CONTROL_WITH_FOUR_ICON)
- {
- dm_data.s32CatId = MMI_CATEGORY54_ID;
- dm_register_category_controlled_callback(dm_list_category_controlled_area);
- }
- else if(MMI_tab_control.type == TAB_CONTROL_WITH_ONE_ICON)
- {
- dm_data.s32CatId = MMI_CATEGORY55_ID;
- }
- }
- else
- #endif
- dm_data.s32CatId = MMI_CATEGORY52_ID;
- dm_data.s32flags |= DM_CLEAR_SCREEN_BACKGROUND | DM_NO_STATUS_BAR | DM_BUTTON_DISABLE_BACKGROUND;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- } /* end of ShowCategory353Screen */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory55Screen
- * DESCRIPTION
- * Displays the category55 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.
- * list_of_descriptions [IN]
- * highlighted_item [IN] This is the default item that will be highlighted (if there is no history)
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory55Screen(
- 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,
- U8 **list_of_descriptions,
- 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]);
- }
- ShowCategory6Screen(
- title,
- title_icon,
- left_softkey,
- left_softkey_icon,
- right_softkey,
- right_softkey_icon,
- number_of_items,
- subMenuDataPtrs,
- list_of_descriptions,
- highlighted_item,
- history_buffer);
- } /* end of ShowCategory55Screen */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory56Screen
- * DESCRIPTION
- * Displays the category56 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.
- * list_of_descriptions [IN]
- * highlighted_item [IN] This is the default item that will be highlighted (if there is no history)
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory56Screen(
- 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 */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ShowCategory6Screen(
- title,
- title_icon,
- left_softkey,
- left_softkey_icon,
- right_softkey,
- right_softkey_icon,
- number_of_items,
- list_of_items,
- list_of_descriptions,
- highlighted_item,
- history_buffer);
- } /* end of ShowCategory56Screen */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory59Screen
- * DESCRIPTION
- * Displays the category59 screen ( confirm image with text )
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon displayed with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Left softkey icon
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Right softkey icon
- * message [IN] Notification message
- * message_icon [IN]
- * history_buffer [IN] History buffer
- * image(?) [IN] Notification image
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory59Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U8 *message,
- U16 message_icon,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 l;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- dm_reset_context();
- 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);
- dm_add_image(get_image(message_icon), NULL, NULL);
- 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 | UI_MULTI_LINE_INPUT_BOX_CENTER_JUSTIFY);
- gdi_layer_unlock_frame_buffer();
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY59_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- } /* end of ShowCategory59Screen */
- /*****************************************************************************
- * FUNCTION
- * ExitCategory59Screen
- * DESCRIPTION
- * Exits the category59 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory59Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_hide_animations();
- } /* end of ExitCategory59Screen */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory61Screen
- * DESCRIPTION
- * Displays the category61 screen (Aphorisms screen)
- * PARAMETERS
- * message [IN] Message string
- * message_icon [IN] Message icon
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory61Screen(U8 *message, U16 message_icon, U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 l, width, height;
- /*----------------------------------------------------------------*/
- /* 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();
- MMI_message_string = (UI_string_type) message;
- MMI_message_icon = (PU8) get_image(message_icon);
- gui_measure_image(MMI_message_icon, &width, &height);
- 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 | UI_MULTI_LINE_INPUT_BOX_VIEW_MODE;
- dm_add_image(MMI_message_icon, NULL, NULL);
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = MMI_dummy_function;
- dm_setup_category_functions(dm_redraw_category_screen, dummy_get_history, dummy_get_history_size);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY61_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- } /* end of ShowCategory61Screen */
- /* 101205 irda Calvin Start */
- #ifdef __MMI_MAINLCD_240X320__
- extern UI_filled_area wgui_pop_up_dialog_background;
- #endif
- /*****************************************************************************
- * FUNCTION
- * cat66_update_progress_string
- * DESCRIPTION
- * Update status of progress for category66screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void cat66_update_progress_string(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- gdi_layer_push_clip();
- gdi_layer_set_clip(
- MMI_multiline_inputbox.x,
- MMI_multiline_inputbox.y,
- MMI_multiline_inputbox.x + MMI_multiline_inputbox.width - 1,
- MMI_multiline_inputbox.y + MMI_multiline_inputbox.height - 1);
- #ifdef __MMI_MAINLCD_240X320__
- gui_fill_rectangle(
- MMI_multiline_inputbox.x,
- MMI_multiline_inputbox.y,
- MMI_multiline_inputbox.x + MMI_multiline_inputbox.width - 1,
- MMI_multiline_inputbox.y + MMI_multiline_inputbox.height - 1,
- wgui_pop_up_dialog_background.c);
- #else /* __MMI_MAINLCD_240X320__ */
- gui_fill_rectangle(
- MMI_multiline_inputbox.x,
- MMI_multiline_inputbox.y,
- MMI_multiline_inputbox.x + MMI_multiline_inputbox.width - 1,
- MMI_multiline_inputbox.y + MMI_multiline_inputbox.height - 1,
- UI_COLOR_WHITE);
- #endif /* __MMI_MAINLCD_240X320__ */
- show_multiline_inputbox();
- gdi_layer_pop_clip();
- gdi_layer_unlock_frame_buffer();
- gdi_layer_blt_previous(
- MMI_multiline_inputbox.x,
- MMI_multiline_inputbox.y,
- MMI_multiline_inputbox.x + MMI_multiline_inputbox.width - 1,
- MMI_multiline_inputbox.y + MMI_multiline_inputbox.height - 1);
- } /* end of cat66_update_progress_string */
- /* 101205 irda Calvin Start */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory66Screen
- * DESCRIPTION
- * Displays the category66 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] Notification message
- * message_icon [IN]
- * history_buffer [IN] History buffer
- * image(?) [IN] Notification image
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory66Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U8 *message,
- U16 message_icon,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- U8 dm_screen_type = DM_TITLE_AREA_NORMAL;
- S32 l = 0;
- PU8 image;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- dm_reset_context();
- #if defined (__MMI_MAINLCD_240X320__) && defined(__MMI_UI_SMALL_SCREEN_SUPPORT__)
- set_small_screen();
- entry_full_screen();
- #endif /* defined (__MMI_MAINLCD_240X320__) && defined(__MMI_UI_SMALL_SCREEN_SUPPORT__) */
- UI_UNUSED_PARAMETER(history_buffer);
- gdi_layer_lock_frame_buffer();
- MMI_menu_shortcut_number = -1;
- clear_category_screen_key_handlers();
- clear_left_softkey();
- clear_right_softkey();
- dm_data.s32flags = 0;
- if ((left_softkey == 0) && (left_softkey_icon == 0) && (right_softkey == 0) && (right_softkey_icon == 0))
- {
- dm_data.s32flags |= DM_NO_SOFTKEY;
- }
- else
- {
- dm_data.s32flags &= ~DM_NO_SOFTKEY;
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- register_left_softkey_handler();
- register_right_softkey_handler();
- register_default_hide_softkeys();
- }
- if ((title == 0) && (title_icon == 0))
- {
- dm_screen_type = DM_TITLE_AREA_STATUS_ICON_ONLY;
- ShowStatusIconsTitle();
- }
- else if (!((title == 0xffff) && (title_icon == 0xffff)))
- {
- dm_screen_type = DM_TITLE_AREA_NORMAL;
- MMI_title_string = (UI_string_type) get_string(title);
- MMI_title_icon = (PU8) get_image(title_icon);
- }
- else
- {
- dm_screen_type = DM_TITLE_AREA_NONE;
- }
- MMI_message_string = (UI_string_type) message;
- image = (PU8) get_image(message_icon);
- 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 | UI_MULTI_LINE_INPUT_BOX_VIEW_MODE;
- dm_add_image(image, NULL, NULL);
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitCategory66Screen;
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- switch (dm_screen_type)
- {
- case DM_TITLE_AREA_NONE:
- dm_data.s32CatId = MMI_CATEGORY66_NONE_ID;
- break;
- case DM_TITLE_AREA_STATUS_ICON_ONLY:
- dm_data.s32CatId = MMI_CATEGORY66_STATUS_ICON_ID;
- break;
- case DM_TITLE_AREA_NORMAL:
- dm_data.s32CatId = MMI_CATEGORY66_NORMAL_ID;
- break;
- }
- #ifndef __MMI_MAINLCD_240X320__
- dm_data.s32flags |= DM_CLEAR_SCREEN_BACKGROUND;
- #endif
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- } /* end of ShowCategory66Screen */
- /*****************************************************************************
- * FUNCTION
- * ExitCategory66Screen
- * DESCRIPTION
- * Exits the category66 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory66Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if defined (__MMI_MAINLCD_240X320__) && defined(__MMI_UI_SMALL_SCREEN_SUPPORT__)
- reset_small_screen();
- #endif
- close_status_icons();
- gui_hide_animations();
- wgui_category_screen_no_buttons = 0;
- category_screen_layout_flags = 0;
- } /* end of ExitCategory66Screen */
- /*****************************************************************************
- * FUNCTION
- * wgui_hide_multitap
- * DESCRIPTION
- * Hide function for multitap
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_hide_multitap(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- color c;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- c.r = 255;
- c.g = 255;
- c.b = 255;
- c.alpha = 100;
- gui_reset_clip();
- gui_fill_rectangle(
- MMI_multitap_x,
- MMI_multitap_y,
- MMI_multitap_x + MMI_multitap_width + 1,
- MMI_multitap_y + MMI_multitap_height + 1,
- c);
- } /* end of wgui_hide_multitap */
- /*****************************************************************************
- * FUNCTION
- * SetCategory69RightSoftkeyFunction
- * DESCRIPTION
- *
- * PARAMETERS
- * f [IN]
- * k [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void SetCategory69RightSoftkeyFunction(void (*f) (void), MMI_key_event_type k)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(k);
- wgui_singleline_inputbox_RSK_function = f;
- }
- /*****************************************************************************
- * FUNCTION
- * cat69_virtual_keypad_callback
- * DESCRIPTION
- * Displays the category69 screen
- * PARAMETERS
- * void
- * BYTE(?) [IN] * history_buffer history buffer
- * INPUT_TYPE_ALPHANUMERIC_SENTENCECASE(?) [IN]
- * INPUT_TYPE(?) [IN] Can take the following values:
- * INPUT_TYPE_ALPHANUMERIC_LOWERCASE(?) [IN]
- * INPUT_TYPE_NUMERIC(?) [IN]
- * below(?) [IN]
- * INPUT_TYPE_ALPHANUMERIC_PASSWORD(?) [IN] (rare).
- * INT(?) [IN] Buffer_size Size of the buffer.
- * INPUT_TYPE_ALPHANUMERIC_UPPERCASE(?) [IN]
- * MMI_ID_TYPE(?) [IN] Message, Message
- * INPUT_TYPE_NUMERIC_PASSWORD(?) [IN]
- * For(?) [IN] Example, 5 means only 5 characters can be input in this screen.
- * BUFFER(?) [IN] Buffer Buffer the input box should use.
- * RETURNS
- * void
- *****************************************************************************/
- extern void ZiInuptMethodEnterSinglelineInputBox(void);
- void cat69_virtual_keypad_callback(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if defined(__MMI_TOUCH_SCREEN__)
- mmi_pen_editor_clear_and_show_virtual_keyboard_area();
- #endif
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory69Screen
- * DESCRIPTION
- *
- * PARAMETERS
- * title [IN]
- * title_icon [IN]
- * left_softkey [IN]
- * left_softkey_icon [IN]
- * right_softkey [IN]
- * right_softkey_icon [IN]
- * message [IN]
- * input_type [IN]
- * buffer [?]
- * buffer_size [IN]
- * history_buffer [?]
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory69Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U16 message,
- S16 input_type,
- U8 *buffer,
- S32 buffer_size,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 h = 0, len;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(message);
- gdi_layer_lock_frame_buffer();
- #ifdef __MMI_ZI__
- ZiInuptMethodEnterSinglelineInputBox();
- #endif
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- SetupCategoryKeyHandlers();
- MMI_menu_shortcut_number = -1;
- MMI_disable_title_shortcut_display = 1;
- if (title == 0)
- {
- dm_data.s32flags = DM_NO_TITLE;
- }
- else
- {
- dm_data.s32flags = 0;
- MMI_title_string = get_string(title);
- MMI_title_icon = get_image(title_icon);
- }
- MMI_message_string = (UI_string_type) get_string(message);
- len = gui_strlen(MMI_message_string);
- create_multiline_inputbox_set_buffer(MMI_message_string, len, len, 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);
- wgui_setup_singleline_inputbox(
- 4,
- MMI_multiline_inputbox.y + MMI_multiline_inputbox.height,
- UI_device_width - 8,
- h,
- buffer,
- buffer_size,
- MMI_CATEGORY111_ID,
- get_string(right_softkey),
- get_image(right_softkey_icon),
- input_type,
- history_buffer,
- 0);
- register_hide_multitap(wgui_hide_multitap);
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitCategory69Screen;
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY69_ID;
- dm_data.s32flags |= DM_CLEAR_SCREEN_BACKGROUND;
- dm_data.s32flags |= DM_SHOW_VKPAD;
- dm_register_vkpad_callback(cat69_virtual_keypad_callback);
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- } /* end of ShowCategory69Screen */
- /*****************************************************************************
- * FUNCTION
- * ExitCategory69Screen
- * DESCRIPTION
- * Exits the category69 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory69Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- set_MMI_current_input_type();
- wgui_switch_title_with_status_bar = 0;
- reset_softkeys();
- reset_multitaps();
- reset_multiline_inputbox();
- wgui_close_singleline_inputbox();
- } /* end of ExitCategory69Screen */
- /* Temporary hardcoded filler for Pop up dialog screens */
- UI_filled_area bluewgui_color_dialog_background = {UI_FILLED_AREA_TYPE_COLOR,
- UI_NULL_IMAGE,
- NULL,
- {159, 159, 255, 100},
- {0, 0, 0, 0},
- {0, 0, 0, 100},
- {50, 50, 50, 100},
- 0
- };
- #ifdef __MMI_MENSTRUAL__
- /* Only used in cat72(Menstrual) */
- UI_filled_area greygui_pop_up_dialog_background = {UI_FILLED_AREA_TYPE_COLOR | UI_FILLED_AREA_SINGLE_BORDER,
- UI_NULL_IMAGE,
- NULL,
- {192, 192, 192, 100},
- {0, 0, 0, 0},
- {0, 0, 0, 100},
- {50, 50, 50, 100},
- 0
- };
- /* Only used in cat72(Menstrual) */
- UI_filled_area purplegui_pop_up_dialog_background = {UI_FILLED_AREA_TYPE_COLOR | UI_FILLED_AREA_SINGLE_BORDER,
- UI_NULL_IMAGE,
- NULL,
- {149, 43, 255, 100},
- {0, 0, 0, 0},
- {0, 0, 0, 100},
- {50, 50, 50, 100},
- 0
- };
- /* Only used in cat72(Menstrual) */
- UI_filled_area whitegui_pop_up_dialog_background = {UI_FILLED_AREA_TYPE_COLOR | UI_FILLED_AREA_SINGLE_BORDER,
- UI_NULL_IMAGE,
- NULL,
- {255, 255, 255, 100},
- {0, 0, 0, 0},
- {0, 0, 0, 100},
- {50, 50, 50, 100},
- 0
- };
- /*****************************************************************************
- * FUNCTION
- * DrawCate72CategoryControlArea
- * DESCRIPTION
- * Draws the category72 category control area
- * PARAMETERS
- * coordinate [IN/OUT] Coordinates of category controlled area.
- * RETURNS
- * void
- *****************************************************************************/
- void DrawCate72CategoryControlArea(dm_coordinates *coordinate)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- RedrawCategory72Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory72Screen
- * DESCRIPTION
- * Redraws the category 72 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory72Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 x2 = 0, w = 0, h = 0;
- S8 ascii_percent[50];
- S8 uni_percent[100];
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memset(ascii_percent, 0, 50);
- gdi_layer_reset_clip();
- if (wgui_is_wallpaper_on_bottom() == MMI_TRUE)
- {
- gdi_draw_solid_rect(
- 0,
- (MMI_title_y + MMI_title_height),
- UI_device_width,
- (UI_device_height - MMI_button_bar_height - 1),
- GDI_COLOR_TRANSPARENT);
- }
- else
- {
- gui_draw_filled_area(
- 0,
- (MMI_title_y + MMI_title_height),
- UI_device_width,
- (UI_device_height - MMI_button_bar_height - 1),
- &greygui_pop_up_dialog_background);
- }
- gui_draw_filled_area(
- wgui_image_clip_x1,
- wgui_image_clip_y1,
- wgui_image_clip_x2,
- wgui_image_clip_y2,
- &whitegui_pop_up_dialog_background);
- x2 = wgui_image_clip_x1 + no_of_pixel;
- gui_draw_filled_area(
- wgui_image_clip_x1,
- wgui_image_clip_y1,
- x2,
- wgui_image_clip_y2,
- &purplegui_pop_up_dialog_background);
- sprintf((PS8) ascii_percent, "%d", (S16) no_of_pixel);
- strcat((PS8) ascii_percent, (PS8) "%");
- gui_set_text_color(UI_COLOR_BLACK);
- gui_measure_string((UI_string_type) uni_percent, &w, &h);
- if (r2lMMIFlag)
- {
- gui_move_text_cursor(((UI_device_width >> 1) - 10) + w, (wgui_image_clip_y2 + 5));
- }
- else
- {
- gui_move_text_cursor(((UI_device_width >> 1) - 10), (wgui_image_clip_y2 + 5));
- }
- memset(uni_percent, 0, 100);
- AnsiiToUnicodeString((PS8) uni_percent, (PS8) ascii_percent);
- gui_print_text((UI_string_type) uni_percent);
- show_multiline_inputbox();
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory72Screen
- * DESCRIPTION
- * Displays the category72 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
- * percentage_value [IN] Percentage value (0 to 100)
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory72Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U8 *message,
- S32 percentage_value,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 l, fh;
- /*----------------------------------------------------------------*/
- /* 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);
- 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);
- move_multiline_inputbox(0, (MMI_title_y + MMI_title_height) + 2);
- resize_multiline_inputbox(MMI_multiline_inputbox.width, MMI_content_height);
- show_multiline_inputbox_no_draw();
- gui_set_font(MMI_multiline_inputbox.text_font);
- fh = get_multiline_inputbox_line_height();
- resize_multiline_inputbox(
- MMI_multiline_inputbox.width,
- (MMI_multiline_inputbox.n_lines * fh) + MULTILINE_INPUTBOX_HEIGHT_PAD + MMI_multiline_inputbox.text_y);
- wgui_image_clip_x1 = ((UI_device_width >> 1) - 50);
- wgui_image_clip_y1 = (U16) (MMI_multiline_inputbox.y + MMI_multiline_inputbox.height);
- wgui_image_clip_x2 = ((UI_device_width >> 1) + 50);
- wgui_image_clip_y2 = (wgui_image_clip_y1 + 20);
- no_of_pixel = percentage_value;
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitCategory72Screen;
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY72_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- dm_setup_data(&dm_data);
- dm_register_category_controlled_callback(DrawCate72CategoryControlArea);
- dm_redraw_category_screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory72Screen
- * DESCRIPTION
- * Exits the category72 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory72Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_hide_animations();
- }
- #endif /* __MMI_MENSTRUAL__ */
- /*****************************************************************************
- * FUNCTION
- * Category73RedrawScreen
- * DESCRIPTION
- * Draw category 73 screen without invoking animation effect again
- * It can be used to update the display content of category 73
- *
- * Remark: this function only support ICON_ICON_TEXT style; other styles unsupported yet
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static CAT73DISPLAY g_wgui_cat73_display_flag;
- void Category73RedrawScreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
- gui_block_list_effect();
- #endif
- /* Recalculate icon/text coordinates if icon is changed */
- if (g_wgui_cat73_display_flag == ICON_ICON_TEXT)
- {
- S32 i, w1 = 0, w2 = 0, h1 = 0, h2 = 0, iw, ih;
- PU8 img;
- for (i = 0; i < MMI_fixed_list_menu.n_items; i++)
- {
- img = MMI_fixed_icontext_list_menuitems[i].item_icons[0];
- if (img)
- {
- gui_measure_image(img, &iw, &ih);
- if (iw > w1)
- {
- w1 = iw;
- }
- if (ih > h1)
- {
- h1 = ih;
- }
- }
- img = MMI_fixed_icontext_list_menuitems[i].item_icons[1];
- if (img)
- {
- gui_measure_image(img, &iw, &ih);
- if (iw > w2)
- {
- w2 = iw;
- }
- if (ih > h2)
- {
- h2 = ih;
- }
- }
- }
- if (!w1 || !h1)
- {
- w1 = 9;
- h1 = 18;
- }
- if (!w2 || !h2)
- {
- w2 = 9;
- h2 = 18;
- }
- set_fixed_icontext_list_icon_coordinates(0, 2, 0, w1, h1);
- set_fixed_icontext_list_icon_coordinates(1, (w1 + 5), 0, w2, h2);
- set_fixed_icontext_list_text_coordinates(
- 0,
- (w1 + w2 + 10),
- 0,
- UI_device_width - (w1 + w2 + 10) - MMI_fixed_list_menu.vbar.width,
- MMI_MENUITEM_HEIGHT);
- }
- RedrawCategoryFunction();
- #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
- gui_unblock_list_effect();
- #endif
- }
- /*****************************************************************************
- * FUNCTION
- * Category73ChangeItemIcon
- * DESCRIPTION
- * Change the icon of category 73
- * Please use Category73RedrawScreen() to redraw after data changed
- * PARAMETERS
- * item_index [IN] menu item index
- * icon_index [IN] icon index (0 or 1)
- * icon [IN] icon image
- * RETURNS
- * void
- *****************************************************************************/
- void Category73ChangeItemIcon(S32 item_index, S32 icon_index, PU8 icon)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (icon_index < 2)
- {
- MMI_fixed_icontext_list_menuitems[item_index].item_icons[icon_index] = icon;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory73Screen
- * DESCRIPTION
- * Displays the category73 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
- * list_of_icons1 [IN] List for first column of icons
- * list_of_icons2 [IN] List for second column of icons
- * highlighted_item [IN] Default item to be highlighted(if there is no history)
- * history_buffer [IN] History buffer
- * u8display_flag [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory73Screen(
- 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,
- U16 *list_of_icons1,
- U16 *list_of_icons2,
- S32 highlighted_item,
- U8 *history_buffer,
- U8 u8display_flag)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 text_width;
- S32 i = 0, w1 = 0, w2 = 0, h1 = 0, h2 = 0, temp_w = 0, temp_h = 0;
- U8 h_flag, mm_bg_flags;
- U8 *img = NULL;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_wgui_cat73_display_flag = u8display_flag;
- gdi_layer_lock_frame_buffer();
- create_fixed_icontext_list_menuitems(1, 2);
- associate_fixed_icontext_list_list();
- MMI_disable_title_shortcut_display = 1;
- MMI_fixed_list_menu.flags |= UI_LIST_MENU_LOOP | UI_LIST_MENU_DISABLE_BACKGROUND | UI_LIST_MENU_DISABLE_BKGRND_IN_LAYER;
- ShowListCategoryScreen(
- get_string(title),
- get_image(title_icon),
- get_string(left_softkey),
- get_image(left_softkey_icon),
- get_string(right_softkey),
- get_image(right_softkey_icon),
- number_of_items);
- resize_fixed_icontext_list_menuitems(0, MMI_MENUITEM_HEIGHT);
- text_width = (UI_device_width - MMI_fixed_list_menu.vbar.width - 57);
- img = (U8*) GetImage(list_of_icons1[0]);
- gui_measure_image(img, &w1, &h1);
- for (i = 1; i < number_of_items; i++)
- {
- img = (U8*) GetImage(list_of_icons1[i]);
- gui_measure_image(img, &temp_w, &temp_h);
- if (temp_w > w1)
- {
- w1 = temp_w;
- }
- if (temp_h > h1)
- {
- h1 = temp_h;
- }
- }
- if (w1 == 0)
- {
- w1 = 9;
- }
- if (h1 == 0)
- {
- h1 = 18;
- }
- temp_w = temp_h = 0;
- img = (U8*) GetImage(list_of_icons2[0]);
- gui_measure_image(img, &w2, &h2);
- for (i = 1; i < number_of_items; i++)
- {
- img = (U8*) GetImage(list_of_icons2[i]);
- gui_measure_image(img, &temp_w, &temp_h);
- if (temp_w > w2)
- {
- w2 = temp_w;
- }
- if (temp_h > h2)
- {
- h2 = temp_h;
- }
- }
- switch (u8display_flag)
- {
- case ICON_TEXT_ICON:
- set_fixed_icontext_list_icon_coordinates(0, 2, 0, w1, h1);
- if ((w2 == 0) && (h2 == 0))
- {
- text_width = (UI_device_width - MMI_fixed_list_menu.vbar.width - (w1 + 10));
- }
- /* PMT HIMANSHU START 20051028 */
- set_fixed_icontext_list_text_coordinates(0, (w1 + 5), 0, text_width, MMI_MENUITEM_HEIGHT);
- /* PMT HIMANSHU END 20051028 */
- if ((w2 > 0) && (h2 > 0))
- {
- set_fixed_icontext_list_icon_coordinates(1, (w1 + 10 + text_width), 0, w2, h2);
- }
- break;
- case ICON_ICON_TEXT:
- if (w2 == 0)
- {
- w2 = 9;
- }
- if (h2 == 0)
- {
- h2 = 18;
- }
- set_fixed_icontext_list_icon_coordinates(0, 2, 0, w1, h1);
- set_fixed_icontext_list_icon_coordinates(1, (w1 + 5), 0, w2, h2);
- /* PMT HIMANSHU START 20051028 */
- set_fixed_icontext_list_text_coordinates(
- 0,
- (w1 + w2 + 10),
- 0,
- UI_device_width - (w1 + w2 + 10) - MMI_fixed_list_menu.vbar.width,
- MMI_MENUITEM_HEIGHT);
- /* PMT HIMANSHU END 20051028 */
- break;
- case TEXT_ICON_ICON:
- if (w2 == 0)
- {
- w2 = 9;
- }
- if (h2 == 0)
- {
- h2 = 18;
- }
- /* PMT HIMANSHU START 20051028 */
- set_fixed_icontext_list_text_coordinates(0, 2, 0, text_width, MMI_MENUITEM_HEIGHT);
- /* PMT HIMANSHU END 20051028 */
- set_fixed_icontext_list_icon_coordinates(1, (text_width + 5), 0, w1, h1);
- set_fixed_icontext_list_icon_coordinates(0, (w1 + text_width + 10), 0, w2, h2);
- break;
- }
- for (i = 0; i < number_of_items; i++)
- {
- fixed_icontext_list_item_insert(i);
- add_fixed_icontext_list_item_text(i, 0, (UI_string_type) list_of_items[i]);
- add_fixed_icontext_list_item_icon(i, 0, get_image(list_of_icons1[i]));
- add_fixed_icontext_list_item_icon(i, 1, wgui_get_list_menu_icon_if_not_empty(i, list_of_icons2[i]));
- }
- MMI_fixed_icontext_list_menuitem.flags |= UI_MENUITEM_RIGHT_JUSTIFY;
- h_flag = set_list_menu_category_history(MMI_CATEGORY73_ID, history_buffer);
- if (h_flag)
- {
- fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
- }
- else
- {
- fixed_list_goto_item_no_redraw(highlighted_item);
- }
- gdi_layer_unlock_frame_buffer();
- wgui_set_title_bknd_display(MMI_FALSE);
- dm_set_scr_bg_image(IMG_GLOBAL_SUB_MENU_BG_2, 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);
- ExitCategoryFunction = ExitListCategoryScreen;
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY73_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND | DM_NO_STATUS_BAR;;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ChangeCategory74MessageString
- * DESCRIPTION
- * Change the content of string used in category74.
- * PARAMETERS
- * new_string [IN] New content of string
- * RETURNS
- * void
- *****************************************************************************/
- void ChangeCategory74MessageString(U8 *new_string)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_multiline_inputbox.text = (UI_buffer_type) new_string;
- MMI_multiline_inputbox.cursor_p = new_string;
- MMI_multiline_inputbox.flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- gui_show_multi_line_input_box(&MMI_multiline_inputbox);
- MMI_multiline_inputbox.flags &= ~UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- } /* end of ChangeCategory74MessageString */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory74Screen
- * DESCRIPTION
- * Displays the category74 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
- * buffer [IN] Buffer the input box should use
- * buffer_size [IN] Size of the buffer
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory74Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U8 *buffer,
- S32 buffer_size,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 l;
- S16 input_type = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- MMI_menu_shortcut_number = -1;
- MMI_disable_title_shortcut_display = 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);
- l = gui_strlen((UI_string_type) buffer);
- create_multiline_inputbox_set_buffer((UI_string_type) buffer, buffer_size, l, 0);
- register_multiline_inputbox_viewer_keys();
- MMI_multiline_inputbox.flags |= (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_VIEW_MODE);
- #ifdef __MMI_WALLPAPER_ON_BOTTOM__
- MMI_multiline_inputbox.flags |= UI_MULTI_LINE_INPUT_BOX_TRANSPARENT_BACKGROUND;
- #endif
- set_multiline_inputbox_category_history(MMI_CATEGORY74_ID, history_buffer, &input_type);
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitCategory74Screen;
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY74_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- } /* end of ShowCategory74Screen */
- /*****************************************************************************
- * FUNCTION
- * ExitCategory74Screen
- * DESCRIPTION
- * Exits the category74 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory74Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- reset_softkeys();
- reset_multitaps();
- reset_multiline_inputbox();
- } /* end of ExitCategory74Screen */
- #ifdef __UI_PAGING_IN_MULTILINE_EDITOR__
- #ifdef __MMI_TOUCH_SCREEN__
- S32 MMI_content_height_prev;
- S32 MMI_content_y_prev;
- #endif
- /*****************************************************************************
- * FUNCTION
- * ShowCategory75Screen
- * DESCRIPTION
- * Displays the category75 screen
- * PARAMETERS
- * name [?]
- * 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
- * buffer [IN] Buffer the input box should use
- * buffer_size [IN] Size of the buffer
- * history_buffer [IN] History buffer
- * page_info_app [IN]
- * title(?) [IN] Title for the screen
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory75Screen(
- U16 *name,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U8 *buffer,
- S32 buffer_size,
- U8 *history_buffer,
- gui_page_info_app **page_info_app)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 l;
- S16 input_type = 0;
- gui_page_info_app *page_info_d = *page_info_app;
- dm_coordinates gui_multiline_get_coordinates;
- S32 shortcut_width;
- #if defined(__MMI_TOUCH_SCREEN__)
- mmi_pen_handwriting_area_struct stroke_area;
- S32 inputbox_y = (MMI_title_y + MMI_title_height);
- const gui_virtual_keyboard_pen_enum disable_backspace_list[] = {GUI_VKBD_PEN_BAKSPACE, GUI_VKBD_PEN_NONE};
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_TOUCH_SCREEN__
- wgui_paging_set_full_screen_flag(FALSE);
- #endif
- dm_get_control_coordinates_from_category(
- -1,
- MMI_CATEGORY74_ID,
- DM_MULTILINE_INPUTBOX1,
- -1,
- &gui_multiline_get_coordinates);
- #ifdef __MMI_TOUCH_SCREEN__
- gui_multiline_get_coordinates.s16Height = gui_multiline_get_coordinates.s16Height - MMI_title_y - 4;
- #endif
- wgui_dm_set_multiline_data(&gui_multiline_get_coordinates);
- gui_lock_double_buffer();
- MMI_multiline_inputbox.jump_to_offset_flag = 0;
- MMI_menu_shortcut_number = -1;
- shortcut_width = set_menu_item_count(100)+7;
- resize_menu_shortcut_handler(shortcut_width, MMI_title_height);
- MMI_disable_title_shortcut_display = 0;
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- SetupCategoryKeyHandlers();
- MMI_title_string = (UI_string_type) name;
- MMI_title_icon = (PU8) get_image(title_icon);
- l = gui_strlen((UI_string_type) buffer);
- create_multiline_inputbox_set_buffer((UI_string_type) buffer, buffer_size, l, 0);
- #ifdef __MMI_TOUCH_SCREEN__
- stroke_area.x1 = 0;
- stroke_area.x2 = 0 + MMI_content_width - MMI_fixed_list_menu.vbar.width;
- stroke_area.y1 = 0;
- stroke_area.y2 = inputbox_y;
- register_keyboard_input_handler(singleline_inputbox_numeric_keyboard_input_handler);
- mmi_pen_editor_set_vk_keys(MMI_FALSE, NULL, disable_backspace_list);
- mmi_pen_editor_setup_input_box(
- &stroke_area,
- NULL,
- INPUT_TYPE_NUMERIC,
- MMI_FALSE,
- PEN_EDITOR_PAGING_IN_MULTLINE_EDITOR);
- #endif /* __MMI_TOUCH_SCREEN__ */
- wgui_paging_multiline_set_page(page_info_d->start_id, page_info_d->end_id);
- wgui_paging_multiline_set_font(page_info_d->font_size, page_info_d->font_style);
- register_multiline_inputbox_viewer_keys();
- MMI_multiline_inputbox.flags |= (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_VIEW_MODE); /* |UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND); */
- if (page_info_d->highlight_string == 1)
- {
- MMI_multiline_inputbox.flags |= UI_MULTI_LINE_INPUT_BOX_WORD_HIGHLIGHT;
- wgui_paging_highlight_search_string(page_info_d->jump_offset_from_app, page_info_d->search_str_len);
- }
- #ifdef __MMI_WALLPAPER_ON_BOTTOM__
- MMI_multiline_inputbox.flags |= UI_MULTI_LINE_INPUT_BOX_TRANSPARENT_BACKGROUND;
- #endif
- MMI_multiline_inputbox.ext_flags |= GUI_MULTI_LINE_INPUT_BOX_VIEW_PAGING_MODE;
- MMI_multiline_inputbox.page_offset = page_info_d->text_offset;
- MMI_multiline_inputbox.jump_offset_from_app = page_info_d->jump_offset_from_app;
- MMI_multiline_inputbox.search_flag_is_on = page_info_d->search_flag_is_on;
- show_multiline_inputbox_no_draw();
- wgui_paging_set_scrollbar_range(page_info_d->doc_size);
- set_multiline_inputbox_category_history(MMI_CATEGORY74_ID, history_buffer, &input_type);
- gui_unlock_double_buffer();
- ExitCategoryFunction = ExitCategory75Screen;
- wgui_paging_multiline_set_scroll_info(&page_info_d);
- wgui_paging_set_show_percentage_flag();
- if (page_info_d->text_offset)
- {
- wgui_paging_multiline_set_percentage(page_info_d->start_id, page_info_d->text_offset);
- }
- else
- {
- show_multiline_inputbox_no_draw();
- if (MMI_multiline_inputbox.search_flag_is_on)
- {
- wgui_paging_multiline_set_percentage(page_info_d->start_id, (S16)MMI_multiline_inputbox.text_offset);//110606 compile warning
- }
- else
- {
- wgui_paging_multiline_set_percentage(page_info_d->start_id, page_info_d->jump_offset_from_app);
- }
- }
- if (page_info_d->jump_to_end == 0)
- {
- show_multiline_inputbox_no_draw();
- wgui_paging_jump_to_end();
- wgui_paging_multiline_inputbox_set_percentage_scale(COMPLETE_PERCENTAGE_SCALE);
- }
- wgui_paging_reset_show_percentage_flag();
- if (page_info_d->text_offset != 0)
- {
- if (MMI_multiline_inputbox.text_offset_y != page_info_d->last_text_offset_y)
- {
- MMI_multiline_inputbox.text_offset_y = page_info_d->last_text_offset_y;
- }
- }
- #ifdef __MMI_TOUCH_SCREEN__
- dm_register_category_controlled_callback(RedrawCategoryControlledArea75Screen);
- wgui_register_category_screen_control_area_pen_handlers(wgui_paging_pen_down_hdlr, MMI_PEN_EVENT_DOWN);
- wgui_register_category_screen_control_area_pen_handlers(wgui_paging_pen_up_hdlr, MMI_PEN_EVENT_UP);
- wgui_register_category_screen_control_area_pen_handlers(wgui_paging_pen_move_hdlr, MMI_PEN_EVENT_MOVE);
- #endif /* __MMI_TOUCH_SCREEN__ */
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- #ifdef __MMI_TOUCH_SCREEN__
- dm_data.s32CatId = MMI_CATEGORY75_ID;
- #else
- dm_data.s32CatId = MMI_CATEGORY74_ID;
- #endif
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- #ifdef __MMI_TOUCH_SCREEN__
- dm_data.s32flags |= DM_SHOW_VKPAD;
- dm_register_vkpad_callback(wgui_paging_virtual_keypad_callback);
- #endif /* __MMI_TOUCH_SCREEN__ */
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- MMI_multiline_inputbox.page_offset = MMI_multiline_inputbox.jump_offset_from_app = 0;
- /* wgui_paging_multiline_set_scroll_info(&page_info_d); */
- if (page_info_d->scroll_flag == WGUI_PAGING_AUTO_SCROLL_ON && page_info_d->scroll_speed != 0)
- {
- wgui_paging_start_text_scroll();
- }
- else
- {
- wgui_paging_stop_text_scroll();
- }
- MMI_multiline_inputbox.flags &= ~UI_MULTI_LINE_INPUT_BOX_WORD_HIGHLIGHT;
- if (page_info_d->scroll_type == WGUI_PAGING_SCROLL_LINE_BY_LINE)
- {
- SetKeyHandler(wgui_paging_multiline_inputbox_previous_line_in_paging, KEY_UP_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(wgui_paging_multiline_inputbox_next_line_in_paging_scroll, KEY_DOWN_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(wgui_paging_multiline_inputbox_previous_line_in_paging, KEY_VOL_UP, KEY_EVENT_DOWN);
- SetKeyHandler(wgui_paging_multiline_inputbox_next_line_in_paging_scroll, KEY_VOL_DOWN, KEY_EVENT_DOWN);
- }
- else
- {
- SetKeyHandler(wgui_paging_multiline_inputbox_previous_page, KEY_UP_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(wgui_paging_multiline_inputbox_next_page, KEY_DOWN_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(wgui_paging_multiline_inputbox_previous_page, KEY_VOL_UP, KEY_EVENT_DOWN);
- SetKeyHandler(wgui_paging_multiline_inputbox_next_page, KEY_VOL_DOWN, KEY_EVENT_DOWN);
- }
- } /* end of ShowCategory75Screen */
- #ifdef __MMI_TOUCH_SCREEN__
- /*****************************************************************************
- * FUNCTION
- * RedrawCategoryControlledArea75Screen
- * DESCRIPTION
- * redraw function for category 75 in touch screen
- * PARAMETERS
- * coordinate [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategoryControlledArea75Screen(dm_coordinates *coordinate)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- redraw_multiline_inputbox();
- }
- #endif /* __MMI_TOUCH_SCREEN__ */
- /*****************************************************************************
- * FUNCTION
- * ExitCategory75Screen
- * DESCRIPTION
- * Exits the category75 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory75Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- reset_softkeys();
- reset_multitaps();
- reset_multiline_inputbox();
- MMI_multiline_inputbox.previous_shared_bytes = 0;
- MMI_disable_title_shortcut_display = 1;
- wgui_paging_reset_show_percentage_flag();
- wgui_paging_stop_text_scroll();
- #ifdef __MMI_TOUCH_SCREEN__
- mmi_pen_editor_close_input_box();
- #endif
- MMI_multiline_inputbox.ext_flags &= ~GUI_MULTI_LINE_INPUT_BOX_VIEW_PAGING_MODE;
- } /* end of ExitCategory75Screen */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory77Screen
- * DESCRIPTION
- *
- * PARAMETERS
- * name [?]
- * title_icon [IN]
- * left_softkey [IN]
- * left_softkey_icon [IN]
- * right_softkey [IN]
- * right_softkey_icon [IN]
- * buffer [?]
- * buffer_size [IN]
- * history_buffer [?]
- * page_info_app [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory77Screen(
- U16 *name,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U8 *buffer,
- S32 buffer_size,
- U8 *history_buffer,
- gui_page_info_app **page_info_app)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 l;
- S16 input_type = 0;
- gui_page_info_app *page_info_d = *page_info_app;
- dm_coordinates gui_multiline_get_coordinates;
- #if defined(__MMI_TOUCH_SCREEN__)
- mmi_pen_handwriting_area_struct stroke_area;
- const gui_virtual_keyboard_pen_enum disable_backspace_list[] = {GUI_VKBD_PEN_BAKSPACE, GUI_VKBD_PEN_NONE};
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_TOUCH_SCREEN__
- S32 inputbox_y = MMI_title_y + MMI_title_height;
- wgui_paging_set_full_screen_flag(TRUE);
- gui_multiline_get_coordinates.s16X = 0;
- gui_multiline_get_coordinates.s16Y = 0;
- gui_multiline_get_coordinates.s16Width = MAIN_LCD_DEVICE_WIDTH;
- gui_multiline_get_coordinates.s16Height = MAIN_LCD_DEVICE_HEIGHT - MMI_title_y - 3;
- MMI_content_height_prev = MMI_content_height;
- MMI_content_y_prev = MMI_content_y;
- MMI_content_y = 0;
- MMI_content_height = MAIN_LCD_DEVICE_HEIGHT;
- #else /* __MMI_TOUCH_SCREEN__ */
- dm_get_control_coordinates_from_category(
- -1,
- MMI_CATEGORY77_ID,
- DM_MULTILINE_INPUTBOX1,
- -1,
- &gui_multiline_get_coordinates);
- #endif /* __MMI_TOUCH_SCREEN__ */
- wgui_dm_set_multiline_data(&gui_multiline_get_coordinates);
- gui_lock_double_buffer();
- entry_full_screen();
- MMI_menu_shortcut_number = -1;
- MMI_disable_title_shortcut_display = 0;
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- SetupCategoryKeyHandlers();
- MMI_title_string = (UI_string_type) name;
- MMI_title_icon = (PU8) get_image(title_icon);
- l = gui_strlen((UI_string_type) buffer);
- MMI_multiline_inputbox.flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR;
- create_multiline_inputbox_set_buffer((UI_string_type) buffer, buffer_size, l, 0);
- #ifdef __MMI_TOUCH_SCREEN__
- stroke_area.x1 = 0;
- stroke_area.x2 = 0 + MMI_content_width - MMI_fixed_list_menu.vbar.width;
- stroke_area.y1 = 0;
- stroke_area.y2 = inputbox_y;
- register_keyboard_input_handler(singleline_inputbox_numeric_keyboard_input_handler);
- mmi_pen_editor_set_vk_keys(MMI_FALSE, NULL, disable_backspace_list);
- mmi_pen_editor_setup_input_box(
- &stroke_area,
- NULL,
- INPUT_TYPE_NUMERIC,
- MMI_FALSE,
- PEN_EDITOR_PAGING_IN_MULTLINE_EDITOR);
- #endif /* __MMI_TOUCH_SCREEN__ */
- wgui_paging_multiline_set_page(page_info_d->start_id, page_info_d->end_id);
- wgui_paging_multiline_set_font(page_info_d->font_size, page_info_d->font_style);
- register_multiline_inputbox_viewer_keys();
- MMI_multiline_inputbox.flags |= (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_VIEW_MODE); /* |UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND); */
- #ifdef __MMI_WALLPAPER_ON_BOTTOM__
- MMI_multiline_inputbox.flags |= UI_MULTI_LINE_INPUT_BOX_TRANSPARENT_BACKGROUND;
- #endif
- MMI_multiline_inputbox.ext_flags |= GUI_MULTI_LINE_INPUT_BOX_VIEW_PAGING_MODE;
- if (page_info_d->highlight_string == 1)
- {
- MMI_multiline_inputbox.flags |= UI_MULTI_LINE_INPUT_BOX_WORD_HIGHLIGHT;
- wgui_paging_highlight_search_string(page_info_d->jump_offset_from_app, page_info_d->search_str_len);
- }
- /* MMI_multiline_inputbox.ext_flags |=GUI_MULTI_LINE_INPUT_BOX_FULL_SCREEN; */
- MMI_multiline_inputbox.page_offset = page_info_d->text_offset;
- MMI_multiline_inputbox.jump_offset_from_app = page_info_d->jump_offset_from_app;
- show_multiline_inputbox_no_draw();
- wgui_paging_set_scrollbar_range(page_info_d->doc_size);
- wgui_paging_set_show_percentage_flag();
- if (page_info_d->jump_to_end == 0)
- {
- wgui_paging_jump_to_end();
- }
- set_multiline_inputbox_category_history(MMI_CATEGORY77_ID, history_buffer, &input_type);
- gui_unlock_double_buffer();
- ExitCategoryFunction = ExitCategory77Screen;
- wgui_paging_multiline_set_scroll_info(&page_info_d);
- if (page_info_d->text_offset)
- {
- wgui_paging_multiline_set_percentage(page_info_d->start_id, page_info_d->text_offset);
- }
- else
- {
- show_multiline_inputbox_no_draw();
- if (MMI_multiline_inputbox.search_flag_is_on)
- {
- wgui_paging_multiline_set_percentage(page_info_d->start_id, (S16)MMI_multiline_inputbox.text_offset);//110606 compile warning
- }
- else
- {
- wgui_paging_multiline_set_percentage(page_info_d->start_id, page_info_d->jump_offset_from_app);
- }
- }
- if (page_info_d->text_offset != 0)
- {
- if (MMI_multiline_inputbox.text_offset_y != page_info_d->last_text_offset_y)
- {
- MMI_multiline_inputbox.text_offset_y = page_info_d->last_text_offset_y;
- }
- }
- #ifdef __MMI_TOUCH_SCREEN__
- dm_register_category_controlled_callback(RedrawCategoryControlledArea75Screen);
- wgui_register_category_screen_control_area_pen_handlers(wgui_paging_pen_down_hdlr, MMI_PEN_EVENT_DOWN);
- wgui_register_category_screen_control_area_pen_handlers(wgui_paging_pen_move_hdlr, MMI_PEN_EVENT_MOVE);
- wgui_register_category_screen_control_area_pen_handlers(wgui_paging_pen_up_hdlr, MMI_PEN_EVENT_UP);
- #endif /* __MMI_TOUCH_SCREEN__ */
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY77_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- #ifdef __MMI_TOUCH_SCREEN__
- dm_data.s32flags |= DM_SHOW_VKPAD;
- dm_register_vkpad_callback(wgui_paging_virtual_keypad_callback);
- #endif /* __MMI_TOUCH_SCREEN__ */
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- /* wgui_paging_multiline_set_scroll_info(&page_info_d); */
- MMI_multiline_inputbox.flags &= ~UI_MULTI_LINE_INPUT_BOX_WORD_HIGHLIGHT;
- if (page_info_d->scroll_type == WGUI_PAGING_SCROLL_LINE_BY_LINE)
- {
- SetKeyHandler(wgui_paging_multiline_inputbox_previous_line_in_paging, KEY_UP_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(wgui_paging_multiline_inputbox_next_line_in_paging_scroll, KEY_DOWN_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(wgui_paging_multiline_inputbox_previous_line_in_paging, KEY_VOL_UP, KEY_EVENT_DOWN);
- SetKeyHandler(wgui_paging_multiline_inputbox_next_line_in_paging_scroll, KEY_VOL_DOWN, KEY_EVENT_DOWN);
- }
- else
- {
- SetKeyHandler(wgui_paging_multiline_inputbox_previous_page, KEY_UP_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(wgui_paging_multiline_inputbox_next_page, KEY_DOWN_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(wgui_paging_multiline_inputbox_previous_page, KEY_VOL_UP, KEY_EVENT_DOWN);
- SetKeyHandler(wgui_paging_multiline_inputbox_next_page, KEY_VOL_DOWN, KEY_EVENT_DOWN);
- }
- if (page_info_d->scroll_flag == WGUI_PAGING_AUTO_SCROLL_ON && page_info_d->scroll_speed != 0)
- {
- wgui_paging_start_text_scroll();
- }
- else
- {
- wgui_paging_stop_text_scroll();
- }
- } /* end of ShowCategory77Screen */
- /*****************************************************************************
- * FUNCTION
- * ExitCategory77Screen
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory77Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- reset_softkeys();
- reset_multitaps();
- reset_multiline_inputbox();
- leave_full_screen();
- MMI_multiline_inputbox.previous_shared_bytes = 0;
- MMI_disable_title_shortcut_display = 1;
- wgui_paging_stop_text_scroll();
- wgui_paging_reset_show_percentage_flag();
- #ifdef __MMI_TOUCH_SCREEN__
- MMI_content_height = MMI_content_height_prev;
- MMI_content_y = MMI_content_y_prev;
- mmi_pen_editor_close_input_box();
- #endif /* __MMI_TOUCH_SCREEN__ */
- MMI_multiline_inputbox.ext_flags &= ~GUI_MULTI_LINE_INPUT_BOX_VIEW_PAGING_MODE;
- } /* end of ExitCategory77Screen */
- #endif /* __UI_PAGING_IN_MULTILINE_EDITOR__ */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory76Screen
- * DESCRIPTION
- * Displays the category74 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
- * buffer [IN] Buffer the input box should use
- * buffer_size [IN] Size of the buffer
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory76Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U8 *buffer,
- S32 buffer_size,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 l;
- S16 input_type = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- MMI_menu_shortcut_number = -1;
- MMI_disable_title_shortcut_display = 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);
- l = gui_strlen((UI_string_type) buffer);
- create_multiline_inputbox_set_buffer((UI_string_type) buffer, buffer_size, l, 0);
- MMI_multiline_inputbox.flags |=
- (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_VIEW_MODE |
- UI_MULTI_LINE_INPUT_BOX_DRAW_SEPARATOR);
- register_multiline_inputbox_viewer_keys();
- set_multiline_inputbox_category_history(MMI_CATEGORY76_ID, history_buffer, &input_type);
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitCategory74Screen;
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY76_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- } /* end of ShowCategory76Screen */
- /*****************************************************************************
- * FUNCTION
- * GetCategory76History
- * DESCRIPTION
- * Gets the history buffer for category76 screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer into which the history data is stored (pre-allocated)
- * RETURNS
- * Pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory76History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- get_multiline_inputbox_category_history(MMI_CATEGORY74_ID, history_buffer, MMI_current_input_type);
- return (history_buffer);
- }
- /*****************************************************************************
- * FUNCTION
- * ChangeCategory78MessageString
- * DESCRIPTION
- *
- * PARAMETERS
- * new_string [?]
- * RETURNS
- * void
- *****************************************************************************/
- void ChangeCategory78MessageString(U8 *new_string)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_multiline_inputbox.text = (UI_buffer_type) new_string;
- MMI_multiline_inputbox.cursor_p = new_string;
- MMI_multiline_inputbox.flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- gui_show_multi_line_input_box(&MMI_multiline_inputbox);
- MMI_multiline_inputbox.flags &= ~UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory78Screen
- * DESCRIPTION
- * Displays the category78 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
- * icon_callback [IN]
- * buffer [IN] Buffer the input box should use.
- * buffer_size [IN] Size of the buffer.
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory78Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- multi_line_input_box_icon_hdlr icon_callback,
- U8 *buffer,
- S32 buffer_size,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 l;
- S16 input_type = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- MMI_menu_shortcut_number = -1;
- MMI_disable_title_shortcut_display = 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);
- l = gui_strlen((UI_string_type) buffer);
- create_multiline_inputbox_set_buffer((UI_string_type) buffer, buffer_size, l, 0);
- MMI_multiline_inputbox.flags |= (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW |
- UI_MULTI_LINE_INPUT_BOX_RICHTEXT | UI_MULTI_LINE_INPUT_BOX_VIEW_MODE);
- MMI_multiline_inputbox.icon_callback = icon_callback;
- register_multiline_inputbox_viewer_keys();
- set_multiline_inputbox_category_history(MMI_CATEGORY78_ID, history_buffer, &input_type);
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitCategory78Screen;
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY78_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory78Screen
- * DESCRIPTION
- * Exits the category78 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory78Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- reset_softkeys();
- reset_multitaps();
- reset_multiline_inputbox();
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory105Screen
- * DESCRIPTION
- * Displays the category105 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
- * volume_level [?]
- * history_buffer [IN] History buffer
- * volume_level_UI(?) [IN] Volume level
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory105Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- S32 *volume_level,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- #if defined(__MMI_WALLPAPER_ON_BOTTOM__)
- U16 btn_up_id, btn_down_id;
- #endif
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- dm_reset_context();
- UI_UNUSED_PARAMETER(history_buffer);
- gdi_layer_lock_frame_buffer();
- 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_menu_shortcut_number = -1;
- volume_level_UI = (*volume_level);
- if (volume_level_UI < 0)
- {
- volume_level_UI = 0;
- }
- if (volume_level_UI > 6)
- {
- volume_level_UI = 6;
- }
- dm_data.s32flags = 0;
- //KP Jerry disable for add softkey display volume-adjust screen on 2006-12-22 start
- /*
- if ((left_softkey == 0) && (left_softkey_icon == 0) && (right_softkey == 0) && (right_softkey_icon == 0))
- {
- dm_data.s32flags |= DM_NO_SOFTKEY;
- }
- else
- */
- //KP Jerry disable for add softkey display volume-adjust screen on 2006-12-22 end
- {
- dm_data.s32flags &= ~DM_NO_SOFTKEY;
- }
- /* PMT HIMANSHU START 20050729 */
- #if defined(__MMI_WALLPAPER_ON_BOTTOM__)
- dm_get_scr_bg_image(&idle_scr_bg_ID, &idle_scr_bg_filename, &idle_scr_bg_x, &idle_scr_bg_y, &idle_scr_bg_opacity);
- dm_set_scr_bg_image((MMI_ID_TYPE) (WGUI_VOLUME_LEVEL1 + volume_level_UI), NULL, -1, -1, current_MMI_theme->bg_opacity_full);
- dm_get_scr_bg_flag(&idle_scr_bg_flags);//082906 scr_bg
- dm_set_scr_bg_flag(idle_scr_bg_flags | DM_SCR_BG_FORCE_SHOW);
- #else /* defined(__MMI_WALLPAPER_ON_BOTTOM__) */
- switch (volume_level_UI)
- {
- case 0:
- dm_add_image(get_image(WGUI_VOLUME_LEVEL1), NULL, NULL);
- break;
- case 1:
- dm_add_image(get_image(WGUI_VOLUME_LEVEL2), NULL, NULL);
- break;
- case 2:
- dm_add_image(get_image(WGUI_VOLUME_LEVEL3), NULL, NULL);
- break;
- case 3:
- dm_add_image(get_image(WGUI_VOLUME_LEVEL4), NULL, NULL);
- break;
- case 4:
- dm_add_image(get_image(WGUI_VOLUME_LEVEL5), NULL, NULL);
- break;
- case 5:
- dm_add_image(get_image(WGUI_VOLUME_LEVEL6), NULL, NULL);
- break;
- case 6:
- dm_add_image(get_image(WGUI_VOLUME_LEVEL7), NULL, NULL);
- break;
- }
- #endif /* defined(__MMI_TOUCH_SCREEN__) && defined(__MMI_WALLPAPER_ON_BOTTOM__) */
- /* PMT HIMANSHU END 20050729 */
- SetKeyHandler(show_vertical_bar_previous, KEY_VOL_DOWN, KEY_EVENT_DOWN);
- SetKeyHandler(show_vertical_bar_next, KEY_VOL_UP, KEY_EVENT_DOWN);
- gdi_layer_unlock_frame_buffer();
- /* PMT HIMANSHU START 20050729 */
- #if defined(__MMI_WALLPAPER_ON_BOTTOM__)
- btn_up_id = dm_add_button(
- NULL,
- get_image(WGUI_VOLUME_UP_UP_IMAGE_ID),
- get_image(WGUI_VOLUME_UP_DOWN_IMAGE_ID),
- NULL);
- btn_down_id = dm_add_button(
- NULL,
- get_image(WGUI_VOLUME_DOWN_UP_IMAGE_ID),
- get_image(WGUI_VOLUME_DOWN_DOWN_IMAGE_ID),
- NULL);
- ExitCategoryFunction = ExitCategory105Screen;
- #else /* defined(__MMI_WALLPAPER_ON_BOTTOM__) */
- ExitCategoryFunction = UI_dummy_function;
- #endif /* defined(__MMI_WALLPAPER_ON_BOTTOM__) */
- /* PMT HIMANSHU END 20050729 */
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- /* PMT HIMANSHU START 20050729 */
- #if defined(__MMI_TOUCH_SCREEN__) && defined(__MMI_WALLPAPER_ON_BOTTOM__)
- dm_register_button_functions(btn_up_id, KEY_EVENT_UP, ResetCallbackTimer);
- dm_register_button_functions(btn_up_id, KEY_EVENT_DOWN, ShowVerticalBarUp);
- dm_register_button_functions(btn_up_id, KEY_REPEAT, CallShowVerticalBarMax);
- dm_register_button_functions(btn_down_id, KEY_EVENT_UP, ResetCallbackTimer);
- dm_register_button_functions(btn_down_id, KEY_EVENT_DOWN, ShowVerticalBarDown);
- dm_register_button_functions(btn_down_id, KEY_REPEAT, CallShowVerticalBarMin);
- #endif /* defined(__MMI_TOUCH_SCREEN__) && defined(__MMI_WALLPAPER_ON_BOTTOM__) */
- /* PMT HIMANSHU END 20050729 */
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY105_ID;
- dm_data.s32flags |= DM_CLEAR_SCREEN_BACKGROUND;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- }
- #if defined(__MMI_WALLPAPER_ON_BOTTOM__)
- /*****************************************************************************
- * FUNCTION
- * ExitCategory105Screen
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory105Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- dm_set_scr_bg_flag(idle_scr_bg_flags);//082906 scr_bg
- dm_set_scr_bg_image_no_draw(
- idle_scr_bg_ID,
- idle_scr_bg_filename,
- idle_scr_bg_x,
- idle_scr_bg_y,
- idle_scr_bg_opacity);
- }
- #endif /* defined(__MMI_WALLPAPER_ON_BOTTOM__) */
- /*****************************************************************************
- * FUNCTION
- * change_cat105_image
- * DESCRIPTION
- *
- * PARAMETERS
- * img [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void change_cat105_image(PU8 img)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- dm_change_image(img, NULL, 0);
- }
- /*****************************************************************************
- * Vertical_Bar Related Functions.
- *****************************************************************************/
- /*****************************************************************************
- * FUNCTION
- * show_vertical_bar
- * DESCRIPTION
- * Show volume vertical bar
- * PARAMETERS
- * volume_level [IN] Volume level
- * RETURNS
- * void
- *****************************************************************************/
- void show_vertical_bar(S32 volume_level)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- volume_level_UI = volume_level;
- if (volume_level_UI < 0)
- {
- volume_level_UI = 0;
- }
- if (volume_level_UI > 6)
- {
- volume_level_UI = 6;
- }
- /* PMT HIMANSHU START 20050729 */
- #if defined(__MMI_WALLPAPER_ON_BOTTOM__)
- dm_set_scr_bg_image((MMI_ID_TYPE) (WGUI_VOLUME_LEVEL1 + volume_level_UI), NULL, -1, -1, current_MMI_theme->bg_opacity_full);
- gdi_layer_blt_previous(0, 0, UI_device_width - 1, UI_device_height - 1);
- #else /* defined(__MMI_WALLPAPER_ON_BOTTOM__) */
- switch (volume_level_UI)
- {
- case 0:
- change_cat105_image(get_image(WGUI_VOLUME_LEVEL1));
- break;
- case 1:
- change_cat105_image(get_image(WGUI_VOLUME_LEVEL2));
- break;
- case 2:
- change_cat105_image(get_image(WGUI_VOLUME_LEVEL3));
- break;
- case 3: