📄 run_time_menu.c
字号:
case MS_OP_MENU_SWITCH_RESUME_STOP:
#ifdef FTA_SUPPORT
if( DeviceManager_GetCurrentDevice() == DEVICE_FTA )
{
if( !CoreAPI_FtaAbortPlayback() )
{
return MsOp;
}
return MS_OP_NONE;
}
#endif // FTA_SUPPORT
if(!CoreAPI_WaitForUICoreActionDone() || !CoreAPI_Stop())
return MsOp;
else if (CoreAPI_IsRepeatABA() || CoreAPI_IsRepeatABB())
CoreAPI_SetABRepeatMode(FALSE);
return MS_OP_NONE;
case MS_OP_MENU_SWITCH_RESUME_PLAY:
#ifdef FTA_SUPPORT
if( DeviceManager_GetCurrentDevice() == DEVICE_FTA )
{
CoreAPI_FtaChannelPlay( FTA_GetCurrChannel() );
return MS_OP_NONE;
}
#endif // FTA_SUPPORT
MS_SendOp(MS_OP_MSG_PLAYSTATE_PLAY, 0);
CoreAPI_Play();
return MS_OP_NONE;
case MS_OP_EJECT:
{
// Some components might not be able to close themselves because some other component might be open
// on top of them (E.g. The Device Switch component might be open on top of the DVD-VR or the SACD
// component). Hence, close all objects except the Message component and the Pop-up container.
MSO_OBJECT __NEAR* pObject = MS_GetObjectListPtr(pThis);
while(NULL != pObject)
{
if((MS_GetDescriptorPtr(pObject) != &oDescriptorMessageHandler) && (MS_GetDescriptorPtr(pObject) != &oPopupContainerDescriptor))
{
MS_SendOpObject(pThis, MS_OP_REMOVE, pObject);
}
pObject = pObject->mpNext;
}
MS_DisplayAddObject(pThis);
return MsOp;
}
// <<< Delegate operations to the Popup container if it is not focused.
case MS_OP_VOLUME: // Fall Through !!!
case MS_OP_VOLUME_UP: // Fall Through !!!
case MS_OP_VOLUME_DOWN: // Fall Through !!!
#ifdef D_GUI_COMPONENT_BRIGHTNESS_EDGE_CONTROLLER
case MS_OP_BRIGHTNESS_EDGE_CONTROL:
#endif // D_GUI_COMPONENT_BRIGHTNESS_EDGE_CONTROLLER
case MS_OP_0: // Fall Through !!!
case MS_OP_1: // Fall Through !!!
case MS_OP_2: // Fall Through !!!
case MS_OP_3: // Fall Through !!!
case MS_OP_4: // Fall Through !!!
case MS_OP_5: // Fall Through !!!
case MS_OP_6: // Fall Through !!!
case MS_OP_7: // Fall Through !!!
case MS_OP_8: // Fall Through !!!
case MS_OP_9: // Fall Through !!!
case MS_OP_SEARCH: // Fall Through !!!
case MS_OP_BOOKMARK: // Fall Through !!!
#ifdef D_GUI_COMPONENT_PLAYMODE
case MS_OP_PLAY_MODE:
#endif // D_GUI_COMPONENT_PLAYMODE
#ifdef D_GUI_COMPONENT_DEVICE_SWITCH
case MS_OP_DEVICE_SWITCH:
#endif // D_GUI_COMPONENT_DEVICE_SWITCH
{
// Delegate this message to the pop-up container only if it is not focused.
MSO_OBJECT __NEAR* pPopupContainer = MS_FindDescendant(pThis, &oPopupContainerDescriptor);
if(!MS_IsFocused(pPopupContainer))
return MS_SendOperation(pPopupContainer, MsOp, lParam);
}
break;
// >>> Delegate operations to the Popup container if it is not focused.
// The display component is handled in post-processing in case the focus object
// wants to use this MS_OP for its own purpose.
// The display component has no focus, so it can request for closing itself,
// the menu has to handle this operation.
#ifdef D_GUI_COMPONENT_DISPLAY
case MS_OP_DISPLAY:
if (!CoreAPI_IsMediaReady())
{
PROHIBIT(MSG_PROHIBIT_DISC_NOT_READY);
return MS_OP_NONE;
}
if(CoreAPI_IsMenuAllowedDisplay()
#ifdef D_GUI_COMPONENT_DVDVR
&& !MS_FindObjectFromDescriptor((MSO_CONTAINER __NEAR*)pThis, (MS_DESCRIPTOR*)&oDVDVRDescriptor)
#endif // D_GUI_COMPONENT_DVDVR
)
{
MSO_OBJECT __NEAR *pObjectDisplay;
// TODO: remove >>>
// Merged here but it is a fix, not a solution
#ifdef D_GINGER_I96
MSO_OBJECT __NEAR* pObject;
pObject = MS_FindObjectFromDescriptor((MSO_CONTAINER __NEAR*)pThis, (MS_DESCRIPTOR*)&oPopupContainerDescriptor);
if(FALSE == MS_IsEmpty((MSO_CONTAINER __NEAR*)pObject))
MS_SendOperation(pObject, MS_OP_EMPTY, 0);
#endif //D_GINGER_I96
// TODO: <<<Remove
pObjectDisplay = MS_FindObjectFromDescriptor((MSO_CONTAINER __NEAR*)pThis, (MS_DESCRIPTOR*)&oComponentDisplay);
if (NULL == pObjectDisplay)
{
pObjectDisplay = (MSO_OBJECT __NEAR*)MS_ComponentOpen((MS_DESCRIPTOR_COMPONENT*)&oComponentDisplay, (MSO_CONTAINER __NEAR*)pThis);
MS_ObjectMove(pObjectDisplay, AREA_DISPLAY_X, AREA_DISPLAY_Y);
#ifdef DVD_AUDIO_SUPPORT
if((DEC_DISC_TYPE_DVD_AUDIO== g_disc_type))
MS_ObjectResize(pObjectDisplay, AREA_DISPLAY_W, AREA_DISPLAY_DVDA_H);
else
#endif//DVD_AUDIO_SUPPORT
MS_ObjectResize(pObjectDisplay, AREA_DISPLAY_W, AREA_DISPLAY_H);
MS_DisplayAddObject(pObjectDisplay);
}
else
{
if (MS_OP_NONE == MS_SendOperation(pObjectDisplay, MS_OP_DISPLAY, 0))
return MS_OP_NONE;
}
return MS_OP_NONE;
}
PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
return MS_OP_NONE;
#endif // D_GUI_COMPONENT_DISPLAY
#ifdef DVD_AUDIO_PAGE_SEARCH
case MS_OP_PAGE_DOWN:
if(CoreAPI_IsMenuAllowedPageSearch())
{
CoreAPI_SkipPage(FALSE);
}
else
{
PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
}
return MS_OP_NONE;
case MS_OP_PAGE_UP:
if(CoreAPI_IsMenuAllowedPageSearch())
{
CoreAPI_SkipPage(TRUE);
}
else
{
PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
}
return MS_OP_NONE;
#endif//DVD_AUDIO_PAGE_SEARCH
// TODO: remove >>>
// Merged here but it is a fix, should be handled in _UIOPLib_Audio
#ifdef D_GINGER_I96
#ifdef INTERNAL_KARAOKE
case MS_OP_AUDIO:
{
MSO_OBJECT __NEAR *pObjectDisplay;
pObjectDisplay = MS_FindObjectFromDescriptor((MSO_CONTAINER __NEAR*)pThis, (MS_DESCRIPTOR*)&oKaraokeDescriptor);
if (NULL != pObjectDisplay)
{
PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
return MS_OP_NONE;
}
}
#endif
#endif //D_GINGER_I96
// TODO: <<<Remove
default:
break;
}
return MsOp;
}
/***************************************************************************************/
#endif //D_CUSTOM
/***************************************************************************************
* Function : _PopupContainerOperation
*
* In : pThis = Pointer to the Clips Menu (MSO_CLIPS_MENU) object.
*
* MsOp = Operation ID.
*
* lParam = Parameter associated with an MS_OP if any.
*
* Out : None.
*
* Return : ID of the operation that is to be propagated once processing is done,
* otherwise MS_OP_NONE.
*
* Desc : This function processes all operations/events of the Pop up component of the
* runtime Menu.
****************************************************************************************/
#ifndef D_CUSTOM__PopupContainerOperation
/***************************************************************************************/
static MS_OP _PopupContainerOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
MsOp = MS_BasicContainerOperation(pThis, MsOp, lParam);
#ifdef FTA_SUPPORT
if( _FtaIsMsOpAllowed(MsOp) == FALSE )
{
PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
return MS_OP_NONE;
}
switch (MsOp)
{
case MS_OP_FTA_SELECTION:
case MS_OP_MENU:
{
if (DEVICE_FTA == DeviceManager_GetCurrentDevice())
{
MSO_OBJECT __NEAR* pObFtaSel;
// To close such as FTA display component.
if(FALSE == MS_IsEmpty((MSO_CONTAINER __NEAR*)pThis))
MS_SendOperation(pThis, MS_OP_EMPTY, 0);
pObFtaSel=OpenFTASelection((MSO_CONTAINER __NEAR*)pThis, FTA_SELECTION_ALL);
if( pObFtaSel != NULL )
{
MS_DisplayAddObject(pObFtaSel);
}
else
{
PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
}
return MS_OP_NONE;
}
}
break;
case MS_OP_FTA_SELECTION_FINISHED:
if (NULL == MS_FindDescendant(pThis, &oComponentFTADisplay)) // After channel list select add FTA display compoent
MS_ComponentOpen((MS_DESCRIPTOR_COMPONENT*)&oComponentFTADisplay, (MSO_CONTAINER __NEAR*)pThis);
return MS_OP_NONE;
case MS_OP_DISPLAY:
{
if( CoreAPI_FtaIsChnlPlaying() )
{
MSO_OBJECT __NEAR* pFTADisplay = MS_FindDescendant(pThis, &oComponentFTADisplay);
if (NULL == pFTADisplay) //Open display FTA component .
{
pFTADisplay = MS_ComponentOpen((MS_DESCRIPTOR_COMPONENT*)&oComponentFTADisplay, (MSO_CONTAINER __NEAR*)pThis);
MS_SendOperation(pFTADisplay, MS_OP_MENU_SET_FTA_DISPLAY_TIME_TO_INFINIT, 0); //Set FTA display component time to infinite
}
else //Close display FTA component
MS_SendOperation(pFTADisplay, MsOp, 0);
return MS_OP_NONE;
}
}
break;
case MS_OP_SKIPF:
if( CoreAPI_FtaIsChnlPlaying() )
{
UINT16 wSubFileIndex = CoreAPI_FtaGetCurrChannel() + 1;
if (NULL == MS_FindDescendant(pThis, &oComponentFTADisplay)) //If not exist, Open FTA Display component
MS_ComponentOpen((MS_DESCRIPTOR_COMPONENT*)&oComponentFTADisplay, (MSO_CONTAINER __NEAR*)pThis);
if( wSubFileIndex >= CoreAPI_FtaGetNumberOfChannels() )
{
CoreAPI_FtaChannelPlay(0);
}
else
{
CoreAPI_FtaChannelPlay(wSubFileIndex);
}
return MS_OP_NONE;
}
break;
case MS_OP_SKIPB:
if( CoreAPI_FtaIsChnlPlaying() )
{
UINT16 wSubFileIndex = FTA_GetCurrChannel();
if (NULL == MS_FindDescendant(pThis, &oComponentFTADisplay)) // If not exist, Open FTA Display component.
MS_ComponentOpen((MS_DESCRIPTOR_COMPONENT*)&oComponentFTADisplay, (MSO_CONTAINER __NEAR*)pThis);
if( wSubFileIndex != 0 )
{
wSubFileIndex --;
CoreAPI_FtaChannelPlay(wSubFileIndex);
}
else
{
CoreAPI_FtaChannelPlay(CoreAPI_FtaGetNumberOfChannels() -1);
}
return MS_OP_NONE;
}
break;
case MS_OP_BOOKMARK:
if( CoreAPI_FtaIsChnlPlaying() )
{
MSO_OBJECT __NEAR* pObFtaSel;
// To close such as FTA display component.
if(FALSE == MS_IsEmpty((MSO_CONTAINER __NEAR*)pThis))
MS_SendOperation(pThis, MS_OP_EMPTY, 0);
pObFtaSel = OpenFTASelection((MSO_CONTAINER __NEAR*)pThis, FTA_SELECTION_FAVORITE);
if( pObFtaSel != NULL )
MS_DisplayAddObject(pObFtaSel);
else
PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
return MS_OP_NONE;
}
break;
default:
break;
}
#endif // FTA_SUPPORT
// Post-processing
// All user operations in post-processing!!!
switch(MsOp)
{
// TODO: REMOVE THIS!!!, don't ask for display on MS_OP_EMPTY, will also happen when closing the menu
case MS_OP_EMPTY:
{
// Need to refresh the container after it is emptied.
MS_DisplayAddObject(pThis);
}
return MS_OP_NONE;
#ifdef D_GUI_COMPONENT_VOLUME_CONTROL
case MS_OP_VOLUME:
case MS_OP_VOLUME_UP:
case MS_OP_VOLUME_DOWN:
{
if(FALSE == MS_IsEmpty((MSO_CONTAINER __NEAR*)pThis))
MS_SendOperation(pThis, MS_OP_EMPTY, 0);
OVolume_OpenAtPos((MSO_CONTAINER __NEAR*)pThis, AREA_VOLUME_X, AREA_VOLUME_Y);
return MS_OP_NONE;
}
#endif //#ifdef D_GUI_COMPONENT_VOLUME_CONTROL
#ifdef D_GUI_COMPONENT_TITLE_SELECT
case MS_OP_MPP:
{
if(FALSE == MS_IsEmpty((MSO_CONTAINER __NEAR*)pThis))
MS_SendOperation(pThis, MS_OP_EMPTY, 0);
OTitleSelect_OpenAtPos((MSO_CONTAINER __NEAR*)MS_GetParentPtr(pThis), AREA_TITLE_SELECT_X, AREA_TITLE_SELECT_Y);
return MS_OP_NONE;
}
#endif //D_GUI_COMPONENT_TITLE_SELECT
#ifdef D_GUI_COMPONENT_BRIGHTNESS_EDGE_CONTROLLER
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -