📄 wgui_categories_idlescreen.c
字号:
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
gui_handle_scrolling_text(&scroll_sat_idleText);
}
/*****************************************************************************
* FUNCTION
* audply_idle_text_scroll_timer
* DESCRIPTION
*
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void audply_idle_text_scroll_timer(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
#ifdef __MMI_AUDIO_PLAYER__
gui_handle_scrolling_text(&scroll_audply_idleText);
#endif
}
/*****************************************************************************
* FUNCTION
* fmrdo_idle_text_scroll_timer
* DESCRIPTION
*
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void fmrdo_idle_text_scroll_timer(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
#ifdef __MMI_FM_RADIO__
gui_handle_scrolling_text(&scroll_fmrdo_idleText);
#endif
}
/* 092005 draw_wallpaper Calvin Start */
/*****************************************************************************
* FUNCTION
* wgui_hide_background_with_wallpaper
* DESCRIPTION
* redrwa the background by using the wallpaper
* PARAMETERS
* x1 [IN] Start x position
* y1 [IN] Start y poistion
* x2 [IN] End x position
* y2 [IN] End y postion
* RETURNS
* void
*****************************************************************************/
void wgui_hide_background_with_wallpaper(S32 x1, S32 y1, S32 x2, S32 y2)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
#ifndef __GDI_MEMORY_PROFILE_2__
PU8 idle_screen_wallpaper;
#endif
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
#ifdef __GDI_MEMORY_PROFILE_2__
/* gui_fill_rectangle(x1,y1,x2,y2,wgui_transparent_color); */
gdi_draw_solid_rect(x1, y1, x2, y2, GDI_COLOR_TRANSPARENT); /* 112205 transparent color Calvin */
#else /* __GDI_MEMORY_PROFILE_2__ */
gui_draw_filled_area(0, 0, UI_device_width - 1, UI_device_height - 1, current_MMI_theme->general_background_filler); /* 012705 Calvin added */
if (idle_screen_wallpaper_ID == 0)
{
S32 disp_height = UI_device_height, disp_width = UI_device_width;
#ifndef __MMI_IDLE_FULL_SCREEN__
disp_height = UI_device_height - MMI_status_bar_height - MMI_button_bar_height;
disp_width = UI_device_width - 1;
#endif /* __MMI_IDLE_FULL_SCREEN__ */
if ((disp_width >= cat33_image_width) && (disp_height >= cat33_image_height)) /* image can be displayed entirely */
{
S32 offset_x = 0;
S32 offset_y = 0;
/* align preview window at the center of screen */
offset_x = (disp_width - cat33_image_width) >> 1;
offset_y = (disp_height - cat33_image_height) >> 1;
gdi_image_draw_file(offset_x, offset_y, (PS8) idle_screen_wallpaper_name);
}
else /* image is larger than screen size */
{
S32 resized_offset_x;
S32 resized_offset_y;
S32 resized_width;
S32 resized_height;
gdi_image_util_fit_bbox(
disp_width,
disp_height,
cat33_image_width,
cat33_image_height,
&resized_offset_x,
&resized_offset_y,
&resized_width,
&resized_height);
gdi_image_draw_resized_file(
resized_offset_x,
resized_offset_y,
resized_width,
resized_height,
(PS8) idle_screen_wallpaper_name);
}
}
else
{
idle_screen_wallpaper = get_image(idle_screen_wallpaper_ID);
if (cat33_n_frames > 1)
{
gui_show_animated_image_frame(
cat33_image_x,
cat33_image_y,
idle_screen_wallpaper,
(S16) cat33_frame_number);
}
else
{
gui_show_image(cat33_image_x, cat33_image_y, idle_screen_wallpaper);
}
}
#endif /* __GDI_MEMORY_PROFILE_2__ */
}
/* 092005 draw_wallpaper Calvin End */
/*****************************************************************************
* FUNCTION
* idle_screen_sat_display_text_background_redraw
* DESCRIPTION
* redrwa the background ofSAT scrolling text area
* PARAMETERS
* x1 [IN] Start x position
* y1 [IN] Start y poistion
* x2 [IN] End x position
* y2 [IN] End y postion
* RETURNS
* void
*****************************************************************************/
/* 092005 draw_wallpaper Calvin Start */
#if 0
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#ifdef __GDI_MEMORY_PROFILE_2__
/* under construction !*/
#else
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif
/* under construction !*/
/* under construction !*/
#else /* 0 */
void idle_screen_sat_display_text_background_redraw(S32 x1, S32 y1, S32 x2, S32 y2)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
gui_push_clip();
gui_set_clip(x1, y1, x2, y2);
wgui_hide_background_with_wallpaper(x1, y1, x2, y2);
gui_pop_clip();
}
#endif /* 0 */
/* 092005 draw_wallpaper Calvin End */
#ifdef __MMI_AUDIO_PLAYER__
extern BOOL mmi_audply_is_playing(void);
#endif
/*****************************************************************************
* FUNCTION
* idle_screen_show_network_details
* DESCRIPTION
* show network name and network status on idle screen
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void idle_screen_show_network_details(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
color c;
S32 width, x, y = 0, h = 0, h2 = 0;
BOOL show_extra = FALSE;
UI_string_type extra_text = NULL;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
void (*extra_scrolling_text_timer) (void) = NULL;
#if !defined(__MMI_UI_TECHNO_IDLESCREEN_BAR__) || !defined(__MMI_UI_DALMATIAN_IDLESCREEN__)
S32 w_inset = MMI_status_icon_bars[1].x2 - MMI_status_icon_bars[1].x1 + 1;
#else
S32 w_inset = X_INSERT;
#endif
#ifdef __GDI_MEMORY_PROFILE_2__
gdi_layer_push_clip();
gdi_layer_set_clip(0, 0, UI_device_width, UI_device_height);
if (extra_text_x1 >= 0)
{
gdi_draw_solid_rect(extra_text_x1, extra_text_y1-1, extra_text_x2, extra_text_y2+2, GDI_COLOR_TRANSPARENT);
}
#endif /* __GDI_MEMORY_PROFILE_2__ */
if (idle_screen_network_name != NULL)
{
/* set font according to string width */
#ifdef __MMI_UI_DALMATIAN_STATUSBAR__
gdi_layer_push_clip();
gdi_layer_set_clip(
MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].width,
0,
UI_device_width - (MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].width) - 1,
MMI_title_height);
if (gui_get_string_width(idle_screen_network_name) >
UI_device_width - MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].width -
MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].width - 1)
{
gui_set_font(&MMI_small_font);
}
else
{
gui_set_font(&MMI_medium_font);
}
#else /* __MMI_UI_DALMATIAN_STATUSBAR__ */
gui_set_font(&idle_screen_network_name_font);
#endif /* __MMI_UI_DALMATIAN_STATUSBAR__ */
/*
* #if defined(__MMI_UI_TECHNO_IDLESCREEN_BAR__)
* c = gui_color(255,255,255);
* #elif defined(__MMI_UI_DALMATIAN_STATUSBAR__) || defined(__MMI_UI_DALMATIAN_IDLESCREEN__)
* gui_set_font(&idle_screen_network_name_font);
* c=gui_color(255,255,255);
* #else
* gui_set_font(&idle_screen_network_name_font);
* c=gui_color(0,255,255);
* #endif
*/
/*c = gui_color(255, 255, 255);*/
//c = *current_MMI_theme->idle_scr_network_name_color;// wangei del 20070405
// wangbei modify start 20070625
#ifdef __MT118_A_UI_STYLE__
c = gui_color(255,255,255);
#else
c = gui_color(0,255,255);// wangei add 20070405
#endif
// wangbei modify end
gui_set_text_color(c);
//#if defined(__MMI_UI_DALMATIAN_STATUSBAR__) || defined(__MMI_UI_DALMATIAN_IDLESCREEN__)
// c = *current_MMI_theme->title_text_color;
//#elif defined(__MMI_UI_TECHNO_IDLESCREEN_BAR__) && defined(__MMI_MAINLCD_240X320__)
// c = gui_color(18, 114, 175);
//#else
/*c = gui_color(0, 0, 0);*/
// wangbei modify start 20070625
#ifdef __MT118_A_UI_STYLE__
c = gui_color(0, 0, 0);
#else
c = *current_MMI_theme->idle_scr_network_name_border_color;
#endif
// wangbei modify end
//#endif
gui_set_text_border_color(c);
gui_measure_string(idle_screen_network_name, &width, &h);
if (!r2lMMIFlag)
{
// wangbei modify start 20071010
#ifndef __NEW_IDLE_SCREEN_UI_STYLE__
x = (UI_device_width >> 1) - (width >> 1);
#else
x = 105;
#endif
// wangbei modify end
}
else
{
x = (UI_device_width >> 1) - (width >> 1) + width;
}
#if defined(__MMI_UI_DALMATIAN_STATUSBAR__)
if (UI_font->type == MMI_small_font.type)
{
y = (MMI_title_height >> 1) - (h >> 1); /* for center in Title bar */
}
else
{
y = MMI_title_height - (h + 1); /* add 1 to create gap bottom of text */
}
#elif defined (__MMI_UI_TECHNO_IDLESCREEN_BAR__)
//gqy modify begin 20070712
#ifndef __MT190_IDLE_STYLE__
y = (UI_device_height >> 1) + (UI_device_height >> 2) - IDLESCREEN_TEXT_GAP - h;
#else
y = (UI_device_height >> 1) - (UI_device_height >> 2) - IDLESCREEN_TEXT_GAP - h -16;
#endif
//gqy modify end 20070712
#else
#ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
y = MMI_status_bar_height + 4;
#else
//zx modify begin 20070507
#ifndef __MT170_UI_STYLE__
// wangbei modify start 20071010
#ifndef __NEW_IDLE_SCREEN_UI_STYLE__
y = MMI_status_bar_height + 2;
#else
y = 2;
#endif
// wangbei modify end
#else
y = MMI_status_bar_height + 4+12;
#endif
//zx modify end
#endif
#endif
gui_move_text_cursor(x, y);
gui_print_bordered_text(idle_screen_network_name);
#if defined(__MMI_UI_DALMATIAN_STATUSBAR__)
gdi_layer_pop_clip();
gdi_layer_blt_previous(
MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].width,
0,
UI_device_width - (MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].width) - 1,
MMI_title_height);
#endif /* defined(__MMI_UI_DALMATIAN_STATUSBAR__) */
} /* idle_screen_network_name!=NULL */
if (idle_screen_network_status != NULL)
{
gui_set_font(&idle_screen_network_status_font);
//#if defined(__MMI_UI_TECHNO_IDLESCREEN_BAR__)
//#ifdef __MMI_MAINLCD_240X320__
// c = gui_color(18, 114, 175);
//#else
// c = gui_color(255, 255, 255);
//#endif
//#else /* defined(__MMI_UI_TECHNO_IDLESCREEN_BAR__) */
//#ifdef __MMI_UI_DALMATIAN_IDLESCREEN__
// c = *current_MMI_theme->title_text_color;
//#else
/*c = gui_color(0, 255, 255);*/
// zx modify begin 20070507
#ifdef __MT170_UI_STYLE__
c = gui_color(255, 255, 255);
#else
c = *current_MMI_theme->idle_scr_network_status_color;
#endif
//zx modify end
//#endif
//#endif /* defined(__MMI_UI_TECHNO_IDLESCREEN_BAR__) */
gui_set_text_color(c);
//#if defined(__MMI_UI_TECHNO_IDLESCREEN_BAR__) && defined(__MMI_MAINLCD_240X320__)
// c = gui_color(255, 255, 255);
//#else
/*c = gui_color(0, 0, 0);*/
// zx modify begin 20070507
#ifdef __MT170_UI_STYLE__
c = gui_color(0, 0, 0);
#else
c = *current_MMI_theme->idle_scr_network_status_border_color;
#endif
//zx modify end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -