?? o_sacd_config.c
字號:
/****************************************************************************************************
* Copyright (c) 2005 ZORAN Corporation, All Rights Reserved
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
*
* File: o_sacd_config.c
*
* Description:
* =========
****************************************************************************************************/
/****************************************************************************************************
* DEFINITION: Private constants
****************************************************************************************************/
/***************************************************************************************
* Descriptor : oPlayStateDescriptor
*
* Purpose : The play state object displays current play status.
****************************************************************************************/
#ifndef D_CUSTOM_oPlayStateText
STATIC CONST OSD_TEXT oPlayStateText = { _GetPlayState, 0};
#endif // D_CUSTOM_oPlayStateText
#ifndef D_CUSTOM_oPlayStateDescriptor
STATIC CONST MS_DESCRIPTOR_SACD_PLAYSTATE oPlayStateDescriptor =
{
{
sizeof(MSO_SACD_PLAYSTATE),
MS_NAV_NULL,
MS_ATTR_OSD_LAYER_0,
{
AREA_PLAYSTATE_X, AREA_PLAYSTATE_Y, AREA_PLAYSTATE_W, AREA_PLAYSTATE_H
},
_PlayStateOperation,
OTEXT_FillOSDSeg,
mpParamNull
},
(MS_X_Y_ALIGN*)&oCenterAlignToContainer,
(MS_COLOR_SET*)&oDefaultTextColorSet,
(MS_BITMAP_SET*)&oHighlightOnlyBitmapSet,
(OSD_TEXT*)&oPlayStateText,
FONT_PLAYSTATE,
NULL,
NULL
};
#endif // D_CUSTOM_oPlayStateDescriptor
/***************************************************************************************
* Descriptor : oPlayFileDescriptor
*
* Purpose : The play file object displays current, and total tracks.
****************************************************************************************/
#ifndef D_CUSTOM_oPlayFileText
STATIC CONST OSD_TEXT oPlayFileText = { _GetPlayFile, 0};
#endif // D_CUSTOM_oPlayFileText
#ifndef D_CUSTOM_oPlayFileDescriptor
STATIC CONST MS_DESCRIPTOR_SACD_PLAYFILE oPlayFileDescriptor =
{
{
sizeof(MSO_SACD_PLAYFILE),
MS_NAV_NULL,
MS_ATTR_OSD_LAYER_0,
{
AREA_PLAYFILE_X, AREA_PLAYFILE_Y, AREA_PLAYFILE_W, AREA_PLAYFILE_H
},
_PlayFileOperation,
OTEXT_FillOSDSeg,
mpParamNull
},
(MS_X_Y_ALIGN*)&oCenterAlignToContainer,
(MS_COLOR_SET*)&oDefaultTextColorSet,
(MS_BITMAP_SET*)&oHighlightOnlyBitmapSet,
(OSD_TEXT*)&oPlayFileText,
FONT_PLAYFILE,
NULL,
NULL
};
#endif // D_CUSTOM_oPlayFileDescriptor
/***************************************************************************************
* Descriptor : oPlayTimeDescriptor
*
* Purpose : The play file object displays current, and total tracks.
****************************************************************************************/
#ifndef D_CUSTOM_oPlayTimeText
STATIC CONST OSD_TEXT oPlayTimeText = { _GetPlayTime, 0};
#endif // D_CUSTOM_oPlayTimeText
#ifndef D_CUSTOM_oPlayTimeDescriptor
STATIC CONST MS_DESCRIPTOR_SACD_PLAYTIME oPlayTimeDescriptor =
{
{
sizeof(MSO_SACD_PLAYTIME),
MS_NAV_NULL,
MS_ATTR_OSD_LAYER_0,
{
AREA_PLAYTIME_X, AREA_PLAYTIME_Y, AREA_PLAYTIME_W, AREA_PLAYTIME_H
},
_PlayTimeOperation,
OTEXT_FillOSDSeg,
mpParamNull
},
(MS_X_Y_ALIGN*)&oCenterAlignToContainer,
(MS_COLOR_SET*)&oDefaultTextColorSet,
(MS_BITMAP_SET*)&oHighlightOnlyBitmapSet,
(OSD_TEXT*)&oPlayTimeText,
FONT_PLAYTIME,
NULL,
NULL
};
#endif // D_CUSTOM_oPlayTimeDescriptor
/***************************************************************************************
* Descriptor : oSwitchCDLayerButtonDescriptor
*
* Purpose : Descriptor of a toolkit button that allows the user to switch to the CD layer of
* a hybrid SACD.
****************************************************************************************/
STATIC CONST OSD_TEXT oSwitchCDLayerText = {
OSDR_GetFormUniStr_OsdMessage,
S_SACD_CD_LAYER
};
STATIC CONST MS_DESCRIPTOR_BUTTON oSwitchCDLayerButtonDescriptor =
{// MS_DESCRIPTOR
{
{
sizeof(MSO_BUTTON),
MS_NAV_TO_ALGINED_Y,
MS_ATTR_FOCUSABLE | MS_ATTR_OSD_LAYER_0 | MS_ATTR_RADIO_BUTTON,
{
20, 50, 120, BUTTON_HEIGHT
},
_BtnSwitchCDLayerOperation,//OBUTTON_Operation,
OBUTTON_FillOSDSeg,
mpParamNull
},
(MS_X_Y_ALIGN *)&oButtonTextXYAlign,
(MS_COLOR_SET *)&oButtonTextColorSet,
(MS_BITMAP_SET *)&oButtonBitmapSet,
(OSD_TEXT *) &oSwitchCDLayerText,
FONT_SWITCH_LAYER_BUTTON,
NULL,
NULL
},
MS_OP_MENU_SWITCH_SACD_LAYER
};
/***************************************************************************************
* Descriptor : oSwitchHDAreaButtonDescriptor
*
* Purpose : Descriptor of a toolkit button that allows the user to switch the HD area of a SACD.
****************************************************************************************/
static CONST OSD_TEXT oTwoChannelText = {
OSDR_GetFormUniStr_OsdMessage, S_SACD_HD_AREA_TWO_CH
};
static CONST OSD_TEXT oMultiChannelText = {
OSDR_GetFormUniStr_OsdMessage, S_SACD_HD_AREA_MULTI_CH
};
STATIC CONST MS_DESCRIPTOR_BUTTON oSwitchHDAreaButtonDescriptor =
{// MS_DESCRIPTOR
{
{
sizeof(MSO_BUTTON),
MS_NAV_TO_ALGINED_Y,
MS_ATTR_FOCUSABLE | MS_ATTR_OSD_LAYER_0 | MS_ATTR_RADIO_BUTTON,
{
20, 50, 120, BUTTON_HEIGHT
},
_BtnSwitchHDAreaOperation,
OBUTTON_FillOSDSeg,
mpParamNull
},
(MS_X_Y_ALIGN *)&oButtonTextXYAlign,
(MS_COLOR_SET *)&oButtonTextColorSet,
(MS_BITMAP_SET *)&oButtonBitmapSet,
(OSD_TEXT *) &oTwoChannelText,
FONT_SWITCH_HD_AREA_BUTTON,
NULL,
NULL
},
MS_OP_NONE
};
/***************************************************************************************
* Descriptor : oToolKitVListDescriptor
*
* Purpose : Descriptor of the list (MSO_VLIST) containing the tools.
****************************************************************************************/
STATIC CONST MS_PARAM_VLIST oToolKitListParam = {
0, // Total number of items in the list.
0, // Index of the first item.
NBR_TOOLKIT_MAX_VISIBLE, // Visible
4, // offset
0
};
/***************************************************************************************
* Array : aTools
*
* Purpose : Contains an array of pointer to descriptors of the objects that would be
* added to the toolkit (oToolKitDescriptor).
****************************************************************************************/
STATIC CONST MS_DESCRIPTOR* CONST aTools[] = {
(MS_DESCRIPTOR*)&oSwitchCDLayerButtonDescriptor,
(MS_DESCRIPTOR*)&oSwitchHDAreaButtonDescriptor,
NULL // IMPORTANT : Last item must always be NULL.
};
STATIC CONST MS_DESCRIPTOR_VLIST oToolKitVListDescriptor =
{ // Container descriptor start
{// Descriptor start
sizeof(MSO_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 | MS_ATTR_VLIST_OFFSET_FIRSTITEM | MS_ATTR_VLIST_SCROLL_SINGLE_ITEM,
{
AREA_TOOLKIT_X,
AREA_TOOLKIT_Y,
AREA_TOOLKIT_W,
AREA_TOOLKIT_H
},
_ToolkitVlistOperation,
mpfFillOsdSegNull,
(UINT8*)&oToolKitListParam
},// Descriptor end
maContentsNull,
mwNbrContentsNull,
};
/***************************************************************************************
* Descriptor : oToolKitDescriptor
*
* Purpose : Descriptor of the toolkit. The toolkit is a MSO_VSCROLL_LIST object,
* that contains an MSO_VLIST (descriptor oToolKitVListDescriptor) object
* within it.
****************************************************************************************/
STATIC CONST MS_DESCRIPTOR_VSCROLL_LIST oToolKitDescriptor =
{
{ // Container descriptor start
{ // Descriptor start
sizeof(MSO_VSCROLL_LIST),
MS_NAV_NULL,
MS_ATTR_CONTAINER | MS_ATTR_FOCUSABLE | MS_ATTR_OSD_LAYER_1 | MS_ATTR_VSLIST_DISPLAY_BG_BMP | MS_ATTR_VSLIST_SCROLL_ARROW,
{
AREA_TOOLKIT_X,
AREA_TOOLKIT_Y,
AREA_TOOLKIT_W,
AREA_TOOLKIT_H
},
_ToolKitOperation,
VScrollListFillOSDSeg,
mpParamNull,
}, // Descriptor end
maContentsNull,
mwNbrContentsNull,
}, // Container descriptor end
(MS_DESCRIPTOR_VLIST*)&oToolKitVListDescriptor, // mpDescriptorVList
TOOLKIT_SCROLL_XPADDING,
TOOLKIT_SCROLL_ARROW_HEIGHT,
CIDX_TOOLKIT_TEXT, // Text color
BMP_TOOLKIT_BG, // Background bitmap
BMP_TOOLKIT_SCROLLBAR_BG, // Scrollbar background bitmap
BMP_TOOLKIT_SCROLLBAR // Scrollbar bitmap
};
/***************************************************************************************
* Descriptor : oListItemDescriptor
*
* Purpose : Descriptor of the items that represent SACD tracks.
****************************************************************************************/
STATIC CONST MS_X_Y_ALIGN oCenterLeftAlignToContainer =
{
SACD_LISTITEM_TEXT_XPOS,
0,
ALIGN_H_LEFT_TO_CONTAINER,
ALIGN_V_CENTER_TO_CONTAINER
};
STATIC CONST OSD_TEXT oListItemText = { _GetTrackName, 0};
STATIC CONST MS_DESCRIPTOR_SACD_LISTITEM oListItemDescriptor =
{
{
sizeof(MSO_SACD_LISTITEM),
MS_NAV_NULL,
MS_ATTR_FOCUSABLE | MS_ATTR_OSD_LAYER_0,
{
20, 50, 120, AREA_LISTITEM_H
},
_ListItemOperation,
_ListItemFillOSDSeg,
mpParamNull
},
(MS_X_Y_ALIGN*)&oCenterLeftAlignToContainer,
(MS_COLOR_SET*)&oDefaultTextColorSet,
(MS_BITMAP_SET*)&oHighlightOnlyBitmapSet,
(OSD_TEXT*)&oListItemText,
FONT_LISTITEM,
NULL,
NULL
};
/***************************************************************************************
* 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.
MAX_SACD_VISIBLE_LISTITEMS,
0,
0
};
STATIC CONST MS_DESCRIPTOR_VLIST oBrowserVListDescriptor =
{ // Container descriptor start
{// Descriptor start
sizeof(MSO_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,
{
20, 20, 200, 264
},
_BrowserVListOperation,
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_BROWSER_TEXT, // Text color
BMP_BROWSER_LIST_BG, // Background bitmap
BMP_BROWSER_LIST_SCROLLBAR_BG, // Scrollbar background bitmap
BMP_BROWSER_LIST_SCROLLBAR // Scrollbar bitmap
};
/***************************************************************************************
* Descriptor : oHelpTextDescriptor
*
* Purpose : Displays Navigation help /ID3 information.
****************************************************************************************/
enum
{
SACD_DISC_TITLE,
SACD_TRACK_TITLE,
SACD_ARTIST_NAME,
SACD_AVAILABLE_AREA,
SACD_ACTIVE_AREA,
SACD_INFO_ARRAY_SIZE
};
STATIC CONST MS_DESCRIPTOR_SACD_HELPTEXT oHelpTextDescriptor =
{ // MS_DESCRIPTOR_HSCROLL_TEXT
{ // MS_DESCRIPTOR_MULTILINE_TEXT
{ // MS_DESCRIPTOR_TEXT
{ // MS_DESCRIPTOR
sizeof(MSO_SACD_HELPTEXT),
MS_NAV_NULL,
MS_ATTR_OSD_LAYER_1, // Attributes
{
AREA_HELP_TEXT_X, AREA_HELP_TEXT_Y, AREA_HELP_TEXT_W, AREA_HELP_TEXT_H
},
_HelpTextOperation, // Use operation function
OHSCROLLTEXT_FillOSDSeg,
mpParamNull
},
(MS_X_Y_ALIGN *)&oHelpTextXYAlign,
(MS_COLOR_SET *)&oHelpTextColorSet,
(MS_BITMAP_SET *)&oButtonBitmapSet,
(OSD_TEXT *)NULL,
FONT_HELPTEXT,
NULL,
NULL,
},
8, // left/right boder
0, // top/bottom border
0, // pixelgap
SACD_INFO_ARRAY_SIZE , // max lines
#ifdef D_GUI_DESCRIPTOR_MULTILINETEXT_EXT1
SACD_HELPTEXT_BG_FIT_H ,
SACD_HELPTEXT_BG_FIT_V ,
SACD_HELPTEXT_PIXEL_MARGIN_BG_HORIZONTAL ,
SACD_HELPTEXT_PIXEL_MARGIN_BG_VERTICAL ,
SACD_HELPTEXT_PREPARE_STR_FIT
#endif//D_GUI_DESCRIPTOR_MULTILINETEXT_EXT1
},
HSCROLL_START_RIGHT, // startpos
HSCROLL_TYPE_FINISH_BEFORE_RESCROLL_REMOVE_SCROLL, // scrolltype
2, // pixelcount
0 // holdtime
};
/***************************************************************************************
* Descriptor : oSACDDescriptor
*
* Purpose : Descriptor of the list (MSO_SACD) SACD component.
****************************************************************************************/
enum
{
NBR_SACD_PLAYSTATE = 0 ,
NBR_SACD_PLAYFILE ,
NBR_SACD_PLAYTIME ,
NBR_SACD_TOOLKIT ,
NBR_SACD_BROWSER ,
NBR_SACD_HELP_TEXT ,
NBR_SACD_CONTENTS
};
STATIC CONST MS_DESCRIPTOR* CONST apSACDContents[NBR_SACD_CONTENTS] = {
(MS_DESCRIPTOR*)&oPlayStateDescriptor,
(MS_DESCRIPTOR*)&oPlayFileDescriptor,
(MS_DESCRIPTOR*)&oPlayTimeDescriptor,
(MS_DESCRIPTOR*)&oToolKitDescriptor,
(MS_DESCRIPTOR*)&oBrowserVScrollListDescriptor,
(MS_DESCRIPTOR*)&oHelpTextDescriptor,
};
CONST MS_DESCRIPTOR_SACD oSACDDescriptor =
{
{// MS_DESCRIPTOR_COMPONENT
{// MS_DESCRIPTOR_CONTAINER
{// MS_DESCRIPTOR
sizeof(MSO_SACD),
MS_NAV_TO_ALGINED_Y | MS_NAV_DISABLE_LR | MS_NAV_DISABLE_UD |
MS_NAV_CONTAINER_WRAP_LR | MS_NAV_CONTAINER_WRAP_UD | MS_NAV_CONTAINER_GOTO_TOP,
MS_ATTR_CONTAINER | MS_ATTR_FOCUSABLE | MS_ATTR_OSD_LAYER_0,
{
AREA_SACD_X,
AREA_SACD_Y,
AREA_SACD_W,
AREA_SACD_BROWSER_H//AREA_SACD_H
},
_SACDOperation,
_SACDFillOSDSeg,
mpParamNull
},
(CONST MS_DESCRIPTOR**)apSACDContents, //maContentsNull,
NBR_SACD_CONTENTS, //mwNbrContentsNull,
},
(MS_DESCRIPTOR*)&oBrowserVListDescriptor
},
BMP_SACD_COMPONENT_BG,
CIDX_SACD_COMPONENT_TEXT
};
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -