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

📄 osdsrch.c

📁 ct952 source code use for Digital Frame Photo
💻 C
📖 第 1 页 / 共 5 页
字号:
    _OSDSRCH_ClearUI();    OSD_ChangeUI(OSD_UI_SEARCH, OSD_EXIT_UI); //CoCo.076, Notify OSD to exit the UI here.}//  *********************************************************************************//  Function    :   OSDSRCH_Entry//  Description :   Enter OSDSRCH UI//  Arguments   :   bSearchMode , //  Return      :   None//  Side Effect :   None//  *********************************************************************************void  OSDSRCH_Entry(BYTE bSearchMode){        __bSearchMode = bSearchMode;               if(__bSearchMode == SEARCH_MODE_TIME)    {                if ( !(__wDiscType & BOOK_DVD ))           {                               _OSDSRCH_Entry_Initial();                        _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_Initial();         _OSDSRCH_Entry_TitleChapter();       }    #endif //#ifndef NO_DISC_MODE //CoCo2.37p}//  *********************************************************************************//  Function    :   OSDSRCH_ShowUI//  Description :   Show Information in UI//  Arguments   :   bSearchMode , //  Return      :   None//  Side Effect :   None//  *********************************************************************************void  OSDSRCH_ShowUI(BYTE bSeachMode){        _OSDSRCH_InitializeGDI();        __bSearchMode=bSeachMode;  #ifndef NO_DISC_MODE //CoCo2.37p            if(__bSearchMode==SEARCH_MODE_TITLE_CHAPTER)	{	                //alex1.24,20040301,use ShowTwoEntry to reduce source code             _OSDSRCH_ShowTwoEntry(OSDSRCH_ENTRY_COLOR_FRAME_CENTER, OSDSRCH_ENTRY_COLOR_WORK_TEXT_BG);		        	}	else if(__bSearchMode==SEARCH_MODE_TIME)#else    if(__bSearchMode==SEARCH_MODE_TIME)#endif //#ifndef NO_DISC_MODE //CoCo2.37p        {	    __bSearchCursor = SEARCH_CURSOR_TIME;                         _ShowOneEntry(OSDSRCH_ENTRY_COLOR_WORK_TEXT_BG);         }    		}//  *********************************************************************************//  Function    :   _OSDSRCH_SearchKey//  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_SearchKey(BYTE bKey){    				    DWORD   dwTemp;    switch(bKey)    {        case    KEY_SEARCH: #ifdef PRESTOP_BEFORE_SETUP_AND_PROGRAM            if (__btInputProgram)            {                return KEY_INVALID;            }#endif            //alex070,20041205,fix the bug #85 for cdrom file manager show search              // JPEG slide show can enter Search UI and Search UI shows the "time" search mode.            //CDROM_M1                   0x0100            //DROM_XA                    0x0200	    //DROM_PICTURECD             0x0400  	    //BOOK_M1                    0x0102  // BOOK_CDROM | CDROM_M1	    //BOOK_XA                    0x0302  // BOOK_CDROM | CDROM_M1 | CDROM_XA	    //BOOK_PICTURECD             0x0702  // BOOK_CDROM | CDROM_M1 | CDROM_XA | CDROM_PICTURECD.         if ( (__bAttrPlay <= ATTR_AV_END && __bAttrPlay >= ATTR_AV_BEGIN) &&   (__btPlaying || __btPause)  )	    {            // LLY0.96, don't support GoTime action while non-exist DivX index table            // LLY1.01, don't support GoTime action while audio only mode (video resolution > 720*576)                        // LLY1.02, enable GoTime action for DivX w/ skip video stream case            if( (__bAttrPlay == ATTR_AVI) && (__bNoDivXIndexTbl) )//|| __bVideoID==HAL_THROW_VIDEO) )                        {                return (INVALID_KEY);            }            // LLY2.22, Dis-allow time search while CDROM/DVDROM title w/ file total time is zero.            // Otherwise, it can't calculate the correct postion            if( (__bAttrPlay & TYPE_CDROM_AV) && (!__dwFileTime) )            {                return (INVALID_KEY);            }            /*__dwTemp = PARSER_QueryContainerAudioType(__dwSFStreamID, __bASTNO);            if ((__bAttrPlay == ATTR_AVI) && ((__dwTemp == PARSER_ESFMT_WMA_V1) || (__dwTemp == PARSER_ESFMT_WMA_V2)))                return (INVALID_KEY);*/	    }            else if ((__wDiscType & BOOK_PICTURECD) || (__wDiscType == BOOK_CDDA && __bCDDA_DTS == CDDA_CDG)) //CoCo0.76, Please Alex don't use 0x700 directly. It's dangerous.            {                return INVALID_KEY;            	            }                                   else if (                 //alex080,20050110 only pbc off ,can use search..                __btPBC                        	//alex070,20041205 fix the bug #106 for Thumbnail UI can enter Search UI                //||                ||  __bThumbnailMode                                //alex070,20041205 fix the bug #90 for MM UI can enter Search UI                ||( __bNavigateMode ==  MEDIA_NAVIGATE_MODE)         // Micky1.20, 4M flash#ifndef NO_DIGEST                || __btDIGEST #endif               )            {                //__bSearchMode=SEARCH_MODE_OFF;//XULI0106                                //OSDSRCH_Search(MSG_SETSEARCH,OSD_COMPLETE_TIME,0xff);                //OSDSRCH_Exit(OSD_UI_EXIT_ALL);                //OSD_ChangeUI(OSD_UI_SEARCH, OSD_EXIT_UI);                                return INVALID_KEY;            }                                               __bSearchMode++;  // toggle switch for search mode                                  if(__bSearchMode > SEARCH_MODE_END)	    {                __bSearchMode=SEARCH_MODE_BEGIN;	    }            // nonDVD only have SEARCH_MODE_TIME#ifndef NO_DISC_MODE //CoCo2.37p    	    if ((!(__wDiscType&BOOK_DVD)&&(__bSearchMode==SEARCH_MODE_TITLE_CHAPTER)))//XULI0106#endif //#ifndef NO_DISC_MODE //CoCo2.37p    	    {		    __bSearchMode+=1;//XULI0106	    }	                switch(__bSearchMode)            {                case    SEARCH_MODE_OFF:  // leave search mode                                        //OSDSRCH_Search(MSG_SETSEARCH,OSD_COMPLETE_TIME,0xff);                    _OSDSRCH_Exit();                                                            break;#ifndef NO_DISC_MODE //CoCo2.37p                case    SEARCH_MODE_TITLE_CHAPTER:  // enter search mode                        //DVD_051Micky, Number >10                    //Use this variable to record the input value and number of digits                    __wNumberQueue=0;                    //Kevin1.23DMTech, default serach cursor is on Chapter or Title                      __bSearchCursor=SEARCH_CURSOR_TITLE;                    //__bSearchCursor=SEARCH_CURSOR_CHAPTER;                    // LLY.037, initialize the search item value                    __bSearchTitle=__bTitle;                    __wSearchChapter=__wChapter;                    //alex,2005012                    __wSearchChapter_Ns_Title=__wChapter_Ns_Title;                                       // don't allow Title/PTT play and PTT_Search                    if ( !NV_QueryUOP (UOP_CAN_TITLE_PLAY) &&                         !NV_QueryUOP (UOP_CAN_PTT_SEARCH)                    )                    {                        //__bSearchMode=SEARCH_MODE_OFF;                   ;                        //OSDSRCH_Search(MSG_SETSEARCH,OSD_COMPLETE_TIME,0xff);//                        _OSDSRCH_Exit();                        OSDSRCH_Exit(OSD_UI_EXIT_CONTROL_ONLY);                        //OSD_ChangeUI(OSD_UI_SEARCH, OSD_EXIT_UI); //--CoCo.076, Notify OSD to exit the UI in OSDSRCH_Exit().                        return INVALID_KEY;                    }                    // check if Title selection not allowed                    if ( !NV_QueryUOP (UOP_CAN_TITLE_PLAY) )                    {                        // can only choose chapter                        __bSearchCursor=SEARCH_CURSOR_CHAPTER;                    }                    // check if chapter selection not allowed                    if ( !NV_QueryUOP (UOP_CAN_PTT_SEARCH) )                    {                        // can only choose title                        __bSearchCursor=SEARCH_CURSOR_TITLE;                    }                                                    //OSDSRCH_Search(MSG_SETSEARCH,OSD_INPUT_TITLE_CHAPTER,0xff);                    OSDSRCH_Entry(__bSearchMode);	            break;	            #endif //#ifndef NO_DISC_MODE //CoCo2.37p                            case    SEARCH_MODE_TIME:	#ifndef NO_DISC_MODE //CoCo2.37p                	if ( __wDiscType & BOOK_DVD )            	{                    __bUOP_Parameter = __bTitle;			 // Damon2.37, when search mode change from TITLE_CHAPTER to TIME, the value of tiltle need to reset			 __bSearchTitle=__bTitle;                    if ( ! NV_QueryUOP (UOP_CAN_TIME_SEARCH) )                    {                        _OSDSRCH_Exit();                        #ifdef  GOTOTIME_SHOW_INVALID                        return INVALID_KEY;#else                        return KEY_NO_KEY;#endif                    }                }#endif //#ifndef NO_DISC_MODE //CoCo2.37p                    if ( !LINEAR_Action (KEY_GOTOTIME, NULL_0) )           	{    			//__bSearchMode=SEARCH_MODE_OFF;//XULI0106                                //OSDSRCH_Search(MSG_SETSEARCH,OSD_COMPLETE_TIME,0xff);                    _OSDSRCH_Exit();                    //OSD_ChangeUI(OSD_UI_SEARCH, OSD_EXIT_UI); //--CoCo.076, Notify OSD to exit the UI in OSDSRCH_Exit().    			return INVALID_KEY;           	}		break;        } //switch(__bSearchMode)        // Micky1.07a, fix RepeatAB-> GoTo TT/CC, won't clear repeat AB.        // Let GoTo TT/CC, Time <-> RepeatAB be exclusive        // can't call UTL_ModeInitial, as it will clear __bSearchMode.        if(__bSearchMode!=SEARCH_MODE_OFF)	{            // Micky1.24a, LINEAR_Action(KEY_GOTO_TIME) will remove UTL_ModeInitial            // so need to celar necessary mode here.            // This is a temporary solution, wait for UTL_ModeInitial review.            __btRandom= FALSE;            __btIntroMode=FALSE;#ifdef SUPPORT_BOOKMARK //--CoCo1.20, reduce code size.            __btBookMark= FALSE;#endif	    // wyc.pro when execute gototime, must clear program mode information	    LINEAR_Program(LINEAR_PROGRAM_CLEAR,NULL_0);	        // LLY.037 end	    if(__bSearchMode==SEARCH_MODE_TIME)	    {                                //OSDSRCH_Search(MSG_SETSEARCH,OSD_INPUT_TIME,0xff);                OSDSRCH_Entry(__bSearchMode);	    }        }	return KEY_NO_KEY;        //break;    case    KEY_UP:#ifndef NO_DISC_MODE //CoCo2.37p            if( __bSearchMode==SEARCH_MODE_TITLE_CHAPTER )            {            if( __bSearchCursor==SEARCH_CURSOR_TITLE )            {                if (__bSearchTitle<__bTitle_Ns)                {                    __bSearchTitle++;                }    		else 		{		    __bSearchTitle=1;		}                    DVD_ParseInfo ( DVD_TOTAL_CHAPTERS, & dwTemp, __bSearchTitle );                __wSearchChapter_Ns_Title= (WORD) dwTemp;                __wSearchChapter=0x1;					            }            else if ( __bSearchCursor==SEARCH_CURSOR_CHAPTER )               {                if (__wSearchChapter<__wSearchChapter_Ns_Title)                {                    __wSearchChapter++;                            }                    else                 {		    __wSearchChapter=1;                }               }       			            //OSDSRCH_Search(MSG_SEARCH,OSD_INPUT_TITLE_CHAPTER,0xff);            OSDSRCH_ShowUI(__bSearchMode);            return  KEY_NO_KEY;        }        else #endif //#ifndef NO_DISC_MODE //CoCo2.37p            {            return  INVALID_KEY;            }            break;    case    KEY_DOWN:#ifndef NO_DISC_MODE //CoCo2.37p            if( __bSearchMode==SEARCH_MODE_TITLE_CHAPTER )            {            if( __bSearchCursor==SEARCH_CURSOR_TITLE )            {                if (__bSearchTitle>1)                {                    __bSearchTitle--;                }		else		{		    __bSearchTitle=__bTitle_Ns;		}                    DVD_ParseInfo ( DVD_TOTAL_CHAPTERS, & dwTemp, __bSearchTitle );                __wSearchChapter_Ns_Title= (WORD) dwTemp;                __wSearchChapter=0x1;                					            }            else if ( __bSearchCursor==SEARCH_CURSOR_CHAPTER )               {                if (__wSearchChapter>1)                {                    __wSearchChapter--;                 }    		else		{		    __wSearchChapter=__wSearchChapter_Ns_Title;		}			            }                			            //OSDSRCH_Search(MSG_SEARCH,OSD_INPUT_TITLE_CHAPTER,0xff);            OSDSRCH_ShowUI(__bSearchMode);            return  KEY_NO_KEY;        }        else #endif //#ifndef NO_DISC_MODE //CoCo2.37p            {            return  INVALID_KEY;            }          case    KEY_RIGHT:    case    KEY_LEFT://DVD_051Micky, Number >10        // Use this variable to record the input value and number of digits        // must reset the value when change field        __wNumberQueue=0;        __dwTimeKey=NULL_0;  // must clear N10PLUS key reference while change cursor        // move the cursor depending on right/left        // LLY.037, let cursor can move right/left anytime        if(bKey==KEY_RIGHT)        {#ifndef NO_DISC_MODE //CoCo2.37p    

⌨️ 快捷键说明

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