📄 themeconverterui.c
字号:
{0, 0, 0, 100},
{0, 0, 0, 100},
{128, 128, 128, 100},
0
};
UI_filled_area alarm_background_filler_DLT =
{
UI_FILLED_AREA_TYPE_COLOR,
UI_NULL_IMAGE,
NULL,
{255, 00, 255, 100},
{0, 0, 0, 100},
{0, 0, 0, 100},
{128, 128, 128, 100},
0
};
/******************************************************************************/
/****************************button fonts objects*********************************/
stFontAttribute butt_font;
/* UI_font_type button_font = &butt_font;//=(stFontAttribute*)malloc(sizeof(stFontAttribute)); */
stFontAttribute matrix_menu_font; /* =(stFontAttribute*)malloc(sizeof(stFontAttribute));; */
stFontAttribute multitap_font;
stFontAttribute inputbox_font;
stFontAttribute window_title_font;
stFontAttribute list_menu_font;
stFontAttribute menu_bar_index_font;
stFontAttribute menu_bar_item_font;
stFontAttribute shortcut_indicator_font;
stFontAttribute title_text_font;
stFontAttribute drop_down_control_font;
stFontAttribute list_main_menu_font;
stFontAttribute matrix_main_menu_font;
stFontAttribute virtual_keyboard_font;
S32 scrollbar_size;
S32 bg_opacity_full_DLT;
/********************************************************************************/
/****************************************************************************
MMI theme structure filled using the Downloaded theme file
*****************************************************************************/
MMI_theme g_tc_theme_DLT =
{
(UI_filled_area *)&LSK_up_DLT,
(UI_filled_area *)&LSK_down_DLT,
(UI_filled_area *)&LSK_disabled_filler,
(UI_filled_area *)&RSK_up_DLT,
(UI_filled_area *)&RSK_down_DLT,
(UI_filled_area *)&RSK_disabled_filler,
(UI_filled_area *)&multitap_filler,
(UI_filled_area *)&inputbox_filler_DLT,
(UI_filled_area *)&scrollbar_background_filler_DLT,
(UI_filled_area *)&scrollbar_indicator_filler,
(UI_filled_area *)&Title_DLT,
(UI_filled_area *)&list_background_filler,
(UI_filled_area *)&list_normal_item_filler,
(UI_filled_area *)&list_selected_item_filler,
(UI_filled_area *)&list_disabled_item_filler,
(UI_filled_area *)&matrix_background_filler,
(UI_filled_area *)&matrix_normal_item_filler,
(UI_filled_area *)&matrix_selected_item_filler,
(UI_filled_area *)&matrix_disabled_item_filler,
(UI_filled_area *)&shortcut_indicator_background_filler,
(UI_filled_area *)&formatted_inputbox_normal_filler,
(UI_filled_area *)&formatted_inputbox_selected_filler,
(UI_filled_area *)&main_menu_background_filler_DLT,
(UI_filled_area *)&list_main_menu_normal_item_filler_DLT,
(UI_filled_area *)&list_main_menu_selected_item_filler_DLT,
(UI_filled_area *)&list_main_menu_disabled_item_filler_DLT,
(UI_filled_area *)&matrix_main_menu_normal_item_filler_DLT,
(UI_filled_area *)&matrix_main_menu_selected_item_filler_DLT,
(UI_filled_area *)&matrix_main_menu_disabled_item_filler_DLT,
(UI_filled_area *)&general_background_filler,
(UI_filled_area *)&popup_description_background_filler,
(UI_filled_area *)&inline_list_background_filler,
(UI_filled_area *)&inline_list_normal_item_filler,
(UI_filled_area *)&inline_list_selected_item_filler,
(UI_filled_area *)&inline_list_disabled_item_filler,
(UI_filled_area *)&inline_edit_focussed_filler,
(UI_filled_area *)&inline_edit_unfocussed_filler,
(UI_filled_area *)&inline_edit_noboundary_filler,
(UI_filled_area *)&PIN_inputbox_background_filler_DLT,
(UI_filled_area *)&PIN_screen_background_filler_DLT,
(UI_filled_area *)&network_screen_background_filler,
(UI_filled_area *)&aphorism_screen_background_filler,
(UI_filled_area *)&CM_screen_background_filler,
(UI_filled_area *)&progress_screen_background_filler,
(UI_filled_area *)&dialer_inputbox_background_filler,
(UI_filled_area *)&virtual_keyboard_key_down_filler,
(UI_filled_area *)&alarm_background_filler_DLT,
#ifdef UI_SMALL_LIST_SCREEN
NULL,
NULL,
#endif /* UI_SMALL_LIST_SCREEN */
(color *) & UI_black_color,
(color *) & UI_white_color,
(color *) & lite_disp_scr_bg_color_DLT,
(color *) & LSK_up_txt_col_DLT,
(color *) & LSK_down_txt_col_DLT,
(color *) & LSK_disabled_text_color,
(color *) & RSK_up_txt_col_DLT,
(color *) & RSK_down_txt_col_DLT,
(color *) & RSK_disabled_text_color,
(color *) & multitap_selector_color_DLT,
(color *) & multitap_normal_text_color_DLT,
(color *) & multitap_selected_text_color_DLT,
(color *) & inputbox_normal_text_color_DLT,
(color *) & inputbox_selected_text_color_DLT,
(color *) & inputbox_selector_color_DLT,
(color *) & inputbox_cursor_color_DLT,
(color *) & title_text_color,
(color *) & title_text_border_color,
(color *) & title_shortcut_text_color,
(color *) & list_normal_text_color,
(color *) & list_selected_text_color,
(color *) & list_disabled_text_color,
(color *) & matrix_normal_text_color,
(color *) & matrix_selected_text_color,
(color *) & matrix_disabled_text_color,
(color *) & menubar_index_background_color,
(color *) & menubar_item_background_color,
(color *) & menubar_index_text_color,
(color *) & menubar_item_text_color,
(color *) & shortcut_indicator_text_color,
(color *) & shortcut_indicator_cursor_color,
(color *) & drop_down_normal_text_color,
(color *) & drop_down_disabled_text_color,
(color *) & drop_down_focussed_text_color,
(color *) & formatted_inputbox_selector_color,
(color *) & formatted_inputbox_normal_text_color,
(color *) & formatted_inputbox_disabled_text_color,
(color *) & formatted_inputbox_selected_text_color,
(color *) & formatted_inputbox_cursor_color,
(color *) & list_main_menu_normal_text_color,
(color *) & list_main_menu_selected_text_color,
(color *) & list_main_menu_disabled_text_color,
(color *) & matrix_main_menu_normal_text_color,
(color *) & matrix_main_menu_selected_text_color,
(color *) & matrix_main_menu_disabled_text_color,
(color *) & circular_main_menu_normal_text_color,
(color *) & circular_main_menu_selected_text_color,
(color *) & circular_main_menu_disabled_text_color,
(color *) & popup_screen_background_color,
(color *) & popup_screen_border_color,
(color *) & CM_screen_text_color,
(color *) & popup_description_text_color,
(color *) & datetime_bar_background_color,
(color *) & datetime_bar_duration_background_color,
(color *) & datetime_bar_date_text_color,
(color *) & datetime_bar_time_text_color,
(color *) & datetime_bar_duration_text_color,
(color *) & datetime_bar_AOC_text_color,
(color *) & button_bar_color,
(color *) & information_bar_color,
(color *) & input_method_text_color,
(color *) & remaining_length_text_color,
(color *) & statusbar0_background_color,
(color *) & inline_edit_focussed_text_color,
(color *) & inline_edit_unfocussed_text_color,
(color *) & inline_edit_selected_text_color,
(color *) & inline_edit_selector_color,
(color *) & inline_edit_cursor_color,
(color *) & inline_list_normal_text_color,
(color *) & inline_list_selected_text_color,
(color *) & inline_list_disabled_text_color,
(color *) & PIN_inputbox_normal_text_color_DLT,
(color *) & PIN_inputbox_selected_text_color_DLT,
(color *) & PIN_inputbox_selector_color_DLT,
(color *) & PIN_inputbox_cursor_color_DLT,
(color *) & dialer_inputbox_normal_text_color_DLT,
(color *) & dialer_inputbox_selected_text_color_DLT,
(color *) & dialer_inputbox_selector_color_DLT,
(color *) & dialer_inputbox_cursor_color_DLT,
(color *) & virtual_keyboard_key_down_text_color,
(color *) & virtual_keyboard_key_up_text_color,
(color *) & virtual_keyboard_key_down_text_color,
(color *) & virtual_keyboard_key_up_text_color,
(color *) & virtual_keyboard_disp_area_text_color,
(color *) & calculator_theme_color,
(color *) & alarm_text_theme_color,
(color *) & idle_scr_date_color_DLT,
(color *) & idle_scr_time_color_DLT,
(color *) & idle_scr_date_border_color_DLT,
(color *) & idle_scr_time_border_color_DLT,
(color *) & idle_scr_network_name_color_DLT,
(color *) & idle_scr_network_name_border_color_DLT,
(color *) & idle_scr_network_status_color_DLT,
(color *) & idle_scr_network_status_border_color_DLT,
(color *) & idle_scr_network_extra_color_DLT,
(color *) & idle_scr_network_extra_border_color_DLT,
&butt_font,
&multitap_font,
&inputbox_font,
&window_title_font,
&list_menu_font,
&matrix_menu_font,
&menu_bar_index_font,
&menu_bar_item_font,
&shortcut_indicator_font,
&title_text_font,
&drop_down_control_font,
&list_main_menu_font,
&matrix_main_menu_font,
&virtual_keyboard_font,
10,
255, /*UI_BG_OPACITY_FULL_DEFAULT*/
90, /*UI_BG_OPACITY_HIGH_DEFAULT*/
70, /*UI_BG_OPACITY_MEDIUM_DEFAULT*/
40 /*UI_BG_OPACITY_LOW_DEFAULT*/
};
MMI_theme *g_tc_theme_converter_p = &g_tc_theme_DLT;
/*****************************************************************************
* FUNCTION
* mmi_tc_ascii_to_hex_convert
* DESCRIPTION
* (S8 character)
* converts a given character from ascii to hex value
* PARAMETERS
* character [IN] Value
* RETURNS
* hex equivalent of the ascii character
*****************************************************************************/
U8 mmi_tc_ascii_to_hex_convert(S8 character)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (character > 47 && character < 58) /* Digits 0..9 */
{
return (character - 48);
}
else if (character > 64 && character < 71) /* Characters A..F */
{
return (character - 55);
}
else if (character > 96 && character < 103) /* Characters a..f */
{
return (character - 87);
}
else
{
return (0xFF);
}
}
/*****************************************************************************
* FUNCTION
* mmi_tc_convert_ascii_hex_to_dec
* DESCRIPTION
* Converts Ascii value to Decimal value
* PARAMETERS
* character [IN] Ascii value
* RETURNS
* decimal equivalent of the ascii character
*****************************************************************************/
U8 mmi_tc_convert_ascii_hex_to_dec(S8 character)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (character > 47 && character < 58) /* Digits 0..9 */
{
return (character - 48);
}
else if (character > 64 && character < 71) /* Characters A..F */
{
return (character - 55);
}
else if (character > 96 && character < 103) /* Characters a..f */
{
return (character - 87);
}
else
{
return (0xFF);
}
}
/*****************************************************************************
* FUNCTION
* mmi_tc_extract_no_of_bits
* DESCRIPTION
* (U8 *Data,U16 Offset, U16 Bits)
* This function extracts given no of bits form the string provided
* PARAMETERS
* Data_p [?]
* Offset [IN]
* Bits [IN]
* character(?)
* RETURNS
* extracted number of bits
*****************************************************************************/
U8 mmi_tc_extract_no_of_bits(U8 *Data_p, U16 Offset, U16 Bits)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
const U16 BITSPERVAL = 4;
U8 ClearBits[] = {0x0, 0x1, 0x3, 0x7, 0xf};
U8 val1 = 0;
U8 val2 = 0;
U8 returnval = 0;
U16 index = Offset / BITSPERVAL;
U8 BitsfromFirstIndex = BITSPERVAL - (Offset % BITSPERVAL);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -