wgui_categories_idlescreen.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:211k
源码类别:
MTK
开发平台:
C/C++
- /*****************************************************************************
- * Copyright Statement:
- * --------------------
- * This software is protected by Copyright and the information contained
- * herein is confidential. The software may not be copied and the information
- * contained herein may not be used or disclosed except with the written
- * permission of MediaTek Inc. (C) 2005
- *
- * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
- * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
- * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
- * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
- * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
- * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
- * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
- * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
- * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
- * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
- *
- * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
- * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
- * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
- * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
- * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
- *
- * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
- * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
- * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
- * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
- * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
- *
- *****************************************************************************/
- /*****************************************************************************
- *
- * Filename:
- * ---------
- * wgui_categories_idlescreen.c
- *
- * Project:
- * --------
- * Maui_Software
- *
- * Description:
- * ------------
- * Idle Screen related categories.
- *
- * Author:
- * -------
- * -------
- *
- *============================================================================
- * HISTORY
- * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *------------------------------------------------------------------------------
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- ****************************************************************************/
- #include "MMI_features.h"
- #include "stdC.h"
- #include "L4Dr1.h"
- #include "PixtelDataTypes.h"
- #include "GlobalDefs.h"
- #include "gui_data_types.h"
- #include "CustDataProts.h"
- #include "CustMenuRes.h"
- #include "EventsDef.h"
- #include "gui_themes.h"
- #include "wgui.h"
- #include "CustThemesRes.h"
- #include "wgui_inputs.h"
- #include "wgui_categories.h"
- #include "wgui_softkeys.h"
- #include "wgui_status_icons.h"
- #include "wgui_categories_MM.h"
- #include "wgui_categories_idlescreen.h"
- #include "wgui_categories_multimedia.h"
- #include "IdleAppProt.h"
- #include "IdleAppDef.h"
- #include "SettingDefs.h"
- #include "PhoneSetup.h"
- #ifdef __MMI_AUDIO_PLAYER__
- /* dependent headers for AudioPlayerXXX.h" */
- #include "gui_data_types.h"
- #include "FrameworkStruct.h"
- #include "GlobalConstants.h"
- #include "mdi_datatype.h"
- #include "kal_release.h"
- #include "Conversions.h"
- #include "FileMgr.h"
- #include "CommonScreens.h"
- #include "AudioPlayerDef.h"
- #include "AudioPlayerType.h"
- #endif /* __MMI_AUDIO_PLAYER__ */
- /* Robin 1208 for Debug */
- #include "DebugInitDef.h"
- #include "lcd_sw_rnd.h" /* required for macro BLACK_BACKLIGHT, WHITE_BACKLIGHT, BLUE_BACKLIGHT macro */
- #include "gdi_include.h" /* include for graphic lib */
- #include "SATGProts.h"
- #include "wgui_draw_manager.h"
- #ifdef __MMI_TOUCH_SCREEN__
- #include "QuickAccessMenuItemProt.h"
- #include "wgui_touch_screen.h"
- #endif /* __MMI_TOUCH_SCREEN__ */
- /* PMT HIMANSHU FLIGHT MODE START 20050926 */
- #include "SimDetectionGprot.h"
- /* PMT HIMANSHU FLIGHT MODE END 2005926 */
- #include "fs_type.h"
- #include "fs_func.h"
- #include "ScrMemMgrGprot.h"
- #ifdef __MMI_RESOURCE_ENFB_SUPPORT__
- #include "ResMemMgrGprot.h"//120406 warning remove
- #endif
- #ifdef __DRM_SUPPORT__
- #include "Drm_gprot.h"//102406 DRM check
- #endif
- scrolling_text scroll_sat_idleText;
- #define NORMAL_IDLE_SCREEN 0
- #define ANALOG_IDLE_SCREEN 1
- #define DIGITAL_IDLE_SCREEN 2
- #define NORMAL_SCREEN_SAVER 0
- #define ANALOG_SCREEN_SAVER 1
- #define DIGITAL_SCREEN_SAVER 2
- #define VIEW_WALLPAPER_CLOCK 1
- #define VIEW_SCREENSAVER_CLOCK 2
- #define PREVIEW_CLOCK 3
- #ifdef __MMI_ANALOG_CLOCK__
- void show_analog_clock(void);
- void analog_clock_initialize(void);
- #endif /* __MMI_ANALOG_CLOCK__ */
- /***************************************************************************/
- #ifdef __MMI_FM_RADIO__
- BOOL mmi_fmrdo_is_power_on(void);
- UI_string_type mmi_fmrdo_get_channel_name_or_freq(void);
- scrolling_text scroll_fmrdo_idleText;
- #endif /* __MMI_FM_RADIO__ */
- #ifdef __MMI_AUDIO_PLAYER__
- extern audply_struct g_audply;
- scrolling_text scroll_audply_idleText;
- UI_character_type idle_title[FMGR_MAX_FILE_LEN + 1];
- #endif /* __MMI_AUDIO_PLAYER__ */
- #include "lcd_if.h"
- gdi_handle wgui_layer_1 = GDI_LAYER_EMPTY_HANDLE;
- gdi_handle wgui_base_layer = GDI_LAYER_EMPTY_HANDLE;
- /* store Main lcd width */
- extern S32 MAIN_LCD_device_width;
- /* store Main LCD height */
- extern S32 MAIN_LCD_device_height;
- /* MTK Elvis for R2L characters */
- extern BOOL r2lMMIFlag;
- /* MTK end */
- U8 idle_screen_type = NORMAL_IDLE_SCREEN;
- static U8 display_network_name = TRUE;
- /* 122105 wallpaper Calvin */
- #ifdef __MMI_WALLPAPER_ON_BOTTOM__
- static U8 gIsWallpaperChange = 0;
- #endif
- #ifdef __MMI_IDLE_FULL_SCREEN__
- extern U16 on_idle_screen;
- #endif
- static S32 gis_on_idlescreen = 0;
- #if defined(ENABLE_ANIMATED_WALLPAPERS) && defined(__GDI_MEMORY_PROFILE_2__)
- extern GDI_HANDLE animation_handle;
- #endif
- /*****************************************************************************
- * FUNCTION
- * is_on_idlescreen
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- *
- *****************************************************************************/
- S32 is_on_idlescreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return gis_on_idlescreen;
- }
- /*****************************************************************************
- * FUNCTION
- * set_on_idlescreen
- * DESCRIPTION
- *
- * PARAMETERS
- * temp_on_idlescreen [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void set_on_idlescreen(S32 temp_on_idlescreen)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gis_on_idlescreen = temp_on_idlescreen;
- }
- /* color wgui_transparent_color={0,0,255,100};//112205 transparent color Calvin */
- extern S16 status_icon;
- /* Idle screen related wrappers */
- /* store the adress of string which stores idle screen netwrok name */
- UI_string_type idle_screen_network_name = NULL;
- /* store teh address of string which store the netwrok name */
- UI_string_type idle_screen_network_status = NULL;
- /* store the image id of wallpaper */
- extern MMI_ID_TYPE idle_screen_wallpaper_ID;
- /* store the image name of wallpaper */
- extern S8 *idle_screen_wallpaper_name;
- extern S8 *idle_screen_wallpaper_name_original;
- extern S8 *idle_screen_screensaver_name;
- extern S8 *idle_screen_cache_name;
- extern MMI_ID_TYPE idle_screen_cache_id;
- /* PMT HIMANSHU START 20050721 */
- #if (defined(__MMI_UI_TECHNO_IDLESCREEN_BAR__) && defined(__MMI_MAINLCD_240X320__))
- stFontAttribute idle_screen_network_name_font = {1, 0, 0, LARGE_FONT, 0, 0};
- #else
- stFontAttribute idle_screen_network_name_font = {0, 0, 0, MEDIUM_FONT, 0, 0};
- #endif
- /* PMT HIMANSHU END 20050721 */
- stFontAttribute idle_screen_network_status_font = {0, 0, 0, MEDIUM_FONT, 0, 0};
- /* MTK Leo end */
- /* store the x position of wallpaer of idle screen */
- S32 cat33_image_x;
- /* store the y position of wallpaer of idle screen */
- S32 cat33_image_y;
- /* store the image width of wallpaer of idle screen */
- S32 cat33_image_width;
- /* store the image height of wallpaer of idle screen */
- S32 cat33_image_height;
- /* store the total number frames of animation wallpaper */
- S32 cat33_n_frames = 0;
- /* store the current frame number of animation wallppaer */
- S32 cat33_frame_number = 0;
- /* store the delay time to show next frame of animation wallpapaer */
- S32 cat33_animation_delay = 1000;
- /* store the image id ofcategory86 used foe analog clock */
- PU8 cat86_image;
- /* store x position of image,y position of image ,image widh ,image height */
- S32 cat86_image_x,cat86_image_y;//,cat86_image_width,cat86_image_height;//062106 cat128
- #ifdef __MMI_LCD_PARTIAL_ON__
- static UI_time cat161_time;
- static S32 cat161_last_y_offset;
- #endif /* __MMI_LCD_PARTIAL_ON__ */
- /* MTK Leo add 20040423, add new interface to show screensaver */
- /* store the type of screen saver like normal or analog/digital screen saver */
- U8 screen_saver_type = NORMAL_SCREEN_SAVER;
- U8 *ScreenSaverName;
- U8 disp_network_screeen_saver = 0;
- extern S32 PhnsetScreenSaverBadFileCallBack(void);
- extern void PhnsetWallpaperBadFileCallBack(U16 imgID);
- extern void dm_set_scr_bg_image_no_draw(U16 image_id, S8 *file_name, S32 x, S32 y, U8 opacity); /* 092005 grayscale Calvin */
- S32 cat128_image_x, cat128_image_y;//, cat128_image_width, cat128_image_height;
- PU8 cat128_image;
- scrolling_text *extra_scrolling_text = NULL;
- S16 extra_text_x1 = -1;
- S16 extra_text_y1 = -1;
- S16 extra_text_x2 = -1;
- S16 extra_text_y2 = -1;
- /* 071205 Calvin Start */
- #if defined (__MMI_WALLPAPER_ON_BOTTOM__)
- static MMI_ID_TYPE idle_scr_bg_ID;
- static S8 *idle_scr_bg_filename;
- static S32 idle_scr_bg_x, idle_scr_bg_y;
- static U8 idle_scr_bg_opacity; /* 070505 Calvin added */
- #endif /* defined (__MMI_WALLPAPER_ON_BOTTOM__) */
- /* 071205 Calvin End */
- /* PMT HIMANSHU START 20050809 */
- extern U16 title_bg_id;
- /* PMT HIMANSHU END 20050809 */
- /* 090605 Idlescreen Calvin Start */
- #ifdef __MMI_UI_TECHNO_IDLESCREEN_BAR__
- extern MMI_BOOL PhnsetGetShowDateTimeStatus(void);
- MMI_ID_TYPE idlescreen_bar_id = IMG_TECHNO_IDLESCREEN_BAR; //Old:IMG_TECHNO_ANALOG_CLOCK;//070306 Alpha layer //KP Jerry modify for separate display IMG_TECHNO_IDLESCREEN_BAR and IMG_TECHNO_ANALOG_CLOCK/IMG_TECHNO_DIGITAL_CLOCK on 2007-3-9
- #endif
- /* 090605 Idlescreen Calvin End */
- /* PMT HIMANSHU START 20050625 */
- #ifdef __MMI_UI_TECHNO_IDLESCREEN_BAR__
- /* PMT HIMANSHU START 20050721 */
- #ifdef __MMI_MAINLCD_240X320__
- #define IDLESCREEN_TEXT_GAP 10
- #else
- #define IDLESCREEN_TEXT_GAP 5
- #endif
- /* PMT HIMANSHU END 20050721 */
- #define X_INSERT 20 /* Gap from left and right end for audio. */
- #endif /* __MMI_UI_TECHNO_IDLESCREEN_BAR__ */
- //PMT HIMANSHU END
- //PMT VIKAS START 20050707
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- extern is_status_bar_shuffled;
- #endif
- #ifdef __MMI_UI_DALMATIAN_SOFTKEYS__
- extern is_button_bar_shuffled;
- #endif
- #ifdef __MMI_UI_DALMATIAN_IDLESCREEN__
- #define X_INSERT 10 /* Gap from left and right end for audio. */
- #endif
- /* PMT VIKAS END 20050707 */
- extern icontext_button MMI_softkeys[];
- extern void cat129_clear_icon_bg(void *button);
- fixed_icontext_menuitem idle_list_menu_common_item;
- fixed_icontext_menuitem_type idle_list_menu_item_list [6];
- void * idle_list_menu_item_pointers [6];
- fixed_list_menu idle_list_menu;
- /**************************************************************************/
- /* micha1111, michaSATc3, #212 */
- /*****************************************************************************
- * FUNCTION
- * satIdleTextScrollTimer
- * DESCRIPTION
- * handle scrolling text of SAT scrrem
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void satIdleTextScrollTimer(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* 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;
- 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);*/
- c = *current_MMI_theme->idle_scr_network_name_border_color;
- //#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) + 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__)
- y = (UI_device_height >> 1) + (UI_device_height >> 2) - IDLESCREEN_TEXT_GAP - h;
- #else
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- y = MMI_status_bar_height + 4;
- #else
- y = MMI_status_bar_height + 2;
- #endif
- #endif
- //N95 network name position
- #ifdef __N95__
- x-=8;
- y=15;
- #endif
- //End N95 network name position
- 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);*/
- c = *current_MMI_theme->idle_scr_network_status_color;
- //#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);*/
- c = *current_MMI_theme->idle_scr_network_status_border_color;
- //#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__)
- y = y + h + IDLESCREEN_TEXT_GAP;
- #else
- y = MMI_status_bar_height + h + 7;
- #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;
- }
- if (mmi_idle_is_allow_to_display_song_name() == MMI_TRUE)
- {
- #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__ */
- }
- 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
- y = MMI_status_bar_height + h + 7 + h2;
- 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,
- //KP Jerry modify on 2006-12-31 start
- /*Old:
- text_color,
- border_color);
- */
- gui_color(18,114,175),
- gui_color(255,255,255));
- //KP Jerry modify on 2006-12-31 end
- #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);*/
- c = *current_MMI_theme->idle_scr_network_name_border_color;
- //#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 */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(x1);
- UI_UNUSED_PARAMETER(y1);
- UI_UNUSED_PARAMETER(x2);
- UI_UNUSED_PARAMETER(y2);
- }
- extern void redraw_status_icon_bar(U8 j);
- /*****************************************************************************
- * FUNCTION
- * cat33_analog_clock_hide_dt_display
- * DESCRIPTION
- * hide function of date display of analog clock
- * PARAMETERS
- * x1 [IN] Start x position
- * y1 [IN] Start y position
- * x2 [IN] End x position
- * y2 [IN] End y position
- * RETURNS
- * void
- *****************************************************************************/
- void cat33_analog_clock_hide_dt_display(S32 x1, S32 y1, S32 x2, S32 y2)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- #ifndef __GDI_MEMORY_PROFILE_2__
- PU8 idle_screen_wallpaper = get_image(idle_screen_wallpaper_ID);
- #endif
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- x1 = 0;
- /* PMT VIKAS START 20050707 */
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- y1 = MMI_status_bar_height + MMI_title_height;
- #else /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- /* PMT VIKAS START 20051010 */
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- /* for proper display of the status bar at analog clock */
- if (is_on_idlescreen())
- {
- y1 = 0;
- }
- else
- #endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- /* PMT VIKAS END 20051010 */
- y1 = MMI_status_bar_height;
- #endif /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- /* PMT VIKAS END 20050707 */
- x2 = UI_device_width - 1;
- /* PMT VIKAS START 20051010 */
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- /* for proper display of the status bar at analog clock */
- if (is_on_idlescreen())
- {
- y2 = (UI_device_height - 1 - MMI_button_bar_height - MMI_status_bar_height - 4);
- }
- else
- #endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- /* PMT VIKAS END 20051010 */
- y2 = UI_device_height - MMI_button_bar_height;
- gui_set_clip(x1, y1, x2, y2);
- #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__ */
- if (idle_screen_wallpaper_ID == 0)
- {
- ASSERT(idle_screen_wallpaper_ID == 0); /* 092005 draw_wallpaper Calvin added //analog clock idle screen should predefined image */
- gdi_image_draw_file(cat33_image_x, cat33_image_y, idle_screen_wallpaper_name);
- }
- else
- {
- 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__ */
- redraw_status_icon_bar(1);
- idle_screen_show_network_name();
- }
- /*****************************************************************************
- * FUNCTION
- * cat33_digital_clock_hide_dt_display
- * DESCRIPTION
- * hide function of date display of digital clock
- * PARAMETERS
- * x1 [IN] Start x position
- * y1 [IN] Start y position
- * x2 [IN] End x position
- * y2 [IN] End y position
- * RETURNS
- * void
- *****************************************************************************/
- /* Assumes that the wallpaper displayed behind the digital clock is always full screen */
- void draw_wallpaper(void);
- void cat33_digital_clock_hide_dt_display(S32 x1, S32 y1, S32 x2, S32 y2)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /* 072605 Calvin added */
- #ifndef __GDI_MEMORY_PROFILE_2__
- PU8 idle_screen_wallpaper = get_image(idle_screen_wallpaper_ID);
- #endif
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* 072605 Calvin end */
- /* PMT VIKAS START 20050707 */
- #ifndef __MMI_UI_DALMATIAN_IDLESCREEN__
- /* To retain passing coordinates to the clip window */
- x1 = 0;
- x2 = UI_device_width - 1;
- /* PMT VIKAS START 20051010 */
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- /* for proper display of the status bar at digital clock */
- if (is_on_idlescreen())
- {
- y1 = 0;
- }
- else
- #endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- /* PMT VIKAS END 20051010 */
- y1 = MMI_status_bar_height;
- /* PMT VIKAS START 20051010 */
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- /* for proper display of the status bar at digital clock */
- if (is_on_idlescreen())
- {
- y2 = (UI_device_height - 1 - MMI_button_bar_height - MMI_status_bar_height - 4);
- }
- else
- #endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- //PMT VIKAS END 20051010
- //PMT HIMANSHU START 20050809
- /* change for idlescreen shortcuts as their height is greater
- than MMI_button_bar_height */
- #if defined(__MMI_TOUCH_IDLESCREEN_SHORTCUTS__)
- y2 = UI_device_height - max_touch_idle_screen_shortcut_height() - 1;
- #else
- y2 = UI_device_height - MMI_button_bar_height;
- #endif
- /* PMT HIMANSHU END 20050809 */
- #endif /* __MMI_UI_DALMATIAN_IDLESCREEN__ */
- /* PMT VIKAS END 20050707 */
- gui_push_clip();
- gui_set_clip(x1, y1, x2, y2);
- /* 072605 Calvin modified */
- #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__ */
- #if 0
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- #endif /* 0 */
- draw_wallpaper();
- #endif /* __GDI_MEMORY_PROFILE_2__ */
- /* draw_wallpaper(); */
- /* 072605 Calvin end */
- redraw_status_icon_bar(1);
- gui_pop_clip();
- /* 101904 MTK Calvin changed to sync with every other digital idle screen */
- /* idle_screen_show_network_details(); */
- if (idle_screen_type == ANALOG_IDLE_SCREEN || idle_screen_type == DIGITAL_IDLE_SCREEN)
- {
- idle_screen_show_network_name();
- }
- else
- {
- idle_screen_show_network_details();
- }
- /* MTK Calvin end */
- }
- /* PMT HIMANSHU START 20050625 */
- #ifdef __MMI_UI_TECHNO_IDLESCREEN_BAR__
- /*****************************************************************************
- * FUNCTION
- * cat33_hide_date_display
- * DESCRIPTION
- * hide function of date display on idlescreen
- * PARAMETERS
- * x1 [IN] Start x position
- * y1 [IN] Start y position
- * x2 [IN] End x position
- * y2 [IN] End y position
- * RETURNS
- * void
- *****************************************************************************/
- void cat33_hide_date_display(S32 x1, S32 y1, S32 x2, S32 y2)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_push_clip();
- gui_set_clip(x1, y1, x2, y2);
- /* PMT HIMANSHU START 20050721 */
- #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 */
- #endif /* __GDI_MEMORY_PROFILE_2__ */
- /* gui_fill_rectangle(x1, y1, x2, y2, current_MMI_theme->title_filler->c); */
- //KP Jerry modify on 2007-1-5 start
- #ifndef __MMI_UI_TECHNO_IDLESCREEN_BAR_HALF_TRANSPARENT_DISPLAY__
- gui_show_image(0, MMI_status_bar_height, get_image(idlescreen_bar_id));//070306 Alpha layer
- #else
- gui_reset_clip();
- gui_lock_double_buffer();
- gdi_draw_solid_rect(0,MMI_status_bar_height,UI_device_width-1,MMI_status_bar_height+MMI_IDLESCREEN_BAR_HEIGHT-1,GDI_COLOR_HALF_TRANSPARENT);
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0,MMI_status_bar_height,UI_device_width-1,MMI_status_bar_height+MMI_IDLESCREEN_BAR_HEIGHT-1);
- #endif
- //KP Jerry modify on 2007-1-5 end
- /* PMT HIMANSHU END 20050721 */
- gui_pop_clip();
- }
- /* PMT HIMANSHU START 20050721 */
- /*****************************************************************************
- * FUNCTION
- * cat33_hide_day_string_display
- * DESCRIPTION
- * hide function of day display on idlescreen
- * PARAMETERS
- * x1 [IN] Start x position
- * y1 [IN] Start y position
- * x2 [IN] End x position
- * y2 [IN] End y position
- * RETURNS
- * void
- *****************************************************************************/
- void cat33_hide_day_string_display(S32 x1, S32 y1, S32 x2, S32 y2)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_push_clip();
- gui_set_clip(x1, y1, x2, y2);
- #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 */
- #endif /* __GDI_MEMORY_PROFILE_2__ */
- //KP Jerry modify on 2007-1-5 start
- #ifndef __MMI_UI_TECHNO_IDLESCREEN_BAR_HALF_TRANSPARENT_DISPLAY__
- gui_show_image(0, MMI_status_bar_height, get_image(idlescreen_bar_id));//070306 Alpha layer
- #else
- gui_reset_clip();
- gui_lock_double_buffer();
- gdi_draw_solid_rect(0,MMI_status_bar_height,UI_device_width-1,MMI_status_bar_height+MMI_IDLESCREEN_BAR_HEIGHT-1,GDI_COLOR_HALF_TRANSPARENT);
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0,MMI_status_bar_height,UI_device_width-1,MMI_status_bar_height+MMI_IDLESCREEN_BAR_HEIGHT-1);
- #endif
- //KP Jerry modify on 2007-1-5 end
- gui_pop_clip();
- }
- /* PMT HIMANSHU END 20050721 */
- #endif /* __MMI_UI_TECHNO_IDLESCREEN_BAR__ */
- /* PMT HIMANSHU END */
- /*****************************************************************************
- * FUNCTION
- * cat33_hide_time_display
- * DESCRIPTION
- * hide function of time display of analog/digital clock
- * PARAMETERS
- * x1 [IN] Start x position
- * y1 [IN] Start y position
- * x2 [IN] End x position
- * y2 [IN] End y position
- * RETURNS
- * void
- *****************************************************************************/
- /* 092005 draw_wallpaper Calvin Start */
- #if 0
- /* under construction !*/
- /* under construction !*/
- #ifndef __GDI_MEMORY_PROFILE_2__
- /* under construction !*/
- #endif
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- #ifdef __GDI_MEMORY_PROFILE_2__
- /* under construction !*/
- /* under construction !*/
- #else
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- #endif
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- #else /* 0 */
- void cat33_hide_time_display(S32 x1, S32 y1, S32 x2, S32 y2)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_push_clip();
- gui_set_clip(0, y1, MAIN_LCD_device_width - 1, y2);
- wgui_hide_background_with_wallpaper(x1, y1, x2, y2);
- redraw_status_icon_bar(1);
- gui_pop_clip();
- }
- #endif /* 0 */
- /* 092005 draw_wallpaper Calvin End */
- /*****************************************************************************
- * FUNCTION
- * idle_screen_hide_status_icons_bar0
- * DESCRIPTION
- * hide function of stats icon horizontal bar of idle screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void idle_screen_hide_status_icons_bar0(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 x1, y1, x2, y2;
- #ifndef __MMI_IDLE_FULL_SCREEN__
- color c = *current_MMI_theme->statusbar0_background_color;
- #endif
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_push_clip();
- get_status_icon_bar_clip(0, &x1, &y1, &x2, &y2);
- gui_set_clip(x1, y1, x2, y2);
- #ifdef __MMI_IDLE_FULL_SCREEN__
- /* MTK Leo add 20040423, provide new interfaces to set wallpaper */
- if (idle_screen_wallpaper_ID == 0)
- #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__ */
- draw_wallpaper();
- #endif /* __GDI_MEMORY_PROFILE_2__ */
- else
- {
- #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__ */
- /* PMT VIKAS START 20050707 */
- #if !((defined __MMI_UI_DALMATIAN_STATUSBAR__) && (defined __MMI_MAINLCD_176X220__))
- draw_wallpaper();
- #endif
- #endif /* __GDI_MEMORY_PROFILE_2__ */
- /* PMT VIKAS END 20050707 */
- }
- /* MTK Leo end */
- #else /* __MMI_IDLE_FULL_SCREEN__ */
- gui_fill_rectangle(x1, y1, x2, y2, c);
- #endif /* __MMI_IDLE_FULL_SCREEN__ */
- gui_pop_clip();
- }
- /*****************************************************************************
- * FUNCTION
- * idle_screen_hide_status_icons_bar1
- * DESCRIPTION
- * hide function of stats icon vertical bar of idle screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void idle_screen_hide_status_icons_bar1(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 x1, y1, x2, y2;
- PU8 idle_screen_wallpaper;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- idle_screen_wallpaper = get_image(idle_screen_wallpaper_ID);
- gui_push_clip();
- get_status_icon_bar_clip(1, &x1, &y1, &x2, &y2);
- /* PMT VIKAS START 20051010 */
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- y1 = y1 + 4; /* To restrict the clip area below from the time date area lines. */
- #endif
- /* PMT VIKAS END 20051010 */
- gui_set_clip(x1, y1, x2, y2);
- /* MTK Leo add 20040423, provide new interfaces to set wallpaper */
- if (idle_screen_wallpaper_ID == 0)
- #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__ */
- draw_wallpaper();
- #endif /* __GDI_MEMORY_PROFILE_2__ */
- else
- {
- #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__ */
- draw_wallpaper();
- #endif /* __GDI_MEMORY_PROFILE_2__ */
- }
- /* MTK Leo end */
- gui_pop_clip();
- }
- /*****************************************************************************
- * FUNCTION
- * SetIdleScreenWallpaper
- * DESCRIPTION
- * Sets the Image to be used by the idle screen
- * PARAMETERS
- * image_ID [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void SetIdleScreenWallpaper(U16 image_ID)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- PU8 idle_screen_wallpaper;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifndef __MMI_UI_TECHNO_IDLESCREEN_BAR__
- #ifdef __MMI_ANALOG_CLOCK__
- if ((image_ID == IMG_ID_DISPCHAR_ANALOG_CLK))
- {
- idle_screen_type = ANALOG_IDLE_SCREEN;
- idle_screen_wallpaper_ID = IMG_ID_DISPCHAR_ANALOG_CLK;
- }
- else
- #endif /* __MMI_ANALOG_CLOCK__ */
- #ifdef __MMI_DIGITAL_CLOCK__
- if ((image_ID == IMG_ID_DISPCHAR_DIGITAL_CLK))
- {
- idle_screen_wallpaper_ID = IMG_ID_DISPCHAR_DIGITAL_CLK;
- idle_screen_type = DIGITAL_IDLE_SCREEN;
- }
- else
- #endif /* __MMI_DIGITAL_CLOCK__ */
- #endif /* !__MMI_UI_TECHNO_IDLESCREEN_BAR__ */
- {
- idle_screen_type = NORMAL_IDLE_SCREEN;
- idle_screen_wallpaper_ID = image_ID;
- }
- idle_screen_wallpaper = get_image(idle_screen_wallpaper_ID);
- gui_measure_image(idle_screen_wallpaper, &cat33_image_width, &cat33_image_height);
- cat33_n_frames = gui_image_n_frames(idle_screen_wallpaper);
- //cat33_image_x=(UI_device_width>>1)-(cat33_image_width>>1);
- //cat33_image_y=(UI_device_height>>1)-(cat33_image_height>>1);
- cat33_image_x = (UI_device_width - cat33_image_width) >> 1; /* 032805 Calvin modified */
- cat33_image_y = (UI_device_height - cat33_image_height) >> 1;
- }
- /*****************************************************************************
- * FUNCTION
- * SetIdleScreenNetworkName
- * DESCRIPTION
- * Sets the network name to be displayed by the idle screen
- * PARAMETERS
- * s [?]
- * RETURNS
- * void
- *****************************************************************************/
- void SetIdleScreenNetworkName(U8 *s)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 strlen, i, real_pos;
- S8 start_flag = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Lisen 0921-1 */
- if (s == NULL)
- {
- idle_screen_network_name = NULL;
- return;
- }
- real_pos = 0;
- strlen = (U16) gui_strlen((UI_string_type) s) << 1;
- for (i = 0; i < strlen; i += 2)
- {
- if (s[i] != 0x20 || s[i + 1] != 0x00)
- {
- start_flag = 1;
- }
- if (start_flag == 1) /* real data starts */
- {
- s[real_pos] = s[i];
- s[real_pos + 1] = s[i + 1];
- real_pos += 2;
- }
- }
- if (real_pos < strlen)
- {
- for (i = real_pos; i < strlen; i++)
- {
- s[i] = ' ';
- }
- }
- strlen = (U16) gui_strlen((UI_string_type) s) << 1;
- for (i = strlen - 2; i > 0; i -= 2)
- {
- if (s[i] != 0x20 || s[i + 1] != 0x00)
- {
- break;
- }
- else
- {
- s[i] = ' ';
- s[i + 1] = ' ';
- }
- }
- idle_screen_network_name = (UI_string_type) s;
- }
- /*****************************************************************************
- * FUNCTION
- * SetIdleScreenNetworkStatus
- * DESCRIPTION
- * Sets the network status to be displayed by the idle screen
- * PARAMETERS
- * s [?]
- * RETURNS
- * void
- *****************************************************************************/
- void SetIdleScreenNetworkStatus(U8 *s)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 strlen, i, real_pos; /* To avoid the strlen length 0 case */
- S8 start_flag = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- real_pos = 0;
- strlen = (S16) gui_strlen((UI_string_type) s) << 1;
- for (i = 0; i < strlen; i += 2)
- {
- if (s[i] != 0x20 || s[i + 1] != 0x00)
- {
- start_flag = 1;
- }
- if (start_flag == 1) /* real data starts */
- {
- s[real_pos] = s[i];
- s[real_pos + 1] = s[i + 1];
- real_pos += 2;
- }
- }
- if (real_pos < strlen)
- {
- for (i = real_pos; i < strlen; i++)
- {
- s[i] = ' ';
- }
- }
- strlen = (S16) gui_strlen((UI_string_type) s) << 1;
- for (i = strlen - 2; i > 0; i -= 2)
- {
- if (s[i] != 0x20 || s[i + 1] != 0x00)
- {
- break;
- }
- else
- {
- s[i] = ' ';
- s[i + 1] = ' ';
- }
- }
- idle_screen_network_status = (UI_string_type) s;
- }
- /*****************************************************************************
- * FUNCTION
- * cat33_animation_processor
- * DESCRIPTION
- * a function which shows frames of animated wallpaper
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void cat33_animation_processor(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- PU8 idle_screen_wallpaper = get_image(idle_screen_wallpaper_ID);
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- cat33_frame_number++;
- if (cat33_frame_number >= cat33_n_frames)
- {
- cat33_frame_number = 0;
- }
- gui_start_timer(cat33_animation_delay, cat33_animation_processor);
- gui_lock_double_buffer();
- #ifndef __MMI_IDLE_FULL_SCREEN__
- gui_set_clip(0, MMI_status_bar_height, UI_device_width - 1, UI_device_height - MMI_button_bar_height);
- #else /* __MMI_IDLE_FULL_SCREEN__ */
- /* PMT VIKAS START 20050707 */
- #if defined(__MMI_UI_DALMATIAN_STATUSBAR__) || defined(__MMI_UI_DALMATIAN_SOFTKEYS__)
- gui_set_clip(
- 0,
- MMI_status_bar_height + MMI_title_height,
- UI_device_width - 1,
- UI_device_height - MMI_button_bar_height);
- #else /* defined(__MMI_UI_DALMATIAN_STATUSBAR__) || defined(__MMI_UI_DALMATIAN_SOFTKEYS__) */
- /* PMT VIKAS END 20050707 */
- gui_reset_clip();
- #endif /* defined(__MMI_UI_DALMATIAN_STATUSBAR__) || defined(__MMI_UI_DALMATIAN_SOFTKEYS__) */
- #endif /* __MMI_IDLE_FULL_SCREEN__ */
- gui_draw_filled_area(0, 0, UI_device_width - 1, UI_device_height - 1, current_MMI_theme->general_background_filler);
- gui_show_animated_image_frame(cat33_image_x, cat33_image_y, idle_screen_wallpaper, (S16) cat33_frame_number);
- /* PMT HIMANSHU START 20050721 */
- #ifdef __MMI_UI_TECHNO_IDLESCREEN_BAR__
- /* 090605 Idlescreen Calvin Start */
- #ifndef __MMI_UI_TECHNO_STATUS_ICON__
- if (PhnsetGetShowDateTimeStatus() == MMI_TRUE)
- #endif
- /* 090605 Idlescreen Calvin End */
- //KP Jerry modify on 2007-1-5 start
- #ifndef __MMI_UI_TECHNO_IDLESCREEN_BAR_HALF_TRANSPARENT_DISPLAY__
- gui_show_image(0, MMI_status_bar_height, get_image(idlescreen_bar_id));//070306 Alpha layer
- #else
- gui_reset_clip();
- gui_lock_double_buffer();
- gdi_draw_solid_rect(0,MMI_status_bar_height,UI_device_width-1,MMI_status_bar_height+MMI_IDLESCREEN_BAR_HEIGHT-1,GDI_COLOR_HALF_TRANSPARENT);
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0,MMI_status_bar_height,UI_device_width-1,MMI_status_bar_height+MMI_IDLESCREEN_BAR_HEIGHT-1);
- #endif
- //KP Jerry modify on 2007-1-5 end
- #endif /* __MMI_UI_TECHNO_IDLESCREEN_BAR__ */
- /* PMT HIMANSHU END 20050721 */
- show_main_LCD_dt_display();
- /* PMT VIKAS START 20050707 */
- #ifndef __MMI_UI_DALMATIAN_STATUSBAR__
- #ifdef __MMI_IDLE_FULL_SCREEN__
- redraw_status_icon_bar(0);
- #endif
- redraw_status_icon_bar(1);
- #endif /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- /* PMT VIKAS END 20050707 */
- idle_screen_show_network_details();
- /* PMT VIKAS START 20050707 */
- #ifndef __MMI_UI_DALMATIAN_SOFTKEYS__
- #ifdef __MMI_IDLE_FULL_SCREEN__
- if (cat33_image_height < UI_device_height)
- {
- show_softkey_background();
- }
- show_left_softkey();
- show_right_softkey();
- #endif /* __MMI_IDLE_FULL_SCREEN__ */
- #endif /* __MMI_UI_DALMATIAN_SOFTKEYS__ */
- /* PMT VIKAS END 20050707 */
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
- }
- /* MTK Leo add 20040422, provide new interfaces to set wallpaper */
- /*****************************************************************************
- * FUNCTION
- * wgui_set_wallpaper_change
- * DESCRIPTION
- * Sets the Image to be used by the idle screen using ID
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- /* 122105 wallpaper Calvin */
- #ifdef __MMI_WALLPAPER_ON_BOTTOM__
- void wgui_set_wallpaper_change(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gIsWallpaperChange = 1;
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_is_wallpaper_change
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- *
- *****************************************************************************/
- U8 wgui_is_wallpaper_change(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return gIsWallpaperChange;
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_reset_wallpaper_change
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_reset_wallpaper_change(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gIsWallpaperChange = 0;
- }
- #endif /* __MMI_WALLPAPER_ON_BOTTOM__ */
- /*****************************************************************************
- * FUNCTION
- * SetIdleScreenWallpaperID
- * DESCRIPTION
- *
- * PARAMETERS
- * image_ID [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void SetIdleScreenWallpaperID(U16 image_ID, MMI_BOOL is_default)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- PU8 idle_screen_wallpaper;
- /* 101705 Calvin Start */
- #ifdef __MMI_WALLPAPER_ON_BOTTOM__
- U16 bg_img_id;
- S8 *bg_img_name;
- S32 bg_img_x, bg_img_y;
- U8 bg_img_opacity;
- #endif /* __MMI_WALLPAPER_ON_BOTTOM__ */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* 101705 Calvin End */
- /* 100206 ENFB support Start */
- #ifdef __MMI_RESOURCE_ENFB_SUPPORT__
- if (idle_screen_wallpaper_ID != 0)
- {
- mmi_frm_resmem_dereg_retain((U16)idle_screen_wallpaper_ID);
- }
- #endif
- /* 100206 ENFB support End */
- #ifndef __MMI_UI_TECHNO_IDLESCREEN_BAR__
- #ifdef __MMI_ANALOG_CLOCK__
- if ((image_ID == IMG_ID_DISPCHAR_ANALOG_CLK))
- {
- idle_screen_type = ANALOG_IDLE_SCREEN;
- /* __CUSTPACK_MULTIBIN Calvin BEGIN */
- idle_screen_wallpaper_ID = IMG_ID_DISPCHAR_ANALOG_CLK;
- /* __CUSTPACK_MULTIBIN Calvin END */
- }
- else
- #endif /* __MMI_ANALOG_CLOCK__ */
- #ifdef __MMI_DIGITAL_CLOCK__
- if ((image_ID == IMG_ID_DISPCHAR_DIGITAL_CLK))
- {
- idle_screen_wallpaper_ID = IMG_ID_DISPCHAR_DIGITAL_CLK;
- idle_screen_type = DIGITAL_IDLE_SCREEN;
- }
- else
- #endif /* __MMI_DIGITAL_CLOCK__ */
- #endif /* __MMI_UI_TECHNO_IDLESCREEN_BAR__ */
- {
- idle_screen_type = NORMAL_IDLE_SCREEN;
- idle_screen_wallpaper_ID = image_ID;
- }
- /* 100206 ENFB support Start */
- #ifdef __MMI_RESOURCE_ENFB_SUPPORT__
- mmi_frm_resmem_reg_retain((U16)idle_screen_wallpaper_ID);
- #endif
- /* 100206 ENFB support End */
- idle_screen_wallpaper = get_image(idle_screen_wallpaper_ID);
- gdi_image_get_dimension(idle_screen_wallpaper, &cat33_image_width, &cat33_image_height);
- gdi_image_get_frame_count_id(idle_screen_wallpaper_ID, &cat33_n_frames);
- cat33_image_x = (UI_device_width - cat33_image_width) >> 1;
- cat33_image_y = (UI_device_height - cat33_image_height) >> 1;
- #ifdef __MTK_TARGET__
- if(cat33_n_frames > 1)
- {
- wgui_save_wallpaper_to_speedup(is_default);
- }
- else
- #endif /* __MTK_TARGET__ */
- {
- #ifdef __MMI_WALLPAPER_ON_BOTTOM__
- idle_screen_cache_id = idle_screen_wallpaper_ID;
- idle_screen_cache_name = NULL;
- dm_set_scr_bg_redraw(MMI_TRUE);
- dm_get_scr_bg_image(&bg_img_id, &bg_img_name, &bg_img_x, &bg_img_y, &bg_img_opacity);
- dm_set_scr_bg_image(idle_screen_cache_id, idle_screen_cache_name, bg_img_x, bg_img_y, bg_img_opacity);
- #endif /* __MMI_WALLPAPER_ON_BOTTOM__ */
- }
- }
- #ifdef __MMI_WALLPAPER_ON_BOTTOM__
- /*****************************************************************************
- * FUNCTION
- * SetIdleScreenWallpaperID
- * DESCRIPTION
- *
- * PARAMETERS
- * image_ID [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void SetListWallpaperID(U16 image_ID)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 bg_img_id;
- S8 *bg_img_name;
- S32 bg_img_x, bg_img_y;
- U8 bg_img_opacity;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- idle_screen_type = NORMAL_IDLE_SCREEN;
- idle_screen_wallpaper_ID = image_ID;
- dm_set_scr_bg_redraw(MMI_TRUE);
- dm_get_scr_bg_image(&bg_img_id, &bg_img_name, &bg_img_x, &bg_img_y, &bg_img_opacity);
- dm_set_scr_bg_image(idle_screen_wallpaper_ID, NULL, bg_img_x, bg_img_y, bg_img_opacity);
- }
- #endif /* __MMI_WALLPAPER_ON_BOTTOM__ */
- /*****************************************************************************
- * FUNCTION
- * SetIdleScreenWallpaperName
- * DESCRIPTION
- *
- * PARAMETERS
- * name [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void SetIdleScreenWallpaperName(UI_string_type name)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 disp_height = UI_device_height, disp_width = UI_device_width;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* 100206 ENFB support Start */
- #ifdef __MMI_RESOURCE_ENFB_SUPPORT__
- if (idle_screen_wallpaper_ID != 0)
- {
- mmi_frm_resmem_dereg_retain((U16)idle_screen_wallpaper_ID);
- }
- #endif
- /* 100206 ENFB support End */
- idle_screen_wallpaper_ID = 0;
- idle_screen_type = NORMAL_IDLE_SCREEN;
- #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__ */
- gdi_image_get_dimension_file((S8*) name, &cat33_image_width, &cat33_image_height);
- cat33_image_x = (disp_width - cat33_image_width) >> 1; /* 032805 Calvin modified */
- cat33_image_y = (disp_height - cat33_image_height) >> 1;
- gdi_image_get_frame_count_file((U8 *)name, &cat33_n_frames);
- pfnUnicodeStrcpy(idle_screen_wallpaper_name_original, (S8*) name);
- idle_screen_wallpaper_name = idle_screen_wallpaper_name_original;
- }
- /*****************************************************************************
- * FUNCTION
- * draw_wallpaper
- * DESCRIPTION
- * Redraws the Idle screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void draw_wallpaper(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- PU8 idle_screen_wallpaper = get_image(idle_screen_wallpaper_ID);
- /* Robin 1208 Display user define wallpaper */
- S32 disp_height = UI_device_height, disp_width = UI_device_width;
- GDI_RESULT ret = GDI_SUCCEED;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if defined(ENABLE_ANIMATED_WALLPAPERS) && defined(__GDI_MEMORY_PROFILE_2__)
- if (animation_handle != GDI_ERROR_HANDLE)
- {
- gdi_image_stop_animation(animation_handle);
- animation_handle = GDI_ERROR_HANDLE;
- }
- #endif /* defined(ENABLE_ANIMATED_WALLPAPERS) && defined(__GDI_MEMORY_PROFILE_2__) */
- gui_draw_filled_area(0, 0, UI_device_width - 1, UI_device_height - 1, current_MMI_theme->general_background_filler);
- #ifndef __MMI_IDLE_FULL_SCREEN__
- /* Robin 1208 Display user define wallpaper */
- disp_height = UI_device_height - MMI_status_bar_height - MMI_button_bar_height;
- disp_width = UI_device_width - 1;
- gui_set_clip(0, MMI_status_bar_height, UI_device_width - 1, UI_device_height - MMI_button_bar_height);
- #endif /* __MMI_IDLE_FULL_SCREEN__ */
- if (idle_screen_wallpaper_ID != 0) /* image comes from resource */
- {
- if (cat33_n_frames > 1)
- #if defined(ENABLE_ANIMATED_WALLPAPERS) && defined(__GDI_MEMORY_PROFILE_2__)
- gdi_image_draw_animation_frames(
- cat33_image_x,
- cat33_image_y,
- idle_screen_wallpaper,
- &animation_handle,
- (S16) cat33_frame_number);
- #else /* defined(ENABLE_ANIMATED_WALLPAPERS) && defined(__GDI_MEMORY_PROFILE_2__) */
- {
- gdi_image_draw_animation_single_frame(
- cat33_image_x,
- cat33_image_y,
- idle_screen_wallpaper,
- (S16) cat33_frame_number);
- cat33_animation_delay = gdi_image_get_animation_delay();
- }
- #endif /* defined(ENABLE_ANIMATED_WALLPAPERS) && defined(__GDI_MEMORY_PROFILE_2__) */
- else
- {
- gdi_image_draw(cat33_image_x, cat33_image_y, idle_screen_wallpaper);
- }
- }
- else
- {
- /* 102406 DRM check Start */
- FS_HANDLE originalPath = 0;
- #ifdef __DRM_SUPPORT__
- kal_bool DRM_ret = KAL_FALSE;
- #endif
- if (cat33_n_frames <= 1)//check if the original file of the cached static image still exists and the DRM right as well
- {
- if (idle_screen_wallpaper_name_original == NULL)
- {
- ret = GDI_IMAGE_ERR_INVALID_FILE;
- }
- else
- {
- #ifdef __DRM_SUPPORT__
- originalPath = DRM_open_file((PU16) idle_screen_wallpaper_name_original, FS_READ_ONLY | FS_OPEN_NO_DIR, DRM_PERMISSION_DISPLAY);
- if (originalPath > 0)
- {
- DRM_ret = DRM_validate_permission(originalPath, DRM_PERMISSION_DISPLAY);
- }
- if (DRM_ret == KAL_FALSE)
- #else
- originalPath = FS_Open((PU16) idle_screen_wallpaper_name_original, FS_READ_ONLY | FS_OPEN_NO_DIR);
- if (originalPath < 0)
- #endif
- {
- ret = GDI_IMAGE_ERR_INVALID_FILE;
- }
- if (originalPath > 0)
- {
- #ifdef __DRM_SUPPORT__
- DRM_close_file(originalPath);
- #else
- FS_Close(originalPath);
- #endif
- originalPath = 0;
- }
- }
- }
- if (ret != GDI_IMAGE_ERR_INVALID_FILE)
- {
- S32 offset_x = 0;
- S32 offset_y = 0;
- gdi_image_get_dimension_file(idle_screen_wallpaper_name, &cat33_image_width, &cat33_image_height);
- cat33_image_x = (disp_width - cat33_image_width) >> 1;
- cat33_image_y = (disp_height - cat33_image_height) >> 1;
- if ((disp_width >= cat33_image_width) && (disp_height >= cat33_image_height)) /* image can be displayed entirely */
- {
- /* align preview window at the center of screen */
- offset_x = (disp_width - cat33_image_width) >> 1;
- offset_y = (disp_height - cat33_image_height) >> 1;
- #if defined(ENABLE_ANIMATED_WALLPAPERS) && defined(__GDI_MEMORY_PROFILE_2__)
- ret = gdi_image_draw_animation_file(
- offset_x,
- offset_y,
- (PS8) idle_screen_wallpaper_name,
- &animation_handle);
- #else /* defined(ENABLE_ANIMATED_WALLPAPERS) && defined(__GDI_MEMORY_PROFILE_2__) */
- ret = gdi_image_draw_file(offset_x, offset_y, (PS8) idle_screen_wallpaper_name);
- #endif /* defined(ENABLE_ANIMATED_WALLPAPERS) && defined(__GDI_MEMORY_PROFILE_2__) */
- }
- 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);
- /* for images of other formats, try to set center alignment */
- #if defined(ENABLE_ANIMATED_WALLPAPERS) && defined(__GDI_MEMORY_PROFILE_2__)
- ret = gdi_image_draw_animation_resized_file(
- resized_offset_x,
- resized_offset_y,
- resized_width,
- resized_height,
- (PS8) idle_screen_wallpaper_name,
- &animation_handle);
- /* ret = gdi_image_draw_resized_file(resized_offset_x, resized_offset_y, resized_width, resized_height, (PS8)idle_screen_wallpaper_name); */
- #else /* defined(ENABLE_ANIMATED_WALLPAPERS) && defined(__GDI_MEMORY_PROFILE_2__) */
- ret = gdi_image_draw_resized_file(
- resized_offset_x,
- resized_offset_y,
- resized_width,
- resized_height,
- (PS8) idle_screen_wallpaper_name);
- #endif /* defined(ENABLE_ANIMATED_WALLPAPERS) && defined(__GDI_MEMORY_PROFILE_2__) */
- }
- }
- /* 102406 DRM check End */
- if (ret < 0 && ret != GDI_GIF_ERR_OUT_OF_CLIP_REGION && ret != GDI_BMP_ERR_OUT_OF_CLIP_REGION)
- {
- /* Robin 1208 Display user define wallpaper */
- PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "draw_wallpaper():[$$$]GDI_RESULT:%d[$$$]n", ret));
- PhnsetWallpaperBadFileCallBack(0);
- idle_screen_wallpaper = get_image(idle_screen_wallpaper_ID);
- cat33_n_frames = gui_image_n_frames(idle_screen_wallpaper);
- gdi_image_get_dimension(idle_screen_wallpaper, &cat33_image_width, &cat33_image_height);
- cat33_image_x = (disp_width - cat33_image_width) >> 1;
- cat33_image_y = (disp_height - cat33_image_height) >> 1;
- if (cat33_n_frames > 1)
- #if defined(ENABLE_ANIMATED_WALLPAPERS) && defined(__GDI_MEMORY_PROFILE_2__)
- gdi_image_draw_animation_frames(
- cat33_image_x,
- cat33_image_y,
- idle_screen_wallpaper,
- &animation_handle,
- (S16) cat33_frame_number);
- #else /* defined(ENABLE_ANIMATED_WALLPAPERS) && defined(__GDI_MEMORY_PROFILE_2__) */
- gdi_image_draw_animation_single_frame(
- cat33_image_x,
- cat33_image_y,
- idle_screen_wallpaper,
- (S16) cat33_frame_number);
- #endif /* defined(ENABLE_ANIMATED_WALLPAPERS) && defined(__GDI_MEMORY_PROFILE_2__) */
- else
- {
- gdi_image_draw(cat33_image_x, cat33_image_y, idle_screen_wallpaper);
- }
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_stop_wallpaper
- * DESCRIPTION
- * Stop wallpaper animation
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_stop_wallpaper(void)
- {
- animation_handle = cat129_get_image_handle();
- if (animation_handle != GDI_ERROR_HANDLE)
- {
- gdi_image_stop_animation(animation_handle);
- animation_handle = GDI_ERROR_HANDLE;
- }
- animation_handle = cat222_get_image_handle();
- if (animation_handle != GDI_ERROR_HANDLE)
- {
- gdi_image_stop_animation(animation_handle);
- animation_handle = GDI_ERROR_HANDLE;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_save_wallpaper_to_speedup
- * DESCRIPTION
- * Save the layer of wallpaper as fast format
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_save_wallpaper_to_speedup(MMI_BOOL is_default)
- {
- #ifdef GDI_USING_LAYER
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_WALLPAPER_ON_BOTTOM__
- U16 bg_img_id;
- S8 *bg_img_name;
- S32 bg_img_x, bg_img_y;
- U8 bg_img_opacity;
- #endif /* __MMI_WALLPAPER_ON_BOTTOM__ */
- U8 *outside_mem = NULL;
- gdi_handle temp_wallpaper_handle = GDI_NULL_HANDLE;
- S32 disp_height = UI_device_height, disp_width = UI_device_width;
- U16 type;
- MMI_BOOL isFile = MMI_FALSE;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION_2((MMI_TRACE_G7_MISC, "wgui_save_wallpaper_to_speedup"));
- if (idle_screen_wallpaper_ID)
- {
- type = gdi_image_get_type_from_id(idle_screen_wallpaper_ID);
- }
- else
- {
- type = gdi_image_get_type_from_file(idle_screen_wallpaper_name);
- isFile = MMI_TRUE;
- }
- wgui_stop_wallpaper();
- if ((isFile && cat33_n_frames <= 1) ||
- type == GDI_IMAGE_TYPE_M3D ||
- type == GDI_IMAGE_TYPE_M3D_FILE ||
- (type == GDI_IMAGE_TYPE_GIF && cat33_n_frames > 1) ||
- type == GDI_IMAGE_TYPE_GIF_FILE)
- {
- outside_mem = (U8 *)mmi_frm_scrmem_alloc(((GDI_LCD_WIDTH*GDI_LCD_HEIGHT*GDI_MAINLCD_BIT_PER_PIXEL)>>3));
- if (outside_mem)
- gdi_layer_create_using_outside_memory(0, 0, UI_device_width, UI_device_height, &temp_wallpaper_handle, outside_mem, ((GDI_LCD_WIDTH*GDI_LCD_HEIGHT*GDI_MAINLCD_BIT_PER_PIXEL)>>3));
- else
- temp_wallpaper_handle = dm_get_layer_handle(0);
- /* redraw the animation to get the first frame */
- #ifdef __GDI_MEMORY_PROFILE_2__
- gdi_layer_push_and_set_active(temp_wallpaper_handle);
- gdi_layer_clear(GDI_COLOR_WHITE);
- #endif /* __GDI_MEMORY_PROFILE_2__ */
- draw_wallpaper();
- /*
- * 1. idle_screen_wallpaper_ID == 0 means PhnsetWallpaperBadFileCallBack was not called
- * 2. is file, just cache it no matter what type it is
- */
- if (idle_screen_wallpaper_ID <= 1 || !isFile)
- {
- if (
- #ifdef __FS_QM_SUPPORT__
- ((gdi_layer_get_bit_per_pixel() * UI_device_width * UI_device_height + 13) <
- FS_QmGetFree((BYTE*) "Z:\@USER\")) &&
- #endif /* __FS_QM_SUPPORT__ */
- (0 <= gdi_layer_save_pbm_file(temp_wallpaper_handle, (S8*) PHNSET_PREDEFINED_WP_PATH_PBM)))
- {
- idle_screen_wallpaper_name = (S8*) PHNSET_PREDEFINED_WP_PATH_PBM;
- }
- else if (0 <= gdi_layer_save_jpeg_file(temp_wallpaper_handle, (S8*) PHNSET_PREDEFINED_WP_PATH_JPG))
- {
- idle_screen_wallpaper_name = (S8*) PHNSET_PREDEFINED_WP_PATH_JPG;
- }
- else
- {
- ; /* use original file. */
- }
- /* To tell list menu the image size */
- if (idle_screen_wallpaper_name == (S8*) PHNSET_PREDEFINED_WP_PATH_PBM ||
- idle_screen_wallpaper_name == (S8*) PHNSET_PREDEFINED_WP_PATH_JPG)
- {
- #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__ */
- cat33_image_width = disp_width;
- cat33_image_height = disp_height;
- }
- }
- #ifdef __GDI_MEMORY_PROFILE_2__
- gdi_layer_pop_and_restore_active();
- #endif
- if (dm_get_layer_handle(0) != temp_wallpaper_handle)
- {
- gdi_layer_free(temp_wallpaper_handle);
- }
- if (outside_mem)
- mmi_frm_scrmem_free(outside_mem);
- #ifdef __MMI_WALLPAPER_ON_BOTTOM__
- idle_screen_cache_name = idle_screen_wallpaper_name;
- idle_screen_cache_id = 0;
- /* make listmenu apply still image */
- dm_set_scr_bg_redraw(MMI_TRUE);
- dm_get_scr_bg_image(&bg_img_id, &bg_img_name, &bg_img_x, &bg_img_y, &bg_img_opacity);
- dm_set_scr_bg_image(idle_screen_cache_id, idle_screen_wallpaper_name, bg_img_x, bg_img_y, bg_img_opacity);
- #endif /* __MMI_WALLPAPER_ON_BOTTOM__ */
- if (cat33_n_frames > 1 || type == GDI_IMAGE_TYPE_SVG_FILE)
- {
- /* make idlescreen apply animate image */
- idle_screen_wallpaper_name = idle_screen_wallpaper_name_original;
- }
- }
- #endif /* GDI_USING_LAYER */
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_get_wallpaper_frame_count
- * DESCRIPTION
- * Provide wallpaper frame count.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- MMI_BOOL wgui_check_wallpaper_frame_count(S8 *name, S8 **error_str)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 wallpaper_frames = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_image_gif_get_frame_count_file(name, &wallpaper_frames);
- PRINT_INFORMATION_2 ((MMI_TRACE_G7_MISC, "Wallpaper frame count = %d", wallpaper_frames));
- if(wallpaper_frames > PHNSET_MAX_WALLPAPER_FRAME)
- {
- *error_str = (PS8)GetString(STR_ID_WP_FRAME_ERR);
- return MMI_FALSE;
- }
- else
- {
- *error_str = NULL;
- return MMI_TRUE;
- }
- }
- /* [~PMT MANISH 20050623 */
- #if ( defined(__MMI_TOUCH_IDLESCREEN_SHORTCUTS__) || defined(__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__) ) //KP Jerry add "__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__" on 2006-11-2
- //KP Jerry modify on 2007-3-6 start
- #if defined(__MMI_TOUCH_IDLESCREEN_SHORTCUTS__)
- #define MAX_IDLE_SCREEN_SHORTCUTS 4
- #elif defined(__MMI_TOUCH_IDLESCREEN_HW_SHORTCUTS__)
- #define MAX_IDLE_SCREEN_SHORTCUTS 5
- #endif
- //KP Jerry modify on 2007-3-6 end
- typedef struct
- {
- S32 x;
- S32 y;
- S32 width;
- S32 height;
- FuncPtr entryfn;
- } idle_touch_screen_shortcut;
- static idle_touch_screen_shortcut touch_idle_shortcuts[MAX_IDLE_SCREEN_SHORTCUTS];
- static S32 touch_idle_screen_highlighted_shortcut;
- static S32 touch_idle_screen_highlight_changed;
- extern void mmi_phb_entry_main_menu(void);
- extern void EntryScrMessagesMenuList(void);
- /* PMT HIMANSHU START 20050721 */
- extern void EntryMainMenuFromIdleScreen(void);
- /* PMT HIMANSHU END 20050721 */
- //KP Jerry add on 2006-11-5 start
- extern void mmi_camera_entry_app_screen(void);
- extern void mmi_vdoply_entry_app(void);
- //KP Jerry add on 2006-11-5 end
- /*****************************************************************************
- * FUNCTION
- * setup_touch_idle_screen_shortcuts
- * DESCRIPTION
- * This function is used to set up touch screen shortcuts
- * PARAMETERS
- * void
- * RETURNS
- * void
- * REMARKS
- * This routine is dependent on Order of Image Id's of Shortcut Item Images.
- * DON'T CHANGE THE ORDER OF IMAGE ID's
- *****************************************************************************/
- void setup_touch_idle_screen_shortcuts(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- //KP Jerry modify on 2007-3-7 start
- #if defined(__MMI_TOUCH_IDLESCREEN_SHORTCUTS__)
- S32 image_width[MAX_IDLE_SCREEN_SHORTCUTS], image_height[MAX_IDLE_SCREEN_SHORTCUTS], total_width = 0, x, x_margin;
- #endif
- S32 i;
- //KP Jerry modify on 2007-3-7 end
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- for (i = 0; i < MAX_IDLE_SCREEN_SHORTCUTS; i++)
- {
- //KP Jerry modify on 2007-3-7 start