📄 osd_draw_explore.c
字号:
* OUT
* I/O
* Return :
* VOID
* By : Kim Do Yeon
* Description :
* Revision : gaoping 20060406
******************************************************************************
*/
VOID OwUpdateMmpInfo1(VOID)
{
/* Handle Folder Number Highlight Info1 */
if((gOSD_state.etExp_state.etInfo1 == EXPLORER_MODE_INFO1SEARCH)&&(gOSD_state.etInfo_sub == INFO1_MMN_SUB_FOLDER))
SH_GfxChgAreaColor(SH_CANV1,57+35, 8, 125, 30,
OSD_COLOR_FONT_DEFAULT, OSD_COLOR_FONT_HIGHLIGHT);
else
SH_GfxChgAreaColor(SH_CANV1,57+35, 8, 125, 30,
OSD_COLOR_FONT_HIGHLIGHT, OSD_COLOR_FONT_DEFAULT);
/* Handle File Number Highlight Info1 */
if(gOSD_state.etInfo_sub== INFO1_MMN_SUB_FILE)
SH_GfxChgAreaColor(SH_CANV1,217+35, 8, 155, 30,
OSD_COLOR_FONT_DEFAULT, OSD_COLOR_FONT_HIGHLIGHT);
else
SH_GfxChgAreaColor(SH_CANV1,217+35, 8, 155, 30,
OSD_COLOR_FONT_HIGHLIGHT, OSD_COLOR_FONT_DEFAULT);
#if _APP_CAP_FUNC_AUD_TIME_SEARCH // cydrain 20060220
/* Handle time Highlight Info1 */
if(gOSD_state.etInfo_sub== INFO1_MMN_SUB_TIME)
SH_GfxChgAreaColor(SH_CANV1,407+35, 8, 103, 30,
OSD_COLOR_FONT_DEFAULT, OSD_COLOR_FONT_HIGHLIGHT);
else
SH_GfxChgAreaColor(SH_CANV1,407+35, 8, 103, 30,
OSD_COLOR_FONT_HIGHLIGHT, OSD_COLOR_FONT_DEFAULT);
#endif
}
#if _APP_CAP_OSD_FLATTEN_EXPLORER
/******************************************************************************
* Function name : OwMmpUpdateImgInfo
* Arguments :
* IN
* MmpImgInfoSub_et img_info, SH_RotateAngle_et rotate
* OUT
* I/O
* Return :
* VOID
* By : KIM DO YEON
* Description :
* Revision :
******************************************************************************
*/
VOID OwMmpUpdateImgInfo(VOID)
{
MmpImgInfoSub_et img_info;
SH_RotateAngle_et rotate;
CHAR dis_str[MAX_SUPPORT_DYNAMIC_LENGTH];
BYTE2 differ;
img_info = GetMmpImageInfoState();
rotate = GetMmpImageRotate();
differ = img_info - MMP_IMG_INFO_SLIDE1;
switch(img_info)
{
case MMP_IMG_INFO_SLIDE1:
case MMP_IMG_INFO_SLIDE2:
case MMP_IMG_INFO_SLIDE3:
#ifdef _MTK_STYLE
sprintf(dis_str, "%s", (char*)gpSlide[MENU_LANG]);
#else
sprintf(dis_str, "%s %d", (char*)gpSlide[MENU_LANG], (differ+1));
#endif
break;
case MMP_IMG_INFO_ALBUM:
sprintf(dis_str, "%s", (char*)gpAlbum[MENU_LANG]);
break;
case MMP_IMG_INFO_ROTATE:
sprintf(dis_str, "%s %3d", (char*)gpRotate[MENU_LANG], rotate*90);
break;
case MMP_IMG_INFO_ZOOM:
sprintf(dis_str, "%s", (char*)gpZoom[MENU_LANG]);
break;
}
#ifndef _MTK_STYLE
/* Clear the area */
SH_GfxDrawRec(SH_CANV1, 58, 5, 142, 30, COLOR_TRANS_BLUE);
SH_GfxChgAreaColor(SH_CANV1, 200, 5, 60+5*55, 30, COLOR_BROWN, COLOR_BLUE_NORM);
/* Draw the string */
SH_GfxDrawStr(SH_CANV1, dis_str, 58, 5, COLOR_BROWN);
/* Set the icon highlight */
SH_GfxChgAreaColor(SH_CANV1, 200+differ*55, 5, 30, 30, COLOR_BLUE_NORM, COLOR_BROWN);
#else/*_MTK_STYLE */
/* Draw the string */
SH_GfxDrawRec(SH_CANV1, 58, 5, 142, 30, COLOR_TRANS_BLUE);
SH_GfxDrawStr(SH_CANV1, dis_str, 58, 5, NULL );
#endif /*_MTK_STYLE */
}
/******************************************************************************
* Function name : OwMmpDrawImageInfo
* Arguments :
* IN
* VOID
* OUT
* I/O
* Return :
* VOID
* By : KIM DO YEON
* Description :
* Revision :
******************************************************************************
*/
VOID OwMmpDrawImageInfo(VOID)
{
BYTE2 y, h;
/* Set the osd canvas */
y = 32;
h = INFO_OSD_H+30 ;
OwGetOsdCenterPosY(&y);
SH_GfxSetCanvas(SH_CANV1, 80, y, 540, h);
/* Draw Out Line Box */
SH_GfxDrawRec(SH_CANV1, 0, 0, 540, INFO_OSD_H, COLOR_DARK_BLUE);
SH_GfxDrawRec(SH_CANV1, 3, 3, 540-3*2, INFO_OSD_H-3*2, COLOR_TRANS_BLUE);
/* Top icon. */
SH_GfxDrawImage(SH_CANV1, IMG_JPG_INFO, 14, 6);
#ifndef _MTK_STYLE
/* Draw Icons */
SH_GfxDrawImage(SH_CANV1, IMG_INFO_TIME, 200, 6);
SH_GfxDrawImage(SH_CANV1, IMG_INFO_TIME2, 200 + 55, 6);
SH_GfxDrawImage(SH_CANV1, IMG_INFO_TIME3, 200 + 55*2, 6);
SH_GfxDrawImage(SH_CANV1, IMG_VIEW_THUMB, 200 + 55*3, 6);
SH_GfxDrawImage(SH_CANV1, IMG_VIEW_ROTATE, 200 + 55*4, 6);
SH_GfxDrawImage(SH_CANV1, IMG_VIEW_ZOOM, 200 + 55*5, 6);
#endif
/* Update string & icon highlight*/
OwMmpUpdateImgInfo();
/* Show the osd */
SH_GfxShowCanvas(SH_CANV1, TRUE);
}
/******************************************************************************
* Function name : OwMmpImageInfoSelect
* Arguments :
* IN
* VOID
* OUT
* I/O
* Return :
* VOID
* By : Liu renliang
* Description :
* Revision :
******************************************************************************
*/
VOID OwMmpImageInfoSelect()
{
OwMmpUpdateImgInfo();
}
/******************************************************************************
* Function name : OwMmpSetRepeatIcon
* Arguments :
* IN
* VOID
* OUT
* I/O
* Return :
* VOID
* By : Liu renliang
* Description : set the repeat icon in explore info1 window
* Revision :
******************************************************************************
*/
VOID OwMmpSetRepeatIcon(VOID)
{
RepeatSub_et repeat_mode;
BYTE1 repeat_icon;
repeat_mode = GetMmpRepeatMode(TRUE);
if(repeat_mode == REPEAT_SUB_NONE)
{
repeat_mode = GetMmpRepeatMode(FALSE);
}
switch (repeat_mode)
{
case REPEAT_SUB_NONE:
repeat_icon = IMG_RPT_OFF;
break;
case REPEAT_SUB_DISC:
repeat_icon = IMG_RPT_ALL;
break;
case REPEAT_SUB_CHAPTER:
repeat_icon = IMG_RPT_FILE;
break;
case REPEAT_SUB_TITLE:
repeat_icon = IMG_RPT_FOLDER;
break;
case REPEAT_SUB_A:
repeat_icon = IMG_RPT_AB;
break;
case REPEAT_SUB_B:
repeat_icon = IMG_RPT_AB;
break;
default:
return;
}
if(gOSD_state.etExp_state.etInfo1 == EXPLORER_MODE_INFO1HIDE)
return;
SH_GfxDrawImage(SH_CANV1, repeat_icon, 545, 8);
if(OSD_MMP_REPEAT_A_BLINK == COLOR_DARK_GREEN)
SH_GfxChgAreaColor(SH_CANV1,545, 8, 30, 30, OSD_MMP_REPEAT_A_BLINK, COLOR_GREEN); //(weilf)20060621
}
/******************************************************************************
* Function name : OwMmpRepeatInfoSel
* Arguments :
* IN
* RepeatSub_et repeat_pos
* OUT
* I/O
* Return :
* VOID
* By : Kim Do Yeon
* Description : update the mode selection
* Revision : 1.0
******************************************************************************
*/
VOID OwMmpRepeatInfoSel(RepeatSub_et repeat_pos)
{
CHAR dis_str[MAX_SUPPORT_DYNAMIC_LENGTH];
gOSD_state.etRepeat_pos = repeat_pos;
switch(repeat_pos)
{
case REPEAT_SUB_DISC:
strcpy((char *)dis_str, gpAll[MENU_LANG]);
break;
case REPEAT_SUB_TITLE:
strcpy((char *)dis_str, gpFolder[MENU_LANG]);
break;
case REPEAT_SUB_CHAPTER:
strcpy((char *)dis_str, gpFile[MENU_LANG]);
break;
default:
strcpy((char *)dis_str, gpOff[MENU_LANG]);
break;
}/* switch */
SH_GfxDrawRec(SH_CANV1, 8+35, 50, 260, 40, COLOR_TRANS_BLUE);
SH_GfxDrawStr(SH_CANV1, dis_str, 8+35, 56, NULL);
#if _APP_CAP_FUNC_MMN_REPEAT_ALL
if( GetMmpPbMode()!= PARAM_PB_NORMAL )
{
if( repeat_pos == REPEAT_SUB_CHAPTER )
repeat_pos = 2;
}
#endif
SH_GfxChgAreaColor(SH_CANV1, 303 , 56, 206, 30,
COLOR_BROWN, COLOR_BLUE_NORM);
SH_GfxChgAreaColor(SH_CANV1,303 + 50*repeat_pos, 56, 30, 30,
COLOR_BLUE_NORM, COLOR_BROWN);
}
/******************************************************************************
* Function name : OwMmpDrawRepeatInfo
* Arguments :
* IN
* VOID
* OUT
* I/O
* Return :
* VOID
* By : Liu renliang
* Description : draw repeat information in explore info2 window
* Revision : QQ 051026
******************************************************************************
*/
VOID OwMmpDrawRepeatInfo(VOID)
{
SH_GfxDrawRec(SH_CANV1, 2, 50, 616, 40, COLOR_TRANS_BLUE);
SH_GfxDrawImage(SH_CANV1, IMG_RPT, 8, 56);
SH_GfxDrawImage(SH_CANV1, IMG_RPT_OFF, 303, 56);
SH_GfxDrawImage(SH_CANV1, IMG_RPT_ALL, 303 + 50, 56);
#if _APP_CAP_FUNC_MMN_REPEAT_ALL
if( GetMmpPbMode()!= PARAM_PB_NORMAL )
{
SH_GfxDrawImage(SH_CANV1, IMG_RPT_FILE, 303 + 50*2, 56);
}else
#endif
{
SH_GfxDrawImage(SH_CANV1, IMG_RPT_FOLDER, 303 + 50*2, 56);
SH_GfxDrawImage(SH_CANV1, IMG_RPT_FILE, 303 + 50*3, 56);
}
OwMmpRepeatInfoSel(GetMmpRepeatMode(FALSE));
}
/******************************************************************************
* Function name : OwUpdateFileCursor
* Arguments :
* IN BYTE2 old_cursor, BYTE2 new_cursor
*
* OUT
* I/O
* Return :
* BOOL
* By : Kim Do Yeon
* Description :
* Revision :
******************************************************************************/
VOID OwUpdateFileCursor( BYTE2 old_cursor, BYTE2 new_cursor)
{
BYTE2 file_play, file_total, file_pg, play_pg;
BYTE2 folder_play,folder_open;
file_play = GetMmpBgPlay();
file_total = GetMmpTotalFiles();
file_pg = GetMmpFilePage();
folder_play = GetMmpFolderPlay();
folder_open = GetMmpFolderOpen();
play_pg = file_play/MMP_CTRL_PAGE_UNIT_SIZE ;
/* Unhighlihgt */
SH_GfxChgAreaColor(SH_CANV1, 234, 98, 198, 287, OSD_MMP_COLOR_EXP_SELECTED, OSD_COLOR_FONT_DEFAULT);
SH_GfxChgAreaColor(SH_CANV1, 234, 98, 198, 287, OSD_COLOR_FONT_HIGHLIGHT, OSD_COLOR_FONT_DEFAULT);
if(new_cursor == MMP_NO_SELECTION)
{
if(file_pg == play_pg && folder_play==folder_open)
SH_GfxChgAreaColor(SH_CANV1,199+35, 105+34*(file_play % MMP_CTRL_PAGE_UNIT_SIZE), 198, 30,
OSD_COLOR_FONT_DEFAULT, OSD_MMP_COLOR_EXP_SELECTED);
}
else
{
if (folder_open==folder_play)
{
if((file_play != new_cursor) && (play_pg == file_play/MMP_CTRL_PAGE_UNIT_SIZE))
{
if(file_pg == play_pg)
SH_GfxChgAreaColor(SH_CANV1,199+35, 105+34*(file_play%MMP_CTRL_PAGE_UNIT_SIZE), 198, 30,
OSD_COLOR_FONT_DEFAULT, OSD_MMP_COLOR_EXP_SELECTED);
}
}
/* Set for new one */
if(new_cursor < file_total)
{
SH_GfxChgAreaColor(SH_CANV1,199+35, 105+34*(new_cursor % MMP_CTRL_PAGE_UNIT_SIZE), 198, 30,
OSD_COLOR_FONT_DEFAULT, OSD_COLOR_FONT_HIGHLIGHT);
}
}
}
/******************************************************************************
* Function name : OwUpdateAlbumSelectInfo
* Arguments :
* IN
* BYTE2 album_select
* OUT
* I/O
* Return :
* VOID
* By : Kim Do Yeon
* Description :
* Revision :
******************************************************************************
*/
VOID OwUpdateAlbumSelectInfo(BYTE2 album_select)
{
CHAR str_tmp[MMP_PATH_NAME_LENGTH+1];
BYTE1 index;
BYTE2 x, y;
#ifdef _MTK_STYLE //(weilf)20060727
BYTE2 str_x, str_w;
#endif
/* Display selected number in album info OSD */
#if _APP_CAP_FUNC_JPG_PLAY_MODE
BYTE2 total_num;
total_num =GetMmpTotaJpgPrglFiles();
if( total_num ==0)
total_num = GetMmpTotalFiles();
sprintf(str_tmp," %d / %d ", (album_select +1), total_num);
#else
sprintf(str_tmp," %d / %d ", (album_select +1), GetMmpTotalFiles());
#endif
#ifndef _MTK_STYLE
SH_GfxDrawRec(SH_CANV1, 14 + 35, 4, 165, 34, COLOR_TRANS_BLUE);
SH_GfxDrawStr(SH_CANV1, str_tmp, 14 + 35, 7, NULL);
/* Set the selected file name in the album info osd */
MmpGetAlbumFileNameSel(album_select, str_tmp);
#if (!_APP_CAP_OSD_CHINESE_FOLDER_FILENAME)
OwSetVisibleString((UCHAR*)str_tmp);
#endif
SH_GfxDrawRec(SH_CANV1, 265, 4, 312, 34, COLOR_TRANS_BLUE);
#if (!_APP_CAP_OSD_CHINESE_FOLDER_FILENAME)
SH_GfxDrawStr(SH_CANV1, str_tmp, 265, 7, NULL);
#else //_APP_CAP_OSD_CHINESE_FOLDER_FILENAME
SH_GfxDrawSubtitle(SH_CANV1, str_tmp, 265, 7, NULL);
#endif //_APP_CAP_OSD_CHINESE_FOLDER_FILENAME
#else /* _MTK_STYLE */
/* Show cur/total file number. */
SH_GfxGetStrSize((char *)str_tmp , &str_w, NULL);
str_x =580 - str_w -10;
SH_GfxDrawRec(SH_CANV1, 580-250, 4, 250-10, 34, COLOR_TRANS_BLUE);
SH_GfxDrawStr(SH_CANV1, str_tmp, str_x, 7, NULL);
#endif /* _MTK_STYLE */
/* Unhighlight */
SH_GfxChgAreaColor(SH_CANV1, 0, 42, 580, 377-42, OSD_COLOR_HIGHLIGHT, COLOR_DARK_BLUE);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -