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

📄 setup_menu.c

📁 Zoran V966 DVD 解码 Soc芯片的源程序
💻 C
📖 第 1 页 / 共 5 页
字号:
*				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 (MSO_CHOICE) objects.
****************************************************************************************/
#ifndef D_CUSTOM__ParamChoiceOperation
 /***************************************************************************************/
STATIC MS_OP _ParamChoiceOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
	switch(MsOp)
	{	
#ifdef D_SETUP_USE_RIGHT_KEY_OPEN_CHOICE_ALSO
	case MS_OP_RIGHT:
		//open the choice by falling through to the next case.
#endif //D_SETUP_USE_RIGHT_KEY_OPEN_CHOICE_ALSO
	case MS_OP_ENTER:
		{
			// Display the value list only if we have more than one value to choose from.
			if((!MS_IS_CHOICE_DISABLED(pThis)) && (1 < ((MS_DESCRIPTOR_CHOICE*)pThis->mpDescriptor)->mcTotalValues))
			{
				MSO_OBJECT __NEAR* pObject 		= NULL;
				MSO_VLIST __NEAR* pParamList		= NULL;
				MSO_VLIST __NEAR* pValueList 		= NULL;
				MSO_OBJECT __NEAR* pValueScrollList 	= NULL;

				pParamList = (MSO_VLIST __NEAR*)pThis->mpParent;

				pValueScrollList = MS_FindObjectFromDescriptor((MSO_CONTAINER __NEAR*)pParamList, (MS_DESCRIPTOR*)&oValueVScrollListDescriptor);

				ASSERT(NULL != pValueScrollList);

				// IMPORTANT : Set the Y position to 0.
				pValueScrollList->moArea.msY = 0;
				MS_ClearInvisible(pValueScrollList);

				pValueList = (MSO_VLIST __NEAR*)((MSO_CONTAINER __NEAR*)pValueScrollList)->mpOlist;

				MS_SendOperation((MSO_OBJECT __NEAR*)pValueList, MS_OP_EMPTY, 0);

				pValueList->moParam.mdwData = (UINT32)pThis->mpDescriptor;

				pValueList->moParam.mwFirstDisplayItem = ((MSO_CHOICE __NEAR*)pThis)->moParam.mwCurrValIndex -
														(((MSO_CHOICE __NEAR*)pThis)->moParam.mwCurrValIndex % pValueList->moParam.mcNumVisibleItems);

				_AddItemsAndResizeValueVList(pValueList, (MSO_CHOICE __NEAR*)pThis);

				// Set focus to the selected item.
				pObject = ((MSO_CONTAINER __NEAR*)pValueList)->mpOlist;

				while(NULL != pObject)
				{
					if(MS_IsSelected(pObject))
						break;
					else
						pObject = pObject->mpNext;
				}

				MS_ScreenSetFocusObject(pObject);

				// Display the MSO_CHOICE object like a tab.
				MS_ChangeOsdLayer(pThis, MS_ATTR_OSD_LAYER_1);
				pThis->moArea.mwW = pValueScrollList->moArea.msX + CHOICE_OVERLAP_VALUELIST_W;
				MS_SET_CHOICE_DISPLAY_AS_TAB(pThis);
				MS_DisplayAddObject((MSO_OBJECT __NEAR*)((MSO_OBJECT __NEAR*)pParamList)->mpParent);
			}
		}
		return MS_OP_NONE;

	default:
		break;
	}
	return ChoiceOperation(pThis, MsOp, lParam);
}
 /***************************************************************************************/
#endif // D_CUSTOM__ParamChoiceOperation

/***************************************************************************************
*	Function	: 	_TestToneChoiceOperation
*
*	In		: 	pThis	=	Pointer to the parameter (MSO_CHOICE) 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 (MSO_CHOICE) objects.
****************************************************************************************/
#ifdef D_SETUP_PINK_NOISE
#ifndef D_CUSTOM__TestToneChoiceOperation
 /***************************************************************************************/
STATIC MS_OP _TestToneChoiceOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
	switch(MsOp)
	{
	case MS_OP_FOCUS_CHANGE: //FALL Through
		if (MS_IsFocused(pThis))
			break;
	case MS_OP_INIT:					// Fall Through !!!
	case MS_OP_PREPARE_FOR_FREEZE:	// Fall Through !!!
	case MS_OP_EMPTY:
		{
			MSO_CHOICE __NEAR* pChoice = (MSO_CHOICE __NEAR*)pThis;
			
			CoreAPI_SetPinkNoiseMode(PINK_NOISE_OFF);
			pChoice ->moParam.mwCurrValIndex = PINK_NOISE_OFF;
		}
		break;
		
	default:
		break;
	}
	return _ParamChoiceOperation(pThis, MsOp, lParam);
}
 /***************************************************************************************/
#endif // D_CUSTOM__TestToneChoiceOperation
#endif  //D_SETUP_PINK_NOISE

/***************************************************************************************
*	Function	:	_ListItemOperation
*
*	In		:	pThis	=	Pointer to current object
*				MsOp	=	Operation to be carried out
*				lParam	=	Associated parameter (if any)
*
*	Out 		:	None
*
*	Return	: 	Relevant operation
*
*	Desc		: 	Executes the operation for a MSO_LISTITEM.
****************************************************************************************/
#ifndef D_CUSTOM__ListItemOperation
 /***************************************************************************************/
MS_OP _ListItemOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
	switch(MsOp)
	{
	case MS_OP_INIT:
		_ListItemInitOperation(pThis, lParam);
		break;
	case MS_OP_CLOSE_CHOICE:
	case MS_OP_ENTER:
		{
			if(!MS_IS_LISTITEM_DISABLED(pThis))
			{
				MSO_LISTITEM __NEAR* pListItem 		= (MSO_LISTITEM __NEAR*)pThis;
				MSO_VLIST __NEAR* pList 			= (MSO_VLIST __NEAR*)pThis->mpParent;
				MSO_OBJECT __NEAR* pParamVList 	= (MSO_OBJECT __NEAR*)((MSO_OBJECT __NEAR*)((MSO_OBJECT __NEAR*)pList)->mpParent)->mpParent;
				MSO_OBJECT __NEAR* pValueVScrollList 	= MS_FindObjectFromDescriptor((MSO_CONTAINER __NEAR*)pParamVList,
																			(MS_DESCRIPTOR*)&oValueVScrollListDescriptor);

				MS_DESCRIPTOR_CHOICE* pChoiceDescriptor = (MS_DESCRIPTOR_CHOICE*)pList->moParam.mdwData;

				MSO_CHOICE __NEAR* pChoice = (MSO_CHOICE __NEAR*)MS_FindObjectFromDescriptor((MSO_CONTAINER __NEAR*)pParamVList,
																						(MS_DESCRIPTOR*)pChoiceDescriptor);

				if(mpfMutatorNull != pChoiceDescriptor->mpfMutator)
					pChoiceDescriptor->mpfMutator((MSO_OBJECT __NEAR*)pChoice, eMutatorSet, pListItem->moParam.mwValue);

#ifdef D_SETUP_TV_SYSTEM_WARNING_MENU
				if (MS_IsFocused(pThis))
#endif
				{
					// IMPORTANT : Restore the Y position.
					_RestoreObjectPosition(pValueVScrollList);
					MS_SetInvisible(pValueVScrollList);

					// Restore size and layer information of the concerned MSO_CHOICE object.
					MS_ChangeOsdLayer((MSO_OBJECT __NEAR*)pChoice, MS_ATTR_OSD_LAYER_0);
					((MSO_OBJECT __NEAR*)pChoice)->moArea.mwW = pParamVList->moArea.mwW;
					MS_ScreenSetFocusObject((MSO_OBJECT __NEAR*)pChoice);
					MS_CHOICE_DISPLAY_NORMAL(pChoice);
					MS_DisplayAddObject(pParamVList);
				}
			}
		}
		return MS_OP_NONE;
	default:
		break;
	}
	return ListItemOperation(pThis, MsOp, lParam);
}
 /***************************************************************************************/
#endif // D_CUSTOM__ListItemOperation
/***************************************************************************************
*	Function	:	_SmartPicListItemOperation
*
*	In		:	pThis	=	Pointer to current object
*				MsOp	=	Operation to be carried out
*				lParam	=	Associated parameter (if any)
*
*	Out 		:	None
*
*	Return	: 	Relevant operation
*
*	Desc		: 	Executes the operation for a MSO_LISTITEM.
****************************************************************************************/
#ifdef D_SETUP_SMART_PICTURE
#ifndef D_CUSTOM__SmartPicListItemOperation
 /***************************************************************************************/
STATIC MS_OP _SmartPicListItemOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
	switch(MsOp)
	{
	case MS_OP_INIT:
		_ListItemInitOperation(pThis, lParam);
		break;
	case MS_OP_CLOSE_CHOICE:
	case MS_OP_ENTER:
		{
			if(!MS_IS_LISTITEM_DISABLED(pThis))
			{
				MSO_LISTITEM __NEAR* pListItem 		= (MSO_LISTITEM __NEAR*)pThis;
				MSO_VLIST __NEAR* pList 			= (MSO_VLIST __NEAR*)pThis->mpParent;
				MSO_OBJECT __NEAR* pParamVList 	= (MSO_OBJECT __NEAR*)((MSO_OBJECT __NEAR*)((MSO_OBJECT __NEAR*)pList)->mpParent)->mpParent;
				MSO_OBJECT __NEAR* pValueVScrollList 	= MS_FindObjectFromDescriptor((MSO_CONTAINER __NEAR*)pParamVList,
																			(MS_DESCRIPTOR*)&oValueVScrollListDescriptor);

				MS_DESCRIPTOR_CHOICE* pChoiceDescriptor = (MS_DESCRIPTOR_CHOICE*)pList->moParam.mdwData;

				MSO_CHOICE __NEAR* pChoice = (MSO_CHOICE __NEAR*)MS_FindObjectFromDescriptor((MSO_CONTAINER __NEAR*)pParamVList,
																						(MS_DESCRIPTOR*)pChoiceDescriptor);
#ifdef D_SETUP_USE_SLIDE_FOR_SMART_PIC
				if(pListItem->moParam.mwValue == BRIGHTNESS_DYNAMIC)
				{
					if(MS_FindDescendant((MSO_CONTAINER __NEAR*)(((MSO_OBJECT __NEAR*)pChoice)->mpParent), &oSmartPicControlDescriptor ) != NULL)
					{
						MS_ComponentClose((MS_DESCRIPTOR_COMPONENT*)&oSmartPicControlDescriptor , TRUE);
					}
					else
					{
						if(NULL == OSmartPic_OpenAtPos((MSO_CONTAINER __NEAR*)(((MSO_OBJECT __NEAR*)pChoice)->mpParent), AREA_SMARTPIC_X, AREA_SMARTPIC_Y))
						{
							PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);	
							return MS_OP_NONE;
						}
					}
				}
#endif				
				if(mpfMutatorNull != pChoiceDescriptor->mpfMutator)
					pChoiceDescriptor->mpfMutator((MSO_OBJECT __NEAR*)pChoice, eMutatorSet, pListItem->moParam.mwValue);

#ifdef D_SETUP_TV_SYSTEM_WARNING_MENU
				if (MS_IsFocused(pThis))
#endif
				{
					// IMPORTANT : Restore the Y position.
					_RestoreObjectPosition(pValueVScrollList);
					MS_SetInvisible(pValueVScrollList);

					// Restore size and layer information of the concerned MSO_CHOICE object.
					MS_ChangeOsdLayer((MSO_OBJECT __NEAR*)pChoice, MS_ATTR_OSD_LAYER_0);
					((MSO_OBJECT __NEAR*)pChoice)->moArea.mwW = pParamVList->moArea.mwW;
					MS_ScreenSetFocusObject((MSO_OBJECT __NEAR*)pChoice);
					MS_CHOICE_DISPLAY_NORMAL(pChoice);
					MS_DisplayAddObject(pParamVList);
				}
			}
		}
		return MS_OP_NONE;
	default:
		break;
	}
	return ListItemOperation(pThis, MsOp, lParam);
}
 /***************************************************************************************/
#endif // D_CUSTOM__SmartPicListItemOperation
#endif
/***************************************************************************************
*	Function	:	_BtnResetDefaultButtonOperation
*
*	In		:	pThis	=	Pointer to current object
*				MsOp	=	Operation to be carried out
*				lParam	=	Associated parameter (if any)
*
*	Out 		:	None
*
*	Return	: 	Relevant operation
*
*	Desc		: 	Executes the operation for a button that sets factory default settings for
*				the setup menu
****************************************************************************************/
 #ifndef D_CUSTOM__BtnResetDefaultButtonOperation
/***************************************************************************************/
STATIC MS_OP  _BtnResetDefaultButtonOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
#ifdef D_OPEN_SETUP_MENU_ON_FLY
	if (PST_STOP != CoreAPI_GetPlayState())
	{
		MS_ClearFocusable(pThis);
	}
#endif

	switch(MsOp)
	{
	case MS_OP_ENTER:
	{
		MSO_OBJECT __NEAR *pObjectComponentConfirmReset;

			pObjectComponentConfirmReset = (MSO_OBJECT __NEAR*)MS_ComponentOpen((MS_DESCRIPTOR_COMPONENT *)&oConfirmResetDescriptor,
        												(MSO_CONTAINER __NEAR*)(pThis->mpParent));

		MS_DisplayAddObject(pObjectComponentConfirmReset);
		return MS_OP_NONE;
	}

	default:
		break;
	}
	return OBUTTON_Operation(pThis, MsOp, lParam);
}
/***************************************************************************************/
#endif // D_CUSTOM__BtnResetDefaultButtonOperation

/***************************************************************************************
*	Function	:	_ConfirmResetOperation
*
*	In		:	pThis	=	Pointer to current confrim object
*				MsOp	=	Operation to be carried out
*				lParam	=	Associated parameter (if any)
*
*	Out 	:	None
*
*	Return	: 	none
*
*	Desc	: 	Executes the operation for the confirm menu for sets f

⌨️ 快捷键说明

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