📄 key_handler_mmp.c
字号:
#endif
/* Get the current page number */
page_num = album_index/MMP_ALBUM_PAGE_UNIT_SIZE;
/* non-available move */
if(((move < 0) && (album_index < (-move))) || ( (move > 0) && ((album_index + move) >= total_num)))
{
MmpShowNotAvail();
return;
}
album_index += move;
if(page_num == (album_index/MMP_ALBUM_PAGE_UNIT_SIZE))
UiMmpUpdateAlbumSelect(album_index);
else
UiMmpDrawAlbum(album_index, MMP_ALBUM_DRAWN_BEFORE);
SetMmpFileCursor(album_index);
}
/******************************************************************************
* Function name : MmpGuiAlbumReturn
* Arguments :
* IN
* VOID
* OUT
* I/O
* Return : VOID
*
* By : Kim Do Yeon
* Description :
* Revision :
******************************************************************************
*/
VOID MmpGuiAlbumReturn(VOID)
{
BYTE2 cursor;
//BYTE1 play_status; // cydrain 20060228
//gaoping 20060216 when go to album mode is normal
#if 0//_APP_CAP_FUNC_JPG_PLAY_MODE
play_status=gpstMmp_ctrl->epstImg_play->ecPlay_status;
MmpClearImageCmd();
cursor = GetMmpAlbumSelect();
if (play_status == PARAM_PB_PROGRAM)
{
BYTE2 folder;
gpstMmp_ctrl->epstPgm_image->cur_index = cursor;
folder =gpstMmp_ctrl->epstPgm_image->folder[cursor];
if (folder!=GetMmpFolderOpen())
MmpPgmPlay(cursor, MMP_DIR_OPEN);
cursor = gpstMmp_ctrl->epstPgm_image->file[cursor];
}
SetMmpFileCursor(cursor);
SetMmpFilePage(cursor/MMP_CTRL_PAGE_UNIT_SIZE);
#else /* _APP_CAP_FUNC_JPG_PLAY_MODE */
MmpClearImageCmd();
cursor = GetMmpAlbumSelect();
SetMmpFileCursor(cursor);
SetMmpFilePage(cursor/MMP_CTRL_PAGE_UNIT_SIZE);
#endif /* _APP_CAP_FUNC_JPG_PLAY_MODE */
if(GetMmpDispSync()== MMP_DSP_IMG_PLAY)
SetMainState(MAIN_STOP);
MmpShowExplore();
}
/******************************************************************************
* Function name : MmpSetCurFolderPage
* Arguments :
* IN
* BOOL set_cursor
* OUT
* I/O
* Return : STATIC VOID
*
* By : Kim Do Yeon
* Description :
* Revision :
******************************************************************************
*/
STATIC VOID MmpSetCurFolderPage(BOOL set_cursor)
{
BYTE2 open_folder, open_page, folder_page, folder_cursor;
folder_cursor = GetMmpFolderCursor();
open_folder = GetMmpFolderOpen();
if(set_cursor)
{
open_page = open_folder/MMP_CTRL_PAGE_UNIT_SIZE;
folder_page = GetMmpFolderPage();
if(open_page != folder_page)
{
MmpShowDrawFolderPage(open_page);
SetMmpFolderPage(open_page);
}
/* Update Selection */
MmpShowUpdateFolderSel(open_folder, open_folder);
SetMmpFolderSel( open_folder );
MmpShowExploreInfo2UpdateFilePath(open_folder, MMP_NO_SELECTION);
}
else
{
open_folder = MMP_NO_SELECTION;
}
/* Update Cursor */
MmpShowUpdateFolderCursor(folder_cursor, open_folder);
SetMmpFolderCursor(open_folder);
}
/******************************************************************************
* Function name : MmpSetCurFilePage
* Arguments :
* IN
* BOOL set_cursor
* OUT
* I/O
* Return : STATIC VOID
*
* By : Kim Do Yeon
* Description :
* Revision :
******************************************************************************
*/
STATIC VOID MmpSetCurFilePage(BOOL set_cursor)
{
BYTE2 file_cursor, open_folder, play_folder, file_play;
open_folder = GetMmpFolderOpen();
play_folder = GetMmpFolderPlay();
file_cursor = GetMmpFileCursor();
if(set_cursor)
{
BYTE2 file_page, new_cursor;
file_page = GetMmpFilePage();
file_play = GetMmpBgPlay();
/* Move cursor to the selected item */
if(IsBgPlay() && (open_folder == play_folder))
{
BYTE2 select_page;
select_page = file_play/MMP_CTRL_PAGE_UNIT_SIZE;
//gaoping 051115AM
//if(file_page != select_page)
{
MmpShowDrawFilePage(select_page);
//SetMmpFilePage(select_page);
}
SetMmpFileSel(file_play);
//gaoping 051114AM press left key , the file path is error
new_cursor=file_play;
}
else
{
#if MMP_SUPPORT_JPG_RESUME_STOP
if((GetMmpFileType() == MMP_IMAGE_FILE)&& file_play!=MMP_NO_SELECTION)
new_cursor= file_play;
else
#endif
new_cursor = file_page*MMP_CTRL_PAGE_UNIT_SIZE;
if(GetMmpFileType() == MMP_IMAGE_FILE)
UiMmpDrawImagePreview(new_cursor, PIC_ROTATE_ANGLE_0);
file_play = new_cursor;
}
MmpShowExploreInfo2UpdateFilePath(open_folder, new_cursor);
#if _APP_CAP_PERI_VFD
SetVfdJpegNumber(file_cursor +1);
#endif
}
else
{
SetMmpFilePage(file_cursor/MMP_CTRL_PAGE_UNIT_SIZE);
file_play = MMP_NO_SELECTION;
#if _APP_CAP_FUNC_JPEG_PLAY
if(GetMmpFileType() == MMP_IMAGE_FILE)
UiCmdGeneral(UOP_MMP_CLEAR_PREVIEW);
#endif /* _APP_CAP_FUNC_JPEG_PLAY */
}
MmpShowUpdateFileCursor(file_cursor, file_play);
SetMmpFileCursor(file_play);
file_cursor = GetMmpFileCursor();
MmpUpdateFileInfo(file_cursor);
}
/******************************************************************************
* Function name : MmpSetCurBtn
* Arguments :
* IN
* BOOL set_cursor
* OUT
* I/O
* Return : STATIC VOID
*
* By : Kim Do Yeon
* Description :
* Revision :
******************************************************************************
*/
STATIC VOID MmpSetCurBtn(BOOL set_cursor)
{
if(set_cursor)
{
gpstMmp_ui->mmp_osd_info.file_type_new = GetMmpFileType();
gpstMmp_ui->mmp_osd_info.file_type_old = MMP_NOT_KNOWN;
MmpShowUpdateTypeSelect(gpstMmp_ui->mmp_osd_info.file_type_old, gpstMmp_ui->mmp_osd_info.file_type_new);
gpstMmp_ui->mmp_osd_info.file_type_old = gpstMmp_ui->mmp_osd_info.file_type_new;
MmpShowExploreInfo2UpdateFilePath(MMP_NO_SELECTION, MMP_NO_SELECTION);
}
else
{
/* Unhighlight Button Area */
gpstMmp_ui->mmp_osd_info.file_type_new = MMP_NOT_KNOWN;
MmpShowUpdateTypeSelect(gpstMmp_ui->mmp_osd_info.file_type_old, gpstMmp_ui->mmp_osd_info.file_type_new);
gpstMmp_ui->mmp_osd_info.file_type_old = gpstMmp_ui->mmp_osd_info.file_type_new;
}
}
/******************************************************************************
* Function name : MmpGuiExploreLeft
* Arguments :
* IN
* VOID
* OUT
* I/O
* Return : STATIC VOID
*
* By : Kim Do Yeon
* Description :
* Revision :
******************************************************************************
*/
STATIC VOID MmpGuiExploreLeft(VOID)
{
OSD_State_st *osd_state;
osd_state = OSD_GetState();
switch (osd_state->etExp_state.etCtrl_focus)
{
case EXPLORER_SUB_FILE:
OSD_ChangeExplore(OSD_CTRL_EXPLORE_TO_FOLDER, NULL, SYS_WAIT);
MmpSetCurFilePage(FALSE);
MmpSetCurFolderPage(TRUE);
break;
case EXPLORER_SUB_TYPE_SELECT:
OSD_ChangeExplore(OSD_CTRL_EXPLORE_TO_FILE, NULL, SYS_WAIT);
MmpSetCurBtn(FALSE);
MmpSetCurFilePage(TRUE);
break;
case EXPLORER_SUB_FOLDER:
OSD_ChangeExplore(OSD_CTRL_EXPLORE_TO_TYPE_SEL, NULL, SYS_WAIT);
MmpSetCurFolderPage(FALSE);
MmpSetCurBtn(TRUE);
break;
default:
break;
}/* switch */
#if !_APP_CAP_NAV_MMP_PLAY_VIDEO_FILE
MmpShowUpdateArrow();
#endif
}
/******************************************************************************
* Function name : MmpGuiExploreRight
* Arguments :
* IN
* VOID
* OUT
* I/O
* Return : STATIC VOID
*
* By : Kim Do Yeon
* Description :
* Revision :
******************************************************************************
*/
STATIC VOID MmpGuiExploreRight(VOID)
{
OSD_State_st *osd_state;
osd_state = OSD_GetState();
switch (osd_state->etExp_state.etCtrl_focus)
{
case EXPLORER_SUB_FILE:
OSD_ChangeExplore(OSD_CTRL_EXPLORE_TO_TYPE_SEL, NULL, SYS_WAIT);
MmpSetCurFilePage(FALSE);
MmpSetCurBtn(TRUE);
break;
case EXPLORER_SUB_TYPE_SELECT:
OSD_ChangeExplore(OSD_CTRL_EXPLORE_TO_FOLDER, NULL, SYS_WAIT);
MmpSetCurBtn(FALSE);
MmpSetCurFolderPage(TRUE);
break;
case EXPLORER_SUB_FOLDER:
OSD_ChangeExplore(OSD_CTRL_EXPLORE_TO_FILE, NULL, SYS_WAIT);
MmpSetCurFolderPage(FALSE);
MmpSetCurFilePage(TRUE);
break;
default:
break;
}/* switch */
#if !_APP_CAP_NAV_MMP_PLAY_VIDEO_FILE
MmpShowUpdateArrow();
#endif
}
#if _APP_CAP_OSD_DUALMONO_BAR
/******************************************************************************
* Function name : MmpGuiDualMono (Non_Flattern)
* Arguments :
* IN
* VOID
* OUT
* I/O
* Return : STATIC VOID
*
* By : QQ
* Description :
* Revision :
******************************************************************************
*/
STATIC VOID MmpGuiDualMono(VOID)
{
SetMainState_t main = GetMainState();
char str[15];
MmpNoticeType_et noticetype = GetMmpNoticeType();
S5H_DualMode_t dualmono;
GetDualMonoState( &dualmono );
if( main != MAIN_PLAY || GetMmpFileType() != MMP_AUDIO_FILE)
{
MmpShowNotAvail();
return;
}
if(noticetype == MMP_NOTICE_DUALMONO)
{
dualmono = GuiSelRight( dualmono , 0 , DUALMODE_MIXED_MONO );
SetDualMonoState( dualmono );
}
sprintf( str ,"%s" , gAudio_Dual_Mono[MENU_LANG][dualmono]);
MmpShowNoticeString(MMP_NOTICE_DUALMONO, str);
}
#endif/*_SUPPORT_DUALMONO_BAR*/
/******************************************************************************
* Function name : MmpUpdateFolderCursor
* Arguments :
* IN
* BYTE2 folder_index
* OUT
* I/O
* Return : STATIC VOID
*
* By : Kim Do Yeon
* Description :
* Revision :
******************************************************************************
*/
STATIC VOID MmpUpdateFolderCursor(BYTE2 folder_index)
{
BYTE2 cur_page, folder_page, open_page, open_folder, folder_cursor;
folder_cursor = GetMmpFolderCursor();
cur_page = folder_cursor/MMP_CTRL_PAGE_UNIT_SIZE;
folder_page = folder_index/MMP_CTRL_PAGE_UNIT_SIZE;
open_folder = GetMmpFolderOpen();
open_page = open_folder/MMP_CTRL_PAGE_UNIT_SIZE;
if(cur_page != folder_page)
{
// [bug 2381] move the cursor to the last folder or first folder in folder area, the arrow is not correct.
SetMmpFolderPage(folder_page); // cydrain 20051208, change the order.
MmpShowDrawFolderPage(folder_page);
if(open_folder/MMP_CTRL_PAGE_UNIT_SIZE == folder_page)
MmpShowUpdateFolderSel(MMP_NO_SELECTION, open_folder);
folder_cursor = MMP_NO_SELECTION;
}
MmpShowUpdateFolderCursor(folder_cursor, folder_index);
SetMmpFolderCursor(folder_index);
MmpShowExploreInfo2UpdateFilePath(folder_index, MMP_NO_SELECTION);
}
/******************************************************************************
* Function name : MmpGuiExploreUpDn
* Arguments :
* IN
* UCHAR key
* OUT
* I/O
* Return : STATIC VOID
*
* By : Kim Do Yeon
* Description :
* Revision :
******************************************************************************
*/
STATIC VOID MmpGuiExploreUpDn(UCHAR key)
{
BYTE2 folder_cursor, file_cursor, open_folder, file_limit, folder_limit;
SCHAR move;
OSD_State_st *osd_state;
osd_state = OSD_GetState();
if(key == RC_KEY_UP)
{
file_limit = folder_limit = 0;
move = -1;
}
else /* RC_KEY_DOWN */
{
file_limit = GetMmpTotalFiles()-1;
folder_limit = GetMmpTotalFolders()-1;
move = 1;
}
file_cursor = GetMmpFileCursor();
folder_cursor = GetMmpFolderCursor();
open_folder = GetMmpFolderOpen();
switch (osd_state->etExp_state.etCtrl_focus)
{
case EXPLORER_SUB_FILE:
if(file_cursor == file_limit)
MmpShowNotAvail();
else
{
file_cursor += move;
//gaoping 20060403
//MmpExpSetPlay(open_folder, file_cursor, MMP_DIR_NONE);
if(GetMmpFileType() == MMP_IMAGE_FILE)
{
UiMmpDelayedPlay(file_cursor);
#if MMP_SUPPORT_JPG_RESUME_STOP
if (gpstMmp_ctrl->etStop_mode==MMP_RESUME_STOP && GetMmpFileType() == MMP_IMAGE_FILE) // cydrain 20060121
{
MmpResumeStopRecover();
}
#endif
}
//gaoping 20060403
MmpExpSetPlay(open_folder, file_cursor, MMP_DIR_NONE);
//gaoping 051115PM
#if 0
MmpUpdateFileInfo(file_cursor);
MmpShowExploreInfo2UpdateFilePath(open_folder, file_cursor);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -