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

📄 o_prologic2.c

📁 Zoran V966 DVD 解码 Soc芯片的源程序
💻 C
📖 第 1 页 / 共 2 页
字号:
				return MS_OP_NONE;
			}
		}
		break;

	default:
		break;
	}
	
	MsOp = HSliderOperationOnVList(pThis, MsOp, lParam);

	// Post-processing
	switch(MsOp)
	{
	case MS_OP_INIT:
		{
			if (M_Mode_Music != AS_Get_Enhancement_Mode())
			{
				MS_SET_CHOICE_DISABLE(pThis);
			}
			else
			{
				MS_CLEAR_CHOICE_DISABLE(pThis);
			}
		}
		break;

	case MS_OP_ENTER:
		return MS_OP_NONE;

	default:
		break;
	}

	return MsOp;
}
#endif//D_CUSTOM__DimCtrlSliderOperationOnVList

/***************************************************************************************
*	Function 	: 	_CentreWidthSliderOperationOnVList
*
*	In		:
*
*	Out		:
*
*	Desc 	:	The choice operation of all the slider objects.
****************************************************************************************/
#ifndef D_CUSTOM__CentreWidthSliderOperationOnVList
#pragma argsused
static MS_OP _CentreWidthSliderOperationOnVList(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
	// Pre-processing
	switch(MsOp)
	{
	case MS_OP_LEFT: // Fall Through !!!
	case MS_OP_RIGHT:
		{
			// Do nothing if disabled.
			if(MS_IS_CHOICE_DISABLED(pThis))
			{
				PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
				return MS_OP_NONE;
			}
		}
		break;

	default:
		break;
	}
	
	MsOp = HSliderOperationOnVList(pThis, MsOp, lParam);

	// Post-processing
	switch(MsOp)
	{
	case MS_OP_INIT:
		{
			if (M_Mode_Music != AS_Get_Enhancement_Mode())
			{
				MS_SET_CHOICE_DISABLE(pThis);
				
			}
			else
			{
				MS_CLEAR_CHOICE_DISABLE(pThis);
			}
		}
		break;

	case MS_OP_ENTER:
		return MS_OP_NONE;

	default:
		break;
	}

	return MsOp;
}
#endif//D_CUSTOM__CentreWidthSliderOperationOnVList
/**************************************************************************
*	Function	:      _DimCtrlSliderAction
*	In		:
*	Out 	:
*	Desc	:
***************************************************************************/
#ifndef D_CUSTOM__DimCtrlSliderAction
static UINT16 _DimCtrlSliderAction(HSLIDER_ACTION eType, UINT16 wValue)
{
	if(eType == HS_ACTION_SET)
	{
		// Send the new value to the core:
		CoreAPI_UpdatePlayerSetting( PS_UPDATE_DIMENSION_CTRL, wValue);
	}
	else
	{
		// Read the value from the core:
		wValue =CoreAPI_GetPsDimensionCtrl();
	}

	return(wValue);
}
#endif//D_CUSTOM__DimCtrlSliderAction
/**************************************************************************
*	Function	:   _CentreWidthSliderAction
*	In		:
*	Out 	:
*	Desc	:
***************************************************************************/
#ifndef D_CUSTOM__CentreWidthSliderAction
static UINT16 _CentreWidthSliderAction(HSLIDER_ACTION eType, UINT16 wValue)
{
	if(eType == HS_ACTION_SET)
	{
		// Send the new value to the core:
		CoreAPI_UpdatePlayerSetting( PS_UPDATE_CENTER_WIDTH_CTRL, wValue);
	}
	else
	{
		// Read the value from the core:
		wValue = CoreAPI_GetPsCenterWidthCtrl();
	}

	return(wValue);
}
#endif//D_CUSTOM__CentreWidthSliderAction
/***************************************************************************************
*	Function 	: 	_PrologicIIKitOperation
*
*	In		:
*
*	Out		:
*
*	Desc 	:	The PrologicII kit operation function.
****************************************************************************************/
#ifndef D_CUSTOM__PrologicIIKitOperation
#pragma argsused
static MS_OP _PrologicIIKitOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
	//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*)MS_GetObjectListPtr(pThis);				
			MS_ASSERT(NULL != pList);
			
			//NO need this sentence. Mode choice pList->moParam.mwTotalItems will change from 1 to 4, if mode is PrologicII music
			//if(pList->moParam.mwTotalItems > pList->moParam.mcNumVisibleItems)
			{
				// Remove all items.
				MS_SendOperation((MSO_OBJECT __NEAR*)pList, MS_OP_EMPTY, 0);

				_AddItemsToPrologicIIKit(pList);
				
				MS_DisplayAddObject(pThis);	

				// Set focus to the appropriate list item.
				if(MS_IsFocused(pList))
				{
					MSO_OBJECT __NEAR* pObject = MS_GetObjectListPtr(pList);
						
					if(!MS_IS_FOCUS_ON_LASTITEM(pList))	
						MS_ScreenSetFocusObject(pObject);
					else
					{						
						// Make sure we do not set focus on the Value VScroll list.					
						while(NULL != pObject->mpNext)
							pObject = pObject->mpNext;						
						MS_ScreenSetFocusObject(pObject);
					}
				}
			}			
		}
		return MS_OP_NONE;
		
	default:
		break;
	}	
	return MsOp;
}
#endif//D_CUSTOM__PrologicIIKitOperation
/***************************************************************************************
*	Function 	: 	_PrologicIIkitVlistOperation
*
*	In		:
*
*	Out		:
*
*	Desc 	:	The PrologicII kit VLIST operation function.
****************************************************************************************/
#ifndef D_CUSTOM__PrologicIIkitVlistOperation
#pragma argsused
static MS_OP _PrologicIIkitVlistOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
	switch(MsOp)
	{
	case MS_OP_INIT:
		return MS_OP_NONE;
		
	case MS_OP_OPEN:
		{
			_AddItemsToPrologicIIKit((MSO_VLIST __NEAR*)pThis);
		}
		break;

	default:
		break;
	}	
	return VListOperation(pThis, MsOp, lParam);
}
#endif//D_CUSTOM__PrologicIIkitVlistOperation
/***************************************************************************************
*	Array 		: 	aPrologicIIKit
*
*	Purpose	 	:	Contains an array of pointer to descriptors of the objects that would be 
*					added to the PrologicIIkit (oPrologicIIKitDescriptor). 
 ****************************************************************************************/

/***************************************************************************************
* 	Utility functions
****************************************************************************************/
#ifndef D_CUSTOM__AddItemsToPrologicIIKit
static BOOL _AddItemsToPrologicIIKit(MSO_VLIST __NEAR* pList)
{
	if(NULL != pList)
	{
		UINT8 cIndex;
		UINT8 cNumItems;
		UINT8 cTotalItemsInToolkit = 0;
		MSO_OBJECT __NEAR* pObject;

		// Get the total number of tools in the toolkit

		while(NULL != aPrologicIIKit[cTotalItemsInToolkit])
			cTotalItemsInToolkit++;
		//In music mode have all of them. others just have  oPLIIModeChoiceDescriptor.
		if (M_Mode_Music != AS_Get_Enhancement_Mode())
		{
			pList->moParam.mwTotalItems = 1;
		}
		else
		{
			pList->moParam.mwTotalItems = cTotalItemsInToolkit;
		}
		
		cNumItems = MIN(pList->moParam.mcNumVisibleItems, (pList->moParam.mwTotalItems - pList->moParam.mwFirstDisplayItem));

		
		for(cIndex = 0; cIndex < cNumItems; cIndex++)
		{			
			pObject = OVLIST_CreateAndAppendItem(pList, aPrologicIIKit[pList->moParam.mwFirstDisplayItem + cIndex]);
			MS_SendOperation(pObject, MS_OP_OPEN, 0);
			MS_SendOperation(pObject, MS_OP_INIT, 0);		
		}	
		return TRUE;
	}	
	return FALSE;
}
#endif//D_CUSTOM__AddItemsToPrologicIIKit
/***************************************************************************************
* 	Public functions
****************************************************************************************/

/***************************************************************************************
*	Function	:	OProLogicII_OpenAtPos
*
*	In		:	pParent		=	Pointer to the parent container.
*
*				wStartX		=	X position of the component. The default position (specified in the 
*								descriptor) is used in case this parameter is set to DEFAULT_POSITION.
*
*				wStartY		=	Y position of the component.The default position (specified in the 
*								descriptor) is used in case this parameter is set to DEFAULT_POSITION.
*
*	Out		:	None.
*
*	Return	:	Pointer to the Search component if opened successfully, otherwise NULL.
*
*	Desc		: 	Creates, and displays a Search component at a specified position.
****************************************************************************************/

extern MSO_OBJECT __NEAR* OProLogicII_OpenAtPos(MSO_CONTAINER __NEAR* pParent, UINT16 wStartX, UINT16 wStartY)
{
	if(NULL != pParent)
	{
		MSO_OBJECT __NEAR* pProLogicIIWnd = NULL;	

		pProLogicIIWnd = (MSO_OBJECT __NEAR*)MS_ComponentOpen((MS_DESCRIPTOR_COMPONENT*)&oProLogicIIDescriptor, pParent);

		if(NULL != pProLogicIIWnd)
		{
			if((DEFAULT_POSITION != wStartX) || (DEFAULT_POSITION != wStartY))
			{
				wStartX = (DEFAULT_POSITION == wStartX) ? pProLogicIIWnd->mpDescriptor->moArea.msX : wStartX;
				wStartY = (DEFAULT_POSITION == wStartY) ? pProLogicIIWnd->mpDescriptor->moArea.msY : wStartY;
				MS_ObjectMove(pProLogicIIWnd, wStartX, wStartY);
			}
			
			MS_DisplayAddObject(pProLogicIIWnd);
		}

		return pProLogicIIWnd;
	}
	return NULL;
}

#endif //D_GUI_PROLOGICII_COMPONENT

⌨️ 快捷键说明

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