📄 normal.c
字号:
void UiFuncNormalProc(WORD MsgType, DWORD MsgInput)
{
BYTE SubFuncReturn;
int SubFunc;
if (MsgType == C_FP_KEY && MsgInput == V_KEY_OPEN)
{
for (SubFunc = UI_SUBFUNC_END /* carl */; SubFunc >= UI_SUBFUNC_BASAL; SubFunc--)
(UiProcSubFunc[SubFunc])(MsgType, MsgInput);
}
else
{
SubFuncReturn = (UiProcSubFunc[g_UiCrntSubFunc])(MsgType, MsgInput);
if (SubFuncReturn == UI_NOUSE_FUNC_MSG)
(UiProcSubFunc[UI_SUBFUNC_BASAL])(MsgType, MsgInput);
else if (SubFuncReturn == UI_FUNC_KEY_FAIL)
; // do nothing or show "invalid"
}
}
/*----------------------------------------------------------------------------
* Function : UiSubFuncBasalProc
* Arguments :
* WORD MsgType: In, indicate where message comes from and its type;
* DWORD MsgInput: In, indicate the message content.
* Return value : BYTE UI_IS_FUNC_MSG:indicate message has been dealed with.
* Remark : the key and basal module of Normal function,to do some essential work
* according to diffrent message recieved from DT,FP,NV and so on.
*----------------------------------------------------------------------------*/
BYTE UiSubFuncNoneProc(WORD MsgType, DWORD MsgInput)
{
return UI_NOUSE_FUNC_MSG;
}
BYTE UiSubFuncBasalProc(WORD MsgType, DWORD MsgInput)
{
switch (MsgType)
{
case C_DT_TEST:
BasalRespondDTTest(MsgInput);
break;
case C_FP_KEY:
BasalRespondFPKey(MsgInput);
break;
case C_FP_SHOWLOAD:
BasalRespondFPShowLoad(MsgInput);
break;
#ifdef _KARAOKE_ENABLE_
case C_FP_MIC_DETECT:
BasalRespondFPMicDetect(MsgInput);
break;
#endif
case C_TIMER_ACTIVE:
BasalRespondTimerActive(MsgInput);
break;
case C_NV_NOTICE:
/* mask message zimin 2002/11/19*/
if (MachineState == C_MACHINE_ST_READY)
BasalRespondNVNotice(MsgInput);
break;
case C_HAL_NOTICE:
/* mask message zimin 2002/11/19*/
if (MachineState == C_MACHINE_ST_READY)
BasalRespondHALNotice(MsgInput);
break;
case C_PLAYBACK_MANAGE: //030430-01lily: lily ma:added for playback manage module
BasalRespondPlaybackManage(MsgInput);
break;
case C_NV_CHGPRNT:
BasalRespondNVChgPL(MsgInput);
break;
case C_SCRSV_NOTICE://030815-01bo: bond added for screen saver .
BasalRespondScrsaverNotice(MsgInput);
break;
#if 0//maggie for cancel
case C_FILEOPEN_NOTICE://030815-01bo: bond added for show unknow disc when mp3 disable and there is only mp3 in disc
BasalRespondFileopenNotice(MsgInput);
break;
#endif//maggie for cancel
case C_PROCESS_BAR:
switch(MsgInput)
{
case C_PROCESS_INIT:
if(g_UiCrntSubFunc == UI_SUBFUNC_VOLUM)
;
else
MPA_RefreshAuxiliary(AT_PROGRESSBAR_INIT, &gAuxParam);
break;
case C_PROCESS_END:
if(g_UiCrntSubFunc == UI_SUBFUNC_VOLUM)
;
else
MPA_RefreshAuxiliary(AT_PROGRESSBAR_CLOSE, &gAuxParam);
break;
default:
if(g_UiCrntSubFunc == UI_SUBFUNC_VOLUM)
;
else
MPA_RefreshAuxiliary(AT_PROGRESSBAR_INC, &gAuxParam);
break;
}
break;
}
return UI_IS_FUNC_MSG;
}
/*---------------------------------------------------------------
* Function_Name: BasalRespondDTTest
* Arguments: DWORD MsgInput:IN.
* Return Value: void
* Remarks : respond and process msg C_DT_TEST from DT_TASK to UI
* and send msg to FP_TASK.
*--------------------------------------------------------------*/
void BasalRespondDTTest(DWORD MsgInput)
{
if (MsgInput == C_DT_TEST_BEGIN)
{
ScrSaver(SCRSAVER_CANCEL); // for hand push on tray open
ClearRectArea(gui_hdc, GUITYPE_PLAYMODEGUI);
SetTimer(OSD1_TM_ID,PlayModeGUITimer,INFINITETIME);//301011-01mi
g_VFD_ShowInfo.AngleChk=C_OFF;
}
else if (MsgInput == C_DT_TEST_END)
{
#if 0 //maggie for cancel
if (DiscType == C_FILEOPENDISC) //[tom] add it, JPEG cannt change the TV Sys.030117-01cr
bPlayWithNoOSD = FALSE;
#endif//maggie for cancel
if (Alicdrom)
{
SetTimer(OSD6_TM_ID,ModeOSDOff,INFINITETIME);
SetTimer(OSD1_TM_ID,PlayModeGUITimer,INFINITETIME);//301011-01mi
}
else
{
//otherwise,loading icon will cover dvd icon
g_VFD_ShowInfo.FPState = C_FP_DTEND;
CmdFPMsg(VFD_REFRESH_PART1_SHOW);
AutoPlay();
}
}
}
/*---------------------------------------------------------------
* Function_Name: BasalRespondFPKey
* Arguments: DWORD MsgInput:IN.
* Return Value: void
* Remarks : process msg from FP_TASK and respond different msg input
* by function list VKeyProc
*--------------------------------------------------------------*/
void BasalRespondFPKey(DWORD MsgInput)
{
if (UiMenuPermitKey(MsgInput))
{
(VKeyProc[MsgInput])();
}
else
ShowDiscInfo( MSG_INVALID, MSG_NULL );
}
/*----------------------------------------------------------------------------
* Function_Name: BasalRespondFPShowLoad
* Arguments : DWORD MsgInput: IN, indicate load or unload status
* Return value : None
* Remark : Respond and deal with C_FP_SHOWLOAD.
*----------------------------------------------------------------------------*/
void BasalRespondFPShowLoad(DWORD MsgInput)
{
lpPLT_ATTR pPltTemp;
static int i = -1;
i++;
if (i >= 5)
i = 0;
if ( MachineState == C_MACHINE_ST_LOADING)
{
#if (_LOADING_OSD == _LOADING_ROTATE)
ShowDiscInfo(MSG_LOADING,i);
#else
if (MsgInput)
if (!BDiscPhyTypeKnown)
ShowDiscInfo(MSG_LOADING,i);
#endif
#if(_FP!=900 && _FP!=901)
if(MsgInput == 0)
{
ClearVFDPart1Show();
}
#endif
}
}
#if(_SDRAM_MODE==_SDRAM_4M16x1_MODE_)
/*----------------------------------------------------------------------------
* Function_Name: BasalRespondFPShowAngle
* Arguments : DWORD MsgInput: IN, indicate load or unload status
* Return value : None
* Remark : Respond and deal with C_FP_SHOWLOAD.
*----------------------------------------------------------------------------*/
void BasalRespondFPShowAngle(DWORD MsgInput)
{
//30918 gamble temp for angle blink in stop state
if(g_UiCoreState == UI_CORE_STOP)
{
if (g_UiCrntSubFunc != UI_SUBFUNC_VOLUM)
ClearRectArea(gui_hdc, GUITYPE_PLAYMODEGUI);
return;
}
//30918 gamble temp for angle blink in stop state end
if (MsgInput)
{
ShowDiscInfo(MSG_ANGLE,MSG_NULL);
}
else
{
ClearRectArea(gui_hdc, GUITYPE_PLAYMODEGUI);
}
}
#endif
/*----------------------------------------------------------------------------
* Function_Name: BasalRespondNVNotice
* Arguments : DWORD MsgInput:IN, indicate function position in functionlist
* Return value : None
* Remark : Respond and dealwith msg from NV to UI by Functionlist so that achieve
* synchoronization between NV and UI.
*----------------------------------------------------------------------------*/
void BasalRespondNVNotice(DWORD MsgInput)
{
(NV2UIChkFun[MsgInput])(); //go to diffrent function module according to diffrent NV-UI message input
}
/*----------------------------------------------------------------------------
* Function_Name: BasalRespondNVNotice
* Arguments : DWORD MsgInput:IN, indicate function position in functionlist
* Return value : None
* Remark : Respond and dealwith msg from NV to UI by Functionlist so that achieve
* synchoronization between NV and UI.
*----------------------------------------------------------------------------*/
void BasalRespondHALNotice(DWORD MsgInput)
{
AUDIOSTREAM AudioInfo;
switch(MsgInput)
{
case C_DISC_AUDIOTYPECHG:
if(bNeedShowAC3)
{
if ((g_UiCrntSubFunc != UI_SUBFUNC_VOLUM)&&(g_UiCrntSubFunc != UI_SUBFUNC_BMARK))
{
NVGetAudioInfo(&AudioInfo);
ShowAudioItem(AudioInfo.AStreamTotalNo, AudioType);
SetTimer(OSD6_TM_ID, ModeOSDOff, TIME_3SEC);
}
bNeedShowAC3=0;
}
SendVFDPart1Show();
break;
default :
break;
}
}
/*----------------------------------------------------------------------------
* Function_Name : BasalRespondPlaybackManage
* Arguments: DWORDMsgInput: IN, the message content.
* Return value: None
* Remark : Basal respond to the C_PLAYBACK_MANAGE message sended by NV or UI.
*----------------------------------------------------------------------------*/
void BasalRespondPlaybackManage(DWORD MsgInput)
{
switch (MsgInput)
{
case C_NV_SEG_END:
NV2UI_SegEnd();
break;
case C_UI_NEXTPRE:
UI_NextPre();
break;
default:
break;
}
}
extern void RecoverMuteIcon();
void (*ptr_RecoverMuteIcon)();
extern void UiSubFuncMuteVolumeInit(void);
void (*ptr_UiSubFuncMuteVolumeInit)(void);
//extern BOOL GetMuteVolumeStatus();
//BOOL (*ptr_GetMuteVolumeStatus)();
extern void SetMuteVolumeStatus(BOOL bStatus);
void (*ptr_SetMuteVolumeStatus)(BOOL bStatus);
//close icons of next, previous,etc created by chena
void CloseGUIIcon()
{
int PlaceHolder;
ClearRectArea(gui_hdc, GUITYPE_PLAYMODEGUI);
if(g_UiCrntSubFunc!=UI_SUBFUNC_VOLUM)
RecoverPlaymodegui();
if (TrayIsOutOfFP())
{
ShowDiscInfo(MSG_OPEN, MSG_NULL);
}
#ifdef _MUTE_ENABLE_
ptr_GetMuteVolumeStatus = GetMuteVolumeStatus;
if((*ptr_GetMuteVolumeStatus)() == MUTEVOLUME_STATUS_MUTE)
{
ptr_RecoverMuteIcon=RecoverMuteIcon;
(*ptr_RecoverMuteIcon)();
}
#endif
if ((ExtInputProc(EXT_INPUT_QUERY, &PlaceHolder) == EXT_TYPE_PREVONCE)
||(ExtInputProc(EXT_INPUT_QUERY, &PlaceHolder) == EXT_TYPE_PREVMORE))
{
IsWaitPrev=FALSE;
CmdUIMsg(C_PLAYBACK_MANAGE, C_UI_NEXTPRE);
}
if ((ExtInputProc(EXT_INPUT_QUERY, &PlaceHolder) == EXT_TYPE_NUM) || (ExtInputProc(EXT_INPUT_QUERY, &PlaceHolder) == EXT_TYPE_10_PLUS_OVER))
{
NextPrevStatus=1;
NumberPlayProc();
}
}
/*----------------------------------------------------------------------------
* Function name: BasalRespondTimerActive
* Arguments:
* DWORD MsgInput:IN, the message content (In fact it is no use)
* Return value: None
* Remark: Basal respond to the C_TIMER_ACTIVE message sended by Timer task.
*----------------------------------------------------------------------------*/
void BasalRespondTimerActive(DWORD MsgInput)
{
int PlaceHolder;
ANGLEINFO AngleInfo; //30124-05sd
WORD Ratio,guimode;
switch (MsgInput)
{
case C_PLAYMODEGUI_TIMER:
CloseGUIIcon();
break;
case C_INVALID_TIMER: //C_INVALID_TIMER ADDED BY JANE
ClearRectArea(gui_hdc, GUITYPE_PLAYMODEGUI);
//if(g_UiCrntSubFunc==UI_SUBFUNC_BASAL||g_UiCrntSubFunc==UI_SUBFUNC_ZOOM)
//RecoverOsdIcon();
if(g_UiCrntSubFunc!=UI_SUBFUNC_VOLUM)
RecoverPlaymodegui();
#ifdef _MUTE_ENABLE_
ptr_GetMuteVolumeStatus = GetMuteVolumeStatus;
if((*ptr_GetMuteVolumeStatus)() == MUTEVOLUME_STATUS_MUTE)
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -