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

📄 clips_menu_config.c

📁 Zoran V966 DVD 解码 Soc芯片的源程序
💻 C
📖 第 1 页 / 共 4 页
字号:
			},
			_ToolKitOperation,
			VScrollListFillOSDSeg,
			mpParamNull,
		}, // Descriptor end
		maContentsNull,
		mwNbrContentsNull,
	}, // Container descriptor end
	(MS_DESCRIPTOR_VLIST*)&oToolKitVListDescriptor, // mpDescriptorVList
	TOOLKIT_SCROLL_XPADDING,
	TOOLKIT_SCROLL_YPADDING,
	CIDX_8, 				// Text color
	BMP_BG_3, 			// Background bitmap
	BMP_BG_PUSHED_1, 	// Scrollbar background bitmap
	BMP_BG_3 			// Scrollbar bitmap
};

/***************************************************************************************
*	Descriptor 	: 	oListItemDescriptor
*
*	Purpose	 	:	Descriptor of the items that represent content files.
 ****************************************************************************************/
static CONST MS_DESCRIPTOR_CLIPS_LISTITEM oListItemDescriptor =
{
	sizeof(MSO_CLIPS_LISTITEM),
	MS_NAV_TO_ALGINED_Y,
	MS_ATTR_FOCUSABLE | MS_ATTR_OSD_LAYER_0,
	{
		0,//AREA_LISTITEM_X,
		0,//AREA_LISTITEM_Y,
		0,//AREA_LISTITEM_W,
		AREA_LISTITEM_H
	},
	_BrowserListItemOperation,
	_BrowserListItemFillOSDSeg,
	mpParamNull
};

/***************************************************************************************
*	Descriptor 	: 	oBrowserVListDescriptor
*
*	Purpose	 	:	It's an MSO_VLIST which contains a list of MSO_CLIPS_LISTITEM.
 ****************************************************************************************/
static CONST MS_PARAM_VLIST oBrowserVListParam = {
	0,	// Total number of items in the list.
	0,	// Index of the first item.
	NBR_MSO_CLIPS_LISTITEMS_MAX,
	0,
	0
};

static CONST MS_DESCRIPTOR_VLIST oBrowserVListDescriptor =
{ // Container descriptor start
	{// Descriptor start
		sizeof(MSO_BROWSER_VLIST),
		MS_NAV_CONTAINER_WRAP_UD | MS_NAV_CONTAINER_GOTO_PREV_FOCUS | MS_NAV_CONTAINER_GOTO_TOP,
		MS_ATTR_CONTAINER | MS_ATTR_FOCUSABLE | MS_ATTR_OSD_LAYER_0,
		{
		// This object is resized by it parent, so we don't care defining its position and dimensions
			0,0,0,0
		},
		_BrowserVListOperation,//VListOperation,
		mpfFillOsdSegNull,
		(UINT8*)&oBrowserVListParam
	},// Descriptor end
	maContentsNull,
	mwNbrContentsNull,
};

/***************************************************************************************
*	Descriptor 	: 	oBrowserVScrollListDescriptor
*
*	Purpose	 	:	It's an MSO_VSCROLL_LIST which contains an MSO_VLIST, and displays a scroll bar.
 ****************************************************************************************/
static CONST MS_DESCRIPTOR_VSCROLL_LIST oBrowserVScrollListDescriptor =
{
	{ // Container descriptor start
		{ // Descriptor start
			sizeof(MSO_VSCROLL_LIST),
			MS_NAV_NULL,
			MS_ATTR_CONTAINER | MS_ATTR_FOCUSABLE | MS_ATTR_OSD_LAYER_1,
			{
				AREA_SCROLL_LIST_X,
				AREA_SCROLL_LIST_Y,
				AREA_SCROLL_LIST_W,
				AREA_SCROLL_LIST_H
			},
			_BrowserScrollListOperation,
			VScrollListFillOSDSeg,
			mpParamNull,
		}, // Descriptor end
		maContentsNull,
		mwNbrContentsNull,
	}, // Container descriptor end
	(MS_DESCRIPTOR_VLIST*)&oBrowserVListDescriptor,
	VSCROLL_LIST_XPADDING,
	VSCROLL_LIST_YPADDING,
	CIDX_8, 				// Text color
	BMP_BG_3, 			// Background bitmap
	BMP_BG_PUSHED_1, 	// Scrollbar background bitmap
	BMP_BG_3 			// Scrollbar bitmap
};

/***************************************************************************************
*	Descriptor 	: 	oPreviewWindowDescriptor
*
*	Purpose	 	:	The JPEG preview window.
 ****************************************************************************************/
// JPEG preview window specific macros
#define MS_IsPreviewWindowEnable			MS_IsGeneralPurpose1
#define MS_SetPreviewWindowEnable			MS_SetGeneralPurpose1
#define MS_ClearPreviewWindowEnable		MS_ClearGeneralPurpose1

#define MS_IsPreviewWindowProhibit			MS_IsGeneralPurpose2
#define MS_SetPreviewWindowProhibit			MS_SetGeneralPurpose2
#define MS_ClearPreviewWindowProhibit		MS_ClearGeneralPurpose2

#define MS_IsPreviewWindowPal				MS_IsGeneralPurpose3
#define MS_SetPreviewWindowPal				MS_SetGeneralPurpose3
#define MS_ClearPreviewWindowPal			MS_ClearGeneralPurpose3

#define MS_IsPreviewWindowDecodeError		MS_IsGeneralPurpose4
#define MS_SetPreviewWindowDecodeError		MS_SetGeneralPurpose4
#define MS_ClearPreviewWindowDecodeError	MS_ClearGeneralPurpose4

static CONST MS_PARAM_PREVIEW_WINDOW oPreviewWindowParam = {
	0,	// Width
	0	// Height
};

static CONST MS_DESCRIPTOR oPreviewWindowDescriptor =
{// MS_DESCRIPTOR
	sizeof(MSO_PREVIEW_WINDOW),
	MS_NAV_NULL,
	MS_ATTR_OSD_LAYER_0,
	{
		AREA_PREVIEW_WINDOW_X,
		AREA_PREVIEW_WINDOW_Y,
		AREA_PREVIEW_WINDOW_W,
		AREA_PREVIEW_WINDOW_H
	},
	_PreviewWindowOperation,
	_PreviewWindowFillOSDSeg,
	(UINT8*)&oPreviewWindowParam
};

/***************************************************************************************
*	Descriptor 	: 	oFilePathDescriptor
*
*	Purpose	 	:	The object that display file path of the currently focused file in the list.
 ****************************************************************************************/

static CONST OSD_TEXT oPathText = {
    OSDR_GetFormUniStr_Ram,
    NULL
};

static CONST MS_X_Y_ALIGN oPathIconXYAlign = {
	0,
	0,
	ALIGN_H_LEFT,
	ALIGN_V_TOP,
};

static CONST MS_X_Y_ALIGN oPathTextXYAlign = {
	36,
	0,
	ALIGN_H_LEFT,
	ALIGN_V_CENTER_TO_CONTAINER
};

static CONST MS_DESCRIPTOR_PATH oFilePathDescriptor =
{ // MS_DESCRIPTOR_TEXT
	{ // MS_DESCRIPTOR
		sizeof(MSO_PATH),
		MS_NAV_NULL,
		MS_ATTR_OSD_LAYER_0,
		{
			AREA_FILE_PATH_X,
			AREA_FILE_PATH_Y,
			AREA_FILE_PATH_W,
			AREA_FILE_PATH_H
		},
		_FilePathOperation,
		_FilePathFillOSDSeg,//OTEXT_FillOSDSeg, 
		mpParamNull
	},
	(MS_X_Y_ALIGN *)&oPathTextXYAlign,
	(MS_COLOR_SET *)&oDefaultTextColorSet,
	NULL,
	(OSD_TEXT *)&oPathText,
	FONT_0,
	NULL,//(MS_BITMAP_SET *)&oPathIconBmpSet,
	(MS_X_Y_ALIGN *)&oPathIconXYAlign
};

/***************************************************************************************
*	Descriptor 	: 	oSpecialMediaTypeDescriptor
*
*	Purpose	 	:	The objecte  displays current media type: HDCD, CDG etc.
 ****************************************************************************************/
static CONST MS_DESCRIPTOR oSpecialMediaTypeDescriptor =
{
	sizeof(MSO_OBJECT),
		MS_NAV_NULL,
		MS_ATTR_OSD_LAYER_0|MS_ATTR_INVISIBLE,
		{
		AREA_SPECIAL_MEDIA_X, AREA_SPECIAL_MEDIA_Y, AREA_SPECIAL_MEDIA_W, AREA_SPECIAL_MEDIA_H
		},
	_SpecialMediaTypeOperation,
	_SpecialMediaTypeFillOSDSeg,
		mpParamNull
};
/***************************************************************************************
*	Descriptor 	: 	oMediaInfoDescriptor
*
*	Purpose	 	:	The media info object displays bitmap and the name of the device. This information is
*					displayed on the tab
 ****************************************************************************************/
#ifdef D_GUI_CLIPS_MULTIPAGE
static CONST MS_DESCRIPTOR oMediaInfoDescriptor =
{// MS_DESCRIPTOR
	sizeof(MSO_OBJECT),
	MS_NAV_NULL,
	MS_ATTR_OSD_LAYER_0,
	{
		0, 0, (AREA_TABBTN_W / 2) + 16, AREA_TABBTN_H
	},
	mpfOperationNull,
	_MediaInfoFillOSDSeg,
	mpParamNull
};
#endif // D_GUI_CLIPS_MULTIPAGE

/***************************************************************************************
*	Descriptor 	: 	oPlayStateDescriptor
*
*	Purpose	 	:	The play state object displays current play status.
 ****************************************************************************************/
static CONST MS_DESCRIPTOR_PLAYSTATE oPlayStateDescriptor =
{
	{// MS_DESCRIPTOR
		sizeof(MSO_PLAYSTATE),
		MS_NAV_NULL,
		MS_ATTR_OSD_LAYER_0,
		{
			AREA_PLAYSTATE_X, AREA_PLAYSTATE_Y, AREA_PLAYSTATE_W, AREA_PLAYSTATE_H
		},
		_PlayStateOperation,
		_PlayStateFillOSDSeg,
		mpParamNull
	},
	CIDX_8 // mwTextColor
};

/***************************************************************************************
*	Descriptor 	: 	oPlayFileDescriptor
*
*	Purpose	 	:	The play state object displays current play status.
 ****************************************************************************************/
CONST UINT16 szFilePathPaddingLeftShorten[5] = {G_PATH_SEPARATOR, '.', '.', '.', 0};

#ifdef D_GUI_ITEM_ACCESS
CONST UINT16 szFilePathPaddingGoUp[4] = {G_PATH_SEPARATOR, '.', '.', 0};
CONST UINT16 szFilePathPaddingInsideDir[2] = {G_PATH_SEPARATOR, 0};
#define SZ_LEN_FILE_PATH_PADDING_GO_UP	((sizeof(szFilePathPaddingGoUp) / sizeof (UINT16)) - 1)
#define SZ_LEN_FILE_PATH_PADDING_INSIDE_DIR	((sizeof(szFilePathPaddingInsideDir) / sizeof (UINT16)) - 1)
#else
#define SZ_LEN_FILE_PATH_PADDING_GO_UP			0
#define SZ_LEN_FILE_PATH_PADDING_INSIDE_DIR		0
#endif //D_GUI_ITEM_ACCESS





static CONST MS_DESCRIPTOR_PLAYFILE oPlayFileDescriptor =
{
	{// MS_DESCRIPTOR
		sizeof(MSO_PLAYFILE),
		MS_NAV_NULL,
		MS_ATTR_OSD_LAYER_0,
		{
			AREA_PLAYFILE_X, AREA_PLAYFILE_Y, AREA_PLAYFILE_W, AREA_PLAYFILE_H
		},
		_PlayFileOperation,
		_PlayFileFillOSDSeg,
		mpParamNull
	},
	CIDX_8 // mwTextColor
};

/***************************************************************************************
*	Descriptor 	: 	oPlayTimeDescriptor
*
*	Purpose	 	:	The play info object displays play status, and Number of items/Currently playing item.
*					This information is displayed on the tab
 ****************************************************************************************/
static CONST MS_DESCRIPTOR_PLAYTIME oPlayTimeDescriptor =
{
	{// MS_DESCRIPTOR
		sizeof(MSO_PLAYTIME),
		MS_NAV_NULL,
		MS_ATTR_OSD_LAYER_0 | MS_ATTR_INVISIBLE,
		{
			AREA_PLAYTIME_X, AREA_PLAYTIME_Y, AREA_PLAYTIME_W, AREA_PLAYTIME_H
		},
		_PlayTimeOperation,
		_PlayTimeFillOSDSeg,
		mpParamNull
	},
	CIDX_8 // mwTextColor
};



/***************************************************************************************
*	Descriptor 	: 	oBrowserDirectItemAccessDescriptor
*
*	Purpose	 	:	The 
 ****************************************************************************************/
#ifdef D_GUI_ITEM_ACCESS
#define FONT_BROWSER_ITEM_ACCESS							FONT_0

CONST MS_BITMAP_SET oItemAccessBitmapSet =
{
	NULL,
	BMP_FG_FOCUS,
	NULL,
	NULL
};

static CONST MS_DESCRIPTOR_ITEM_ACCESS oBrowserItemAccessDescriptor =
{
	{// MS_DESCRIPTOR
       	sizeof(MSO_ITEM_ACCESS),
        	MS_NAV_NULL,
        	MS_ATTR_OSD_LAYER_1 |MS_ATTR_FOCUSABLE | MS_ATTR_INVISIBLE,
        	{
            		AREA_ITEM_ACCESS_X,
            		AREA_ITEM_ACCESS_Y,
            		AREA_ITEM_ACCESS_W,
            		AREA_ITEM_ACCESS_H,
        	},
        	OITEMACCESS_Operation,
        	OITEMACCESS_FillOSDSeg,
        	mpParamNull
    	},
    	(MS_X_Y_ALIGN *)&oCenterAlignToContainer,
	(MS_BITMAP_SET *)&oItemAccessBitmapSet,
	FONT_BROWSER_ITEM_ACCESS,
	_BrowserItemAccessGetDisplayItem, 
};
#endif //D_GUI_ITEM_ACCESS


/***************************************************************************************
*	Descriptor 	: 	oTabBtnDescriptor
*
*	Purpose	 	:	The tab displays informations such as the type of device,  current play status,
*					number of items in the current directory, index of the currently playing item. Also,
*					facilitates switching between pages. Page is the parent of this object.
 ****************************************************************************************/
#ifdef D_GUI_CLIPS_MULTIPAGE
#define NBR_TABBTN_CONTENTS		4

static CONST MS_DESCRIPTOR* CONST apTabBtnContents[NBR_TABBTN_CONTENTS] = {
	(MS_DESCRIPTOR*)&oMediaInfoDescriptor,
	(MS_DESCRIPTOR*)&oPlayStateDescriptor,
	(MS_DESCRIPTOR*)&oPlayFileDescriptor,
	(MS_DESCRIPTOR*)&oPlayTimeDescriptor
};

static CONST MS_DESCRIPTOR_TABBTN oTabBtnDescriptor =
{// MS_DESCRIPTOR
	{
		sizeof(MSO_TABBTN),
		MS_NAV_TO_ALGINED_Y,
		MS_ATTR_CONTAINER | MS_ATTR_FOCUSABLE | MS_ATTR_OSD_LAYER_1,
		{
			AREA_TABBTN_X, AREA_TABBTN_Y, AREA_TABBTN_W, AREA_TABBTN_H
		},
		OPAGE_TabBtnOperation,
		OPAGE_TabBtnFillOSDSeg,
		mpParamNull
	},
	(CONST MS_DESCRIPTOR**)apTabBtnContents,
	NBR_TABBTN_CONTENTS,
};
#endif // D_GUI_CLIPS_MULTIPAGE

/***************************************************************************************
*	Descriptor 	: 	oWindowDescriptor
*
*	Purpose	 	:	The window object is contained within the page and it serves as the parent for the
*					list of items, the toolkit, the preview window, and the file path object.
 ****************************************************************************************/
enum
{
#ifndef D_GUI_CLIPS_MULTIPAGE
	NBR_MENU_COUNT_PLAY_STATE,
#ifdef D_GUI_CLIPS_DISPLAY_OBJECT_PLAY_FILE
	NBR_MENU_COUNT_PLAY_FILE,
#endif //D_GUI_CLIPS_DISPLAY_OBJECT_PLAY_FILE
	NBR_MENU_COUNT_PLAY_TIME,
#endif // D_GUI_CLIPS_MULTIPAGE
	NBR_MENU_COUNT_BROWSER_VSCROLL_LIST,
	NBR_MENU_COUNT_TOOLKIT,
	NBR_MENU_COUNT_PREVIEW_WINDOWN,
	NBR_MENU_COUNT_FILE_PATH,
#ifdef D_GUI_ITEM_ACCESS

⌨️ 快捷键说明

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