⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 setup_menu.c

📁 Zoran V966 DVD 解码 Soc芯片的源程序
💻 C
📖 第 1 页 / 共 5 页
字号:

	MsOp =  MS_MenuBasicOperation(pThis, MsOp, lParam);
	switch (MsOp)
	{
		case MS_OP_BUTTON_YES:
		case MS_OP_BUTTON_NO:
		case MS_OP_ENTER:
		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 !!!
			MsOp =  MS_OP_NONE;
			break;
#ifdef TV_GUARDIAN_ENABLE		
		case MS_OP_INIT:
			  if((!CoreAPI_TVGIsActivated())&&(0 != CoreAPI_GetTVGRemindCounter()))
			  	{
					MSO_OBJECT __NEAR* pObject=OTVGuardianComponent_OpenAtPos((MSO_CONTAINER __NEAR*)pThis, DEFAULT_POSITION,DEFAULT_POSITION);
					MS_SEND_OP_OBJECT(pObject, MS_OP_MENU_TVG_ADVERTISEMENT, NULL);
				}
			break;
#endif 
		default :
			break;
	}
	 return MsOp;
}
/***************************************************************************************/
#endif // D_CUSTOM__MenuOperation

/***************************************************************************************
*	Function	: 	_SetupBookOperation
*
*	In		: 	pThis	=	Pointer to a browser book 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 setup book.
****************************************************************************************/
#ifndef D_CUSTOM__SetupBookOperation
/***************************************************************************************/
STATIC MS_OP _SetupBookOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
	// Pre-processing
	switch(MsOp)
	{
	case MS_OP_OPEN:
		{
			UINT8 cIndex;

			for(cIndex = 0; cIndex < NBR_MSO_PAGES_MAX; cIndex++)
				OPAGE_AddPageToBook((MS_DESCRIPTOR_PAGE*)&oSetupPageDescriptor, (MSO_BOOK __NEAR*)pThis);
		}
		break;

	default:
		break;
	}

	MsOp = OPAGE_BookOperation(pThis, MsOp, lParam);

	// Post-processing
	switch(MsOp)
	{
	case MS_OP_INIT:
		{
			// Set focus to the proper page's tab
			MSO_OBJECT __NEAR* pPageFocus = ((MSO_CONTAINER __NEAR*)pThis)->mpOlist;

			while ((NULL != pPageFocus) && (INITIAL_FOCUS_PAGE_INDEX != ((MSO_PAGE __NEAR*)pPageFocus)->moParam.mwPageIndex))
				pPageFocus = pPageFocus->mpNext;
			
			if(NULL != pPageFocus)
			{
				MSO_OBJECT __NEAR* pTab = MS_FindObjectFromDescriptor((MSO_CONTAINER __NEAR*)pPageFocus, (MS_DESCRIPTOR*)&oTabBtnDescriptor);
				MS_ScreenSetFocusObject(pTab);
			}
		}
		break;

	default:
		break;
	}
	return MsOp;
}
/***************************************************************************************/
#endif // D_CUSTOM__SetupBookOperation

/***************************************************************************************
*	Function	: 	_WindowOperation
*
*	In		: 	pThis	=	Pointer to the window (MSO_WINDOW object) of the page.
*
*				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 page's window.
****************************************************************************************/
#ifndef D_CUSTOM__WindowOperation
/***************************************************************************************/
STATIC MS_OP _WindowOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
	MS_OP MsOpIn = MsOp;
		
	switch(MsOp)
	{
	// Done in _AddPageParams, mustn't do it twice
	case MS_OP_INIT:
		return MsOp;
		
	default:
		break;
	}
	
	MsOp = OPAGE_WindowOperation(pThis, MsOp, lParam);

	switch(MsOpIn)
	{
	// At the moment, container operation returns MS_OP_NONE when MS_OP_OPEN
	// has been handled, so we need to save the MsOpInput in case we require post processing
	case MS_OP_OPEN:
		_AddPageParams((MSO_PAGE __NEAR*)pThis->mpParent);
		break;
		
	default:
		break;
	}


	return MsOp;
}
/***************************************************************************************/
#endif // D_CUSTOM__WindowOperation

/***************************************************************************************
*	Function	: 	_ParamVScrollListOperation
*
*	In		: 	pThis	=	Pointer to the value scroll list (MSO_VSCROLL_LIST object, that contains
*							a list(MSO_VLIST object) of parameters and displays UP/Down arrow
*							when necessary) 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 parameter scroll list
*				(MSO_VSCROLL_LIST) object
****************************************************************************************/
#ifndef D_CUSTOM__ParamVScrollListOperation
/***************************************************************************************/
STATIC MS_OP _ParamVScrollListOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
	MS_ASSERT(NULL != pThis);

	// Pre-processing
	// TODO : if any

	MsOp = VScrollListOperation(pThis, MsOp, lParam);

	// Post-processing
	switch(MsOp)
	{
	case MS_OP_REFRESH:
		{
			MSO_VLIST __NEAR* pList = (MSO_VLIST __NEAR*)((MSO_CONTAINER __NEAR*)pThis)->mpOlist;
			MSO_PAGE __NEAR* pThisPage = (MSO_PAGE __NEAR*)((MSO_OBJECT __NEAR*)pThis->mpParent)->mpParent;

			MS_ASSERT(NULL != pList);
			MS_ASSERT(NULL != pThisPage);

			if(pList->moParam.mwTotalItems > pList->moParam.mcNumVisibleItems)
			{
				// Remove all items.
				MS_SendOperation((MSO_OBJECT __NEAR*)pList, MS_OP_EMPTY, 0);

				_AddPageParams(pThisPage);
				MS_DisplayAddObject(pThis);

				// Set focus to the appropriate list item.
				if(MS_IsFocused(pList))
				{
					MSO_OBJECT __NEAR* pObject = ((MSO_CONTAINER __NEAR*)pList)->mpOlist;

					if(!MS_IS_FOCUS_ON_LASTITEM(pList))
						MS_ScreenSetFocusObject(pObject);
					else
					{
						MSO_OBJECT __NEAR* pScrollList = MS_FindObjectFromDescriptor((MSO_CONTAINER __NEAR*)pThis,
																					(MS_DESCRIPTOR*)&oValueVScrollListDescriptor);
						// Make sure we do not set focus on the Value VScroll list.
						while((NULL != pObject->mpNext) && (pScrollList != pObject->mpNext))
							pObject = pObject->mpNext;
						MS_ScreenSetFocusObject(pObject);
					}
				}
			}
		}
		return MS_OP_NONE;

	default:
		break;
	}
	return MsOp;
}
/***************************************************************************************/
#endif // D_CUSTOM__ParamVScrollListOperation

/***************************************************************************************
*	Function	: 	_ValueVScrollListOperation
*
*	In		: 	pThis	=	Pointer to the value scroll list (MSO_VSCROLL_LIST object, that contains
*							a list(MSO_VLIST object) of values and displays UP/Down arrow
*							when necessary) 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 value scroll list
*				(MSO_VSCROLL_LIST) object
****************************************************************************************/
#ifndef D_CUSTOM__ValueVScrollListOperation
 /***************************************************************************************/
STATIC MS_OP _ValueVScrollListOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
	//Pre-processing
	switch(MsOp)
	{
#ifdef D_SETUP_USE_RIGHT_KEY_OPEN_CHOICE_ALSO
	case MS_OP_RIGHT:
	//close the choice by falling through to the next case
#endif
	case MS_OP_LEFT:
		{
			MSO_VLIST __NEAR* pList 		= (MSO_VLIST __NEAR*)((MSO_CONTAINER __NEAR*)pThis)->mpOlist;
			MSO_OBJECT __NEAR* pParent 	= (MSO_OBJECT __NEAR*)pThis->mpParent;
			MSO_OBJECT __NEAR* pChoice 	= MS_FindObjectFromDescriptor((MSO_CONTAINER __NEAR*)pParent,
																	(MS_DESCRIPTOR*)pList->moParam.mdwData);
			_RestoreObjectPosition(pThis);
			MS_SetInvisible(pThis);

			// Restore size, layer index of the choice object, and set focus on it.
			MS_ChangeOsdLayer(pChoice, MS_ATTR_OSD_LAYER_0);
			pChoice->moArea.mwW = pParent->moArea.mwW;
			MS_ScreenSetFocusObject(pChoice);
			MS_CHOICE_DISPLAY_NORMAL(pChoice);
			MS_DisplayAddObject((MSO_OBJECT __NEAR*)pThis->mpParent);
		}
		return MS_OP_NONE;

	default:
		break;
	}

	MsOp = VScrollListOperation(pThis, MsOp, lParam);

	// Post-processing
	switch(MsOp)
	{
	case MS_OP_REFRESH:
		{
			MSO_VLIST __NEAR* pList = (MSO_VLIST __NEAR*)((MSO_CONTAINER __NEAR*)pThis)->mpOlist;
			MSO_CHOICE __NEAR* pChoice = (MSO_CHOICE __NEAR*)MS_FindObjectFromDescriptor((MSO_CONTAINER __NEAR*)pThis->mpParent,
																					(MS_DESCRIPTOR*)pList->moParam.mdwData);
			MS_ASSERT(NULL != pList);
			MS_ASSERT(NULL != pChoice);

			if(pList->moParam.mwTotalItems > pList->moParam.mcNumVisibleItems)
			{
				// Remove all items.
				MS_SendOperation((MSO_OBJECT __NEAR*)pList, MS_OP_EMPTY, 0);

				_AddItemsAndResizeValueVList(pList, pChoice);

				MS_DisplayAddObject(pThis);

				// Set focus to the appropriate list item.
				if(MS_IsFocused(pList))
				{
					if(!MS_IS_FOCUS_ON_LASTITEM(pList))
						MS_ScreenSetFocusObject(((MSO_CONTAINER __NEAR*)pList)->mpOlist);
					else
					{
						MSO_OBJECT __NEAR* pObject = ((MSO_CONTAINER __NEAR*)pList)->mpOlist;

						while(NULL != pObject->mpNext)
							pObject = pObject->mpNext;

						MS_ScreenSetFocusObject(pObject);
					}
				}
			}
		}
		return MS_OP_NONE;

	default:
		break;
	}
	return MsOp;
}
 /***************************************************************************************/
#endif // D_CUSTOM__ValueVScrollListOperation

/***************************************************************************************
*	Function	: 	_ParamChoiceOperation
*
*	In		: 	pThis	=	Pointer to the parameter (MSO_CHOICE) object.
*

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -