📄 wgui_categories_cm.c
字号:
Global variables
-------------------------------*/
scrolling_text CM_scrolling_text;
S32 CM_text_offset_x=0;
S32 CM_text_width=0;
S32 CM_text_height=0;
S32 CM_x=0;
S32 CM_y=0;
S32 CM_n_frame=0;
S32 CM_total_frames=0;
U8 CM_Screen_show_date_time_bar=0;
BOOL CM_need_change_clip = FALSE;
S8 CM_string_buf[(MAX_IP_NUMBER_LEN+MAX_DIGIT)*2];
BOOL cat_momt_is_video_aud=FALSE;
BOOL cat_momt_is_visual_update=FALSE;
BOOL cat_momt_is_video_open=FALSE;
BOOL cat_momt_is_video_play=FALSE;
BOOL cat_momt_is_play_aud_when_start=FALSE;
BOOL cat_momt_is_aud_muted=FALSE;
S16 cat_momt_resource_type=0;
S16 cat_momt_repeat_count=0;
U16 cat_momt_image_id=0;
U16 cat_momt_video_id=0;
PS8 cat_momt_resource_filename=NULL;
U64 cat_momt_video_play_time=0;
GDI_HANDLE MOMT_animation_handle=GDI_ERROR_HANDLE;
MMI_BOOL isCallDisconnecting=MMI_FALSE;
/*****************************************************************************
* Local Function
*****************************************************************************/
static void ShowMOMTCallScreen( U16 title_id,
U16 left_softkey,
U16 left_softkey_icon,
U16 right_softkey,
U16 right_softkey_icon,
U16 NotificationStringId,
PU8 NameOrNumber,
PU8 IP_Number,
U16 image_id,
U16 video_id,
PS8 resource_filename,
U16 resource_type,
U16 repeat_count, /* video only. 0 means infinite loop */
BOOL is_visaul_update, /* video only. update to LCM */
BOOL is_video_aud, /* video only. eanble video's audio */
BOOL is_play_aud_when_start, /* video only. play video's audio when start*/
PU8 history_buffer);
static void RedrawMOMTCallScreen(void);
static void ExitMOMTCallScreen(void);
static void SetMOMTCallImageClip(S32 image_width, S32 image_height);
#ifdef __MMI_VIDEO_PLAYER__
static void MOMTPlayVideoResultCallback(MDI_RESULT result);
#endif /* __MMI_VIDEO_PLAYER__ */
static void DrawMOMTCallScreenControllArea(dm_coordinates * coordinate);
/*****************************************************************************
* FUNCTION
* CM_scrolling_text_timer_callback
*
* DESCRIPTION
* callback function when scrolling text timer expires
*
* PARAMETERS
* void
*
* RETURNS
* void
*
* GLOBALS AFFECTED
*
*****************************************************************************/
void CM_scrolling_text_timer_callback(void)
{
pixtel_UI_handle_scrolling_text(&CM_scrolling_text);
}/* end of CM_scrolling_text_timer_callback */
/*****************************************************************************
* FUNCTION
* handle_CM_text_scroll
*
* DESCRIPTION
* handle the text scrolling of CM screens
*
* PARAMETERS
* void
*
* RETURNS
* void
*
* GLOBALS AFFECTED
*
*****************************************************************************/
void handle_CM_text_scroll(void)
{
/*-----------------------------------------------------------------*/
/* Local Variables */
/*-----------------------------------------------------------------*/
GDI_HANDLE previous_act_lcd=GDI_NULL_HANDLE;
color bc=pixtel_UI_color(0,0,0);
/*-----------------------------------------------------------------*/
/* Code Body */
/*-----------------------------------------------------------------*/
gdi_lcd_get_active(&previous_act_lcd);
UI_set_main_LCD_graphics_context();
gdi_layer_push_clip();
pixtel_UI_set_text_color(bc);
pixtel_UI_set_font(current_UI_theme->multi_line_input_box_theme->text_font);
if(r2lMMIFlag)
{
CM_text_offset_x+=CM_TEXT_SCROLL_SIZE;
if((CM_TEXT_SCROLL_X + CM_text_offset_x) >= (CM_text_width+CM_TEXT_SCROLL_GAP))
CM_text_offset_x=CM_TEXT_SCROLL_X;
}
else
{
CM_text_offset_x-=CM_TEXT_SCROLL_SIZE;
if((CM_text_offset_x+CM_text_width+CM_TEXT_SCROLL_GAP)<CM_TEXT_SCROLL_X)
CM_text_offset_x=CM_TEXT_SCROLL_X;
}
gdi_layer_set_clip(0,CM_y,UI_device_width-1,CM_y+CM_text_height-1);
pixtel_UI_draw_filled_area(0,0,UI_device_width-1,UI_device_height-1,current_MMI_theme->CM_screen_background_filler);
if(r2lMMIFlag)
pixtel_UI_move_text_cursor(CM_text_offset_x+ UI_device_width,CM_y);
else
pixtel_UI_move_text_cursor(CM_text_offset_x,CM_y);
pixtel_UI_print_text(MMI_message_string);
if(r2lMMIFlag)
{
pixtel_UI_move_text_cursor(CM_text_offset_x-(CM_text_width+CM_TEXT_SCROLL_GAP),CM_y);
}
else
{
if((CM_text_offset_x+CM_text_width+CM_TEXT_SCROLL_GAP)<UI_device_width)
pixtel_UI_move_text_cursor(CM_text_offset_x+CM_text_width+CM_TEXT_SCROLL_GAP,CM_y);
}
pixtel_UI_print_text(MMI_message_string);
pixtel_UI_start_timer(CM_TEXT_SCROLL_TIME,handle_CM_text_scroll);
gdi_layer_pop_clip();
gdi_layer_blt_previous(0,CM_y,UI_device_width-1,CM_y+CM_text_height-1);
gdi_lcd_get_active(&previous_act_lcd);
if ( previous_act_lcd == GDI_LCD_MAIN_LCD_HANDLE )
UI_set_main_LCD_graphics_context();
else if(previous_act_lcd == GDI_LCD_SUB_LCD_HANDLE)
UI_set_sub_LCD_graphics_context();
}/* end of handle_CM_text_scroll */
/*****************************************************************************
* FUNCTION
* CM_screens_hide_status_icons
*
* DESCRIPTION
* Hide status icons function used in CM screens.
*
* PARAMETERS
* void
*
* RETURNS
* void
*
* GLOBALS AFFECTED
*
*****************************************************************************/
void CM_screens_hide_status_icons(void)
{
/*-----------------------------------------------------------------*/
/* Local Variables */
/*-----------------------------------------------------------------*/
color c=*current_MMI_theme->statusbar0_background_color;
/*-----------------------------------------------------------------*/
/* Code Body */
/*-----------------------------------------------------------------*/
wpixtel_UI_fill_rectangle_clip(0,0,UI_device_width-1,MMI_STATUS_BAR_HEIGHT,c);
}/* end of CM_screens_hide_status_icons */
/*****************************************************************************
* FUNCTION
* CM_screens_hide_date_time_display
*
* DESCRIPTION
* Hide date/time function used in CM screens.
*
* PARAMETERS
* x1 IN start x position
* y1 IN start y position
* x2 IN end of x position
* y2 IN end of y position
*
* RETURNS
* void
*
* GLOBALS AFFECTED
*
*****************************************************************************/
void CM_screens_hide_date_time_display(S32 x1,S32 y1,S32 x2,S32 y2)
{
/*-----------------------------------------------------------------*/
/* Local Variables */
/*-----------------------------------------------------------------*/
color c=*current_MMI_theme->datetime_bar_background_color;
/*-----------------------------------------------------------------*/
/* Code Body */
/*-----------------------------------------------------------------*/
wpixtel_UI_fill_rectangle_clip(x1,y1,x2,y2,c);
}
/*****************************************************************************
* FUNCTION
* CM_screens_hide_duration_display
*
* DESCRIPTION
* Hide duration function used in CM screens.
*
* PARAMETERS
* x1 IN start x position
* y1 IN start y position
* x2 IN end of x position
* y2 IN end of y position
*
* RETURNS
* void
*
* GLOBALS AFFECTED
*
*****************************************************************************/
void CM_screens_hide_duration_display(S32 x1,S32 y1,S32 x2,S32 y2)
{
/*-----------------------------------------------------------------*/
/* Local Variables */
/*-----------------------------------------------------------------*/
color c=*current_MMI_theme->datetime_bar_duration_background_color;
/*-----------------------------------------------------------------*/
/* Code Body */
/*-----------------------------------------------------------------*/
wpixtel_UI_fill_rectangle_clip(x1,y1,x2,y2,c);
}/* end of CM_screens_hide_duration_display */
/*****************************************************************************
* FUNCTION
* CM_screens_draw_date_time_bar
*
* DESCRIPTION
* Function used in CM screens to draw date-time bar
*
* PARAMETERS
* void
*
* RETURNS
* void
*
* GLOBALS AFFECTED
*
*****************************************************************************/
void CM_screens_draw_date_time_bar(void)
{
/*-----------------------------------------------------------------*/
/* Local Variables */
/*-----------------------------------------------------------------*/
color c=*current_MMI_theme->datetime_bar_background_color;
/*-----------------------------------------------------------------*/
/* Code Body */
/*-----------------------------------------------------------------*/
wpixtel_UI_fill_rectangle_clip(0,
main_LCD_dt_object.date.y
,UI_device_width-1
,main_LCD_dt_object.time.y+main_LCD_dt_object.time.height-1
,c);
}/* end of CM_screens_draw_date_time_bar */
/*****************************************************************************
* FUNCTION
* CM_screens_draw_duration_bar
*
* DESCRIPTION
* Function used in CM screens to draw duration bar
*
* PARAMETERS
* void
*
* RETURNS
* void
*
* GLOBALS AFFECTED
*
*****************************************************************************/
void CM_screens_draw_duration_bar(void)
{
/*-----------------------------------------------------------------*/
/* Local Variables */
/*-----------------------------------------------------------------*/
color c=*current_MMI_theme->datetime_bar_duration_background_color;
/*-----------------------------------------------------------------*/
/* Code Body */
/*-----------------------------------------------------------------*/
wpixtel_UI_fill_rectangle_clip(0
,main_LCD_dt_object.duration.y
,UI_device_width-1
,main_LCD_dt_object.duration.y+main_LCD_dt_object.duration.height-1
,c);
}/* end of CM_screens_draw_duration_bar */
/*****************************************************************************
* FUNCTION
* CM_draw_scrolling_text_background
*
* DESCRIPTION
* Ffunction used in CM screens to draw scrolling text background
*
* PARAMETERS
* x1 IN start x position
* y1 IN start y position
* x2 IN end of x position
* y2 IN end of y position
*
* RETURNS
* void
*
* GLOBALS AFFECTED
*
*****************************************************************************/
void CM_draw_scrolling_text_background(S32 x1,S32 y1,S32 x2,S32 y2)
{
/*-----------------------------------------------------------------*/
/* Local Variables */
/*-----------------------------------------------------------------*/
UI_filled_area *f=current_MMI_theme->CM_screen_background_filler;
/*-----------------------------------------------------------------*/
/* Code Body */
/*-----------------------------------------------------------------*/
pixtel_UI_draw_filled_area(0,0,UI_device_width-1,UI_device_height-1,f);
}/* end of CM_draw_scrolling_text_background */
/*****************************************************************************
* FUNCTION
* dialing_screen_hide_left_softkey
*
* DESCRIPTION
* Left softkey hide function of dialing screen.
*
* PARAMETERS
* void
*
* RETURNS
* void
*
* GLOBALS AFFECTED
*
*****************************************************************************/
void dialing_screen_hide_left_softkey(void)
{
gdi_layer_push_clip();
gdi_layer_set_clip(MMI_left_softkey.x,MMI_left_softkey.y,MMI_left_softkey.x+MMI_left_softkey.width+2,MMI_left_softkey.y+MMI_left_softkey.height+2);
gdi_draw_solid_rect(MMI_left_softkey.x,MMI_left_softkey.y,MMI_left_softkey.x+MMI_left_softkey.width+2,MMI_left_softkey.y+MMI_left_softkey.height+2, GDI_COLOR_TRANSPARENT);
gdi_layer_pop_clip();
}/* end of dialing_screen_hide_left_softkey */
/*****************************************************************************
* FUNCTION
* dialing_screen_hide_right_softkey
*
* DESCRIPTION
* Right softkey hide function of dialing screen.
*
* PARAMETERS
* void
*
* RETURNS
* void
*
* GLOBALS AFFECTED
*
*****************************************************************************/
void dialing_screen_hide_right_softkey(void)
{
gdi_layer_push_clip();
gdi_layer_set_clip(MMI_right_softkey.x,MMI_right_softkey.y,MMI_right_softkey.x+MMI_right_softkey.width+2,MMI_right_softkey.y+MMI_right_softkey.height+2);
gdi_draw_solid_rect(MMI_right_softkey.x,MMI_right_softkey.y,MMI_right_softkey.x+MMI_right_softkey.width+2,MMI_right_softkey.y+MMI_right_softkey.height+2, GDI_COLOR_TRANSPARENT);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -