📄 audioplayermainscreen.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:
* ---------
* AudioPlayerMainScreen.c
*
* Project:
* --------
* MAUI
*
* Description:
* ------------
* Audio player main screen
*
* Author:
* -------
* Tim Chen
*
*==============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* $Log: AudioPlayerMainScreen.c,v $
* Revision 1.9 2007/08/22 08:22:06 liuxiannian
* MT190-174
* Modification Author:liuxn
* Date: 20070821
* Content:解决播放MP3时长按图标移动到无效区域后"暂停"图标出错的问题
*
* Revision 1.8 2007/08/17 13:17:43 zhouxiang
* MT190-55
* Modification Author:zx
* Date: 20070815
* Content: 音乐播音机界面播放部分歌曲名显示不全问题
*
* Revision 1.7 2007/08/13 01:27:09 wangbei
* MT118-86
* Modification Author:wangbei
* Date: 20070813
* Content:修改音乐播放界面歌曲的索引的位置。
*
* Revision 1.6 2007/07/31 01:31:30 zhouxiang
* MT190-9
* Modification Author:zx
* Date:20070730
* Content:调整音乐播放器
*
* Revision 1.5 2007/06/25 11:30:33 wangbei
* MT118-6
* Modification Author:wangbei
* Date: 20070625
* Content:调整音乐播放器界面。
*
* Revision 1.4 2007/05/31 09:21:04 wangbei
* MT158-384
* Modification Author:wangbei
* Date: 20070531
* Content:修改调整MT170音乐播放器所引起的MT158播放器的问题。
*
* Revision 1.3 2007/05/28 12:04:15 wangbei
* MT170-7
* Modification Author:wangbei
* Date: 20070528
* Content:调整MP3播放界面。
*
* Revision 1.2 2007/05/21 11:09:52 liuxiannian
* MT158-370
* Modification Author:liuxn
* Date:20070510
* Content:
* 纠正注释不规范BUG:
* 1)MT158-6 添加歌词同步功能
* 2)MT158-67 播放音乐,当用侧按键调节音量时,音量图标显示有问题
* 3)MT158-14 调整MP3同MT160
*
* Revision 1.1.1.1 2007/05/11 08:53:27 zhouxiang
* no message
*
* Revision 1.5 2007/04/20 02:54:16 liuxiannian
* MT158-67
* Modification Author:liuxn
* Date:20070418
* Content:把MP3音量调节等级分为七级
*
* Revision 1.4 2007/04/17 02:31:57 wangbei
* MT158-54
* Modification Author:wangbei
* Date: 20070417
* Content:修改标题的文字颜色。
*
* Revision 1.3 2007/04/09 05:59:03 liuxiannian
* MT158-6
* Modification Author:liuxn
* Date: 20070409
* Content:当歌曲有歌词的时候要进行播放歌词
*
* Revision 1.2 2007/04/05 08:30:13 liuxiannian
* MT158-14
* Modification Author:liuxn
* Date: 20070404
* Content:修改MP3皮肤
*
* Revision 1.1.1.1 2007/04/03 02:22:21 linzhihua
* 导入MALATA25_06B_W07.04_MMI工程
*
*
* 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"
#ifdef __MMI_AUDIO_PLAYER__
#include "wgui_categories.h"
#include "DebugInitDef.h" /* Debug Info */
/* 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 "FileManagerGProt.h"
#include "gdi_include.h"
#include "mdi_audio.h"
#include "AudioPlayerDef.h"
#include "AudioPlayerType.h"
#include "AudioPlayerProt.h"
#include "AudioPlayerMainScreen.h"
#include "AudioPlayerPlayList.h"
#ifdef __MMI_AUDIO_SPECTRUM_DISPLAY__
#include "gui_spectrum.h"
#endif
/* MTK Leo add 20050301, add touch screen support for Audio Player */
#ifdef __MMI_TOUCH_SCREEN__
#include "wgui_touch_screen.h"
/* to write NVRAM */
#include "NVRAMEnum.h"
#include "NVRAMProt.h"
#include "NVRAMType.h"
#endif /*__MMI_TOUCH_SCREEN__*/
/* MTK Leo end */
static BOOL init_images_done = FALSE;
#ifdef _LYRIC_SYNCHRONIZE_DISPLAY_
BOOL init_scrolling_done = FALSE;
#else
static BOOL init_scrolling_done = FALSE;
#endif
static BOOL init_title_scrolling_done = FALSE;
signed char g_audply_main_selected_button;
BOOL g_audply_main_selected_button_down;
static color text_border_color;
//lrj modify begin 20060814
//歌词同步需要用到变量
#ifdef _LYRIC_SYNCHRONIZE_DISPLAY_
gdi_color text_bg_color;
color text_fg_color;
#else
static gdi_color text_bg_color;
static color text_fg_color;
#endif
//wangbei add start 20071010
#ifdef __NEW_AUDIO_SKIN_UI_STYLE__
PU8 audply_buttons_dsound_bg_img;
#endif
//wangbei add end
PU8 audply_main_bg_img;
PU8 audply_main_pause_on_img;
PU8 audply_main_pause_down_img;
audply_main_title_struct audply_main_title;
audply_main_time_struct audply_main_time;
audply_main_file_index_struct audply_main_file_index;
audply_main_playlisticon_struct audply_main_playlisticon;
audply_main_volumebar_struct audply_main_volumebar;
audply_main_progressbar_struct audply_main_progressbar;
#ifdef __MMI_TOUCH_SCREEN__
audply_main_volumectrl_struct audply_main_volume_inc, audply_main_volume_dec;
audply_main_setting_struct audply_main_setting;
BOOL g_audply_main_pen_move_more_than_once ; /*to avoid play\pause icon keep changing from one another when pen move*/
static S32 g_audply_progress_bar_current_x_pos ; /*the x coordinate of progress bar to decide fast forward or rewind*/
S32 g_audply_progress_bar_pen_down_x_pos ; /*the x coordinate of pen down action on progress bar for refine target time*/
#endif /* __MMI_TOUCH_SCREEN__ */
#ifdef __MMI_AUDIO_PLAYER_ANIMATION__
audply_main_animation_struct audply_main_animation;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -