📄 mmisounds.h
字号:
#ifndef _MMI_SOUNDS_H_
#define _MMI_SOUNDS_H_ 1
/*******************************************************************************
CONDAT (UK)
********************************************************************************
This software product is the property of Condat (UK) Ltd and may not be
disclosed to any third party without the express permission of the owner.
********************************************************************************
$Project name: Basic MMI
$Project code: BMI (6349)
$Module: Sounds
$File: MmiSounds.h
$Revision: 1.0
$Author: Condat(UK)
$Date: 25/10/00
********************************************************************************
Description:
This provides the implementation of the sounds for the basic MMI
1. Playing various system sounds such as the paging ring,
new sms message etc.
2. The menus used to enable or disable the system sounds
3. The menu used to select the paging ring tone
4. The menu used to select the volume.
5. The menu used to select the key press tone or dtmf
The mmi should play system sounds by calling soundExec with the appropriate
SoundsXXXX message it is possible to go directly to the audio driver to play
a sound but this will bypass any user settings to turn sounds on or off.
The MelodySelect and SettingXXXX messages are used to control the key events
during menu handling, entry to the sounds menus is through the soundsXXXX
functions. These display the appropriate menu and handle the keypad events.
The settings are read from PCM on startup and saved whenever a setting menu
is selected.
********************************************************************************
$History: MmiSounds.h
25/10/00 Original Condat(UK) BMI version.
$End
*******************************************************************************/
#include "MmiLists.h"
/*******************************************************************************
Basic definitions
*******************************************************************************/
/* Redefine the alloc and free memory routines for use in the sounds
module.
*/
#define ALLOC_MEMORY mfwAlloc
#define FREE_MEMORY mfwFree
/* Provide message ids for the messages we will deal with in
the sounds module.
*/
typedef enum
{
SoundsNone = SoundsDummy,
SoundsStop,
SoundsPagingStart,
SoundsMuteClick,
SoundsRingAlarm,
SoundsRingOrganiser,
SoundsCreditRing,
SoundsSMSRing,
SoundsSMSBroadcast,
SoundsErrorTone,
SoundsBattLowIdle,
SoundsBattLowDedic,
SoundsConnCharger,
SoundsDisconnCharger,
SoundsSwitchOff,
MelodySelect,
SettingVibrator,
SettingKeypadTone,
SettingSMSTone,
SettingSMSBroadcastTone,
SettingBatteryLowBeep,
SettingCreditLowBeep,
SettingOrganiserAlert,
SettingAlarm,
SettingVolume,
SettingLanguage,
SoundsDone,
SoundsCancel
} SoundSettingState;
typedef struct
{
T_MMI_CONTROL mmi_control;
T_MFW_HND sounds_win; /* MFW win handler */
T_MFW_HND parent;
T_MFW_HND melody_handler; /* MFW sms handler */
unsigned char local_status;
ListMenuData * menu_list_data;
} T_MELODY_INFO;
/*******************************************************************************
Public Methods
*******************************************************************************/
void soundInit( MfwHnd parent );
void soundExit( void );
void soundExec( int reason, MmiState next );
/* functions setting the focus for entering configuration menus.
*/
int settingsVibrator( MfwMnu* m, MfwMnuItem* i );
int settingsLanguages( MfwMnu* m, MfwMnuItem* i );
int soundsRinger( MfwMnu* m, MfwMnuItem* i );
int soundsVolume( MfwMnu* m, MfwMnuItem* i );
int soundsKeypadSilent(MfwMnu* m, MfwMnuItem* i);
int soundsKeypadClick(MfwMnu* m, MfwMnuItem* i);
int soundsKeypadDTMF(MfwMnu* m, MfwMnuItem* i);
int soundsNewMessage( MfwMnu* m, MfwMnuItem* i );
int soundsNewBroadcast( MfwMnu* m, MfwMnuItem* i );
int soundsBatteryLow( MfwMnu* m, MfwMnuItem* i );
int soundsCreditLow( MfwMnu* m, MfwMnuItem* i );
int soundsOrganiser( MfwMnu* m, MfwMnuItem* i );
int soundsAlarm( MfwMnu* m, MfwMnuItem* i );
void soundReasonRinger(void);
void soundReasonSmsTone(void);
void soundReasonAlarm(void);
void soundsVolSilent(void);
void soundsVolLow(void);
void soundsVolMedium(void);
void soundsVolHigh(void);
void soundsVolInc(void);
void restoreSilentModeVolume(void);
void setSilentModeVolume(void);
void setSoundsReason(USHORT reason);
/*******************************************************************************
End of File
*******************************************************************************/
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -