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

📄 osdsrch.c

📁 ct952 source code use for Digital Frame Photo
💻 C
📖 第 1 页 / 共 5 页
字号:
        if (__btPBC)        {            // show the input number            OSD_OUTPUT_MACRO ( MSG_NUMBER, wValue, 1 );            if ( __wStatus != ID_ENDLIST )            {                VCD20_KeyNumber ( wValue );                return;            }        }        else#endif //#ifndef NO_DISC_MODE //++CoCo2.37p        {            if ( LINEAR_Action(KEY_NUMBER, wValue) )    //__dwNumberPrevious) )                return;        }    }    // Only invalid number will go here    //OSD_Output(MSG_INVALID, OSD_ERR_KEY, 1 );}//***************************************************************************//  Function    :   _OSDSRCH_InitializeGDI//  Abstract    :   This function will initialize GDI-relative attributes like palette.//  Arguments   :   none.//  Return		:   none.//  Side Effect :   none.//  Notes       :   //***************************************************************************void _OSDSRCH_InitializeGDI(void){    if (SETUP_CUSTOM_UI_STYLE_1 == __SetupInfo.bUIStyle)    {        GDI_ChangePALEntry(OSDSRCH_ENTRY_COLOR_FRAME_CENTER,                           OSDSRCH_COLOR_CENTER1,  TRUE);        GDI_ChangePALEntry(OSDSRCH_ENTRY_COLOR_ICON_FG,                           OSDSRCH_VALUE_COLOR_ICON_FG1,       FALSE);        GDI_ChangePALEntry(OSDSRCH_ENTRY_COLOR_ICON_BG,                           OSDSRCH_VALUE_COLOR_ICON_BG1,       FALSE);        GDI_ChangePALEntry(OSDSRCH_ENTRY_COLOR_WORK_TEXT_BG,                           OSDSRCH_VALUE_COLOR_WORK_TEXT_BG1,  FALSE);    }    else if (SETUP_CUSTOM_UI_STYLE_2 == __SetupInfo.bUIStyle)    {        GDI_ChangePALEntry(OSDSRCH_ENTRY_COLOR_FRAME_CENTER,                           OSDSRCH_COLOR_CENTER2,  FALSE);        GDI_ChangePALEntry(OSDSRCH_ENTRY_COLOR_ICON_FG,                           OSDSRCH_VALUE_COLOR_ICON_FG2,       FALSE);        GDI_ChangePALEntry(OSDSRCH_ENTRY_COLOR_ICON_BG,                           OSDSRCH_VALUE_COLOR_ICON_BG2,       FALSE);        GDI_ChangePALEntry(OSDSRCH_ENTRY_COLOR_WORK_TEXT_BG,                           OSDSRCH_VALUE_COLOR_WORK_TEXT_BG2,  FALSE);    }    else if (SETUP_CUSTOM_UI_STYLE_3 == __SetupInfo.bUIStyle)    {        GDI_ChangePALEntry(OSDSRCH_ENTRY_COLOR_FRAME_CENTER,                           OSDSRCH_COLOR_CENTER3,  FALSE);        GDI_ChangePALEntry(OSDSRCH_ENTRY_COLOR_ICON_FG,                           OSDSRCH_VALUE_COLOR_ICON_FG3,       FALSE);        GDI_ChangePALEntry(OSDSRCH_ENTRY_COLOR_ICON_BG,                           OSDSRCH_VALUE_COLOR_ICON_BG3,       FALSE);        GDI_ChangePALEntry(OSDSRCH_ENTRY_COLOR_WORK_TEXT_BG,                           OSDSRCH_VALUE_COLOR_WORK_TEXT_BG3,  FALSE);    }    else if (SETUP_CUSTOM_UI_STYLE_4 == __SetupInfo.bUIStyle)    {        GDI_ChangePALEntry(OSDSRCH_ENTRY_COLOR_FRAME_CENTER,                           OSDSRCH_COLOR_CENTER4,  FALSE);        GDI_ChangePALEntry(OSDSRCH_ENTRY_COLOR_ICON_FG,                           OSDSRCH_VALUE_COLOR_ICON_FG4,       FALSE);        GDI_ChangePALEntry(OSDSRCH_ENTRY_COLOR_ICON_BG,                           OSDSRCH_VALUE_COLOR_ICON_BG4,       FALSE);        GDI_ChangePALEntry(OSDSRCH_ENTRY_COLOR_WORK_TEXT_BG,                           OSDSRCH_VALUE_COLOR_WORK_TEXT_BG4,  FALSE);    }#ifndef SIMPLE_SEARCH_UI        GDI_ChangePALEntry(OSDSRCH_ENTRY_COLOR_FRAME_BRIGHT,                           OSDSRCH_VALUE_COLOR_FRAME_BRIGHT,  FALSE);        GDI_ChangePALEntry(OSDSRCH_ENTRY_COLOR_FRAME_DARK,                           OSDSRCH_VALUE_COLOR_FRAME_DARK,    FALSE);        GDI_ChangePALEntry(OSDSRCH_ENTRY_COLOR_STILL_TEXT_FG,                           OSDSRCH_VALUE_COLOR_STILL_TEXT_FG, FALSE);        GDI_ChangePALEntry(OSDSRCH_ENTRY_COLOR_WORK_TEXT_FG,                           OSDSRCH_VALUE_COLOR_WORK_TEXT_FG,  FALSE);#endif     GDI_WaitPaletteComplete();    GDI_ActivateRegion(0); //open GDI}//  *********************************************************************//  Function    :   _OSDSRCH_Process_KeyNumber//  Description :   Process input number//  Arguments   :   bValue, Number Key (Numerical)//                  if ( bVlaue & 0x80 )  means it's 10PLUS or ..//  Return      :   NONE//  Side Effect :   __bISRKey may changed//  *********************************************************************void _OSDSRCH_Process_KeyNumber ( WORD wValue ){    // Micky2.81, don't give initial value while declaration.    BYTE    bRealNumber;    bRealNumber=0;    // Number input was allowed when:    // [AVSYS]    //  - Tuner/ Program Channel.(Others will be invalidated by AVSYS_ProcessKey)    // [DVD]    // 1. Program input    // 2. GoToTime input    // 3. TT/CC search    // 4. Digest mode     // 5. Has selectable buttons    // 6. No selectable buttons, but support play chapter by number    // [Other titles]    //  - Always.#ifndef NO_DISC_MODE //CoCo2.37p    if (__wDiscType & BOOK_DVD)    {         if (// Micky1.20, 4M flash#ifndef NO_DIGEST             __btDIGEST || #endif//alex1.23,20040218 combine gototime , search//            __btInputProgram || __btGoToTime || __bSearchMode || __btBookMark)            __btInputProgram || (__bSearchMode != SEARCH_MODE_OFF) #ifdef SUPPORT_BOOKMARK //--CoCo1.20, reduce code size.            || __btBookMark#endif            )         {            // Always allow KEY_Nx         }         // check if can allow number selection         else if ( !NV_Action(ACTION_NUMBER_CHECK, 0) )         {            // don't allow KEY_Nx when no selectable button.            // except support play chapter by number// Micky2.78b-2, Support using number key to select chapter play.// Only when in title domain and and no selective buttons.// (NF-200, Dinosaur has the case that TT_DOM, but have selective buttons)#ifdef  SUPPORT_PLAY_CHAPTER_BY_NUMBER            if ( ( __bDomain & TT_DOM ) )            {            }            else#endif  //#ifdef  SUPPORT_PLAY_CHAPTER_BY_NUMBER            {                OSD_OUTPUT_MACRO(MSG_INVALID, OSD_ERR_KEY, 0x1);                return ;            }         }    }   // end if (__wDiscType & BOOK_DVD)#endif //#ifndef NO_DISC_MODE //CoCo2.37p    // Micky2.81, support different number of digits.    // must give proper value for different title/mode.    // VCD/DVD, only allow 2 digits    // CDROM title ??    // AVSYS, 4 digits    if (__wDiscType & CDROM_M1)        __wMaxNumber = FM_MAX_NUMBER;    else    //Micky1.00, fix "The Perfect Storm"(Region 1) can't select > 100 chapter    // the Title 6 has 249 chapters.    // need allow the input number to be 999.    {        if ( __bSearchMode )            __wMaxNumber = 999;        else        __wMaxNumber = 90;    }    // below will do input number value calculation    // KEY_10+ is not allowed when:    // 1. Program input    // 2. GoToTime input    if (wValue & 0x8000)  // a time key    {        // no time key for GOTOTIME        // wyc.101, not allow 10+ in program input mode//alex1.23,20040218 combine gototime , search//        if (( __btGoToTime ) || (__btInputProgram))        if (( __bSearchMode==SEARCH_MODE_TIME) || (__btInputProgram))        {   // invalid            OSD_Output(MSG_INVALID,  OSD_ERR_KEY, 1 );            return;        }        // the actual value is in lower 7 bits        wValue &= 0x7FFF;        if (__dwTimeKey)    // second time key        {            __dwNumberPrevious +=(DWORD)wValue;     // really number            // check if the number out of max. digits.            // Micky2.81, support different number of digits.            // when over the max. number, will reset as 0            if ( __dwNumberPrevious > (DWORD)__wMaxNumber )                __dwNumberPrevious = 0;        }        else                // first time key        {                        //alex fix the bug plus +10            //__dwNumberPrevious += (DWORD)wValue;            __dwNumberPrevious = (DWORD)wValue;        }        // record the time that KEY_10+ was pressed.        __dwTimeKey= OS_GetSysTimer();    }    else                // key value is decided    {        if (__dwTimeKey)    // key value is decided        {            __dwNumberPrevious+= wValue; // increase number        }        else           //alex fix the bug plus +10           //__dwNumberPrevious+= wValue;            __dwNumberPrevious= wValue;        bRealNumber=TRUE;    // wyc1.10, add a independent define to control the on/off of CDROM titles number confirm key#ifndef  SUPPORT_NUMBER_CONFIRM_KEY#ifdef    SUPPORT_CDROM_NUMBER_CONFIRM_KEY    if (__wDiscType & BOOK_M1)#else    if (0)#endif#endif  //#ifndef  SUPPORT_NUMBER_CONFIRM_KEY    {//alex1.23,20040218 combine gototime , search//        if (!__btInputProgram && !__btGoToTime && !__bSearchMode)        if (!__btInputProgram && (__bSearchMode == SEARCH_MODE_OFF) )        {            if (!__dwTimeKey)            {                if (_wPreValue == 0xffff)                    _wPreValue=0;                // Micky2.81, support different number of digits.                _wPreValue = (_wPreValue % ((__wMaxNumber+10)/10) ) *10;                if ( (_wPreValue + wValue) > (__wMaxNumber+10) )                    _wPreValue = 0;                __dwNumberPrevious=(DWORD)(_wPreValue+wValue);            }            _wPreValue=(WORD)__dwNumberPrevious;            __dwTimeNumber=OS_GetSysTimer();            // DVD_099Micky, the time value must be divided by COUNT_1_SEC            OSD_OUTPUT_MACRO(MSG_NUMBER,(WORD) __dwNumberPrevious, COUNT_NUMBER_GAP/COUNT_1_SEC);        }    }        __dwTimeKey=0;        }//DVD_047-1. Number confirm    //ppp    if (bRealNumber)    {        // wyc1.10, support number confirm key to select file when disc is CDROM title.#ifdef  SUPPORT_NUMBER_CONFIRM_KEY        // only program, gototime, chapter search//alex1.23,20040218 combine gototime , search//        if (__bSearchMode || __btInputProgram || __btGoToTime)        if ( (__bSearchMode != SEARCH_MODE_OFF) || __btInputProgram)#else#ifdef SUPPORT_CDROM_NUMBER_CONFIRM_KEY        if (  (!(__wDiscType & BOOK_M1))               ||( (__bAttrPlay <= ATTR_AV_END && __bAttrPlay >= ATTR_AV_BEGIN) && (__btPlaying || __btPause) )        )         #endif // #endif        {            _OSDSRCH_ConfirmAction(__dwNumberPrevious);            _wPreValue=0xffff;        }        return;    }    else    // 10+    {//alex1.23,20040218 combine gototime , search//        if (__btGoToTime || __bSearchMode)        if ( __bSearchMode != SEARCH_MODE_OFF)        {            _OSDSRCH_ConfirmAction(__dwNumberPrevious);            _wPreValue=0xffff;            return;        }    }    // Micky1.23, below checking seems not necessary.    //if((!__bSearchMode) && (!__btInputProgram))    // seems search/program will now go here.    // LLY.036, don't process key 10+ while in search mode    // wyc.101, to avoid number 10+ in program input mode    if((!__bSearchMode) && (!__btInputProgram))    {        // Key 10+, still need input the other digit        if (!bRealNumber)        {            // show the number value            OSD_OUTPUT_MACRO ( MSG_KEY10,(WORD) __dwNumberPrevious, COUNT_NUMBER_GAP/COUNT_1_SEC );            return;        }    }}//  *********************************************************************************//  Function    :   OSDSRCH_Recover//  Description :   The function is called by OSD to do the recovery of Program UI //  Arguments   :   bRecoverRegion, the recover region //		:   OSD_RECOVER_ALL //		:   OSD_RECOVER_UPPER_REGION, invalid//		:   OSD_RECOVER_BOTTOM_REGION, invalid//  Return      :   TRUE, The region has been recovered.//              :   FALSE, The region doesn't need to be recovered in this UI.//  Side Effect ://  *********************************************************************************BYTE OSDSRCH_Recover(BYTE bRecoverRegion){    if (OSD_RECOVER_ALL != bRecoverRegion)     {    	return FALSE;    }        _OSDSRCH_InitializeGDI();    if(__bSearchMode == SEARCH_MODE_TIME)    {                if ( !(__wDiscType & BOOK_DVD ))           {                                           _OSDSRCH_Entry_PureTime();               }        else        {#ifndef NO_DISC_MODE //CoCo2.37p            _OSDSRCH_Entry_TitleTime();#endif //#ifndef NO_DISC_MODE //CoCo2.37p        }    } #ifndef NO_DISC_MODE //CoCo2.37p        else if(__bSearchMode == SEARCH_MODE_TITLE_CHAPTER)    {        _OSDSRCH_Entry_TitleChapter();       }    #endif //#ifndef NO_DISC_MODE //CoCo2.37p     

⌨️ 快捷键说明

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