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

📄 osd.c

📁 ct952 source code use for Digital Frame Photo
💻 C
📖 第 1 页 / 共 5 页
字号:
    }    switch (bUI)    {    case OSD_UI_NONE:        if (_bOSDNBIndex != 0)        {            //If we have another forever message displayed currently. Don't do recovery.            //For example, KEY_ANGLE (push to stack by Display mode UI) ==>KEY_MUTE==>Leave Display mode UI            if (_OSDNBCurMsg.bMessage == _OSDNBStack[_bOSDNBIndex-1].bMessage)            {                _OSD_RecoverNDMessage(OSD_ND_BOTTOM_REGION);            }        }        //CoCo0.90, recover the zoom OSD        _OSD_RecoverSpecialGraphZoom();        //CoCo1.10, support OSD dynamic region        _OSD_RecoverDynamicRegion();        break;    case OSD_UI_DISPLAY:                //Display mode        _bOSDTemp = OSDDSPLY_Recover(bRecoverType);        //CoCo0.90, recover the zoom OSD        _OSD_RecoverSpecialGraphZoom();        break;    case OSD_UI_MEDIA_MANAGER:          //Media Manager                _bOSDTemp = OSDMM_Recover(bRecoverType);        break;    case OSD_UI_THUMBNAIL:              //Thumbnail        _bOSDTemp = THUMB_Recover(bRecoverType);        break;#ifndef NO_SEARCH_UI //++CoCo2.37p    case OSD_UI_SEARCH:                 //Search UI        _bOSDTemp = OSDSRCH_Recover(bRecoverType);        break;#endif //#ifndef NO_SEARCH_UI //++CoCo2.37p#ifndef NO_DVD_PASSWORD_DLG //CoCo2.38    case OSD_UI_PASSWORD:               //DVD Password Dialog        _bOSDTemp = OSDPASSWORD_Recover(bRecoverType);        break;#endif //NO_DVD_PASSWORD_DLG#ifndef NO_PROGRAM_UI //++CoCo2.37p    case OSD_UI_DVD_PROGRAM:            //VCD/DVD Program        _bOSDTemp = OSDPRGM_Recover(bRecoverType);        break;#endif //#ifndef NO_PROGRAM_UI //++CoCo2.37p    case OSD_UI_DIGEST:                 //Digest    // wyc0.95, notify CoCo to update it.#ifndef NO_DIGEST        _bOSDTemp = OSDDG_Recover(bRecoverType);#endif //        break;    case OSD_UI_MEDIA_SELECT_DLG:       //Media Select Dialog box        _bOSDTemp = OSDDLG_MEDIA_SELECT_Recover(bRecoverType);        break;    case OSD_UI_BOOKMARK:               //Bookmark#ifdef SUPPORT_BOOKMARK        _bOSDTemp = OSDBOOKMARK_Recover(bRecoverType);#endif //        break;#ifndef SUPPORT_STB    case OSD_UI_SETUP:                  //SETUP#ifdef IMAGE_FRAME_SETUP //CoCo2.38        _bOSDTemp = MAINMENU_Recover(bRecoverType);#else        _bOSDTemp = SETUP_Recover(bRecoverType);#endif        break;#endif //#ifndef SUPPORT_STB#ifdef SUPPORT_STB    case OSD_UI_MAIN_MENU:        MAINMENU_DVD_Recover(bRecoverType);        break;#endif //    case OSD_UI_PSCAN_PROMPT_DLG:       //The PSCAN prompt dialog box        //The "PSCAN prompt dialog box" doesn't need to be recovered because it will not be overwritten by other UI.        break;    case OSD_UI_SCREEN_SAVER:           //Screen Saver        //The screen saver UI doesn't need to be recovered because it will not be overwritten by other UI.        //Each time is a "new start" when screen saver UI is appeared.        break;    case OSD_UI_COMMON_DLG:        _bOSDTemp = OSDCOMDLG_Recover(bRecoverType);        break;#ifdef SUPPORT_NAVIGATOR //++CoCo2.37p#ifdef SUPPORT_INDEPENDENT_NAVIGATOR //CoCo1.0, support independent Navigator UI    case OSD_UI_NAVIGATOR:        _bOSDTemp = OSDNAVIGATOR_Recover(bRecoverType);        break;#endif#endif //#ifdef SUPPORT_NAVIGATOR //++CoCo2.37p#ifdef SUPPORT_POWERON_MENU //CoCo2.38    case OSD_UI_POWERON_MENU:        _bOSDTemp = POWERONMENU_Recover(bRecoverType);        break;#endif //#ifdef SUPPORT_POWERON_MENU //CoCo2.38
#ifdef SUPPORT_COPY_FILE_IN_SLIDE_SHOW
    case OSD_UI_COPY_DELETE_DLG:
        _bOSDTemp = OSDMM_CopyDeleteDlg_Recover(bRecoverType);
        break;
#endif //SUPPORT_COPY_FILE_IN_SLIDE_SHOW#ifdef SUPPORT_RADIO_TUNER    case OSD_UI_RADIO_TUNER:		//Radio Tuner        _bOSDTemp = RADIO_Recover(bRecoverType);	        break;#endif //SUPPORT_RADIO_TUNER    default:                            //unknown UI        break;    }        return _bOSDTemp;}//***************************************************************************//  Function    :   OSD_Trigger//  Abstract    :   This function will call the UI's OSDXXX_Recover function to //              :   recover the UI.//  Arguments   :   bType: OSD_TRIGGER_CONTROL/OSD_TRIGGER_TIME//              :   wTime: It's valid only when OSD_TRIGGER_TIME//  Return      :   none.//  Side Effect :   none.//  Notes       :   //***************************************************************************// LLY2.53, expand time value unit from WORD to DWORD// Since, we will use [23:16]:hour, [15:8]: min, [7:0]: sec//void OSD_Trigger(BYTE bType, WORD wTime)void OSD_Trigger(BYTE bType, DWORD dwTime){    // LLY2.53, also need check 0xFFFFFFFF since OSD time unit is expand from WORD to DWORD    //if ((bType == OSD_TRIGGER_TIME) && (wTime != 0xFFFF))    if ((bType == OSD_TRIGGER_TIME) && (dwTime != 0xFFFFFFFF) && (dwTime != 0xFFFF) )    {        // update current time        // LLY2.53, expand the time value from WORD to DWORD unit        //gcShowStatus.wCurrentTime=wTime;        gcShowStatus.dwCurrentTime=dwTime;    }    //Call each UI's trigger function    if (_bOSDCurrentUI != OSD_UI_NONE)    {        // LLY2.53, expand the time value from WORD to DWORD unit        //_OSD_UITrigger(bType, wTime);        _OSD_UITrigger(bType, dwTime);    }    //Normal upper message time out?    if (_OSDNUCurMsg.bMessage != MSG_NULL && _OSDNUCurMsg.bSec != 0xFF)    {        // count display time        if (OS_GetSysTimer() > (_dwOSDNUStartTickCount+_wOSDNUDisplayTickCount))           {            if (!(                (_bOSDCurrentUI == OSD_UI_SETUP)                 || (_bOSDCurrentUI == OSD_UI_MAIN_MENU)                 || (_bOSDCurrentUI == OSD_UI_SCREEN_SAVER)#ifdef SUPPORT_POWERON_MENU //CoCo2.38                || (_bOSDCurrentUI == OSD_UI_POWERON_MENU)#endif                ))            {                // Current message is time out.                //_OSD_ClearNUNBRegion(OSDND_GetMessagePos(_OSDNUCurMsg.bMessage));                _OSD_ClearNUNBRegion(OSD_ND_UPPER_RIGHT_REGION);                                _OSDNUCurMsg.bMessage = MSG_NULL;                                //Recover the normal upper region.                _OSD_RecoverNURegion();            }        }    }        //Normal bottom message time out?    if (_OSDNBCurMsg.bMessage != MSG_NULL && _OSDNBCurMsg.bSec != 0xFF)    {        // count display time        if (OS_GetSysTimer() > (_dwOSDNBStartTickCount+_wOSDNBDisplayTickCount))           {            // current message is time out            //_OSD_ClearNUNBRegion(OSDND_GetMessagePos(_OSDNBCurMsg.bMessage));            _OSD_ClearNUNBRegion(OSD_ND_BOTTOM_REGION);            //Reset this flag to prevent volume bar/Key/Echo bar is not re-drawed again.            __bOSDClearNDBRegion = TRUE;            _OSDNBCurMsg.bMessage = MSG_NULL;                        //Recover the normal bottom region.            _OSD_RecoverNBRegion();                        //CoCo, Need to notify Panel module to clear the message?        }    }}//***************************************************************************//  Function    :   _OSD_UITrigger//  Abstract    :   This function will call each UI's trigger function to update the UI.//  Arguments   :   none.//  Return      :   none.//  Side Effect :   none.//  Notes       :   //***************************************************************************// LLY2.53, expand time value unit from WORD to DWORD// Since, we will use [23:16]:hour, [15:8]: min, [7:0]: sec//void _OSD_UITrigger(BYTE bType, WORD wTime)void _OSD_UITrigger(BYTE bType, DWORD dwTime){    switch (_bOSDCurrentUI)    {    case OSD_UI_DISPLAY:                //Display mode        // LLY2.53, expand time value unit from WORD to DWORD        //OSDDSPLY_Trigger(bType, wTime);        OSDDSPLY_Trigger(bType, dwTime);        break;    case OSD_UI_MEDIA_MANAGER:          //Media Manager        // LLY2.53, expand time value unit from WORD to DWORD        //OSDMM_Trigger(bType, wTime);        OSDMM_Trigger(bType, dwTime);        break;    case OSD_UI_THUMBNAIL:              //Thumbnail        // LLY2.53, expand time value unit from WORD to DWORD        //THUMB_UI_Trigger(bType, wTime);        THUMB_UI_Trigger(bType, dwTime);        break;    case OSD_UI_SEARCH:                 //Search UI        break;    case OSD_UI_PASSWORD:               //DVD Password Dialog        break;    case OSD_UI_DVD_PROGRAM:            //VCD/DVD Program        break;    case OSD_UI_DIGEST:                 //Digest        break;    case OSD_UI_MEDIA_SELECT_DLG:       //Media Select Dialog box        break;    case OSD_UI_PSCAN_PROMPT_DLG:       //The PSCAN prompt dialog box#if defined (SUPPORT_PSCAN_PROMPT_SETUP) || defined (SUPPORT_PSCAN_PROMPT_OSD)        OSDPROMPT_Trigger();#endif        break;    case OSD_UI_BOOKMARK:               //Bookmark        break;#ifndef SUPPORT_STB    case OSD_UI_SETUP:                  //SETUP        SETUP_Trigger();        break;#endif //#ifndef SUPPORT_STB#ifdef SUPPORT_STB    case OSD_UI_MAIN_MENU:              //Main Menu    	MAINMENU_Trigger();        break;#endif            case OSD_UI_SCREEN_SAVER:           //Screen Saver#ifndef NO_SCREEN_SAVER        // LLY2.53, expand time value unit from WORD to DWORD        //OSDSS_Trigger(bType, wTime);        OSDSS_Trigger(bType, dwTime);#endif //        break;    case OSD_UI_COMMON_DLG:        // LLY2.53, expand time value unit from WORD to DWORD        //OSDCOMDLG_Trigger(bType, wTime);        OSDCOMDLG_Trigger(bType, dwTime);        break;#ifdef SUPPORT_NAVIGATOR //++CoCo2.37p#ifdef SUPPORT_INDEPENDENT_NAVIGATOR //CoCo1.0, support independent Navigator UI    case OSD_UI_NAVIGATOR:        // LLY2.53, expand time value unit from WORD to DWORD        //OSDNAVIGATOR_Trigger(bType, wTime);        OSDNAVIGATOR_Trigger(bType, dwTime);        break;#endif#endif //#ifdef SUPPORT_NAVIGATOR //++CoCo2.37p#ifdef SUPPORT_POWERON_MENU //CoCo2.38    case OSD_UI_POWERON_MENU:        // LLY2.53, expand time value unit from WORD to DWORD        //POWERONMENU_Trigger(bType, wTime);        POWERONMENU_Trigger(bType, dwTime);        break;#endif //#ifdef SUPPORT_POWERON_MENU //CoCo2.38#ifdef SUPPORT_COPY_FILE_IN_SLIDE_SHOW
    case OSD_UI_COPY_DELETE_DLG:
        break;
#endif //SUPPORT_COPY_FILE_IN_SLIDE_SHOW#ifdef SUPPORT_RADIO_TUNER    case OSD_UI_RADIO_TUNER:		//Radio Tuner        RADIO_Trigger();	        break;#endif //SUPPORT_RADIO_TUNER    default:                            //unknown UI        break;    }    }//***************************************************************************//  Function    :   _OSD_RecoverNDMessage//  Abstract    :   This function will recover normal display message.//  Arguments   :   bMessagePos: OSD_ND_UPPER_RIGHT_REGION==>normal upper message.//              :                OSD_ND_BOTTOM_REGION==>normal bottom message.   //  Return      :   none.//  Side Effect :   none.//  Notes       :   //***************************************************************************BYTE _OSD_RecoverNDMessage(BYTE bMessagePos){	BYTE bRecover = FALSE;    switch (bMessagePos)    {    case OSD_ND_UPPER_RIGHT_REGION:        if (_bOSDNUIndex > 0) //The stack has forever message to be recovered.        {            _OSDNUCurMsg.bMessage = _OSDNUStack[_bOSDNUIndex-1].bMessage;            _OSDNUCurMsg.wParam = _OSDNUStack[_bOSDNUIndex-1].wParam;            _OSDNUCurMsg.bSec = _OSDNUStack[_bOSDNUIndex-1].bSec;            _bOSDNUIndex--;            OSDND_Update(_OSDNUCurMsg.bMessage, _OSDNUCurMsg.wParam);			bRecover = TRUE;        }        break;    case OSD_ND_BOTTOM_REGION:        if (_bOSDNBIndex > 0) //The stack has forever message to be recovered.        {            _OSDNBCurMsg.bMessage = _OSDNBStack[_bOSDNBIndex-1].bMessage;            _OSDNBCurMsg.wParam = _OSDNBStack[_bOSDNBIndex-1].wParam;            _OSDNBCurMsg.bSec = _OSDNBStack[_bOSDNBIndex-1].bSec;            _bOSDNBIndex--;            OSDND_Update(_OSDNBCurMsg.bMessage, _OSDNBCurMsg.wParam);						bRecover = TRUE;        }        break;    default:        break;    }	return bRecover;}//***************************************************************************//  Function    :   _OSD_RecoverNURegion//  Abstract    :   This function will recover normal upper region.//  Arguments   :   none.//  Return      :   none.//  Side Effect :   none.//  Notes       :   //***************************************************************************void _OSD_RecoverNURegion(void){    if (_bOSDCurrentUI == OSD_UI_NONE)    {        //Forever normal upper message needs to be recovered?        _OSD_RecoverNDMessage(OSD_ND_UPPER_RIGHT_REGION);    }    else //Call other UI's recover function to recover the normal upper region.    {        //Some UI doesn't have to recover the normal upper message like Search, Bookmark, Program. They coexist with the normal display mode.        //Therefore, the normal upper message needs to be recovered when current UI is the UI.        if (!_OSD_RecoverUI(_bOSDCurrentUI, OSD_RECOVER_UPPER_REGION))            _OSD_RecoverNDMessage(OSD_ND_UPPER_RIGHT_REGION);    }}//***************************************************************************//  Function    :   _OSD_RecoverNBRegion//  Abstract    :   This function will recover normal bottom region.//  Arguments   :   none.//  Return      :   none.//  Side Effect :   none.

⌨️ 快捷键说明

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