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

📄 osdsrch.c

📁 ct952 source code use for Digital Frame Photo
💻 C
📖 第 1 页 / 共 5 页
字号:
#else    _InitRect(&(_OSDSRCHGRect.rect), SRCH_FRAME_X0, SRCH_FRAME_Y0,                                     SRCH_FRAME_X1, SRCH_FRAME_Y1);     GDI_FillRoundRect(0, 12, (PPARM_RECT)&_OSDSRCHGRect.rect);#endif} //end of _OSDSRCH_ShowSrchFrame()//  *************************************************************************//  Function    :   _ShowOneEntryNumber//  Description :   Show One Entry Number in either SEARCH_TITLE, SEARCH_CHAPTER, or SEARCH_TIME field. //  Arguments   :   bSize : Display Size , bNumber: Display Number //  Return      :   None//  Side Effect ://  *************************************************************************static void _ShowOneEntryNumber(BYTE bSize, WORD wNumber){    _wOSDSRCHString[0] = bSize; //2 digits  or 3 digits    _wOSDSRCHString[1] = CHAR_SOLIDUS;                        if ( wNumber <100)     {    	_wOSDSRCHString[bSize-1]   =  aNDNumbers[(wNumber/10)%10];    	_wOSDSRCHString[bSize]     =  aNDNumbers[wNumber%10];       	    }    else if  ( wNumber <1000)     {        _wOSDSRCHString[bSize-2]   =  aNDNumbers[(wNumber/100)%10];    	_wOSDSRCHString[bSize-1]   =  aNDNumbers[(wNumber/10)%10];    	_wOSDSRCHString[bSize]     =  aNDNumbers[wNumber%10];           }   /* Alan removes     _wOSDSRCHString[bSize+1] = CHAR_SPACE; //to clear 3 digits remaining    _wOSDSRCHString[bSize+2] = CHAR_SPACE; //to clear 3 digits remaining    _wOSDSRCHString[0] = bSize + 2 ; //2 digits  or 3 digits*/}//  *************************************************************************//  Function    :   _ShowOneEntry//  Description :   Show One Entry in either SEARCH_TITLE, SEARCH_CHAPTER, or SEARCH_TIME field. //  Arguments   :   bColor: Center Color & Text BG Color//  Return      :   None//  Side Effect ://  *************************************************************************static void _ShowOneEntry(BYTE bColor){     //Kevin1.00, fix the video hang/audio broken when invoking Search GUI    //HAL_PreFillBuffer(HAL_FILL_AV_BUFFER, NULL);    _OSDSRCHStringAttr.bBackground = bColor;    if (bColor == OSDSRCH_ENTRY_COLOR_WORK_TEXT_BG)        _OSDSRCHStringAttr.bTextColor =  OSDSRCH_ENTRY_COLOR_WORK_TEXT_FG;    else    {        _OSDSRCHStringAttr.bTextColor =  OSDSRCH_ENTRY_COLOR_STILL_TEXT_FG;    }        if (__bSearchCursor == SEARCH_CURSOR_TITLE)    {	if(__wDiscType & BOOK_DVD)	{     #ifndef NO_DISC_MODE //CoCo2.37p            _ShowOneEntryNumber(2, __bSearchTitle);             _OSDSRCHStringAttr.wX = SOLIDUS_T_X - GDI_GetStringWidth(_wOSDSRCHString);            _OSDSRCHStringAttr.wY = BUTTON_T_Y0;            _OSDSRCH_DrawString(); //CoCo1.20, reduce code size.            _ShowOneEntryNumber(3, __bTitle_Ns);            #endif //#ifndef NO_DISC_MODE //CoCo2.37p        }        //Kevin0.87b, add to fix "Current track# / Total track# is wrong in GotoTime UI"     	else if (__wDiscType & BOOK_CDDA)        {                        //alex1.21,20031217use _ShowOneEntryNumber replace double command//            _ShowOneEntryNumber(2, __wPlayItem);            _OSDSRCHStringAttr.wX = SOLIDUS_T_X - GDI_GetStringWidth(_wOSDSRCHString);            _OSDSRCHStringAttr.wY = BUTTON_T_Y0;            _OSDSRCH_DrawString(); //CoCo1.20, reduce code size.            _ShowOneEntryNumber(3, __wTrackEnd);                    }	else //BOOK_VCD/BOOK_CVD/BOOK_SVCD 	{            //alex1.21,20031217use _ShowOneEntryNumber replace double command//            _ShowOneEntryNumber(2, __wPlayItem);              _OSDSRCHStringAttr.wX = SOLIDUS_T_X - GDI_GetStringWidth(_wOSDSRCHString);            _OSDSRCHStringAttr.wY = BUTTON_T_Y0;            _OSDSRCH_DrawString(); //CoCo1.20, reduce code size.            _ShowOneEntryNumber(3, __wTrackEnd-1);            	}                          _OSDSRCHStringAttr.bBackground = OSDSRCH_ENTRY_COLOR_FRAME_CENTER;           _OSDSRCHStringAttr.bTextColor =  OSDSRCH_ENTRY_COLOR_STILL_TEXT_FG;        _OSDSRCHStringAttr.wX = SOLIDUS_T_X;        _OSDSRCHStringAttr.wY = BUTTON_T_Y0;        _OSDSRCH_DrawString(); //CoCo1.20, reduce code size.    }       else if (__bSearchCursor == SEARCH_CURSOR_CHAPTER)    {          	//Damon2.37, fix the problem the range of chapter display exceeds the search UI      //_OSDSRCHGRect.bColor = OSDSRCH_ENTRY_COLOR_FRAME_CENTER;      //_InitRect(&(_OSDSRCHGRect.rect), SOLIDUS_C_X - 36, SRCH_FRAME_Y0,  SOLIDUS_C_X + 44, SRCH_FRAME_Y1);      //GDI_FillRect_909(0, (PPARM_RECT)&_OSDSRCHGRect.rect);      //Kevin1.00, automatically adjust chapter display to 2 or 3 digits      if (__wSearchChapter_Ns_Title < 100)      {        //alex1.21,20031217use _ShowOneEntryNumber replace double command//        _ShowOneEntryNumber(2, __wSearchChapter);        _OSDSRCHStringAttr.wX = SOLIDUS_C_X - GDI_GetStringWidth(_wOSDSRCHString);        _OSDSRCHStringAttr.wY = BUTTON_C_Y0;        _OSDSRCH_DrawString(); //CoCo1.20, reduce code size.        _ShowOneEntryNumber(3, __wSearchChapter_Ns_Title);      }      else      {        //Kevin1.00, expand to 3 digits         _ShowOneEntryNumber(3, __wSearchChapter);        _wOSDSRCHString[1] = aNDNumbers[__wSearchChapter/100]; //CoCo1.20, reduce code size        _OSDSRCHStringAttr.wX = SOLIDUS_C_X - GDI_GetStringWidth(_wOSDSRCHString);        _OSDSRCHStringAttr.wY  = BUTTON_C_Y0;        _OSDSRCH_DrawString(); //CoCo1.20, reduce code size.        _ShowOneEntryNumber(4, __wSearchChapter_Ns_Title);      }           _OSDSRCHStringAttr.bBackground = OSDSRCH_ENTRY_COLOR_FRAME_CENTER;         _OSDSRCHStringAttr.bTextColor =  OSDSRCH_ENTRY_COLOR_STILL_TEXT_FG;      _OSDSRCHStringAttr.wX = SOLIDUS_C_X;      _OSDSRCHStringAttr.wY  = BUTTON_C_Y0;      _OSDSRCH_DrawString(); //CoCo1.20, reduce code size.          }      else //SEARCH_CURSOR_TIME       {                    if (!__bGoToTimeNO) //not set yet        {               for (__bTemp=1;__bTemp<8;__bTemp++)                _wOSDSRCHString[__bTemp] = CHAR_LOW_LINE;            }          else        {             _wOSDSRCHString[1] = aNDNumbers[__bTimeHour];            _wOSDSRCHString[3] = aNDNumbers[__bTimeMin/10];            _wOSDSRCHString[4] = aNDNumbers[__bTimeMin%10];            _wOSDSRCHString[6] = aNDNumbers[__bTimeSec/10];            _wOSDSRCHString[7] = aNDNumbers[__bTimeSec%10];                      }        _wOSDSRCHString[0] = 7; //7 digits                    _wOSDSRCHString[2] = CHAR_COLON;                _wOSDSRCHString[5] = CHAR_COLON;        #ifdef ABSOLUTE_GOTOTIME //Kevin1.07, VCD/CDDA shows track# only for relative gototime only                        if ( !(__wDiscType & BOOK_DVD ))           {               _OSDSRCHStringAttr.wX =  BUTTON_EABS_X1+BUTTON_GAP*4;            _OSDSRCHStringAttr.wY  = BUTTON_EABS_Y0;            _OSDSRCH_DrawString(); //CoCo1.20, reduce code size.        }        else#endif        {            _OSDSRCHStringAttr.wX =  BUTTON_E_X1+BUTTON_GAP*3;            _OSDSRCHStringAttr.wY  = BUTTON_E_Y0;            _OSDSRCH_DrawString(); //CoCo1.20, reduce code size.        }    }            //Kevin1.00, fix the video hang/audio broken when invoking Search GUI    //HAL_PreFillBuffer(HAL_FILL_AV_BUFFER, NULL);} //end of _ShowOneEntry()//alex909,20040909//  *********************************************************************************//  Function    :   OSDSRCH_ProcessKey//  Description :   Process Key in CC , to judge which key needs to recieve//  Arguments   :   bKey    : bKey//  Return      :   BYTE    : if the key doesn't be belong to this module , remove it.//  Side Effect :   None//  *********************************************************************************BYTE OSDSRCH_ProcessKey(void){    //alex070,20041207 fix the bug #156Search e KEY_Next ==> Program,     //Program can not get any KEY. Search->Program, can't receive keys in program mode.                        if (__bKey==KEY_SEARCH )    {    	 //alex072,20041214,fix the bug, It need show the "Invalid Key" when    	 //Enter Thum/Degist"         //bKey=_OSDSRCH_SearchKey(__bKey);                 //return bKey;                  return _OSDSRCH_SearchKey(__bKey);                      }    if (__bSearchMode != SEARCH_MODE_OFF)    {        switch(__bKey)        {            //alex075,20041217,Search Mode can't use Display	        case    KEY_DISPLAY:                        	return INVALID_KEY;        case    KEY_STOP:        case    KEY_NEXT:        case    KEY_PREV:        case    KEY_RESUME:                                        case    KEY_BOOKMARK:                   case    KEY_PROGRAM:                    //alex080,20050110 avoid special vcd error, like JVC        case    KEY_PBC:        case    KEY_MENU:            //alex080,20050108 add some key can by pass            _OSDSRCH_Exit();                        //alex080,20041231, according micky's comment , it need to split to "KEY_TODO" , "KEY_BYPASS"                                  return KEY_BYPASS;                                              case    KEY_UP:               case    KEY_DOWN:                   case    KEY_RIGHT:        case    KEY_LEFT:                      return _OSDSRCH_SearchKey(__bKey);                    //bKey=_OSDSRCH_SearchKey(bKey);                    //return bKey;                                    case    KEY_ENTER:        case    KEY_PLAY:        case    KEY_PLAY_PAUSE:            if (__bRepeatAB!=REPEAT_NONE)    //alan091	    {                __bRepeatAB = REPEAT_NONE;                //alex,20040126,fix test report 076,M115                OSD_OUTPUT_MACRO(MSG_REPEATAB, REPEAT_NONE, 1);	    }            //OSDSRCH_Search(MSG_SETSEARCH,OSD_COMPLETE_TIME,0xff);            _CC_GoTimeAction(GOTIME_CALCULATE);                #ifndef NO_DISC_MODE //CoCo2.37p                        if  (__bSearchMode==SEARCH_MODE_TITLE_CHAPTER)            {                __bSearchMode=SEARCH_MODE_OFF;                if (__bSearchTitle==0)                    __bSearchTitle=1;                if (__wSearchChapter==0)                    __wSearchChapter=1;                                //bKey = KEY_SEARCH_PLAY;                //alex080,20041231, according micky's comment , it need to split to "KEY_TODO" , "KEY_BYPASS"                                      _OSDSRCH_Exit();                            __bKey = KEY_SEARCH_PLAY;                return KEY_TODO;                                      }#endif //#ifndef NO_DISC_MODE //CoCo2.37p            if  (__bSearchMode==SEARCH_MODE_TIME)            {                __bSearchMode=SEARCH_MODE_OFF;                //bKey = KEY_GOTOTIME_PLAY;                                //alex080,20041231, according micky's comment , it need to split to "KEY_TODO" , "KEY_BYPASS"                                      _OSDSRCH_Exit();                            __bKey = KEY_GOTOTIME_PLAY;                                return KEY_TODO;                                                      }            //OSDSRCH_Exit(OSD_UI_EXIT_ALL);                        //return KEY_NO_KEY;        case    KEY_N0:        case    KEY_N1:        case    KEY_N2:        case    KEY_N3:        case    KEY_N4:        case    KEY_N5:        case    KEY_N6:        case    KEY_N7:        case    KEY_N8:        case    KEY_N9:        case    KEY_N10:        case    KEY_N11:        case    KEY_N12:        case    KEY_N13:        case    KEY_N14:        case    KEY_N15:        case    KEY_N16:        case    KEY_N17:        case    KEY_N18:        case    KEY_N19:        case    KEY_N20:            _OSDSRCH_Process_KeyNumber ( (__bKey- KEY_N0) );            return _OSDSRCH_SearchKey(KEY_NUMBER);                //bKey=_OSDSRCH_SearchKey(KEY_NUMBER);                //return bKey;                              	        case    KEY_N10PLUS:            _OSDSRCH_Process_KeyNumber ( (10 | 0x8000 ) );    // 0x8000 means it's a "PLUS" Key            return _OSDSRCH_SearchKey(KEY_NUMBER);                //bKey=_OSDSRCH_SearchKey(KEY_NUMBER);                //return bKey;                                          case    KEY_N20PLUS:            _OSDSRCH_Process_KeyNumber ( (20 | 0x8000 ) );            return _OSDSRCH_SearchKey(KEY_NUMBER);                //bKey=_OSDSRCH_SearchKey(KEY_NUMBER);                //return bKey;                                      case    KEY_CLEAR:            return _OSDSRCH_SearchKey(__bKey);                default:            return KEY_BYPASS;            //return bKey;                              }    }    else    {        //return bKey;        return KEY_BYPASS;    }      }//  *********************************************************************************//  Function    :   _OSDSRCH_ClearUI//  Description :   Clear OSDSRCH UI//  Arguments   :   None//  Return      :   TRUE /FALSE ,//  Side Effect :   None//  *********************************************************************************void _OSDSRCH_ClearUI(void){	    _InitRect(&(_OSDSRCHGRect.rect), SRCH_FRAME_X0, SRCH_FRAME_Y0, SRCH_FRAME_X1, SRCH_FRAME_Y1); //CoCo1.20, reduce code size.    _OSDSRCHGRect.bColor = PAL_ENTRY_COLOR_TRANSPARENT;        GDI_FillRect_909(0, (PPARM_RECT)&_OSDSRCHGRect.rect);	}//  *********************************************************************************//  Function    :   OSDSRCH_Exit//  Description :   Exit OSDSRCH Control//  Arguments   :   None//  Return      :   TRUE /FALSE ,//  Side Effect :   None//  *********************************************************************************void OSDSRCH_Exit(BYTE bExitMode){    __bSearchMode=SEARCH_MODE_OFF;	    if (bExitMode==OSD_UI_EXIT_ALL)    {        _OSDSRCH_ClearUI();    }}//  *************************************************************************//  Function    :   _OSDSRCH_Exit//  Description :   Exit OSDSRCH Control//  Arguments   :   None//  Return      :   TRUE /FALSE ,//  Side Effect :   None//  *************************************************************************void _OSDSRCH_Exit(void){    __bSearchMode=SEARCH_MODE_OFF;	

⌨️ 快捷键说明

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