📄 uiop_lib.c
字号:
{
if(((g_disc_type == DEC_DISC_TYPE_SVCD)||(g_disc_type == DEC_DISC_TYPE_VCD))&&
PM_IsPBC(PM_GetPlaybackMode())&&(PlayList == (g_pSVCDNav->m_CurrPosition).ListType))
{
PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
return;
}
if (!PM_IsPlaybackNormal(PM_GetPlaybackMode()))
{
PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
return;
}
#ifdef D_10P_KEY
g_ui_current_number += iNum;
#else
g_ui_current_number *= 10;
g_ui_current_number %= NUMERIC_SELECTION_MOD;
g_ui_current_number += iNum;
#endif
// Display the number on the screen:
MS_SendOp(MS_OP_MSG_SYS_NUMBER_INPUT, g_ui_current_number);
#ifdef D_10P_KEY
_UIOPLib_Numeric_Key_Action();
#endif
}
#endif // D_CUSTOM__UIOPLib_NumberSelect
#ifndef D_CUSTOM__UIOPLib_Eject
/****************************************************************************************************
* Function : _UIOPLib_Eject
*
* Input :
*
* Output : None
*
* Return : None
*
* Description : Executes user requested operation and updates the UI messages accordingly
*
****************************************************************************************************/
static void _UIOPLib_Eject(void)
{
dbg_printf(("_UIOPLib_Eject()\n"));
if ( (DeviceManager_GetDeviceState(DEVICE_DISC) == DEVICE_TRAY_OPENED)
|| (DeviceManager_GetDeviceState(DEVICE_DISC) == DEVICE_TRAY_OPENING) )
{
MS_SendOp(MS_OP_MSG_DEVICE_CLOSING, 0);
CoreAPI_TrayControl(FALSE);
}
else
{
MS_SendOp(MS_OP_MSG_DEVICE_EJECTING, 0);
if(gtps.mMute)
{
gtps.mMute = MUTE_SETTING_OFF;
}
DeviceManager_Eject();
}
}
#endif // D_CUSTOM__UIOPLib_Eject
#ifndef D_CUSTOM__UIOPLib_Power
/****************************************************************************************************
* Function : _UIOPLib_Power
*
* Input :
*
* Output : None
*
* Return : None
*
* Description : Executes user requested operation and updates the UI messages accordingly
*
****************************************************************************************************/
static void _UIOPLib_Power(void)
{
dbg_printf(("_UIOPLib_Power()\n"));
CoreAPI_PowerControl(FALSE);
#ifdef D_PORTABLE_DVD_POWER
CoreAPI_PowerOff();
#endif
}
#endif // D_CUSTOM__UIOPLib_Power
#ifndef D_CUSTOM__UIOPLib_Play
/****************************************************************************************************
* Function : _UIOPLib_Play
*
* Input :
*
* Output : None
*
* Return : None
*
* Description : Executes user requested operation and updates the UI messages accordingly
*
****************************************************************************************************/
static void _UIOPLib_Play(void)
{
dbg_printf(("_UIOPLib_Play()\n"));
// <<< Play the user entered track.
#ifndef D_10P_KEY
if(0 != g_ui_current_number)
{
_UIOPLib_Enter();
return;
}
#endif
// >>> Play the user entered track.
if ( (DeviceManager_GetDeviceState(DEVICE_DISC) == DEVICE_TRAY_OPENED)
|| (DeviceManager_GetDeviceState(DEVICE_DISC) == DEVICE_TRAY_OPENING) )
{
// If the tray isn't closed, close it and remember to
// play when we're notified the disc is ready
MS_SendOp(MS_OP_MSG_DEVICE_CLOSING, 0);
CoreAPI_TrayControl(FALSE);
}
else if ( g_in_full_stop && (gcs.pstate == PST_STOP))
{
// If a disc menu is present, assume one of the
// buttons is highlighted and select it
// If we're fully stopped, restart
if ( !IS_COP_ENABLE(COP_RESTART) )
{
PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
}
else
{
#ifdef TV_GUARDIAN_ENABLE
MS_SendOp(MS_OP_MSG_SYS_TVG_INFORMATION, (UINT32)CoreAPI_TVGIsActivated());
#endif//TV_GUARDIAN_ENABLE
{
MS_SendOp(MS_OP_MSG_PLAYSTATE_PLAY, 0);
#ifdef D_OEC_CUSTOMIZE // <<< ITA_KK_0001G: It stops at the non PBC disc.
if((g_disc_type == DEC_DISC_TYPE_SVCD)||(g_disc_type == DEC_DISC_TYPE_VCD))
CoreAPI_Play();
else
#endif // >>> ITA_KK_0001G: It stops at the non PBC disc.
CoreAPI_ReStart(FALSE);
g_in_full_stop = FALSE;
}
}
}
else if ( ((g_disc_type == DEC_DISC_TYPE_DVD_VIDEO)
#ifdef DVD_AUDIO_SUPPORT
||(g_disc_type == DEC_DISC_TYPE_DVD_AUDIO) //[BrianZeng:1939] select and play key must do the same operation when disc is DVD VIDEO and DVD AUDIO
#endif
)&&
(SI_DVD_BUTTON_COUNT != 0) &&
(gcs.pstate != PST_PAUSE) &&
(gcs.pstate != PST_SCAN) &&
(gcs.pstate != PST_SLOW))
{
/* Must test if we are in NOT IN PAUSE */
/* else we can never resume if we paused while BUTTONs are available */
CoreAPI_UserSelect();
}
else
{
#ifdef D_SUPPORT_ABREPEAT_ONLY_INPLAY
if ((CoreAPI_IsRepeatABA() || CoreAPI_IsRepeatABB()) && (PST_PAUSE != gcs.pstate))
{
CoreAPI_SetABRepeatMode(FALSE); // Clear A-B repeat
MS_SendOp(MS_OP_MSG_PLAYMODE_REPEAT_AB, PM_REPEAT_AB_OFF);
return ;
}
#endif
// We're not fully stopped, so just resume
if ( !IS_COP_ENABLE(COP_PLAY) )
{
PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
return;
}
// <<< Ram.wang_1229_05: #1824 PBC ON,only can play the PBC menu
#ifdef D_I86_COREAPI
//if ((CoreAPI_IsInMenu())
if ((CoreAPI_IsPlayAllowedInMenu())
#else
if ((CoreAPI_IsInMenu())
#endif
// >>> Ram.wang_1229_05
|| ((PST_PLAY != gcs.pstate) && (PST_STOP != gcs.pstate))
/* ||(CoreAPI_IsPBCOn() && PST_STOP == CoreAPI_GetPlayState())
#ifdef D_I86_COREAPI
|| SI_SVCD_DEFAULTLIST_AVAILABLE
#endif*/
)
MS_SendOp(MS_OP_MSG_PLAYSTATE_PLAY, 0);
else if (PST_STOP == gcs.pstate)
MS_SendOp(MS_OP_MSG_PLAYSTATE_RESUME_PLAY, 0);
else
{
PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
return;
}
CoreAPI_Play();
}
}
#endif // D_CUSTOM__UIOPLib_Play
#ifndef D_CUSTOM__UIOPLib_Stop
/****************************************************************************************************
* Function : _UIOPLib_Stop
*
* Input :
*
* Output : None
*
* Return : None
*
* Description : Executes user requested operation and updates the UI messages accordingly
*
****************************************************************************************************/
static void _UIOPLib_Stop(void)
{
dbg_printf(("_UIOPLib_Stop()\n"));
if( (g_disc_type == DEC_DISC_TYPE_DVD_VIDEO ) && !IS_COP_ENABLE( COP_STOP ) )
{
PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
return;
}
if (CoreAPI_IsRepeatABA() || CoreAPI_IsRepeatABB())
{
CoreAPI_SetABRepeatMode(FALSE);
}
if (TRUE == CoreAPI_Stop())
{
if (g_in_full_stop)
{
MS_SendOp(MS_OP_MSG_PLAYSTATE_STOP, 0);
}
else
{
MS_SendOp(MS_OP_MSG_PLAYSTATE_STOP_RESUME, 0);
}
#ifdef D_GINGER_I96
VPU_SetZoomScaling( NO_ZOOM );
#else //D_GINGER_I96
gcs.mZoomLevel = NO_ZOOM;
#endif //D_GINGER_I96
}
else
PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
}
#endif // D_CUSTOM__UIOPLib_Stop
#ifndef D_CUSTOM__UIOPLib_Up
/****************************************************************************************************
* Function : _UIOPLib_Up
*
* Input :
*
* Output : None
*
* Return : None
*
* Description : Executes user requested operation and updates the UI messages accordingly
*
****************************************************************************************************/
static void _UIOPLib_Up(void)
{
EVENT evt = 0;
void *param = NULL;
dbg_printf(("_UIOPLib_Up()\n"));
if (PST_STOP == gcs.pstate)
{
PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
return;
}
if (CoreAPI_GetZoomLevel() != NO_ZOOM)
{
evt = IE_CORE_PANNING;
param = (void *)PANNING_JUMP_UP;
}
else
{
evt = IE_CORE_MOVE_UP;
}
_UIOPLib_Send_Event(evt,param);
}
#endif // D_CUSTOM__UIOPLib_Up
#ifndef D_CUSTOM__UIOPLib_Down
/****************************************************************************************************
* Function : _UIOPLib_Down
*
* Input :
*
* Output : None
*
* Return : None
*
* Description : Executes user requested operation and updates the UI messages accordingly
*
****************************************************************************************************/
static void _UIOPLib_Down(void)
{
EVENT evt = 0;
void *param = NULL;
dbg_printf(("_UIOPLib_Down()\n"));
if (PST_STOP == gcs.pstate)
{
PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
return;
}
if (CoreAPI_GetZoomLevel() != NO_ZOOM)
{
evt = IE_CORE_PANNING;
param = (void *)PANNING_JUMP_DOWN;
}
else
{
evt = IE_CORE_MOVE_DOWN;
}
_UIOPLib_Send_Event(evt,param);
}
#endif // D_CUSTOM__UIOPLib_Down
#ifndef D_CUSTOM__UIOPLib_Left
/****************************************************************************************************
* Function : _UIOPLib_Left
*
* Input :
*
* Output : None
*
* Return : None
*
* Description : Executes user requested operation and updates the UI messages accordingly
*
****************************************************************************************************/
static void _UIOPLib_Left(void)
{
EVENT evt = 0;
void *param = NULL;
dbg_printf(("_UIOPLib_Left()\n"));
if (PST_STOP == gcs.pstate)
{
PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
return;
}
if (CoreAPI_GetZoomLevel() != NO_ZOOM)
{
evt = IE_CORE_PANNING;
param = (void *)PANNING_JUMP_LEFT;
}
else
{
evt = IE_CORE_MOVE_LEFT;
}
_UIOPLib_Send_Event(evt,param);
}
#endif // D_CUSTOM__UIOPLib_Left
#ifndef D_CUSTOM__UIOPLib_Right
/****************************************************************************************************
* Function : _UIOPLib_Right
*
* Input :
*
* Output : None
*
* Return : None
*
* Description : Executes user requested operation and updates the UI messages accordingly
*
****************************************************************************************************/
static void _UIOPLib_Right(void)
{
EVENT evt = 0;
void *param = NULL;
dbg_printf(("_UIOPLib_Right()\n"));
if (PST_STOP == gcs.pstate)
{
PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
return;
}
if (CoreAPI_GetZoomLevel() != NO_ZOOM)
{
evt = IE_CORE_PANNING;
param = (void *)PANNING_JUMP_RIGHT;
}
else
{
evt = IE_CORE_MOVE_RIGHT;
}
_UIOPLib_Send_Event(evt,param);
}
#endif // D_CUSTOM__UIOPLib_Right
#ifndef D_CUSTOM__UIOPLib_Enter
/****************************************************************************************************
* Function : _UIOPLib_Enter
*
* Input :
*
* Output : None
*
* Return : None
*
* Description : Executes user requested operation and updates the UI messages accordingly
*
****************************************************************************************************/
static void _UIOPLib_Numeric_Key_Action(void)
{
#ifdef D_NUM_SELECT_DVD_CHAPTER //BT032003
if ((IS_DISC_TYPE_DVD) && (!CoreAPI_IsInMenu())) //add by wl040506 to fix the button select problem
{
DWORD dwTitle = SI_DVD_TITLE_NUM_ALLDOM;
if ( CoreAPI_GotoEntry((UINT16)dwTitle, (UINT16)g_ui_current_number) ) // in case of no dvd menu button
{
// Clear the value from the screen:
MS_SendOp(MS_OP_MSG_SYS_CLEAR, 0);
g_ui_current_number = 0;
#ifdef D_10P_KEY
b_current_10PKey = 0;
#endif
return;
}
else
PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
}
else
#endif //D_NUM_SELECT_DVD_CHAPTER //BT032003
if ( CoreAPI_MenuNumericSelection(g_ui_current_number) )
{
MS_SendOp(MS_OP_MSG_SYS_CLEAR, 0);
}
else
{
PROHIBIT(MSG_PROHIBIT_NOT_SUPPORTED_BY_DISC);
}
g_ui_current_number = 0;
#ifdef D_10P_KEY
b_current_10PKey = 0;
#endif
}
static void _UIOPLib_Enter(void)
{
dbg_printf(("_UIOPLib_Enter()\n"));
#ifndef D_10P_KEY
if ( g_ui_current_number )
{
_UIOPLib_Numeric_Key_Action();
}
else
#endif
if (((DEC_DISC_TYPE_DVD_VIDEO == g_disc_type)
#ifdef DVD_AUDIO_SUPPORT
|| (DEC_DISC_TYPE_DVD_AUDIO == g_disc_type)
#endif
)
&& (SI_DVD_BUTTON_COUNT != 0))
{
CoreAPI_UserSelect();
MS_SendOp(MS_OP_MSG_SYS_CLEAR, 0);
}
#ifdef D_ENABLE_ENTER_KEY_AS_PLAY_IN_SCANMODE
else if(gcs.pstate == PST_SCAN)
_UIOPLib_Play();//resume play from scan mode
#endif//D_ENABLE_ENTER_KEY_AS_PLAY_IN_SCANMODE
#ifdef D_ENABLE_ENTER_KEY_AS_PLAY_IN_SLOWMODE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -