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

📄 tidtv_menu.h

📁 ti的数字电视芯片 tvp9000的源码
💻 H
字号:
/*******************************************************************************
*	@ModuleName  ::	TiDTV_Menu.h
*	
*	@Copyright	 ::	Copyright 2005- Ti
*	
*	@Description ::	Definitions for DTV Menu
*	
*	@History     ::
*---------------------------------------
*	03-26-2005	aaaaa	Created
*******************************************************************************/

#ifndef	_TI_DTV_MENU_H_
#define	_TI_DTV_MENU_H_

//----------------------------------------------------------
//	Defined in "TiDTV_Menu.c"
//
extern TI_DTV_MENU *pCurDtvMenu;			// pointer to current DTV Menu

//----------------------------------------------------------
extern TI_DTV_MENU DtvMainMenu;				// Defined in "TiDTV_MenuDefMain.c"
extern TI_DTV_MENU TiDtvMenuVideo;			// Defined in "TiDTV_MenuDefVideo.c"
extern TI_DTV_MENU TiDtvMenuAudio;			// Defined in "TiDTV_MenuDefAudio.c"
extern TI_DTV_MENU TiDtvMenuChannel;		// Defined in "TiDTV_MenuDefChannel.c"
extern TI_DTV_MENU TiDtvMenuSetup;			// Defined in "TiDTV_MenuDefSetup.c"
extern TI_DTV_MENU TiDtvMenuSetupTime;
extern TI_DTV_MENU TiDtvMenuGuide;			// Defined in "TiDTV_MenuCC.c"
extern TI_DTV_MENU TiDtvMenuSetupClosedCaption;
extern TI_DTV_MENU TiDtvMenuSetupClosedCaptionMode;
extern TI_DTV_MENU TiDtvMenuSetupClosedCaptionOption;
extern TI_DTV_MENU TiDtvMenuSetupVChip;

//----------------------------------------------------------
//	Defined in "TiDTV_MenuProc.c"
//

void DtvDispMainMenuItem(TI_DTV_MENU_ITEM *pMenuItem, UCHAR CursorColor);
void DtvDispSubMenuItem(TI_DTV_MENU_ITEM *pMenuItem, UCHAR CursorColor, UCHAR FillColor);
void DtvDispSubMenu(void);
void DtvMainMenuOpcodeParser(void);
void DtvSubMenuOpcodeParser(void);
void DtvMainMenuInit(TI_DTV_MENU *pMenu);

/*For Picture*/
void DtvVideoSelectItem(TI_DTV_MENU_ITEM *pNextItem);

/*For Audio*/
void DtvAudioSelectItem(TI_DTV_MENU_ITEM *pNextItem);

/*For Channel*/
void DtvSubMenuChannelOpcodeParser(void);

/*For auto programm*/
void DtvSubMenuAutoProgOpcodeParser(void);

int TiDtvMainMenuActFuct(void);
void DtvMainMenuRedraw(TI_DTV_MENU *pMenu, short MenuNum);

//----------------------------------------------------------
//	Defined in "TiDTV_MenuProc.c"
//
void DtvVideoInitFuct(TI_DTV_MENU_ITEM *pMenuItem);
void DtvAudioInitFuct(TI_DTV_MENU_ITEM *pMenuItem);
void DtvScreenInitFuct(TI_DTV_MENU_ITEM *pMenuItem);
void DtvDChInitFuct(TI_DTV_MENU_ITEM *pMenuItem);
void DtvSetupInitFuct(TI_DTV_MENU_ITEM *pMenuItem);
void DtvCCInitFuct(TI_DTV_MENU_ITEM *pMenuItem);

int DtvVideoActFuct(void);
int DtvAudioActFuct(void);

int DtvAudioVolumeActFuct(void);
int DtvAudioTrebleActFuct(void);
int DtvAudioBassActFuct(void);
int DtvAudioBalanceActFuct(void);
int DtvAudioMultiChSndActFuct(void);

int DtvScreenDisplayActFuct(void);
int DtvScreenHoriPosActFuct(void);
int DtvScreenVertPosActFuct(void);

int DtvDChFavorChActFuct(void);
int DtvDChAutoProgActFuct(void);
int DtvDChAddDelActFuct(void);
int DtvDChNameActFuct(void);

int DtvSetupLangActFuct(void);
int DtvSetupTimeActFuct(void);
int DtvSetupSleepActFuct(void);
int DtvSetupBkgndActFuct(void);
int DtvSetupCaptionActFuct(void);

int DtvCCAnalogCCActFuct(void);
int DtvCCAnalogTextActFuct(void);
int DtvCCDigitalCCActFuct(void);

typedef struct _TI_DTV_MENU_NODE_NAVIGATION_ {
	USHORT	Confirm_SetValue;		// Confirm guide icon
	USHORT	Cancel;             	// Cancel guide icon
	USHORT	Move;                   // move guide icon
	USHORT	 Exit;              	// additional guide icon
} TI_DTV_MENU_NODE_NAVIGATION;

#define		MAIN_MENU_V_STEP	8
#define		MAIN_MENU_H_STEP	12
#define		SUB_MENU_V_STEP		8
#define		SUB_MENU_H_STEP		36
#define		DIST_MAIN_SUB		32 
#define		MENUPIECE_H_WIDTH	16
#define		MENUPIECE_V_HEIGHT	64

#define 	MENU_XPOSITION	100
#define 	MENU_YPOSITION	100

#define		MAIN_MENU_WIDTH				(MAIN_MENU_H_STEP * MENUPIECE_H_WIDTH)
#define		MAIN_MENU_HEIGHT			(MAIN_MENU_V_STEP * MENUPIECE_V_HEIGHT)
#define		SUB_MENU_WIDTH				(SUB_MENU_H_STEP * MENUPIECE_H_WIDTH)
#define		SUB_MENU_HEIGHT				MAIN_MENU_HEIGHT
#define		MENU_TOTAL_WIDTH			(MAIN_MENU_WIDTH + MAIN_MENU_HEIGHT + DIST_MAIN_SUB)
#define		MENU_TOTAL_HEIGHT   		MAIN_MENU_HEIGHT

// main menu item position and attribute
#define		MAIN_MENU_XPOSITION			(MENU_XPOSITION)
#define		MAIN_MENU_YPOSITION			(MENU_YPOSITION)
#define		MAIN_MENU_CENTER_XPOSITION	(MENU_XPOSITION + MAIN_MENU_WIDTH/2)			 
#define		MAIN_MENU_CENTER_YPOSITION	(MENU_YPOSITION + MAIN_MENU_HEIGHT/2)			 
#define 	MAIN_MENU_ICON_WIDTH		128
#define		MAIN_MENU_ICON_XPOSITION	(MAIN_MENU_CENTER_XPOSITION - MAIN_MENU_ICON_WIDTH / 2)
#define		MAIN_MENU_ICON_YPOSITION	NULL
#define		MAIN_MENU_TITLE_XPOSITION	(MAIN_MENU_CENTER_XPOSITION - 32)
#define		MAIN_MENU_TITLE_YPOSITION	(MAIN_MENU_YPOSITION + 8)

#define		MAIN_MENU_CHARACTER_SEL_FRONTCOLOR		0x34
#define		MAIN_MENU_CHARACTER_UNSEL_FRONTCOLOR		44
#define		MAIN_MENU_CHARACTER_BACKCOLOR			0x63
#define		MAIN_MENU_CHARACTER_HIGHTLIGHTCOLOR		5

// sub menu item position and attribute
#define		SUB_MENU_XPOSITION			(MENU_XPOSITION + MAIN_MENU_WIDTH + DIST_MAIN_SUB)
#define		SUB_MENU_YPOSITION			(MENU_YPOSITION)
#define		SUB_MENU_CENTER_XPOSITION	(SUB_MENU_XPOSITION + SUB_MENU_WIDTH/2)			 
#define		SUB_MENU_CENTER_YPOSITION	(SUB_MENU_YPOSITION + SUB_MENU_HEIGHT/2)			 
#define		SUB_MENU_BOTTOM_YPOSITION	(SUB_MENU_YPOSITION + SUB_MENU_HEIGHT)			 
#define		SUB_MENU_BOTTOMWITHOUTEDGE_YPOSITION	(SUB_MENU_YPOSITION + SUB_MENU_HEIGHT - 64)			 
#define		SUB_MENU_WITHOUTEDGE_YPOSITION			(MENU_YPOSITION + 64)
#define		SUB_MENU_ICON_XPOSITION				(SUB_MENU_XPOSITION + 8)
#define		SUB_MENU_ICON_YPOSITION				NULL
#define		SUB_MENU_TITLE_XPOSITION			(SUB_MENU_XPOSITION + 24)  //48
#define		SUB_MENU_TITLE_YPOSITION			NULL
#define		SUB_MENU_INFO_XPOSITION				NULL
#define		SUB_MENU_INFO_YPOSITION				(SUB_MENU_YPOSITION + 8)

#define		SUB_MENU_GUAGE_LENGTH			256  // 256 pixels
#define		SUB_MENU_GUAGE_XPOSITION		(SUB_MENU_XPOSITION + SUB_MENU_WIDTH - SUB_MENU_GUAGE_LENGTH - 100)
#define		SUB_MENU_GUAGE_YPOSITION		NULL
#define		SUB_MENU_GUAGE_STEP_WIDTH		4

#define		SUB_MENU_RADIOBOX_LENGTH		224
#define		SUB_MENU_RADIOBOX_STEP_LENGTH	16
#define		SUB_MENU_RADIOBOX_HSTEP			14
#define		SUB_MENU_RADIOBOX_XPOSITION		(SUB_MENU_XPOSITION + SUB_MENU_WIDTH - SUB_MENU_RADIOBOX_LENGTH -12 )
#define		SUB_MENU_RADIOBOX_YPOSITION		NULL
#define		SUB_MENU_RADIOBOXITEM_HEIGHT	40

#define		SUB_MENU_CHECKBOX_LENGTH		272
#define		SUB_MENU_CHECKBOX_XPOSITION		(SUB_MENU_CENTER_XPOSITION - SUB_MENU_CHECKBOX_LENGTH/2)
#define		SUB_MENU_CHECKBOX_YPOSITION		NULL
#define		SUB_MENU_CHECKBOXITEM_HEIGHT	40
#define		SUB_MENU_CHECKBOX_XMARGIN		8
#define		SUB_MENU_CHECKBOX_YMARGIN		8
#define		SUB_MENU_CHECKBOX_MIDDLEMARGIN	32
#define		SUB_MENU_CHECKBOX_TITLEAREAHSTEP	12
#define		SUB_MENU_CHECKBOX_CONTROLAREAHSTEP	3
#define		SUB_MENU_CHECKBOX_STEP_LENGTH	16


#define		SUB_MENU_PAGENODES_XPOSITION	(SUB_MENU_XPOSITION + SUB_MENU_WIDTH - 96)
#define		SUB_MENU_PAGENODES_YPOSITION	NULL
#define		SUB_MENU_PAGE_ICON_XPOSITION	SUB_MENU_XPOSITION + SUB_MENU_WIDTH - 96

#define		SUB_MENU_DIGITALPAD_LENGTH		224
#define		SUB_MENU_DIGITALPAD_XPOSITION	(SUB_MENU_XPOSITION + SUB_MENU_WIDTH - SUB_MENU_DIGITALPAD_LENGTH )
#define		SUB_MENU_DIGITALPAD_YPOSITION	NULL

#define		SUB_MENU_VCHIPPASSWORD_XPOSITION	(SUB_MENU_XPOSITION + 100)
#define		SUB_MENU_VCHIPPASSWORD_YPOSITION	(SUB_MENU_YPOSITION + 100)



#define		SUB_MENU_VCHIPPARENTGUIDEBLOCK_XPOSITION	(SUB_MENU_XPOSITION + 64)
#define		SUB_MENU_VCHIPPARENTGUIDEBLOCK_YPOSITION	(SUB_MENU_YPOSITION + 80)
#define		SUB_MENU_VCHIPPARENTGUIDEBLOCK_WIDTH		460
#define		SUB_MENU_VCHIPPARENTGUIDEBLOCK_HEIGHT		300


#define		SUB_MENU_NAVIGATION_SPACE					(144)
#define		SUB_MENU_NAVIGATION_XPOSITION		 		(SUB_MENU_XPOSITION + SUB_MENU_NAVIGATION_SPACE)
#define		SUB_MENU_NAVIGATION_YPOSITION				(SUB_MENU_BOTTOMWITHOUTEDGE_YPOSITION - 8)
#define		SUB_MENU_NAVIGATION_TITLE_XPOSITION		 	(SUB_MENU_XPOSITION + 32)
#define		SUB_MENU_NAVIGATION_TITLE_SPACE				(150)


#define		SUB_MENU_CHARACTER_SEL_FRONTCOLOR		0x34
#define		SUB_MENU_CHARACTER_UNSEL_FRONTCOLOR		44
#define		SUB_MENU_CHARACTER_BACKCOLOR			0x63
#define		SUB_MENU_CHARACTER_HIGHTLIGHTCOLOR		5
#define		SUB_MENU_CHARACTER_DARKGRAY				98
#define		SUB_MENU_CHARACTER_LIGHTGRAY			122
#define		MENU_TRANSPARENCY_COLOR					0X7B

/////////////////////////////////////////////////////////////
// especially position define


// main menu icon Y position

#define		MAIN_MENU_ICONS_YSPACE					80
#define		MAIN_MENU_FIRSTICON_YPOSITION		(MAIN_MENU_YPOSITION + 64)
#define		MAIN_MENU_SECONDICON_YPOSITION		(MAIN_MENU_FIRSTICON_YPOSITION + MAIN_MENU_ICONS_YSPACE * 1)
#define		MAIN_MENU_THIRDICON_YPOSITION		(MAIN_MENU_FIRSTICON_YPOSITION + MAIN_MENU_ICONS_YSPACE * 2)
#define		MAIN_MENU_FOURTHICON_YPOSITION		(MAIN_MENU_FIRSTICON_YPOSITION + MAIN_MENU_ICONS_YSPACE * 3)
#define		MAIN_MENU_FIFTHICON_YPOSITION		(MAIN_MENU_FIRSTICON_YPOSITION + MAIN_MENU_ICONS_YSPACE * 4)
#define		MAIN_MENU_SIXTHICON_YPOSITION		(MAIN_MENU_FIRSTICON_YPOSITION + MAIN_MENU_ICONS_YSPACE * 5)
#define		MAIN_MENU_SEVENTHICON_YPOSITION		(MAIN_MENU_FIRSTICON_YPOSITION + MAIN_MENU_ICONS_YSPACE * 6)

// sub menu title Y position
#define		SUB_MENU_TITLE_YSPACE				48
#define		SUB_MENU_FIRSTTITLE_YPOSITION		(SUB_MENU_YPOSITION + 64)	
#define		SUB_MENU_SECONDTITLE_YPOSITION		(SUB_MENU_FIRSTTITLE_YPOSITION + SUB_MENU_TITLE_YSPACE * 1)
#define		SUB_MENU_THIRDTITLE_YPOSITION		(SUB_MENU_FIRSTTITLE_YPOSITION + SUB_MENU_TITLE_YSPACE * 2)
#define		SUB_MENU_FOURTHTITLE_YPOSITION		(SUB_MENU_FIRSTTITLE_YPOSITION + SUB_MENU_TITLE_YSPACE * 3) 
#define		SUB_MENU_FIFTHTITLE_YPOSITION		(SUB_MENU_FIRSTTITLE_YPOSITION + SUB_MENU_TITLE_YSPACE * 4) 
#define		SUB_MENU_SIXTHTITLE_YPOSITION		(SUB_MENU_FIRSTTITLE_YPOSITION + SUB_MENU_TITLE_YSPACE * 5) 
#define		SUB_MENU_SEVENTHTITLE_YPOSITION		(SUB_MENU_FIRSTTITLE_YPOSITION + SUB_MENU_TITLE_YSPACE * 6) 
#define		SUB_MENU_EIGHTHTITLE_YPOSITION		(SUB_MENU_FIRSTTITLE_YPOSITION + SUB_MENU_TITLE_YSPACE * 7) 

// sub menu radio box position
//#define		SUB_MENU_RADIOBOX_XPOSITION				48



// menu display/restore parameters
													// when display the father node, depends on it to decide
													// if display leaf node aslo
#define 	SUB_NODES_DISPLAY				BIT0
#define		SUB_NODES_NOTDISPLAY			~BIT0
													// when restore to the father node, depends on it to decide
													// if update father and uncles
#define		FATHER_PAGE_UPDATE				BIT1
#define		FATHER_PAGE_NOTUPDATE			~BIT1

													// when restore to the father node, depends on it to decide
													// if restore the leafs area
#define		SUB_NODES_AREA_RESTORE			BIT2
#define		SUB_NODES_AREA_NOTRESTORE		~BIT2

#define		CURRENT_NODES_HIGHLIGHT			BIT3
#define		CURRENT_NODES_NOTHIGHLIGHT		~BIT3

///////////////////////////////////////////////////
#define		INFORMATION_DISPLAY				BIT16
#define		INFORMATION_NOTDISPLAY			~BIT16

#define		NAVIGATION_DISPLAY				BIT17
#define		NAVIGATION_NOTDISPLAY			~BIT17


#define		CHARACTER_SEL_COLOR				BIT24
#define		CHARACTER_UNSEL_COLOR			BIT25
#define		CHARACTER_HIGHLIGHT_COLOR		BIT26
#define		CHARACTER_BACKGROUND_COLOR		BIT27
	
#define		NON_PROPERTY					0

//sub menu level definition
#define SUBMENU_FIRST_LEVEL                                    0
#define SUBMENU_SECOND_LEVEL                                 1

//Display submenu  first
#define NOT_DISPLAY_FIRST_TIME                               0
#define DISPLAY_FIRST_TIME                                       1

//less than zero
#define  TIDTV_LESSTHAN_ZERO                                     65535

#define TIDTV_VIDEOMODE_DISP_NUM_MAX               4
#define TIDTV_NOISEREC_DISP_NUM_MAX                  4
#define TIDTV_AUDIOEFFECT_DISP_NUM_MAX            5
#define TIDTV_AUDIOMTS_NUM_MAX                           3
#define TIDTV_ONOFF_NUM_MAX                                  2
#define TIDTV_DIGITOUTPUT_NUM_MAX                      2
#define TIDTV_TV_SOURCE_NUM_MAX                          4
#define TIDTV_VIEW_MODE_NUM_MAX                         4
// Audio Menu value scope definition
#define	AUDIOBASE_MIN		     0
#define	AUDIOBASE_MAX		    60
#define	AUDIOTREBLE_MIN		0
#define	AUDIOTREBLE_MAX		60
#define	AUDIOBALANCE_MIN	   -30
#define	AUDIOBALANCE_MAX	   30

//Video menu value scope definition
#define	TIDTV_VIDEO_BRIGHTNESS_MIN		     0
#define	TIDTV_VIDEO_BRIGHTNESS_MAX		     60
#define	TIDTV_VIDEO_CONTRAST_MIN		            0
#define	TIDTV_VIDEO_CONTRAST_MAX		     60
#define	TIDTV_VIDEO_SATURATION_MIN	            0
#define	TIDTV_VIDEO_SATURATION_MAX	            60
#define	TIDTV_VIDEO_TINT_MIN	                         -30
#define	TIDTV_VIDEO_TINT_MAX	                   		30
#define	TIDTV_VIDEO_SHARPNESS_MIN	   		0
#define	TIDTV_VIDEO_SHARPNESS_MAX	   		60

//Audio menu value scope definition
#define TIDTV_AUDIO_BASE_MIN                              0
#define TIDTV_AUDIO_BASE_MAX                             60
#define TIDTV_AUDIO_TREBLE_MIN                           0
#define TIDTV_AUDIO_TREBLE_MAX                          60
#define TIDTV_AUDIO_BALANCE_MIN                         -30
#define TIDTV_AUDIO_BALANCE_MAX                        30

#define	TIDTV_GUAGE_HIGHLIGHT		1
#define	TIDTV_GUAGE_NOTHIGHLIGHT	0

#define ROK                                                    1
#define RERROR                                              0

#endif	/* _TI_DTV_MENU_H_ */

⌨️ 快捷键说明

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