wgui_categories_demo.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:348k
源码类别:
MTK
开发平台:
C/C++
- * void
- * RETURNS
- * size in U8s of the history buffer
- *****************************************************************************/
- S32 GetCategory70HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (sizeof(multiline_inputbox_category_history));
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory70History
- * DESCRIPTION
- * Gets the history buffer for category70 screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer into which the history data is stored (pre-allocated)
- * RETURNS
- * Pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory70History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- get_multiline_inputbox_category_history(MMI_CATEGORY70_ID, history_buffer, MMI_current_input_type);
- return (history_buffer);
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory71Screen
- * DESCRIPTION
- * Redraws the category71 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory71Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- clear_screen();
- show_title_status_icon();
- draw_title();
- gui_reset_clip();
- gui_reset_text_clip();
- show_multiline_inputbox();
- show_softkey_background();
- show_left_softkey();
- show_right_softkey();
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
- #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory71Screen
- * DESCRIPTION
- * Displays the category71 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
- * percentage_value [IN] Percentage value (0 to 100)
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory71Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U16 message,
- S32 percentage_value,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 l, fh, y;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ADD_SCREEN_STRINGS((4, title, left_softkey, right_softkey, message));
- ADD_SCREEN_IMAGES((3, title_icon, left_softkey_icon, right_softkey_icon));
- UI_UNUSED_PARAMETER(history_buffer);
- UI_UNUSED_PARAMETER(percentage_value);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- MMI_menu_shortcut_number = -1;
- clear_category_screen_key_handlers();
- clear_left_softkey();
- clear_right_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();
- MMI_title_string = (UI_string_type) get_string(title);
- MMI_title_icon = (PU8) get_image(title_icon);
- MMI_message_string = (UI_string_type) get_string(message);
- l = gui_strlen(MMI_message_string);
- create_multiline_inputbox_set_buffer(MMI_message_string, l, l, 0);
- move_multiline_inputbox(0, (MMI_title_y + MMI_title_height) + 2);
- resize_multiline_inputbox(MMI_multiline_inputbox.width, MMI_content_height);
- 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);
- 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);
- y = MMI_multiline_inputbox.y + MMI_multiline_inputbox.height +
- ((MMI_content_height - MMI_multiline_inputbox.height) >> 1);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = ExitCategory71Screen;
- RedrawCategoryFunction = RedrawCategory71Screen;
- GetCategoryHistory = GetCategory71History;
- GetCategoryHistorySize = GetCategory71HistorySize;
- RedrawCategory71Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory71Screen
- * DESCRIPTION
- * Exits the category71 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory71Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_hide_animations();
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory71HistorySize
- * DESCRIPTION
- * Gets the history buffer size for the category71 screen
- * PARAMETERS
- * void
- * RETURNS
- * size in U8s of the history buffer
- *****************************************************************************/
- S32 GetCategory71HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (0);
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory71History
- * DESCRIPTION
- * Gets the history buffer for the category71 screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer into which the history data is stored
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory71History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (history_buffer);
- }
- /*****************************************************************************
- * FUNCTION
- * Category75_radio_list_highlight_handler
- * DESCRIPTION
- * System Highlight handler
- *
- * Internal function
- * PARAMETERS
- * item_index [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void Category75_radio_list_highlight_handler(S32 item_index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_menu_shortcut_number = item_index + 1;
- MMI_highlighted_item_text = get_item_text(item_index);
- gui_lock_double_buffer();
- if (!menu_shortcut_handler_display)
- {
- gui_redraw_menu_shortcut();
- }
- MMI_list_highlight_handler(item_index);
- gui_unlock_double_buffer();
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory75Screen
- * DESCRIPTION
- * Redraws the Dynamic radio list screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory75Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_lock_double_buffer();
- clear_buttonbar();
- show_title_status_icon();
- draw_title();
- show_fixed_list();
- show_softkey_background();
- show_left_softkey();
- show_right_softkey();
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
- }
- /*****************************************************************************
- * FUNCTION
- * SetCategory75HighlightedItem
- * DESCRIPTION
- *
- * PARAMETERS
- * index [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void SetCategory75HighlightedItem(S32 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- radio_list_handle_item_select(index);
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory75Screen
- * 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 ShowCategory75Screen(
- 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 */
- /*----------------------------------------------------------------*/
- S32 i, shortcut_width;
- U8 h_flag;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ADD_SCREEN_STRINGS((3, title, left_softkey, right_softkey));
- ADD_SCREEN_IMAGES((3, title_icon, left_softkey_icon, right_softkey_icon));
- gui_lock_double_buffer();
- clear_category_screen_key_handlers();
- MMI_current_menu_type = LIST_MENU;
- register_fixed_list_shortcut_handler();
- register_fixed_list_keys();
- shortcut_width = set_menu_item_count(number_of_items) + 7;
- resize_menu_shortcut_handler(shortcut_width, MMI_title_height);
- move_menu_shortcut_handler(UI_device_width - MMI_menu_shortcut_box.width, MMI_title_y);
- register_hide_menu_shortcut(gui_redraw_menu_shortcut);
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- clear_left_softkey();
- clear_right_softkey();
- register_left_softkey_handler();
- register_right_softkey_handler();
- register_default_hide_softkeys();
- MMI_title_string = (UI_string_type) get_string(title);
- MMI_title_icon = (PU8) get_image(title_icon);
- resize_fixed_list(MMI_content_width, MMI_content_height + 2);
- create_fixed_twostate_menuitems(get_image(RADIO_ON_IMAGE_ID), get_image(RADIO_OFF_IMAGE_ID));
- /* set_fixed_twostate_positions(18,0,1,0); */
- associate_fixed_twostate_list();
- resize_fixed_twostate_menuitems(0, MMI_MENUITEM_HEIGHT); /* 091305 twostate Calvin added */
- set_fixed_twostate_positions(MMI_MENUITEM_HEIGHT, 0, 1, 0); /* 091305 twostate Calvin added */
- for (i = 0; i < number_of_items; i++)
- {
- add_fixed_twostate_item((UI_string_type) list_of_items[i]);
- }
- move_fixed_list(0, (MMI_title_y + MMI_title_height));
- resize_fixed_list(MMI_content_width, MMI_content_height);
- register_fixed_list_highlight_handler(Category75_radio_list_highlight_handler);
- h_flag = set_list_menu_category_history(MMI_CATEGORY11_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(highlighted_item);
- resize_fixed_twostate_menuitems_to_list_width();
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = ExitCategory75Screen;
- RedrawCategoryFunction = RedrawCategory75Screen;
- GetCategoryHistory = GetCategory75History;
- GetCategoryHistorySize = GetCategory75HistorySize;
- RedrawCategory75Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory75Screen
- * DESCRIPTION
- * Exits the Dynamic radio list screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory75Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ClearHighlightHandler();
- reset_softkeys();
- reset_menu_shortcut_handler();
- reset_fixed_list();
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory75HistorySize
- * DESCRIPTION
- * Gets the history buffer size for Dynamic radio list screen
- * PARAMETERS
- * void
- * RETURNS
- * size in U8s of the history buffer
- *****************************************************************************/
- S32 GetCategory75HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (sizeof(list_menu_category_history));
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory75History
- * DESCRIPTION
- * Gets the history buffer for Dynamic radio list screen
- * PARAMETERS
- * history_buffer [IN] Is a pointer to the buffer where the history data
- * is(?) [IN] To be stored (pre-allocated)
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory75History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- get_list_menu_category_history(MMI_CATEGORY11_ID, history_buffer);
- return (history_buffer);
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory85Screen
- * DESCRIPTION
- * Redraws the category85 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory85Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- clear_buttonbar();
- show_title_status_icon();
- draw_title();
- show_fixed_list();
- show_softkey_background();
- show_left_softkey();
- show_right_softkey();
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
- #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory85Screen
- * DESCRIPTION
- * Displays the category85 screen
- * 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_items1 [IN] Array of items for the first column
- * list_of_items2 [IN] Array of items for the second column
- * flags [IN] Currently unused
- * highlighted_item [IN] Default item to be highlighted (if there is no history)
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory85Screen(
- 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_items1,
- U8 **list_of_items2,
- S32 flags,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i, shortcut_width /* ,ixsize,iysize */ ;
- U8 h_flag;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ADD_SCREEN_STRINGS((3, title, left_softkey, right_softkey));
- ADD_SCREEN_IMAGES((3, title_icon, left_softkey_icon, right_softkey_icon));
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- MMI_menu_shortcut_number = -1;
- clear_category_screen_key_handlers();
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- clear_left_softkey();
- clear_right_softkey();
- register_left_softkey_handler();
- register_right_softkey_handler();
- register_default_hide_softkeys();
- create_fixed_icontext_list_menuitems(2, 0);
- GUI_current_fixed_icontext_list_menuitem_column = 1;
- MMI_current_menu_type = LIST_MENU;
- resize_fixed_list(MMI_content_width, MMI_content_height + 2);
- set_fixed_icontext_list_text_coordinates(0, 1, 0, 30, MMI_MENUITEM_HEIGHT);
- set_fixed_icontext_list_text_coordinates(
- 1,
- 30,
- 0,
- UI_device_width - 30 - 4 - MMI_fixed_list_menu.vbar.width,
- MMI_MENUITEM_HEIGHT);
- associate_fixed_icontext_list_list();
- 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_items1[i]);
- add_fixed_icontext_list_item_text(i, 1, (UI_string_type) list_of_items2[i]);
- }
- register_fixed_list_shortcut_handler();
- register_fixed_list_keys();
- shortcut_width = set_menu_item_count(number_of_items) + 7;
- resize_menu_shortcut_handler(shortcut_width, MMI_title_height);
- move_menu_shortcut_handler(UI_device_width - MMI_menu_shortcut_box.width, MMI_title_y);
- register_hide_menu_shortcut(gui_redraw_menu_shortcut);
- resize_fixed_icontext_menuitems(0, get_menu_item_height());
- set_fixed_icontext_positions(MMI_ICONTEXT_MENUITEM_HEIGHT + 2, 0, 1, 0);
- move_fixed_list(0, (MMI_title_y + MMI_title_height));
- resize_fixed_list(MMI_content_width, MMI_content_height);
- register_fixed_list_highlight_handler(standard_list_highlight_handler);
- MMI_current_menu_type = LIST_MENU;
- h_flag = set_list_menu_category_history(MMI_CATEGORY85_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);
- }
- MMI_title_string = (UI_string_type) get_string(title);
- MMI_title_icon = (PU8) get_image(title_icon);
- resize_fixed_icontext_list_menuitems_to_list_width();
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = ExitCategory85Screen;
- RedrawCategoryFunction = RedrawCategory85Screen;
- GetCategoryHistory = GetCategory85History;
- GetCategoryHistorySize = GetCategory85HistorySize;
- RedrawCategory85Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory85Screen
- * DESCRIPTION
- * Exits the category85 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory85Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- GUI_current_fixed_icontext_list_menuitem_column = 0;
- ClearHighlightHandler();
- reset_softkeys();
- reset_menu_shortcut_handler();
- reset_fixed_list();
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory85HistorySize
- * DESCRIPTION
- * Gets the history buffer size for the category85 screen
- * PARAMETERS
- * void
- * RETURNS
- * size in U8s of the history buffer
- *****************************************************************************/
- S32 GetCategory85HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (sizeof(list_menu_category_history));
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory85History
- * DESCRIPTION
- * Gets the history buffer for the category85 screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer into which the history data is stored (pre-allocated)
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory85History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- get_list_menu_category_history(MMI_CATEGORY85_ID, history_buffer);
- return (history_buffer);
- }
- /* code added vandana mehatni 30 june */
- /*****************************************************************************
- * FUNCTION
- * cat_103_hide_status_icons_bar0
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void cat_103_hide_status_icons_bar0(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- color cwhite = *current_MMI_theme->statusbar0_background_color;
- S32 x1, x2, y1, y2;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_push_clip();
- get_status_icon_bar_clip(0, &x1, &y1, &x2, &y2);
- gui_set_clip(x1, y1, x2, y2);
- gui_fill_rectangle(x1, y1, x2, y2, cwhite);
- gui_pop_clip();
- }
- /*****************************************************************************
- * FUNCTION
- * cat_103_hide_status_icons_bar1
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void cat_103_hide_status_icons_bar1(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_filled_area *f = current_MMI_theme->network_screen_background_filler;
- S32 x1, x2, y1, y2;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_push_clip();
- get_status_icon_bar_clip(1, &x1, &y1, &x2, &y2);
- gui_set_clip(x1, y1, x2, y2);
- gui_draw_filled_area(0, 0, UI_device_width - 1, UI_device_height - 1, f);
- gui_pop_clip();
- }
- /* code ended vandana mehtani */
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory103Screen
- * DESCRIPTION
- * Redraws the Network searching screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory103Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_lock_double_buffer();
- gui_hide_animations();
- clear_screen();
- gui_reset_clip();
- gui_reset_text_clip();
- wgui_show_transparent_animation();
- show_multiline_inputbox();
- show_softkey_background();
- show_left_softkey();
- show_right_softkey();
- show_status_icons();
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
- #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
- #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory103Screen
- * DESCRIPTION
- * Exits the Network searching screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory103Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_hide_animations();
- reset_softkeys();
- close_status_icons();
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory103HistorySize
- * DESCRIPTION
- * Gets the history buffer size for the Network Searching screen
- * PARAMETERS
- * void
- * RETURNS
- * size of history buffer in U8s
- *****************************************************************************/
- S32 GetCategory103HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (0);
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory103History
- * DESCRIPTION
- * Gets the history buffer for the Network Searching screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer to store the history data (pre-allocated)
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory103History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (history_buffer);
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory103Screen
- * DESCRIPTION
- * Displays the (Old) Network Searching screen (currently not used)
- * PARAMETERS
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the Left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * message [IN]
- * message_icon [IN]
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory103Screen(
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U16 message,
- U16 message_icon,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 l, fh, y;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ADD_SCREEN_STRINGS((3, left_softkey, right_softkey, message));
- ADD_SCREEN_IMAGES((3, left_softkey_icon, right_softkey_icon, message_icon));
- UI_UNUSED_PARAMETER(history_buffer);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- MMI_menu_shortcut_number = -1;
- clear_category_screen_key_handlers();
- clear_left_softkey();
- clear_right_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();
- MMI_message_string = (UI_string_type) get_string(message);
- l = gui_strlen(MMI_message_string);
- create_multiline_inputbox_set_buffer(MMI_message_string, l, l, 0);
- move_multiline_inputbox(0, (MMI_title_y + MMI_title_height) + 2);
- resize_multiline_inputbox(MMI_multiline_inputbox.width, MMI_content_height);
- 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);
- 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);
- y = MMI_multiline_inputbox.y + MMI_multiline_inputbox.height +
- ((MMI_content_height - MMI_multiline_inputbox.height) >> 1);
- wgui_set_animation((UI_device_width >> 1), y, message_icon);
- /* code added vandana mehtani */
- register_hide_status_icon_bar(0, cat_103_hide_status_icons_bar0);
- register_hide_status_icon_bar(1, cat_103_hide_status_icons_bar1);
- /* code ended vandana mehtani */
- /* register_hide_status_icon_bar(0,cat_103_hide_status_icons_bar0);
- register_hide_status_icon_bar(1,cat_103_hide_status_icons_bar1); */
- set_status_icon_bar_clip(0, 0, 0, UI_device_width - 1, MMI_status_bar_height - 1);
- show_status_icon_bar(0);
- show_status_icon_bar(1);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = ExitCategory103Screen;
- RedrawCategoryFunction = RedrawCategory103Screen;
- GetCategoryHistory = GetCategory103History;
- GetCategoryHistorySize = GetCategory103HistorySize;
- RedrawCategory103Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory104Screen
- * DESCRIPTION
- * Redraws the category104 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory104Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- color c = gui_color(0, 0, 0);
- UI_string_type TSS_string = get_string(WGUI_CATEGORY_TSS_STRING_ID);
- UI_string_type TMM_string = get_string(WGUI_CATEGORY_TMM_STRING_ID);
- S32 w;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- clear_screen();
- show_title_status_icon();
- draw_title();
- gui_show_transparent_image(
- (UI_device_width >> 2) + 20,
- (MMI_title_y + MMI_title_height) + 12,
- get_image(WGUI_CATEGORY_CLOCK),
- 0);
- show_softkey_background();
- show_left_softkey();
- show_right_softkey();
- /* Needs to be enhanced */
- gui_reset_text_clip();
- gui_set_text_color(c);
- gui_set_font(wgui_time_input_minutes.text_font);
- w = (wgui_time_input_minutes.width >> 1) - (gui_get_string_width(TMM_string) >> 1);
- gui_move_text_cursor(wgui_time_input_minutes.x + w, wgui_time_input_minutes.y - 14);
- gui_print_text(TMM_string);
- w = (wgui_time_input_seconds.width >> 1) - (gui_get_string_width(TSS_string) >> 1);
- gui_move_text_cursor(wgui_time_input_seconds.x + w, wgui_time_input_seconds.y - 14);
- gui_print_text(TSS_string);
- wgui_enable_seconds_input();
- wgui_show_date_time_input();
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
- #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory104Screen
- * DESCRIPTION
- * Displays the category104 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
- * minutes_buffer [IN] Buffer to input hours
- * seconds_buffer [IN] Buffer to input minutes
- * history_buffer [IN] History buffer
- * MMI_ID_TYPE(?) [IN] Message Message string
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory104Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U8 *minutes_buffer,
- U8 *seconds_buffer,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 s1, s2, sg, x, y;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* U16 message_icon; */
- ADD_SCREEN_STRINGS((3, title, left_softkey, right_softkey));
- ADD_SCREEN_IMAGES((3, title_icon, left_softkey_icon, right_softkey_icon));
- UI_UNUSED_PARAMETER(history_buffer);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- MMI_menu_shortcut_number = -1;
- clear_category_screen_key_handlers();
- clear_left_softkey();
- clear_right_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();
- MMI_title_string = (UI_string_type) get_string(title);
- MMI_title_icon = (PU8) get_image(title_icon);
- y = (MMI_title_y + MMI_title_height) + 50;
- wgui_initialize_time_input(NULL, 0, minutes_buffer, 2, seconds_buffer, 2);
- y = y + 10;
- s1 = 24;
- s2 = 24;
- sg = 4;
- wgui_resize_minutes_input(s1, 18);
- wgui_resize_seconds_input(s2, 18);
- x = (UI_device_width >> 1) - ((s1 + s2 + sg) >> 1);
- wgui_move_minutes_input(x, y);
- x += s1 + sg;
- wgui_move_seconds_input(x, y);
- wgui_set_minutes_input_navigation(WGUI_DATE_TIME_INPUT_FOCUS_NONE, WGUI_DATE_TIME_INPUT_FOCUS_SECONDS);
- wgui_set_seconds_input_navigation(WGUI_DATE_TIME_INPUT_FOCUS_MINUTES, WGUI_DATE_TIME_INPUT_FOCUS_NONE);
- wgui_date_time_input_set_focus(WGUI_DATE_TIME_INPUT_FOCUS_MINUTES);
- wgui_date_time_input_register_keys();
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = ExitCategory104Screen;
- RedrawCategoryFunction = RedrawCategory104Screen;
- GetCategoryHistory = GetCategory104History;
- GetCategoryHistorySize = GetCategory104HistorySize;
- RedrawCategory104Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory104Screen
- * DESCRIPTION
- * Exits the category104 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory104Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_reset_time_input();
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory104HistorySize
- * DESCRIPTION
- * Gets the history buffer size for the category 104 screen
- * PARAMETERS
- * void
- * RETURNS
- * size of history buffer in U8s
- *****************************************************************************/
- S32 GetCategory104HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (0);
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory104History
- * DESCRIPTION
- * Gets the history buffer for the category 104 screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer to store the history data (pre-allocated)
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory104History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (history_buffer);
- }
- /* category 107 sat screeen */
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory107Screen
- * DESCRIPTION
- * Redraws the category107 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory107Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_lock_double_buffer();
- gui_reset_clip();
- show_softkey_background();
- show_left_softkey();
- show_right_softkey();
- show_multiline_inputbox();
- show_fixed_list();
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory107Screen
- * DESCRIPTION
- *
- * PARAMETERS
- * left_softkey [IN]
- * left_softkey_icon [IN]
- * right_softkey [IN]
- * right_softkey_icon [IN]
- * message [?]
- * radio_option1 [?]
- * radio_option2 [?]
- * highlighted_item [IN]
- * history_buffer [?]
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory107Screen(
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U8 *message,
- U8 *radio_option1,
- U8 *radio_option2,
- U16 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 l, fh;
- U8 h_flag;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(history_buffer);
- gui_lock_double_buffer();
- clear_category_screen_key_handlers();
- MMI_disable_title_shortcut_display = 1;
- MMI_current_menu_type = LIST_MENU;
- register_fixed_list_keys();
- clear_left_softkey();
- clear_right_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();
- l = gui_strlen((UI_string_type) message);
- create_multiline_inputbox_set_buffer((UI_string_type) message, l, l, 0);
- move_multiline_inputbox(0, 0);
- resize_multiline_inputbox(MMI_content_width, ((MMI_content_height >> 2) + MMI_title_height + 30));
- MMI_multiline_inputbox.flags |=
- (UI_MULTI_LINE_INPUT_BOX_CENTER_JUSTIFY | UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW);
- show_multiline_inputbox_no_draw();
- if (MMI_multiline_inputbox.n_lines > 2)
- {
- resize_multiline_inputbox(MMI_multiline_inputbox.width, MMI_title_height << 1);
- MMI_multiline_inputbox.n_lines = 2;
- }
- else
- {
- 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);
- }
- 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);
- create_fixed_twostate_menuitems(get_image(RADIO_ON_IMAGE_ID), get_image(RADIO_OFF_IMAGE_ID));
- /* set_fixed_twostate_positions(18,0,1,0); */
- associate_fixed_twostate_list();
- resize_fixed_twostate_menuitems(0, MMI_MENUITEM_HEIGHT); /* 091305 twostate Calvin added */
- set_fixed_twostate_positions(MMI_MENUITEM_HEIGHT, 0, 1, 0); /* 091305 twostate Calvin added */
- add_fixed_twostate_item((UI_string_type) GetString(WGUI_CATEGORY_ABC_STRING_ID));
- add_fixed_twostate_item((UI_string_type) GetString(WGUI_CATEGORY_ABC_STRING_ID));
- move_fixed_list(0, ((MMI_multiline_inputbox.n_lines * fh) + 4 + MMI_multiline_inputbox.text_y));
- resize_fixed_list(
- MMI_content_width,
- (MMI_content_width - (MMI_multiline_inputbox.n_lines * fh) + 4 + MMI_multiline_inputbox.text_y));
- register_fixed_list_highlight_handler(inputbox_radio_list_highlight_handler);
- h_flag = set_list_menu_category_history(MMI_CATEGORY11_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);
- SetKeyHandler(multiline_inputbox_previous_line, KEY_UP_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(multiline_inputbox_next_line, KEY_DOWN_ARROW, KEY_EVENT_DOWN);
- gui_unlock_double_buffer();
- ExitCategoryFunction = ExitCategory107Screen;
- RedrawCategoryFunction = RedrawCategory107Screen;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- RedrawCategory107Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory107Screen
- * DESCRIPTION
- * Exits the category107 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory107Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if(UI_BLINKING_CURSOR_SUPPORT)
- StopMyTimer(BLINKING_CURSOR);
- #endif
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- multi_line_input_box cat108_message_box;
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory108Screen
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory108Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_lock_double_buffer();
- clear_screen();
- gui_set_clip(0, 0, 24, (MMI_title_y + MMI_title_height) << 1);
- wgui_show_animation();
- wgui_show_inputbox();
- gui_show_multi_line_input_box(&cat108_message_box);
- show_softkey_background();
- show_left_softkey();
- show_right_softkey();
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
- }
- /*****************************************************************************
- * FUNCTION
- * category108_message_box_previous_line
- * DESCRIPTION
- * move to previous line of message box of category 108
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void category108_message_box_previous_line(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_multi_line_input_box_previous_line(&cat108_message_box);
- gui_show_multi_line_input_box(&cat108_message_box);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_BLT_double_buffer(
- cat108_message_box.x,
- cat108_message_box.y,
- cat108_message_box.x + cat108_message_box.width - 1,
- cat108_message_box.y + cat108_message_box.height - 1);
- #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */
- }
- /*****************************************************************************
- * FUNCTION
- * category108_message_box_next_line
- * DESCRIPTION
- * move to next line of message box of category 108
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void category108_message_box_next_line(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_multi_line_input_box_next_line(&cat108_message_box);
- gui_show_multi_line_input_box(&cat108_message_box);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_BLT_double_buffer(
- cat108_message_box.x,
- cat108_message_box.y,
- cat108_message_box.x + cat108_message_box.width - 1,
- cat108_message_box.y + cat108_message_box.height - 1);
- #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */
- }
- /*****************************************************************************
- * FUNCTION
- * category108_keyboard_key_handler
- * DESCRIPTION
- * key board handlers of category 108
- * PARAMETERS
- * vkey_code [IN]
- * key_state [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void category108_keyboard_key_handler(S32 vkey_code, S32 key_state)
- {
- #if(MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32)
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (key_state)
- {
- switch (vkey_code)
- {
- case 37:
- multiline_inputbox_previous_line();
- break;
- case 39:
- multiline_inputbox_next_line();
- break;
- case 38:
- category108_message_box_previous_line();
- break;
- case 40:
- category108_message_box_next_line();
- break;
- }
- }
- #else /* (MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32) */
- UI_UNUSED_PARAMETER(vkey_code);
- UI_UNUSED_PARAMETER(key_state);
- #endif /* (MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32) */
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory108Screen
- * DESCRIPTION
- * Displays the scrollable notification screen for SAT
- * PARAMETERS
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * message1 [IN] Notification message 1
- * message2 [IN] Notification message 2
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory108Screen(
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U8 *message1,
- U8 *message2,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 l, h, fh;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(history_buffer);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- MMI_menu_shortcut_number = -1;
- clear_category_screen_key_handlers();
- set_left_softkey_label(get_string(left_softkey));
- set_left_softkey_icon(get_image(left_softkey_icon));
- set_right_softkey_label(get_string(right_softkey));
- set_right_softkey_icon(get_image(right_softkey_icon));
- clear_left_softkey();
- clear_right_softkey();
- register_left_softkey_handler();
- register_right_softkey_handler();
- register_default_hide_softkeys();
- l = gui_strlen((UI_string_type) message1);
- gui_set_font(current_UI_theme->multi_line_input_box_theme->text_font);
- h = gui_get_character_height();
- gui_create_multi_line_input_box_set_buffer(
- &cat108_message_box,
- 0,
- 0,
- UI_device_width + 1,
- h + 1,
- (UI_string_type) message1,
- (l + 1) * ENCODING_LENGTH,
- l * ENCODING_LENGTH,
- 0);
- cat108_message_box.flags |=
- (UI_MULTI_LINE_INPUT_BOX_CENTER_JUSTIFY | UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW |
- UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_VIEW_MODE);
- gui_show_multi_line_input_box(&cat108_message_box);
- cat108_message_box.flags &= ~UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- gui_set_font(current_UI_theme->multi_line_input_box_theme->text_font);
- fh = get_multiline_inputbox_line_height();
- h = fh * 2 + MULTILINE_INPUTBOX_HEIGHT_PAD;
- gui_resize_multi_line_input_box(&cat108_message_box, cat108_message_box.width, h);
- l = gui_strlen((UI_string_type) message2);
- create_multiline_inputbox_set_buffer((UI_string_type) message2, l, l, 0);
- move_multiline_inputbox(0, h);
- resize_multiline_inputbox(UI_device_width, UI_device_height - MMI_button_bar_height - h + 1);
- MMI_multiline_inputbox.flags |=
- (UI_MULTI_LINE_INPUT_BOX_CENTER_JUSTIFY | UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW |
- UI_MULTI_LINE_INPUT_BOX_VIEW_MODE);
- show_multiline_inputbox_no_draw();
- register_keyboard_key_handler(category108_keyboard_key_handler);
- SetKeyHandler(category108_message_box_previous_line, KEY_UP_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(category108_message_box_next_line, KEY_DOWN_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(multiline_inputbox_previous_line, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(multiline_inputbox_next_line, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = ExitCategory108Screen;
- RedrawCategoryFunction = RedrawCategory108Screen;
- GetCategoryHistory = GetCategory108History;
- GetCategoryHistorySize = GetCategory108HistorySize;
- RedrawCategory108Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory108Screen
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory108Screen(void)
- {
- #if(UI_BLINKING_CURSOR_SUPPORT)
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- //gui_cancel_timer(UI_inputbox_blink_cursor);
- //MTK Elvis
- StopMyTimer(BLINKING_CURSOR);
- /* MTK end */
- #endif /* (UI_BLINKING_CURSOR_SUPPORT) */
- reset_softkeys();
- reset_multitaps();
- reset_multiline_inputbox();
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory108HistorySize
- * DESCRIPTION
- * Gets the history buffer size for the category 106 screen
- * PARAMETERS
- * void
- * RETURNS
- * size of history buffer in U8s
- *****************************************************************************/
- S32 GetCategory108HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (0);
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory108History
- * DESCRIPTION
- * Gets the history buffer for the category 107 screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer to store the history data (pre-allocated)
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory108History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (history_buffer);
- }
- /** Slide 70 **/
- /*****************************************************************************
- * FUNCTION
- * ExitCategory127Screen
- * DESCRIPTION
- * Exits the SMS inbox category screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory127Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- close_status_icons();
- reset_softkeys();
- reset_multiline_inputbox();
- gui_hide_animations();
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory127HistorySize
- * DESCRIPTION
- * Gets the history buffer size for the category127 screen
- * PARAMETERS
- * void
- * RETURNS
- * size in U8s of the history buffer
- *****************************************************************************/
- S32 GetCategory127HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (0);
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory127History
- * DESCRIPTION
- * Gets the history buffer for the category66 screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer into which the history data is stored
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory127History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (history_buffer);
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory127Screen
- * DESCRIPTION
- * Redraws the category127 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory127Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* S32 x1= 0,x2=0; */
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- gui_hide_animations();
- clear_screen();
- gui_reset_clip();
- gui_reset_text_clip();
- show_status_icons();
- gui_draw_filled_area(
- (_MMI_animated_icon_x - 2),
- (_MMI_animated_icon_y - 1),
- (_MMI_animated_icon_x + img_width),
- (_MMI_animated_icon_y + img_height),
- &borderwgui_pop_up_dialog_background);
- /* PMT HIMANSHU START 20050823 */
- #ifdef __MMI_MAINLCD_128X128__
- gui_set_clip(
- (0),
- (MMI_multiline_inputbox.height + (MMI_title_y + MMI_title_height) + 2),
- (UI_device_width - 1),
- (UI_device_height - MMI_button_bar_height - 2));
- #else /* __MMI_MAINLCD_128X128__ */
- gui_set_clip(
- (0),
- (MMI_multiline_inputbox.height + (MMI_title_y + MMI_title_height) + 2),
- (UI_device_width - 1),
- (UI_device_height - MMI_button_bar_height - 1));
- #endif /* __MMI_MAINLCD_128X128__ */
- /* PMT HIMANSHU END 20050823 */
- wgui_show_transparent_animation();
- show_multiline_inputbox();
- show_softkey_background();
- show_left_softkey();
- show_right_softkey();
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
- #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory127Screen
- * DESCRIPTION
- * Displays the category66 screen
- * PARAMETERS
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the right softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN]
- * message [IN] String to display
- * message_icon [IN] Icon to display
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory127Screen(
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U8 *message,
- U16 message_icon,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 l, fh, y;
- PU8 img_dis = get_image(message_icon);
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ADD_SCREEN_STRINGS((3, left_softkey, right_softkey, message));
- ADD_SCREEN_IMAGES((3, left_softkey_icon, right_softkey_icon, message_icon));
- UI_UNUSED_PARAMETER(history_buffer);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- MMI_menu_shortcut_number = -1;
- clear_category_screen_key_handlers();
- clear_left_softkey();
- clear_right_softkey();
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- register_right_softkey_handler();
- register_left_softkey_handler();
- register_default_hide_softkeys();
- ShowStatusIconsTitle();
- MMI_message_string = (UI_string_type) message;
- l = gui_strlen(MMI_message_string);
- create_multiline_inputbox_set_buffer(MMI_message_string, l, l, 0);
- move_multiline_inputbox(0, (MMI_title_y + MMI_title_height) + 2);
- resize_multiline_inputbox(MMI_multiline_inputbox.width, MMI_content_height);
- 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);
- 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);
- /* PMT HIMANSHU START 20050823 */
- #ifdef __MMI_MAINLCD_128X128__
- y = MMI_multiline_inputbox.y + MMI_multiline_inputbox.height +
- ((MMI_content_height - MMI_multiline_inputbox.height) >> 1);
- #endif /* __MMI_MAINLCD_128X128__ */
- /* PMT HIMANSHU END 20050823 */
- gui_measure_image(img_dis, &img_width, &img_height);
- /* PMT HIMANSHU START 20050823 */
- #ifndef __MMI_MAINLCD_128X128__
- /* for UI_device_height > 128, image should be aligned at bottom */
- if (img_height <
- (UI_device_height - (MMI_multiline_inputbox.y + MMI_multiline_inputbox.height + 1) - MMI_button_bar_height - 1))
- {
- y = UI_device_width - MMI_button_bar_height - img_height;
- }
- else
- {
- y = MMI_multiline_inputbox.y + MMI_multiline_inputbox.height + 1;
- }
- #endif /* __MMI_MAINLCD_128X128__ */
- /* PMT HIMANSHU END 20050823 */
- wgui_set_animation((UI_device_width >> 1), y, message_icon);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = ExitCategory127Screen;
- RedrawCategoryFunction = RedrawCategory127Screen;
- GetCategoryHistory = GetCategory127History;
- GetCategoryHistorySize = GetCategory127HistorySize;
- RedrawCategory127Screen();
- }
- /* CODE ENDED VANDANA MEHTANI */
- /*****************************************************************************
- * FUNCTION
- * em_idle_screen_hide_status_icons_bar0
- * DESCRIPTION
- * hide horizontal status bar of idle screen if engineering mode is defined
- * PARAMETERS
- * void
- * RETURNS
- * noen(?)
- *****************************************************************************/
- void em_idle_screen_hide_status_icons_bar0(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 x1, y1, x2, y2;
- color c = gui_color(255, 255, 255);
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_push_clip();
- get_status_icon_bar_clip(0, &x1, &y1, &x2, &y2);
- gui_set_clip(x1, y1, x2, y2);
- gui_fill_rectangle(x1, y1, x2, y2, c);
- gui_pop_clip();
- }
- /*****************************************************************************
- * FUNCTION
- * em_idle_screen_hide_status_icons_bar1
- * DESCRIPTION
- * hide vertical status bar of idle screen if engineering mode is defined
- * PARAMETERS
- * void
- * RETURNS
- * noen(?)
- *****************************************************************************/
- void em_idle_screen_hide_status_icons_bar1(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 x1, y1, x2, y2;
- color c = gui_color(255, 255, 255);
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_push_clip();
- get_status_icon_bar_clip(1, &x1, &y1, &x2, &y2);
- gui_set_clip(x1, y1, x2, y2);
- gui_fill_rectangle(x1, y1, x2, y2, c);
- gui_pop_clip();
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory203Screen
- * DESCRIPTION
- * Redraws the single Active call screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory203Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_lock_double_buffer();
- clear_screen();
- show_title_status_icon();
- draw_title();
- show_singleline_inputbox();
- redraw_left_softkey();
- redraw_right_softkey();
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory203Screen
- * DESCRIPTION
- * Displays the single active call screen
- * PARAMETERS
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * NotificationStringId [IN]
- * text [?]
- * imageId [IN]
- * history_buffer [IN] History buffer
- * STRING(?) [IN] Call Id, Name Or Number identifying the call
- * MYTIME(?) [IN] Call duration timer, Call duration timer
- * MMI_ID_TYPE(?) [IN] Image indicating call state
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory203Screen(
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U16 NotificationStringId,
- U8 *text,
- U16 imageId,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(history_buffer);
- gui_lock_double_buffer();
- clear_key_handlers();
- clear_left_softkey();
- clear_right_softkey();
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- MMI_title_string = (UI_string_type) get_string(NotificationStringId);
- register_left_softkey_handler();
- register_right_softkey_handler();
- create_singleline_inputbox_set_buffer(
- (UI_string_type) text,
- gui_strlen((UI_string_type) text) + 1,
- gui_strlen((UI_string_type) text),
- gui_strlen((UI_string_type) text));
- resize_singleline_inputbox(MMI_singleline_inputbox_width, MMI_singleline_inputbox_height);
- move_singleline_inputbox(MMI_singleline_inputbox_x, MMI_singleline_inputbox_y);
- set_singleline_inputbox_mask(0);
- MMI_singleline_inputbox.flags |=
- (UI_SINGLE_LINE_INPUT_BOX_DISABLE_BACKGROUND | UI_SINGLE_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW |
- UI_SINGLE_LINE_INPUT_BOX_CENTER_JUSTIFY);
- gui_unlock_double_buffer();
- RedrawCategoryFunction = RedrawCategory203Screen;
- ExitCategoryFunction = ExitCategory203Screen;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- RedrawCategory203Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory203Screen
- * DESCRIPTION
- * Exits the single Active_call screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory203Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_lock_double_buffer();
- gui_hide_animations();
- reset_softkeys();
- reset_singleline_inputbox();
- gui_unlock_double_buffer();
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /* variable of type fixed_text_menuitem used in category 126 */
- fixed_text_menuitem Cat126MMI_inline_select_item_common_data;
- /* variable of type fixed_text_menuitem_type used in category 126 */
- fixed_text_menuitem_type Cat126MMI_inline_select_items[32];
- /* variable of type void* used in category 126 */
- void *Cat126MMI_inline_select_items_p[32];
- S32 *Cat126inline_select_menu_n_items;
- /* variable of type horizontal_select used in category 126 */
- horizontal_select Cat126MMI_inline_select_menu;
- /* theme of horizontal bar */
- extern UI_horizontal_select_theme temp_inline_select_menu_theme;
- /* colr theme of categpry126 */
- UI_fixed_text_menuitem_theme Cat126fixedtheme = { (UI_filled_area *)&MMI_list_menu_normal_item_filler,
- (UI_filled_area *)&MMI_list_menu_disabled_item_filler,
- (UI_filled_area *)&MMI_list_menu_selected_item_filler,
- (UI_filled_area *)&MMI_list_menu_selected_item_filler,
- {0, 0, 0, 100},
- {0, 0, 0, 100},
- {0, 0, 0, 100},
- {0, 0, 0, 100},
- &UI_DEFAULT_FONT,
- UI_MENUITEM_LEFT_JUSTIFY
- };
- /*****************************************************************************
- * FUNCTION
- * ExitCategory126Screen
- * DESCRIPTION
- * Exits the category126 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory126Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ClearHighlightHandler();
- reset_softkeys();
- reset_menu_shortcut_handler();
- reset_fixed_list();
- ClearKeyHandler(KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- ClearKeyHandler(KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory126HistorySize
- * DESCRIPTION
- * Gets the size of the history buffer for the SMS inbox screen
- * PARAMETERS
- * void
- * RETURNS
- * size of history buffer in U8s
- *****************************************************************************/
- S32 GetCategory126HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (0);
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory126History
- * DESCRIPTION
- * Gets the history buffer of category 126
- * PARAMETERS
- * history_buffer [IN] Is the buffer into which the history data is stored (pre-allocated)
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory126History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (history_buffer);
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory126Screen
- * DESCRIPTION
- * Redraws the category126 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory126Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- color c;
- stFontAttribute *f = (UI_font_type) (current_MMI_theme->title_text_font);
- S32 fh = 0, l = 0;
- S32 item_val = 0;
- S32 x1 = 0, x2 = 0;
- UI_string_type *temp_str = NULL, *first_str = NULL, *last_str = NULL;
- U8 str[50];
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_lock_double_buffer();
- clear_screen();
- clear_buttonbar();
- gui_reset_clip();
- gui_reset_text_clip();
- memset(str, 0, 100);
- fh = gui_get_character_height();
- show_title_status_icon();
- draw_title();
- gui_draw_filled_area(
- ((UI_device_width >> 1) - 50),
- ((MMI_title_y + MMI_title_height) + 20),
- ((UI_device_width >> 1) + 50),
- ((MMI_title_y + MMI_title_height) + 40),
- &yellowwgui_pop_up_dialog_background);
- first_str = (UI_string_type*) Cat126MMI_inline_select_items[0].text;
- last_str = (UI_string_type*) Cat126MMI_inline_select_items[(Cat126MMI_inline_select_menu.n_items - 1)].text;
- l = gui_get_string_width((UI_string_type) last_str);
- temp_str = (UI_string_type*) Cat126MMI_inline_select_items[Cat126MMI_inline_select_menu.highlighted_item].text;
- UnicodeToAnsii((PS8) str, (PS8) temp_str);
- item_val = atoi((PS8) str);
- x2 = (((UI_device_width >> 1) - 50) + ((Cat126MMI_inline_select_menu.highlighted_item + 1) * no_of_pixel));
- x1 = ((UI_device_width >> 1) - 50);
- gui_draw_filled_area(
- x1,
- ((MMI_title_y + MMI_title_height) + 20),
- x2,
- ((MMI_title_y + MMI_title_height) + 40),
- &orangewgui_pop_up_dialog_background);
- gui_move_text_cursor(((UI_device_width >> 1) - 50), ((MMI_title_y + MMI_title_height) + 2));
- c = gui_color(0, 0, 0);
- gui_set_font(f);
- gui_set_text_color(c);
- gui_print_text((UI_string_type) first_str);
- gui_move_text_cursor(((UI_device_width >> 1) + 50 - l), ((MMI_title_y + MMI_title_height) + 2));
- gui_print_text((UI_string_type) last_str);
- gui_show_horizontal_select(&Cat126MMI_inline_select_menu);
- show_softkey_background();
- show_left_softkey();
- show_right_softkey();
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
- }
- /*****************************************************************************
- * FUNCTION
- * cat126keylefthandler
- * DESCRIPTION
- * function hamndle left arrow key of category 126
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void cat126keylefthandler(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_horizontal_select_goto_previous_item(&Cat126MMI_inline_select_menu);
- RedrawCategory126Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * cat126keyrighthandler
- * DESCRIPTION
- * function hamndle right arrow key of category 126
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void cat126keyrighthandler(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_horizontal_select_goto_next_item(&Cat126MMI_inline_select_menu);
- RedrawCategory126Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory126Screen
- * DESCRIPTION
- * Redraws the SMS inbox category 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
- * list_of_items [IN]
- * no_of_items [IN]
- * highlighted_item [IN] Default item to be highlighted (if there is no history)
- * history_buffer [IN] History buffer
- * STRING(?) [IN] * list_of_items2, (Array of strings and not string IDs)
- * S8(?) [IN] *top_msg Top message
- * text(?) [IN] Columns) Note: This is an array of
- * INT(?) [IN] Number_of_items, Number of items
- * MMI_ID_TYPE(?) [IN] * list_of_icons1, icon list
- * strings(?) [IN] And not string IDs.
- * col_no(?) [IN] Col to color - 1 or 2
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory126Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U8 **list_of_items,
- S32 no_of_items,
- U16 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i, fh = 0;
- S32 bar_width = 100;
- S32 fixed_width = 60;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ADD_SCREEN_STRINGS((3, title, left_softkey, right_softkey));
- ADD_SCREEN_IMAGES((3, title_icon, left_softkey_icon, right_softkey_icon));
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- MMI_menu_shortcut_number = -1;
- no_of_pixel = (bar_width / no_of_items);
- clear_category_screen_key_handlers();
- SetKeyHandler(cat126keylefthandler, KEY_LEFT_ARROW, KEY_EVENT_UP);
- SetKeyHandler(cat126keyrighthandler, KEY_RIGHT_ARROW, KEY_EVENT_UP);
- fh = gui_get_character_height();
- gui_set_fixed_text_menuitem_theme(&Cat126MMI_inline_select_item_common_data, &Cat126fixedtheme);
- gui_create_fixed_text_menuitem(&Cat126MMI_inline_select_item_common_data, fixed_width, (fh + 5));
- gui_fixed_text_menuitem_set_text_position(
- &Cat126MMI_inline_select_item_common_data,
- ((UI_device_width >> 1) - 55),
- ((MMI_title_y + MMI_title_height) + 50));
- Cat126MMI_inline_select_item_common_data.flags |=
- (UI_MENUITEM_CENTER_TEXT_Y | UI_MENUITEM_DISABLE_BACKGROUND_ALWAYS | UI_MENUITEM_DISABLE_BACKGROUND |
- UI_MENUITEM_DISABLE_BACKGROUND_ALWAYS);
- for (i = 0; i < no_of_items; i++)
- {
- Cat126MMI_inline_select_items[i].flags = 0;
- Cat126MMI_inline_select_items[i].text = (UI_string_type) list_of_items[i];
- Cat126MMI_inline_select_items_p[i] = (void*)&Cat126MMI_inline_select_items[i];
- }
- current_horizontal_select_theme = &temp_inline_select_menu_theme;
- gui_create_horizontal_select(
- &Cat126MMI_inline_select_menu,
- ((UI_device_width >> 1) - 28),
- ((MMI_title_y + MMI_title_height) + 50),
- fixed_width,
- (fh + 5));
- gui_set_horizontal_select_common_item_data(
- &Cat126MMI_inline_select_menu,
- (void*)&Cat126MMI_inline_select_item_common_data);
- gui_set_horizontal_select_item_functions(
- &Cat126MMI_inline_select_menu,
- gui_show_fixed_text_menuitem,
- gui_measure_fixed_text_menuitem,
- gui_highlight_fixed_text_menuitem,
- gui_remove_highlight_fixed_text_menuitem,
- UI_fixed_menuitem_dummy_hide_function);
- gui_set_horizontal_select_images(&Cat126MMI_inline_select_menu, inline_select_left_arrow_image, inline_select_left_arrow_image); /* Cat126inline_select_left_arrow_image,Cat126inline_select_right_arrow_image); */
- gui_resize_fixed_text_menuitem(&Cat126MMI_inline_select_item_common_data, fixed_width, (fh + 5));
- Cat126MMI_inline_select_menu.n_items = no_of_items;
- Cat126MMI_inline_select_menu.highlighted_item = highlighted_item;
- Cat126MMI_inline_select_menu.items = (void **)Cat126MMI_inline_select_items_p;
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- clear_left_softkey();
- clear_right_softkey();
- register_left_softkey_handler();
- register_right_softkey_handler();
- register_default_hide_softkeys();
- MMI_title_string = (UI_string_type) get_string(title);
- MMI_title_icon = (PU8) get_image(title_icon);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = ExitCategory126Screen;
- RedrawCategoryFunction = RedrawCategory126Screen;
- GetCategoryHistory = GetCategory126History;
- GetCategoryHistorySize = GetCategory126HistorySize;
- RedrawCategory126Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory130Screen
- * DESCRIPTION
- * Redraws the Numbered Items screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory130Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- clear_buttonbar();
- show_title_status_icon();
- draw_title();
- show_fixed_list();
- show_softkey_background();
- show_left_softkey();
- show_right_softkey();
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
- #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory130Screen
- * DESCRIPTION
- * Displays the Numbered Items screen
- * 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
- * flags [IN] Currently unused
- * highlighted_item [IN] Default item to be highlighted (if there is no history)
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory130Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- S32 number_of_items,
- U16 *list_of_items,
- S32 flags,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i, shortcut_width;
- U8 h_flag;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ADD_SCREEN_STRINGS((3, title, left_softkey, right_softkey));
- ADD_SCREEN_IMAGES((3, title_icon, left_softkey_icon, right_softkey_icon));
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- MMI_menu_shortcut_number = -1;
- clear_category_screen_key_handlers();
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- clear_left_softkey();
- clear_right_softkey();
- register_left_softkey_handler();
- register_right_softkey_handler();
- register_default_hide_softkeys();
- create_fixed_icontext_list_menuitems(2, 0);
- GUI_current_fixed_icontext_list_menuitem_column = 1;
- MMI_current_menu_type = LIST_MENU;
- resize_fixed_list(MMI_content_width, MMI_content_height + 2);
- set_fixed_icontext_list_text_coordinates(0, 1, 0, 30, MMI_MENUITEM_HEIGHT);
- set_fixed_icontext_list_text_coordinates(
- 1,
- 30,
- 0,
- UI_device_width - 30 - 4 - MMI_fixed_list_menu.vbar.width,
- MMI_MENUITEM_HEIGHT);
- associate_fixed_icontext_list_list();
- for (i = 0; i < number_of_items; i++)
- {
- fixed_icontext_list_item_insert(i);
- gui_itoa(i + 1, (UI_string_type) category89_string_list[i], 10);
- gui_strcat((UI_string_type) category89_string_list[i], (UI_string_type) ". ");
- add_fixed_icontext_list_item_text(i, 0, (UI_string_type) category89_string_list[i]);
- add_fixed_icontext_list_item_text(i, 1, (UI_string_type) get_string(list_of_items[i]));
- }
- register_fixed_list_shortcut_handler();
- register_fixed_list_keys();
- shortcut_width = set_menu_item_count(number_of_items) + 7;
- resize_menu_shortcut_handler(shortcut_width, MMI_title_height);
- move_menu_shortcut_handler(UI_device_width - MMI_menu_shortcut_box.width, MMI_title_y);
- register_hide_menu_shortcut(gui_redraw_menu_shortcut);
- resize_fixed_icontext_menuitems(0, get_menu_item_height());
- set_fixed_icontext_positions(MMI_ICONTEXT_MENUITEM_HEIGHT + 2, 0, 1, 0);
- move_fixed_list(0, (MMI_title_y + MMI_title_height));
- /* MTK Leo add, 040303 */
- resize_fixed_list(MMI_content_width, MMI_content_height);
- register_fixed_list_highlight_handler(standard_list_highlight_handler);
- MMI_current_menu_type = LIST_MENU;
- h_flag = set_list_menu_category_history(MMI_CATEGORY89_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);
- }
- MMI_title_string = (UI_string_type) get_string(title);
- MMI_title_icon = (PU8) get_image(title_icon);
- resize_fixed_icontext_list_menuitems_to_list_width();
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = ExitCategory89Screen;
- RedrawCategoryFunction = RedrawCategory89Screen;
- GetCategoryHistory = GetCategory89History;
- GetCategoryHistorySize = GetCategory89HistorySize;
- RedrawCategory89Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory130Screen
- * DESCRIPTION
- * Exits the Numbered Items screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory130Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- GUI_current_fixed_icontext_list_menuitem_column = 0;
- ClearHighlightHandler();
- reset_softkeys();
- reset_menu_shortcut_handler();
- reset_fixed_list();
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory130HistorySize
- * DESCRIPTION
- * Gets the history buffer size for the Numbered Items screen
- * PARAMETERS
- * void
- * RETURNS
- * size in U8s of the history buffer
- *****************************************************************************/
- S32 GetCategory130HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (sizeof(list_menu_category_history));
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory130History
- * DESCRIPTION
- * Gets the history buffer for the Numbered Items screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer into which the history data is stored (pre-allocated)
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory130History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- get_list_menu_category_history(MMI_CATEGORY89_ID, history_buffer);
- return (history_buffer);
- }
- /* Category 173: SAT Scrollable notification (Equivalent to Cat-34) */
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory173Screen
- * DESCRIPTION
- * Redraws the dynamic notification screen (For SIM application tookit)
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory173Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- clear_screen();
- show_title_status_icon();
- draw_scrolling_title();
- show_multiline_inputbox();
- show_softkey_background();
- show_left_softkey();
- show_right_softkey();
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
- #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */
- }
- /*****************************************************************************
- * FUNCTION
- * ChangeCategory173MessageString
- * DESCRIPTION
- *
- * PARAMETERS
- * new_string [?]
- * RETURNS
- * void
- *****************************************************************************/
- void ChangeCategory173MessageString(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
- * ShowCategory173Screen
- * DESCRIPTION
- * Displays the dynamic notification screen (For SIM application tookit)
- * 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 [?]
- * history_buffer [IN] History buffer
- * INT(?) [IN] Buffer_size Size of the buffer.
- * BUFFER(?) [IN] Buffer Buffer the input box should use.
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory173Screen(
- U8 *title,
- PU8 title_icon,
- U8 *left_softkey,
- PU8 left_softkey_icon,
- U8 *right_softkey,
- PU8 right_softkey_icon,
- U8 *message,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 l;
- S16 input_type = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- MMI_menu_shortcut_number = -1;
- MMI_disable_title_shortcut_display = 1;
- clear_category_screen_key_handlers();
- set_left_softkey_label((UI_string_type) left_softkey);
- set_left_softkey_icon(left_softkey_icon);
- set_right_softkey_label((UI_string_type) right_softkey);
- set_right_softkey_icon(right_softkey_icon);
- clear_left_softkey();
- clear_right_softkey();
- register_left_softkey_handler();
- register_right_softkey_handler();
- register_default_hide_softkeys();
- l = gui_strlen((UI_string_type) message);
- create_multiline_inputbox_set_buffer((UI_string_type) message, l + 1, l, 0);
- register_multiline_inputbox_viewer_keys();
- move_multiline_inputbox(0, (MMI_title_y + MMI_title_height));
- resize_multiline_inputbox(MMI_multiline_inputbox.width, MMI_content_height);
- MMI_multiline_inputbox.flags |= (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_VIEW_MODE);
- set_multiline_inputbox_category_history(MMI_CATEGORY173_ID, history_buffer, &input_type);
- MMI_title_string = (UI_string_type) title;
- MMI_title_icon = (PU8) title_icon;
- setup_scrolling_title();
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = ExitCategory173Screen;
- RedrawCategoryFunction = RedrawCategory173Screen;
- GetCategoryHistory = GetCategory173History;
- GetCategoryHistorySize = GetCategory173HistorySize;
- RedrawCategory173Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory173Screen
- * DESCRIPTION
- * Exits the dynamic notification screen (For SIM application tookit)
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory173Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- close_scrolling_title();
- reset_softkeys();
- reset_multitaps();
- reset_multiline_inputbox();
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory173HistorySize
- * DESCRIPTION
- * Gets the size of the history buffer for the dynamic notification screen (For SIM application tookit)
- * PARAMETERS
- * void
- * RETURNS
- * size in U8s of the history buffer
- *****************************************************************************/
- S32 GetCategory173HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (sizeof(multiline_inputbox_category_history));
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory173History
- * DESCRIPTION
- * Gets the history buffer for the dynamic notification screen (For SIM application tookit)
- * PARAMETERS
- * history_buffer [IN] Is the buffer into which the history data is stored (pre-allocated)
- * RETURNS
- * Pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory173History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- get_multiline_inputbox_category_history(MMI_CATEGORY173_ID, history_buffer, MMI_current_input_type);
- return (history_buffer);
- }