wgui_categories_demo.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:348k
源码类别:
MTK
开发平台:
C/C++
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_date_time_input_clear_keys();
- wgui_reset_date_input();
- clear_wgui_date_time_input_callback();
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory26HistorySize
- * DESCRIPTION
- * Gets the history buffer size for the category26 screen
- * PARAMETERS
- * void
- * RETURNS
- * size of history buffer in U8s
- *****************************************************************************/
- S32 GetCategory26HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (0);
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory26History
- * DESCRIPTION
- * Gets the history buffer for the category26 screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer to store the history data (pre-allocated)
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory26History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (history_buffer);
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory27Screen
- * DESCRIPTION
- * Redraws the category27 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory27Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- color c = gui_color(0, 0, 0);
- UI_string_type THH_string = get_string(WGUI_CATEGORY_THH_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();
- show_multiline_inputbox();
- 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_hours.text_font);
- w = (wgui_time_input_hours.width >> 1) - (gui_get_string_width(THH_string) >> 1);
- gui_move_text_cursor(wgui_time_input_hours.x + w, wgui_time_input_hours.y - 14);
- gui_print_text(THH_string);
- 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);
- 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: category27_RSK_function
- Description: a function pointer which store the address of RSK function handler
- of category27
- Input Parameters: none
- Output Parameters: none
- Returns: void
- ----------------------------------------------------------------------------*/
- void (*category27_RSK_function) (void) = NULL;
- U8 category27_RSK_label_clear = 0;
- /* store teh string of RSK category27 */
- UI_string_type category27_RSK_label_string;
- /* store the icon of RSK category27 */
- PU8 category27_RSK_label_icon;
- /*****************************************************************************
- * FUNCTION
- * SetCategory27RightSoftkeyFunction
- * DESCRIPTION
- * register teh category27 RSK function handler
- * PARAMETERS
- * f [IN]
- * k [IN]
- * function(?) [IN] Pointer
- * RETURNS
- * void
- *****************************************************************************/
- void SetCategory27RightSoftkeyFunction(void (*f) (void), MMI_key_event_type k)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(k);
- category27_RSK_function = f;
- }
- /*****************************************************************************
- * FUNCTION
- * handle_category27_right_softkey_down
- * DESCRIPTION
- * handle rsk key down of category 27
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void handle_category27_right_softkey_down(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_date_time_delete_character();
- }
- /*****************************************************************************
- * FUNCTION
- * handle_category27_right_softkey_up
- * DESCRIPTION
- * handle rsk key down of category 27
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void handle_category27_right_softkey_up(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 l1 = gui_single_line_input_box_get_text_length(&wgui_time_input_hours);
- S32 l2 = gui_single_line_input_box_get_text_length(&wgui_time_input_minutes);
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if ((l1 <= 0) && (l2 <= 0) && (!category27_RSK_label_clear))
- {
- if (category27_RSK_function != NULL)
- {
- category27_RSK_function();
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * register_category27_handle_right_softkey_up
- * DESCRIPTION
- * register RSK key up function handlerof category 27
- * PARAMETERS
- * void
- * function(?) [IN] Pointer
- * RETURNS
- * void
- *****************************************************************************/
- void register_category27_handle_right_softkey_up(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- set_right_softkey_function(handle_category27_right_softkey_up, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * handle_category27_right_softkey_long_press
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * function(?) [IN] Pointer
- * RETURNS
- * void
- *****************************************************************************/
- void handle_category27_right_softkey_long_press(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- }
- /*****************************************************************************
- * FUNCTION
- * handle_category27_input
- * DESCRIPTION
- * handle category27 input
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void handle_category27_input(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 l1 = gui_single_line_input_box_get_text_length(&wgui_time_input_hours);
- S32 l2 = gui_single_line_input_box_get_text_length(&wgui_time_input_minutes);
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if ((l1 > 0) || (l2 > 0))
- {
- if (category27_RSK_label_clear == 0)
- {
- /* Hardcoded. Needs to be modified to take IDs */
- set_right_softkey_label((UI_string_type) get_string(WGUI_CATEGORY_CLEAR_STRING_ID));
- set_right_softkey_icon(NULL);
- redraw_right_softkey();
- category27_RSK_label_clear = 1;
- set_right_softkey_function(UI_dummy_function, KEY_EVENT_UP);
- }
- }
- else
- {
- if (category27_RSK_label_clear == 1)
- {
- set_right_softkey_label(category27_RSK_label_string);
- set_right_softkey_icon(category27_RSK_label_icon);
- redraw_right_softkey();
- category27_RSK_label_clear = 0;
- set_right_softkey_function(register_category27_handle_right_softkey_up, KEY_EVENT_UP);
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory27Screen
- * DESCRIPTION
- * Displays the category27 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the Left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * message [IN] Message string
- * hours_buffer [IN] Buffer to input hours
- * minutes_buffer [IN] Buffer to input minutes
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory27Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U16 message,
- U8 *hours_buffer,
- U8 *minutes_buffer,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 l, s1, s2, sg, x, y, fh;
- /*----------------------------------------------------------------*/
- /* 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);
- #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);
- resize_multiline_inputbox(MMI_multiline_inputbox.width, 40);
- 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);
- /* MTK Leo added, to move inputbox to proper position */
- #ifdef __BW_MMI__
- move_multiline_inputbox((MMI_content_width << 1) - (l << 1), (MMI_title_y + MMI_title_height) + 2);
- #else
- move_multiline_inputbox(0, (MMI_title_y + MMI_title_height));
- #endif
- /* MTK Leo end */
- wgui_reset_date_input();
- wgui_initialize_time_input(hours_buffer, 2, minutes_buffer, 2, NULL, 0);
- y = 16 + MMI_multiline_inputbox.y + MMI_multiline_inputbox.height +
- (((MMI_content_height - MMI_multiline_inputbox.height) >> 1) - ((16 + 18) >> 1));
- s1 = 24;
- s2 = 24;
- sg = 4;
- /* MTK Leo added, to resize inputbox to proper size */
- #ifdef __BW_MMI__
- wgui_resize_hours_input(s1, 14);
- wgui_resize_minutes_input(s2, 14);
- #else /* __BW_MMI__ */
- wgui_resize_hours_input(s1, 18);
- wgui_resize_minutes_input(s2, 18);
- #endif /* __BW_MMI__ */
- /* MTK Leo end */
- x = (UI_device_width >> 1) - ((s1 + s2 + sg) >> 1);
- wgui_move_hours_input(x, y);
- x += s1 + sg;
- wgui_move_minutes_input(x, y);
- wgui_set_hours_input_navigation(WGUI_DATE_TIME_INPUT_FOCUS_NONE, WGUI_DATE_TIME_INPUT_FOCUS_MINUTES);
- wgui_set_minutes_input_navigation(WGUI_DATE_TIME_INPUT_FOCUS_HOURS, WGUI_DATE_TIME_INPUT_FOCUS_NONE);
- wgui_date_time_input_set_focus(WGUI_DATE_TIME_INPUT_FOCUS_HOURS);
- wgui_date_time_input_register_keys();
- category27_RSK_label_clear = 0;
- set_right_softkey_function(handle_category27_right_softkey_down, KEY_EVENT_DOWN);
- set_right_softkey_function(handle_category27_right_softkey_long_press, KEY_LONG_PRESS);
- register_wgui_date_time_input_callback(handle_category27_input);
- category27_RSK_label_icon = get_image(right_softkey_icon);
- category27_RSK_label_string = get_string(right_softkey);
- handle_category27_input();
- {
- S32 l1 = gui_single_line_input_box_get_text_length(&wgui_time_input_hours);
- S32 l2 = gui_single_line_input_box_get_text_length(&wgui_time_input_minutes);
- if ((l1 <= 0) && (l2 <= 0))
- {
- set_right_softkey_function(handle_category27_right_softkey_up, KEY_EVENT_UP);
- }
- }
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = ExitCategory27Screen;
- RedrawCategoryFunction = RedrawCategory27Screen;
- GetCategoryHistory = GetCategory27History;
- GetCategoryHistorySize = GetCategory27HistorySize;
- RedrawCategory27Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory27Screen
- * DESCRIPTION
- * Exits the category27 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory27Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_date_time_input_clear_keys();
- wgui_reset_time_input();
- clear_wgui_date_time_input_callback();
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory27HistorySize
- * DESCRIPTION
- * Gets the history buffer size for the category27 screen
- * PARAMETERS
- * void
- * RETURNS
- * size of history buffer in U8s
- *****************************************************************************/
- S32 GetCategory27HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (0);
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory27History
- * DESCRIPTION
- * Gets the history buffer for the category27 screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer to store the history data (pre-allocated)
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory27History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (history_buffer);
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory31Screen
- * DESCRIPTION
- * Redraws the Category31 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory31Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- clear_screen();
- gui_set_clip(0, 0, UI_device_width - 1, UI_device_height - 1);
- gui_set_text_clip(0, 0, UI_device_width - 1, UI_device_height - 1);
- show_multiline_inputbox();
- #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
- * ShowCategory31Screen
- * DESCRIPTION
- * Displays the Category31 screen
- * PARAMETERS
- * message [IN] Message string
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory31Screen(U16 message, U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 l, fh;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ADD_SCREEN_STRINGS((1, message));
- 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();
- 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);
- 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);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = ExitCategory31Screen;
- RedrawCategoryFunction = RedrawCategory31Screen;
- GetCategoryHistory = GetCategory31History;
- GetCategoryHistorySize = GetCategory31HistorySize;
- RedrawCategory31Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory31Screen
- * DESCRIPTION
- * Exits the Category31 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory31Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory31HistorySize
- * DESCRIPTION
- * Gets the history buffer size for the Category31 screen
- * PARAMETERS
- * void
- * RETURNS
- * size in U8s of the history buffer
- *****************************************************************************/
- S32 GetCategory31HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (0);
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory31History
- * DESCRIPTION
- * Gets the history buffer for the Category31 screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer into which the history data is stored (pre-allocated)
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory31History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (history_buffer);
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory34Screen
- * DESCRIPTION
- * Redraws the dynamic icon notification screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory34Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- gui_hide_animations();
- clear_screen();
- gui_reset_clip();
- 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
- * category34_keyboard_key_handler
- * DESCRIPTION
- * keyboard key handler of category 34
- * PARAMETERS
- * vkey_code [IN]
- * key_state [IN]
- * vkey_codes(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void category34_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: /* left */
- break;
- case 39: /* right */
- break;
- case 38:
- multiline_inputbox_previous_line();
- break;
- case 40:
- multiline_inputbox_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
- * ShowCategory34Screen
- * DESCRIPTION
- * Displays the dynamic icon notification 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
- * message [IN] Notification message
- * message_icon [IN]
- * history_buffer [IN] History buffer
- * IMAGE(?) [IN] Image Notification image
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory34Screen(
- U8 *left_softkey,
- PU8 left_softkey_icon,
- U8 *right_softkey,
- PU8 right_softkey_icon,
- U8 *message,
- PU8 message_icon,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 l, h, fh, y, iwidth, iheight, n, th;
- /*----------------------------------------------------------------*/
- /* 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((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();
- MMI_message_string = (UI_string_type) message;
- gui_measure_image(message_icon, &iwidth, &iheight);
- l = gui_strlen(MMI_message_string);
- create_multiline_inputbox_set_buffer(MMI_message_string, l, l, 0);
- resize_multiline_inputbox(UI_device_width, MMI_content_height - iheight + 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();
- gui_set_font(MMI_multiline_inputbox.text_font);
- fh = get_multiline_inputbox_line_height();
- n = MMI_multiline_inputbox.n_lines;
- h = n * fh + MMI_multiline_inputbox.text_y + MULTILINE_INPUTBOX_HEIGHT_PAD;
- th = UI_device_height - MMI_button_bar_height + 1 - iheight;
- if (message_icon != NULL)
- {
- if (h > (th - MULTILINE_INPUTBOX_HEIGHT_PAD))
- {
- h = (th - MULTILINE_INPUTBOX_HEIGHT_PAD);
- }
- th = h + iheight + MULTILINE_INPUTBOX_HEIGHT_PAD;
- y = ((UI_device_height - MMI_button_bar_height) >> 1) - (th >> 1);
- if (y < 0)
- {
- y = 0;
- }
- wgui_set_animation_image_y((UI_device_width >> 1), y, message_icon);
- y = iheight + MULTILINE_INPUTBOX_HEIGHT_PAD + y;
- }
- else
- {
- if (h > th)
- {
- h = th;
- }
- th = h + iheight;
- y = ((UI_device_height - MMI_button_bar_height) >> 1) - (th >> 1);
- if (y < 0)
- {
- y = 0;
- }
- wgui_set_animation_image_y((UI_device_width >> 1), y, message_icon);
- y = iheight + y;
- }
- if ((y + h) > (UI_device_height - MMI_button_bar_height + 1))
- {
- h = (UI_device_height - MMI_button_bar_height + 1) - y;
- }
- resize_multiline_inputbox(MMI_multiline_inputbox.width, h);
- move_multiline_inputbox(0, y);
- register_keyboard_key_handler(category34_keyboard_key_handler);
- SetKeyHandler(multiline_inputbox_previous_line, KEY_UP_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(multiline_inputbox_next_line, KEY_DOWN_ARROW, KEY_EVENT_DOWN);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = ExitCategory34Screen;
- RedrawCategoryFunction = RedrawCategory34Screen;
- GetCategoryHistory = GetCategory34History;
- GetCategoryHistorySize = GetCategory34HistorySize;
- RedrawCategory34Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory34Screen
- * DESCRIPTION
- * Exits the dynamic icon notification screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory34Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_hide_animations();
- #if(UI_BLINKING_CURSOR_SUPPORT)
- //gui_cancel_timer(UI_inputbox_blink_cursor);
- //MTK Elvis
- StopMyTimer(BLINKING_CURSOR);
- /* MTK end */
- #endif /* (UI_BLINKING_CURSOR_SUPPORT) */
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory34HistorySize
- * DESCRIPTION
- * Gets the history buffer size for the dynamic icon notification screen
- * PARAMETERS
- * void
- * RETURNS
- * size in U8s of the history buffer
- *****************************************************************************/
- S32 GetCategory34HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (0);
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory34History
- * DESCRIPTION
- * Gets the history buffer for the dynamic icon notification screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer into which the history data is stored
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory34History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (history_buffer);
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory37Screen
- * DESCRIPTION
- * Redraws the MO_call screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory37Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- clear_screen();
- show_status_icons();
- show_main_LCD_dt_display();
- show_dialer_inputbox();
- 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
- * ShowCategory37Screen
- * DESCRIPTION
- * Displays the MO_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
- * Buffer [IN] Lenghth, Length of buffer
- * BufferLength [IN]
- * history_buffer [IN] History buffer
- * STRING(?) [IN] * Dial Pad buffer, Dial Pad contents
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory37Screen(
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U8 *Buffer,
- U32 BufferLength,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ADD_SCREEN_STRINGS((2, left_softkey, right_softkey));
- ADD_SCREEN_IMAGES((2, left_softkey_icon, right_softkey_icon));
- UI_UNUSED_PARAMETER(history_buffer);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- clear_key_handlers();
- clear_left_softkey();
- clear_right_softkey();
- change_right_softkey(right_softkey, right_softkey_icon);
- change_left_softkey(left_softkey, left_softkey_icon);
- register_left_softkey_handler();
- register_right_softkey_handler();
- set_dt_display(DT_MO_CALL_SCREEN);
- register_hide_status_icon_bar(0, CM_screens_hide_status_icons);
- set_status_icon_bar_clip(0, 0, 0, UI_device_width - 1, MMI_status_bar_height - 1);
- show_status_icon_bar(0);
- hide_status_icon_bar(1);
- #if(0)
- if(history_buffer!=NULL)
- { word history_ID=(word)((word)(history_buffer[0])|(word)(history_buffer[1]<<8));
- if((history_ID & 0x8000) && ((history_ID & 0x7fff)==MMI_CATEGORY16_ID))
- {
- /* Get the length and number */
- BufferLength = (U8) history_buffer[2];
- pixtel_UI_strncpy((UI_string_type)Buffer,(UI_string_type)(history_buffer+3),BufferLength);
- Buffer[BufferLength+1] = ' ';
- }
- /* Need to get the number from history */
- }
- #endif /* (0) */
- setup_general_inputbox_dialer(
- (UI_string_type) Buffer,
- BufferLength,
- gui_strlen((UI_string_type) Buffer),
- gui_strlen((UI_string_type) Buffer));
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- RedrawCategoryFunction = RedrawCategory37Screen;
- ExitCategoryFunction = ExitCategory37Screen;
- GetCategoryHistory = GetCategory37History;
- GetCategoryHistorySize = GetCategory37HistorySize;
- RedrawCategory37Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory37Screen
- * DESCRIPTION
- * Exits the MO_call screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory37Screen()
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- close_main_LCD_dt_display();
- close_status_icons();
- reset_softkeys();
- reset_multitaps();
- reset_general_inputbox();
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory37History
- * DESCRIPTION
- * Gets the history buffer for MO_call 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 *GetCategory37History(U8 *history_buffer)
- {
- #if(0)
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- if(history_buffer!=NULL)
- { U16 i,j;
- word history_ID=(word)(MMI_CATEGORY16_ID|0x8000);
- history_buffer[0]=(U8)(history_ID & 0xff);
- history_buffer[1]=(U8)(history_ID >> 8);
- history_buffer[2]= (U8) (pixtel_UI_strlen((UI_string_type)MMI_general_inputbox.text));
- for(i=0,j=3;i<pixtel_UI_strlen((UI_string_type)MMI_general_inputbox.text);i++)
- {
- history_buffer[j+i]=(U8)(MMI_general_inputbox.text[i]);
- }
- }
- #endif /* (0) */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (history_buffer);
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory37HistorySize
- * DESCRIPTION
- * Gets the history buffer size for category MO_call screen
- * PARAMETERS
- * void
- * RETURNS
- * size in U8s of the history buffer
- *****************************************************************************/
- S32 GetCategory37HistorySize(void)
- {
- #if(0)
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- return (pixtel_UI_strlen(MMI_general_inputbox.text));
- #endif /* (0) */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (0);
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory50Screen
- * DESCRIPTION
- * Redraws the Category50 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory50Screen(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
- * ShowCategory50Screen
- * DESCRIPTION
- * Displays the Category50 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey1 [IN] Left softkey label (SET)
- * left_softkey_icon1 [IN] Icon for the left softkey (SET)
- * left_softkey2 [IN] Left softkey label (UNSET)
- * left_softkey_icon2 [IN] Icon for the left softkey (UNSET)
- * 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 (Strings, not string IDs)
- * list_of_states [IN] Array containing the states of the items
- * highlighted_item [IN]
- * history_buffer [IN] History buffer
- * INT(?) [IN] Hilighted_item, Default item to be highlighted (if there is no history)
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory50Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey1,
- U16 left_softkey_icon1,
- U16 left_softkey2,
- U16 left_softkey_icon2,
- U16 right_softkey,
- U16 right_softkey_icon,
- S32 number_of_items,
- U8 **list_of_items,
- U8 *list_of_states,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i, shortcut_width;
- U8 h_flag;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ADD_SCREEN_STRINGS((4, title, left_softkey1, left_softkey2, right_softkey));
- ADD_SCREEN_IMAGES((4, title_icon, left_softkey_icon1, left_softkey_icon2, right_softkey_icon));
- UI_UNUSED_PARAMETER(left_softkey2);
- UI_UNUSED_PARAMETER(left_softkey_icon2);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- 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_softkey1, left_softkey_icon1);
- 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();
- set_left_softkey_function(standard_check_list_handle_left_softkey_up, KEY_EVENT_UP);
- 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(CHECKBOX_ON_IMAGE_ID), get_image(CHECKBOX_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 */
- checklist_category_menu_item_states = list_of_states;
- for (i = 0; i < number_of_items; i++)
- {
- add_fixed_twostate_item((UI_string_type) list_of_items[i]);
- if (list_of_states[i])
- {
- select_fixed_twostate_item(i);
- }
- }
- move_fixed_list(0, (MMI_title_y + MMI_title_height));
- resize_fixed_list(MMI_content_width, MMI_content_height + 2);
- register_fixed_list_highlight_handler(standard_check_list_highlight_handler);
- resize_fixed_list_to_content_height();
- h_flag = set_list_menu_category_history(MMI_CATEGORY50_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);
- }
- register_menu_shortcut_selected(standard_check_list_handle_item_select);
- resize_fixed_twostate_menuitems_to_list_width();
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = ExitCategory50Screen;
- RedrawCategoryFunction = RedrawCategory50Screen;
- GetCategoryHistory = GetCategory50History;
- GetCategoryHistorySize = GetCategory50HistorySize;
- RedrawCategory50Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory50Screen
- * DESCRIPTION
- * Exits the Category50 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory50Screen(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
- * GetCategory50HistorySize
- * DESCRIPTION
- * Gets the history buffer size for Category50 screen
- * PARAMETERS
- * void
- * RETURNS
- * size in U8s of the history buffer
- *****************************************************************************/
- S32 GetCategory50HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (sizeof(list_menu_category_history));
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory50History
- * DESCRIPTION
- * Gets the history buffer for Category50 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 *GetCategory50History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- get_list_menu_category_history(MMI_CATEGORY50_ID, history_buffer);
- return (history_buffer);
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory51Screen
- * DESCRIPTION
- * Redraws the category51 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory51Screen(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
- * category51_check_list_handle_left_softkey_up
- * DESCRIPTION
- * Handles Check List Selection/Deselection
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void category51_check_list_handle_left_softkey_up(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i = GetHighlightedItem();
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- standard_check_list_handle_item_select(i);
- if (checklist_category_menu_item_states != NULL)
- {
- checklist_category_menu_item_states[i] = get_fixed_twostate_item_state(i);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory51Screen
- * DESCRIPTION
- * Displays the category51 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey1 [IN] Left softkey label (SET)
- * left_softkey_icon1 [IN] Icon for the left softkey (SET)
- * left_softkey2 [IN] Left softkey label (UNSET)
- * left_softkey_icon2 [IN] Icon for the left softkey (UNSET)
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * number_of_items [IN] Number of items
- * list_of_items [IN] List of text items
- * list_of_states [IN] Array containing the states of the items
- * highlighted_item [IN] Default item to be highlighted (if there is no history)
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory51Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey1,
- U16 left_softkey_icon1,
- U16 left_softkey2,
- U16 left_softkey_icon2,
- U16 right_softkey,
- U16 right_softkey_icon,
- S32 number_of_items,
- U16 *list_of_items,
- U8 *list_of_states,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i, shortcut_width;
- U8 h_flag;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ADD_SCREEN_STRINGS((4, title, left_softkey1, left_softkey2, right_softkey));
- APPEND_SCREEN_STRING_LIST(number_of_items, (U16*) list_of_items);
- ADD_SCREEN_IMAGES((4, title_icon, left_softkey_icon1, left_softkey_icon2, right_softkey_icon));
- UI_UNUSED_PARAMETER(left_softkey2);
- UI_UNUSED_PARAMETER(left_softkey_icon2);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- 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_softkey1, left_softkey_icon1);
- 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();
- set_left_softkey_function(standard_check_list_handle_left_softkey_up, KEY_EVENT_UP);
- 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(CHECKBOX_ON_IMAGE_ID), get_image(CHECKBOX_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 */
- checklist_category_menu_item_states = list_of_states;
- for (i = 0; i < number_of_items; i++)
- {
- add_fixed_twostate_item(get_string(list_of_items[i]));
- if (list_of_states[i])
- {
- select_fixed_twostate_item(i);
- }
- }
- move_fixed_list(0, (MMI_title_y + MMI_title_height));
- resize_fixed_list(MMI_content_width, MMI_content_height + 2);
- register_fixed_list_highlight_handler(standard_check_list_highlight_handler);
- resize_fixed_list_to_content_height();
- h_flag = set_list_menu_category_history(MMI_CATEGORY51_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);
- }
- register_menu_shortcut_selected(standard_check_list_handle_item_select);
- resize_fixed_twostate_menuitems_to_list_width();
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = ExitCategory51Screen;
- RedrawCategoryFunction = RedrawCategory51Screen;
- GetCategoryHistory = GetCategory51History;
- GetCategoryHistorySize = GetCategory51HistorySize;
- RedrawCategory51Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory51Screen
- * DESCRIPTION
- * Exits the category51 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory51Screen(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
- * GetCategory51HistorySize
- * DESCRIPTION
- * Gets the history buffer size for category51 screen
- * PARAMETERS
- * void
- * RETURNS
- * size in U8s of the history buffer
- *****************************************************************************/
- S32 GetCategory51HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (sizeof(list_menu_category_history));
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory51History
- * DESCRIPTION
- * Gets the history buffer for category51 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 *GetCategory51History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- get_list_menu_category_history(MMI_CATEGORY51_ID, history_buffer);
- return (history_buffer);
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory54Screen
- * DESCRIPTION
- * Redraws the category54 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory54Screen(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
- * ShowCategory54Screen
- * DESCRIPTION
- * Displays the category54 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
- * list_of_icons [IN] Array of icons
- * list_of_descriptions1 [IN] Array of Pop up description strings 1
- * list_of_descriptions2 [IN] Array of Pop up description strings 2
- * 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 ShowCategory54Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- S32 number_of_items,
- U8 **list_of_items,
- U16 *list_of_icons,
- U8 **list_of_descriptions1,
- U8 **list_of_descriptions2,
- 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));
- APPEND_SCREEN_STRING_LIST(number_of_items, (U16*) list_of_items);
- ADD_SCREEN_IMAGES((3, title_icon, left_softkey_icon, right_softkey_icon));
- APPEND_SCREEN_IMAGE_LIST(number_of_items, (U16*) list_of_icons);
- UI_UNUSED_PARAMETER(flags);
- UI_UNUSED_PARAMETER(list_of_descriptions1);
- UI_UNUSED_PARAMETER(list_of_descriptions2);
- #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_menuitems();
- resize_fixed_list(MMI_content_width, MMI_content_height + 2);
- associate_fixed_icontext_list();
- if ((list_of_descriptions1 == NULL) && (list_of_descriptions2 == NULL))
- {
- for (i = 0; i < number_of_items; i++)
- {
- /* MTK Leo added, not display icon on BW_MMI */
- #ifdef __BW_MMI__
- add_fixed_icontext_item((UI_string_type) list_of_items[i], get_image(0));
- #else
- add_fixed_icontext_item((UI_string_type) list_of_items[i], get_image(list_of_icons[i]));
- #endif
- /* MTK Leo end */
- wgui_pop_up_description_strings[i].text_strings[0] = NULL;
- wgui_pop_up_description_strings[i].text_strings[1] = NULL;
- }
- }
- else if (list_of_descriptions1 == NULL)
- {
- for (i = 0; i < number_of_items; i++)
- {
- /* MTK Leo added, not display icon on BW_MMI */
- #ifdef __BW_MMI__
- add_fixed_icontext_item((UI_string_type) list_of_items[i], get_image(0));
- #else
- add_fixed_icontext_item((UI_string_type) list_of_items[i], get_image(list_of_icons[i]));
- #endif
- /* MTK Leo end */
- wgui_pop_up_description_strings[i].text_strings[0] = NULL;
- wgui_pop_up_description_strings[i].text_strings[1] = (UI_string_type) list_of_descriptions2[i];
- }
- }
- else if (list_of_descriptions2 == NULL)
- {
- for (i = 0; i < number_of_items; i++)
- {
- /* MTK Leo added, not display icon on BW_MMI */
- #ifdef __BW_MMI__
- add_fixed_icontext_item((UI_string_type) list_of_items[i], get_image(0));
- #else
- add_fixed_icontext_item((UI_string_type) list_of_items[i], get_image(list_of_icons[i]));
- #endif
- /* MTK Leo end */
- wgui_pop_up_description_strings[i].text_strings[0] = (UI_string_type) list_of_descriptions1[i];
- wgui_pop_up_description_strings[i].text_strings[1] = NULL;
- }
- }
- else
- {
- for (i = 0; i < number_of_items; i++)
- {
- /* MTK Leo added, not display icon on BW_MMI */
- #ifdef __BW_MMI__
- add_fixed_icontext_item((UI_string_type) list_of_items[i], get_image(0));
- #else
- add_fixed_icontext_item((UI_string_type) list_of_items[i], get_image(list_of_icons[i]));
- #endif
- /* MTK Leo end */
- wgui_pop_up_description_strings[i].text_strings[0] = (UI_string_type) list_of_descriptions1[i];
- wgui_pop_up_description_strings[i].text_strings[1] = (UI_string_type) list_of_descriptions2[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 + 2);
- resize_fixed_list_to_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_CATEGORY54_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_menuitems_to_list_width();
- set_pop_up_descriptions(2, number_of_items, MMI_fixed_list_menu.highlighted_item);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = ExitCategory54Screen;
- RedrawCategoryFunction = RedrawCategory54Screen;
- GetCategoryHistory = GetCategory54History;
- GetCategoryHistorySize = GetCategory54HistorySize;
- RedrawCategory54Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory54Screen
- * DESCRIPTION
- * Exits the category54 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory54Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ClearHighlightHandler();
- reset_softkeys();
- reset_menu_shortcut_handler();
- reset_fixed_list();
- reset_pop_up_descriptions();
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory54HistorySize
- * DESCRIPTION
- * Gets the history buffer size for the category54 screen
- * PARAMETERS
- * void
- * RETURNS
- * size in U8s of the history buffer
- *****************************************************************************/
- S32 GetCategory54HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (sizeof(list_menu_category_history));
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory54History
- * DESCRIPTION
- * Gets the history buffer for the category54 screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer into which the history data is stored (pre-allocated)
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory54History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- get_list_menu_category_history(MMI_CATEGORY54_ID, history_buffer);
- return (history_buffer);
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory58Screen
- * DESCRIPTION
- * Redraws the category58 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory58Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- gui_hide_animations();
- clear_screen();
- show_title_status_icon();
- draw_title();
- gui_reset_clip();
- gui_reset_text_clip();
- 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
- * ShowCategory58Screen
- * DESCRIPTION
- * Displays the category58 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * message [IN] Notification message
- * message_icon [IN]
- * history_buffer [IN] History buffer
- * MMI_ID_TYPE(?) [IN] Image Notification image
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory58Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U16 message,
- U16 message_icon,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 l, fh;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ADD_SCREEN_STRINGS((4, title, left_softkey, right_softkey, message));
- ADD_SCREEN_IMAGES((4, title_icon, 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_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);
- resize_multiline_inputbox(UI_device_width - 31, MMI_content_height + 3);
- MMI_multiline_inputbox.flags |=
- (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND |
- UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR);
- 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);
- move_multiline_inputbox(
- 32,
- (MMI_title_y + MMI_title_height) + ((MMI_content_height >> 1) - (MMI_multiline_inputbox.height >> 1)));
- wgui_set_animation_y(16, MMI_multiline_inputbox.y + 8, message_icon);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = ExitCategory58Screen;
- RedrawCategoryFunction = RedrawCategory58Screen;
- GetCategoryHistory = GetCategory58History;
- GetCategoryHistorySize = GetCategory58HistorySize;
- RedrawCategory58Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory58Screen
- * DESCRIPTION
- * Exits the category58 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory58Screen(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
- * GetCategory58HistorySize
- * DESCRIPTION
- * Gets the history buffer size for the category58 screen
- * PARAMETERS
- * void
- * RETURNS
- * size in U8s of the history buffer
- *****************************************************************************/
- S32 GetCategory58HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (0);
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory58History
- * DESCRIPTION
- * Gets the history buffer for the category58 screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer into which the history data is stored
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory58History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (history_buffer);
- }
- /* CODE ENDED VANDANA MEHTANI */
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory60Screen
- * DESCRIPTION
- * Redraws the category60 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory60Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 width, height, y;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- clear_screen();
- gui_set_clip(0, 0, UI_device_width - 1, UI_device_height - 1);
- gui_set_text_clip(0, 0, UI_device_width - 1, UI_device_height - 1);
- y = MMI_multiline_inputbox.y + MMI_multiline_inputbox.height;
- gui_measure_image(MMI_message_icon, &width, &height);
- gui_show_image(
- (UI_device_width >> 1) - (width >> 1),
- y + ((UI_device_height - MMI_softkey_height - y) >> 1) - (height >> 1),
- MMI_message_icon);
- show_multiline_inputbox();
- #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
- * ShowCategory60Screen
- * DESCRIPTION
- * Displays the category60 screen
- * PARAMETERS
- * message [IN] Message string
- * message_icon [IN]
- * history_buffer [IN] History buffer
- * MMI_ID_TYPE(?) [IN] Icon Message icon
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory60Screen(U16 message, U16 message_icon, U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 l, fh;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ADD_SCREEN_STRINGS((1, message));
- ADD_SCREEN_IMAGES((1, 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();
- 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);
- 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);
- MMI_message_icon = (PU8) get_image(message_icon);
- 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);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = ExitCategory60Screen;
- RedrawCategoryFunction = RedrawCategory60Screen;
- GetCategoryHistory = GetCategory60History;
- GetCategoryHistorySize = GetCategory60HistorySize;
- RedrawCategory60Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory60Screen
- * DESCRIPTION
- * Exits the category60 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory60Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory60HistorySize
- * DESCRIPTION
- * Gets the history buffer size for the category60 screen
- * PARAMETERS
- * void
- * RETURNS
- * size in U8s of the history buffer
- *****************************************************************************/
- S32 GetCategory60HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (0);
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory60History
- * DESCRIPTION
- * Gets the history buffer for the category60 screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer into which the history data is stored (pre-allocated)
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory60History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (history_buffer);
- }
- /* CODE ADDED VANDANA MEHTANI 11 JUNE */
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory67Screen
- * DESCRIPTION
- * Redraws the category67 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory67Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- gui_hide_animations();
- clear_screen();
- show_title_status_icon();
- draw_title();
- // MTK modified, Max: to solve Chicago issue #965
- // gui_reset_clip();
- gui_set_clip(0, MMI_TITLE_HEIGHT, UI_device_width, UI_device_height - MMI_BUTTON_BAR_HEIGHT);
- /* MTK end */
- gui_reset_text_clip();
- 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
- * ShowCategory67Screen
- * DESCRIPTION
- * Displays the category67 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_icon [IN]
- * history_buffer [IN] History buffer
- * MMI_ID_TYPE(?) [IN] Image Animation image
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory67Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U16 message_icon,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* ADD_SCREEN_STRINGS((4,title,left_softkey,right_softkey,message)); */
- ADD_SCREEN_STRINGS((3, title, left_softkey, right_softkey));
- ADD_SCREEN_IMAGES((4, title_icon, left_softkey_icon, right_softkey_icon, message_icon));
- UI_UNUSED_PARAMETER(history_buffer);
- /* UI_UNUSED_PARAMETER(message); */
- #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) NULL;
- /* CODE ADDED VANDANA MEHTANI */
- /* wgui_set_animation((MMI_content_width>>1),(MMI_content_height>>1),message_icon); */
- wgui_set_animation(
- (MMI_content_width >> 1),
- ((UI_device_height - (MMI_title_y + MMI_title_height)) >> 1) + 10,
- message_icon);
- /* CODE ENDED VANDNA MEHTANI */
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = ExitCategory67Screen;
- RedrawCategoryFunction = RedrawCategory67Screen;
- GetCategoryHistory = GetCategory67History;
- GetCategoryHistorySize = GetCategory67HistorySize;
- RedrawCategory67Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory67Screen
- * DESCRIPTION
- * Exits the category67 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory67Screen(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
- * GetCategory67HistorySize
- * DESCRIPTION
- * Gets the history buffer size for the category67 screen
- * PARAMETERS
- * void
- * RETURNS
- * size in U8s of the history buffer
- *****************************************************************************/
- S32 GetCategory67HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (0);
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory67History
- * DESCRIPTION
- * Gets the history buffer for the category67 screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer into which the history data is stored
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory67History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (history_buffer);
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory68Screen
- * DESCRIPTION
- * Redraws the help category screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory68Screen(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_draw_rectangle(
- 0,
- (MMI_title_y + MMI_title_height),
- UI_device_width - 1,
- (MMI_title_y + MMI_title_height) + MMI_content_height,
- *(current_MMI_theme->UI_black_color));
- gui_show_transparent_image(4, (MMI_title_y + MMI_title_height) + 8, get_image(THEME_0_HELP_CATEGORY_IMAGE_ID), 0);
- 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
- * ShowCategory68Screen
- * DESCRIPTION
- * Displays the help 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] Left softkey label
- * right_softkey_icon [IN] Icon for the Left softkey
- * message [IN] Message string ID
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory68Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U8 *message,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 l;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ADD_SCREEN_STRINGS((2, left_softkey, message));
- ADD_SCREEN_IMAGES((2, title_icon, left_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);
- MMI_message_string = (UI_string_type) message;
- l = gui_strlen(MMI_message_string);
- create_multiline_inputbox_set_buffer(
- MMI_message_string,
- gui_strlen((UI_string_type) MMI_message_string),
- gui_strlen((UI_string_type) MMI_message_string),
- 0);
- SetKeyHandler(multiline_inputbox_previous_line, KEY_UP_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(multiline_inputbox_next_line, KEY_DOWN_ARROW, KEY_EVENT_DOWN);
- move_multiline_inputbox(32, (MMI_title_y + MMI_title_height) - 1);
- resize_multiline_inputbox(UI_device_width - 31, MMI_content_height + 3);
- MMI_multiline_inputbox.flags |=
- (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = ExitCategory68Screen;
- RedrawCategoryFunction = RedrawCategory68Screen;
- GetCategoryHistory = GetCategory68History;
- GetCategoryHistorySize = GetCategory68HistorySize;
- RedrawCategory68Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory68Screen
- * DESCRIPTION
- * Exits the help category screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory68Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory68HistorySize
- * DESCRIPTION
- * Gets the size of the history buffer for the help screen
- * PARAMETERS
- * void
- * RETURNS
- * size of history buffer in U8s
- *****************************************************************************/
- S32 GetCategory68HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (0);
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory68History
- * DESCRIPTION
- * Gets the history buffer for the help screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer into which the history data is stored (pre-allocated)
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory68History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (history_buffer);
- }
- /*****************************************************************************
- * FUNCTION
- * category70_hide_multitap
- * DESCRIPTION
- * Hide function for multitap
- *
- * Internal function
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void category70_hide_multitap(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- color c;
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- /* gui_lock_double_buffer(); */
- #endif
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- c.r = 255;
- c.g = 255;
- c.b = 255;
- c.alpha = 100;
- gui_reset_clip();
- gui_fill_rectangle(
- MMI_multitap_x,
- MMI_multitap_y,
- MMI_multitap_x + MMI_multitap_width + 1,
- MMI_multitap_y + MMI_multitap_height + 1,
- c);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- // gui_unlock_double_buffer();
- // gui_BLT_double_buffer(MMI_multitap_x,MMI_multitap_y,MMI_multitap_x+MMI_multitap_width+1,MMI_multitap_y+MMI_multitap_height+1);
- #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory70Screen
- * DESCRIPTION
- * Redraws the category70 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory70Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- clear_screen();
- if (wgui_switch_title_with_status_bar)
- {
- show_status_icons();
- }
- else
- {
- show_title_status_icon();
- draw_title();
- }
- show_multiline_inputbox();
- show_singleline_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
- * SetCategory70RightSoftkeyFunction
- * DESCRIPTION
- *
- * PARAMETERS
- * f [IN]
- * k [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void SetCategory70RightSoftkeyFunction(void (*f) (void), MMI_key_event_type k)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(k);
- wgui_singleline_inputbox_RSK_function = f;
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory70Screen
- * DESCRIPTION
- * Displays the category70 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * message [IN] Message
- * input_type [IN] Type of input to use
- * buffer [IN] Buffer the input box should use.
- * buffer_size [IN] Size of the buffer.
- * history_buffer [IN] History buffer
- * INPUT_TYPE_ALPHANUMERIC_SENTENCECASE(?) [IN]
- * INPUT_TYPE(?) [IN] Can take the following values:
- * INPUT_TYPE_ALPHANUMERIC_LOWERCASE(?) [IN]
- * INPUT_TYPE_NUMERIC(?) [IN]
- * below(?) [IN]
- * INPUT_TYPE_ALPHANUMERIC_PASSWORD(?) [IN] (rare).
- * INPUT_TYPE_ALPHANUMERIC_UPPERCASE(?) [IN]
- * INPUT_TYPE_NUMERIC_PASSWORD(?) [IN]
- * For(?) [IN] Example, 5 means only 5 characters can be input in this screen.
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory70Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U8 *message,
- S16 input_type,
- U8 *buffer,
- S32 buffer_size,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 h, fh, len, n;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ADD_SCREEN_STRINGS((3, title, right_softkey, left_softkey));
- ADD_SCREEN_IMAGES((3, title_icon, right_softkey_icon, left_softkey_icon));
- UI_UNUSED_PARAMETER(message);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- /* MTK Elvis 20040104 */
- #ifdef __MMI_ZI__
- ZiInuptMethodEnterSinglelineInputBox();
- #endif
- MMI_menu_shortcut_number = -1;
- MMI_disable_title_shortcut_display = 1;
- clear_category_screen_key_handlers();
- if (title == 0)
- {
- wgui_switch_title_with_status_bar = 1;
- ShowStatusIconsTitle();
- }
- else
- {
- MMI_title_string = get_string(title);
- MMI_title_icon = get_image(title_icon);
- wgui_switch_title_with_status_bar = 0;
- }
- MMI_message_string = (UI_string_type) message;
- len = gui_strlen(MMI_message_string);
- create_multiline_inputbox_set_buffer(MMI_message_string, len, len, 0);
- 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();
- h = 22;
- n = MMI_multiline_inputbox.n_lines;
- if (n > 3)
- {
- n = 3;
- }
- resize_multiline_inputbox(
- MMI_multiline_inputbox.width,
- (n * fh) + MULTILINE_INPUTBOX_HEIGHT_PAD + MMI_multiline_inputbox.text_y);
- move_multiline_inputbox(
- 0,
- (MMI_title_y + MMI_title_height) + (MMI_content_height >> 1) - ((MMI_multiline_inputbox.height + h) >> 1));
- 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();
- wgui_setup_singleline_inputbox(
- 4,
- MMI_multiline_inputbox.y + MMI_multiline_inputbox.height,
- UI_device_width - 8,
- h,
- buffer,
- buffer_size,
- MMI_CATEGORY111_ID,
- get_string(right_softkey),
- get_image(right_softkey_icon),
- input_type,
- history_buffer,
- 0);
- register_hide_multitap(category70_hide_multitap);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- #endif
- ExitCategoryFunction = ExitCategory70Screen;
- RedrawCategoryFunction = RedrawCategory70Screen;
- GetCategoryHistory = GetCategory70History;
- GetCategoryHistorySize = GetCategory70HistorySize;
- RedrawCategory70Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory70Screen
- * DESCRIPTION
- * Exits the category70 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory70Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- set_MMI_current_input_type();
- wgui_switch_title_with_status_bar = 0;
- reset_softkeys();
- reset_multitaps();
- reset_multiline_inputbox();
- wgui_close_singleline_inputbox();
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory70HistorySize
- * DESCRIPTION
- * Gets the size of the history buffer for category70 screen
- * PARAMETERS