📄 osddg.c
字号:
_OSDDGFrame.rect.wTop += (OSDDG_TUNE_DISTANCE_HEIGHT_PAL) * (bIndex / OSDDG_COLUMN_NUM); _OSDDGFrame.rect.wRight = _OSDDGFrame.rect.wLeft+DIGEST_FRAME_SIZE_H+OSDDG_TUNE_WIDTH_PAL; _OSDDGFrame.rect.wBottom = _OSDDGFrame.rect.wTop+DIGEST_FRAME_SIZE_V+OSDDG_TUNE_DISTANCE_HEIGHT_PAL; } if (bUpdate == OSDDG_FRAME_NORMAL) { _OSDDGFrame.bColorBright = OSDDG_PALETTE_ENTRY_NORMAL_FRAME_BRIGHT; _OSDDGFrame.bColorDark = OSDDG_PALETTE_ENTRY_NORMAL_FRAME_DARK; } else if (bUpdate == OSDDG_FRAME_SELECT) { _OSDDGFrame.bColorBright = OSDDG_PALETTE_ENTRY_SELECT_FRAME_BRIGHT; _OSDDGFrame.bColorDark = OSDDG_PALETTE_ENTRY_SELECT_FRAME_DARK; } GDI_DrawFrame_909(0, &_OSDDGFrame);*/ }//***************************************************************************// Function : _OSDDG_ClearFrameRegion// Abstract : This function will clear all frames.// Arguments : none.// Return : none.// Side Effect : none.// Notes : //***************************************************************************void _OSDDG_ClearFrameRegion(void){ _OSDDGRect.rect.wLeft = 0; _OSDDGRect.rect.wTop = OSDDG_TITLE_START_V+OSDDG_FONT_HEIGHT; _OSDDGRect.rect.wRight = 600; //Should re-define this value as the max. width of the OSD region. _OSDDGRect.rect.wBottom = OSDDG_INFO_REGION_START_V-1; _OSDDGRect.bColor = PAL_ENTRY_COLOR_TRANSPARENT; GDI_FillRect_909(0, &_OSDDGRect);}//***************************************************************************// Function : _OSDDG_Exit// Abstract : Exit the Digest UI.// Arguments : none.// Return : none.// Side Effect : none.// Notes : //***************************************************************************void _OSDDG_Exit(void){ //Clear the Digest region GDI_ClearRegion(0); //clear region 0 //Tell OSD that Digest UI exits. OSD_ChangeUI(OSD_UI_DIGEST, OSD_EXIT_UI);}//***************************************************************************// Function : _OSDDG_ClearPageInfoRegion// Abstract : This function will clear the page info. region.// Arguments : none.// Return : none.// Side Effect : none.// Notes : //***************************************************************************void _OSDDG_ClearPageInfoRegion(void){ _OSDDGRect.rect.wLeft = OSDDG_TITLE_START_H+OSDDG_TITLE_WIDTH; _OSDDGRect.rect.wTop = OSDDG_TITLE_START_V+_OSDDG_TuneForTVType(OSDDG_TUNE_POS_TYPE_TITLE); _OSDDGRect.rect.wRight = OSDDG_PAGE_INFO_END_H; _OSDDGRect.rect.wBottom = _OSDDGRect.rect.wTop + OSDDG_FONT_HEIGHT; _OSDDGRect.bColor = PAL_ENTRY_COLOR_TRANSPARENT; GDI_FillRect_909(0, &_OSDDGRect);}//***************************************************************************// Function : _OSDDG_UpdateInfoRegion// Abstract : This function will update the info. in the info. region.// Arguments : none.// Return : none.// Side Effect : none.// Notes : //***************************************************************************void _OSDDG_UpdateInfoRegion(void){ _OSDDG_DrawInfoRegion(); OSDUTL_PrepareOutputString(); OSDUTL_CopyStringFromIndex(aDGInfoTrack); OSDUTL_OutputNumFromIndex(__DigestUIAttr.bCurTrackNo+1); OSDUTL_CopyStringFromIndex(aDGSlash); OSDUTL_OutputNumFromIndex(gcShowStatus.wTotalTracks); _OSDDGStringAttr.bBackground = OSDDG_PALETTE_ENTRY_INFO_REGION_BACKGROUND; _OSDDGStringAttr.bTextColor = OSDDG_PALETTE_ENTRY_HELP_STRING; _OSDDGStringAttr.wX = OSDDG_INFO_REGION_STRING_START_H; _OSDDGStringAttr.wY = OSDDG_INFO_REGION_START_V+((OSDDG_INFO_REGION_HEIGHT-GDI_GetStringHeight_909(__pOSDUTLOutputString))>>1)+_OSDDG_TuneForTVType(OSDDG_TUNE_POS_TYPE_HELP); GDI_DrawString_909(0, &_OSDDGStringAttr, __pOSDUTLOutputString);}//***************************************************************************// Function : _OSDDG_RecoverAll// Abstract : This function will recover all Digest UI.// Arguments : none.// Return : none.// Side Effect : none.// Notes : //***************************************************************************void _OSDDG_RecoverAll(void){ if (__DigestUIAttr.bDigestMode == DIGEST_MODE_DIALOG) { _OSDDG_DLG_Initial(TRUE); } else //Digest main menu { _OSDDG_Initial(); //Draw the frames and update the frame info. _OSDDG_DrawAllFrames(); }}//***************************************************************************// Function : _OSDDG_UpdteFrameInfo// Abstract : This function will update the info. in the frame.// Arguments : bIndex: the index of the frame.// Return : none.// Side Effect : none.// Notes : //***************************************************************************void _OSDDG_UpdteFrameInfo(BYTE bIndex){ //Show the number of the frame. /* OSDUTL_PrepareOutputString(); OSDUTL_OutputNumFromIndex((WORD)(bIndex+1)); _OSDDG_InitializeStringTransparentAttr(); _OSDDGStringAttr.bBackground = OSDDG_PALETTE_ENTRY_FRAME_INFO_BACKGROUND; _OSDDGStringAttr.bTextColor = OSDDG_PALETTE_ENTRY_FRAME_INFO_STRING; _OSDDGStringAttr.wX = DIGEST_FIRST_FRAME_POS_H+bIndex*DIGEST_FRAME_SIZE_H+bIndex*DIGEST_FRAME_SPACING_H+OSDDG_FRAME_THICKNESS+OSDDG_FRAME_INFO_DISTANCE_H; _OSDDGStringAttr.wY = DIGEST_FIRST_FRAME_POS_V+bIndex*DIGEST_FRAME_SIZE_V+bIndex*DIGEST_FRAME_SPACING_V+OSDDG_FRAME_THICKNESS+OSDDG_FRAME_INFO_DISTANCE_V; GDI_DrawString_909(0, &_OSDDGStringAttr, __pOSDUTLOutputString); //Keep the string's width of the index. _bOSDDGTemp = (BYTE)GDI_GetStringWidth_909(__pOSDUTLOutputString); //Show time when "Disc Interval" mode. if (__DigestUIAttr.bDigestMode == DIGEST_MODE_DISCINTERVAL) { OSDUTL_PrepareOutputString(); //Total seconds. _bOSDDGTemp1 = bIndex*OSDDG_TIME_INTERVAL; //show "hour" _OSDUTL_ShowTimeNum((BYTE)(_bOSDDGTemp1/60)); //show ":" __wOSDUTLStringBuf[__bOSDUTLIndex++] = aDGMouhow[1]; //show "Minute" _OSDUTL_ShowTimeNum(_bOSDDGTemp1); //show ":" __wOSDUTLStringBuf[__bOSDUTLIndex++] = aDGMouhow[1]; //show "second" _OSDUTL_ShowTimeNum(0); } _OSDDGStringAttr.wX += _bOSDDGTemp+OSDDG_FRAME_INFO_NUM_TIME_DISTANCE; GDI_DrawString_909(0, &_OSDDGStringAttr, __pOSDUTLOutputString); */}//***************************************************************************// Function : _OSDDG_UpdateHighlight// Abstract : This function will update button's highlight.// Arguments : bUpdate: OSDDG_DRAW/OSDDG_CLEAR.// Return : none.// Side Effect : none.// Notes : //***************************************************************************void _OSDDG_UpdateHighlight(BYTE bUpdate){ if (__DigestUIAttr.bDigestMode == DIGEST_MODE_DIALOG) { if (bUpdate == OSDDG_DRAW) //Draw highlight button { _OSDDG_DLG_DrawButton(__DigestUIAttr.bButtonIndex, TRUE); } else { _OSDDG_DLG_DrawButton(__DigestUIAttr.bButtonIndex, FALSE); } } else //Digest main menu. { if (bUpdate == OSDDG_DRAW) //Draw highlight button { _OSDDG_DrawButton(__DigestUIAttr.bButtonIndex, TRUE); } else { _OSDDG_DrawButton(__DigestUIAttr.bButtonIndex, FALSE); } }}//***************************************************************************// Function : _OSDDG_ChangeTVMode// Abstract : This function will be called when TV mode is changed.// Arguments : none.// Return : none.// Side Effect : none.// Notes : //***************************************************************************void _OSDDG_ChangeTVMode(void){ //Clear the frame region _OSDDG_ClearFrameRegion(); //Re-draw all frames. _OSDDG_DrawAllFrames();}//***************************************************************************// Function : _OSDDG_DrawAllFrames// Abstract : This function will draw all frames.// Arguments : none.// Return : none.// Side Effect : none.// Notes : //***************************************************************************void _OSDDG_DrawAllFrames(void){ //Draw the frames and update the frame info. for (_bOSDDGTemp = 0; _bOSDDGTemp < __DigestUIAttr.bDisplayedFrameNo; _bOSDDGTemp++) { if (__DigestUIAttr.bCurFrameNo == _bOSDDGTemp) _OSDDG_DrawFrame(_bOSDDGTemp, OSDDG_FRAME_SELECT); else _OSDDG_DrawFrame(_bOSDDGTemp, OSDDG_FRAME_NORMAL); _OSDDG_UpdteFrameInfo(_bOSDDGTemp); }}//*********************************************************************************************************// Function : _OSDDG_TuneFramePosition// Abstract : Tune the Digest's frame when according to different TV type.// Return : none.// Side Effect : none.// Notes : //*********************************************************************************************************void _OSDDG_TuneFramePosition(void){ if (__bTVType == SETUP_SCREEN_TV_SYSTEM_NTSC) { if(__SetupInfo.bProgressiveScan == SETUP_PROGRESSIVE_SCAN_ON) { _bDGTuneFrame_H = OSDDG_TUNE_FRAME_H_NTSC_PSCAN; _bDGTuneFrame_V = OSDDG_TUNE_FRAME_V_NTSC_PSCAN; } else { _bDGTuneFrame_H = OSDDG_TUNE_FRAME_H_NTSC; _bDGTuneFrame_V = OSDDG_TUNE_FRAME_V_NTSC; } } else // PAL { if(__SetupInfo.bProgressiveScan == SETUP_PROGRESSIVE_SCAN_ON) { _bDGTuneFrame_H= OSDDG_TUNE_FRAME_H_PAL_PSCAN; _bDGTuneFrame_V= OSDDG_TUNE_FRAME_V_PAL_PSCAN; } else { _bDGTuneFrame_H= OSDDG_TUNE_FRAME_H_PAL; _bDGTuneFrame_V= OSDDG_TUNE_FRAME_V_PAL; } }}//*********************************************************************************************************// Function : _OSDDG_TuneForTVType// Abstract : Call this function to tune the value for different TV type// Arguments : bType: the type of tunning the value.// Return : the value should be tune// Side Effect : none.// Notes : //*********************************************************************************************************BYTE _OSDDG_TuneForTVType(BYTE bType){ if ((__bTVType == SETUP_SCREEN_TV_SYSTEM_NTSC) || (__bTVType == SETUP_SCREEN_TV_SYSTEM_PAL_M)) return 0; switch (bType) { case OSDDG_TUNE_POS_TYPE_TITLE: return OSDDG_TUNE_TITLE_START_V_PAL; case OSDDG_TUNE_POS_TYPE_BUTTON: return OSDDG_TUNE_BUTTON_START_V_PAL; case OSDDG_TUNE_POS_TYPE_HELP: return OSDDG_TUNE_HELP_START_V_PAL; default: return 0; }}//*********************************************************************************************************// Function : _OSDDG_InitializeNDAttribute// Abstract : This function will initialize the normal upper/bottom string attribute.// Arguments : none.// Return : none.// Side Effect : none.// Notes : //*********************************************************************************************************void _OSDDG_InitializeNDAttribute(void){ //Set the attributes for normal upper message and normal bottom message. __OSDNDUpMsgAttr.wX = OSDDG_PAGE_INFO_END_H; __OSDNDUpMsgAttr.wY = OSDDG_TITLE_START_V; __OSDNDUpMsgAttr.bBackground = PAL_ENTRY_COLOR_TRANSPARENT; __OSDNDUpMsgAttr.bTextColor = OSDDG_PALETTE_ENTRY_TITLE_STRING; __OSDNDUpMsgAttr.bShadow1 = PAL_ENTRY_COLOR_TRANSPARENT; __OSDNDUpMsgAttr.bShadow2 = PAL_ENTRY_COLOR_TRANSPARENT; __OSDNDUpMsgAttr.bColorKey = 0; __OSDNDBottomMsgAttr.wX = OSDDG_INFO_REGION_STRING_START_H; __OSDNDBottomMsgAttr.wY = OSDDG_INFO_REGION_START_V; __OSDNDBottomMsgAttr.bBackground = OSDDG_PALETTE_ENTRY_INFO_REGION_BACKGROUND; __OSDNDBottomMsgAttr.bTextColor = OSDDG_PALETTE_ENTRY_HELP_STRING; __OSDNDBottomMsgAttr.bShadow1 = PAL_ENTRY_COLOR_TRANSPARENT; __OSDNDBottomMsgAttr.bShadow2 = PAL_ENTRY_COLOR_TRANSPARENT; __OSDNDBottomMsgAttr.bColorKey = 0;}#endif //NO_DIGEST
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -