📄 browse_func.c
字号:
/**************************************************************************
* *
* Copyright (c) 2002 by Sunplus Technology Co., Ltd. *
* *
* This software is copyrighted by and is the property of Sunplus *
* Technology Co., Ltd. All rights are reserved by Sunplus Technology *
* Co., Ltd. This software may only be used in accordance with the *
* corresponding license agreement. Any unauthorized use, duplication, *
* distribution, or disclosure of this software is expressly forbidden. *
* *
* This Copyright notice MUST not be removed or modified without prior *
* written consent of Sunplus Technology Co., Ltd. *
* *
* Sunplus Technology Co., Ltd. reserves the right to modify this *
* software without notice. *
* *
* Sunplus Technology Co., Ltd. *
* 19, Innovation First Road, Science-Based Industrial Park, *
* Hsin-Chu, Taiwan, R.O.C. *
**************************************************************************/
/*--------------------------------------------------------------------------
| File Name : browse_func.c
|
| Description : NEW STYLE WINDOW function in it.it can exe some function.
for example goto and display some information etc.
|
| Version : 0.1
|
|
| Rev Date Author(s) Status & Comments
|---------------------------------------------------------------------------------
| 0.1 2003/6/28 xiongyuyue Creating
|--------------------------------------------------------------------------------*/
/*****************************************************\
Creater: xiongyuyue
Date : 2003/6/28
Description: browse function using
\*****************************************************/
#include "global.h"
#include "osd.h"
#include "func.h"
#include "cfont.h"
#include "util.h"
#include "ircmd.h"
#include "user_if.h"
#include "Icon.h"
#include "kernel.h"
#include "vpp.h"
#include "browse_gui.h"
#include "osd_arc.h"
#include "stdlib.h"
#ifdef MODIFY_OSD_SHOW_NEW_STYLE_WINDOW//zhaoyanhua add 2003-12-8 9:29
#include "modify_browse_func.c"
#else
#ifndef DVDRELEASE
//#define BROWSE_DBG
#endif
#ifdef DYNAMIC_SPECTRUM //fengjl 3-10-30 12:34
extern BYTE band_onoff;
extern void Show3dspectrum(void); //axel 2003/12/2 11:31pm
#endif
#define browse_puts() ((void)0)
#define browse_show_function() ((void)0)
#ifdef BROWSE_DBG
#include "sio.h"
#include "emuio.h"
#undef browse_puts
#undef browse_show_function
#define browse_puts puts_w
#define browse_show_function() do {browse_puts(__FUNCTION__); browse_puts("\n");} while (0)
#endif
/////////////////////////////////////////////////////////////////////////
//wanghaoying 2003-8-12 19:50 added
extern void set_video_aspect(void);
extern void startup_vpp_now(void);
extern void set_vpp_disp_window(UINT32,UINT32,UINT32,UINT32);
/////////////////////////////////////////////////////////////////////////
extern UINT16 mp3_file_count(void); //axel 2003/12/2 11:30pm
#ifdef NEWSTYLE_WINDOW //xiongyuyue
BYTE bInputState = NON_INPUT_STATE;
int bInputIndex = 0; //for title/chapter search function,
BYTE bTimeInput = 0;
BYTE update_definition = 40;
extern UINT32 PlayBackLength;
/**************************************************************************
* *
* Function Name: br_Draw8space *
* *
* Purposes: *
* display 8 space *
* Descriptions: *
* display 8 space between left string and right string *
* Arguments: fontColor: display the font's color *
* bkColor : display the background's color *
* index : the string index 0 1 2 3 4 *
* Returns: NONE *
* *
* See also: NONE *
* *
**************************************************************************/
void br_Draw8space(BYTE fontColor,BYTE bkColor,BYTE index)
{//erase displayed word and disp new word when press updown key(for draw left item)
strcpy(linebuf," "); //fengjl changed space from 8 to 12 3-11-24 18:52
osd_DrawRegionString(brArea[BR_ITEM_AREA].xStart,brArea[BR_ITEM_AREA].yStart+ITEM_HEIGHT*index,
linebuf,fontColor,bkColor,arc_region_loc.region);
}
/**************************************************************************
* *
* Function Name: br_Draw18space *
* *
* Purposes: *
* display 18 space *
* Descriptions: *
* display 18 space between left string and right string *
* Arguments: fontColor: display the font's color *
* bkColor : display the background's color *
* index : the string index 0 1 2 3 4 *
* Returns: NONE *
* *
* See also: NONE *
* *
**************************************************************************/
void br_Draw18space(BYTE fontColor,BYTE bkColor,BYTE index)
{//erase displayed word and disp new word when press updown key(for draw right item)
strcpy(linebuf," ");
osd_DrawRegionString(brArea[BR_CONTENT_AREA].xStart,brArea[BR_CONTENT_AREA].yStart+ITEM_HEIGHT*index,
linebuf,fontColor,bkColor,arc_region_loc.region);
}
/**************************************************************************
* *
* Function Name: br_DrawLeftItemStr *
* *
* Purposes: *
* draw the left item string in the gui *
* Descriptions: *
* draw the left item string in the gui *
* Arguments: hl_index:the left item string HL index 0-4 *
* str_index:the left item string index *
* fontColor:display the font's color *
* bkColor: display the background's color *
* Returns: NONE *
* *
* See also: NONE *
* *
**************************************************************************/
void br_DrawLeftItemStr(BYTE hl_index,BYTE str_index,BYTE fontColor,BYTE bkColor)
{
br_Draw8space(fontColor,bkColor,hl_index);//xyy 2003-7-29 17:12
if(cd_type_loaded==CDDVD)
psprintf(linebuf,"%s",_OsdMessegeFont1[osd_font_mode][string_index_dvd[str_index]]);
else if(cd_type_loaded==CDROM || cd_type_loaded==CDDA)
psprintf(linebuf,"%s",_OsdMessegeFont1[osd_font_mode][string_index_cd[str_index]]);
else
psprintf(linebuf,"%s",_OsdMessegeFont1[osd_font_mode][string_index_vcd[str_index]]);
osd_DrawRegionString(brArea[BR_ITEM_AREA].xStart,brArea[BR_ITEM_AREA].yStart+ITEM_HEIGHT*(hl_index),
linebuf,fontColor,bkColor,arc_region_loc.region);
}
/**************************************************************************
* *
* Function Name: browse_HL_leftItem *
* *
* Purposes: *
* browse HL left item *
* Descriptions: *
* browse HL left item according to the index *
* Arguments: index: left item index 0-4 *
* fontColor:display the font's color *
* pre_bkColor:HL's color *
* bkColor:display the background's color *
* UPDN:0 no HL ;1 HL *
* Returns: NONE *
* *
* See also: NONE *
* *
**************************************************************************/
void browse_HL_leftItem(BYTE index,BYTE fontColor,BYTE pre_bkColor,BYTE bkColor,BYTE UPDN)
{
if(UPDN == 0)//when press down key
{
if(index>1)
br_DrawLeftItemStr(index-2,info_index-1,fontColor,pre_bkColor);//xyy 2003-7-29 20:05
br_DrawLeftItemStr(index-1,info_index,fontColor,bkColor);//xyy 2003-7-29 20:05
}
else if(UPDN == 1)//when press up key
{
if(index < ITEM_PER_PAGE)
br_DrawLeftItemStr(index,info_index+1,fontColor,pre_bkColor);//xyy 2003-7-29 20:05
br_DrawLeftItemStr(index-1,info_index,fontColor,bkColor);//xyy 2003-7-29 20:05
}
}
/**************************************************************************
* *
* Function Name: br_Draw_TT_info *
* *
* Purposes: *
* display the title information *
* Descriptions: *
* currently play title/all title *
* Arguments: mmcMode=1:MMC mmcMode=0:SD *
* Returns: NONE *
* *
* See also: NONE *
* *
**************************************************************************/
void br_Draw_TT_info(void)
{
BYTE dvd_title_Ns;
if(cd_type_loaded==CDDVD)
{
dvd_title=get_tt_info(DISP_TT);
dvd_title_Ns = get_tt_info(DISP_TT_Ns);
}
else
{
/*
dvd_title=disp_trk_now;
dvd_title_Ns = cd_total_trk();
*/
dvd_title=disp_trk_now;
if(cd_type_loaded==CDROM)//xyy 2003-9-11 17:12
dvd_title_Ns = mp3_file_count();
else
dvd_title_Ns = cd_total_trk();
}
psprintf(linebuf, "%02d/%02d",dvd_title,dvd_title_Ns);
if(bBrowseLevel==1 && info_index==0)
osd_DrawRegionString(brArea[BR_CONTENT_AREA].xStart,brArea[BR_CONTENT_AREA].yStart,
linebuf,INFO_FONTCOL,INFO_BKCOL,arc_region_loc.region);
else
osd_DrawRegionString(brArea[BR_CONTENT_AREA].xStart,brArea[BR_CONTENT_AREA].yStart,
linebuf,INFO_FONTCOL,INFO_PRE_BKCOL,arc_region_loc.region);
}
/**************************************************************************
* *
* Function Name: br_Draw_CHP_info *
* *
* Purposes: *
* display the chapter information *
* Descriptions: *
* currently play chapter/all chapter *
* Arguments: VOID *
* Returns: NONE *
* *
* See also: NONE *
* *
**************************************************************************/
void br_Draw_CHP_info(void)
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -