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

📄 osdsrch.c

📁 车载电子影音系统dvd播放系统原程序代码
💻 C
📖 第 1 页 / 共 3 页
字号:
			__bSearchCursor = SEARCH_CURSOR_TIME;             
            _ShowOneEntry(GDI_ENTRY_4B_COLOR_YELLOW); 
        }    		

    }   
    
    //Kevin1.00, fix the video hang/audio broken when invoking Search GUI
    // Micky1.05-2, fix TT/CC search will hang sometimes.
    // After A/V reset-> still has VOBU data input before starting playing new cell.


//Alex2.38, fix the drawing UI slowly when playing CDDA in Anti-Shock
#ifndef SUPPORT_ANTISHOCK  
    if (wParam == OSD_INPUT_TITLE_CHAPTER)	
        HAL_PreFillBuffer(HAL_FILL_AV_BUFFER, NULL);
#endif//#ifndef SUPPORT_ANTISHOCK  

} //end of OSDSRCH_Search()

//  *********************************************************************************
//  Function    :   _OSDSRCH_ShowTwoEntry
//  Description :   Show twoe Entry Number in either SEARCH_TITLE, SEARCH_CHAPTER, or SEARCH_TIME field. a Button in the VIR Frame//  Arguments   :   
//                  bColor: First Color in Title
//                  bColor: Second Color in Chapter
//  Return      :   None
//  Side Effect :   None
//  *********************************************************************************
static void _OSDSRCH_ShowTwoEntry(BYTE bColor1 , BYTE bColor2)
{
    if (__bSearchCursor == SEARCH_CURSOR_TITLE)
	{
	    __bSearchCursor = SEARCH_CURSOR_CHAPTER;             
		_ShowOneEntry(bColor1);    
//Alex2.38, fix the drawing UI slowly when playing CDDA in Anti-Shock
#ifndef SUPPORT_ANTISHOCK         
	    HAL_PreFillBuffer(HAL_FILL_AV_BUFFER, NULL);                      		    
#endif //#ifndef SUPPORT_ANTISHOCK         
		__bSearchCursor = SEARCH_CURSOR_TITLE;            
		_ShowOneEntry(bColor2);
	}        
    else if (__bSearchCursor == SEARCH_CURSOR_CHAPTER)
	{
		__bSearchCursor = SEARCH_CURSOR_TITLE;            
		_ShowOneEntry(bColor1);
//Alex2.38, fix the drawing UI slowly when playing CDDA in Anti-Shock
#ifndef SUPPORT_ANTISHOCK         
		HAL_PreFillBuffer(HAL_FILL_AV_BUFFER, NULL);                      		        
#endif //#ifndef SUPPORT_ANTISHOCK         
		__bSearchCursor = SEARCH_CURSOR_CHAPTER;             
		_ShowOneEntry(bColor2);        
    }
    
}


//  *********************************************************************************
//  Function    :   _OSDSRCH_ShowButton
//  Description :   Show a Button in the VIR Frame
//  Arguments   :   bButtonIndex: Button Index ( 0 ~ (TOTAL_BUTTON_NUM_IN_SRCH-1) )
//                  bColor: Center Color & Text BG Color
//  Return      :   None
//  Side Effect :   None
//  *********************************************************************************
static void _OSDSRCH_ShowButton(BYTE bButtonIndex, BYTE bColor)
{
    //Kevin1.00, fix the video hang/audio broken when invoking Search GUI
    //HAL_PreFillBuffer(HAL_FILL_AV_BUFFER, NULL);

#ifdef ABSOLUTE_GOTOTIME //Kevin1.07, VCD/CDDA shows track# only for relative gototime only                
    if (!(__wDiscType & BOOK_DVD))       
    {    
        bButtonIndex ++;
    }
#endif
    //122 bytes

////Alex2.30-3,20040702,let all font during 32->63 in Y.
#if (SDRAM_CONFIGURATION == SDRAM_16M)	        
    //GDI_FILL_RECT(aSRCHButton[bButtonIndex].wX0, aSRCHButton[bButtonIndex].wY0, aSRCHButton[bButtonIndex].wX1,aSRCHButton[bButtonIndex].wY1,GDI_ENTRY_4B_COLOR_CENTER);
#else //#if (SDRAM_CONFIGURATION == SDRAM_16M)	        
    GDI_DRAW_FRAME(aSRCHButton[bButtonIndex].wX0, aSRCHButton[bButtonIndex].wY0, aSRCHButton[bButtonIndex].wX1, aSRCHButton[bButtonIndex].wY1,
                    GDI_ENTRY_4B_COLOR_WHITE, // bColorBright
                    GDI_ENTRY_4B_COLOR_TEXT_DISABLED, // bColorDark
                    bColor, // bColorCenter
                    FRAME_POP_SOLID, // bStyle
                    FRAME_THICKNESS // bThickness
                  );    
#endif //#if (SDRAM_CONFIGURATION == SDRAM_16M)	    


    GDI_SetTextColor(TEXT_BG_COLOR, bColor);               
	GDI_OUTPUT_TEXT(aSRCHButton[bButtonIndex].wX0+2, aSRCHButton[bButtonIndex].wY0+SRCH_FONT_GAP, aSRCHButton[bButtonIndex].wpOSDVIRFONT);   

} //end of _OSDSRCH_ShowButton()

//  *********************************************************************************
//  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, BYTE bNumber)
{
    
	__wGDIString[0] = bSize; //2 digits  or 3 digits
    __wGDIString[1] = CHAR_SLASH;                
    __wGDIString[bSize-1] = aDigit[(bNumber/10)%10];
	__wGDIString[bSize] = aDigit[bNumber%10];
//Alex1.21,200312010,use CHAR_UNDERLIN replace 0            
#ifdef SUPPORT_BOOKMARK
    if (bNumber==0)
    {
        __wGDIString[bSize-1] = CHAR_UNDERLIN;
    	__wGDIString[bSize] = CHAR_UNDERLIN;            
    }
#endif //#ifdef SUPPORT_BOOKMARK
    
}


//  *********************************************************************************
//  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)
{ 

    
    GDI_SetTextColor(TEXT_BG_COLOR, bColor);            
    if (bColor == GDI_ENTRY_4B_COLOR_YELLOW)
    {
	GDI_SetTextColor(TEXT_FG_COLOR, GDI_ENTRY_4B_COLOR_BLACK);    
    }
    else
    {
	GDI_SetTextColor(TEXT_FG_COLOR, GDI_ENTRY_4B_COLOR_WHITE);
    }
    
      

    if (__bSearchCursor == SEARCH_CURSOR_TITLE)
    {
		if(__wDiscType & BOOK_DVD)
		{     
            
//alex1.24,20040301, support Kevin1.25 DMtech

#ifdef SUPPORT_DMTECH_CURRENT_CHAPTER
			if (__btBookMark)
			{				
				//alex1.21,20031217use _ShowOneEntryNumber replace double command//
				_ShowOneEntryNumber(2, __bTitle);        
				GDI_DRAW_STRING (BUTTON_T_X1+BUTTON_GAP, BUTTON_T_Y0+SRCH_FONT_GAP);        
				_ShowOneEntryNumber(3, __wChapter);  			
			}
			else	
#endif            
            {
            
                //alex1.21,20031217use _ShowOneEntryNumber replace double command//
                _ShowOneEntryNumber(2, __bSearchTitle);        
			    GDI_DRAW_STRING (BUTTON_T_X1+BUTTON_GAP, BUTTON_T_Y0+SRCH_FONT_GAP);        
                _ShowOneEntryNumber(3, __bTitle_Ns);            
            }
		}

        //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);
			GDI_DRAW_STRING (BUTTON_T_X1+BUTTON_GAP, BUTTON_T_Y0+SRCH_FONT_GAP);        
            _ShowOneEntryNumber(3, __wTrackEnd);
            
        }
		else //BOOK_VCD/BOOK_CVD/BOOK_SVCD 
		{
            //alex1.21,20031217use _ShowOneEntryNumber replace double command//
            _ShowOneEntryNumber(2, __wPlayItem);                  
			GDI_DRAW_STRING (BUTTON_T_X1+BUTTON_GAP, BUTTON_T_Y0+SRCH_FONT_GAP);                    
            _ShowOneEntryNumber(3, __wTrackEnd-1);
            
		}                  

        GDI_SetTextColor(TEXT_BG_COLOR, GDI_ENTRY_4B_COLOR_GENERAL_BG_BLUE); 
		GDI_SetTextColor(TEXT_FG_COLOR, GDI_ENTRY_4B_COLOR_WHITE);      
        GDI_DRAW_STRING (BUTTON_T_X1+40, BUTTON_T_Y0+SRCH_FONT_GAP);
    }   
    else if (__bSearchCursor == SEARCH_CURSOR_CHAPTER)
    {          
      //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);
        GDI_DRAW_STRING (BUTTON_C_X1+BUTTON_GAP, BUTTON_C_Y0+SRCH_FONT_GAP);        
        _ShowOneEntryNumber(3, __wSearchChapter_Ns_Title);
        __wGDIString[0] = 5; //5 digits 
        __wGDIString[4] = CHAR_SPACE; //to clear 3 digits remaining
        __wGDIString[5] = CHAR_SPACE; //to clear 3 digits remaining
        __bTemp=0;
      }
      else
      {
        //Kevin1.00, expand to 3 digits 
        _ShowOneEntryNumber(3, __wSearchChapter);
        __wGDIString[1] = aDigit[__wSearchChapter/100];     
#ifdef SUPPORT_BOOKMARK
        if (__wSearchChapter==0)
        {   
            __wGDIString[1] = CHAR_UNDERLIN;                	    
        }
#endif //#ifdef SUPPORT_BOOKMARK                   
        GDI_DRAW_STRING (BUTTON_C_X1+BUTTON_GAP, BUTTON_C_Y0+SRCH_FONT_GAP);                      
        _ShowOneEntryNumber(4, __wSearchChapter_Ns_Title);
        __wGDIString[1] = aDigit[__wSearchChapter_Ns_Title/100];                
        __bTemp=10;
      }

      GDI_SetTextColor(TEXT_BG_COLOR, GDI_ENTRY_4B_COLOR_GENERAL_BG_BLUE); 
      GDI_SetTextColor(TEXT_FG_COLOR, GDI_ENTRY_4B_COLOR_WHITE);
      GDI_DRAW_STRING (BUTTON_C_X1+40+__bTemp, BUTTON_C_Y0+SRCH_FONT_GAP);             
      
      
    }  
    else //SEARCH_CURSOR_TIME   
    {       
     
        if (!__bGoToTimeNO) //not set yet
        {   
            for (__bTemp=1 ;__bTemp<8 ;__bTemp++)
            {
                __wGDIString[__bTemp] = CHAR_UNDERLIN;    
            }
        }  
        else
        {       
            __wGDIString[1] = aDigit[__bTimeHour];
            __wGDIString[3] = aDigit[__bTimeMin/10];
            __wGDIString[4] = aDigit[__bTimeMin%10];
            __wGDIString[6] = aDigit[__bTimeSec/10];
            __wGDIString[7] = aDigit[__bTimeSec%10];
//alex1.21,20031210 ,support bookmark
#ifdef SUPPORT_BOOKMARK   
            if (__wBookMark[__wBookMark[0]]!=0 && __btBookMark )
            {              
                __wGDIString[1] = aDigit[HIBYTE(__wBookMark[__wBookMark[0]]) /60];
                __wGDIString[3] = aDigit[(HIBYTE(__wBookMark[__wBookMark[0]]) %60) /10];                
                __wGDIString[4] = aDigit[HIBYTE(__wBookMark[__wBookMark[0]]) %10];              
                __wGDIString[6] = aDigit[LOBYTE(__wBookMark[__wBookMark[0]]) /10];
                __wGDIString[7] = aDigit[LOBYTE(__wBookMark[__wBookMark[0]]) %10];
              
            }
#endif//#ifdef SUPPORT_BOOKMARK           
        }                
        __wGDIString[0] = 7; //7 digits            
        __wGDIString[2] = CHAR_MOUHOW;        
        __wGDIString[5] = CHAR_MOUHOW;        


#ifdef ABSOLUTE_GOTOTIME //Kevin1.07, VCD/CDDA shows track# only for relative gototime only                
        if ( !(__wDiscType & BOOK_DVD ))   
        {        
            GDI_DRAW_STRING (BUTTON_EABS_X1+(BUTTON_GAP<<1), BUTTON_EABS_Y0+SRCH_FONT_GAP);    
        }
        else
#endif
        {
            GDI_DRAW_STRING (BUTTON_E_X1+(BUTTON_GAP<<1), BUTTON_E_Y0+SRCH_FONT_GAP); 
        }

    }    
    


} //end of _ShowOneEntry()





#endif //#ifdef CT908_UI

⌨️ 快捷键说明

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