modify_browse_func.c
上传用户:caisangzi8
上传日期:2013-10-25
资源大小:15756k
文件大小:43k
源码类别:

DVD

开发平台:

C/C++

  1. /*****************************************************
  2. HISTORY:
  3. Creater: xiongyuyue
  4. Date   : 2003/6/28 
  5. Description: browse function using 
  6. modifier : zhaoyanhua
  7. date: 2003-12-6 16:18
  8.  changed the some function of NEW_STYLE_WINDOw:
  9.  VCD: DELETE ITEM : playtime  
  10.       ADD ITEM:   : disctime、track time
  11.  DVD: DELETE ITEM : time
  12.  
  13. *****************************************************/
  14. #ifndef DVDRELEASE
  15. //#define BROWSE_DBG
  16. #endif
  17. #ifdef DYNAMIC_SPECTRUM     //fengjl  3-10-30 12:34
  18. extern BYTE band_onoff;
  19. extern void Show3dspectrum(void); //axel 2003/12/2 11:31pm
  20. #endif
  21. #define browse_puts()           ((void)0)
  22. #define browse_show_function()  ((void)0)
  23. #if 1
  24. #ifdef  BROWSE_DBG
  25. #include "sio.h"
  26. #include "emuio.h"
  27. #undef  browse_puts
  28. #undef  browse_show_function
  29. #define browse_puts             puts_w
  30. #define browse_show_function()  do {browse_puts(__FUNCTION__); browse_puts("n");} while (0)
  31. #endif
  32. #endif
  33. /////////////////////////////////////////////////////////////////////////
  34. //wanghaoying 2003-8-12 19:50 added
  35. extern void set_video_aspect(void);
  36. extern void startup_vpp_now(void);
  37. extern void set_vpp_disp_window(UINT32,UINT32,UINT32,UINT32);
  38. /////////////////////////////////////////////////////////////////////////
  39. extern UINT16 mp3_file_count(void);   //axel 2003/12/2 11:30pm
  40. ///////////////////////////////////////////////////////////////////
  41. //zhaoyanhua add 2003-12-18 15:39
  42. extern BYTE memory_config_saved;//reset.h
  43. extern BYTE GetConfigMode(int config);//memcfg.c
  44. extern void   osd_init_newstyle_window_PAL(void);//osd1.c
  45. extern void   osd_init_newstyle_window_NTSC(void);//osd1.c
  46. ///////////////////////////////////////////////////////////////////
  47. #ifdef NEWSTYLE_WINDOW          //xiongyuyue 
  48. BYTE bInputState = NON_INPUT_STATE;
  49. int bInputIndex = 0;   //for title/chapter search function,
  50. BYTE bTimeInput = 0;
  51. BYTE update_definition = 40;
  52. extern UINT32 PlayBackLength;
  53. void br_Draw8space(BYTE fontColor,BYTE bkColor,BYTE index)
  54. {//erase displayed word and disp new word when press updown key(for draw left item)
  55.     strcpy(linebuf,"            ");  //fengjl changed space from 8 to 12   3-11-24 18:52
  56.     osd_DrawRegionString(brArea[BR_ITEM_AREA].xStart,brArea[BR_ITEM_AREA].yStart+ITEM_HEIGHT*index,
  57.                         linebuf,fontColor,bkColor,arc_region_loc.region);
  58. }
  59. void br_Draw18space(BYTE fontColor,BYTE bkColor,BYTE index)
  60. {//erase displayed word and disp new word when press updown key(for draw right item)
  61.     strcpy(linebuf,"                  ");
  62.     osd_DrawRegionString(brArea[BR_CONTENT_AREA].xStart,brArea[BR_CONTENT_AREA].yStart+ITEM_HEIGHT*index,
  63.                         linebuf,fontColor,bkColor,arc_region_loc.region);
  64. }
  65. void br_DrawLeftItemStr(BYTE hl_index,BYTE str_index,BYTE fontColor,BYTE bkColor)
  66. {
  67.     br_Draw8space(fontColor,bkColor,hl_index);//xyy 2003-7-29 17:12
  68. if(cd_type_loaded==CDDVD)
  69.         psprintf(linebuf,"%s",_OsdMessegeFont1[osd_font_mode][string_index_dvd[str_index]]);
  70. else if(cd_type_loaded==CDROM || cd_type_loaded==CDDA)
  71. psprintf(linebuf,"%s",_OsdMessegeFont1[osd_font_mode][string_index_cd[str_index]]);
  72.     else
  73.         psprintf(linebuf,"%s",_OsdMessegeFont1[osd_font_mode][string_index_vcd[str_index]]);
  74.     osd_DrawRegionString(brArea[BR_ITEM_AREA].xStart,brArea[BR_ITEM_AREA].yStart+ITEM_HEIGHT*(hl_index),
  75.                         linebuf,fontColor,bkColor,arc_region_loc.region);
  76. }
  77. void browse_HL_leftItem(BYTE index,BYTE fontColor,BYTE pre_bkColor,BYTE bkColor,BYTE UPDN)
  78. {
  79.     if(UPDN == 0)//when press down key
  80.     {
  81.      if(index>1)
  82.     br_DrawLeftItemStr(index-2,info_index-1,fontColor,pre_bkColor);//xyy 2003-7-29 20:05
  83.     br_DrawLeftItemStr(index-1,info_index,fontColor,bkColor);//xyy 2003-7-29 20:05
  84.     }
  85.     else if(UPDN == 1)//when press up key
  86.     {
  87.      if(index < ITEM_PER_PAGE)
  88.     br_DrawLeftItemStr(index,info_index+1,fontColor,pre_bkColor);//xyy 2003-7-29 20:05
  89.     br_DrawLeftItemStr(index-1,info_index,fontColor,bkColor);//xyy 2003-7-29 20:05
  90.     }
  91. }
  92.     
  93. void br_Draw_TT_info(void)
  94. {
  95.     BYTE dvd_title_Ns;
  96.     
  97.     if(cd_type_loaded==CDDVD)
  98.     {
  99. dvd_title=get_tt_info(DISP_TT); 
  100. dvd_title_Ns = get_tt_info(DISP_TT_Ns); 
  101. }
  102. else
  103. {
  104. /*
  105. dvd_title=disp_trk_now;
  106. dvd_title_Ns = cd_total_trk();
  107. */  
  108. dvd_title=disp_trk_now;
  109. if(cd_type_loaded==CDROM)//xyy 2003-9-11 17:12
  110. dvd_title_Ns = mp3_file_count();
  111. else 
  112. dvd_title_Ns = cd_total_trk(); 
  113. }
  114.     psprintf(linebuf, "%02d/%02d",dvd_title,dvd_title_Ns);
  115.     if(bBrowseLevel==1 && info_index==0)
  116.     osd_DrawRegionString(brArea[BR_CONTENT_AREA].xStart,brArea[BR_CONTENT_AREA].yStart,
  117.      linebuf,INFO_FONTCOL,INFO_BKCOL,arc_region_loc.region);         
  118. else
  119.     osd_DrawRegionString(brArea[BR_CONTENT_AREA].xStart,brArea[BR_CONTENT_AREA].yStart,
  120.      linebuf,INFO_FONTCOL,INFO_PRE_BKCOL,arc_region_loc.region);         
  121. }
  122. void br_Draw_CHP_info(void)
  123. {
  124.     BYTE dvd_chp_Ns;
  125. dvd_chapter=get_tt_info(DISP_CH);  
  126. dvd_chp_Ns = get_tt_info(DISP_CH_Ns);
  127.     psprintf(linebuf, "%02d/%02d",dvd_chapter,dvd_chp_Ns);
  128. if(bBrowseLevel==1 && info_index==1)
  129.     osd_DrawRegionString(brArea[BR_CONTENT_AREA].xStart,brArea[BR_CONTENT_AREA].yStart+ITEM_HEIGHT*1,
  130.      linebuf,INFO_FONTCOL,INFO_BKCOL,arc_region_loc.region);         
  131.     else
  132.     osd_DrawRegionString(brArea[BR_CONTENT_AREA].xStart,brArea[BR_CONTENT_AREA].yStart+ITEM_HEIGHT*1,
  133.      linebuf,INFO_FONTCOL,INFO_PRE_BKCOL,arc_region_loc.region);         
  134. }
  135. void browse_func_up(void)
  136. {
  137.     BYTE i,j;
  138.     if(bBrowseLevel==1 || info_index==0)
  139.         return;
  140.     else
  141.         info_index--;
  142.         
  143.     if((info_index<ITEM_PER_PAGE)||(info_index == 5)|| (info_index == 6))
  144.      bInputState = NON_INPUT_STATE;
  145.      
  146.     
  147.     HL_index--;
  148.     if((info_index+1)%ITEM_PER_PAGE==0)
  149.     {
  150.         for(i=info_index-(ITEM_PER_PAGE-1),j=0;j<ITEM_PER_PAGE;i++,j++)
  151.             br_DrawLeftItem(i,j,INFO_FONTCOL,INFO_PRE_BKCOL);
  152.         br_DrawRightItem();
  153.         browse_HL_leftItem(ITEM_PER_PAGE,INFO_FONTCOL,INFO_PRE_BKCOL,INFO_BKCOL,1);
  154.     }
  155.     if(HL_index>0)
  156.         browse_HL_leftItem(HL_index,INFO_FONTCOL,INFO_PRE_BKCOL,INFO_BKCOL,1);
  157.     else
  158.         HL_index = ITEM_PER_PAGE;
  159. }
  160. void browse_func_down(void)
  161. {
  162.     BYTE i,j;
  163.     if(bBrowseLevel==1)
  164.         return;
  165.     if((cd_type_loaded==CDROM || cd_type_loaded==CDDA) && info_index==2)//xyy 2003-9-12 14:22
  166.      return;
  167.     if(cd_type_loaded==CDDVD)
  168.     {
  169.     if(info_index>=DVD_MAXITEM-1)
  170.         return;
  171.     else
  172.         info_index++;
  173. }
  174. else
  175. {
  176.     if(info_index>=VCD_MAXITEM-1)
  177.         return;
  178.     else
  179.         info_index++;
  180. }
  181.     if(info_index>=ITEM_PER_PAGE)
  182.     {
  183.      if((info_index == 5)|| (info_index == 6))
  184.          bInputState = NON_INPUT_STATE;//zhaoyanhua modify2003-12-7 14:54 
  185.         else
  186.             bInputState = INPUT_STATE;
  187.     }
  188.     HL_index++;
  189.     if((info_index%ITEM_PER_PAGE==0) && (info_index<DVD_MAXITEM))
  190.     {
  191.         for(i=info_index,j=0;j<ITEM_PER_PAGE;i++,j++)
  192.             br_DrawLeftItem(i,j,INFO_FONTCOL,INFO_PRE_BKCOL);
  193.         br_DrawRightItem();
  194.         browse_HL_leftItem(1,INFO_FONTCOL,INFO_PRE_BKCOL,INFO_BKCOL,0);
  195.     }
  196.     if(HL_index<=ITEM_PER_PAGE)
  197.         browse_HL_leftItem(HL_index,INFO_FONTCOL,INFO_PRE_BKCOL,INFO_BKCOL,0);
  198.     else
  199.         HL_index = 1;
  200.     }
  201. void init_time_search(void)
  202. {
  203. bTimeInput = 1;
  204. goto_time = 0;
  205. psprintf(linebuf,"%02d:%02d:%02d",0,0,0);
  206.     osd_DrawRegionString(brArea[BR_CONTENT_AREA].xStart,brArea[BR_CONTENT_AREA].yStart+ITEM_HEIGHT*(HL_index-1),
  207.                             linebuf,INFO_FONTCOL,INFO_BKCOL,arc_region_loc.region); 
  208.     br_Draw_tmhl(brArea[BR_CONTENT_AREA].xStart,brArea[BR_CONTENT_AREA].yStart+ITEM_HEIGHT*(HL_index-1),"_",INFO_FONTCOL,INFO_BKCOL);    
  209. }
  210. #ifdef  SUPPORT_PLAYBACK_ICON
  211. void br_Draw_FBicon(void)
  212. {
  213. memset(linebuf,0,sizeof(linebuf));
  214. strcat1(linebuf, OSD_ICON_FB);
  215.     osd_DrawRegionString(brArea[BR_CONTENT_AREA].xStart,brArea[BR_CONTENT_AREA].yStart+ITEM_HEIGHT*(HL_index-1),
  216.                             linebuf,INFO_FONTCOL,INFO_BKCOL,arc_region_loc.region);//xyy 2003-8-11 16:25
  217. }
  218. void br_Draw_FFicon(void)
  219. {
  220.     strcat1(linebuf, OSD_ICON_FF);
  221.     osd_DrawRegionString(brArea[BR_CONTENT_AREA].xStart+ITEM_WIDTH,brArea[BR_CONTENT_AREA].yStart+ITEM_HEIGHT*(HL_index-1),
  222.                             linebuf,INFO_FONTCOL,INFO_BKCOL,arc_region_loc.region); //xyy 2003-8-11 16:25 
  223. }
  224. #endif
  225. void br_Draw_underline(BYTE xStart, BYTE yStart, BYTE lineColor,BYTE bkColor)
  226. {
  227.     BYTE *s="__";
  228.     bInputState = INPUT_STATE;
  229.     if(bInputIndex==0)
  230.     osd_DrawRegionString(xStart,yStart,s,lineColor,bkColor,arc_region_loc.region);  
  231. }
  232. extern void preDealGoto_time(void);
  233. extern void time_trans2hms(void);
  234. extern void exe_timesearch_func(UINT32 goto_ff,UINT32 fail);
  235. void exe_time_goto(void)
  236. {
  237.     #define DISCTIME_SEARCH     1
  238.     #define TRACKTIME_SEARCH    2
  239.     
  240.     BYTE  search_mode = 0;
  241.     
  242.     index_x=0;
  243. time_trans2hms();  //xyy  2003-7-29 13:17           
  244. preDealGoto_time();//xyy 2003-7-29 13:18
  245. if(cd_type_loaded != CDDVD)
  246. {
  247.     switch(info_index)
  248.     {
  249.         case 1: 
  250.             search_mode = DISCTIME_SEARCH;
  251.             break;
  252.         case 2:
  253.             search_mode = TRACKTIME_SEARCH;
  254.             break;
  255.     }
  256.     if(goto_time)
  257.     {   
  258.         printf("browse function : goto_time :%d---n",goto_time);
  259.     exe_timesearch_func(0,search_mode);//xyy 2003-7-29 13:25
  260. }
  261. }
  262. else//for DVD
  263. {
  264.             printf("****exe_time_goto****goto_hour = %2d  goto_min = %2d goto_sec = %2d n",goto_hour,goto_min,goto_sec);
  265.     
  266.     if(goto_time) ircmd_post_func(CMD_FUNC|CMD_FUNC_GOTO); //axel 2004/1/27 10:00pm return while min>60 or sec>60
  267. }
  268. bInputState = NON_INPUT_STATE;
  269. bTimeInput=0;
  270. }
  271. void br_Draw_rtSpecialItem(void)//include audio language,sub-picture,repeat_all,multi-angle
  272. {
  273.     br_Draw18space(INFO_FONTCOL,INFO_PRE_BKCOL,HL_index-1);//xyy 2003-7-29 17:32
  274. br_Draw_FBicon();//xyy 2003-7-29 15:52
  275.     
  276.     switch(info_index)
  277.     {
  278.     //info_index:the index of string_index_dvd array or string_index_vcd array
  279.    
  280.     case 2://DVD:STR_OS_subtitle ;;CD:STR_OS_REP
  281.      if(cd_type_loaded==CDROM || cd_type_loaded==CDDA)
  282.      ircmd_repeat_all();
  283.     
  284.    
  285. if(cd_type_loaded == CDDVD)
  286.     ircmd_sub_picture();
  287. break;
  288. case 3://DVD:STR_OS_AUDIO_LANG_SETUP; VCD:STR_OS_REP
  289. if(cd_type_loaded==CDDVD)
  290. ircmd_audio_language();
  291. else
  292.      ircmd_repeat_all();
  293.     
  294. break;
  295. case 4://DVD:STR_OS_ANGLE
  296.         ircmd_angle();
  297. break;
  298. case 7://DVD:STR_OS_REP
  299.      ircmd_repeat_all();
  300. break;
  301.   
  302. br_Draw_FFicon();//xyy 2003-7-29 16:51
  303. }
  304. void browse_func_select(void)
  305. {
  306. //info_index:the index of string_index_dvd array or string_index_vcd array
  307. //which is defined in file browse_gui.h
  308.     if(cd_type_loaded==CDDVD)
  309.     {
  310.     if(info_index<=1 && bInputIndex<2 && bBrowseLevel==1)
  311.      return;
  312.     }
  313.     else
  314.     {
  315.     if(info_index==0 && bInputIndex<2 && bBrowseLevel==1)
  316.      return;
  317.     }
  318.     if(bBrowseLevel==0)
  319.     {
  320. #if defined(ADJUSTING_ACTION_VALID_RIGHT_NOW)//xyy 2003-9-9 16:10
  321. action_click = 2; // alan, 2003/8/28 05:45PM
  322. #else
  323. action_click = 0;
  324. #endif
  325. //     action_click = 2; // alan, 2003/8/28 05:45PM
  326.         switch(info_index)
  327.         {
  328.             case 0://title(DVD) or track(VCD/CD/MP3) information
  329.         bBrowseLevel = 1;     //xyy 2003-8-11 17:14   
  330.         br_DrawLeftItem(info_index,info_index%ITEM_PER_PAGE,INFO_FONTCOL,INFO_PRE_BKCOL);
  331.              br_Draw_TT_info();
  332.                 br_Draw_underline(brArea[BR_CONTENT_AREA].xStart,brArea[BR_CONTENT_AREA].yStart+ITEM_HEIGHT*(HL_index-1),UNDERLINECOL,INFO_BKCOL);    
  333.              break;
  334.             case 1://chaprter(DVD) or disc time (VCD)playtime(CD/MP3) information
  335.         br_DrawLeftItem(info_index,info_index%ITEM_PER_PAGE,INFO_FONTCOL,INFO_PRE_BKCOL);
  336.             if(cd_type_loaded==CDDVD)
  337.             {
  338.         bBrowseLevel = 1;      //xyy 2003-8-11 17:14  
  339.              br_Draw_CHP_info();
  340.              br_Draw_underline(brArea[BR_CONTENT_AREA].xStart,brArea[BR_CONTENT_AREA].yStart+ITEM_HEIGHT*(HL_index-1),UNDERLINECOL,INFO_BKCOL); //xyy 2003-8-11 16:16   
  341.           }
  342. else
  343. init_time_search();
  344.                break;
  345.             case 2://sub_title(DVD) or track time(VCD) or repeat setup(CD/MP3)information
  346.             
  347.  if(cd_type_loaded==CDROM || cd_type_loaded==CDDA)//xyy 2003-9-12 13:38
  348. {
  349.         bBrowseLevel = 1;  
  350.         br_DrawLeftItem(info_index,info_index%ITEM_PER_PAGE,INFO_FONTCOL,INFO_PRE_BKCOL);
  351.     br_Draw_rtSpecialItem();
  352. }
  353. //zhaoyanhua add 2003-12-7 13:30
  354. else if(cd_type_loaded==CDDVD)
  355.             {
  356. //                 if(pDSV->dAv_SPST_Ns<2)
  357. //                     return;
  358.         bBrowseLevel = 1;  
  359.         br_DrawLeftItem(info_index,info_index%ITEM_PER_PAGE,INFO_FONTCOL,INFO_PRE_BKCOL);
  360.     br_Draw_rtSpecialItem();
  361.             }
  362. else //disc time VCD
  363.             {
  364.         br_DrawLeftItem(info_index,info_index%ITEM_PER_PAGE,INFO_FONTCOL,INFO_PRE_BKCOL);
  365.              init_time_search();
  366.              }
  367.                
  368.                
  369.                break;
  370.             case 3://audio language (DVD), repeat (VCD) information
  371.             
  372.             if(cd_type_loaded==CDDVD)
  373.             {
  374.                 if(pDSV->dAv_AST_Ns<=1)
  375.              return;
  376.             }
  377.             else//VCD
  378.             {
  379.                 #if !defined(PULIANG_DVD)
  380.                 if( IsPBCOn() )
  381.          return;
  382.      #endif
  383. }
  384. bBrowseLevel = 1;  
  385. br_DrawLeftItem(info_index,info_index%ITEM_PER_PAGE,INFO_FONTCOL,INFO_PRE_BKCOL);
  386.         br_Draw_rtSpecialItem();
  387. //br_Draw_rtSpecialItem();
  388.             break;    
  389.             case 4://multi-angle(only DVD)information
  390.              if(get_angle_Ns()<1)
  391.              return;
  392.         bBrowseLevel = 1;  
  393.         br_DrawLeftItem(info_index,info_index%ITEM_PER_PAGE,INFO_FONTCOL,INFO_PRE_BKCOL);
  394.     br_Draw_rtSpecialItem();
  395.                 break;
  396.             //zhaoyanhua add 2003-12-7 13:55
  397.             case 5:
  398.             case 6:    
  399.     br_DrawLeftItem(info_index,info_index%ITEM_PER_PAGE,INFO_FONTCOL,INFO_PRE_BKCOL);
  400.                 init_time_search();
  401.              break;
  402.             case 7://repeat setup(DVD)information
  403.         bBrowseLevel = 1;  
  404.         br_DrawLeftItem(info_index,info_index%ITEM_PER_PAGE,INFO_FONTCOL,INFO_PRE_BKCOL);
  405.     br_Draw_rtSpecialItem();
  406.                 break;
  407.                 
  408.         }
  409.         bBrowseLevel = 1;        
  410.     }
  411.     else if(bBrowseLevel == 1)
  412.     {
  413.         br_DrawLeftItem(info_index,info_index%ITEM_PER_PAGE,INFO_FONTCOL,INFO_BKCOL);//xyy 2003-8-11 16:08
  414.         switch(info_index)
  415.         {
  416.             case 0://title(DVD) or track(VCD/CD/MP3) information
  417.                 if(bInputIndex==1)
  418.                     return;
  419.                 if(bInputIndex > 1)
  420.                 {
  421.                     bInputIndex = 0;
  422.                     if(cd_type_loaded==CDDVD)
  423.                     {
  424.                     if(info_index==0)
  425.                      dvd_chapter = 1;
  426.                     
  427.                     if(UOP_check(UOP_PTT_PS)&&(dvd_chapter==1))
  428.              dvd_chapter = 0;//TT play,terry,3-8-23 19:35
  429.              
  430.                 ircmd_post_func(CMD_FUNC|CMD_PTT_PLAY);
  431.                 }
  432.                     else
  433.                     ircmd_post_func(CMD_SELECT | dvd_title);
  434.                     bInputState = NON_INPUT_STATE;    
  435.                 }
  436.                 break;
  437.             case 1://chaprter(DVD) or disc time(VCD)or playtime(CD/MP3) information
  438.              if(cd_type_loaded==CDDVD)
  439.              {
  440.                 if(bInputIndex==1)
  441.                     return;
  442.                 if(bInputIndex > 1)
  443.                 {
  444.                     bInputIndex = 0;
  445.                     
  446.                     if(UOP_check(UOP_PTT_PS)&&(dvd_chapter==1))
  447.       dvd_chapter = 0;//TT play,terry,3-8-23 19:35
  448.       
  449.                 ircmd_post_func(CMD_FUNC|CMD_PTT_PLAY);
  450.                     bInputState = NON_INPUT_STATE;    
  451.                 }
  452.                 }
  453.                 else
  454.                 {
  455.                  exe_time_goto();
  456.                  bInputState = NON_INPUT_STATE; 
  457.                     br_DrawRightItem();//zhaoyanhua add 2003-12-6 15:56
  458.                 }
  459.                 break;
  460.             case 2://sub_title(DVD)   track time(VCD) or repeat setup(CD/MP3)information
  461.             if(cd_type_loaded == CDDVD)
  462.             {
  463.                 br_DrawRightItem();
  464.             }
  465.             else if((cd_type_loaded == CDVCD10)||(cd_type_loaded ==CDVCD20)||(cd_type_loaded == CDSVCD))
  466.             {   
  467.                 exe_time_goto();
  468.                 bInputState = NON_INPUT_STATE; 
  469.                 br_DrawRightItem();//zhaoyanhua add 2003-12-6 15:56
  470.             }
  471.            
  472.                 break;
  473.             case 5:
  474.             case 6:
  475.                 exe_time_goto();
  476.                 br_DrawRightItem();//zhaoyanhua add 2003-12-6 15:56  
  477.                 break;             
  478.             case 3:////audio language setup(DVD) or repeat setup(VCD) information
  479.             case 4://multi-angle(only DVD)information    
  480.             case 7://repeat setup(DVD)information
  481.                 br_DrawRightItem();
  482.                 break;
  483.         }
  484.         bBrowseLevel = 0;
  485.     }
  486. }
  487. #ifdef CLEAR_KEY_IN_WINDOW //Maoyong 2004.02.18
  488. void browse_func_clear(void)
  489. {
  490. //DVD not in CHP, TT, CHP and TT time item, no use
  491. if(cd_type_loaded == CDDVD)
  492. {
  493. if((info_index != 5)&&(info_index != 6)&&(info_index != 0)&&(info_index != 1))
  494. return;
  495. }
  496. else //CDROM, CDVCD..., not DVD
  497. {
  498. if( (info_index != 0) && (info_index != 1) && (info_index != 2) ) 
  499. return;
  500. }
  501. index_x=0;
  502. bBrowseLevel = 0;
  503. bInputState = NON_INPUT_STATE;
  504.     bInputIndex = 0;
  505. browse_func_select();
  506. }
  507. #endif
  508. UINT32 ten_power(BYTE exponent)
  509. {
  510. UINT32 temp=1,i;
  511. for(i=0;i<exponent;i++)
  512. temp = temp*10;
  513. return temp;
  514. }
  515. void browse_func_left(void)
  516. {
  517.     if(bBrowseLevel==0)
  518.         return;
  519.     if((cd_type_loaded==CDDVD && info_index <= 1) || (cd_type_loaded!=CDDVD && info_index==0))
  520.     {
  521.         bInputState = NON_INPUT_STATE;
  522.         bInputIndex = 0;
  523.         bBrowseLevel = 0;
  524.         UpdateTT_CHP_info();
  525.         br_DrawLeftItem(info_index,info_index%ITEM_PER_PAGE,INFO_FONTCOL,INFO_BKCOL);//xyy 2003-8-11 17:06
  526.     }
  527.     else if((cd_type_loaded==CDDVD && info_index == 5) ||((cd_type_loaded==CDDVD) && (info_index == 6)) 
  528.       || (cd_type_loaded!=CDDVD && info_index==1)|| (cd_type_loaded!=CDDVD && info_index==2))
  529.     {//for VCD :info_index 1/2 //zhaoyanhua add 2003-12-6 16:55
  530.         #ifdef BROWSE_DBG
  531.         printf("==========DRaw left Item =========n");
  532.         #endif
  533.         br_DrawLeftItem(info_index,info_index%ITEM_PER_PAGE,INFO_FONTCOL,INFO_BKCOL);//xyy 2003-8-11 17:06
  534.      br_DrawRightItem();
  535.         bBrowseLevel = 0;
  536.         bTimeInput = 0;
  537.         index_x = 0; // alan, 2003/9/5 02:16