wgui_categories_ems.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:163k
源码类别:
MTK
开发平台:
C/C++
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- s->n_columns = s->displayed_columns;
- if (s->displayed_rows == 1)
- {
- s->n_columns = s->n_images;
- s->n_rows = 1;
- }
- else if (s->displayed_columns == 1)
- {
- s->n_columns = 1;
- s->n_rows = s->n_images;
- }
- else
- {
- s->n_rows = pixtel_highdivide(s->n_images, s->n_columns);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * small_image_selector_auto_configure
- * DESCRIPTION
- * Function used to auto configure the no. of rows and columns to be displayed depending upon the display area.
- * PARAMETERS
- * s [IN] Small image sleector structure
- * RETURNS
- * void
- *****************************************************************************/
- void small_image_selector_auto_configure(small_image_selector_struct *s)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 show_vbar = 0, show_hbar = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if ((s->n_columns <= 0) && (s->image_width <= 0))
- {
- return;
- }
- if ((s->n_rows <= 0) && (s->image_height <= 0))
- {
- return;
- }
- if (s->n_images == 0)
- {
- return;
- }
- /* Calculate the number of displayed rows and columns */
- s->displayed_rows = s->height / s->image_height;
- s->displayed_columns = s->width / s->image_width;
- small_image_selector_auto_calculate(s);
- if (s->displayed_rows < s->n_rows)
- {
- small_image_selector_auto_calculate(s);
- }
- if ((s->n_rows > s->displayed_rows))
- {
- show_vbar = 1;
- s->flags |= UI_SMALL_IMAGE_SELECTOR_SHOW_VERTICAL_SCROLLBAR;
- }
- if ((s->n_columns > s->displayed_columns))
- {
- show_hbar = 1;
- s->flags |= UI_SMALL_IMAGE_SELECTOR_SHOW_HORIZONTAL_SCROLLBAR;
- }
- if (show_vbar)
- {
- s->width = s->width - s->vbar.width + 1;
- }
- if (show_hbar)
- {
- s->height = s->height - s->hbar.height + 1;
- }
- /* Recalculate the number of rows that can be displayed */
- s->displayed_rows = s->height / s->image_height;
- s->displayed_columns = s->width / s->image_width;
- /* Fix the number of displayed rows and columns */
- if (s->displayed_columns > s->n_columns)
- {
- s->displayed_columns = s->n_columns;
- }
- if (s->displayed_rows > s->n_rows)
- {
- s->displayed_rows = s->n_rows;
- }
- s->h_gap = (s->width - s->displayed_columns * s->image_width) / (s->displayed_columns + 1);
- s->v_gap = (s->height - s->displayed_rows * s->image_height) / (s->displayed_rows + 1);
- if (show_vbar && (!show_hbar))
- {
- gui_resize_vertical_scrollbar(&s->vbar, s->vbar.width, s->height);
- }
- if (show_hbar && (!show_vbar))
- {
- gui_resize_horizontal_scrollbar(&s->hbar, s->width, s->hbar.height);
- }
- if (show_vbar && show_hbar)
- {
- gui_resize_vertical_scrollbar(&s->vbar, s->vbar.width, s->height - s->hbar.height);
- gui_resize_horizontal_scrollbar(&s->hbar, s->width - s->vbar.width, s->hbar.height);
- }
- gui_move_vertical_scrollbar(&s->vbar, s->x + s->width, s->y);
- gui_move_horizontal_scrollbar(&s->hbar, s->x, s->y + s->height);
- }
- /*****************************************************************************
- * FUNCTION
- * small_image_selector_set_up
- * DESCRIPTION
- * set up function for small image selector
- * PARAMETERS
- * s [IN] Small image sleector structure
- * n_images [IN] Total no. of images
- * RETURNS
- * void
- *****************************************************************************/
- void small_image_selector_set_up(small_image_selector_struct *s, S32 n_images)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 x1, x2, y1, y2;
- S32 w, h;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- x1 = MMI_SMALL_SCREEN_X_OFFSET;
- x2 = UI_device_width - MMI_SMALL_SCREEN_X_OFFSET;
- y1 = MMI_title_y + MMI_title_height;
- y2 = UI_device_height - (MMI_button_bar_height + MMI_SMALL_SCREEN_Y_OFFSET);
- category_144_load_object(0);
- gui_EMS_input_box_measure_object(&category_144_current_object, &w, &h);
- s->x = x1;
- s->y = y1;
- s->height = y2 - y1;
- s->width = x2 - x1;
- s->image_height = h;
- s->image_width = w;
- s->n_images = n_images;
- gui_create_vertical_scrollbar(
- &s->vbar,
- s->x + s->width - current_MMI_theme->scrollbar_size - 1,
- s->y + 2,
- current_MMI_theme->scrollbar_size,
- s->height - current_MMI_theme->scrollbar_size - 3);
- gui_create_horizontal_scrollbar(
- &s->hbar,
- s->x + 2,
- s->y + s->height - current_MMI_theme->scrollbar_size - 1,
- s->width - current_MMI_theme->scrollbar_size - 3,
- current_MMI_theme->scrollbar_size);
- small_image_selector_auto_configure(s);
- }
- /* PMT VIKAS END 20051217 */
- /*****************************************************************************
- * FUNCTION
- * redraw_small_image_selector_images
- * DESCRIPTION
- * redraw function for the small image selector screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void redraw_small_image_selector_images(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /* PMT VIKAS START 20051217 */
- S32 i, x, y, w, h, start_x, end_x, end_y, row, col, displayed_column;
- S32 current_row = 0;
- small_image_selector_struct *s = &small_image_selector;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* PMT VIKAS END 20051217 */
- gui_lock_double_buffer();
- gui_draw_filled_area(
- MMI_title_x - 1,
- MMI_title_y-1,//101706 image select
- UI_device_width - MMI_SMALL_SCREEN_X_OFFSET,
- UI_device_height - MMI_button_bar_height - MMI_SMALL_SCREEN_Y_OFFSET + 2,
- /* &small_image_selector_filler */ current_UI_theme->EMS_inputbox_theme->disabled_filler);
- /* PMT VIKAS START 20051217 */
- x = s->x + s->h_gap;
- y = s->y + s->v_gap;
- end_x = s->x + s->width - 1;
- end_y = s->y + s->height - 1;
- /* PMT VIKAS END 20051217 */
- start_x = x;
- /* PMT VIKAS START 20051217 */
- for (row = 0; row < s->n_rows; row++)
- {
- for (col = 0; col < s->n_columns; col++)
- {
- small_image_selector_index[row][col] = col + row * s->n_columns;
- }
- }
- i = s->first_displayed_image;
- row = s->first_displayed_row;
- col = s->first_displayed_column;
- displayed_column = s->displayed_columns;
- for (; i < category_144_object_list_n_items; i = col + row * displayed_column)
- /* PMT VIKAS END 20051217 */
- {
- category_144_goto_item(i);
- gui_EMS_input_box_measure_object(&category_144_current_object, &w, &h);
- /* PMT VIKAS START 20051217 */
- start_x += w;
- /* PMT VIKAS END 20051217 */
- if (start_x > end_x)
- {
- /* PMT VIKAS START 20051217 */
- y += h + s->v_gap;
- current_row++;
- if (y >= end_y || current_row >= s->displayed_rows)
- /* PMT VIKAS END 20051217 */
- {
- break;
- }
- /* PMT VIKAS START 20051217 */
- x = MMI_SMALL_SCREEN_X_OFFSET + s->h_gap;
- /* PMT VIKAS END 20051217 */
- start_x = x + w;
- row++;
- /* PMT VIKAS START 20051217 */
- col = s->first_displayed_column;
- /* PMT VIKAS END 20051217 */
- col++;
- }
- else
- {
- /* PMT VIKAS START 20051217 */
- start_x += s->h_gap;
- /* PMT VIKAS END 20051217 */
- col++;
- }
- if (i == *category_144_object_list_index)
- {
- /* highlight currently selected item */
- gui_draw_rectangle(x - 1, y - 1, x + w, y + h, UI_COLOR_BLACK);
- /* show animation only when the highlight is on it */
- gui_EMS_input_box_display_object(x, y, &category_144_current_object, 1);
- }
- else
- {
- /* show single frame for animation when the highlight is not on it */
- gui_EMS_input_box_display_object(x, y, &category_144_current_object, 0);
- }
- /* PMT VIKAS START 20051217 */
- x += w + s->h_gap;
- /* PMT VIKAS END 20051217 */
- }
- category_144_goto_item(*category_144_object_list_index);
- /* PMT VIKAS START 20051217 */
- if (s->flags & UI_SMALL_IMAGE_SELECTOR_SHOW_VERTICAL_SCROLLBAR)
- {
- gui_set_vertical_scrollbar_range(&s->vbar, s->n_rows);
- gui_set_vertical_scrollbar_scale(&s->vbar, s->displayed_rows);
- gui_set_vertical_scrollbar_value(&s->vbar, s->first_displayed_row);
- gui_show_vertical_scrollbar(&s->vbar);
- }
- if (s->flags & UI_SMALL_IMAGE_SELECTOR_SHOW_HORIZONTAL_SCROLLBAR)
- {
- gui_set_horizontal_scrollbar_range(&s->hbar, s->n_columns);
- gui_set_horizontal_scrollbar_scale(&s->hbar, s->displayed_columns);
- gui_set_horizontal_scrollbar_value(&s->hbar, s->first_displayed_column);
- gui_show_horizontal_scrollbar(&s->hbar);
- }
- /* PMT VIKAS END 20051217 */
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(
- MMI_SMALL_SCREEN_X_OFFSET,
- MMI_title_y,
- UI_device_width - MMI_SMALL_SCREEN_X_OFFSET,
- UI_device_height - MMI_button_bar_height - 5);
- }
- /*****************************************************************************
- * FUNCTION
- * small_image_selector_goto_previous_item
- * DESCRIPTION
- * Selects the previous image in the image selector screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void small_image_selector_goto_previous_item(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 index = *category_144_object_list_index;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- index--;
- if (index < 0)
- {
- index = category_144_object_list_n_items - 1;
- }
- *category_144_object_list_index = index;
- redraw_small_image_selector_images();
- category_144_highlight_handler(index);
- }
- /*****************************************************************************
- * FUNCTION
- * small_image_selector_goto_next_item
- * DESCRIPTION
- * Selects the next image in the image selector screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void small_image_selector_goto_next_item(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 index = *category_144_object_list_index;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- index++;
- if (index > (category_144_object_list_n_items - 1))
- {
- index = 0;
- }
- *category_144_object_list_index = index;
- redraw_small_image_selector_images();
- }
- /*****************************************************************************
- * FUNCTION
- * small_image_selector_compute_row_col
- * DESCRIPTION
- * Calculates the row and column number of the image in the list
- * PARAMETERS
- * index [IN]
- * row [?]
- * col [?]
- * RETURNS
- * void
- *****************************************************************************/
- void small_image_selector_compute_row_col(S32 index, S32 *row, S32 *col)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 r, c;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *row = -1;
- *col = -1;
- MMI_ASSERT(index >= 0 && index < category_144_object_list_n_items);
- /* PMT VIKAS START 20051217 */
- for (r = 0; r < small_image_selector.n_rows; r++)
- {
- for (c = 0; c < small_image_selector.n_columns; c++)
- /* PMT VIKAS END 20051217 */
- {
- if (small_image_selector_index[r][c] == index)
- {
- *row = r;
- *col = c;
- return;
- }
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * small_image_selector_compute_previous_row_image_index
- * DESCRIPTION
- * Calculates the actual index of the image in the list
- * PARAMETERS
- * index [IN]
- * RETURNS
- * S32
- *****************************************************************************/
- S32 small_image_selector_compute_previous_row_image_index(S32 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 row, col, new_index;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_ASSERT(index >= 0 && index < category_144_object_list_n_items);
- small_image_selector_compute_row_col(index, &row, &col);
- MMI_ASSERT(row != -1 || col != -1);
- if (row == 0)
- {
- /* PMT VIKAS START 20051217 */
- if (col + (small_image_selector.n_rows - 1) * small_image_selector.n_columns >= small_image_selector.n_images)
- {
- new_index = small_image_selector.n_images - 1;
- }
- else
- {
- new_index = small_image_selector_index[small_image_selector.n_rows - 1][col];
- }
- if (new_index == -1)
- {
- new_index = small_image_selector_index[small_image_selector.n_rows - 2][col];
- }
- /* PMT VIKAS END 20051217 */
- }
- else
- {
- new_index = small_image_selector_index[row - 1][col];
- }
- return new_index;
- }
- /*****************************************************************************
- * FUNCTION
- * small_image_selector_compute_next_row_image_index
- * DESCRIPTION
- * Calculates the actual index of the image in the list
- * PARAMETERS
- * index [IN]
- * RETURNS
- * S32
- *****************************************************************************/
- S32 small_image_selector_compute_next_row_image_index(S32 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 row, col, new_index;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_ASSERT(index >= 0 && index < category_144_object_list_n_items);
- small_image_selector_compute_row_col(index, &row, &col);
- MMI_ASSERT(row != -1 || col != -1);
- /* PMT VIKAS START 20051217 */
- if (row == small_image_selector.n_rows - 1)
- /* PMT VIKAS END 20051217 */
- {
- new_index = small_image_selector_index[0][col];
- if (new_index == -1)
- {
- new_index = small_image_selector_index[1][col];
- }
- }
- else
- {
- /* PMT VIKAS START 20051217 */
- if ((col + (row + 1) * small_image_selector.n_columns) >= small_image_selector.n_images)
- {
- new_index = small_image_selector.n_images - 1;
- }
- else
- /* PMT VIKAS END 20051217 */
- {
- new_index = small_image_selector_index[row + 1][col];
- }
- if (new_index == -1)
- {
- new_index = small_image_selector_index[0][col];
- }
- }
- return new_index;
- }
- /*****************************************************************************
- * FUNCTION
- * small_image_selector_goto_previous_row
- * DESCRIPTION
- * Calculates the previous row
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void small_image_selector_goto_previous_row(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 index = *category_144_object_list_index, new_index;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- new_index = small_image_selector_compute_previous_row_image_index(index);
- if (new_index < 0)
- {
- new_index = category_144_object_list_n_items - 1;
- }
- *category_144_object_list_index = new_index;
- /* PMT VIKAS START 20051217 */
- small_image_selector_configure_current_display(&small_image_selector, *category_144_object_list_index);
- /* PMT VIKAS END 20051217 */
- redraw_small_image_selector_images();
- category_144_highlight_handler(new_index);
- }
- /*****************************************************************************
- * FUNCTION
- * small_image_selector_goto_next_row
- * DESCRIPTION
- * Calculates the next row
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void small_image_selector_goto_next_row(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 index = *category_144_object_list_index, new_index;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- new_index = small_image_selector_compute_next_row_image_index(index);
- if (new_index > (category_144_object_list_n_items - 1))
- {
- new_index = 0;
- }
- *category_144_object_list_index = new_index;
- /* PMT VIKAS START 20051217 */
- small_image_selector_configure_current_display(&small_image_selector, *category_144_object_list_index);
- /* PMT VIKAS END 20051217 */
- redraw_small_image_selector_images();
- category_144_highlight_handler(new_index);
- }
- /*****************************************************************************
- * FUNCTION
- * small_image_selector_key_handler
- * DESCRIPTION
- * Executes the function depending upon the key pressed
- * PARAMETERS
- * vkey_code [IN]
- * key_state [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void small_image_selector_key_handler(S32 vkey_code, S32 key_state)
- {
- #if(MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32)
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (key_state)
- {
- switch (vkey_code)
- {
- case 37:
- category_144_goto_previous_item(); /* left */
- break;
- case 39:
- category_144_goto_next_item(); /* right */
- break;
- case 38:
- small_image_selector_goto_next_row();
- break;
- case 40:
- small_image_selector_goto_previous_row();
- break;
- }
- }
- #else /* (MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32) */
- UI_UNUSED_PARAMETER(vkey_code);
- UI_UNUSED_PARAMETER(key_state);
- #endif /* (MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32) */
- }
- /*****************************************************************************
- * FUNCTION
- * small_image_selector_goto_item
- * DESCRIPTION
- * Calculates the item based on the index passed
- * PARAMETERS
- * index [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void small_image_selector_goto_item(S32 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (index < 0)
- {
- return;
- }
- if (index > (category_144_object_list_n_items - 1))
- {
- return;
- }
- category_144_load_object(index);
- category_144_highlight_handler(index);
- }
- /*****************************************************************************
- * FUNCTION
- * ExitSmallImageSelectorScreen
- * DESCRIPTION
- * Exit the small image selector screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitSmallImageSelectorScreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EMS_cancel_object_focus();
- close_EMS_objects();
- EMS_view_mode = 0;
- #ifdef __MMI_UI_SMALL_SCREEN_SUPPORT__
- reset_small_screen();
- #endif
- //#ifdef __MMI_WALLPAPER_ON_BOTTOM__//111306 popup title
- title_bg_id = 0;
- //#endif
- show_status_icon_bar(0);//052906 early status icon
- MMI_title_x = MMI_TITLE_X;
- MMI_title_y = MMI_TITLE_Y;
- MMI_title_width = UI_device_width;
- category_144_object_list_index = NULL;
- category_144_object_list_n_items = 0;
- category_144_list_of_titles = NULL;
- category_144_object_list_flags = 0;
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- load_EMS_object_file = NULL;
- entry_full_screen();
- /* 062206 EMS category Start */
- if (category_144_file_data!=NULL)
- {
- mmi_frm_scrmem_free(category_144_file_data);
- category_144_file_data = NULL;
- }
- /* 062206 EMS category Start */
- }
- #ifdef __MMI_TOUCH_SCREEN__
- /*****************************************************************************
- * FUNCTION
- * small_image_selector_pen_down_hdlr
- *
- * DESCRIPTION
- * This is the pen event down handler.
- *
- * PARAMETERS
- * co-ordinates to the point of contact of pen on LCD.
- *
- *
- * RETURNS
- * BOOL
- *
- * GLOBALS AFFECTED
- *
- *****************************************************************************/
- MMI_BOOL small_image_selector_pen_down_hdlr(mmi_pen_point_struct pos)
- {
- if(PEN_CHECK_BOUND(pos.x,pos.y, small_image_selector.x, small_image_selector.y,small_image_selector.width, small_image_selector.height))
- {
- S32 i,x,y,w,h,start_x,end_x,end_y,row,col,displayed_column;
- S32 current_row=0;
- small_image_selector_struct *s = &small_image_selector;
- x = s->x + s->h_gap;
- y = s->y + s->v_gap;
- end_x = s->x + s->width -1;
- end_y = s->y + s->height -1;
- start_x = x;
- i = s->first_displayed_image;
- row = s->first_displayed_row;
- col = s->first_displayed_column;
- displayed_column = s->displayed_columns;
- for(;i<category_144_object_list_n_items;i = col+row*displayed_column)
- {
- /*
- *category_144_object_list_index=i;
- category_144_load_object(i);
- gui_EMS_input_box_measure_object(&category_144_current_object,&w,&h);
- */
- w = s->image_width;
- h = s->image_height;
- start_x+=w;
- if(start_x > end_x)
- {
- y+=h+s->v_gap;
- current_row++;
- if(y>=end_y || current_row>=s->displayed_rows)
- break;
- x = MMI_SMALL_SCREEN_X_OFFSET + s->h_gap;
- start_x = x + w;
- row++;
- col = s->first_displayed_column;
- col++;
- }
- else
- {
- start_x+=s->h_gap;
- col++;
- }
- if(PEN_CHECK_BOUND(pos.x,pos.y,x,y,w,h))
- {
- *category_144_object_list_index = i;
- small_image_selector_configure_current_display(&small_image_selector,*category_144_object_list_index);
- redraw_small_image_selector_images();
- return MMI_TRUE;
- }
- x+=w+s->h_gap;
- }
- }
- return MMI_FALSE;
- }
- /*****************************************************************************
- * FUNCTION
- * small_image_selector_pen_up_hdlr
- *
- * DESCRIPTION
- * This is the pen event up handler.
- *
- * PARAMETERS
- * co-ordinates to the point of contact of pen on LCD.
- *
- *
- * RETURNS
- * BOOL
- *
- * GLOBALS AFFECTED
- *
- *****************************************************************************/
- MMI_BOOL small_image_selector_pen_up_hdlr(mmi_pen_point_struct pos)
- {
- if(PEN_CHECK_BOUND(pos.x,pos.y, small_image_selector.x, small_image_selector.y,small_image_selector.width, small_image_selector.height))
- {
- S32 i,x,y,w,h,start_x,end_x,end_y,row,col,displayed_column;
- S32 current_row=0;
- small_image_selector_struct *s = &small_image_selector;
- x = s->x + s->h_gap;
- y = s->y + s->v_gap;
- end_x = s->x + s->width -1;
- end_y = s->y + s->height -1;
- start_x = x;
- i = s->first_displayed_image;
- row = s->first_displayed_row;
- col = s->first_displayed_column;
- displayed_column = s->displayed_columns;
- for(;i<category_144_object_list_n_items;i = col+row*displayed_column)
- {
- /*
- *category_144_object_list_index=i;
- category_144_load_object(i);
- gui_EMS_input_box_measure_object(&category_144_current_object,&w,&h);
- */
- w = s->image_width;
- h = s->image_height;
- start_x+=w;
- if(start_x > end_x)
- {
- y+=h+s->v_gap;
- current_row++;
- if(y>=end_y || current_row>=s->displayed_rows)
- break;
- x = MMI_SMALL_SCREEN_X_OFFSET + s->h_gap;
- start_x = x + w;
- row++;
- col = s->first_displayed_column;
- col++;
- }
- else
- {
- start_x+=s->h_gap;
- col++;
- }
- if(PEN_CHECK_BOUND(pos.x,pos.y,x,y,w,h))
- {
- *category_144_object_list_index = i;
- small_image_selector_configure_current_display(&small_image_selector,*category_144_object_list_index);
- PreviewEmsObjectIsDone();
- return MMI_TRUE;
- }
- x+=w+s->h_gap;
- }
- }
- return MMI_FALSE;
- }
- /*****************************************************************************
- * FUNCTION
- * small_image_selector_pen_move_hdlr
- *
- * DESCRIPTION
- * This is the pen event move handler.
- *
- * PARAMETERS
- * co-ordinates to the point of contact of pen on LCD.
- *
- *
- * RETURNS
- * BOOL
- *
- * GLOBALS AFFECTED
- *
- *****************************************************************************/
- MMI_BOOL small_image_selector_pen_move_hdlr(mmi_pen_point_struct pos)
- {
- if(PEN_CHECK_BOUND(pos.x,pos.y, small_image_selector.x, small_image_selector.y,small_image_selector.width, small_image_selector.height))
- {
- S32 i,x,y,w,h,start_x,end_x,end_y,row,col,displayed_column;
- S32 current_row=0;
- small_image_selector_struct *s = &small_image_selector;
- x = s->x + s->h_gap;
- y = s->y + s->v_gap;
- end_x = s->x + s->width -1;
- end_y = s->y + s->height -1;
- start_x = x;
- i = s->first_displayed_image;
- row = s->first_displayed_row;
- col = s->first_displayed_column;
- displayed_column = s->displayed_columns;
- for(;i<category_144_object_list_n_items;i = col+row*displayed_column)
- {
- /*
- *category_144_object_list_index=i;
- category_144_load_object(i);
- gui_EMS_input_box_measure_object(&category_144_current_object,&w,&h);
- */
- w = s->image_width;
- h = s->image_height;
- start_x+=w;
- if(start_x > end_x)
- {
- y+=h+s->v_gap;
- current_row++;
- if(y>=end_y || current_row>=s->displayed_rows)
- break;
- x = MMI_SMALL_SCREEN_X_OFFSET + s->h_gap;
- start_x = x + w;
- row++;
- col = s->first_displayed_column;
- col++;
- }
- else
- {
- start_x+=s->h_gap;
- col++;
- }
- if(PEN_CHECK_BOUND(pos.x,pos.y,x,y,w,h))
- {
- *category_144_object_list_index = i;
- small_image_selector_configure_current_display(&small_image_selector,*category_144_object_list_index);
- redraw_small_image_selector_images();
- return MMI_TRUE;
- }
- x+=w+s->h_gap;
- }
- }
- return MMI_FALSE;
- }
- #endif
- /*****************************************************************************
- * FUNCTION
- * RedrawSmallImageSelectorScreen
- * DESCRIPTION
- * Redraws the image selector screen for the small screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawSmallImageSelectorScreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- //color c = {200, 200, 200, 100};//120406 warning remove
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_greyscale_rectangle(
- 0,
- 0,
- UI_device_width - 1,
- UI_device_height - 1,
- MMI_BG_GREYSCALE_VALUE,
- MMI_BG_GREYSCALE_BLACK_VALUE);
- gui_set_clip(0, MMI_title_y, UI_device_width - 1, UI_device_height - 1);
- gui_lock_double_buffer();
- gui_hide_animations();
- draw_title();
- show_softkey_background();
- show_left_softkey();
- show_right_softkey();
- /* PMT VIKAS START 20051217 */
- small_image_selector_set_up(&small_image_selector, category_144_object_list_n_items);
- /* PMT VIKAS END 20051217 */
- redraw_small_image_selector_images();
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
- }
- /*----------------------------------------------------------------------------
- Function: ShowImageSelectorScreen
- Description: Displays the object list screen
- Input Parameters:[1] S8* title, Title for the screen
- [2] U16 title_icon Icon shown with the title
- [3] U16 left_softkey, Left softkey label
- [4] U16 left_softkey_icon, Icon for the left softkey
- [5] U16 right_softkey, Right softkey label
- [6] U16 right_softkey_icon, Icon for the right softkey
- [7] U32 object type flags
- [8] S32 number of objects in the list
- [9] U8** list of object titles
- [10] U16* ist of predefined objects (EMS specific IDs)
- [11] U8** list of user defined objects (list of EMS data)
- [12] S32 * index highlighted item index
- [13] U8* history_buffer history buffer
- Output Parameters: none
- Returns: void
- ----------------------------------------------------------------------------*/
- /*****************************************************************************
- * FUNCTION
- * dm_category_144_controlled_area
- * DESCRIPTION
- * This function is used to draw the category controlled area of idle screen
- * PARAMETERS
- * coordinate [IN/OUT] Coordinates of category controlled area.
- * RETURNS
- * void
- *****************************************************************************/
- void dm_category_144_controlled_area(dm_coordinates *coordinate)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* PMT VIKAS START 20051217 */
- small_image_selector_set_up(&small_image_selector, category_144_object_list_n_items);
- /* PMT VIKAS END 20051217 */
- redraw_small_image_selector_images();
- }
- /*****************************************************************************
- * FUNCTION
- * ShowImageSelectorScreen
- * DESCRIPTION
- *
- * PARAMETERS
- * title [?]
- * title_icon [IN]
- * left_softkey [IN]
- * left_softkey_icon [IN]
- * right_softkey [IN]
- * right_softkey_icon [IN]
- * object_type [IN]
- * n_items [IN]
- * object_titles [IN]
- * predefined_objects [?]
- * userdefined_objects [IN]
- * index [?]
- * history_buffer [?]
- * RETURNS
- * void
- *****************************************************************************/
- void ShowImageSelectorScreen(
- S8 *title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U32 object_type,
- S32 n_items,
- U8 **object_titles,
- U16 *predefined_objects,
- U8 **userdefined_objects,
- S32 *index,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- color c = *(current_MMI_theme->UI_black_color);
- U8 h_flag;
- MMI_disable_title_shortcut_display = 1;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_title_x = MMI_SMALL_SCREEN_X_OFFSET + 1;
- MMI_title_y = MMI_title_y + MMI_title_height + MMI_SMALL_SCREEN_Y_OFFSET;
- MMI_title_width = UI_device_width - 2 * MMI_SMALL_SCREEN_X_OFFSET - 1;
- #ifdef __MMI_UI_SMALL_SCREEN_SUPPORT__
- set_small_screen();
- gui_add_cleanup_hook(disable_resized_small_screen);
- #endif /* __MMI_UI_SMALL_SCREEN_SUPPORT__ */
- hide_status_icon_bar(0);//052906 early status icon
- #if (defined(MMI_ON_HARDWARE_P) && defined(__MMI_FILE_MANAGER__))
- if (object_type & CATEGORY144_FMGR_PREVIEW)
- {
- S32 str_len;
- S32 i;
- S8 buf_filename_no_ext[(FMGR_MAX_FILE_LEN + 1) * ENCODING_LENGTH];
- MMI_disable_title_shortcut_display = 1;
- index = &category_144_object_list_default_index;
- if (predefined_objects == NULL)
- {
- GoBackToHistory(SCR_ID_MSG_EMS_INSERT_OBJECT);
- return;
- }
- else
- {
- U32 errorCode = 0;
- FILE_HANDLE emsObjectFilePtr = NULL;
- U32 filesize = 0;
- S8 *filename = (S8*) predefined_objects;
- str_len = pfnUnicodeStrlen((S8*) filename);
- /* find file name - by finding "\" */
- for (i = str_len * 2 - 2; i >= 2; i -= 2)
- {
- if (pfnUnicodeStrncmp((PS8) & filename[i], (PS8) L"\", 1) == 0)
- {
- i += 2;
- break;
- }
- }
- pfnUnicodeStrcpy((PS8) buf_filename_no_ext, (PS8) (&(filename[i])));
- ChangeTitle(title_icon, (PU8) (buf_filename_no_ext));
- userdefined_objects = category_144_data_ptr;
- /* 062206 EMS category Start */
- category_144_file_data = mmi_frm_scrmem_alloc(CAT_144_DATA_FILE_SIZE);
- MMI_ASSERT(category_144_file_data != NULL);
- //memset(&category_144_file_data, 0, 1600);
- memset(category_144_file_data, 0, CAT_144_DATA_FILE_SIZE);
- /* 062206 EMS category Start */
- emsObjectFilePtr = pfopen((S8*) predefined_objects, PFS_READ);
- if (!pfOpenError(emsObjectFilePtr))
- {
- filesize = GetFSFileSize(emsObjectFilePtr);
- if (filesize > 1600 /* bytes */ )
- {
- pfclose(emsObjectFilePtr);
- userdefined_objects[0] = NULL;
- }
- pfread(category_144_file_data, 1, filesize, emsObjectFilePtr, &errorCode);
- pfclose(emsObjectFilePtr);
- if (pfError(errorCode))
- {
- userdefined_objects[0] = NULL;
- }
- else
- {
- userdefined_objects[0] = category_144_file_data;
- }
- }
- else
- {
- userdefined_objects[0] = NULL;
- }
- }
- }
- #endif /* (defined(MMI_ON_HARDWARE_P) && defined(__MMI_FILE_MANAGER__)) */
- /* PMT VIKAS START 20051217 */
- if (!history_buffer)
- {
- associate_small_image_selector(&small_image_selector);
- }
- /* PMT VIKAS END 20051217 */
- gdi_layer_lock_frame_buffer();
- initialize_EMS_objects();
- EMS_view_mode = 1;
- category_144_object_file_flag = 0;
- category_144_object_list_flags = object_type;
- category_144_current_object.data = &category_144_current_object_data;
- category_144_autodetect_object_type = 0;
- switch (object_type & 0x0f)
- {
- /* small screen is only applicable to picture and animation */
- case EMS_PREDEFINED_PICTURE:
- category_144_current_object.Type = EMS_TYPE_PIC;
- category_144_object_file_flag = 1;
- break;
- case EMS_USERDEFINED_PICTURE:
- category_144_current_object.Type = EMS_TYPE_PIC;
- category_144_object_file_flag = 1;
- break;
- case EMS_PREDEFINED_ANIMATION:
- category_144_current_object.Type = EMS_TYPE_PREDEF_ANM;
- break;
- case EMS_USERDEFINED_ANIMATION:
- category_144_current_object.Type = EMS_TYPE_USERDEF_ANM;
- category_144_object_file_flag = 1;
- break;
- default:
- MMI_ASSERT(0);
- break;
- }
- clear_left_softkey();
- clear_right_softkey();
- SetupCategoryKeyHandlers();
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- MMI_title_icon = get_image(title_icon);
- if (!((object_type & CATEGORY144_FMGR_PREVIEW) && (!(object_type & CATEGORY144_EMAIL_PREVIEW))))
- {
- MMI_title_string = (UI_string_type) title;
- }
- category_144_object_list_index = index;
- category_144_userdefined_objects = userdefined_objects;
- category_144_predefined_objects = predefined_objects;
- h_flag = set_object_list_category_history(MMI_CATEGORY146_ID, history_buffer, category_144_object_list_index);
- if (h_flag)
- {
- *index = *category_144_object_list_index;
- }
- category_144_object_list_n_items = n_items;
- if (*index < 0)
- {
- *index = 0;
- }
- if (*index >= n_items)
- {
- *index = n_items - 1;
- }
- if ((!(object_type & CATEGORY144_DISABLE_PREVIEW)) && (!(object_type & CATEGORY144_FMGR_PREVIEW)))
- {
- register_keyboard_key_handler(small_image_selector_key_handler);
- SetKeyHandler(small_image_selector_goto_previous_row, KEY_UP_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(small_image_selector_goto_next_row, KEY_DOWN_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(category_144_goto_previous_item, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(category_144_goto_next_item, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(small_image_selector_goto_previous_row, KEY_VOL_UP, KEY_EVENT_DOWN);
- SetKeyHandler(small_image_selector_goto_next_row, KEY_VOL_DOWN, KEY_EVENT_DOWN);
- }
- //#ifdef __MMI_WALLPAPER_ON_BOTTOM__//110306 popup title
- title_bg_id = IMG_FLEXIBLE_TITLEBAR_BG;
- //#endif
- gdi_layer_unlock_frame_buffer();
- if (!(object_type & CATEGORY144_DISABLE_PREVIEW))
- {
- ExitCategoryFunction = ExitSmallImageSelectorScreen;
- dm_setup_category_functions(dm_redraw_category_screen, GetCategory146History, GetCategory144HistorySize);
- dm_register_category_controlled_callback(DrawCate144CategoryControlArea);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY146_ID;
- dm_data.s32flags = DM_NO_FLAGS /* DM_CLEAR_SCREEN_BACKGROUND */ ;
- dm_add_rectangle(c, DM_RECTANGLE_FILL_GRAYSCALE);
- dm_setup_data(&dm_data);
- dm_register_category_controlled_callback(dm_category_144_controlled_area);
- dm_redraw_category_screen();
- }
- #ifdef __MMI_TOUCH_SCREEN__
- wgui_register_category_screen_control_area_pen_handlers(small_image_selector_pen_down_hdlr, MMI_PEN_EVENT_DOWN);
- wgui_register_category_screen_control_area_pen_handlers(small_image_selector_pen_up_hdlr, MMI_PEN_EVENT_UP);
- wgui_register_category_screen_control_area_pen_handlers(small_image_selector_pen_move_hdlr, MMI_PEN_EVENT_MOVE);
- #endif
- }
- #endif /* UI_SMALL_IMAGE_SELECTOR_SCREEN */
- /* END VIJAY PMT 20050930 */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory144Screen
- * DESCRIPTION
- * Displays the object list screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * object_type [IN]
- * n_items [IN]
- * object_titles [IN]
- * predefined_objects [?]
- * is_short_name [IN]
- * userdefined_objects [IN]
- * index [?]
- * history_buffer [IN] History buffer
- * INT(?) [IN] * highlighted item index
- * STRING(?) [IN] * list of object titles
- * list(?) [IN] Of user defined objects (list of EMS data)
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory144Screen(
- U8 *title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U32 object_type,
- S32 n_items,
- U8 **object_titles,
- U16 *predefined_objects,
- MMI_BOOL is_short_name,
- U8 **userdefined_objects,
- S32 *index,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 shortcut_width;
- U8 h_flag;
- MMI_menu_shortcut_number = -1;
- MMI_disable_title_shortcut_display = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if (defined(MMI_ON_HARDWARE_P) && defined(__MMI_FILE_MANAGER__))
- if (object_type & CATEGORY144_FMGR_PREVIEW)
- {
- S32 str_len;
- S32 i;
- S8 buf_filename_no_ext[(FMGR_MAX_FILE_LEN + 1) * ENCODING_LENGTH];
- MMI_disable_title_shortcut_display = 1;
- index = &category_144_object_list_default_index;
- if (predefined_objects == NULL)
- {
- GoBackToHistory(SCR_ID_MSG_EMS_INSERT_OBJECT);
- return;
- }
- else
- {
- U32 errorCode = 0;
- FILE_HANDLE emsObjectFilePtr = NULL;
- U32 filesize = 0;
- S8 *filename = (S8*) predefined_objects;
- str_len = pfnUnicodeStrlen((S8*) filename);
- /* find file name - by finding "\" */
- for (i = str_len * 2 - 2; i >= 2; i -= 2)
- {
- if (pfnUnicodeStrncmp((PS8) & filename[i], (PS8) L"\", 1) == 0)
- {
- i += 2;
- break;
- }
- }
- #ifdef MMI_ON_HARDWARE_P
- if (is_short_name)
- {
- mmi_chset_mixed_text_to_ucs2_str(
- (U8*) buf_filename_no_ext,
- (MAX_SUBMENU_CHARACTERS - 1) * ENCODING_LENGTH,
- (U8*) & filename[i],
- PhnsetGetDefEncodingType());
- }
- else
- #endif /* MMI_ON_HARDWARE_P */
- pfnUnicodeStrcpy((PS8) buf_filename_no_ext, (PS8) (&(filename[i])));
- ChangeTitle(title_icon, (PU8) (buf_filename_no_ext));
- userdefined_objects = category_144_data_ptr;
- /* 062206 EMS category Start */
- category_144_file_data = mmi_frm_scrmem_alloc(CAT_144_DATA_FILE_SIZE);
- MMI_ASSERT(category_144_file_data != NULL);
- //memset(&category_144_file_data, 0, 1600);
- memset(category_144_file_data, 0, CAT_144_DATA_FILE_SIZE);
- /* 062206 EMS category Start */
- emsObjectFilePtr = pfopen((S8*) predefined_objects, PFS_READ);
- if (!pfOpenError(emsObjectFilePtr))
- {
- filesize = GetFSFileSize(emsObjectFilePtr);
- if (filesize > 1600 /* bytes */ )
- {
- pfclose(emsObjectFilePtr);
- userdefined_objects[0] = NULL;
- }
- pfread(category_144_file_data, 1, filesize, emsObjectFilePtr, &errorCode);
- pfclose(emsObjectFilePtr);
- if (pfError(errorCode))
- {
- userdefined_objects[0] = NULL;
- }
- else
- {
- userdefined_objects[0] = category_144_file_data;
- }
- }
- else
- {
- userdefined_objects[0] = NULL;
- }
- }
- }
- #endif /* (defined(MMI_ON_HARDWARE_P) && defined(__MMI_FILE_MANAGER__)) */
- gdi_layer_lock_frame_buffer();
- initialize_EMS_objects();
- EMS_view_mode = 1;
- category_144_object_file_flag = 0;
- category_144_object_list_flags = object_type;
- category_144_current_object.data = &category_144_current_object_data;
- category_144_autodetect_object_type = 0;
- switch (object_type & 0x0f)
- {
- case EMS_PREDEFINED_PICTURE:
- category_144_current_object.Type = EMS_TYPE_PIC;
- category_144_object_file_flag = 1;
- break;
- case EMS_USERDEFINED_PICTURE:
- category_144_current_object.Type = EMS_TYPE_PIC;
- category_144_object_file_flag = 1;
- break;
- case EMS_PREDEFINED_ANIMATION:
- category_144_current_object.Type = EMS_TYPE_PREDEF_ANM;
- break;
- case EMS_USERDEFINED_ANIMATION:
- category_144_current_object.Type = EMS_TYPE_USERDEF_ANM;
- category_144_object_file_flag = 1;
- break;
- case EMS_PREDEFINED_SOUND:
- category_144_current_object.Type = EMS_TYPE_PREDEF_SND;
- break;
- /* MTK Joy added for customization, 1014 */
- #if defined(__MMI_IMELODY_SUPPORT__)
- case EMS_PREDEFINED_MELODY:
- category_144_current_object.Type = EMS_TYPE_USERDEF_SND;
- category_144_object_file_flag = 1;
- break;
- case EMS_USERDEFINED_MELODY:
- category_144_current_object.Type = EMS_TYPE_USERDEF_SND;
- category_144_object_file_flag = 1;
- break;
- #endif /* defined(__MMI_IMELODY_SUPPORT__) */
- /* MTK end */
- default:
- category_144_autodetect_object_type = 1;
- break;
- }
- clear_left_softkey();
- clear_right_softkey();
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- SetupCategoryKeyHandlers();
- MMI_title_icon = get_image(title_icon);
- if (!((object_type & CATEGORY144_FMGR_PREVIEW) && (!(object_type & CATEGORY144_EMAIL_PREVIEW))))
- {
- MMI_title_string = (UI_string_type) title;
- }
- category_144_object_list_index = index;
- category_144_userdefined_objects = userdefined_objects;
- category_144_predefined_objects = predefined_objects;
- h_flag = set_object_list_category_history(MMI_CATEGORY144_ID, history_buffer, category_144_object_list_index);
- if (h_flag)
- {
- *index = *category_144_object_list_index;
- }
- category_144_object_list_n_items = n_items;
- if (*index < 0)
- {
- *index = 0;
- }
- if (*index >= n_items)
- {
- *index = n_items - 1;
- }
- category_144_load_object(*index);
- MMI_menu_shortcut_number = *index + 1;
- category_144_object_list_index = index;
- if ((!(object_type & CATEGORY144_DISABLE_PREVIEW)) && (!(object_type & CATEGORY144_FMGR_PREVIEW)))
- {
- gui_create_vertical_scrollbar(
- &category144_vbar,
- UI_device_width - current_MMI_theme->scrollbar_size,
- (MMI_title_y + MMI_title_height),
- current_MMI_theme->scrollbar_size,
- MMI_content_height);
- register_fixed_list_shortcut_handler();
- shortcut_width = set_menu_item_count(n_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);
- register_keyboard_key_handler(category_144_key_handler);
- register_menu_shortcut_keys();
- register_menu_shortcut_handler(category_144_goto_item);
- SetKeyHandler(category_144_goto_previous_item, KEY_UP_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(category_144_goto_next_item, KEY_DOWN_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(category_144_goto_previous_item, KEY_VOL_UP, KEY_EVENT_DOWN);
- SetKeyHandler(category_144_goto_next_item, KEY_VOL_DOWN, KEY_EVENT_DOWN);
- }
- gdi_layer_unlock_frame_buffer();
- if (!(object_type & CATEGORY144_DISABLE_PREVIEW))
- {
- ExitCategoryFunction = ExitCategory144Screen;
- dm_setup_category_functions(dm_redraw_category_screen, GetCategory144History, GetCategory144HistorySize);
- dm_register_category_controlled_callback(DrawCate144CategoryControlArea);
- #ifdef __MMI_TOUCH_SCREEN__
- wgui_register_category_screen_control_area_pen_handlers(category_144_pen_down_hdlr, MMI_PEN_EVENT_DOWN);
- wgui_register_category_screen_control_area_pen_handlers(category_144_pen_up_hdlr, MMI_PEN_EVENT_UP);
- wgui_register_category_screen_control_area_pen_handlers(category_144_pen_move_hdlr, MMI_PEN_EVENT_MOVE);
- wgui_register_category_screen_control_area_pen_handlers(category_144_pen_repeat_hdlr, MMI_PEN_EVENT_REPEAT);
- #endif /* __MMI_TOUCH_SCREEN__ */
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY144_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory144Screen
- * DESCRIPTION
- * Exits the object list screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory144Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EMS_cancel_object_focus();
- close_EMS_objects();
- reset_menu_shortcut_handler();
- EMS_view_mode = 0;
- category_144_object_list_index = NULL;
- category_144_object_list_n_items = 0;
- category_144_list_of_titles = NULL;
- category_144_object_list_flags = 0;
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- load_EMS_object_file = NULL;
- /* 062206 EMS category Start */
- if (category_144_file_data!=NULL)
- {
- mmi_frm_scrmem_free(category_144_file_data);
- category_144_file_data = NULL;
- }
- /* 062206 EMS category Start */
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory144HistorySize
- * DESCRIPTION
- * Gets the history buffer size for the object list screen
- * PARAMETERS
- * void
- * RETURNS
- * size in U8s of the history buffer
- *****************************************************************************/
- S32 GetCategory144HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (sizeof(object_list_category_history));
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory144History
- * DESCRIPTION
- * Gets the history buffer for the object list screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer into which the history data is stored
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory144History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- get_object_list_category_history(MMI_CATEGORY144_ID, history_buffer, category_144_object_list_index);
- return (history_buffer);
- }
- #if defined UI_SMALL_IMAGE_SELECTOR_SCREEN
- /*****************************************************************************
- * FUNCTION
- * GetCategory146History
- * DESCRIPTION
- * Gets the history buffer for the object list screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer into which the history data is stored
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory146History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- get_object_list_category_history(MMI_CATEGORY146_ID, history_buffer, category_144_object_list_index);
- return (history_buffer);
- }
- #endif /* defined UI_SMALL_IMAGE_SELECTOR_SCREEN */
- EMSObjData EMS_playback_object_data;
- EMSObject EMS_playback_object;
- /*****************************************************************************
- * FUNCTION
- * EMSObjectPlayback
- * DESCRIPTION
- *
- * PARAMETERS
- * object_type [IN]
- * data [?]
- * index [IN]
- * RETURNS
- *
- *****************************************************************************/
- EMSTATUS EMSObjectPlayback(U32 object_type, U8 *data, S32 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- EMSTATUS r = EMS_load_object(object_type, data, index, &EMS_playback_object_data);
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EMS_cancel_object_focus();
- if (r != EMS_OK)
- {
- return (r);
- }
- EMS_playback_object.data = &EMS_playback_object_data;
- EMS_playback_object.prev = NULL;
- EMS_playback_object.next = NULL;
- EMS_playback_object.OffsetToText = 0;
- EMS_playback_object.PredefNo = (U8) index;
- switch (object_type & 0xff)
- {
- case EMS_PREDEFINED_SOUND:
- EMS_playback_object.Type = EMS_TYPE_PREDEF_SND;
- gui_EMS_playback_object(&EMS_playback_object);
- break;
- /* MTK Joy added for customization, 1014 */
- #if defined(__MMI_IMELODY_SUPPORT__)
- case EMS_PREDEFINED_MELODY:
- EMS_playback_object.Type = EMS_TYPE_USERDEF_SND;
- gui_EMS_playback_object(&EMS_playback_object);
- break;
- case EMS_USERDEFINED_MELODY:
- EMS_playback_object.Type = EMS_TYPE_USERDEF_SND;
- gui_EMS_playback_object(&EMS_playback_object);
- break;
- #endif /* defined(__MMI_IMELODY_SUPPORT__) */
- /* MTK end */
- }
- return (EMS_OK);
- }
- /*****************************************************************************
- * FUNCTION
- * EMSObjectStopPlayBack
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EMSObjectStopPlayBack(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EMS_cancel_object_focus();
- }
- #endif /* __MMI_MESSAGES_EMS__ */
- #define CAT145_SCROLL_DY 20
- color cat145_message_title_color;
- vertical_scrollbar cat145_vbar;
- S32 cat145_h1, cat145_h2, cat145_h3, cat145_total_height, cat145_available_height;
- S32 cat145_y = 0, cat145_image_x, cat145_message_title_x;
- S32 cat145_clip_x1, cat145_clip_y1, cat145_clip_x2, cat145_clip_y2;
- U32 cat145_flags;
- U8 cat145_scrollbar_flag = 0;
- /*****************************************************************************
- * FUNCTION
- * cat145_display
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void cat145_display(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 y = cat145_y + (MMI_title_y + MMI_title_height) + 2;
- color text_color;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_push_clip();
- gdi_layer_set_clip(cat145_clip_x1, cat145_clip_y1, cat145_clip_x2, cat145_clip_y2);
- gdi_image_draw(cat145_image_x, y, (U8*) MMI_message_icon);
- y += cat145_h1 + 2;
- switch (cat145_flags & 0xff)
- {
- case CAT145_BLACK_TITLE:
- text_color = gui_color(0, 0, 0);
- break;
- case CAT145_BLUE_TITLE:
- text_color = gui_color(0, 0, 196);
- break;
- case CAT145_RED_TITLE:
- text_color = gui_color(196, 0, 0);
- break;
- case CAT145_GREEN_TITLE:
- text_color = gui_color(0, 196, 0);
- break;
- default:
- text_color = gui_color(0, 0, 0);
- }
- gui_set_font(&MMI_default_font);
- gui_set_text_color(text_color);
- /* MTK Elvis for R2L characters */
- if (r2lMMIFlag)
- {
- gui_move_text_cursor(cat145_message_title_x + gui_get_string_width((UI_string_type) MMI_message_string), y);
- }
- else
- {
- gui_move_text_cursor(cat145_message_title_x, y);
- }
- /* MTk end */
- gui_print_text(MMI_message_string);
- y += cat145_h2;
- gui_move_multi_line_input_box(&MMI_multiline_inputbox, MMI_multiline_inputbox.x, y);
- gui_show_multi_line_input_box(&MMI_multiline_inputbox);
- gdi_layer_pop_clip();
- }
- /*****************************************************************************
- * FUNCTION
- * cat145_previous_line
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void cat145_previous_line(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 vbar_x = 0, vbar_button_x = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_set_clip(0, cat145_clip_y1, UI_device_width - 1, cat145_clip_y2);
- gui_draw_filled_area(0, 0, UI_device_width - 1, UI_device_height - 1, current_MMI_theme->general_background_filler);
- cat145_y += CAT145_SCROLL_DY;
- if (cat145_y > 0)
- {
- cat145_y = 0;
- }
- gui_set_vertical_scrollbar_value(&cat145_vbar, -cat145_y);
- /* MTK Elvis for R2L characters */
- if (r2lMMIFlag)
- {
- vbar_x = cat145_vbar.x;
- vbar_button_x = cat145_vbar.scroll_button.x;
- cat145_vbar.x = cat145_vbar.x + cat145_vbar.width - (UI_device_width - 1);
- cat145_vbar.scroll_button.x =
- cat145_vbar.scroll_button.x + cat145_vbar.scroll_button.width - (UI_device_width - 1);
- gui_show_vertical_scrollbar(&cat145_vbar);
- }
- else
- {
- gui_show_vertical_scrollbar(&cat145_vbar);
- }
- /* MTK end */
- if (r2lMMIFlag)
- {
- cat145_vbar.x = vbar_x;
- cat145_vbar.scroll_button.x = vbar_button_x;
- }
- cat145_display();
- gdi_layer_blt_previous(0, cat145_clip_y1, UI_device_width - 1, cat145_clip_y2);
- }
- /*****************************************************************************
- * FUNCTION
- * cat145_next_line
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void cat145_next_line(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 vbar_x = 0, vbar_button_x = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_set_clip(0, cat145_clip_y1, UI_device_width - 1, cat145_clip_y2);
- gui_draw_filled_area(0, 0, UI_device_width - 1, UI_device_height - 1, current_MMI_theme->general_background_filler);
- cat145_y -= CAT145_SCROLL_DY;
- if (cat145_y < -(cat145_total_height - cat145_available_height))
- {
- cat145_y = -(cat145_total_height - cat145_available_height);
- }
- gui_set_vertical_scrollbar_value(&cat145_vbar, -cat145_y);
- /* MTK Elvis for R2L characters */
- if (r2lMMIFlag)
- {
- vbar_x = cat145_vbar.x;
- vbar_button_x = cat145_vbar.scroll_button.x;
- cat145_vbar.x = cat145_vbar.x + cat145_vbar.width - (UI_device_width - 1);
- cat145_vbar.scroll_button.x =
- cat145_vbar.scroll_button.x + cat145_vbar.scroll_button.width - (UI_device_width - 1);
- gui_show_vertical_scrollbar(&cat145_vbar);
- }
- else
- {
- gui_show_vertical_scrollbar(&cat145_vbar);
- }
- /* MTK end */
- if (r2lMMIFlag)
- {
- cat145_vbar.x = vbar_x;
- cat145_vbar.scroll_button.x = vbar_button_x;
- }
- cat145_display();
- gdi_layer_blt_previous(0, cat145_clip_y1, UI_device_width - 1, cat145_clip_y2);
- }
- /*****************************************************************************
- * FUNCTION
- * cat145_keyboard_key_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * vkey_code [IN]
- * key_state [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void cat145_keyboard_key_handler(S32 vkey_code, S32 key_state)
- {
- #if(MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32)
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (key_state)
- {
- switch (vkey_code)
- {
- case 38: /* up */
- cat145_previous_line();
- break;
- case 40: /* down */
- cat145_next_line();
- break;
- }
- }
- #else /* (MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32) */
- UI_UNUSED_PARAMETER(vkey_code);
- UI_UNUSED_PARAMETER(key_state);
- #endif /* (MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32) */
- }
- /*****************************************************************************
- * FUNCTION
- * DrawCate145CategoryControlArea
- * DESCRIPTION
- * Draws the category145 category control area
- * PARAMETERS
- * coordinate [IN/OUT] Coordinates of category controlled area.
- * RETURNS
- * void
- *****************************************************************************/
- void DrawCate145CategoryControlArea(dm_coordinates *coordinate)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- RedrawCategory145Screen();
- }
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory145Screen
- * DESCRIPTION
- * Redraws the Delivery report screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory145Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 vbar_x = 0, vbar_button_x = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (cat145_scrollbar_flag)
- {
- /* MTK Elvis for R2L characters */
- if (r2lMMIFlag)
- {
- vbar_x = cat145_vbar.x;
- vbar_button_x = cat145_vbar.scroll_button.x;
- cat145_vbar.x = cat145_vbar.x + cat145_vbar.width - (UI_device_width - 1);
- cat145_vbar.scroll_button.x =
- cat145_vbar.scroll_button.x + cat145_vbar.scroll_button.width - (UI_device_width - 1);
- gui_show_vertical_scrollbar(&cat145_vbar);
- }
- else
- {
- gui_show_vertical_scrollbar(&cat145_vbar);
- }
- /* MTK end */
- if (r2lMMIFlag)
- {
- cat145_vbar.x = vbar_x;
- cat145_vbar.scroll_button.x = vbar_button_x;
- }
- }
- cat145_display();
- }
- /*****************************************************************************
- * FUNCTION
- * ChangeCategory145MessageString
- * DESCRIPTION
- *
- * PARAMETERS
- * new_string [?]
- * RETURNS
- * void
- *****************************************************************************/
- void ChangeCategory145MessageString(U8 *new_string)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_multiline_inputbox.text = (UI_buffer_type) new_string;
- MMI_multiline_inputbox.cursor_p = new_string;
- MMI_multiline_inputbox.flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- gui_show_multi_line_input_box(&MMI_multiline_inputbox);
- MMI_multiline_inputbox.flags &= ~UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory145Screen
- * DESCRIPTION
- * Displays the Delivery report screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon displayed with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Left softkey icon
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Right softkey icon
- * message_icon [IN] Icon displayed with the message
- * message_title [IN] Colored text that appears above the message
- * message [IN] Message
- * flags [IN] Flags
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory145Screen(
- U8 *title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U16 message_icon,
- U8 *message_title,
- U8 *message,
- U32 flags,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 l, width, height, content_width;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- MMI_menu_shortcut_number = -1;
- MMI_disable_title_shortcut_display = 1;
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- SetupCategoryKeyHandlers();
- cat145_scrollbar_flag = 0;
- gui_create_vertical_scrollbar(
- &cat145_vbar,
- UI_device_width - current_MMI_theme->scrollbar_size,
- (MMI_title_y + MMI_title_height),
- current_MMI_theme->scrollbar_size,
- (UI_device_height - (MMI_title_y + MMI_title_height) - MMI_button_bar_height + 1));
- content_width = UI_device_width;
- l = gui_strlen((UI_string_type) message);
- create_multiline_inputbox_set_buffer((UI_string_type) message, l, l, 0);
- resize_multiline_inputbox(content_width, MMI_content_height);
- show_multiline_inputbox_no_draw();
- resize_multiline_inputbox(MMI_multiline_inputbox.width, MMI_multiline_inputbox.text_height + 6);
- cat145_h3 = MMI_multiline_inputbox.height;
- MMI_multiline_inputbox.flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW
- | UI_MULTI_LINE_INPUT_BOX_VIEW_MODE
- | UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND
- | UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR
- | UI_MULTI_LINE_INPUT_BOX_USE_PRESET_CLIPPING | UI_MULTI_LINE_INPUT_BOX_CENTER_JUSTIFY;
- MMI_message_string = (UI_string_type) message_title;
- gui_set_font(&MMI_default_font);
- gui_measure_string(MMI_message_string, &width, &height);
- cat145_h2 = height;
- cat145_message_title_x = (content_width >> 1) - (width >> 1);
- MMI_title_string = (UI_string_type) title;
- MMI_title_icon = (PU8) get_image(title_icon);
- MMI_message_icon = (PU8) get_image(message_icon);
- gui_measure_image(MMI_message_icon, &width, &height);
- cat145_h1 = height + 4;
- cat145_image_x = (content_width >> 1) - (width >> 1);
- cat145_flags = flags;
- cat145_y = 0;
- cat145_clip_x1 = 0;
- cat145_clip_x2 = content_width;
- cat145_clip_y1 = (MMI_title_y + MMI_title_height);
- cat145_clip_y2 = UI_device_height - MMI_button_bar_height - 1;
- cat145_total_height = (cat145_h1 + cat145_h2 + cat145_h3);
- cat145_available_height = cat145_clip_y2 - cat145_clip_y1 + 1;
- if (cat145_total_height > cat145_available_height)
- {
- cat145_scrollbar_flag = 1;
- register_keyboard_key_handler(cat145_keyboard_key_handler);
- SetKeyHandler(cat145_previous_line, KEY_UP_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(cat145_next_line, KEY_DOWN_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(cat145_previous_line, KEY_VOL_UP, KEY_EVENT_DOWN);
- SetKeyHandler(cat145_next_line, KEY_VOL_DOWN, KEY_EVENT_DOWN);
- gui_set_vertical_scrollbar_range(&cat145_vbar, cat145_total_height);
- gui_set_vertical_scrollbar_scale(&cat145_vbar, cat145_available_height);
- gui_set_vertical_scrollbar_value(&cat145_vbar, -cat145_y);
- }
- else
- {
- cat145_y = (cat145_available_height >> 1) - (cat145_total_height >> 1);
- }
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitCategory145Screen;
- dm_setup_category_functions(dm_redraw_category_screen, dummy_get_history, dummy_get_history_size);
- dm_register_category_controlled_callback(DrawCate145CategoryControlArea);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY145_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory145Screen
- * DESCRIPTION
- * Exits the Delivery report screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory145Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- cat145_scrollbar_flag = 0;
- reset_softkeys();
- reset_multiline_inputbox();
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory145HistorySize
- * DESCRIPTION
- * Gets the size of the history buffer for the Delivery report screen
- * PARAMETERS
- * void
- * RETURNS
- * size in U8s of the history buffer
- *****************************************************************************/
- S32 GetCategory145HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (0);
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory145History
- * DESCRIPTION
- * Gets the history buffer for the Delivery report screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer into which the history data is stored (pre-allocated)
- * RETURNS
- * Pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory145History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (history_buffer);
- }