📄 wgui_categories_idlescreen.c
字号:
//#endif
gui_set_text_border_color(c);
width = gui_get_string_width(idle_screen_network_status);
if (!r2lMMIFlag)
{
x = (UI_device_width >> 1) - (width >> 1);
}
else
{
x = (UI_device_width >> 1) - (width >> 1) + width;
}
#ifdef __MMI_UI_DALMATIAN_STATUSBAR__
gui_measure_string(idle_screen_network_status, &width, &h2);
if (PhnsetGetShowDateTimeStatus() != MMI_FALSE)
{
y = UI_device_height - (MMI_button_bar_height + (main_LCD_dt_object.time.height) * 3 + (BAR_CONTENT_GAP));
}
else
{
y = UI_device_height - (MMI_button_bar_height + (h2 + BAR_CONTENT_GAP) + (BAR_CONTENT_GAP));
}
#elif defined (__MMI_UI_TECHNO_IDLESCREEN_BAR__)
//zx modify begin 20070615
#ifndef __MT190_UI_STYLE__ //gqy modify ifdef -->ifndef 20070712
y = 230 + IDLESCREEN_TEXT_GAP;
#else
//y = y + h + IDLESCREEN_TEXT_GAP;
y = 40 + 20 + IDLESCREEN_TEXT_GAP; //zx modify 20070802
#endif
//zx modify end
#else
//zx modify begin 20070507
#ifndef __MT170_UI_STYLE__
// wangbei modify start 20071010
#ifndef __NEW_IDLE_SCREEN_UI_STYLE__
y = MMI_status_bar_height + h + 7;
#else
y=200;
#endif
// wangbei modify end
#else
y = MMI_status_bar_height + h + 7+15;
#endif
//zx modifyend
#endif
gui_move_text_cursor(x, y);
gui_print_bordered_text(idle_screen_network_status);
gui_measure_string(idle_screen_network_status, &width, &h2);
h2 += 5;
} /* idle_screen_network_status!=NULL */
/* stop previous text scrolling */
if (extra_scrolling_text)
{
gui_scrolling_text_stop(extra_scrolling_text);
extra_scrolling_text = NULL;
}
if (GetSATIdleText() != NULL)
{
show_extra = TRUE;
extra_text = (UI_string_type) GetSATIdleText();
extra_scrolling_text = &scroll_sat_idleText;
extra_scrolling_text_timer = satIdleTextScrollTimer;
}
// wangbei del start 20071010
#ifndef __NEW_IDLE_SCREEN_UI_STYLE__
if (mmi_idle_is_allow_to_display_song_name() == MMI_TRUE)
{
#endif
// wangbei del end
#ifdef __MMI_AUDIO_PLAYER__
if (mmi_audply_is_playing())
{
show_extra = TRUE;
memcpy(idle_title,g_audply.title,(FMGR_MAX_FILE_LEN + 1)*sizeof(UI_character_type));
extra_text = (UI_string_type) idle_title;
extra_scrolling_text = &scroll_audply_idleText;
extra_scrolling_text_timer = audply_idle_text_scroll_timer;
}
#endif /* __MMI_AUDIO_PLAYER__ */
#ifdef __MMI_FM_RADIO__
if (mmi_fmrdo_is_power_on())
{
show_extra = TRUE;
extra_text = (UI_string_type) mmi_fmrdo_get_channel_name_or_freq();
extra_scrolling_text = &scroll_fmrdo_idleText;
extra_scrolling_text_timer = fmrdo_idle_text_scroll_timer;
}
#endif /* __MMI_FM_RADIO__ */
// wangbei del start 20071010
#ifndef __NEW_IDLE_SCREEN_UI_STYLE__
}
#endif
// wangbei del 20071010
if (idle_screen_type == ANALOG_IDLE_SCREEN || idle_screen_type == DIGITAL_IDLE_SCREEN)
{
show_extra = FALSE;
}
if (show_extra && extra_scrolling_text != NULL)
{
color text_color, border_color;
#ifdef __MMI_UI_TECHNO_IDLESCREEN_BAR__
y = (UI_device_height >> 1) - (h >> 1);
gui_set_font(&MMI_medium_font);
#elif defined(__MMI_UI_DALMATIAN_IDLESCREEN__)
gui_set_font(&idle_screen_network_name_font);
gui_measure_string(extra_text, &width, &h);
if (PhnsetGetShowDateTimeStatus() != MMI_FALSE)
if (idle_screen_network_status != NULL)
{
y = UI_device_height - (MMI_button_bar_height + (main_LCD_dt_object.time.height) * 4 +
(BAR_CONTENT_GAP));
}
else
{
y = UI_device_height - (MMI_button_bar_height + (main_LCD_dt_object.time.height) * 3 +
(BAR_CONTENT_GAP));
}
else if ((PhnsetGetShowDateTimeStatus() == MMI_FALSE) || (idle_screen_network_status != NULL))
{
y = UI_device_height - (MMI_button_bar_height + (h2 + BAR_CONTENT_GAP) * 2 + (BAR_CONTENT_GAP));
}
else
{
y = UI_device_height - (MMI_button_bar_height + (h + BAR_CONTENT_GAP) + (BAR_CONTENT_GAP));
}
#else
//zx modify begin 20070507
#ifndef __MT170_UI_STYLE__
// wangbei modify start 20071010
#ifndef __NEW_IDLE_SCREEN_UI_STYLE__
y = MMI_status_bar_height + h + 7 + h2;
#else
y=230;
#endif
#else
y = MMI_status_bar_height + h + 7 + h2+20;
#endif
//zx modify end
gui_set_font(&idle_screen_network_name_font);
#endif
#ifndef __MMI_UI_DALMATIAN_IDLESCREEN__
gui_set_font(&idle_screen_network_name_font);
gui_measure_string(extra_text, &width, &h);
#endif /* __MMI_UI_DALMATIAN_IDLESCREEN__ */
extra_text_x1 = (S16) w_inset;
extra_text_y1 = (S16) y;
extra_text_x2 = (S16) (UI_device_width - w_inset - 1);
extra_text_y2 = (S16) (y + h);
//#if defined(__MMI_UI_TECHNO_IDLESCREEN_BAR__)
//#ifdef __MMI_MAINLCD_240X320__
// text_color = gui_color(18, 114, 175);
//#else
// text_color = (current_MMI_theme->formatted_inputbox_normal_filler->shadow_color);
//#endif
//#elif defined(__MMI_UI_DALMATIAN_IDLESCREEN__)
// text_color = *current_MMI_theme->title_text_color;
//#else
/*text_color = gui_color(255, 255, 0);*/
text_color = *current_MMI_theme->idle_scr_network_extra_color;
//#endif
gui_set_text_color(text_color);
//#if defined(__MMI_UI_TECHNO_IDLESCREEN_BAR__)
// border_color = gui_color(255, 255, 255);
//#elif defined( __MMI_UI_DALMATIAN_IDLESCREEN__)
// border_color = gui_color(255, 255, 255);
//#else
/*border_color = gui_color(0, 0, 0);*/
border_color = *current_MMI_theme->idle_scr_network_extra_border_color;
//#endif
gui_set_text_border_color(border_color);
if (r2lMMIFlag)
{
gui_move_text_cursor(extra_text_x1 + gui_get_character_width((UI_character_type) '['), extra_text_y1);
}
else
{
gui_move_text_cursor(extra_text_x1, extra_text_y1);
}
gui_print_bordered_text(L"[");
if (r2lMMIFlag)
{
gui_move_text_cursor(extra_text_x2 - 5 + gui_get_character_width((UI_character_type) ']'), extra_text_y1);
}
else
{
gui_move_text_cursor(extra_text_x2 - 5, extra_text_y1);
}
gui_print_bordered_text(L"]");
if (width <= (UI_device_width - ((w_inset + 5) * 2)))
{
width = gui_get_string_width(extra_text);
if (!r2lMMIFlag)
{
x = (UI_device_width >> 1) - (width >> 1);
}
else
{
x = (UI_device_width >> 1) + (width >> 1);
}
gui_move_text_cursor(x, y);
gui_print_bordered_text(extra_text);
}
else
{
x = w_inset + 8;
width = UI_device_width - (w_inset + 8) * 2;
#ifdef __MMI_UI_DALMATIAN_IDLESCREEN__
gui_create_scrolling_text(
extra_scrolling_text,
x,
y,
width,
h + 2,
extra_text,
extra_scrolling_text_timer,
idle_screen_sat_display_text_background_redraw,
text_color,
border_color);
#else /* __MMI_UI_DALMATIAN_IDLESCREEN__ */
gui_create_scrolling_text(
extra_scrolling_text,
x,
y,
width,
h + 2,
extra_text,
extra_scrolling_text_timer,
idle_screen_sat_display_text_background_redraw,
text_color,
border_color);
#endif /* __MMI_UI_DALMATIAN_IDLESCREEN__ */
extra_scrolling_text->scroll_gap = 20;
extra_scrolling_text->flags |= UI_SCROLLING_TEXT_BORDERED_TEXT;
gui_show_scrolling_text(extra_scrolling_text);
}
}
else /* show_extra && extra_scrolling_text != NULL */
{
extra_text_x1 = -1; /* for indicate no draw extra_text this time, so no need to clean it next time */
}
#ifdef __GDI_MEMORY_PROFILE_2__
gdi_layer_pop_clip();
gdi_layer_blt_previous(extra_text_x1, extra_text_y1-1, extra_text_x2, extra_text_y2+2);
#endif /* __GDI_MEMORY_PROFILE_2__ */
if (GetSATIdleIcon())
{
y = MMI_status_bar_height + h + 7 + h2 + 20;
gui_measure_image(GetSATIdleIcon(), &width, &h);
x = (UI_device_width >> 1) - (width >> 1);
gui_push_clip();
gui_set_clip(x, y, x + width, y + h);
gui_show_image(x, y, GetSATIdleIcon());
gui_pop_clip();
}
}
/*****************************************************************************
* FUNCTION
* idle_screen_show_network_name
* DESCRIPTION
* show network name on idle screen
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void idle_screen_show_network_name(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
color c;
S32 width, x, y, h;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
gui_reset_text_clip();
if (idle_screen_network_name != NULL)
{
#ifdef __MMI_UI_TECHNO_IDLESCREEN_BAR__
gui_set_font(&idle_screen_network_name_font);
//c = (current_MMI_theme->formatted_inputbox_normal_filler->shadow_color);
#elif defined(__MMI_UI_DALMATIAN_IDLESCREEN__)
gui_push_clip();
gui_set_text_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);
}
//c = gui_color(255, 255, 255); /* idle_scr_text_color; */
#else
gui_set_font(&idle_screen_network_name_font);
/*c = gui_color(0, 255, 255);*/
#endif
/*c = gui_color(0, 255, 255);*/
c = *current_MMI_theme->idle_scr_network_name_color;
gui_set_text_color(c);
//#if defined(__MMI_UI_TECHNO_IDLESCREEN_BAR__)
// c = (current_UI_theme->window_title_theme->active_filler->c);
//#elif defined(__MMI_UI_DALMATIAN_IDLESCREEN__)
// c = *current_MMI_theme->title_text_color;
//#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_name_border_color;
#endif
//zx modify end //#endif
gui_set_text_border_color(c);
gui_measure_string(idle_screen_network_name, &width, &h);
if (r2lMMIFlag)
{
x = (UI_device_width >> 1) + (width >> 1);
}
else
{
x = (UI_device_width >> 1) - (width >> 1);
}
#ifdef __MMI_UI_DALMATIAN_IDLESCREEN__
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);
}
#else /* __MMI_UI_DALMATIAN_IDLESCREEN__ */
#ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
y = MMI_status_bar_height + 4;
#else
y = MMI_status_bar_height + 2;
#endif
#endif /* __MMI_UI_DALMATIAN_IDLESCREEN__ */
gui_move_text_cursor(x, y);
gui_print_bordered_text(idle_screen_network_name);
#ifdef __MMI_UI_DALMATIAN_IDLESCREEN__
gui_pop_clip();
gui_BLT_double_buffer(
MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].width,
0,
UI_device_width - (MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].width) - 1,
MMI_title_height);
gui_reset_text_clip();
#endif /* __MMI_UI_DALMATIAN_IDLESCREEN__ */
} /* idle_screen_network_name!=NULL */
}
/*****************************************************************************
* FUNCTION
* dummy_dt_hide_function
* DESCRIPTION
* dummy func of hide date
* PARAMETERS
* x1 [IN] Start x position
* y1 [IN] Start y position
* x2 [IN] End x position
* y2 [IN] End y position
* RETURNS
* void
*****************************************************************************/
void dummy_dt_hide_function(S32 x1, S32 y1, S32 x2, S32 y2)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -