📄 wgui_datetime.c
字号:
U8 wgui_minutes_input_next_focus;
/* store the position of seconds input previous focus */
U8 wgui_seconds_input_previous_focus;
/* store the position of seconds input next focus */
U8 wgui_seconds_input_next_focus;
/* store the position of AM - PM input previous focus */
U8 wgui_AM_PM_input_previous_focus;
/* store the position of AM -= Pm input next focus */
U8 wgui_AM_PM_input_next_focus;
U8 wgui_seconds_input_enabled = 0;
U8 wgui_AM_PM_input_enabled = 0;
U8 wgui_date_input_enabled = 0;
U8 wgui_time_input_enabled = 0;
U8 show_date = 0;
MMI_BOOL main_lcd_update_date_time = MMI_TRUE;
#ifdef __MMI_SUBLCD__
MMI_BOOL sub_lcd_update_date_time = MMI_TRUE;
#endif
/* MTK Elvis for date boundary setting */
S32 g_date_year_max = 2030, g_date_year_min = 1970, g_date_month_max = 12, g_date_month_min = 1;
/* MTK end */
/* global variable of main lcd date objet */
UI_date_time_display main_LCD_dt_object;
#ifdef __MMI_SUBLCD__
/* global variable of sublcd lcd date objet city 1 */
UI_date_time_display sub_LCD_dt_object1;
/* global variable of sublcd lcd date objet city 2 */
UI_date_time_display sub_LCD_dt_object2;
SUBLCD_DATE_TIME_DISPLAY_TYPE sublcd_date_time_display_type;
#endif /* __MMI_SUBLCD__ */
/* PMT HIMANSHU START 20050721 */
#ifdef __MMI_UI_TECHNO_IDLESCREEN_BAR__
extern MMI_ID_TYPE idlescreen_bar_id;//070306 Alpha layer
U8 g_clock_type = ANALOG; /* default clock for Techno Idlescreen Bar */
U16 *day_string = NULL; /* pointer storing the address of the MMI_ID_TYPE of day string. */
#endif /* __MMI_UI_TECHNO_IDLESCREEN_BAR__ */
/* PMT HIMANSHU END 20050721 */
extern U16 GetTotalHoldCallCount(void);
extern S16 GetTotalActiveCallCount(void);
extern S32 UI_get_font_height(UI_font_type f);
extern void CheckCtrExpiry(MYTIME *last_time, MYTIME *curr_time);
extern MYTIME *GetStartCallTime(void);
extern MYTIME *GetCurrStartCallTime(void);
extern U8 PhnsetGetDateFormat(void);
extern U8 PhnsetGetTimeFormat(void);
extern UI_string_type UI_strcat(UI_string_type text1, UI_string_type text2);
extern UI_string_type UI_strcpy(UI_string_type text1, UI_string_type text2);
extern void (*gui_set_clip) (S32 x1, S32 y1, S32 x2, S32 y2);
/* Externals for graphics context switching */
extern bitmap main_LCD_device_bitmap; /* main lcd graphicd context */
extern bitmap sub_LCD_device_bitmap; /* sub lcd graphic context */
void UI_set_main_LCD_graphics_context(void); /* set main lcd graphic contrext */
void UI_set_sub_LCD_graphics_context(void); /* set sub lcd graphic cntext */
extern bitmap *current_LCD_device_bitmap; /* store current graphic context */
#ifdef __MMI_SUBLCD__
extern stFontAttribute MMI_sublcd_font;
extern S32 SUB_LCD_device_width;
extern void RedrawSubLCDAnalogClockScreen(void);
#endif /* __MMI_SUBLCD__ */
extern S32 ANALOG_CLOCK_DIAL_X;
extern S32 ANALOG_CLOCK_DIAL_Y;
/* MTK Tim */
extern void kal_get_time(U32 *ticks_ptr);
U32 last_duration_ticks;
U32 last_duration;
UI_time last_duration_time;
/*----------------------------------------------------------------------------
Function: wgui_date_time_input_callback
Description: a function pointer store teh address of function
of date time input callback
Input Parameters: none
Output Parameters: none
Returns: none
----------------------------------------------------------------------------*/
void (*wgui_date_time_input_callback) (void);
/* theme scheme of inline date time input box */
UI_single_line_input_box_theme wgui_date_time_input_theme = { (UI_filled_area *)&MMI_formatted_inputbox_normal_filler,
(UI_filled_area *)&MMI_formatted_inputbox_disabled_filler,
(UI_filled_area *)&MMI_formatted_inputbox_selected_filler,
{0, 0, 0, 100},
{128, 128, 128, 100},
{0, 0, 0, 100},
{255, 255, 255, 100},
{51, 88, 171, 100},
{255, 0, 0, 100},
&UI_DEFAULT_FONT,
1,
UI_SINGLE_LINE_INPUT_BOX_CENTER_Y,
'*'
};
/*****************************************************************************
* FUNCTION
* wgui_set_day_input_navigation
* DESCRIPTION
* function set thevaleu of previous and next cursor focus
* of day input single box
* PARAMETERS
* previous_focus [IN] Previous cursor position
* next_focus [IN] Next cursor position
* RETURNS
* void
*****************************************************************************/
void wgui_set_day_input_navigation(U8 previous_focus, U8 next_focus)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
wgui_day_input_previous_focus = previous_focus;
wgui_day_input_next_focus = next_focus;
}
/*****************************************************************************
* FUNCTION
* wgui_set_month_input_navigation
* DESCRIPTION
* function set thevaleu of previous and next cursor focus
* of month input single box
* PARAMETERS
* previous_focus [IN] Previous cursor position
* next_focus [IN] Next cursor position
* RETURNS
* void
*****************************************************************************/
void wgui_set_month_input_navigation(U8 previous_focus, U8 next_focus)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
wgui_month_input_previous_focus = previous_focus;
wgui_month_input_next_focus = next_focus;
}
/*****************************************************************************
* FUNCTION
* wgui_set_year_input_navigation
* DESCRIPTION
* function set the valeu of previous and next cursor focus
* of year input single box
* PARAMETERS
* previous_focus [IN] Previous cursor position
* next_focus [IN] Next cursor position
* RETURNS
* void
*****************************************************************************/
void wgui_set_year_input_navigation(U8 previous_focus, U8 next_focus)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
wgui_year_input_previous_focus = previous_focus;
wgui_year_input_next_focus = next_focus;
}
/*****************************************************************************
* FUNCTION
* wgui_set_hours_input_navigation
* DESCRIPTION
* function set the valeu of previous and next cursor focus
* of hours input single box
* PARAMETERS
* previous_focus [IN] Previous cursor position
* next_focus [IN] Next cursor position
* RETURNS
* void
*****************************************************************************/
void wgui_set_hours_input_navigation(U8 previous_focus, U8 next_focus)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
wgui_hours_input_previous_focus = previous_focus;
wgui_hours_input_next_focus = next_focus;
}
/*****************************************************************************
* FUNCTION
* wgui_set_minutes_input_navigation
* DESCRIPTION
* function set the valeu of previous and next cursor focus
* of minutes input single box
* PARAMETERS
* previous_focus [IN] Previous cursor position
* next_focus [IN] Next cursor position
* RETURNS
* void
*****************************************************************************/
void wgui_set_minutes_input_navigation(U8 previous_focus, U8 next_focus)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
wgui_minutes_input_previous_focus = previous_focus;
wgui_minutes_input_next_focus = next_focus;
}
/*****************************************************************************
* FUNCTION
* wgui_set_seconds_input_navigation
* DESCRIPTION
* function set the valeu of previous and next cursor focus
* of seconds input single box
* PARAMETERS
* previous_focus [IN] Previous cursor position
* next_focus [IN] Next cursor position
* RETURNS
* void
*****************************************************************************/
void wgui_set_seconds_input_navigation(U8 previous_focus, U8 next_focus)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
wgui_seconds_input_previous_focus = previous_focus;
wgui_seconds_input_next_focus = next_focus;
}
/*****************************************************************************
* FUNCTION
* wgui_set_AM_PM_input_navigation
* DESCRIPTION
* function set the valeu of previous and next cursor focus
* of am-pm input single box
* PARAMETERS
* previous_focus [IN] Previous cursor position
* next_focus [IN] Next cursor position
* RETURNS
* void
*****************************************************************************/
void wgui_set_AM_PM_input_navigation(U8 previous_focus, U8 next_focus)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
wgui_AM_PM_input_previous_focus = previous_focus;
wgui_AM_PM_input_next_focus = next_focus;
}
/*****************************************************************************
* FUNCTION
* wgui_show_date_input
* DESCRIPTION
* show date input box
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void wgui_show_date_input(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
/* show day single line inputr box */
gui_show_single_line_input_box(&wgui_date_input_day);
/* show month single line input box */
gui_show_single_line_input_box(&wgui_date_input_month);
/* show year single line input box */
gui_show_single_line_input_box(&wgui_date_input_year);
}
/*****************************************************************************
* FUNCTION
* wgui_show_time_input
* DESCRIPTION
* show time input box
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void wgui_show_time_input(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
/* show hours input box */
gui_show_single_line_input_box(&wgui_time_input_hours);
/* show minutes input box */
gui_show_single_line_input_box(&wgui_time_input_minutes);
if (wgui_seconds_input_enabled) /* if seconds input is enabled */
{ /* show seconds input box */
gui_show_single_line_input_box(&wgui_time_input_seconds);
}
if (wgui_AM_PM_input_enabled) /* if am-pm input enabled */
{ /* show am pm input box */
gui_show_single_line_input_box(&wgui_time_input_AM_PM);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -