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

📄 tidtv_menusetupproc.c

📁 ti的数字电视芯片 tvp9000的源码
💻 C
📖 第 1 页 / 共 5 页
字号:
*	@Description:: CC Font Fore Color Init
*
*	@Input		::
*		TI_DTV_MENU_ITEM *pMenuItem
*
*	@Output		:: none
*
*	@Return		:: none
*******************************************************************************/
void DtvSetupClosedCaptionOptionForeColorInitFuct(TI_DTV_MENU_ITEM *pMenuItem)
{
	short * UserPreferOffset;
	UserPreferOffset = (short *)((UINT32)(&UserPreferSetting) + (UINT32)(sizeof(USHORT) * USERPREFER_SETUPCLOSEDCAPTIONFOREGROUNDCOLOR_INDEX));
	TiDTV_MenuRadioBoxInitFuct(pMenuItem, UserPreferOffset, DtvSetupClosedCaptionOptionColorStrings );
}




/*******************************************************************************
*	@RoutineName:: DtvSetupClosedCaptionOptionForeColorActFuct
*
*	@Description:: CC Font Fore Color Action
*
*	@Input		::None
*		
*
*	@Output		:: none
*
*	@Return		:: none
*******************************************************************************/

int DtvSetupClosedCaptionOptionForeColorActFuct(void)
{

	short * UserPreferOffset;
	UserPreferOffset = (short *)((UINT32)(&UserPreferSetting) + (UINT32)(sizeof(USHORT) * USERPREFER_SETUPCLOSEDCAPTIONFOREGROUNDCOLOR_INDEX));
	TiDTV_MenuRadioBoxActFuct(&TiDtvMenuSetupClosedCaption, pCurDtvMenu->pCurItem, UserPreferOffset, (USHORT *) DtvSetupClosedCaptionOptionColorStrings);
	return 1;
}

/*******************************************************************************
*	@RoutineName:: DtvSetupClosedCaptionOptionBackColorInitFuct
*
*	@Description:: CC Font Back Color Init
*
*	@Input		::
*		TI_DTV_MENU_ITEM *pMenuItem
*
*	@Output		:: none
*
*	@Return		:: none
*******************************************************************************/
void DtvSetupClosedCaptionOptionBackColorInitFuct(TI_DTV_MENU_ITEM *pMenuItem)
{
	short * UserPreferOffset;
	UserPreferOffset = (short *)((UINT32)(&UserPreferSetting) + (UINT32)(sizeof(USHORT) * USERPREFER_SETUPCLOSEDCAPTIONBACKGROUNDCOLOR_INDEX));
	TiDTV_MenuRadioBoxInitFuct(pMenuItem, UserPreferOffset, DtvSetupClosedCaptionOptionColorStrings );
}


/*******************************************************************************
*	@RoutineName:: DtvSetupClosedCaptionOptionBackColorActFuct
*
*	@Description:: CC Font Back Color Init
*
*	@Input		::None
*		
*
*	@Output		:: none
*
*	@Return		:: none
*******************************************************************************/

int DtvSetupClosedCaptionOptionBackColorActFuct(void)
{

	short * UserPreferOffset;
	UserPreferOffset = (short *)((UINT32)(&UserPreferSetting) + (UINT32)(sizeof(USHORT) * USERPREFER_SETUPCLOSEDCAPTIONBACKGROUNDCOLOR_INDEX));
	TiDTV_MenuRadioBoxActFuct(&TiDtvMenuSetupClosedCaption, pCurDtvMenu->pCurItem, UserPreferOffset, (USHORT *) DtvSetupClosedCaptionOptionColorStrings);
	return 1;
}


/*******************************************************************************
*	@RoutineName:: DtvSetupClosedCaptionOptionForeOpacityInitFuct
*
*	@Description:: CC Font Fore Opacity Init
*
*	@Input		::
*		TI_DTV_MENU_ITEM *pMenuItem
*
*	@Output		:: none
*
*	@Return		:: none
*******************************************************************************/
void DtvSetupClosedCaptionOptionForeOpacityInitFuct(TI_DTV_MENU_ITEM *pMenuItem)
{
	short * UserPreferOffset;
	UserPreferOffset = (short *)((UINT32)(&UserPreferSetting) + (UINT32)(sizeof(USHORT) * USERPREFER_SETUPCLOSEDCAPTIONFOREGROUNDOPACITY_INDEX));
	TiDTV_MenuRadioBoxInitFuct(pMenuItem, UserPreferOffset, DtvSetupClosedCaptionOptionOpacityStrings );
}


/*******************************************************************************
*	@RoutineName:: DtvSetupClosedCaptionOptionForeOpacityActFuct
*
*	@Description:: CC Font Fore Opacity Init
*
*	@Input		::None
*		
*
*	@Output		:: none
*
*	@Return		:: none
*******************************************************************************/

int DtvSetupClosedCaptionOptionForeOpacityActFuct(void)
{

	short * UserPreferOffset;
	UserPreferOffset = (short *)((UINT32)(&UserPreferSetting) + (UINT32)(sizeof(USHORT) * USERPREFER_SETUPCLOSEDCAPTIONFOREGROUNDOPACITY_INDEX));
	TiDTV_MenuRadioBoxActFuct(&TiDtvMenuSetupClosedCaption, pCurDtvMenu->pCurItem, UserPreferOffset, (USHORT *) DtvSetupClosedCaptionOptionOpacityStrings);
	return 1;
}

/*******************************************************************************
*	@RoutineName:: DtvSetupClosedCaptionOptionBackOpacityInitFuct
*
*	@Description:: CC Font Back Opacity Init
*
*	@Input		::
*		TI_DTV_MENU_ITEM *pMenuItem
*
*	@Output		:: none
*
*	@Return		:: none
*******************************************************************************/
void DtvSetupClosedCaptionOptionBackOpacityInitFuct(TI_DTV_MENU_ITEM *pMenuItem)
{
	short * UserPreferOffset;
	UserPreferOffset = (short *)((UINT32)(&UserPreferSetting) + (UINT32)(sizeof(USHORT) * USERPREFER_SETUPCLOSEDCAPTIONBACKGROUNDOPACITY_INDEX));
	TiDTV_MenuRadioBoxInitFuct(pMenuItem, UserPreferOffset, DtvSetupClosedCaptionOptionOpacityStrings );
}



/*******************************************************************************
*	@RoutineName:: DtvSetupClosedCaptionOptionBackOpacityActFuct
*
*	@Description:: CC Font Back Opacity Init
*
*	@Input		::None
*		
*
*	@Output		:: none
*
*	@Return		:: none
*******************************************************************************/

int DtvSetupClosedCaptionOptionBackOpacityActFuct(void)
{

	short * UserPreferOffset;
	UserPreferOffset = (short *)((UINT32)(&UserPreferSetting) + (UINT32)(sizeof(USHORT) * USERPREFER_SETUPCLOSEDCAPTIONBACKGROUNDOPACITY_INDEX));
	TiDTV_MenuRadioBoxActFuct(&TiDtvMenuSetupClosedCaption, pCurDtvMenu->pCurItem, UserPreferOffset, (USHORT *) DtvSetupClosedCaptionOptionOpacityStrings);
	return 1;
}


/*******************************************************************************
*	@RoutineName:: DtvSetupVChipOnOffStringsInitFuct
*
*	@Description:: VCHIP on/off init
*
*	@Input		::
*		TI_DTV_MENU_ITEM *pMenuItem
*
*	@Output		:: none
*
*	@Return		:: none
*******************************************************************************/
void DtvSetupVChipOnOffInitFuct(TI_DTV_MENU_ITEM *pMenuItem)
{
	short * UserPreferOffset;
	UserPreferOffset = (short *)((UINT32)(&UserPreferSetting) + (UINT32)(sizeof(USHORT) * USERPREFER_SETUPVCHIPONOFF_INDEX));
	TiDTV_MenuRadioBoxInitFuct(pMenuItem, UserPreferOffset, DtvSetupVChipOnOffStrings );
}



/*******************************************************************************
*	@RoutineName:: DtvSetupVChipOnOffActFuct
*
*	@Description:: VCHIP on/off Action
*
*	@Input		::None
*		
*
*	@Output		:: none
*
*	@Return		:: none
*******************************************************************************/

int DtvSetupVChipOnOffActFuct(void)
{

	short * UserPreferOffset;
	UserPreferOffset = (short *)((UINT32)(&UserPreferSetting) + (UINT32)(sizeof(USHORT) * USERPREFER_SETUPVCHIPONOFF_INDEX));
	TiDTV_MenuRadioBoxActFuct(&TiDtvMenuSetup, pCurDtvMenu->pCurItem, UserPreferOffset, (USHORT *) DtvSetupVChipOnOffStrings);
	return 1;
}


/*******************************************************************************
*	@RoutineName:: DtvSetupVChipParentGuideInitFuct
*
*	@Description:: Parent Guide init
*
*	@Input		::None
*		
*
*	@Output		:: none
*
*	@Return		:: none
*******************************************************************************/

void	DtvSetupVChipParentGuideInitFuct(TI_DTV_MENU_ITEM *pMenuItem)
{
	TiDTV_MenuPageEndInitFuct(pMenuItem);
	
}

/*******************************************************************************
*	@RoutineName:: DtvSetupVChipParentGuideActFuct
*
*	@Description:: Parent Guide Action
*
*	@Input		::None
*		
*
*	@Output		:: none
*
*	@Return		:: none
*******************************************************************************/
int	DtvSetupVChipParentGuideActFuct()
{
	DtvSetupVChipParentGuidelinesOpcodeParser();
	return 1;
}			

/*******************************************************************************
*	@RoutineName:: DtvSetupVChipMPAAGuideInitFuct
*
*	@Description:: MPAA rating Init
*
*	@Input		::None
*		
*
*	@Output		:: none
*
*	@Return		:: none
*******************************************************************************/
void	DtvSetupVChipMPAAGuideInitFuct(TI_DTV_MENU_ITEM *pMenuItem)
{
	TiDTV_MenuPageEndInitFuct(pMenuItem);
}


/*******************************************************************************
*	@RoutineName:: DtvSetupVChipMPAAGuideActFuct
*
*	@Description:: MPAA rating Action
*
*	@Input		::None
*		
*
*	@Output		:: none
*
*	@Return		:: none
*******************************************************************************/
int	DtvSetupVChipMPAAGuideActFuct()
{
//	TiDTV_MenuPageEndActFuct(&TiDtvMenuSetup, NULL);
	short * UserPreferOffset;
	UserPreferOffset = (short *)((UINT32)(&UserPreferSetting) + (UINT32)(sizeof(USHORT) * USERPREFER_SETUPVCHIPMPAARATING_INDEX));

	TiDTV_MenuCheckBoxActFuct(&TiDtvMenuSetup, BMP_SELLOCKER, BMP_LOCKER, UserPreferOffset, DtvSetupVChipMPAARatingStrings );
	return 1;
}


/*******************************************************************************
*	@RoutineName:: TiDTV_VChipPassWordInputingHandler
*
*	@Description:: Password Input
*
*	@Input		::None
*		
*
*	@Output		:: none
*
*	@Return		:: none
*******************************************************************************/


int TiDTV_VChipPassWordInputingHandler()
{
	USHORT i;
	USHORT BeforeSetCharacter[] = {'-', 0};
	USHORT AfterSetCharacter[] = {'*', 0}; 	
	
	if(PassWordCursor == 0)
	{
		TiDTV_UpdateSubFrameMiddleBlock(0,0,0,0);
		TiDTV_UpdateNavigationBar((TI_DTV_MENU_NODE_NAVIGATION *) &TiDTV_VChipPassWord_Navigation, 0);
	}
	
	for(i = 0; i < 4; i++)
	{
		if(i == PassWordCursor)
		{
		TiDTV_OsdRect(&TiDTV_OsdScreenMain, SUB_MENU_VCHIPPASSWORD_XPOSITION + 100 * i , SUB_MENU_VCHIPPASSWORD_YPOSITION, 60, 60,
					 TI_DTV_G_BORDER | TI_DTV_G_OPAQUE, SUB_MENU_CHARACTER_SEL_FRONTCOLOR, SUB_MENU_CHARACTER_BACKCOLOR, SUB_MENU_CHARACTER_SEL_FRONTCOLOR);

		TiDTV_OsdMove(&TiDTV_OsdScreenMain, SUB_MENU_VCHIPPASSWORD_XPOSITION + 100 * i + 24, SUB_MENU_VCHIPPASSWORD_YPOSITION + 14 );
		TiDTV_OsdSetCharColor(&TiDTV_OsdScreenMain, SUB_MENU_CHARACTER_SEL_FRONTCOLOR, SUB_MENU_CHARACTER_BACKCOLOR);
		TiDTV_OsdDrawString(&TiDTV_OsdScreenMain, BeforeSetCharacter);
		}
		else
		{
		TiDTV_OsdRect(&TiDTV_OsdScreenMain, SUB_MENU_VCHIPPASSWORD_XPOSITION + 100 * i , SUB_MENU_VCHIPPASSWORD_YPOSITION, 60, 60,
					 TI_DTV_G_BORDER | TI_DTV_G_OPAQUE, SUB_MENU_CHARACTER_HIGHTLIGHTCOLOR, SUB_MENU_CHARACTER_BACKCOLOR, SUB_MENU_CHARACTER_HIGHTLIGHTCOLOR);
		}
		
		if(i < PassWordCursor)
		{
			TiDTV_OsdMove(&TiDTV_OsdScreenMain, SUB_MENU_VCHIPPASSWORD_XPOSITION + 100 * i + 24, SUB_MENU_VCHIPPASSWORD_YPOSITION + 14 );
			TiDTV_OsdSetCharColor(&TiDTV_OsdScreenMain, SUB_MENU_CHARACTER_UNSEL_FRONTCOLOR, SUB_MENU_CHARACTER_BACKCOLOR);
			TiDTV_OsdDrawString(&TiDTV_OsdScreenMain, AfterSetCharacter);
		}
		else if (i > PassWordCursor)
		{
			TiDTV_OsdMove(&TiDTV_OsdScreenMain, SUB_MENU_VCHIPPASSWORD_XPOSITION + 100 * i + 24, SUB_MENU_VCHIPPASSWORD_YPOSITION + 14 );
			TiDTV_OsdSetCharColor(&TiDTV_OsdScreenMain, SUB_MENU_CHARACTER_UNSEL_FRONTCOLOR, SUB_MENU_CHARACTER_BACKCOLOR);
			TiDTV_OsdDrawString(&TiDTV_OsdScreenMain, BeforeSetCharacter);
		}
	}
	return 0;
}




/*******************************************************************************
*	@RoutineName:: TiDTV_TVParentalGuidelinesHandler
*
*	@Description:: Parental Guide handler
*
*	@Input		::None
*		
*
*	@Output		:: none
*
*	@Return		:: none
*******************************************************************************/

