📄 o_fta_transport_tab.c
字号:
{
OSDR_FreeScFormUniStr(((MSO_LISTITEM __NEAR*)pThis)->moParam.mwData[iIndex]);
((MSO_LISTITEM __NEAR*)pThis)->moParam.mwData[iIndex] = NULL_HANDLE;
}
}
break;
case MS_OP_FOCUS_CHANGE:
MS_DisplayAddObject(pThis);
break;
case MS_OP_PLAY:
case MS_OP_ENTER: // edit item
{
MSO_LISTITEM __NEAR* pSubtItem = (MSO_LISTITEM __NEAR*)pThis;
MSO_OBJECT __NEAR* pFtaProgramEdit = MS_CreateAndAddObject((MS_DESCRIPTOR*)&oFtaProgramDescriptor, (MSO_CONTAINER __NEAR*)(pThis->mpParent));
MS_SendOperation(pFtaProgramEdit, MS_OP_OPEN, (UINT32)(PROGRAM_TRANSPORT_LIST | pSubtItem->moParam.mwIndex) );
MS_SendOperation(pFtaProgramEdit, MS_OP_INIT, 0 );
MS_DisplayAddObject(pFtaProgramEdit);
}
//return MS_OP_FTA_SELECTION_FINISHED;
return MS_OP_NONE;
case MS_OP_LEFT: // delete item
{
MSO_LISTITEM __NEAR* pSubtItem = (MSO_LISTITEM __NEAR*)pThis;
MSO_OBJECT __NEAR* pFtaProgramEdit = MS_CreateAndAddObject((MS_DESCRIPTOR*)&oConfirmRemoveTRansportDescriptor, (MSO_CONTAINER __NEAR*)(pThis->mpParent));
MS_SendOperation(pFtaProgramEdit, MS_OP_OPEN, FALSE);
MS_SendOperation(pFtaProgramEdit, MS_OP_INIT, (UINT32)pSubtItem->moParam.mwIndex);
MS_DisplayAddObject(pFtaProgramEdit);
}
break;
case MS_OP_RIGHT: // add item
{
MSO_OBJECT __NEAR* pFtaProgramEdit = MS_CreateAndAddObject((MS_DESCRIPTOR*)&oFtaProgramDescriptor, (MSO_CONTAINER __NEAR*)(pThis->mpParent));
MS_SendOperation(pFtaProgramEdit, MS_OP_OPEN, (UINT32)(PROGRAM_TRANSPORT_LIST | (UINT16)-1 ));
MS_SendOperation(pFtaProgramEdit, MS_OP_INIT, 0 );
MS_DisplayAddObject(pFtaProgramEdit);
}
return MS_OP_NONE;
default:
break;;
}
return MsOp;
}
#endif
/***************************************************************************************
* Function : _ListItemFillOSDSeg
*
* In : pThis = Pointer to subtitle file list item objects.
* pAbsArea = Absolute area of pThis object.
*
* Out : None.
*
* Return : None.
*
* Desc : draw external subtitle file list item objects represented by
* oSubtListDescriptor descriptor.
****************************************************************************************/
#ifndef D_CUSTOM__ListItemFillOSDSeg
static BOOL _ListItemFillOSDSeg(MSO_OBJECT __NEAR* pThis, MS_AREA __NEAR* pAbsArea)
{
MSO_LISTITEM __NEAR* pItem = (MSO_LISTITEM __NEAR*)pThis;
FORMATED_UNICODE_STRING oFormUniStr;
UINT8* pBmp;
MS_AREA pAbsArea1 = *pAbsArea ;
//UINT16 wColor = CIDX_2;
UINT16 wColor = MS_IsSelected(pThis) ? /*pDescriptor->mwTextColor*/CIDX_4 : CIDX_2;
pAbsArea1.mwW = FTA_TAB_RECT_NUMERIC_WIDTH;
OSDR_FillOsdSegRectangleFitArea(CIDX_1, &pAbsArea1);
pAbsArea1.msX = pAbsArea1.msX + FTA_TAB_RECT_NUMERIC_WIDTH-6;
OSDR_FillOsdSegRectangleFitArea(CIDX_7, &pAbsArea1);
pAbsArea1.msX = pAbsArea1.msX + FTA_TAB_RECT_NUMERIC_WIDTH -6;
OSDR_FillOsdSegRectangleFitArea(CIDX_1, &pAbsArea1);
pAbsArea1.msX = pAbsArea1.msX + FTA_TAB_RECT_NUMERIC_WIDTH -6;
OSDR_FillOsdSegRectangleFitArea(CIDX_7, &pAbsArea1);
pAbsArea1.msX = pAbsArea1.msX + FTA_TAB_RECT_NUMERIC_WIDTH -6;
OSDR_FillOsdSegRectangleFitArea(CIDX_1, &pAbsArea1);
// display transport index
OSDR_GetFormUniStr_ScFormatted((FORMATED_UNICODE_STRING __NEAR*)&oFormUniStr, (UINT32)pItem->moParam.mwData[FTA_TAB_TRANSPORT_INDEX_COLOMN]);
OSDR_FillOsdSegUniString((FORMATED_UNICODE_STRING __NEAR*)&oFormUniStr, pAbsArea,
FTA_TAB_DISPLAY_TRANSPORT_INDEX,
(pAbsArea->mwH >> 1) + 2,
ALIGN_H_LEFT,
ALIGN_V_CENTER,
wColor);
// display transport LBM
OSDR_GetFormUniStr_ScFormatted((FORMATED_UNICODE_STRING __NEAR*)&oFormUniStr, (UINT32)pItem->moParam.mwData[FTA_TAB_TRANSPORT_LNB_COLOMN]);
OSDR_FillOsdSegUniString((FORMATED_UNICODE_STRING __NEAR*)&oFormUniStr, pAbsArea,
FTA_TAB_DISPLAY_LNB,
(pAbsArea->mwH >> 1) + 2,
ALIGN_H_LEFT,
ALIGN_V_CENTER,
wColor);
// display transport frequency
OSDR_GetFormUniStr_ScFormatted((FORMATED_UNICODE_STRING __NEAR*)&oFormUniStr, (UINT32)pItem->moParam.mwData[FTA_TAB_TRANSPORT_REQ_COLOMN]);
OSDR_FillOsdSegUniString((FORMATED_UNICODE_STRING __NEAR*)&oFormUniStr, pAbsArea,
FTA_TAB_DISPLAY_TRANS_FREQ,
(pAbsArea->mwH >> 1) + 2,
ALIGN_H_LEFT,
ALIGN_V_CENTER,
wColor);
// display symbol rate
OSDR_GetFormUniStr_ScFormatted((FORMATED_UNICODE_STRING __NEAR*)&oFormUniStr, (UINT32)pItem->moParam.mwData[FTA_TAB_TRANSPORT_SYMBOL_COLOMN]);
OSDR_FillOsdSegUniString((FORMATED_UNICODE_STRING __NEAR*)&oFormUniStr, pAbsArea,
FTA_TAB_DISPLAY_SYMBL_RATE,
(pAbsArea->mwH >> 1) + 2,
ALIGN_H_LEFT,
ALIGN_V_CENTER,
wColor);
// display polarity V/H
OSDR_GetFormUniStr_ScFormatted((FORMATED_UNICODE_STRING __NEAR*)&oFormUniStr, (UINT32)pItem->moParam.mwData[FTA_TAB_TRANSPORT_POLAR_COLOMN]);
OSDR_FillOsdSegUniString((FORMATED_UNICODE_STRING __NEAR*)&oFormUniStr, pAbsArea,
FTA_TAB_DISPLAY_POL,
(pAbsArea->mwH >> 1) + 2,
ALIGN_H_LEFT,
ALIGN_V_CENTER,
wColor);
if (MS_IsFocused(pThis))
OSDR_FillOsdSegBitmapFitArea(BMP_FG_FOCUS, pAbsArea);
return FALSE;
}
#endif // D_CUSTOM
/***************************************************************************************
* Function : OpenFTATRansportTable
*
* In :
*
* Out : None.
*
* Return : None.
*
* Desc :
****************************************************************************************/
#ifndef D_CUSTOM_OpenFTATRansportTable
MSO_OBJECT __NEAR* OpenFTATransportTable(MSO_CONTAINER __NEAR* pContainer)
{
MSO_FTA_TRANSPORT_TAB __NEAR* pFTAProgTab;
UINT16 wTotalNumFile;
if((NULL != pContainer) && CoreAPI_IsFtaMenuAllowed())
{
pFTAProgTab = (MSO_FTA_TRANSPORT_TAB __NEAR*)MS_CreateAndAddObject((MS_DESCRIPTOR*)&oDescriptorFTATransportTab,
pContainer);
wTotalNumFile = CoreAPI_FtaGetNumberOfTransport();
if (0==wTotalNumFile)
{
MS_SEND_OP_OBJECT(pFTAProgTab, MS_OP_CLOSE, 0);
return NULL;
}
// Add title
MS_SEND_OP_OBJECT(pFTAProgTab, MS_OP_OPEN, 0);
MS_SEND_OP_OBJECT(pFTAProgTab, MS_OP_INIT, 0);
return (MSO_OBJECT __NEAR*)pFTAProgTab;
}
return NULL;
}
#endif //D_CUSTOM
/***************************************************************************************
* Function : _SubtSelectWindInitOp
*
* In : pThis = point to subtitle selection window object.
*
* lParam = Parameter associated with an MS_OP if any.
*
* Out : None.
*
* Return : None.
*
* Desc : handle MS_OP_INIT operation of subtitle selection window
* object represented by oDescriptorVScrollList descriptor.
****************************************************************************************/
#ifndef D_CUSTOM__SubtSelectWindInitOp
static void _SubtSelectWindInitOp(MSO_OBJECT __NEAR* pThis, UINT32 lParam)
{
MSO_OBJECT __NEAR* pObject = MS_CreateAndAddObject((MS_DESCRIPTOR *)&oDescriptorVScrollList, (MSO_CONTAINER __NEAR*)pThis);
MS_SendOperation(pObject, MS_OP_OPEN, lParam);
#ifdef D_FTA_PROGRAM_TAB_TIMEOUT
((MSO_FTA_TRANSPORT_TAB __NEAR*)pThis)->moParam.mwTimeOut = 1200; // 120 seconds
#endif // D_FTA_PROGRAM_TAB_TIMEOUT
}
#endif // D_CUSTOM
/***************************************************************************************
* Function : _ComponentOperation
*
* In : pThis = Pointer to the subtitle select window (MSO_FTA_TRANSPORT_TAB) 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 fta table window
* (MSO_FTA_TRANSPORT_TAB) object represented by the
* oFtaWindowDescriptor descriptor.
****************************************************************************************/
#ifndef D_CUSTOM__ComponentOperation
static MS_OP _ComponentOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
// reset timer each time user made operation on the channels list
#ifdef D_FTA_PROGRAM_TAB_TIMEOUT
if( MsOp != MS_OP_TICK )
{
((MSO_FTA_TRANSPORT_TAB __NEAR*)pThis)->moParam.mwTimeOut = 400;
}
#endif // D_FTA_PROGRAM_TAB_TIMEOUT
switch (MsOp)
{
case MS_OP_INIT:
_SubtSelectWindInitOp(pThis, lParam);
MS_DisplayAddObject(pThis); // Add to display
break;//return MS_OP_NONE;
#ifdef D_FTA_PROGRAM_TAB_TIMEOUT
case MS_OP_TICK:
{
UINT16 *wTimeOut = &((MSO_FTA_TRANSPORT_TAB __NEAR*)pThis)->moParam.mwTimeOut;
if (*wTimeOut)
{
if (--(*wTimeOut) == 0)
{
//close subtitle select window and not select any subtitle
//MsOp = MS_SendOperation(pThis, MS_OP_CLEAR, 0);
//MS_SEND_OP(MsOp, 0);
MsOp = MS_OP_CLOSE_PARENT;
}
}
}
break;
#endif // D_FTA_PROGRAM_TAB_TIMEOUT
case MS_OP_CLOSE: // Fall Thru
case MS_OP_FTA_TAB_EXIT: // Fall Thru
case MS_OP_EJECT:
MS_SendOperation(pThis, MS_OP_CLOSE_PARENT, 0);
//MsOp = MS_OP_CLOSE_PARENT;
break;
case MS_OP_EMPTY:
break;
default:
break;
}
MsOp = MS_ComponentBasicOperation(pThis, MsOp, lParam);
if (MS_OP_FTA_SELECTION_FINISHED == MsOp)
{
MS_SEND_OP_OBJECT(pThis, MS_OP_CLOSE_PARENT, lParam);
}
// Prohibit user operation (such as MS_OP_SEARCH)
else if (MS_IS_USER_OP(MsOp) && (MsOp != MS_OP_POWER) && (MsOp != MS_OP_EJECT) )
{
PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
return MS_OP_NONE;
}
return MsOp;
}
#endif //D_CUSTOM
/***************************************************************************************
* Function : _ComponentFillOSDSeg
*
* In : pThis = Pointer to subtitle file list item objects.
* pAbsArea = Absolute area of pThis object.
*
* Out : None.
*
* Return : None.
*
* Desc : draw subtitle selection window objects represented by
* oSubSelectWindowDescriptor descriptor.
****************************************************************************************/
#ifndef D_CUSTOM__ComponentFillOSDSeg
#pragma argsused
static BOOL _ComponentFillOSDSeg(MSO_OBJECT __NEAR* pThis, MS_AREA __NEAR* pAbsArea)
{
OSDR_FillOsdSegBitmapFitArea(BMP_BG_2, pAbsArea);
return FALSE;
}
#endif //D_CUSTOM__ComponentFillOSDSeg
/**************************************************************************
* Function : _RemoveTransportConfirmOperation
*
* In :
*
* Out :
*
* Desc :
***************************************************************************/
#ifndef D_CUSTOM__RemoveTransportConfirmOperation
static MS_OP _RemoveTransportConfirmOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
MSO_REMOVE_TRANSPORT_CONFIRM __NEAR* pObject = (MSO_REMOVE_TRANSPORT_CONFIRM __NEAR*)pThis;
MsOp = OCONFIRM_Operation(pThis, MsOp, lParam);
switch (MsOp)
{
case MS_OP_INIT:
pObject->moParamIndex = (UINT16)lParam;
break;
case MS_OP_BUTTON_YES:
{
MSO_OBJECT __NEAR* pTransportTab = MS_FindAncestor(pThis, &oDescriptorFTATransportTab);
CoreAPI_FtaRemoveTransportFromList( pObject->moParamIndex );
MS_SendOperation((MSO_CONTAINER __NEAR *)pTransportTab, MS_OP_REFRESH, 0);
}
break;
default:
break;
}
return MsOp;
}
#endif // D_CUSTOM
#endif // FTA_SUPPORT
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -