wgui_categories.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:657k
源码类别:
MTK
开发平台:
C/C++
- change_cat105_image(get_image(WGUI_VOLUME_LEVEL4));
- break;
- case 4:
- change_cat105_image(get_image(WGUI_VOLUME_LEVEL5));
- break;
- case 5:
- change_cat105_image(get_image(WGUI_VOLUME_LEVEL6));
- break;
- case 6:
- change_cat105_image(get_image(WGUI_VOLUME_LEVEL7));
- break;
- }
- RedrawCategoryFunction();
- #endif /* defined(__MMI_WALLPAPER_ON_BOTTOM__) */
- } /* end of show_vertical_bar */
- /*****************************************************************************
- * FUNCTION
- * show_vertical_bar_previous
- * DESCRIPTION
- * Show volume vertical bar downgraded by 1
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void show_vertical_bar_previous(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- show_vertical_bar(--volume_level_UI);
- }
- /*****************************************************************************
- * FUNCTION
- * show_vertical_bar_next
- * DESCRIPTION
- * Show volume vertical bar upgraded by 1
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void show_vertical_bar_next(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- show_vertical_bar(++volume_level_UI);
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory120Screen
- * DESCRIPTION
- * Exits the Network searching screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory120Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* PMT VIKAS START 20051202 */
- #if defined(__MMI_UI_STATUS_BAR_AT_BOTTOM__)
- //START VIJAY PMT 20060105
- //in_network_search_screen=0;
- reset_status_bar_at_bottom();
- /* END VIJAY PMT 20060105 */
- set_status_icon_bar_clip(0, 0, 0, UI_device_width - 1, MMI_status_bar_height - 1);
- arrange_status_icons();
- #endif /* defined(__MMI_UI_STATUS_BAR_AT_BOTTOM__) */
- /* PMT VIKAS END 20051202 */
- close_main_LCD_dt_display();
- gui_hide_animations();
- reset_softkeys();
- register_hide_status_icon_bar(1, MMI_dummy_function);
- close_status_icons();
- }
- /*****************************************************************************
- * FUNCTION
- * cat_120_hide_date_time_display
- * DESCRIPTION
- * hide function of date/time of category120
- * PARAMETERS
- * x1 [IN] Start x position
- * y1 [IN] Start y position
- * x2 [IN] End x position
- * y2 [IN] End y position
- * RETURNS
- * void
- *****************************************************************************/
- void cat_120_hide_date_time_display(S32 x1, S32 y1, S32 x2, S32 y2)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_filled_area *f = current_MMI_theme->network_screen_background_filler;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_push_clip();
- gdi_layer_set_clip(x1, y1, x2, y2);
- gui_draw_filled_area(0, 0, UI_device_width - 1, UI_device_height - 1, f);
- gdi_layer_pop_clip();
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory120Screen
- * DESCRIPTION
- * Displays the category120 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] Id of message to be displayed
- * message_icon [IN] Id of message image to be displayed
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory120Screen(
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U16 message,
- U16 message_icon,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 l;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- dm_reset_context();
- UI_UNUSED_PARAMETER(history_buffer);
- gdi_layer_lock_frame_buffer();
- MMI_menu_shortcut_number = -1;
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- SetupCategoryKeyHandlers();
- set_main_LCD_dt_date_hide_function(cat_120_hide_date_time_display);
- set_main_LCD_dt_time_hide_function(cat_120_hide_date_time_display);
- /* PMT VIKAS START 20051202 */
- #if defined(__MMI_UI_STATUS_BAR_AT_BOTTOM__)
- set_dt_display(DT_IDLE_SCREEN_2);
- //START VIJAY PMT 20060105
- //in_network_search_screen=1;
- set_status_bar_at_bottom();
- /* END VIJAY PMT 20060105 */
- #else /* defined(__MMI_UI_STATUS_BAR_AT_BOTTOM__) */
- set_dt_display(DT_NETWORK_SEARCH);
- #endif /* defined(__MMI_UI_STATUS_BAR_AT_BOTTOM__) */
- /* PMT VIKAS END 20051202 */
- 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);
- 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);
- dm_add_image(get_image(message_icon), NULL, NULL);
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- /* PMT VIKAS START 20050707 */
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- ShowStatusIconsTitle();
- #else /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- register_hide_status_icon_bar(0, hide_status_icons_bar0);
- register_hide_status_icon_bar(1, hide_status_icons_bar1);
- /* PMT VIKAS START 20051202 */
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- set_status_icon_bar_clip(
- 0,
- 0,
- UI_device_height - 1 - MMI_button_bar_height - MMI_status_bar_height,
- UI_device_width - 1,
- UI_device_height - 1 - MMI_button_bar_height - 1);
- set_status_icon_bar_clip(
- 1,
- UI_device_width - 16,
- MMI_status_bar_height,
- UI_device_width - 1,
- UI_device_height - 1 - MMI_button_bar_height - MMI_status_bar_height - (STATUS_ICON_Y_GAP << 1) - 1);
- arrange_status_icons();
- #else /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- set_status_icon_bar_clip(0, 0, 0, UI_device_width - 1, MMI_status_bar_height - 1);
- #endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- /* PMT VIKAS END 20051202 */
- show_status_icon_bar(0);
- show_status_icon_bar(1);
- #endif /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- /* PMT VIKAS END 20050707 */
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitCategory120Screen;
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY120_ID;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- }
- #ifdef __MMI_BMI__
- /* PMT HIMANSHU START 20051018 */
- /* For properly placing the strings, images and boxes, the screen is divided
- into blocks. */
- #define NUMBER_OF_X_BLOCKS 7
- #define NUMBER_OF_Y_BLOCKS 15
- /* PMT HIMANSHU END 20051018 */
- /* Only used in cat122(BMI) */
- UI_filled_area pinkwgui_pop_up_dialog_background = {UI_FILLED_AREA_TYPE_COLOR,
- UI_NULL_IMAGE,
- NULL,
- {255, 236, 255, 100},
- {0, 0, 0, 0},
- {0, 0, 0, 100},
- {50, 50, 50, 100},
- 0
- };
- /* Used in cat122(BMI) */
- UI_filled_area yellowwgui_pop_up_dialog_background = {UI_FILLED_AREA_TYPE_COLOR | UI_FILLED_AREA_SINGLE_BORDER,
- UI_NULL_IMAGE,
- NULL,
- {249, 244, 171, 100},
- {0, 0, 0, 0},
- {0, 0, 0, 100},
- {50, 50, 50, 100},
- 0
- };
- /* Only used in cat122(BMI) */
- UI_filled_area orangewgui_without_boder_pop_up_dialog_background = {UI_FILLED_AREA_TYPE_COLOR,
- UI_NULL_IMAGE,
- NULL,
- {242, 174, 33, 100},
- {0, 0, 0, 0},
- {0, 0, 0, 100},
- {50, 50, 50, 100},
- 0
- };
- /*****************************************************************************
- * FUNCTION
- * DrawCate122CategoryControlArea
- * DESCRIPTION
- * Draws the category122 category control area
- * PARAMETERS
- * coordinate [IN/OUT] Coordinates of category controlled area.
- * RETURNS
- * void
- *****************************************************************************/
- void DrawCate122CategoryControlArea(dm_coordinates *coordinate)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- RedrawCategory122Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory122Screen
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory122Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 TempHeight; //KP Jerry add for sovling result text algin on 2006-12-31
- S32 fh, fw;
- S32 x1, y1, x2, y2;
- S32 block_size_x = MMI_content_width / NUMBER_OF_X_BLOCKS;
- S32 block_size_y = MMI_content_height / NUMBER_OF_Y_BLOCKS;
- S32 gap_x = (MMI_content_width % NUMBER_OF_X_BLOCKS) >> 1;
- S32 gap_y = (MMI_content_height % NUMBER_OF_Y_BLOCKS) >> 1;
- color c = *current_MMI_theme->title_text_color;
- color bc = *current_MMI_theme->title_text_border_color;//082606 calendar text
- stFontAttribute *f = &MMI_medium_font;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_set_font(f);
- gui_set_text_color(c);
- gui_set_text_border_color(bc);
- gdi_layer_lock_frame_buffer();
- gdi_layer_push_clip();
- gdi_layer_reset_clip();
- wgui_show_transparent_animation();
- y1 = MMI_content_y + gap_y + block_size_y;
- y2 = y1 + (3 * block_size_y) - 1;
- gui_measure_image(_MMI_animated_icon, &fw, &fh);
- x1 = _MMI_animated_icon_x;
- if (fw > 0)
- {
- x1 += (fw + 10);
- }
- gui_measure_string(MMI_message_string, &fw, &fh);
- TempHeight = fh; //KP Jerry add for sovling result text algin on 2006-12-31
- if (r2lMMIFlag)
- {
- gui_move_text_cursor(x1 + fw, y2 - fh);
- }
- else
- {
- gui_move_text_cursor(x1, y2 - fh);
- }
- //gui_print_text(MMI_message_string);
- gui_print_bordered_text(MMI_message_string);
- x1 += fw + 5;
- gui_measure_string((UI_string_type) disp_barstr, &fw, &fh);
- fh = TempHeight; //KP Jerry add for sovling result text algin on 2006-12-31
- if (r2lMMIFlag)
- {
- gui_move_text_cursor(x1 + fw, y2 - fh);
- }
- else
- {
- gui_move_text_cursor(x1, y2 - fh);
- }
- //gui_print_text((UI_string_type) disp_barstr);
- gui_print_bordered_text((UI_string_type) disp_barstr);
- x1 = MMI_content_x + gap_x + (block_size_x / 2);
- y1 = y2 + (block_size_y);
- x2 = x1 + (6 * block_size_x) - 1;
- y2 = y1 + (3 * block_size_y) - 1;
- gui_draw_filled_area(
- x1 + (2 * block_size_x) - 5,
- y1,
- x2 - (2 * block_size_x) + 5,
- y2,
- &yellowwgui_pop_up_dialog_background);
- gui_measure_string((UI_string_type) disp_valuestr, &fw, &fh);
- if (r2lMMIFlag)
- {
- gui_move_text_cursor(x1 + (3 * block_size_x) + (fw >> 1), ((y1 >> 1) + (y2 >> 1)) - (fh >> 1));
- }
- else
- {
- gui_move_text_cursor(x1 + (3 * block_size_x) - (fw >> 1), ((y1 >> 1) + (y2 >> 1)) - (fh >> 1));
- }
- //gui_print_text((UI_string_type) disp_valuestr);
- gui_print_bordered_text((UI_string_type) disp_valuestr);
- x1 = MMI_content_x + gap_x + (block_size_x / 2);
- y1 = MMI_content_y + gap_y + (9 * block_size_y);
- x2 = x1 + (6 * block_size_x);
- y2 = y1 + (3 * block_size_y) - 1;
- gui_draw_filled_area(x1, y1, x2, y2, &yellowwgui_pop_up_dialog_background);
- //gui_draw_vertical_line(y1, y2, x1 + (2 * block_size_x), c);
- //gui_draw_vertical_line(y1, y2, x1 + (4 * block_size_x), c);
- gui_draw_vertical_line(y1, y2, x1 + (2 * block_size_x), yellowwgui_pop_up_dialog_background.border_color);//082606 calendar line
- gui_draw_vertical_line(y1, y2, x1 + (4 * block_size_x), yellowwgui_pop_up_dialog_background.border_color);
- /* wgui_image_clip_x1 stores the percentage value for deciding the position
- of highlighted block. */
- x1 = x1 + (wgui_image_clip_x1 * (2 * block_size_x)) + 1;
- x2 = x1 + (2 * block_size_x) - 2;
- gui_draw_filled_area(x1, y1 + 1, x2, y2 - 1, &orangewgui_without_boder_pop_up_dialog_background);
- x1 = MMI_content_x + gap_x + (block_size_x / 2);
- y1 = y1 + (4 * block_size_y);
- x2 = x1 + (6 * block_size_x) - 1;
- y2 = y1 + block_size_y;
- gui_measure_string((UI_string_type) left_value, &fw, &fh);
- if (r2lMMIFlag)
- {
- gui_move_text_cursor(x1 + (2 * block_size_x) + (fw >> 1), y1);
- }
- else
- {
- gui_move_text_cursor(x1 + (2 * block_size_x) - (fw >> 1), y1);
- }
- //gui_print_text((UI_string_type) left_value);
- gui_print_bordered_text((UI_string_type) left_value);
- gui_measure_string((UI_string_type) right_value, &fw, &fh);
- if (r2lMMIFlag)
- {
- gui_move_text_cursor(x1 + (4 * block_size_x) + (fw >> 1), y1);
- }
- else
- {
- gui_move_text_cursor(x1 + (4 * block_size_x) - (fw >> 1), y1);
- }
- //gui_print_text((UI_string_type) right_value);
- gui_print_bordered_text((UI_string_type) right_value);
- gdi_layer_pop_clip();
- gdi_layer_unlock_frame_buffer();
- gdi_layer_blt_previous(0, 0, UI_device_width - 1, UI_device_height - 1);
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory122Screen
- * DESCRIPTION
- *
- * PARAMETERS
- * title [IN]
- * title_icon [IN]
- * left_softkey [IN]
- * left_softkey_icon [IN]
- * right_softkey [IN]
- * right_softkey_icon [IN]
- * message [IN]
- * percentage_value [IN]
- * history_buffer [?]
- * disp_val [?]
- * bar_status [?]
- * side_icon [IN]
- * left_limit [?]
- * right_limit [?]
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory122Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U16 message,
- S32 percentage_value,
- U8 *history_buffer,
- S8 *disp_val,
- U8 *bar_status,
- U16 side_icon,
- U8 *left_limit,
- U8 *right_limit)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 fw, fh;
- S32 total_width = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(history_buffer);
- 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);
- disp_valuestr = (PU8) disp_val;
- disp_barstr = (PU8) bar_status;
- /* store the percentage value in Global variable, so that is can be used
- in the redraw category. */
- wgui_image_clip_x1 = percentage_value;
- left_value = (PU8) left_limit;
- right_value = (PU8) right_limit;
- gui_measure_string(MMI_message_string, &fw, &fh);
- total_width += fw;
- gui_measure_string((UI_string_type) disp_barstr, &fw, &fh);
- total_width += fw;
- gui_measure_image((PU8) get_image(side_icon), &fw, &fh);
- total_width += fw;
- /* add gaps between image and strings */
- if (fw > 0)
- {
- total_width += (10 + 5);
- }
- else
- {
- total_width += 5;
- }
- wgui_set_animation_y(
- (UI_device_width >> 1) - (total_width >> 1) + (fw >> 1),
- MMI_content_y + ((MMI_content_height % NUMBER_OF_Y_BLOCKS) >> 1) + (4 * (MMI_content_height / NUMBER_OF_Y_BLOCKS)) - 1 - fh,
- side_icon);
- ExitCategoryFunction = ExitCategory122Screen;
- ExitCategoryFunction = UI_dummy_function;
- dm_setup_category_functions(dm_redraw_category_screen, dummy_get_history, dummy_get_history_size);
- dm_register_category_controlled_callback(DrawCate122CategoryControlArea);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY122_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- }
- /* PMT HIMANSHU END 20051018 */
- /*****************************************************************************
- * FUNCTION
- * ExitCategory122Screen
- * DESCRIPTION
- * Exits the category122 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory122Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_hide_animations();
- reset_softkeys();
- }
- #endif /* __MMI_BMI__ */
- #ifdef __MMI_CALORIE__
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- #endif /* __MMI_CALORIE__ */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory184Screen
- * DESCRIPTION
- * Displays the category184 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the Left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * number_of_items [IN] Number of items to be displayed
- * get_item_func [IN] Function pointer to get next displayed items
- * get_hint_func [IN] Function pointer to get next displayed hint data
- * highlighted_item [IN] Index of item to be highlighted
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory184Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- S32 number_of_items,
- GetItemFuncPtr get_item_func,
- GetHintFuncPtr get_hint_func,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ShowCategory185Screen(
- title,
- title_icon,
- left_softkey,
- left_softkey_icon,
- right_softkey,
- right_softkey_icon,
- number_of_items,
- get_item_func,
- get_hint_func,
- highlighted_item,
- MMI_FALSE,
- UI_dummy_function,
- history_buffer);
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory185Screen
- * DESCRIPTION
- * Similar to Category 184 but data caching is disabled in dynamic list menu.
- *
- * Designed for JAM (Java application manager) because Java adopts special architecture.
- * PARAMETERS
- * title [IN]
- * title_icon [IN]
- * left_softkey [IN]
- * left_softkey_icon [IN]
- * right_softkey [IN]
- * right_softkey_icon [IN]
- * number_of_items [IN]
- * get_item_func [IN]
- * get_hint_func [IN]
- * highlighted_item [IN]
- * disable_data_cache [IN] Whether caching of dynamic data is disabled
- * flush_data_callback [IN] Callback function invoked before data is reloaded
- * history_buffer [?]
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory185Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- S32 number_of_items,
- GetItemFuncPtr get_item_func,
- GetHintFuncPtr get_hint_func,
- S32 highlighted_item,
- MMI_BOOL disable_data_cache,
- void (*flush_data_callback) (void),
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 shortcut_width;
- U8 h_flag;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- MMI_title_string = (UI_string_type) get_string(title);
- MMI_title_icon = (PU8) get_image(title_icon);
- MMI_menu_shortcut_number = -1;
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- SetupCategoryKeyHandlers();
- create_fixed_icontext_menuitems();
- MMI_current_menu_type = LIST_MENU;
- resize_fixed_list(MMI_content_width, MMI_content_height);
- associate_fixed_icontext_list();
- if (disable_data_cache)
- {
- MMI_fixed_list_menu.flags |= UI_LIST_MENU_DISABLE_CACHE_DYNAMIC_DATA;
- }
- init_dynamic_item_buffer(number_of_items, get_item_func, get_hint_func, flush_data_callback);
- MMI_fixed_list_menu.n_items = number_of_items;
- register_dynamic_list_shortcut_handler();
- register_dynamic_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(draw_title);
- resize_fixed_icontext_menuitems(0, MMI_MENUITEM_HEIGHT);
- set_fixed_icontext_positions(MMI_ICONTEXT_MENUITEM_HEIGHT + 2, 0, 1, 0);
- register_fixed_list_highlight_handler(dynamic_list_highlight_handler);
- h_flag = set_list_menu_category_history(MMI_CATEGORY184_ID, history_buffer);
- #ifdef __MMI_UI_HINTS_IN_MENUITEM__
- if (get_hint_func)
- {
- if (is_set_force_icon_on_highlight_only_in_menuitem())
- {
- wgui_show_icon_only_highlight_in_icontext_menuitem();
- }
- if (is_set_force_all_hints_in_menuitem())
- {
- wgui_enable_hints_in_icontext_menuitem();
- }
- else if (is_set_force_hints_on_highlight_in_menuitem())
- {
- wgui_enable_hint_highlight_in_icontext_menuitem();
- }
- else
- {
- wgui_enable_hint_highlight_in_icontext_menuitem();
- }
- set_dynamic_pop_up_descriptions(h_flag ? MMI_fixed_list_menu.highlighted_item : highlighted_item); /* ????? */
- #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
- gui_block_list_effect(); /* 072305 Calvin added */
- #endif
- }
- #endif /* __MMI_UI_HINTS_IN_MENUITEM__ */
- dynamic_list_goto_item_no_redraw(h_flag ? MMI_fixed_list_menu.highlighted_item : highlighted_item);
- set_dynamic_pop_up_descriptions(h_flag ? MMI_fixed_list_menu.highlighted_item : highlighted_item); /* ????? */
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitCategory184Screen;
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY184_ID;
- dm_data.s32flags = 0;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- } /* end of ShowCategory184Screen */
- /*****************************************************************************
- * FUNCTION
- * ExitCategory184Screen
- * DESCRIPTION
- * Exits category 184 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory184Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ClearHighlightHandler();
- reset_softkeys();
- reset_menu_shortcut_handler();
- reset_dynamic_list();
- reset_pop_up_descriptions();
- dynamic_item_text_align_left = FALSE;
- #ifdef __MMI_UI_HINTS_IN_MENUITEM__
- reset_all_force_flags_for_hints();
- #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
- gui_unblock_list_effect();
- #endif
- #endif /* __MMI_UI_HINTS_IN_MENUITEM__ */
- }
- /*****************************************************************************
- * Category 284
- *****************************************************************************/
- /*****************************************************************************
- * FUNCTION
- * ShowCategory284Screen
- * DESCRIPTION
- *
- * PARAMETERS
- * title [IN]
- * title_icon [IN]
- * left_softkey [IN]
- * left_softkey_icon [IN]
- * right_softkey [IN]
- * right_softkey_icon [IN]
- * number_of_items [IN]
- * get_item_func [IN]
- * get_hint_func [IN]
- * highlighted_item [IN]
- * history_buffer [?]
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory284Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- S32 number_of_items,
- GetItemFuncPtr get_item_func,
- GetHintFuncPtr get_hint_func,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- dynamic_item_text_align_left = TRUE;
- ShowCategory184Screen(
- title,
- title_icon,
- left_softkey,
- left_softkey_icon,
- right_softkey,
- right_softkey_icon,
- number_of_items,
- get_item_func,
- get_hint_func,
- highlighted_item,
- history_buffer);
- }
- /*****************************************************************************
- * Category 186
- * Dynamic list menu supporting on/off toggling
- *****************************************************************************/
- /* Context of category 186 */
- typedef struct
- {
- /* Array of 0-1 states */
- U8 *states;
- /* callback function to get text */
- pBOOL(*get_text_callback) (S32 item_index, UI_string_type str_buff);
- /* Whether data is modified */
- MMI_BOOL modified;
- } wgui_cat186_context_struct;
- /* Context pointer of category 186 */
- static wgui_cat186_context_struct *wgui_cat186_p;
- /* Function Pointer to save the extra LSK handler function for Category187 */
- FuncPtr wgui_cat_187_lsk_handler = NULL;
- /*****************************************************************************
- * FUNCTION
- * Category186GetItem
- * DESCRIPTION
- * Common dynamic item data callback for Category 186
- * PARAMETERS
- * item_index [IN] Menu item index
- * str_buff [IN] Text buffer
- * img_buff_p [IN] Pointer to image buffer
- * str_img_mask [IN] Mask (unused)
- * RETURNS
- * pBOOL
- *****************************************************************************/
- pBOOL Category186GetItem(S32 item_index, UI_string_type str_buff, PU8 *img_buff_p, U8 str_img_mask)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_ASSERT(wgui_cat186_p);
- UI_UNUSED_PARAMETER(str_img_mask);
- if (wgui_cat186_p->states[item_index])
- {
- *img_buff_p = get_image(CHECKBOX_ON_IMAGE_ID);
- }
- else
- {
- *img_buff_p = get_image(CHECKBOX_OFF_IMAGE_ID);
- }
- return wgui_cat186_p->get_text_callback(item_index, str_buff);
- }
- /*****************************************************************************
- * FUNCTION
- * Category186ToggleCheckBox
- * DESCRIPTION
- * Toggle on/off of the current highlighted checkbox
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void Category186ToggleCheckBox(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 index = GetHighlightedItem();
- U8 state;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_ASSERT(wgui_cat186_p);
- if (wgui_cat186_p->states[index])
- {
- state = wgui_cat186_p->states[index] = 0;
- }
- else
- {
- state = wgui_cat186_p->states[index] = 1;
- }
- if (!wgui_cat186_p->modified)
- {
- wgui_cat186_p->modified = MMI_TRUE;
- ChangeRightSoftkey(WGUI_CATEGORY_DONE_STRING_ID, 0);
- set_right_softkey_function(checkbox_toggle_DONE_RSK_function, KEY_EVENT_UP);
- }
- /* Reload data & invoke list highlight handler */
- dynamic_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
- show_dynamic_list();
- if(wgui_cat_187_lsk_handler != NULL)
- {
- wgui_cat_187_lsk_handler();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * Category186ListHighlightHdlr
- * DESCRIPTION
- * Exit category function for category 186
- * PARAMETERS
- * item_index [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void Category186ListHighlightHdlr(S32 item_index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_ASSERT(wgui_cat186_p);
- if (wgui_cat186_p->states[item_index])
- {
- ChangeLeftSoftkey(WGUI_CATEGORY_OFF_STRING_ID, 0);
- }
- else
- {
- ChangeLeftSoftkey(WGUI_CATEGORY_ON_STRING_ID, 0);
- }
- dynamic_list_highlight_handler(item_index);
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory186History
- * DESCRIPTION
- * Get history data of category 186
- * PARAMETERS
- * history_buffer [IN] Buffer to store history data
- * RETURNS
- * void
- *****************************************************************************/
- U8 *GetCategory186History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_ASSERT(wgui_cat186_p);
- if (wgui_cat186_p->modified)
- {
- *((S32*) history_buffer) = 1;
- }
- else
- {
- *((S32*) history_buffer) = 0;
- }
- get_list_menu_category_history(MMI_CATEGORY186_ID, history_buffer + sizeof(S32));
- return history_buffer;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory186HistorySize
- * DESCRIPTION
- * Get history data of category 186
- * PARAMETERS
- * void
- * RETURNS
- *
- *****************************************************************************/
- S32 GetCategory186HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return sizeof(S32) + get_list_menu_category_history_size();
- }
- /*****************************************************************************
- * FUNCTION
- * SetCategory186History
- * DESCRIPTION
- * Set history data of category 186
- * PARAMETERS
- * history_buffer [IN] Buffer to store history data
- * RETURNS
- * Whether the operation succeeds
- *****************************************************************************/
- U8 SetCategory186History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_ASSERT(wgui_cat186_p);
- if (history_buffer)
- {
- if (*((S32*) history_buffer))
- {
- wgui_cat186_p->modified = MMI_TRUE;
- }
- else
- {
- wgui_cat186_p->modified = MMI_FALSE;
- }
- return set_list_menu_category_history(MMI_CATEGORY186_ID, history_buffer + sizeof(S32));
- }
- else
- {
- return 0;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory186Screen
- * DESCRIPTION
- * Exit category function for category 186
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory186Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_ASSERT(wgui_cat186_p);
- ExitCategory184Screen();
- OslMfree(wgui_cat186_p);
- wgui_cat186_p = NULL;
- }
- #ifdef __MMI_TOUCH_SCREEN__
- /*****************************************************************************
- * FUNCTION
- * Category186MenuItemTranslatePenEvent
- * DESCRIPTION
- * Pen event handler for menu item because we want to emulate twostate menu item
- * with icontext menu item
- *
- * Reference: gui_fixed_twostate_menuitem_translate_pen_event()
- * PARAMETERS
- * item [?]
- * common_item_data [?]
- * item_x [IN]
- * item_y [IN]
- * pen_event [IN]
- * x [IN]
- * y [IN]
- * menuitem_event [?]
- * menuitem_param [?]
- * RETURNS
- * BOOL
- *****************************************************************************/
- BOOL Category186MenuItemTranslatePenEvent(
- void *item,
- void *common_item_data,
- S32 item_x,
- S32 item_y,
- mmi_pen_event_type_enum pen_event,
- S16 x,
- S16 y,
- gui_list_pen_enum *menuitem_event,
- gui_pen_event_param_struct *menuitem_param)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- BOOL ret = MMI_TRUE, pen_inside = MMI_FALSE;
- S32 iwidth, iheight;
- fixed_icontext_menuitem *m = (fixed_icontext_menuitem*) common_item_data;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(item);
- *menuitem_event = GUI_LIST_PEN_NONE;
- GUI_PEN_EVENT_PARAM_SET_VOID(menuitem_param);
- gui_measure_image((PU8) get_image(CHECKBOX_OFF_IMAGE_ID), &iwidth, &iheight);
- item_x += m->icon_x;
- item_y += m->icon_y;
- if (PEN_CHECK_BOUND(x, y, item_x, item_y, iwidth, iheight))
- {
- pen_inside = MMI_TRUE;
- }
- if (pen_event == MMI_PEN_EVENT_DOWN)
- {
- if (!pen_inside)
- {
- /* The following pen events will not be directed to twostate menuitem */
- ret = MMI_FALSE;
- }
- }
- else if (pen_event == MMI_PEN_EVENT_UP)
- {
- if (pen_inside)
- {
- /* Outside of the image, it is not controlled by menuitem */
- *menuitem_event = GUI_TWOSTATE_PEN_TOGGLE;
- }
- }
- return ret;
- }
- #endif /* __MMI_TOUCH_SCREEN__ */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory186Screen
- * DESCRIPTION
- * Displays the category186 screen. A dynamic menu handling on/off toggling.
- * Use SetCheckboxToggleRightSoftkeyFunctions() *before* this function.
- *
- * Reference: ShowCategory185Screen(), ShowCategory140Screen()
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * number_of_items [IN] Number of items to be displayed
- * get_text_callback [IN] Callback function to get the text of menu item
- * get_hint_func [IN] Function pointer to get next displayed hint data
- * list_of_states [IN] On/off states
- * highlighted_item [IN] Index of item to be highlighted
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory186Screen(
- U16 title,
- U16 title_icon,
- S32 number_of_items,
- pBOOL(*get_text_callback) (S32 item_index, UI_string_type str_buff),
- GetHintFuncPtr get_hint_func,
- U8 *list_of_states,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ShowCategory187Screen(
- title,
- title_icon,
- number_of_items,
- get_text_callback,
- get_hint_func,
- list_of_states,
- highlighted_item,
- NULL,
- history_buffer);
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory187Screen
- * DESCRIPTION
- * Displays the category187 screen. A dynamic menu handling on/off toggling.
- * Use SetCheckboxToggleRightSoftkeyFunctions() *before* this function.
- *
- * Reference: ShowCategory185Screen(), ShowCategory140Screen()
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * number_of_items [IN] Number of items to be displayed
- * get_text_callback [IN] Callback function to get the text of menu item
- * get_hint_func [IN] Function pointer to get next displayed hint data
- * list_of_states [IN] On/off states
- * highlighted_item [IN] Index of item to be highlighted
- * lsk_handler_func [IN] This is an extra lsk handler.Needs to be registered to add extra functionality along with toggle.
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory187Screen(
- U16 title,
- U16 title_icon,
- S32 number_of_items,
- pBOOL(*get_text_callback) (S32 item_index, UI_string_type str_buff),
- GetHintFuncPtr get_hint_func,
- U8 *list_of_states,
- S32 highlighted_item,
- FuncPtr lsk_handler_func,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 shortcut_width;
- U8 h_flag;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Setup context */
- if (!wgui_cat186_p)
- {
- wgui_cat186_p = OslMalloc(sizeof(wgui_cat186_context_struct));
- }
- wgui_cat186_p->get_text_callback = get_text_callback;
- wgui_cat186_p->states = list_of_states;
- wgui_cat186_p->modified = MMI_FALSE;
- /* Draw screen */
- gdi_layer_lock_frame_buffer();
- MMI_title_string = (UI_string_type) get_string(title);
- MMI_title_icon = (PU8) get_image(title_icon);
- MMI_menu_shortcut_number = -1;
- change_left_softkey(STR_GLOBAL_ON, 0);
- change_right_softkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetupCategoryKeyHandlers();
- create_fixed_icontext_menuitems();
- MMI_current_menu_type = LIST_MENU;
- resize_fixed_list(MMI_content_width, MMI_content_height);
- associate_fixed_icontext_list();
- #ifdef __MMI_TOUCH_SCREEN__
- gui_set_fixed_list_menu_item_pen_function(
- &MMI_fixed_list_menu,
- Category186MenuItemTranslatePenEvent,
- MMI_FALSE,
- MMI_TRUE);
- #endif /* __MMI_TOUCH_SCREEN__ */
- /* Since we need to change on/off image frequently */
- MMI_fixed_list_menu.flags |= UI_LIST_MENU_DISABLE_CACHE_DYNAMIC_DATA;
- init_dynamic_item_buffer(number_of_items, Category186GetItem, get_hint_func, UI_dummy_function);
- MMI_fixed_list_menu.n_items = number_of_items;
- register_dynamic_list_shortcut_handler();
- register_dynamic_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(draw_title);
- resize_fixed_icontext_menuitems(0, MMI_MENUITEM_HEIGHT);
- set_fixed_icontext_positions(MMI_ICONTEXT_MENUITEM_HEIGHT + 2, 0, 1, 0);
- register_fixed_list_highlight_handler(Category186ListHighlightHdlr);
- h_flag = SetCategory186History(history_buffer);
- #ifdef __MMI_UI_HINTS_IN_MENUITEM__
- if (get_hint_func)
- {
- if (is_set_force_icon_on_highlight_only_in_menuitem())
- {
- wgui_show_icon_only_highlight_in_icontext_menuitem();
- }
- if (is_set_force_all_hints_in_menuitem())
- {
- wgui_enable_hints_in_icontext_menuitem();
- }
- else if (is_set_force_hints_on_highlight_in_menuitem())
- {
- wgui_enable_hint_highlight_in_icontext_menuitem();
- }
- else
- {
- wgui_enable_hint_highlight_in_icontext_menuitem();
- }
- set_dynamic_pop_up_descriptions(h_flag ? MMI_fixed_list_menu.highlighted_item : highlighted_item); /* ????? */
- #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
- gui_block_list_effect();
- #endif
- }
- #endif /* __MMI_UI_HINTS_IN_MENUITEM__ */
- if(lsk_handler_func != NULL)
- {
- wgui_cat_187_lsk_handler = lsk_handler_func;
- }
- else
- {
- wgui_cat_187_lsk_handler = NULL;
- }
- set_left_softkey_function(Category186ToggleCheckBox, KEY_EVENT_UP);
- if (wgui_cat186_p->modified)
- {
- ChangeRightSoftkey(WGUI_CATEGORY_DONE_STRING_ID, 0);
- set_right_softkey_function(checkbox_toggle_DONE_RSK_function, KEY_EVENT_UP);
- }
- else
- {
- ChangeRightSoftkey(STR_GLOBAL_BACK, 0);
- set_right_softkey_function(checkbox_toggle_BACK_RSK_function, KEY_EVENT_UP);
- }
- dynamic_list_goto_item_no_redraw(h_flag ? MMI_fixed_list_menu.highlighted_item : highlighted_item);
- set_dynamic_pop_up_descriptions(h_flag ? MMI_fixed_list_menu.highlighted_item : highlighted_item); /* ????? */
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitCategory186Screen;
- dm_setup_category_functions(dm_redraw_category_screen, GetCategory186History, GetCategory186HistorySize);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY186_ID;
- dm_data.s32flags = 0;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- }
- /*****************************************************************************
- * Category 84
- *****************************************************************************/
- /*****************************************************************************
- * FUNCTION
- * ShowCategory84Screen
- * DESCRIPTION
- * Displays the category84 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the Left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * number_of_items [IN] Number of items to be displayed
- * list_of_items [IN] Array of items to be displayed.
- * list_of_icons [IN] Array of icons to be displayed.
- * flags [IN] Represent the type of the menu. LIST_MENU, MATRIX_MENU
- * highlighted_item [IN] Index of item to be highlighted
- * history_buffer [IN] History buffer
- * Values allowed for these 8 bits are:(?)
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory84Screen(
- 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,
- S32 flags,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 i;
- U8 h_flag, mm_bg_flags;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- create_fixed_icontext_menuitems();
- associate_fixed_icontext_list();
- MMI_disable_title_shortcut_display = 1;
- MMI_fixed_list_menu.flags |= UI_LIST_MENU_LOOP | UI_LIST_MENU_DISABLE_BACKGROUND | UI_LIST_MENU_DISABLE_BKGRND_IN_LAYER;
- ShowListCategoryScreen(
- get_string(title),
- get_image(title_icon),
- get_string(left_softkey),
- get_image(left_softkey_icon),
- get_string(right_softkey),
- get_image(right_softkey_icon),
- number_of_items);
- for (i = 0; i < number_of_items; i++)
- {
- add_fixed_icontext_item((UI_string_type) list_of_items[i], wgui_get_list_menu_icon(i, list_of_icons[i]));
- }
- resize_fixed_icontext_menuitems(0, MMI_MENUITEM_HEIGHT);
- set_fixed_icontext_positions(MMI_ICONTEXT_MENUITEM_HEIGHT + 2, 0, 1, 0);
- MMI_current_menu_type = LIST_MENU;
- h_flag = set_list_menu_category_history(MMI_CATEGORY84_ID, history_buffer);
- if (h_flag)
- {
- fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
- }
- else
- {
- fixed_list_goto_item_no_redraw(highlighted_item);
- }
- gdi_layer_unlock_frame_buffer();
- dm_set_scr_bg_image(IMG_GLOBAL_SUB_MENU_BG_2, NULL, -1, -1, current_MMI_theme->bg_opacity_full);
- dm_get_scr_bg_flag(&mm_bg_flags);
- dm_set_scr_bg_flag(mm_bg_flags | DM_SCR_BG_FORCE_SHOW);
- ExitCategoryFunction = ExitListCategoryScreen;
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY84_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND | DM_NO_STATUS_BAR;;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- } /* end of ShowCategory84Screen */
- /*****************************************************************************
- * FUNCTION
- * SetCategory111RightSoftkeyFunction
- * DESCRIPTION
- * Register RSK function handler of category111 screen
- * PARAMETERS
- * f [IN]
- * k [IN]
- * function(?) [IN] Pointer
- * RETURNS
- * void
- *****************************************************************************/
- void SetCategory111RightSoftkeyFunction(void (*f) (void), MMI_key_event_type k)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(k);
- wgui_singleline_inputbox_RSK_function = f;
- }
- /* filled colr scheme for category111 */
- UI_filled_area PIN_inputbox_BG_filler =
- {
- UI_FILLED_AREA_TYPE_COLOR | UI_FILLED_AREA_SINGLE_BORDER | UI_FILLED_AREA_SHADOW,
- UI_NULL_IMAGE,
- NULL,
- {255, 222, 255, 100},
- {0, 0, 0, 0},
- {255, 0, 0, 100},
- {255, 0, 0, 100},
- 0
- };
- /* theme of single input box of enter pin screen */
- UI_single_line_input_box_theme PIN_singleline_inputbox_theme = { &PIN_inputbox_BG_filler,
- &PIN_inputbox_BG_filler,
- &PIN_inputbox_BG_filler,
- {0, 0, 0, 100},
- {128, 128, 128, 100},
- {0, 0, 0, 100},
- {255, 255, 255, 100},
- {51, 88, 171, 100},
- {255, 0, 0, 100},
- &UI_DEFAULT_FONT,
- 1,
- UI_SINGLE_LINE_INPUT_BOX_CENTER_Y,
- '*'
- };
- #ifdef __MMI_TOUCH_SCREEN__
- S32 passwd_keybd_width;
- S32 passwd_keybd_height;
- /*****************************************************************************
- * FUNCTION
- * DrawCate111CategoryControlArea
- * DESCRIPTION
- * Draws the category111 category control area
- * PARAMETERS
- * coordinate [IN/OUT] Coordinates of category controlled area.
- * RETURNS
- * void
- *****************************************************************************/
- void DrawCate111CategoryControlArea(dm_coordinates *coordinate)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 passwd_keybd_start_x = 0, passwd_keybd_start_y = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_image_get_dimension_id(IMG_PASSWD_KEYBOARD, &passwd_keybd_width, &passwd_keybd_height);
- passwd_keybd_start_x = (UI_device_width - passwd_keybd_width) >> 1;
- passwd_keybd_start_y = UI_device_height - MMI_button_bar_height - 1 - passwd_keybd_height;
- gdi_image_draw(passwd_keybd_start_x, passwd_keybd_start_y, get_image(IMG_PASSWD_KEYBOARD));
- }
- /*****************************************************************************
- * FUNCTION
- * Cate111CategoryControlAreaPenDownHandler
- * DESCRIPTION
- *
- * PARAMETERS
- * point [IN]
- * RETURNS
- *
- *****************************************************************************/
- MMI_BOOL Cate111CategoryControlAreaPenDownHandler(mmi_pen_point_struct point)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 key_number = -1;
- S32 passwd_keybd_start_x = (UI_device_width - passwd_keybd_width) >> 1;
- S32 passwd_keybd_start_y = UI_device_height - MMI_button_bar_height - 1 - passwd_keybd_height;
- S32 offset_x = point.x - passwd_keybd_start_x;
- S32 offset_y = point.y - passwd_keybd_start_y;
- S32 pressed_area_x1 = 0, pressed_area_x2 = 0;
- S32 pressed_area_y1 = 0, pressed_area_y2 = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (MMI_singleline_inputbox.text_length >= MMI_singleline_inputbox.available_length)
- {
- return MMI_FALSE;
- }
- if (offset_x < 0 || offset_y < 0 || offset_x >= passwd_keybd_width || offset_y >= passwd_keybd_height)
- {
- return MMI_FALSE;
- }
- gdi_layer_lock_frame_buffer();
- if (offset_x == passwd_keybd_width - 1)
- {
- key_number = 4;
- }
- else
- {
- key_number = offset_x / (passwd_keybd_width / 5);
- }
- if (offset_y > (passwd_keybd_height >> 1))
- {
- key_number += 5;
- }
- if (key_number < 5)
- {
- pressed_area_x1 = passwd_keybd_start_x + key_number * (passwd_keybd_width / 5);
- pressed_area_x2 = passwd_keybd_start_x + (key_number + 1) * (passwd_keybd_width / 5);
- pressed_area_y1 = passwd_keybd_start_y;
- pressed_area_y2 = passwd_keybd_start_y + (passwd_keybd_height >> 1);
- }
- else
- {
- pressed_area_x1 = passwd_keybd_start_x + (key_number - 5) * (passwd_keybd_width / 5);
- pressed_area_x2 = passwd_keybd_start_x + (key_number - 5 + 1) * (passwd_keybd_width / 5);
- pressed_area_y1 = passwd_keybd_start_y + (passwd_keybd_height >> 1);
- pressed_area_y2 = passwd_keybd_start_y + passwd_keybd_height;
- }
- gdi_layer_push_clip();
- gdi_layer_set_clip(pressed_area_x1, pressed_area_y1, pressed_area_x2, pressed_area_y2);
- gdi_image_draw(passwd_keybd_start_x, passwd_keybd_start_y, get_image(IMG_PASSWD_KEYBOARD_PRESS));
- gdi_layer_pop_clip();
- gdi_layer_unlock_frame_buffer();
- gdi_layer_blt_previous(pressed_area_x1, pressed_area_y1, pressed_area_x2, pressed_area_y2);
- singleline_inputbox_handle_key_down(KEY_0 + key_number);
- return MMI_TRUE;
- }
- /*****************************************************************************
- * FUNCTION
- * Cate111CategoryControlAreaPenUpHandler
- * DESCRIPTION
- *
- * PARAMETERS
- * point [IN]
- * RETURNS
- *
- *****************************************************************************/
- MMI_BOOL Cate111CategoryControlAreaPenUpHandler(mmi_pen_point_struct point)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 passwd_keybd_start_x = (UI_device_width - passwd_keybd_width) >> 1;
- S32 passwd_keybd_start_y = UI_device_height - MMI_button_bar_height - 1 - passwd_keybd_height;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (MMI_singleline_inputbox.text_length > MMI_singleline_inputbox.available_length)
- {
- return MMI_FALSE;
- }
- gdi_layer_lock_frame_buffer();
- gdi_layer_push_clip();
- gdi_layer_set_clip(
- passwd_keybd_start_x,
- passwd_keybd_start_y,
- passwd_keybd_start_x + passwd_keybd_width,
- passwd_keybd_start_y + passwd_keybd_height);
- gdi_image_draw(passwd_keybd_start_x, passwd_keybd_start_y, get_image(IMG_PASSWD_KEYBOARD));
- gdi_layer_pop_clip();
- gdi_layer_unlock_frame_buffer();
- gdi_layer_blt_previous(
- passwd_keybd_start_x,
- passwd_keybd_start_y,
- passwd_keybd_start_x + passwd_keybd_width,
- passwd_keybd_start_y + passwd_keybd_height);
- return MMI_TRUE;
- }
- #endif /* __MMI_TOUCH_SCREEN__ */
- /* START VIJAY PMT 20050930 */
- #ifdef UI_SMALL_PIN_EDITOR_SCREEN
- UI_filled_area small_pin_editor_background_filler;
- /*****************************************************************************
- * FUNCTION
- * cat112_virtual_keypad_callback
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void cat112_virtual_keypad_callback(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if defined(__MMI_TOUCH_SCREEN__)
- mmi_pen_editor_resize_multiline_input_box_for_vk();
- #endif
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory112Screen
- * DESCRIPTION
- * Displays the category112 screen:- main used for enter pin 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] Message
- * input_type [IN] Type of input to use (See the list below)
- * buffer [IN] Buffer the input box should use.
- * buffer_size [IN] Size of the buffer.
- * message2 [?]
- * history_buffer [IN] History buffer INPUT_TYPE_NUMERIC INPUT_TYPE_ALPHANUMERIC_UPPERCASE INPUT_TYPE_ALPHANUMERIC_LOWERCASE INPUT_TYPE_ALPHANUMERIC_SENTENCECASE INPUT_TYPE_NUMERIC_PASSWORD INPUT_TYPE_ALPHANUMERIC_PASSWORD (rare).
- * title_icon(?) [IN] Icon shown with the title
- * title(?) [IN] Title for the screen
- * INPUT_TYPE can take the following values:(?)
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory112Screen(
- 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 *message2,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- color c = *(current_MMI_theme->UI_black_color);
- S32 len;
- S32 single_line_inputbox_height = 22;
- S32 dialog_width = 0, dialog_height = 0, dialog_x = 0, dialog_y = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- #ifdef __MMI_ZI__
- ZiInuptMethodEnterSinglelineInputBox();
- #endif
- #ifdef __MMI_UI_SMALL_SCREEN_SUPPORT__
- set_small_screen();
- /* START VIJAY PMT 20051202 */
- gui_add_cleanup_hook(disable_resized_small_screen);
- /* END VIJAY PMT 20051202 */
- #endif /* __MMI_UI_SMALL_SCREEN_SUPPORT__ */
- hide_status_icon_bar(0);//052906 early status icon
- dialog_height =
- UI_device_height - (MMI_title_y + MMI_title_height + 2 * MMI_SMALL_SCREEN_Y_OFFSET + MMI_button_bar_height);
- dialog_width = UI_device_width - 2 * MMI_SMALL_SCREEN_X_OFFSET;
- dialog_x = MMI_SMALL_SCREEN_X_OFFSET;
- dialog_y = MMI_title_y + MMI_title_height + MMI_SMALL_SCREEN_Y_OFFSET;
- MMI_menu_shortcut_number = -1;
- MMI_disable_title_shortcut_display = 1;
- SetupCategoryKeyHandlers();
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- MMI_message_string = (UI_string_type) message;
- len = gui_strlen(MMI_message_string);
- create_multiline_inputbox_set_buffer(MMI_message_string, len, len, 0);
- small_pin_editor_background_filler = *current_MMI_theme->PIN_screen_background_filler;
- small_pin_editor_background_filler.flags =
- UI_FILLED_AREA_TYPE_COLOR | UI_FILLED_AREA_SINGLE_BORDER | UI_FILLED_AREA_ROUNDED_BORDER;
- MMI_multiline_inputbox.flags |=
- UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW /*| UI_MULTI_LINE_INPUT_BOX_CENTER_JUSTIFY */|//081206 enter pin
- UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND | UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR |
- UI_MULTI_LINE_INPUT_BOX_VIEW_MODE;
- dm_add_string((UI_string_type) message2, &MMI_medium_font, UI_COLOR_BLACK, UI_COLOR_BLACK, NULL);
- dm_data.s32flags = DM_NO_FLAGS;
- wgui_setup_singleline_inputbox(
- dialog_x + 4,
- MMI_multiline_inputbox.y + MMI_multiline_inputbox.height,
- dialog_width - 8,
- single_line_inputbox_height,
- buffer,
- buffer_size,
- MMI_CATEGORY112_ID,
- get_string(right_softkey),
- get_image(right_softkey_icon),
- input_type,
- history_buffer,
- 0);
- gui_set_single_line_input_box_theme(&MMI_singleline_inputbox, &PIN_singleline_inputbox_theme);
- register_hide_multitap(wgui_hide_multitap);
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitCategory112Screen;
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY112_ID;
- dm_data.s32flags |= DM_SHOW_VKPAD;
- dm_add_back_fill_area(&small_pin_editor_background_filler);
- dm_add_rectangle(c, DM_RECTANGLE_FILL_GRAYSCALE);
- dm_setup_data(&dm_data);
- dm_register_vkpad_callback(cat112_virtual_keypad_callback);
- dm_redraw_category_screen();
- } /* end of ShowCategory112Screen */
- /*****************************************************************************
- * FUNCTION
- * ExitCategory112Screen
- * DESCRIPTION
- * Exits category 182 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory112Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_UI_SMALL_SCREEN_SUPPORT__
- reset_small_screen();
- #endif
- show_status_icon_bar(0);//052906 early status icon
- reset_multiline_inputbox();
- set_MMI_current_input_type();
- reset_softkeys();
- reset_multitaps();
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- gui_set_single_line_input_box_current_theme(&MMI_singleline_inputbox);
- wgui_close_singleline_inputbox();
- entry_full_screen();
- }
- #endif /* UI_SMALL_PIN_EDITOR_SCREEN */
- /* END VIJAY PMT 20050930 */
- /* 011706 countdown Calvin Start */
- S32 Cat111CountDownValue;
- FuncPtr Cat111TimerExpireCallBack = UI_dummy_function;
- UI_filled_area pin_editor_background_filler;//083106 pin editor
- /*****************************************************************************
- * FUNCTION
- * SetCat111TimerExpireFunc
- * DESCRIPTION
- * Set cat 111 countdown callback function
- * PARAMETERS
- * f [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void SetCat111TimerExpireFunc(FuncPtr f)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- Cat111TimerExpireCallBack = f;
- }
- /*****************************************************************************
- * FUNCTION
- * Cat111CountDownCallBack
- * DESCRIPTION
- * cat 111 countdown callback function
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- extern UI_font_type UI_font;
- extern color UI_text_color;
- void Cat111CountDownCallBack(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 buf[6];
- UI_font_type saved_font = UI_font;
- color saved_color = UI_text_color;
- S32 count_y;
- S32 sw, sh;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (Cat111CountDownValue == 0)
- {
- StopTimer(POPUP_TIMER);
- if (Cat111TimerExpireCallBack != NULL)
- {
- Cat111TimerExpireCallBack();
- }
- Cat111TimerExpireCallBack = UI_dummy_function;
- }
- else
- {
- gui_itoa(Cat111CountDownValue, (UI_string_type) buf, 10);
- gui_set_font(&MMI_medium_font);
- gui_set_text_color(UI_COLOR_BLACK);
- gui_measure_string((UI_string_type) buf, &sw, &sh);
- #ifdef __MMI_TOUCH_SCREEN__
- count_y = UI_device_height - MMI_button_bar_height - passwd_keybd_height - sh - (UI_device_height / 10);
- #else
- count_y = UI_device_height - MMI_button_bar_height - sh - 1;
- #endif
- gdi_layer_push_clip();
- #if (defined (__MMI_MAINLCD_176X220__)) || (defined (__MMI_MAINLCD_240X320__))//083106 pin editor
- if (wgui_is_wallpaper_on_bottom())
- {
- gdi_draw_solid_rect(0, count_y, UI_device_width - 1, count_y + sh - 1, GDI_COLOR_TRANSPARENT);
- }
- else
- {
- gdi_draw_solid_rect(0, count_y, UI_device_width - 1, count_y + sh - 1, GDI_COLOR_WHITE);
- }
- #else
- gui_draw_filled_area(0, count_y, UI_device_width - 1, count_y + sh - 1, &pin_editor_background_filler);
- #endif
- gui_move_text_cursor((UI_device_width - sw) >> 1, count_y);
- gui_print_text((UI_string_type) buf);
- gdi_layer_pop_clip();
- gui_BLT_double_buffer(0, count_y, UI_device_width - 1, count_y + sh - 1);
- gui_set_font(saved_font);
- gui_set_text_color(saved_color);
- Cat111CountDownValue--;
- StartTimer(POPUP_TIMER, 1000, Cat111CountDownCallBack);
- }
- }
- /* 011706 countdown Calvin End */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory111Screen
- * DESCRIPTION
- * Displays the category111 screen:- main used for enter pin 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] Message
- * input_type [IN] Type of input to use (See the list below)
- * buffer [IN] Buffer the input box should use.
- * buffer_size [IN] Size of the buffer.
- * message2 [?]
- * history_buffer [IN] History buffer INPUT_TYPE_NUMERIC INPUT_TYPE_ALPHANUMERIC_UPPERCASE INPUT_TYPE_ALPHANUMERIC_LOWERCASE INPUT_TYPE_ALPHANUMERIC_SENTENCECASE INPUT_TYPE_NUMERIC_PASSWORD INPUT_TYPE_ALPHANUMERIC_PASSWORD (rare).
- * title_icon(?) [IN] Icon shown with the title
- * title(?) [IN] Title for the screen
- * INPUT_TYPE can take the following values:(?)
- * RETURNS
- * void
- *****************************************************************************/
- /* 011706 countdown Calvin Start */
- void ShowCategory111Screen(
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U16 message,
- S16 input_type,
- U8 *buffer,
- S32 buffer_size,
- U8 *message2,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ShowCategory111Screen_ext(
- left_softkey,
- left_softkey_icon,
- right_softkey,
- right_softkey_icon,
- (U8*) get_string(message),
- input_type,
- buffer,
- buffer_size,
- message2,
- 0,
- history_buffer);
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory111Screen_ext
- * DESCRIPTION
- *
- * PARAMETERS
- * left_softkey [IN]
- * left_softkey_icon [IN]
- * right_softkey [IN]
- * right_softkey_icon [IN]
- * message [?]
- * input_type [IN]
- * buffer [?]
- * buffer_size [IN]
- * message2 [?]
- * duration [IN]
- * history_buffer [?]
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory111Screen_ext(
- 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 *message2,
- S32 duration,
- U8 *history_buffer)
- {
- #ifdef UI_SMALL_PIN_EDITOR_SCREEN
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /* START VIJAY PMT 20051202 */
- if (whether_no_small_screen())
- /* END VIJAY PMT 20051202 */
- {
- ShowCategory112Screen(
- left_softkey,
- left_softkey_icon,
- right_softkey,
- right_softkey_icon,
- message,
- input_type,
- buffer,
- buffer_size,
- message2,
- history_buffer);
- }
- else
- #endif /* UI_SMALL_PIN_EDITOR_SCREEN */
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 h, len;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- dm_reset_context();
- gdi_layer_lock_frame_buffer();
- #ifdef __MMI_ZI__
- ZiInuptMethodEnterSinglelineInputBox();
- #endif
- MMI_menu_shortcut_number = -1;
- MMI_disable_title_shortcut_display = 1;
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- SetupCategoryKeyHandlers();
- ShowStatusIconsTitle();
- #if (!defined (__MMI_MAINLCD_176X220__)) && (!defined (__MMI_MAINLCD_240X320__))
- pin_editor_background_filler = *current_MMI_theme->PIN_screen_background_filler;//083106 pin editor
- pin_editor_background_filler.flags = UI_FILLED_AREA_TYPE_COLOR;
- dm_add_back_fill_area(&pin_editor_background_filler);
- #endif
- /* code added vandana mehtani 09 june for incorporating the message */
- MMI_message_string = (UI_string_type) message;
- len = gui_strlen(MMI_message_string);
- create_multiline_inputbox_set_buffer(MMI_message_string, len, len, 0);
- MMI_multiline_inputbox.flags |=
- (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND |
- UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR | UI_MULTI_LINE_INPUT_BOX_VIEW_MODE);
- h = 22;
- 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);
- gui_set_single_line_input_box_theme(&MMI_singleline_inputbox, &PIN_singleline_inputbox_theme);
- dm_add_string((UI_string_type) message2, &MMI_medium_font, UI_COLOR_BLACK, UI_COLOR_BLACK, NULL);
- register_hide_multitap(wgui_hide_multitap);
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitCategory111Screen;
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- #ifdef __MMI_TOUCH_SCREEN__
- dm_register_category_controlled_callback(DrawCate111CategoryControlArea);
- wgui_register_category_screen_control_area_pen_handlers(
- Cate111CategoryControlAreaPenDownHandler,
- MMI_PEN_EVENT_DOWN);
- wgui_register_category_screen_control_area_pen_handlers(
- Cate111CategoryControlAreaPenUpHandler,
- MMI_PEN_EVENT_UP);
- #endif /* __MMI_TOUCH_SCREEN__ */
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY111_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND | DM_NO_TITLE;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- Cat111CountDownValue = duration;
- if (Cat111CountDownValue != 0)
- {
- Cat111CountDownCallBack();
- }
- }
- } /* end of ShowCategory111Screen */
- /*****************************************************************************
- * FUNCTION
- * ExitCategory111Screen
- * DESCRIPTION
- * Exits category 184 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory111Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- reset_multiline_inputbox();
- set_MMI_current_input_type();
- Cat111TimerExpireCallBack = UI_dummy_function;
- reset_softkeys();
- clear_left_softkey();
- clear_right_softkey();
- reset_multitaps();
- close_status_icons();
- gui_set_single_line_input_box_current_theme(&MMI_singleline_inputbox);
- wgui_close_singleline_inputbox();
- /* START VIJAY PMT 20050930 */
- #ifdef UI_SMALL_LIST_SCREEN
- restore_small_screen();
- #endif
- /* END VIJAY PMT 20050930 */
- }
- #ifdef __MMI_ENGINEER_MODE__
- /*****************************************************************************
- * FUNCTION
- * ShowCategory204Screen
- * DESCRIPTION
- * Displays the category204 screen
- * PARAMETERS
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the Left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * NotificationStringId [IN] Id of string displayed in title
- * value [IN] The value of string displayed in single-line inputbox
- * imageId [IN] Id of image to be displayed.
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory204Screen(
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U16 NotificationStringId,
- U16 value,
- U16 imageId,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- UI_string_type text[5];
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(history_buffer);
- gdi_layer_lock_frame_buffer();
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- SetupCategoryKeyHandlers();
- MMI_title_string = (UI_string_type) get_string(NotificationStringId);
- gui_itoa(value, (UI_string_type) text, 10);
- create_singleline_inputbox_set_buffer(
- (UI_string_type) text,
- gui_strlen((UI_string_type) text) + 1,
- gui_strlen((UI_string_type) text),
- gui_strlen((UI_string_type) text));
- set_singleline_inputbox_mask(0);
- MMI_singleline_inputbox.flags |=
- (UI_SINGLE_LINE_INPUT_BOX_DISABLE_BACKGROUND | UI_SINGLE_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW |
- UI_SINGLE_LINE_INPUT_BOX_CENTER_JUSTIFY);
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitCategory204Screen;
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY204_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- } /* ShowCategory204Screen */
- /*****************************************************************************
- * FUNCTION
- * ExitCategory204Screen
- * DESCRIPTION
- * Exits the category204 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory204Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_hide_animations();
- reset_softkeys();
- reset_singleline_inputbox();
- } /* end of ExitCategory204Screen */
- /* temp solution */
- #ifdef __MMI_DRAW_MANAGER__
- #undef __MMI_DRAW_MANAGER__
- #define __MMI_DIS_DRAW_MANAGER__
- #endif /* __MMI_DRAW_MANAGER__ */
- #ifndef __MMI_DRAW_MANAGER__
- /* 081206 cat205 Start */
- extern PU8 _MMI_animated_icon;
- extern S32 _MMI_animated_icon_x;
- extern S32 _MMI_animated_icon_y;
- /* 081206 cat205 End */
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory205Screen
- * DESCRIPTION
- * redraw category 205
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory205Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- gui_hide_animations();
- clear_screen();
- gdi_layer_push_clip();
- gdi_layer_set_clip(0, 0, UI_device_width - 1, UI_device_height - MMI_button_bar_height - 1);
- gdi_layer_reset_clip();
- //wgui_show_transparent_animation();//081206 cat205
- gdi_image_draw(_MMI_animated_icon_x, _MMI_animated_icon_y, (U8*) _MMI_animated_icon);
- gdi_layer_pop_clip();
- show_multiline_inputbox();
- show_softkey_background();
- show_left_softkey();
- show_right_softkey();
- gdi_layer_unlock_frame_buffer();
- gdi_layer_blt_previous(0, 0, UI_device_width - 1, UI_device_height - 1);
- }
- #endif /* __MMI_DRAW_MANAGER__ */
- /*****************************************************************************
- * FUNCTION
- * ExitCategory205Screen
- * DESCRIPTION
- * Exits the category205 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory205Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_hide_animations();
- reset_softkeys();
- close_status_icons();
- } /* end of ExitCategory205Screen */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory205Screen
- * DESCRIPTION
- * Displays the category205 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] String to be displayed.
- * message_icon [IN] Id of image to be displayed.
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory205Screen(
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- UI_string_type message,
- U16 message_icon,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_DRAW_MANAGER__
- dm_data_struct dm_data;
- #endif
- S32 l, fh;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_DRAW_MANAGER__
- dm_reset_context();
- #endif
- UI_UNUSED_PARAMETER(history_buffer);
- gdi_layer_lock_frame_buffer();
- MMI_menu_shortcut_number = -1;
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- SetupCategoryKeyHandlers();
- MMI_message_string = (UI_string_type) message;
- l = gui_strlen(MMI_message_string);
- create_multiline_inputbox_set_buffer(MMI_message_string, l, l, 0);
- MMI_multiline_inputbox.flags |=
- (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_CENTER_JUSTIFY |
- UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND | UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR);
- gui_set_font(MMI_multiline_inputbox.text_font);
- #ifdef __MMI_DRAW_MANAGER__
- dm_add_image(get_image(message_icon), NULL, NULL);
- #else /* __MMI_DRAW_MANAGER__ */
- move_multiline_inputbox(0, (MMI_title_y + MMI_title_height) + 2);
- resize_multiline_inputbox(MMI_multiline_inputbox.width, MMI_content_height);
- show_multiline_inputbox_no_draw();
- fh = get_multiline_inputbox_line_height();
- resize_multiline_inputbox(
- MMI_multiline_inputbox.width,
- (MMI_multiline_inputbox.n_lines * fh) + MULTILINE_INPUTBOX_HEIGHT_PAD + MMI_multiline_inputbox.text_y);
- wgui_set_animation((UI_device_width >> 1), ((UI_device_height - MMI_button_bar_height) >> 1), message_icon);
- #endif /* __MMI_DRAW_MANAGER__ */
- register_hide_status_icon_bar(0, MMI_dummy_function);
- register_hide_status_icon_bar(1, MMI_dummy_function);
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitCategory205Screen;
- #ifdef __MMI_DRAW_MANAGER__
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY205_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- #else /* __MMI_DRAW_MANAGER__ */
- RedrawCategoryFunction = RedrawCategory205Screen;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- RedrawCategoryFunction();
- #endif /* __MMI_DRAW_MANAGER__ */
- } /* end of ShowCategory205Screen */
- #endif /* __MMI_ENGINEER_MODE__ */
- #ifdef __MMI_DIS_DRAW_MANAGER__
- #define __MMI_DRAW_MANAGER__
- #undef __MMI_DIS_DRAW_MANAGER__
- #endif /* __MMI_DIS_DRAW_MANAGER__ */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory109Screen
- * DESCRIPTION
- * (twostate menuitem with hint, and no LSK function)
- * Displays the category109 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the Left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * number_of_items [IN]
- * list_of_items [IN]
- * list_of_descriptions [IN]
- * highlighted_item [IN]
- * history_buffer [IN] History buffer
- * buffer(?) [IN] Buffer the input box should use
- * buffer_size(?) [IN] Size of the buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory109Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- S32 number_of_items,
- U8 **list_of_items,
- U8 **list_of_descriptions,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 i;
- U8 h_flag;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- create_fixed_twostate_menuitems(get_image(RADIO_ON_IMAGE_ID), get_image(RADIO_OFF_IMAGE_ID));
- associate_fixed_twostate_list();
- ShowListCategoryScreen(
- get_string(title),
- get_image(title_icon),
- get_string(left_softkey),
- get_image(left_softkey_icon),
- get_string(right_softkey),
- get_image(right_softkey_icon),
- number_of_items);
- resize_fixed_twostate_menuitems(0, MMI_MENUITEM_HEIGHT);
- set_fixed_twostate_positions(MMI_MENUITEM_HEIGHT, 0, 1, 0);
- /* Softkeys */
- clear_left_softkey_handler();
- if (list_of_descriptions == NULL)
- {
- for (i = 0; i < number_of_items; i++)
- {
- add_fixed_twostate_item((UI_string_type) list_of_items[i]);
- wgui_pop_up_description_strings[i].text_strings[0] = NULL;
- }
- }
- else
- {
- for (i = 0; i < number_of_items; i++)
- {
- add_fixed_twostate_item((UI_string_type) list_of_items[i]);
- wgui_pop_up_description_strings[i].text_strings[0] = (UI_string_type) list_of_descriptions[i];
- }
- }
- register_fixed_list_highlight_handler(standard_radio_list_highlight_handler);
- h_flag = set_list_menu_category_history(MMI_CATEGORY109_ID, history_buffer);
- if (h_flag)
- {
- fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
- }
- else
- {
- fixed_list_goto_item_no_redraw(highlighted_item);
- }
- select_fixed_twostate_item(MMI_fixed_list_menu.highlighted_item);
- set_pop_up_descriptions(1, number_of_items, MMI_fixed_list_menu.highlighted_item);
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitListCategoryScreen;
- dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY109_ID;
- dm_data.s32flags = 0;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- } /* end of ShowCategory109Screen */
- /*****************************************************************************
- * FUNCTION
- * category88_handle_down_key
- * DESCRIPTION
- * handle key down of category88
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void category88_handle_down_key(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_hide_slide_control_focus();
- if (MMI_current_slide_control == &MMI_slide_control[dm_get_slide_control_count() - 1])
- {
- MMI_current_slide_control = &MMI_slide_control[0];
- }
- else
- {
- MMI_current_slide_control++;
- }
- wgui_slide_control_set_focus(MMI_current_slide_control);
- wgui_show_slide_control_focus();
- } /* end of category88_handle_down_key */
- /*****************************************************************************
- * FUNCTION
- * category88_handle_up_key
- * DESCRIPTION
- * handle key up of category88
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void category88_handle_up_key(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_hide_slide_control_focus();
- if (MMI_current_slide_control == &MMI_slide_control[0])
- {
- MMI_current_slide_control = &MMI_slide_control[dm_get_slide_control_count() - 1];
- }
- else
- {
- MMI_current_slide_control--;
- }
- wgui_slide_control_set_focus(MMI_current_slide_control);
- wgui_show_slide_control_focus();
- } /* end of category88_handle_up_key */
- /*****************************************************************************
- * FUNCTION
- * RegisterCategory88ChangeCallbacks
- * DESCRIPTION
- * register category88 chaneg call back functions
- * PARAMETERS
- * f1 [IN]
- * f2 [IN] Callback2 function pointer
- * f(?) [IN] Callback1 function pointer
- * RETURNS
- * void
- *****************************************************************************/
- void RegisterCategory88ChangeCallbacks(void (*f1) (S32 value), void (*f2) (S32 value))
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/