wgui_draw_manager_.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:346k
源码类别:
MTK
开发平台:
C/C++
- UICtrlAccessPtr_p++;
- }
- else if (*UICtrlAccessPtr_p == DM_DEFAULT_BUTTON_BAR_FLAG || *UICtrlAccessPtr_p == DM_DEFAULT_BUTTON_BAR)
- {
- #ifdef __MMI_SCREEN_ROTATE__
- if (mmi_frm_is_screen_width_height_swapped())
- {
- dm_coordinate_info->s16X = MMI_ROTATED_BUTTON_BAR_X;
- dm_coordinate_info->s16Y = MMI_ROTATED_BUTTON_BAR_Y;
- dm_coordinate_info->s16Width = MMI_ROTATED_BUTTON_BAR_WIDTH;
- dm_coordinate_info->s16Height = MMI_ROTATED_BUTTON_BAR_HEIGHT;
- }
- else
- #endif /* __MMI_SCREEN_ROTATE__ */
- {
- dm_coordinate_info->s16X = 0;
- /* PMT SUKRIT START 20060104 */
- #ifdef __MMI_UI_DALMATIAN_SOFTKEYS__
- dm_coordinate_info->s16Y = MAIN_LCD_DEVICE_HEIGHT - MMI_BUTTON_BAR_HEIGHT;
- #else
- dm_coordinate_info->s16Y = MAIN_LCD_DEVICE_HEIGHT - MMI_BUTTON_BAR_HEIGHT + 1;
- #endif
- /* PMT SUKRIT END 20060104 */
- dm_coordinate_info->s16Width = MAIN_LCD_DEVICE_WIDTH;
- dm_coordinate_info->s16Height = MMI_BUTTON_BAR_HEIGHT;
- }
- if (*UICtrlAccessPtr_p == DM_DEFAULT_BUTTON_BAR_FLAG)
- {
- dm_coordinate_info->Flags = DM_NO_FLAGS;
- }
- else
- {
- UICtrlAccessPtr_p++;
- dm_coordinate_info->Flags = *UICtrlAccessPtr_p;
- }
- UICtrlAccessPtr_p++;
- }
- else
- {
- dm_coordinate_info->s16X = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_coordinate_info->s16Y = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_coordinate_info->s16Width = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_coordinate_info->s16Height = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_coordinate_info->Flags = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- }
- if (dm_coordinate_info->Flags & DM_PREVIOUS_CONTROL_END_X)
- {
- dm_coordinate_info->s16X = prev_control_coordinates.s16X2 + dm_coordinate_info->s16X;
- }
- else if (dm_coordinate_info->Flags & DM_PREVIOUS_CONTROL_END_X_OFFSET_WIDTH)
- {
- dm_coordinate_info->s16X = prev_control_coordinates.s16X2 - dm_coordinate_info->s16Width;
- }
- #ifndef __GDI_MEMORY_PROFILE_2__
- else
- {
- if (new_layer_x != 0)
- {
- dm_coordinate_info->s16X += new_layer_x;
- }
- }
- #endif /* __GDI_MEMORY_PROFILE_2__ */
- if (dm_coordinate_info->Flags & DM_PREVIOUS_CONTROL_END_Y)
- {
- dm_coordinate_info->s16Y = prev_control_coordinates.s16Y2 + dm_coordinate_info->s16Y;
- }
- else if (dm_coordinate_info->Flags & DM_PREVIOUS_CONTROL_END_Y_OFFSET_HEIGHT)
- {
- dm_coordinate_info->s16Y = prev_control_coordinates.s16Y2 - dm_coordinate_info->s16Height;
- }
- #ifndef __GDI_MEMORY_PROFILE_2__
- else
- {
- if (new_layer_y != 0)
- {
- dm_coordinate_info->s16Y += new_layer_y;
- }
- }
- #endif /* __GDI_MEMORY_PROFILE_2__ */
- if (dm_coordinate_info->Flags & DM_WIDTH_OFFSET_PREVIOUS_CONTROL_END_X)
- {
- dm_coordinate_info->s16Width -= prev_control_coordinates.s16X2;
- }
- if (dm_coordinate_info->Flags & DM_HEIGHT_OFFSET_PREVIOUS_CONTROL_END_Y)
- {
- dm_coordinate_info->s16Height -= prev_control_coordinates.s16Y2;
- }
- if (dm_coordinate_info->Flags & DM_HEIGHT_PREVIOUS_CONTROL_HEIGHT)
- {
- dm_coordinate_info->s16Height = prev_control_coordinates.coordinate.s16Height;
- }
- if (dm_coordinate_info->Flags & DM_WIDTH_PREVIOUS_CONTROL_WIDTH)
- {
- dm_coordinate_info->s16Width = prev_control_coordinates.coordinate.s16Width;
- }
- setup_previous_control(dm_coordinate_info);
- return UICtrlAccessPtr_p;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_get_cat_scr_coordinates
- * DESCRIPTION
- * This function is used obtain the category screen coordinates
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * dm_cat_scr_info [IN/OUT] Category screen coordinate info.
- * RETURNS
- * void
- *****************************************************************************/
- S16 *dm_get_cat_scr_coordinates(S16 *UICtrlAccessPtr_p, dm_cat_scr_info_struct *dm_cat_scr_info)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Check if full screen display */
- if ((*UICtrlAccessPtr_p == DM_FULL_SCREEN_COORDINATE_FLAG) || (*UICtrlAccessPtr_p == DM_FULL_SCREEN_COORDINATE))
- {
- dm_cat_scr_info->x1 = 0;
- dm_cat_scr_info->y1 = 0;
- dm_cat_scr_info->x2 = UI_device_width;
- dm_cat_scr_info->y2 = UI_device_height;
- if (*UICtrlAccessPtr_p == DM_FULL_SCREEN_COORDINATE_FLAG)
- {
- dm_cat_scr_info->flags = DM_NO_FLAGS;
- UICtrlAccessPtr_p++;
- return UICtrlAccessPtr_p;
- }
- UICtrlAccessPtr_p++;
- }
- else
- {
- dm_cat_scr_info->x1 = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_cat_scr_info->y1 = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_cat_scr_info->x2 = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_cat_scr_info->y2 = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- }
- dm_cat_scr_info->flags = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- return UICtrlAccessPtr_p;
- } /* end of dm_get_cat_scr_coordinates */
- /*****************************************************************************
- * FUNCTION
- * dm_get_status_icon_bar_coordinates
- * DESCRIPTION
- * This function is used obtain the status icon bar coordinates.
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * dm_status_info [IN/OUT] Status bar coordinate info.
- * RETURNS
- * void
- *****************************************************************************/
- S16 *dm_get_status_icon_bar_coordinates(S16 *UICtrlAccessPtr_p, dm_status_info_struct *dm_status_info)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (*UICtrlAccessPtr_p == DM_DEFAULT_STATUS_BAR_FLAG || *UICtrlAccessPtr_p == DM_DEFAULT_STATUS_BAR)
- {
- /* status bar is not suported in rotated screen */
- dm_status_info->x = 0;
- dm_status_info->y = 0;
- dm_status_info->x1 = 0;
- dm_status_info->y1 = 0;
- dm_status_info->x2 = MAIN_LCD_DEVICE_WIDTH;
- dm_status_info->y2 = MMI_STATUS_BAR_HEIGHT;
- if (*UICtrlAccessPtr_p == DM_DEFAULT_STATUS_BAR_FLAG)
- {
- dm_status_info->flags = DM_NO_FLAGS;
- }
- else
- {
- UICtrlAccessPtr_p++;
- dm_status_info->flags = *UICtrlAccessPtr_p;
- }
- UICtrlAccessPtr_p++;
- }
- else
- {
- dm_status_info->x = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_status_info->y = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_status_info->x1 = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_status_info->y1 = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_status_info->x2 = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_status_info->y2 = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_status_info->flags = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- }
- return UICtrlAccessPtr_p;
- } /* end of dm_get_status_icon_bar_coordinates */
- /*****************************************************************************
- * FUNCTION
- * dm_get_button_bar_coordinates
- * DESCRIPTION
- * This function is used obtain the button bar coordinates.
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * dm_buttonbar_info [IN/OUT] Button bar coordinate info.
- * RETURNS
- * void
- *****************************************************************************/
- S16 *dm_get_button_bar_coordinates(S16 *UICtrlAccessPtr_p, dm_buttonbar_info_struct *dm_buttonbar_info)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, &dm_buttonbar_info->coordinate);
- dm_buttonbar_info->button_width = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- return UICtrlAccessPtr_p;
- } /* end of dm_get_button_bar_coordinates */
- /*****************************************************************************
- * FUNCTION
- * dm_get_calendar_coordinates
- * DESCRIPTION
- * This function is used obtain the calendar control coordinates.
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * dm_calendar_info [IN/OUT] Calendar control coordinate info.
- * RETURNS
- * void
- *****************************************************************************/
- S16 *dm_get_calendar_coordinates(S16 *UICtrlAccessPtr_p, dm_calendar_info_struct *dm_calendar_info)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, &dm_calendar_info->coordinate);
- dm_calendar_info->calendar_background_y = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->calendar_background_width = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->calendar_columns = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->calendar_rows = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->title1_x = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->title1_y = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->title1_width = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->title1_height = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->title1_font = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- #ifdef __MMI_UI_CALENDAR_WITH_INFO_BOX__
- dm_calendar_info->title1_month_x = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->title1_month_y = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->title1_month_width = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->title1_month_height = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->title1_month_font = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->title1_month_show = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- #endif /* __MMI_UI_CALENDAR_WITH_INFO_BOX__ */
- dm_calendar_info->title2_x = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->title2_y = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->title2_width = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->title2_height = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->title2_show = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->title3_x = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->title3_y = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->title3_width = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->title3_height = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->title3_show = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- #ifdef __MMI_UI_CALENDAR_WITH_INFO_BOX__
- dm_calendar_info->infobox_x = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->infobox_y = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->infobox_width = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->infobox_height = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->infobox_max = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_calendar_info->infobox_show = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- #endif /* __MMI_UI_CALENDAR_WITH_INFO_BOX__ */
- return UICtrlAccessPtr_p;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_get_typical_stopwatch_coordinates
- * DESCRIPTION
- * This function is used obtain the typical stopwatch control coordinates.
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * dm_typical_stopwatch_info [?]
- * dm_calendar_info(?) [IN/OUT] Calendar control coordinate info.
- * RETURNS
- * void
- *****************************************************************************/
- S16 *dm_get_typical_stopwatch_coordinates(
- S16 *UICtrlAccessPtr_p,
- dm_typical_stopwatch_info_struct *dm_typical_stopwatch_info)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, &dm_typical_stopwatch_info->coordinate);
- dm_typical_stopwatch_info->typ_timer_x = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_typical_stopwatch_info->typ_timer_y = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_typical_stopwatch_info->typ_milsec_x = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_typical_stopwatch_info->typ_milsec_y = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_typical_stopwatch_info->typ_history_height = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_typical_stopwatch_info->typ_timer_x += dm_typical_stopwatch_info->coordinate.s16X;
- dm_typical_stopwatch_info->typ_timer_y += dm_typical_stopwatch_info->coordinate.s16Y;
- dm_typical_stopwatch_info->typ_milsec_x += dm_typical_stopwatch_info->coordinate.s16X;
- dm_typical_stopwatch_info->typ_milsec_y += dm_typical_stopwatch_info->coordinate.s16Y;
- return UICtrlAccessPtr_p;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_get_nway_stopwatch_coordinates
- * DESCRIPTION
- * This function is used obtain the N Way stopwatch control coordinates.
- * PARAMETERS
- * UICtrlAccessPtr_p [IN/OUT] It specifies the start position to take out the coordinates.
- * dm_nway_stopwatch_info [?]
- * dm_calendar_info(?) [IN/OUT] Calendar control coordinate info.
- * RETURNS
- * void
- *****************************************************************************/
- S16 *dm_get_nway_stopwatch_coordinates(S16 *UICtrlAccessPtr_p, dm_nway_stopwatch_info_struct *dm_nway_stopwatch_info)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, &dm_nway_stopwatch_info->coordinate);
- dm_nway_stopwatch_info->nway_main_timer_x1 = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_nway_stopwatch_info->nway_main_timer_y1 = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_nway_stopwatch_info->nway_main_timer_x2 = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_nway_stopwatch_info->nway_main_timer_y2 = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_nway_stopwatch_info->nway_dialog_x1 = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_nway_stopwatch_info->nway_dialog_y1 = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_nway_stopwatch_info->nway_dialog_x2 = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_nway_stopwatch_info->nway_dialog_y2 = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_nway_stopwatch_info->separator_height = *UICtrlAccessPtr_p;
- UICtrlAccessPtr_p++;
- dm_nway_stopwatch_info->nway_main_timer_x1 += dm_nway_stopwatch_info->coordinate.s16X;
- dm_nway_stopwatch_info->nway_main_timer_y1 += dm_nway_stopwatch_info->coordinate.s16Y;
- dm_nway_stopwatch_info->nway_main_timer_x2 += dm_nway_stopwatch_info->coordinate.s16X;
- dm_nway_stopwatch_info->nway_main_timer_y2 += dm_nway_stopwatch_info->coordinate.s16Y;
- dm_nway_stopwatch_info->nway_dialog_x1 += dm_nway_stopwatch_info->coordinate.s16X;
- dm_nway_stopwatch_info->nway_dialog_y1 += dm_nway_stopwatch_info->coordinate.s16Y;
- dm_nway_stopwatch_info->nway_dialog_x2 += dm_nway_stopwatch_info->coordinate.s16X;
- dm_nway_stopwatch_info->nway_dialog_y2 += dm_nway_stopwatch_info->coordinate.s16Y;
- return UICtrlAccessPtr_p;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_get_category_history
- * DESCRIPTION
- * This function is used obtain the category history.
- * PARAMETERS
- * history_buffer [IN/OUT] Buffer of history data.
- * RETURNS
- * U8 history
- *****************************************************************************/
- U8 *dm_get_category_history(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 u8NoOfUICtrls = 0;
- U8 u8CtrlCt = 0;
- U8 *control_set_ptr = NULL;
- S16 *coordinate_set_p;
- dm_data_struct *p_dm_data = NULL;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_dm_data.s32CatId)
- {
- p_dm_data = &g_dm_data;
- }
- else if (g_dm_sublcd_data.s32CatId)
- {
- p_dm_data = &g_dm_sublcd_data;
- }
- else
- {
- MMI_ASSERT(0);
- }
- control_set_ptr = dm_search_control_set((U16) p_dm_data->s32CatId, &coordinate_set_p);
- /* First element in Category-Controls map specifies the number of controls */
- u8NoOfUICtrls = control_set_ptr[0];
- for (u8CtrlCt = 1; u8CtrlCt <= u8NoOfUICtrls; u8CtrlCt++)
- {
- switch (control_set_ptr[u8CtrlCt])
- {
- case DM_CIRCULAR_MENU1:
- {
- get_circular_menu_category_history((U16) p_dm_data->s32CatId, history_buffer);
- break;
- }
- case DM_LIST1:
- {
- get_list_menu_category_history((U16) p_dm_data->s32CatId, history_buffer);
- break;
- }
- case DM_DYNAMIC_LIST1:
- {
- get_list_menu_category_history((U16) p_dm_data->s32CatId, history_buffer);
- break;
- }
- case DM_ASYNCDYNAMIC_LIST1:
- {
- get_list_menu_category_history((U16) p_dm_data->s32CatId, history_buffer);
- break;
- }
- case DM_MATRIX_MENU1:
- {
- get_matrix_menu_category_history((U16) p_dm_data->s32CatId, history_buffer);
- break;
- }
- case DM_MULTILINE_INPUTBOX1:
- {
- get_multiline_inputbox_category_history(
- (U16) p_dm_data->s32CatId,
- history_buffer,
- MMI_current_input_type);
- break;
- }
- case DM_EMS_INPUTBOX1:
- {
- get_EMS_inputbox_category_history((U16) p_dm_data->s32CatId, history_buffer, MMI_current_input_type);
- break;
- }
- case DM_DIALER_INPUT_BOX1:
- {
- get_dialer_inputbox_category_history((U16) p_dm_data->s32CatId, history_buffer);
- break;
- }
- case DM_SINGLELINE_INPUTBOX1:
- {
- get_singleline_inputbox_category_history(
- (U16) p_dm_data->s32CatId,
- history_buffer,
- MMI_current_input_type);
- break;
- }
- case DM_LSK:
- {
- /* No history currently for this control */
- break;
- }
- case DM_RSK:
- {
- /* No history currently for this control */
- break;
- }
- case DM_TITLE1:
- {
- /* No history currently for this control */
- break;
- }
- case DM_STATUS_BAR1:
- {
- /* No history currently for this control */
- break;
- }
- case DM_INLINE_FIXED_LIST1:
- {
- wgui_get_inline_history((U16) p_dm_data->s32CatId, history_buffer);
- break;
- }
- case DM_SLIDE_CONTROL:
- {
- get_slide_control_category_history((U16) p_dm_data->s32CatId, history_buffer);
- break;
- }
- case DM_TYPICAL_STOPWATCH:
- {
- get_list_menu_category_history((U16) p_dm_data->s32CatId, history_buffer);
- break;
- }
- #ifdef __MMI_STOPWATCH__
- case DM_NWAY_STOPWATCH:
- {
- get_stop_watch_history((U16) p_dm_data->s32CatId, history_buffer);
- break;
- }
- #endif /* __MMI_STOPWATCH__ */
- default:
- {
- break;
- }
- }
- }
- return history_buffer;
- } /* end of dm_get_category_history */
- /*****************************************************************************
- * FUNCTION
- * dm_get_category_history_size
- * DESCRIPTION
- * This function is used obtain the category history.
- * PARAMETERS
- * void
- * RETURNS
- * S32 history_size
- *****************************************************************************/
- S32 dm_get_category_history_size(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 u8CtrlCt = -1;
- S32 u8NoOfUICtrls = -1;
- U8 *control_set_ptr = NULL;
- S16 *coordinate_set_ptr = NULL;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_dm_data.s32CatId)
- {
- control_set_ptr = dm_search_control_set((U16) g_dm_data.s32CatId, &coordinate_set_ptr);
- }
- else if (g_dm_sublcd_data.s32CatId)
- {
- control_set_ptr = dm_search_control_set((U16) g_dm_sublcd_data.s32CatId, &coordinate_set_ptr);
- }
- else
- {
- MMI_ASSERT(0);
- }
- /* First element in Category-Controls map specifies the number of controls */
- u8NoOfUICtrls = control_set_ptr[0];
- for (u8CtrlCt = 1; u8CtrlCt <= u8NoOfUICtrls; u8CtrlCt++)
- {
- switch (control_set_ptr[u8CtrlCt])
- {
- case DM_CIRCULAR_MENU1:
- {
- return (sizeof(circular_menu_category_history));
- }
- case DM_LIST1:
- {
- return (sizeof(list_menu_category_history));
- }
- case DM_DYNAMIC_LIST1:
- {
- return (sizeof(list_menu_category_history));
- }
- case DM_ASYNCDYNAMIC_LIST1:
- {
- return (sizeof(list_menu_category_history));
- }
- case DM_MATRIX_MENU1:
- {
- return (sizeof(matrix_menu_category_history));
- }
- case DM_MULTILINE_INPUTBOX1:
- {
- return (sizeof(multiline_inputbox_category_history));
- }
- case DM_DIALER_INPUT_BOX1:
- {
- return (sizeof(dialer_inputbox_category_history));
- }
- case DM_SINGLELINE_INPUTBOX1:
- {
- return (sizeof(singleline_inputbox_category_history));
- }
- case DM_LSK:
- {
- /* No history currently for this control */
- return 0;
- }
- case DM_RSK:
- {
- /* No history currently for this control */
- return 0;
- }
- case DM_TITLE1:
- {
- /* No history currently for this control */
- return 0;
- }
- case DM_STATUS_BAR1:
- {
- /* No history currently for this control */
- return 0;
- }
- case DM_INLINE_FIXED_LIST1:
- {
- return (wgui_get_inline_history_size());
- }
- case DM_SLIDE_CONTROL:
- {
- return (sizeof(slide_control_category_history));
- }
- case DM_TYPICAL_STOPWATCH:
- {
- return (sizeof(list_menu_category_history));
- break;
- }
- #ifdef __MMI_STOPWATCH__
- case DM_NWAY_STOPWATCH:
- {
- return (sizeof(UI_stop_watch_history));
- break;
- }
- #endif /* __MMI_STOPWATCH__ */
- default:
- {
- PRINT_INFORMATION(("WARNING: Can't find any control to calculate history size"));
- MMI_ASSERT(0);
- return 0;
- }
- }
- }
- return 0;
- } /* end of dm_get_category_history_size */
- /*****************************************************************************
- * FUNCTION
- * dm_reset_title_coordinates
- * DESCRIPTION
- * Reset function for the title coordinates so that other category screens get the original values only.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void dm_reset_title_coordinates(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_title_x = MMI_TITLE_X;
- MMI_title_y = MMI_TITLE_Y;
- MMI_title_height = MMI_TITLE_HEIGHT;
- MMI_title_width = MMI_TITLE_WIDTH;
- } /* end of dm_reset_title_coordinates */
- /*****************************************************************************
- * FUNCTION
- * dm_reset_fixed_list_coordinates
- * DESCRIPTION
- * Reset function for the fixed list coordinates so that other category screens get the original values only.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void dm_reset_fixed_list_coordinates(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_fixed_list_menu.x = MMI_content_x;
- MMI_fixed_list_menu.y = MMI_content_y;
- MMI_fixed_list_menu.width = MMI_content_width;
- MMI_fixed_list_menu.height = MMI_content_height;
- } /* end of dm_reset_fixed_list_coordinates */
- /*****************************************************************************
- * FUNCTION
- * dm_reset_inline_fixed_list_coordinates
- * DESCRIPTION
- * Reset function for the inline fixed list coordinates so that other category screens get the original values only.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void dm_reset_inline_fixed_list_coordinates(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_fixed_list_menu.x = MMI_content_x;
- MMI_fixed_list_menu.y = MMI_content_y;
- MMI_fixed_list_menu.width = MMI_content_width;
- MMI_fixed_list_menu.height = MMI_content_height;
- } /* end of dm_reset_inline_fixed_list_coordinates */
- /*****************************************************************************
- * FUNCTION
- * dm_reset_lsk_coordinates
- * DESCRIPTION
- * Reset function for the lsk coordinates so that other category screens get the original values only.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void dm_reset_lsk_coordinates(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_softkeys[MMI_LEFT_SOFTKEY].x = 0;
- MMI_softkeys[MMI_LEFT_SOFTKEY].y = UI_device_height - MMI_softkey_height;
- MMI_softkeys[MMI_LEFT_SOFTKEY].width = MMI_softkey_width;
- MMI_softkeys[MMI_LEFT_SOFTKEY].height = MMI_softkey_height;
- } /* end of dm_reset_lsk_coordinates */
- /*****************************************************************************
- * FUNCTION
- * dm_reset_rsk_coordinates
- * DESCRIPTION
- * Reset function for the rsk coordinates so that other category screens get the original values only.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void dm_reset_rsk_coordinates(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_softkeys[MMI_RIGHT_SOFTKEY].x = UI_device_width - MMI_softkey_width;
- MMI_softkeys[MMI_RIGHT_SOFTKEY].y = UI_device_height - MMI_softkey_height;
- MMI_softkeys[MMI_RIGHT_SOFTKEY].width = MMI_softkey_width;
- MMI_softkeys[MMI_RIGHT_SOFTKEY].height = MMI_softkey_height;
- } /* end of dm_reset_rsk_coordinates */
- /*****************************************************************************
- * FUNCTION
- * dm_reset_multitaps_coordinates
- * DESCRIPTION
- * Reset function for the multitap coordinates so that other category screens get the original values only.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void dm_reset_multitaps_coordinates(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- set_numberless_multitap();
- set_normal_multitap();
- } /* end of dm_reset_multitaps_coordinates */
- /*****************************************************************************
- * FUNCTION
- * dm_update_multitap_coordinates
- * DESCRIPTION
- * This function updates the multitap coordinates depending on the multitap coordinates
- * PARAMETERS
- * dm_multiline_inputbox_info [IN] Multiline inputbox information structure.
- * dm_cat_scr_info [IN] Category Screen information structure.
- * RETURNS
- * void
- *****************************************************************************/
- void dm_update_multitap_coordinates(
- dm_coordinates *dm_multiline_inputbox_info,
- dm_cat_scr_info_struct *dm_cat_scr_info)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 u8MultiTapCt = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Move the multitap depending on inputbox coordinates */
- for (u8MultiTapCt = 0; u8MultiTapCt < MAX_MULTITAPS; u8MultiTapCt++)
- {
- multitap_input *ami = NULL;
- switch (MMI_current_multitap_mode)
- {
- case 0:
- ami = &MMI_uppercase_multitaps[u8MultiTapCt];
- break;
- case 1:
- ami = &MMI_lowercase_multitaps[u8MultiTapCt];
- break;
- /* MTK Elvis to add two more multitap modes */
- case INPUT_MODE_MMI_MULTITAP_BPMF:
- ami = &MMI_bpmf_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_MULTITAP_PINYIN:
- ami = &MMI_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_ABC:
- ami = &MMI_lowercase_multitaps[u8MultiTapCt];
- /* MTK end */
- #if defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__)
- case INPUT_MODE_MULTITAP_UPPERCASE_ABC_NO_NUMERIC:
- ami = &MMI_uppercase_numberless_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_ABC_NO_NUMERIC:
- ami = &MMI_lowercase_numberless_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__) */
- /* MTK Terry for Spanish French German Italian */
- #if defined(__MMI_MULTITAP_SPANISH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_SPANISH:
- ami = &MMI_spanish_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_SPANISH:
- ami = &MMI_spanish_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_SPANISH:
- ami = &MMI_spanish_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_SPANISH__) */
- /* PMT CZ_PO_TU START 20050812 */
- #if defined(__MMI_MULTITAP_POLISH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_POLISH:
- ami = &MMI_polish_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_POLISH:
- ami = &MMI_polish_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_POLISH:
- ami = &MMI_polish_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_POLISH__) */
- //PMT CZ_PO_TU END 20050812
- //PMT CZ_PO_TU START 20050812
- #if defined(__MMI_MULTITAP_CZECH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_CZECH:
- ami = &MMI_czech_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_CZECH:
- ami = &MMI_czech_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_CZECH:
- ami = &MMI_czech_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_CZECH__) */
- //PMT CZ_PO_TU END 20050812
- //PMT CZ_PO_TU START 20050812
- #if defined(__MMI_MULTITAP_TURKISH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_TURKISH:
- ami = &MMI_turkish_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_TURKISH:
- ami = &MMI_turkish_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_TURKISH:
- ami = &MMI_turkish_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_TURKISH__) */
- /* PMT CZ_PO_TU END 20050812 */
- #if defined(__MMI_MULTITAP_FRENCH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_FRENCH:
- ami = &MMI_french_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_FRENCH:
- ami = &MMI_french_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_FRENCH:
- ami = &MMI_french_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_FRENCH__) */
- #if defined(__MMI_MULTITAP_GERMAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_GERMAN:
- ami = &MMI_german_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_GERMAN:
- ami = &MMI_german_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_GERMAN:
- ami = &MMI_german_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_GERMAN__) */
- #if defined(__MMI_MULTITAP_ITALIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_ITALIAN:
- ami = &MMI_italian_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_ITALIAN:
- ami = &MMI_italian_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_ITALIAN:
- ami = &MMI_italian_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_ITALIAN__) */
- /* PMT BHASKAR START 20052907 */
- #if defined(__MMI_MULTITAP_VIETNAMESE__)
- case INPUT_MODE_MULTITAP_UPPERCASE_VIETNAMESE:
- ami = &MMI_vietnamese_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_VIETNAMESE:
- ami = &MMI_vietnamese_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_VIETNAMESE:
- ami = &MMI_vietnamese_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_VIETNAMESE__) */
- /* PMT BHASKAR END 20052907 */
- /* PMT Gurdev Start 20050729 */
- #if defined(__MMI_MULTITAP_INDONESIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_INDONESIAN:
- ami = &MMI_indonesian_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_INDONESIAN:
- ami = &MMI_indonesian_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_INDONESIAN:
- ami = &MMI_indonesian_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_INDONESIAN__) */
- //PMT Gurdev End 20050729
- //MTK end
- //MTK end
- //PMT VIKASG START 20050729
- #if defined(__MMI_MULTITAP_DANISH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_DANISH:
- ami = &MMI_danish_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_DANISH:
- ami = &MMI_danish_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_DANISH:
- ami = &MMI_danish_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_DANISH__) */
- /* PMT VIKASG END 20050729 */
- /* PMT SHARIQ START 20050729 */
- #if defined(__MMI_MULTITAP_PORTUGUESE__)
- case INPUT_MODE_MULTITAP_UPPERCASE_PORTUGUESE:
- ami = &MMI_portuguese_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_PORTUGUESE:
- ami = &MMI_portuguese_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_PORTUGUESE:
- ami = &MMI_portuguese_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_PORTUGUESE__) */
- //PMT SHARIQ END 20050729
- //PMT START HU_FI 20050825
- #if defined(__MMI_MULTITAP_FINNISH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_FINNISH:
- ami = &MMI_finnish_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_FINNISH:
- ami = &MMI_finnish_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_FINNISH:
- ami = &MMI_finnish_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_FINNISH__) */
- //PMT END HU_FI 20050825
- //PMT NO_AR_SL_DU START 20050909
- #if defined(__MMI_MULTITAP_SLOVAK__)
- case INPUT_MODE_MULTITAP_UPPERCASE_SLOVAK:
- ami = &MMI_slovak_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_SLOVAK:
- ami = &MMI_slovak_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_SLOVAK:
- ami = &MMI_slovak_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_SLOVAK__) */
- #if defined(__MMI_MULTITAP_DUTCH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_DUTCH:
- ami = &MMI_dutch_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_DUTCH:
- ami = &MMI_dutch_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_DUTCH:
- ami = &MMI_dutch_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_DUTCH__) */
- /* PMT BULGARIAN START 20051201 */
- #if defined(__MMI_MULTITAP_BULGARIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_BULGARIAN:
- ami = &MMI_bulgarian_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_BULGARIAN:
- ami = &MMI_bulgarian_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_BULGARIAN:
- ami = &MMI_bulgarian_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_BULGARIAN__) */
- /* PMT BULGARIAN END 20051201 */
- #if defined(__MMI_MULTITAP_ARABIC__)
- case INPUT_MODE_MULTITAP_ARABIC:
- ami = &MMI_arabic_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_ARABIC__) */
- /* PMT START PERSIAN */
- #if defined(__MMI_MULTITAP_PERSIAN__)
- case INPUT_MODE_MULTITAP_PERSIAN:
- ami = &MMI_persian_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_PERSIAN__) */
- //PMT END PERSIAN
- /* Norwegian start */
- #if defined(__MMI_MULTITAP_NORWEGIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_NORWEGIAN:
- ami = &MMI_norwegian_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_NORWEGIAN:
- ami = &MMI_norwegian_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_NORWEGIAN:
- ami = &MMI_norwegian_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_NORWEGIAN__) */
- //Norwegian end
- //PMT NO_AR_SL_DU END 20050909
- //PMT START SWEDISH 20050916
- #if defined(__MMI_MULTITAP_SWEDISH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_SWEDISH:
- ami = &MMI_swedish_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_SWEDISH:
- ami = &MMI_swedish_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_SWEDISH:
- ami = &MMI_swedish_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_SWEDISH__) */
- //PMT END SWEDISH 20050916
- //PMT START CR_ROM_SLO 20050923
- #if defined(__MMI_MULTITAP_CROATIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_CROATIAN:
- ami = &MMI_croatian_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_CROATIAN:
- ami = &MMI_croatian_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_CROATIAN:
- ami = &MMI_croatian_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_CROATIAN__) */
- #if defined(__MMI_MULTITAP_ROMANIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_ROMANIAN:
- ami = &MMI_romanian_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_ROMANIAN:
- ami = &MMI_romanian_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_ROMANIAN:
- ami = &MMI_romanian_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_ROMANIAN__) */
- #if defined(__MMI_MULTITAP_SLOVENIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_SLOVENIAN:
- ami = &MMI_slovenian_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_SLOVENIAN:
- ami = &MMI_slovenian_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_SLOVENIAN:
- ami = &MMI_slovenian_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_SLOVENIAN__) */
- //PMT END CR_ROM_SLO 20050923
- //PMT START GR_HE_CZ_FI_DA_HU 20051007
- #if defined(__MMI_MULTITAP_GREEK__)
- case INPUT_MODE_MULTITAP_UPPERCASE_GREEK:
- ami = &MMI_greek_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_GREEK:
- ami = &MMI_greek_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_GREEK:
- ami = &MMI_greek_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_GREEK__) */
- #if defined(__MMI_MULTITAP_HUNGARIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_HUNGARIAN:
- ami = &MMI_hungarian_uppercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_HUNGARIAN:
- ami = &MMI_hungarian_lowercase_multitaps[u8MultiTapCt];
- break;
- case INPUT_MODE_MMI_LOWERCASE_HUNGARIAN:
- ami = &MMI_hungarian_lowercase_multitaps[u8MultiTapCt];
- break;
- #endif /* defined(__MMI_MULTITAP_HUNGARIAN__) */
- /* PMT END GR_HE_CZ_FI_DA_HU 20051007 */
- default:
- PRINT_INFORMATION(("nWARNING: Control should never come here."));
- }
- if (ami != NULL)
- {
- ami->x = dm_multiline_inputbox_info->s16X + 2;
- ami->y = dm_multiline_inputbox_info->s16Y + dm_multiline_inputbox_info->s16Height - MMI_multitap_height; /* This should be with wrt to Multiline inputbox */
- /* ami->y = dm_cat_scr_info->s16Y1 + dm_multiline_inputbox_info->coordinate.s16Height; //This is with respect to starting of the category screen which is 0 by default so dm_cat_scr_info.s32Y1 is added */
- ami->width = dm_multiline_inputbox_info->s16Width - 4;
- ami->height = MMI_multitap_height;
- }
- }
- } /* end of dm_update_multitap_coordinates */
- /*****************************************************************************
- * FUNCTION
- * dm_register_category_controlled_callback
- * DESCRIPTION
- * Register the callback function for category controlled area
- * PARAMETERS
- * f [IN] Callback function
- * RETURNS
- * void
- *****************************************************************************/
- void dm_register_category_controlled_callback(void (*f) (dm_coordinates *coordinate))
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- dm_category_controlled_area_callback = f;
- } /* end of dm_register_category_controlled_callback */
- /*****************************************************************************
- * FUNCTION
- * dm_register_category_controlled2_callback
- * DESCRIPTION
- * Register the callback function for category controlled area2
- * PARAMETERS
- * f [IN] Callback function
- * RETURNS
- * void
- *****************************************************************************/
- void dm_register_category_controlled2_callback(void (*f) (dm_coordinates *coordinate))
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- dm_category_controlled_area2_callback = f;
- } /* end of dm_register_category_controlled_callback */
- /*****************************************************************************
- * FUNCTION
- * dm_reset_category_controlled_callback
- * DESCRIPTION
- * Reset the callback function for category controlled area.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void dm_reset_category_controlled_callback(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- dm_category_controlled_area_callback = NULL;
- dm_category_controlled_area2_callback = NULL;
- } /* end of dm_reset_category_controlled_callback */
- #ifdef __MMI_SUBLCD__
- /*****************************************************************************
- * FUNCTION
- * dm_register_sub_category_controlled_callback
- * DESCRIPTION
- * Register the callback function for category controlled area
- * PARAMETERS
- * f [IN] Callback function
- * RETURNS
- * void
- *****************************************************************************/
- void dm_register_sub_category_controlled_callback(void (*f) (dm_coordinates *coordinate))
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- dm_sub_category_controlled_area_callback = f;
- } /* end of dm_register_sub_category_controlled_callback */
- /*****************************************************************************
- * FUNCTION
- * dm_reset_sub_category_controlled_callback
- * DESCRIPTION
- * Reset the callback function for category controlled area.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void dm_reset_sub_category_controlled_callback(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- dm_sub_category_controlled_area_callback = NULL;
- } /* end of dm_reset_sub_category_controlled_callback */
- #endif /* __MMI_SUBLCD__ */
- /*****************************************************************************
- * FUNCTION
- * dm_reset_str_image
- * DESCRIPTION
- * This function ius used to reset the image and string areas count to 0.
- * PARAMETERS
- * void
- * UICtrlAccessPtr_p(?) [IN/OUT] It specifies the start position to take out the coordinates.
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- void dm_reset_str_image(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- dm_string_count = 0;
- dm_image_count = 0;
- dm_back_fill_count = 0;
- dm_rectangle_count = 0;
- dm_line_count = 0;
- }
- #if (0)
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* 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 /* (0) */
- /*****************************************************************************
- * FUNCTION
- * dm_add_image
- * DESCRIPTION
- * This function is used to add image data. To be called by Category Screen
- * PARAMETERS
- * img [IN]
- * image_name [IN]
- * background [IN] Background Fill for the image
- * transparent_color(?) [IN] Transparent Color for the Image
- * image(?) [IN] Image to be displayed.
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- void dm_add_image(PU8 img, UI_string_type image_name, UI_filled_area *background)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- GDI_HANDLE act_lcd_handle;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* img & image_name can't be NULL at the same time */
- /* MMI_ASSERT ( img!=NULL || image_name!=NULL ); */
- gdi_lcd_get_active(&act_lcd_handle);
- #ifdef __MMI_SUBLCD__
- if (act_lcd_handle == GDI_LCD_SUB_LCD_HANDLE)
- {
- MMI_ASSERT(dm_image_count_sub < DM_MAX_SUBLCD_IMAGES);
- dm_image_array_sub[dm_image_count_sub].back_fill = background;
- dm_image_array_sub[dm_image_count_sub].image = (PU8) img;
- dm_image_array_sub[dm_image_count_sub].name = image_name;
- dm_image_array_sub[dm_image_count_sub++].image_handle = GDI_ERROR_HANDLE;
- }
- else
- #endif /* __MMI_SUBLCD__ */
- {
- MMI_ASSERT(dm_image_count < DM_MAX_IMAGES);
- dm_image_array[dm_image_count].back_fill = background;
- dm_image_array[dm_image_count].image = (PU8) img;
- dm_image_array[dm_image_count].name = image_name;
- dm_image_array[dm_image_count++].image_handle = GDI_ERROR_HANDLE;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * dm_get_image_handle
- * DESCRIPTION
- * This function is used to get the animation handle. To be called by Category Screen
- * PARAMETERS
- * count [IN] the nummer of the animation
- * RETURNS
- * gdi_handle
- *****************************************************************************/
- gdi_handle dm_get_image_handle(S32 count)//070706 Cylen, SWFlash
- {
- return dm_image_array[count].image_handle;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_change_image
- * DESCRIPTION
- * This function is used to change image data. To be called by Category Screen
- * PARAMETERS
- * image [IN] Image to be changed.
- * name [IN] Image Name to be changed
- * index [IN] Index in dm_image_struct
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- void dm_change_image(PU8 image, UI_string_type name, S32 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Only image or name should be changed at one time */
- // MMI_ASSERT ( ( name==NULL || image==NULL ) && ( name!= NULL || image!=NULL ) );
- // if ( ( name!=NULL && image!=NULL ) || ( name== NULL && image==NULL ) )
- // MMI_ASSERT(0);//Only one of two should be assigned.
- /* undefined image */
- MMI_ASSERT(index < dm_image_count);
- dm_image_array[index].image = image;
- dm_image_array[index].name = name;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_add_string
- * DESCRIPTION
- * This function is used to add string data. To be called by Category Screen
- * PARAMETERS
- * string [IN] String to be displayed.
- * font [IN] Font to be used to draw the string
- * text_color [IN] Text Color for the string
- * border_color [IN] Border Color for the string
- * background [IN] Background Fill for the string
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- void dm_add_string(
- UI_string_type string,
- UI_font_type font,
- color text_color,
- color border_color,
- UI_filled_area *background)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- GDI_HANDLE act_lcd_handle;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_lcd_get_active(&act_lcd_handle);
- #ifdef __MMI_SUBLCD__
- if (act_lcd_handle == GDI_LCD_SUB_LCD_HANDLE)
- {
- MMI_ASSERT(dm_string_count_sub < DM_MAX_SUBLCD_STRINGS);
- dm_string_array_sub[dm_string_count_sub].text_color = text_color;
- dm_string_array_sub[dm_string_count_sub].border_color = border_color;
- dm_string_array_sub[dm_string_count_sub].font = font;
- if (background)
- {
- dm_string_array_sub[dm_string_count_sub].back_fill = *background;
- }
- dm_string_array_sub[dm_string_count_sub++].string = string;
- }
- else
- #endif /* __MMI_SUBLCD__ */
- {
- MMI_ASSERT(dm_string_count < DM_MAX_STRINGS);
- dm_string_array[dm_string_count].text_color = text_color;
- dm_string_array[dm_string_count].border_color = border_color;
- dm_string_array[dm_string_count].font = font;
- if (background)
- {
- dm_string_array[dm_string_count].back_fill = *background;
- }
- dm_string_array[dm_string_count++].string = string;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * dm_reset_button_bar_coordinates
- * DESCRIPTION
- * This function resets button bar to its original height.
- * Reuired till all categories are moved to Draw Manager
- * PARAMETERS
- * void
- * UICtrlAccessPtr_p(?) [IN/OUT] It specifies the start position to take out the coordinates.
- * dm_image_info_struct I N/OUT image area coordinate info.(?)
- * RETURNS
- * void
- *****************************************************************************/
- void dm_reset_button_bar_coordinates(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- set_button_bar_height(MMI_BUTTON_BAR_HEIGHT);
- /* Right softkey always have UI_BUTTON_RIGHT_ALIGN */
- set_softkey_flags_off(UI_BUTTON_RIGHT_ALIGN, MMI_LEFT_SOFTKEY);
- set_softkey_flags_on(UI_BUTTON_LEFT_ALIGN, MMI_LEFT_SOFTKEY);
- #ifdef __MMI_WGUI_CSK_ENABLE__
- set_softkey_flags_off(UI_BUTTON_RIGHT_ALIGN, MMI_CENTER_SOFTKEY);
- #endif
- }
- /*****************************************************************************
- * FUNCTION
- * dm_add_back_fill_area
- * DESCRIPTION
- * This function is used to add back fill. To be called by Category Screen
- * PARAMETERS
- * background [IN] Background Fill for the area
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- void dm_add_back_fill_area(UI_filled_area *background)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (dm_back_fill_count >= DM_MAX_FILL_AREAS)
- {
- return;
- }
- dm_back_fill_array[dm_back_fill_count++] = background;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_add_rectangle
- * DESCRIPTION
- * This function is used to add rectangle. To be called by Category Screen
- * PARAMETERS
- * line_color [IN] Color for the reactangle
- * fill_rectangle [IN] In Whether the rectangle needs to be filled from inside
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- /* START VIJAY PMT 20050930 */
- void dm_add_rectangle(color line_color, dm_rectangle_fill_style fill_rectangle)
- /* END VIJAY PMT 20050930 */
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (dm_rectangle_count >= DM_MAX_RECTANGLES)
- {
- return;
- }
- dm_rectangle_array[dm_rectangle_count].fill_rectangle = fill_rectangle;
- dm_rectangle_array[dm_rectangle_count++].line_color = line_color;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_add_line
- * DESCRIPTION
- * This function is used to add line. To be called by Category Screen
- * PARAMETERS
- * line_color [IN] Color for the reactangle
- * *(?)
- * RETURNS
- * void
- *****************************************************************************/
- void dm_add_line(color line_color)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (dm_line_count >= DM_MAX_LINES)
- {
- return;
- }
- dm_line_array[dm_line_count++] = line_color;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_add_slide_control
- * DESCRIPTION
- * This function is used to add slide control. To be called by Category Screen
- * PARAMETERS
- * lower_limit [IN]
- * upper_limit [IN]
- * current_value [IN]
- * change_callback [IN]
- * label_string [?]
- * line_color(?) [IN] Color for the reactangle
- * RETURNS
- * void
- *****************************************************************************/
- void dm_add_slide_control(
- S32 lower_limit,
- S32 upper_limit,
- S32 current_value,
- void (*change_callback) (S32 value),
- U8 *label_string)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (dm_slide_control_count >= MMI_MAX_SLIDE_CONTROL)
- {
- MMI_ASSERT(dm_slide_control_count < MMI_MAX_SLIDE_CONTROL);
- return;
- }
- wgui_setup_slide_control(
- &MMI_slide_control[dm_slide_control_count],
- 0,
- 0,
- lower_limit,
- upper_limit,
- current_value,
- change_callback);
- set_slide_control_label(&MMI_slide_control[dm_slide_control_count++], label_string);
- }
- /*****************************************************************************
- * FUNCTION
- * dm_get_slide_control_count
- * DESCRIPTION
- * This function is used to get count of active slide controls. To be called by Category Screen
- * PARAMETERS
- * void
- * RETURNS
- * S32
- *****************************************************************************/
- S32 dm_get_slide_control_count(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return dm_slide_control_count;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_scroll_text_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void dm_scroll_text_handler(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_handle_scrolling_text(dm_current_scroll_text);
- }
- /*****************************************************************************
- * FUNCTION
- * dm_add_scroll_text
- * DESCRIPTION
- * This function is used to add scroll text. To be called by Category Screen
- * PARAMETERS
- * text [IN]
- * timer_callback [IN]
- * draw_background [IN]
- * text_color [IN]
- * border_color [IN]
- * line_color(?) [IN] Color for the reactangle
- * RETURNS
- * void
- *****************************************************************************/
- extern UI_string_type UI_strcpy(UI_string_type text1, UI_string_type text2);
- void dm_add_scroll_text(
- UI_string_type text,
- void (*timer_callback) (void),
- void (*draw_background) (S32 x1, S32 y1, S32 x2, S32 y2),
- color text_color,
- color border_color)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 string_width = 0, string_height = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (dm_scroll_text_count >= DM_MAX_SCROLL_TEXT)
- {
- MMI_ASSERT(dm_scroll_text_count < DM_MAX_SCROLL_TEXT);
- return;
- }
- if (text == NULL)
- {
- dm_scroll_text_buf[dm_scroll_text_count][0] = 0;
- dm_scroll_text_buf[dm_scroll_text_count][1] = 0;
- }
- else
- {
- UI_strcpy((UI_string_type) dm_scroll_text_buf[dm_scroll_text_count], text);
- dm_current_scroll_text = &dm_scroll_text[dm_scroll_text_count];
- gui_measure_string(text, &string_width, &string_height);
- gui_create_scrolling_text(
- dm_current_scroll_text,
- 20,
- 20,
- string_width,
- string_height,
- (UI_string_type) dm_scroll_text_buf[dm_scroll_text_count++],
- dm_scroll_text_handler,
- draw_background,
- text_color,
- border_color);
- if (text_color.r != border_color.r || text_color.g != border_color.g || text_color.b != border_color.b)
- {
- dm_current_scroll_text->flags |= UI_SCROLLING_TEXT_BORDERED_TEXT;
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * dm_add_button
- * DESCRIPTION
- * This function is used to add icon button. To be called by Category Screen
- * PARAMETERS
- * text [IN]
- * up_image [IN] Button up image
- * down_image [IN] Button down image
- * clear_fp [IN]
- * RETURNS
- * U16 index
- *****************************************************************************/
- U16 dm_add_button(UI_string_type text, PU8 up_image, PU8 down_image, gui_button_clear_background_hdlr clear_fp)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 curr_idx = dm_button_count++;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_create_icontext_button(&dm_button_array[curr_idx], -1, -1, -1, -1, text, up_image);
- dm_button_array[curr_idx].flags |= UI_BUTTON_DISABLE_BACKGND_DISPLAY | UI_BUTTON_SHIFT_BUTTON1;
- if (text != NULL)
- {
- dm_button_array[curr_idx].flags |= UI_BUTTON_CENTER_TEXT_X | UI_BUTTON_CENTER_TEXT_Y;
- }
- if (up_image != NULL || down_image != NULL)
- {
- dm_button_array[curr_idx].flags |= UI_BUTTON_CENTER_ICON_X | UI_BUTTON_CENTER_ICON_Y;
- }
- dm_button_array[curr_idx].clicked_down_icon = down_image;
- dm_button_array[curr_idx].clear_background_fp = clear_fp;
- return curr_idx;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_move_button
- * DESCRIPTION
- * This function is used to move icon button. To be called by Category Screen
- * PARAMETERS
- * index [IN] Index of dm_button_array
- * x [IN] X coordinate
- * y [IN] Y coordinate
- * RETURNS
- * void
- *****************************************************************************/
- void dm_move_button(U16 index, S32 x, S32 y)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_move_icontext_button(&dm_button_array[dm_button_count], x, y);
- }
- /*****************************************************************************
- * FUNCTION
- * dm_resize_button
- * DESCRIPTION
- * This function is used to move icon button. To be called by Category Screen
- * PARAMETERS
- * index [IN] Index of dm_button_array
- * width [IN] Width of icon button
- * height [IN] Height of icon button
- * RETURNS
- * void
- *****************************************************************************/
- void dm_resize_button(U16 index, S32 width, S32 height)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_resize_icontext_button(&dm_button_array[dm_button_count], width, height);
- dm_button_array[dm_button_count].icon_x = 0;
- dm_button_array[dm_button_count].icon_y = 0;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_redraw_button
- * DESCRIPTION
- * This function is used to redraw icon button. To be called by Category Screen
- * PARAMETERS
- * index [IN] Index of dm_button_array
- * RETURNS
- * void
- *****************************************************************************/
- void dm_redraw_button(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_show_icontext_button(&dm_button_array[dm_button_count]);
- }
- /*****************************************************************************
- * FUNCTION
- * dm_get_control_coordinates_from_category
- * DESCRIPTION
- * This function is used obtain the line coordinates.
- * PARAMETERS
- * S32ScrId [IN]
- * S32CatId [IN]
- * control [IN]
- * index [IN]
- * coordinate [?] Info.
- * UICtrlAccessPtr_p(?) [IN/OUT] It specifies the start position to take out the coordinates.
- * RETURNS
- * void
- *****************************************************************************/
- void dm_get_control_coordinates_from_category(
- S32 S32ScrId,
- S32 S32CatId,
- mmi_dm_control_ids_enum control,
- S32 index,
- dm_coordinates *coordinate)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 u8CtrlCt = 0;
- S32 u8NoOfUICtrls = 0;
- S16 *UICtrlAccessPtr_p = NULL, *DeafultCoordinateSet_p = NULL;
- typedef struct
- {
- dm_coordinates coordinates;
- S16 array[100];
- } temp_coordinates_struct;
- temp_coordinates_struct temp_coordinates;
- S32 idx = index;
- U8 *control_set_ptr;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- control_set_ptr = dm_search_control_set(S32CatId, &DeafultCoordinateSet_p);
- /* First element in Category-Controls map specifies the number of controls */
- u8NoOfUICtrls = control_set_ptr[0];
- if (S32ScrId >= 0)
- {
- UICtrlAccessPtr_p = dm_search_coordinate_set(S32ScrId);
- }
- if (UICtrlAccessPtr_p == NULL)
- {
- UICtrlAccessPtr_p = DeafultCoordinateSet_p;
- }
- /* Fist element in coordinate set specifies the coordinates of complete category screen */
- UICtrlAccessPtr_p = dm_get_cat_scr_coordinates(UICtrlAccessPtr_p, (dm_cat_scr_info_struct*) & temp_coordinates);
- for (u8CtrlCt = 1; u8CtrlCt <= u8NoOfUICtrls; u8CtrlCt++)
- {
- switch (control_set_ptr[u8CtrlCt])
- {
- case DM_BASE_LAYER_START:
- case DM_NEW_LAYER_END:
- case DM_BASE_CONTROL_SET1:
- case DM_ALIGNED_AREA_END:
- break;
- case DM_NEW_LAYER_START:
- {
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, (dm_coordinates*) & temp_coordinates);
- break;
- }
- case DM_CIRCULAR_MENU1:
- {
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, (dm_coordinates*) & temp_coordinates);
- break;
- }
- case DM_LIST1:
- {
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, (dm_coordinates*) & temp_coordinates);
- break;
- }
- case DM_DYNAMIC_LIST1:
- {
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, (dm_coordinates*) & temp_coordinates);
- break;
- }
- case DM_MATRIX_MENU1:
- {
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, (dm_coordinates*) & temp_coordinates);
- break;
- }
- case DM_MULTILINE_INPUTBOX1:
- {
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, (dm_coordinates*) & temp_coordinates);
- break;
- }
- case DM_DIALER_INPUT_BOX1:
- {
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, (dm_coordinates*) & temp_coordinates);
- break;
- }
- case DM_SINGLELINE_INPUTBOX1:
- {
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, (dm_coordinates*) & temp_coordinates);
- break;
- }
- case DM_LSK:
- case DM_RSK:
- {
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, (dm_coordinates*) & temp_coordinates);
- break;
- }
- case DM_TITLE1:
- {
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, (dm_coordinates*) & temp_coordinates);
- break;
- }
- case DM_CATEGORY_CONTROLLED_AREA:
- case DM_CATEGORY_CONTROLLED_AREA2:
- {
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, (dm_coordinates*) & temp_coordinates);
- break;
- }
- case DM_STATUS_BAR1:
- {
- UICtrlAccessPtr_p = dm_get_status_icon_bar_coordinates(UICtrlAccessPtr_p, (dm_status_info_struct*) & temp_coordinates);
- break;
- }
- case DM_BUTTON_BAR1:
- {
- UICtrlAccessPtr_p = dm_get_button_bar_coordinates(UICtrlAccessPtr_p, (dm_buttonbar_info_struct*) & temp_coordinates);
- break;
- }
- case DM_INLINE_FIXED_LIST1:
- {
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, (dm_coordinates*) & temp_coordinates);
- break;
- }
- case DM_ALIGNED_AREA_START:
- {
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, (dm_coordinates*) & temp_coordinates);
- break;
- }
- case DM_STRING:
- {
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, (dm_coordinates*) & temp_coordinates);
- if (control == control_set_ptr[u8CtrlCt])
- {
- idx--;
- }
- break;
- }
- case DM_IMAGE:
- {
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, (dm_coordinates*) & temp_coordinates);
- if (control == control_set_ptr[u8CtrlCt])
- {
- idx--;
- }
- break;
- }
- case DM_CALENDAR:
- {
- UICtrlAccessPtr_p = dm_get_calendar_coordinates(UICtrlAccessPtr_p, (dm_calendar_info_struct*) & temp_coordinates);
- break;
- }
- case DM_BACK_FILL_AREA:
- {
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, (dm_coordinates*) & temp_coordinates);
- if (control == control_set_ptr[u8CtrlCt])
- {
- idx--;
- }
- break;
- }
- case DM_RECTANGLE:
- {
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, (dm_coordinates*) & temp_coordinates);
- if (control == control_set_ptr[u8CtrlCt])
- {
- idx--;
- }
- break;
- }
- case DM_LINE:
- {
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, (dm_coordinates*) & temp_coordinates);
- if (control == control_set_ptr[u8CtrlCt])
- {
- idx--;
- }
- break;
- }
- case DM_SLIDE_CONTROL:
- {
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, (dm_coordinates*) & temp_coordinates);
- if (control == control_set_ptr[u8CtrlCt])
- {
- idx--;
- }
- break;
- }
- case DM_TYPICAL_STOPWATCH:
- {
- UICtrlAccessPtr_p = dm_get_coordinates(UICtrlAccessPtr_p, (dm_coordinates*) & temp_coordinates);
- break;
- }
- case DM_NWAY_STOPWATCH:
- {
- UICtrlAccessPtr_p = dm_get_typical_stopwatch_coordinates(
- UICtrlAccessPtr_p,
- (dm_typical_stopwatch_info_struct*) & temp_coordinates);
- break;
- }
- case DM_POPUP_BACKGROUND:
- {
- UICtrlAccessPtr_p = dm_get_nway_stopwatch_coordinates(
- UICtrlAccessPtr_p,
- (dm_nway_stopwatch_info_struct*) & temp_coordinates);
- break;
- }
- }
- if (idx == -1 && control == control_set_ptr[u8CtrlCt])
- {
- *coordinate = temp_coordinates.coordinates;
- return;
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * dm_create_layer
- * DESCRIPTION
- * This function is to create new layer which is not defined in control_set
- * PARAMETERS
- * x [IN] X-coordinate of new layer
- * y [IN] Y-coordinate of new layer
- * width [IN] Width of new layer
- * height [IN] Height of new layer
- * handle_ptr [?]
- * flags [IN] Flags to identify the index of new layer
- * RETURNS
- * GDI_RESULT result of create layer
- *****************************************************************************/
- GDI_RESULT dm_create_layer(S32 x, S32 y, S32 width, S32 height, gdi_handle *handle_ptr, U32 flags)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 idx = 0, act_layer_idx = 0, *act_dm_layers_count = NULL;
- U16 i = 0; //061506 double buffer
- GDI_HANDLE act_layer = GDI_ERROR_HANDLE, *act_dm_layers = NULL;
- GDI_RESULT ret = 0;
- gdi_handle act_lcd_handle;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_lcd_get_active(&act_lcd_handle);
- #ifdef __MMI_SUBLCD__
- if (act_lcd_handle == GDI_LCD_SUB_LCD_HANDLE)
- {
- act_dm_layers = dm_layers_sub;
- act_dm_layers_count = &dm_layers_count_sub;
- }
- else if (act_lcd_handle == GDI_LCD_MAIN_LCD_HANDLE)
- #endif /* __MMI_SUBLCD__ */
- {
- act_dm_layers = dm_layers;
- act_dm_layers_count = &dm_layers_count;
- }
- switch (flags)
- {
- case DM_LAYER_BOTTOM:
- /* move each layer forward */
- /* 061506 double buffer Start */
- for (idx = *act_dm_layers_count; idx > 0; idx--)
- {
- act_dm_layers[idx] = act_dm_layers[idx-1];
- }
- /* 061506 double buffer End */
- /* create new layer using GDI APIs */
- ret = gdi_layer_create(x, y, width, height, &act_dm_layers[0]);
- *handle_ptr = act_dm_layers[0];
- (*act_dm_layers_count)++;
- break;
- case DM_LAYER_TOP:
- /* create new layer using GDI APIs */
- ret = gdi_layer_create(x, y, width, height, &act_dm_layers[*act_dm_layers_count]);
- *handle_ptr = act_dm_layers[(*act_dm_layers_count)];
- (*act_dm_layers_count)++;
- break;
- case DM_LAYER_ACTIVE_TOP:
- /* get active layer handle */
- gdi_layer_get_active(&act_layer);
- /* find out active layer index in dm_layers */
- for (idx = 0; idx < *act_dm_layers_count; idx++)
- if (act_dm_layers[idx] == act_layer)
- {
- break;
- }
- act_layer_idx = idx;
- /* move each layer forward */
- /* 061506 double buffer Start */
- for (i = *act_dm_layers_count; i > idx; i--)
- {
- act_dm_layers[i] = act_dm_layers[i-1];
- }
- /* 061506 double buffer End */
- (*act_dm_layers_count)++;
- /* create new layer using GDI APIs */
- ret = gdi_layer_create(x, y, width, height, &act_dm_layers[act_layer_idx]);
- *handle_ptr = act_dm_layers[act_layer_idx];
- break;
- case DM_LAYER_ACTIVE_BOTTOM:
- if (*act_dm_layers_count == 0)
- {
- act_layer_idx = 0;
- ret = gdi_layer_create(x, y, width, height, &act_dm_layers[act_layer_idx]);
- *act_dm_layers_count = 1;
- *handle_ptr = act_dm_layers[act_layer_idx];
- break;
- }
- /* get active layer handle */
- gdi_layer_get_active(&act_layer);
- /* find out active layer index in dm_layers */
- for (idx = 0; idx < *act_dm_layers_count; idx++)
- if (act_dm_layers[idx] == act_layer)
- {
- break;
- }
- act_layer_idx = ++idx;
- /* move each layer forward */
- /* 061506 double buffer Start */
- for (i = *act_dm_layers_count; i > idx; i--)
- {
- act_dm_layers[i] = act_dm_layers[i-1];
- }
- /* 061506 double buffer End */
- (*act_dm_layers_count)++;
- /* create new layer using GDI APIs */
- ret = gdi_layer_create(x, y, width, height, &act_dm_layers[act_layer_idx]);
- *handle_ptr = act_dm_layers[act_layer_idx];
- break;
- }
- gdi_layer_set_blt_layer(act_dm_layers[0], act_dm_layers[1], act_dm_layers[2], act_dm_layers[3]);
- return ret;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_create_layer_using_outside_memory
- * DESCRIPTION
- * This function is to create new layer which is not defined in control_set and use outside memory
- * PARAMETERS
- * x [IN] X-coordinate of new layer
- * y [IN] Y-coordinate of new layer
- * width [IN] Width of new layer
- * height [IN] Height of new layer
- * handle_ptr [IN]
- * outside_memory [IN] Outside memory pointer
- * outside_memory_size [IN] Outside memory size
- * flags [IN] Flags to identify the index of new layer
- * RETURNS
- * void
- *****************************************************************************/
- GDI_RESULT dm_create_layer_using_outside_memory(
- S32 x,
- S32 y,
- S32 width,
- S32 height,
- gdi_handle **handle_ptr,
- U8 *outside_memory,
- S32 outside_memory_size,
- U32 flags)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 idx = 0, act_layer_idx = 0, *act_dm_layers_count = NULL;
- U16 i = 0; //061506 double buffer
- GDI_HANDLE act_layer = GDI_ERROR_HANDLE, *act_dm_layers = NULL;
- GDI_RESULT ret = 0;
- gdi_handle act_lcd_handle;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_lcd_get_active(&act_lcd_handle);
- #ifdef __MMI_SUBLCD__
- if (act_lcd_handle == GDI_LCD_SUB_LCD_HANDLE)
- {
- act_dm_layers = dm_layers_sub;
- act_dm_layers_count = &dm_layers_count_sub;
- }
- else if (act_lcd_handle == GDI_LCD_MAIN_LCD_HANDLE)
- #endif /* __MMI_SUBLCD__ */
- {
- act_dm_layers = dm_layers;
- act_dm_layers_count = &dm_layers_count;
- }
- switch (flags)
- {
- case DM_LAYER_BOTTOM:
- /* move each layer forward */
- /* 061506 double buffer Start */
- for (idx = *act_dm_layers_count; idx > 0; idx--)
- {
- act_dm_layers[idx] = act_dm_layers[idx-1];
- }
- /* 061506 double buffer End */
- /* create new layer using GDI APIs */
- ret = gdi_layer_create_using_outside_memory(
- x,
- y,
- width,
- height,
- &act_dm_layers[0],
- outside_memory,
- outside_memory_size);
- (*act_dm_layers_count)++;
- *handle_ptr = &act_dm_layers[0];
- break;
- case DM_LAYER_TOP:
- /* create new layer using GDI APIs */
- ret = gdi_layer_create_using_outside_memory(
- x,
- y,
- width,
- height,
- &act_dm_layers[*act_dm_layers_count],
- outside_memory,
- outside_memory_size);
- *handle_ptr = &act_dm_layers[*act_dm_layers_count];
- (*act_dm_layers_count)++;
- break;
- case DM_LAYER_ACTIVE_TOP:
- /* get active layer handle */
- gdi_layer_get_active(&act_layer);
- /* find out active layer index in dm_layers */
- for (idx = 0; idx < *act_dm_layers_count; idx++)
- if (act_dm_layers[idx] == act_layer)
- {
- break;
- }
- act_layer_idx = idx;
- /* move each layer forward */
- /* 061506 double buffer Start */
- for (i = *act_dm_layers_count; i > idx; i--)
- {
- act_dm_layers[i] = act_dm_layers[i-1];
- }
- /* 061506 double buffer End */
- (*act_dm_layers_count)++;
- /* create new layer using GDI APIs */
- ret = gdi_layer_create_using_outside_memory(
- x,
- y,
- width,
- height,
- &act_dm_layers[act_layer_idx],
- outside_memory,
- outside_memory_size);
- *handle_ptr = &act_dm_layers[act_layer_idx];
- break;
- case DM_LAYER_ACTIVE_BOTTOM:
- /* get active layer handle */
- gdi_layer_get_active(&act_layer);
- /* find out active layer index in dm_layers */
- for (idx = 0; idx < *act_dm_layers_count; idx++)
- if (act_dm_layers[idx] == act_layer)
- {
- break;
- }
- act_layer_idx = ++idx;
- /* move each layer forward */
- /* 061506 double buffer Start */
- for (i = *act_dm_layers_count; i > idx; i--)
- {
- act_dm_layers[i] = act_dm_layers[i-1];
- }
- /* 061506 double buffer End */
- (*act_dm_layers_count)++;
- /* create new layer using GDI APIs */
- ret = gdi_layer_create_using_outside_memory(
- x,
- y,
- width,
- height,
- &act_dm_layers[act_layer_idx],
- outside_memory,
- outside_memory_size);
- *handle_ptr = &act_dm_layers[act_layer_idx];
- break;
- }
- gdi_layer_set_blt_layer(act_dm_layers[0], act_dm_layers[1], act_dm_layers[2], act_dm_layers[3]);
- return ret;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_add_blt_layer
- * DESCRIPTION
- * This function is to add new layer into blt layer list
- * PARAMETERS
- * handle_ptr [IN] New layer handle
- * flags [IN] Flags to identify the index of new layer
- * RETURNS
- * MMI_BOOL result of adding layer
- *****************************************************************************/
- MMI_BOOL dm_add_blt_layer(gdi_handle handle_ptr, U32 flags)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 idx = 0, act_layer_idx = 0, *act_dm_layers_count = NULL;
- U16 i = 0; //061506 double buffer
- GDI_HANDLE act_layer = GDI_ERROR_HANDLE, *act_dm_layers = NULL;
- gdi_handle act_lcd_handle;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_lcd_get_active(&act_lcd_handle);
- #ifdef __MMI_SUBLCD__
- if (act_lcd_handle == GDI_LCD_SUB_LCD_HANDLE)
- {
- act_dm_layers = dm_layers_sub;
- act_dm_layers_count = &dm_layers_count_sub;
- }
- else if (act_lcd_handle == GDI_LCD_MAIN_LCD_HANDLE)
- #endif /* __MMI_SUBLCD__ */
- {
- act_dm_layers = dm_layers;
- act_dm_layers_count = &dm_layers_count;
- }
- for (idx = 0; idx < *act_dm_layers_count; idx++)
- {
- if (act_dm_layers[idx] == handle_ptr)
- {
- return MMI_FALSE;
- }
- }
- switch (flags)
- {
- case DM_LAYER_BOTTOM:
- /* move each layer forward */
- /* 061506 double buffer Start */
- for (idx = *act_dm_layers_count; idx > 0; idx--)
- {
- act_dm_layers[idx] = act_dm_layers[idx-1];
- }
- /* 061506 double buffer End */
- act_dm_layers[0] = handle_ptr;
- (*act_dm_layers_count)++;
- break;
- case DM_LAYER_TOP:
- act_dm_layers[(*act_dm_layers_count)] = handle_ptr;
- (*act_dm_layers_count)++;
- break;
- case DM_LAYER_ACTIVE_TOP:
- /* get active layer handle */
- gdi_layer_get_active(&act_layer);
- /* find out active layer index in dm_layers */
- for (idx = 0; idx < *act_dm_layers_count; idx++)
- if (act_dm_layers[idx] == act_layer)
- {
- break;
- }
- act_layer_idx = idx;
- /* move each layer forward */
- /* 061506 double buffer Start */
- for (i = *act_dm_layers_count; i > idx; i--)
- {
- act_dm_layers[i] = act_dm_layers[i-1];
- }
- /* 061506 double buffer End */
- (*act_dm_layers_count)++;
- act_dm_layers[act_layer_idx] = handle_ptr;
- break;
- case DM_LAYER_ACTIVE_BOTTOM:
- /* get active layer handle */
- gdi_layer_get_active(&act_layer);
- /* find out active layer index in dm_layers */
- for (idx = 0; idx < *act_dm_layers_count; idx++)
- if (act_dm_layers[idx] == act_layer)
- {
- break;
- }
- act_layer_idx = ++idx;
- /* move each layer forward */
- /* 061506 double buffer Start */
- for (i = *act_dm_layers_count; i > idx; i--)
- {
- act_dm_layers[i] = act_dm_layers[i-1];
- }
- /* 061506 double buffer End */
- (*act_dm_layers_count)++;
- act_dm_layers[act_layer_idx] = handle_ptr;
- break;
- }
- gdi_layer_set_blt_layer(act_dm_layers[0], act_dm_layers[1], act_dm_layers[2], act_dm_layers[3]);
- return MMI_TRUE;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_set_blt_layer
- * DESCRIPTION
- * This function is to set blt layer sequence
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- GDI_RESULT dm_set_blt_layer(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return gdi_layer_set_blt_layer(dm_layers[0], dm_layers[1], dm_layers[2], dm_layers[3]);
- }
- /* Leo start 20050722, add button control */
- /*****************************************************************************
- * FUNCTION
- * dm_register_button_functions
- * DESCRIPTION
- * set handling functions of buttons
- * PARAMETERS
- * button_index [IN] Index of dm_button_array
- * key_type [IN] Key event type
- * f [IN] Handling function pointer
- * RETURNS
- * void
- *****************************************************************************/
- void dm_register_button_functions(U16 button_index, U16 key_type, FuncPtr f)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_ASSERT(button_index < DM_MAX_BUTTONS);
- dm_button_func_ptrs[button_index][key_type] = f;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_reset_button_functions
- * DESCRIPTION
- * reset handling functions of buttons
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void dm_reset_button_functions(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 button_index, key_type = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- for (button_index = 0; button_index < DM_MAX_BUTTONS; button_index++)
- for (key_type = 0; key_type < MAX_KEY_TYPE; key_type++)
- {
- dm_button_func_ptrs[button_index][key_type] = NULL;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * dm_execute_button_handler
- * DESCRIPTION
- * Execute left softkey handler from pen
- * PARAMETERS
- * btn_index [IN]
- * key_type [IN] - KEY_EVENT_DOWN, KEY_EVENT_UP, KEY_LONG_PRESS
- * RETURNS
- * void
- *****************************************************************************/
- void dm_execute_button_handler(U16 btn_index, U16 key_type)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_ASSERT(btn_index < DM_MAX_BUTTONS);
- MMI_ASSERT(key_type < MAX_KEY_TYPE);
- if (dm_button_func_ptrs[btn_index][key_type] != NULL)
- {
- dm_button_func_ptrs[btn_index][key_type] ();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * dm_is_redraw_screen
- * DESCRIPTION
- * Execute left softkey handler from pen
- * PARAMETERS
- * void
- * key_type - KEY_EVENT_DOWN, KEY_EVENT_UP, KEY_LONG_PRESS(?)
- * RETURNS
- * void
- *****************************************************************************/
- MMI_BOOL dm_is_redraw_screen(void)
- {
- #ifdef __MMI_SUBLCD__
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_dm_data.s32flags == DM_SUB_LCD_CONTEXT)
- {
- if (g_dm_cntx.redraw_screen_sub == REDRAW_2_REDRAW)
- {
- return MMI_TRUE;
- }
- else
- {
- return MMI_FALSE;
- }
- }
- else
- #endif /* __MMI_SUBLCD__ */
- {
- if (g_dm_cntx.redraw_screen_main == REDRAW_2_REDRAW)
- {
- return MMI_TRUE;
- }
- else
- {
- return MMI_FALSE;
- }
- }
- }
- #ifdef __MMI_TOUCH_SCREEN__
- /*****************************************************************************
- * FUNCTION
- * dm_check_image_bound
- * DESCRIPTION
- * check image bounder controlled by draw manager
- * PARAMETERS
- * index [IN] Index of images
- * point [IN] Pen point
- * RETURNS
- * void
- *****************************************************************************/
- MMI_BOOL dm_check_image_bound(U16 index, mmi_pen_point_struct point)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (PEN_CHECK_BOUND(
- point.x,
- point.y,
- dm_image_array[index].x,
- dm_image_array[index].y,
- dm_image_array[index].width,
- dm_image_array[index].height));
- }
- #endif /* __MMI_TOUCH_SCREEN__ */
- /*****************************************************************************
- * FUNCTION
- * dm_get_layer_handle
- * DESCRIPTION
- *
- * PARAMETERS
- * index [IN]
- * RETURNS
- *
- *****************************************************************************/
- GDI_HANDLE dm_get_layer_handle(U8 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return dm_layers[index];
- }
- /*****************************************************************************
- * FUNCTION
- * dm_get_layer_handle_ptr
- * DESCRIPTION
- *
- * PARAMETERS
- * index [IN]
- * RETURNS
- *
- *****************************************************************************/
- GDI_HANDLE *dm_get_layer_handle_ptr(U8 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return &(dm_layers[index]);
- }
- /*****************************************************************************
- * FUNCTION
- * dm_add_percentage_bar
- * DESCRIPTION
- *
- * PARAMETERS
- * init_value [IN]
- * string [IN]
- * bar_color [IN]
- * bg_image [IN]
- * left_side_image [IN]
- * right_side_image [IN]
- * RETURNS
- *
- *****************************************************************************/
- U16 dm_add_percentage_bar(U16 init_value, U8 *string, color bar_color, U16 bg_image, U16 left_side_image, U16 right_side_image)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_percentage_bar_struct *act_bar = &dm_percentage_bar_array[dm_percentage_bar_count];
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- act_bar->value = init_value;
- act_bar->bar_color = bar_color;
- act_bar->bg_image = bg_image;
- act_bar->left_side_image = left_side_image;
- act_bar->right_side_image = right_side_image;
- act_bar->progres_string = string;
- return dm_percentage_bar_count++;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_update_percentage_bar_value
- * DESCRIPTION
- *
- * PARAMETERS
- * id [IN]
- * value [IN]
- * string [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void dm_update_percentage_bar_value(S32 id, U16 value, U8* string)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- dm_percentage_bar_array[id].value = value;
- dm_percentage_bar_array[id].progres_string = string;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_change_percentage_bar_color
- * DESCRIPTION
- *
- * PARAMETERS
- * id [IN]
- * c [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void dm_change_percentage_bar_color(S32 id, color c)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- dm_percentage_bar_array[id].bar_color = c;
- }
- /*****************************************************************************
- * FUNCTION
- * dm_redraw_percentage_bar
- * DESCRIPTION
- *
- * PARAMETERS
- * id [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void dm_redraw_percentage_bar(S32 id)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_percentage_bar_struct *act_bar = &dm_percentage_bar_array[id];
- S32 x = act_bar->x;
- S32 y = act_bar->y;
- S32 width = act_bar->width;
- S32 height = act_bar->height;
- U16 str_buf[5];
- S32 str_width = 0, str_height = 0;
- S32 img_x = 0, img_y = 0;
- S32 img_width = 0, img_height = 0;
- S32 left_image_width = 0, left_image_height = 0;
- S32 right_image_width = 0, right_image_height = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (act_bar->progres_string == NULL)
- {
- gui_itoa(act_bar->value, (UI_string_type) & str_buf, 10);
- UCS2StrAppendChar((S8*)&str_buf,'%');
- gui_measure_string((UI_string_type) str_buf, &str_width, &str_height);
- }
- else
- {
- gui_measure_string((UI_string_type) act_bar->progres_string, &str_width, &str_height);
- }
- gdi_image_get_dimension_id(act_bar->bg_image, &img_width, &img_height);
- gdi_image_get_dimension_id(act_bar->left_side_image, &left_image_width, &left_image_height);
- gdi_image_get_dimension_id(act_bar->right_side_image, &right_image_width, &right_image_height);
- /* clear background */
- gdi_draw_solid_rect(x, y, x + width - 1, y + height - 1, GDI_COLOR_TRANSPARENT);
- /* update text */
- if (r2lMMIFlag)
- {
- gui_move_text_cursor(x + ((width - str_width) >> 1) + str_width, y + ((height - str_height - img_height) / 3));
- }
- else
- {
- gui_move_text_cursor(x + ((width - str_width) >> 1), y + ((height - str_height - img_height) / 3));
- }
- gui_set_text_color(gui_color(0,0,0));
- if (act_bar->progres_string == NULL)
- {
- gui_print_text((UI_string_type) str_buf);
- }
- else
- {
- gui_print_text((UI_string_type) act_bar->progres_string);
- }
- /* update image */
- img_x = x + ((width - img_width - left_image_width - right_image_width) >> 1);
- img_y = y + height - ((height - str_height - img_height) / 3 + img_height);
- gdi_draw_solid_rect(
- img_x + left_image_width,
- img_y + 1,
- img_x + left_image_width + ((img_width * act_bar->value) / 100),
- img_y + img_height - 2,
- gdi_act_color_from_rgb(255, act_bar->bar_color.r, act_bar->bar_color.g, act_bar->bar_color.b));
- gdi_image_draw(img_x, img_y, (U8*) get_image(act_bar->left_side_image));
- gdi_image_draw(img_x + left_image_width - 1, img_y, (U8*) get_image(act_bar->bg_image));
- gdi_image_draw(img_x + left_image_width + img_width - 1, img_y, (U8*) get_image(act_bar->right_side_image));
- gdi_layer_blt_previous(x, y, x + width - 1, y + height - 1);
- }
- #endif /* __MMI_DRAW_MANAGER__ */