USHORT TiDTV_TVParentalGuidelinesHandler()
{
	USHORT i,j;
	USHORT *Pt; 
	USHORT	mask[8] = {0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};
	
//	USHORT L[] 		= {'L', 0};
//	USHORT U[] 		= {'U', 0};

	if(InParentalGuidelines == 0)
	{
		ParentGuideCursor[0] = 0;
		ParentGuideCursor[1] = 0;  
		InParentalGuidelines = 1;
		TiDTV_UpdateSubFrameMiddleBlock(0,0,0,0);
		TiDTV_UpdateNavigationBar((TI_DTV_MENU_NODE_NAVIGATION *) &TiDTV_VChipParentGuideBlock_Navigation, 0);
		TiDTV_OsdRect(&TiDTV_OsdScreenMain, SUB_MENU_VCHIPPARENTGUIDEBLOCK_XPOSITION, SUB_MENU_VCHIPPARENTGUIDEBLOCK_YPOSITION, SUB_MENU_VCHIPPARENTGUIDEBLOCK_WIDTH, SUB_MENU_VCHIPPARENTGUIDEBLOCK_HEIGHT,
					 TI_DTV_G_BORDER | TI_DTV_G_OPAQUE, SUB_MENU_CHARACTER_HIGHTLIGHTCOLOR, SUB_MENU_CHARACTER_BACKCOLOR, SUB_MENU_CHARACTER_HIGHTLIGHTCOLOR);

		// draw titles
		for(i = 0; i < 6; i++)
		{
			TiDTV_OsdMove(&TiDTV_OsdScreenMain, SUB_MENU_VCHIPPARENTGUIDEBLOCK_XPOSITION + 8, SUB_MENU_VCHIPPARENTGUIDEBLOCK_YPOSITION + 40 + 40 * i );
			TiDTV_OsdSetCharColor(&TiDTV_OsdScreenMain, SUB_MENU_CHARACTER_UNSEL_FRONTCOLOR, SUB_MENU_CHARACTER_BACKCOLOR);
			TiDTV_OsdDrawString(&TiDTV_OsdScreenMain, pTVParentalGuideAgeBasedRatings[i]);
		}
		for(i = 0; i < 6; i++)
		{
			TiDTV_OsdMove(&TiDTV_OsdScreenMain, (SUB_MENU_VCHIPPARENTGUIDEBLOCK_XPOSITION + 104 + 56 * i), SUB_MENU_VCHIPPARENTGUIDEBLOCK_YPOSITION + 8);
			TiDTV_OsdSetCharColor(&TiDTV_OsdScreenMain, SUB_MENU_CHARACTER_UNSEL_FRONTCOLOR, SUB_MENU_CHARACTER_BACKCOLOR);
			TiDTV_OsdDrawString(&TiDTV_OsdScreenMain, pTVParentalGuideContentCategory[i]);
		}
		// draw blocks
		for(j = 0; j < 6; j++)
		{
			for(i = 0; i < 6; i++)
			{
				if(ValidPosition[j][i] == 1)
				{
					TiDTV_OsdRect(&TiDTV_OsdScreenMain, SUB_MENU_VCHIPPARENTGUIDEBLOCK_XPOSITION + 100 + 56 * i, SUB_MENU_VCHIPPARENTGUIDEBLOCK_YPOSITION + 40 + 40 * j, 56, 40,
					 TI_DTV_G_BORDER | TI_DTV_G_OPAQUE, SUB_MENU_CHARACTER_UNSEL_FRONTCOLOR, SUB_MENU_CHARACTER_LIGHTGRAY, SUB_MENU_CHARACTER_UNSEL_FRONTCOLOR);

				}
				else
				{
					TiDTV_OsdRect(&TiDTV_OsdScreenMain, SUB_MENU_VCHIPPARENTGUIDEBLOCK_XPOSITION + 100 + 56 * i, SUB_MENU_VCHIPPARENTGUIDEBLOCK_YPOSITION + 40 + 40 * j, 56, 40,
					 TI_DTV_G_BORDER | TI_DTV_G_OPAQUE, SUB_MENU_CHARACTER_UNSEL_FRONTCOLOR, SUB_MENU_CHARACTER_DARKGRAY, SUB_MENU_CHARACTER_UNSEL_FRONTCOLOR);
				}
			}
		}
		// draw lock/unlock situation
		for(j = 0; j < 6; j++)
		{
			Pt = (USHORT*)(&UserPreferSetting.UserPrefer_SetupVChipTVParentalGuideTVY + j);
			for(i = 0; i < 6; i++)
			{
				// the lower 6 bits of register means 
				if((mask[i] & *Pt) == mask[i])
				{
					if(ValidPosition[j][i] == 1)
					{
						TiDTV_OsdMove(&TiDTV_OsdScreenMain, SUB_MENU_VCHIPPARENTGUIDEBLOCK_XPOSITION + 112 + 56 * i, SUB_MENU_VCHIPPARENTGUIDEBLOCK_YPOSITION + 42 + 40 * j);
						TiDTV_OsdDrawBitMap(&TiDTV_OsdScreenMain, BMP_LOCKER);
					}	
				}
				else
				{
				}
			}

		}

	}
	else if(InParentalGuidelines == 2)
	{
		Pt = (USHORT*)(&UserPreferSetting.UserPrefer_SetupVChipTVParentalGuideTVY + ParentGuideCursor[0]);
		for(i = 0; i < 6; i++)
		{
			if(ValidPosition[ParentGuideCursor[0]][i] == 1)
			{

⌨️ 快捷键说明

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