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

📄 bookmark.c

📁 M3355的源代码
💻 C
📖 第 1 页 / 共 2 页
字号:
/*****************************************************************************
*  Copyright (C) 2001 Acer Labs, Inc.  All Rights Reserved.
*  File:  ui_BookMark.c
*  Contents:  BookMark process
*  History:
*     Date   By      Reason        Ver.
*   ============ =========    ==========     ======
*   2004.5.18  Maggie Liu    Create it       1.0
*****************************************************************************/
#include <comsub.h>
#include <pe.h>
#include <panel.h>
#include <osd.h>
#include <nv.h>
#include <ui.h>
#include <ui_sub.h>
#include <panel.h>
#include "../../cstm/fend/frntp.h"
//#include "nmnvlib.h"
#include "normal.h"
//#include "nm_func.h"
#include <stdio.h>
#include <stdlib.h>
#include <audio.h>
//#include <fileopen.h>
#include <rscstruc.h>
#include <resource.h>
#include <platform.h>
//#include <filesys.h>
//#if(_SDRAM_MODE==_SDRAM_4M16x1_MODE_)
//#include <picture_cd.h>//cliff 30512-01cf for make the behavier(rotate and mirror) of JPG and PICTURECD same
//#endif
//#include <setupfunc.h>
//20021115 Tom Yang for perhibit KEY_SETUP start
//#include <atapi.h>
//#include <vobu.h>

#include "uiosd.h"
#include "NMOSD.h"
#include "../FileopenMenu/MediaPlayerOutlook.h"

typedef BYTE t_Domain;
extern t_Domain CurrentDomain;

/********************************************************************/
/*    BookMark Sub-function           */
/********************************************************************/
void UiSubFuncBMarkInit(void)
{
    g_UiCrntSubFunc = UI_SUBFUNC_BMARK;
    ClearRectArea(gui_hdc, GUITYPE_MODEGUI);
    SetTimer(OSD6_TM_ID, ModeOSDOff, INFINITETIME);
    NextPrevStatus=0;
    ShowMarkSearch( BOOKMARK_OSD_INIT );
    SetTimer(OSD5_TM_ID, BookMarkTimer, TIME_10SEC);
}

BYTE UiSubFuncBMarkProc(WORD MsgType, DWORD MsgInput)
{
    switch (MsgType)
    {
    case C_FP_KEY:
        return BMarkRespondFPKey(MsgInput);
    case C_TIMER_ACTIVE:
        return BMarkRespondTimer(MsgInput);
    case C_NV_NOTICE:
        return BMarkRespondNVNotice(MsgInput);
    default:
        return UI_NOUSE_FUNC_MSG;
    }
}

extern void RecoverMuteIcon();
void (*ptr_RecoverMuteIcon)();

extern BOOL GetMuteVolumeStatus();
BOOL (*ptr_GetMuteVolumeStatus)();

BYTE BMarkRespondFPKey(DWORD iKey)
{
    DWORD dwTemp;
    WORD pos;
    int i;
     PLAYPOINT  tempPoint;

    switch (iKey)
    {
    case V_KEY_CLEAR:
        pos = ShowMarkSearch( BOOKMARK_OSD_CLEAR );
        SetTimer(OSD5_TM_ID, BookMarkTimer, TIME_10SEC);
        if ( !Bookmark( pos, BOOKMARK_CLEAR ) )
        {
            ClearRectArea(gui_hdc, GUITYPE_MODEGUI);
            g_UiCrntSubFunc = UI_SUBFUNC_BASAL;
           // if ( DiscType == C_CDDA || DiscType == C_HDCDDA)
             //   CmdUIMsg( C_FP_KEY, C_KEY_CONSOLE );
        }
        break;
    case V_KEY_0:
    case V_KEY_1:
    case V_KEY_2:
    case V_KEY_3:
    case V_KEY_4:
    case V_KEY_5:
    case V_KEY_6:
    case V_KEY_7:
    case V_KEY_8:
    case V_KEY_9:
    	pos = iKey - V_KEY_0;
    	//bond add on 031016
         if (UiBookMark[pos].bPlayEnable)
        {
          ShowMarkSearch(pos+BOOKMARK_OSD_NUMBER0);
          SetTimer(OSD5_TM_ID, BookMarkTimer, TIME_10SEC);
    	 }
    	 else
    	   return UI_NOT_FUNC_KEY;
         //>>
        if ( Bookmark( pos, BOOKMARK_PLAY ) )
        {

	     if(g_UiPlaybackRepeatRange == UI_PLAYBACKRANGE_REPEATAB)	
	     {
	      		if(UiBookMark[pos].PlayInfo.dwLBAAddr<PBInfo[REPEATAB_SMALL].dwLBAAddr ||UiBookMark[pos].PlayInfo.dwLBAAddr>PBInfo[REPEATAB_BIG].dwLBAAddr)
		  	{
		  		RepeatAB_Counter = REPEAT_AB_OFF;
		  		UiClearPlaybckMd();	
		  	}
	      }
	      //<<bond add for la bug: 1928 031014
            if(g_UiPlaybackRepeatRange==UI_PLAYBACKRANGE_REPEATONE)
            {
               //added by jane 
                 if (IsInsideChapter(&UiBookMark[pos].PlayInfo)==FALSE)
            	   	UiClearPlaybckMd();
                 NVGetCurInfo(&tempPoint);//bond add for la bug: 1928 031014
                 if(UiBookMark[pos].PlayInfo.wTTN!=tempPoint.wTTN)
		  		{
		  			UiClearPlaybckMd();	
		  		}
            }
            SendVFDPart1Show();
           // if ( DiscType == C_CDDA || DiscType == C_HDCDDA)
            //    CmdUIMsg( C_FP_KEY, C_KEY_CONSOLE );
        }
        else
            return UI_NOT_FUNC_KEY;
        break;
    case V_KEY_ENTER:
    case V_KEY_PLAY:
    	 if(g_UiCoreState==UI_CORE_PAUSE && iKey==V_KEY_PLAY)
    	 {
				g_UiCoreState=UI_CORE_PLAY;
				bActionCtl=0;
				NVPlayModeChg(C_NV_Play,0);
              ShowPlayModeGui(RS_FUN_OSD_PLAY, MSG_NULL );
              return UI_IS_FUNC_MSG;
    	 }
        pos = ShowMarkSearch( BOOKMARK_OSD_PLAY );
        SetTimer(OSD5_TM_ID, BookMarkTimer, TIME_10SEC);  //bond add for la bug:1532. 031011.
        if ( Bookmark( pos, BOOKMARK_PLAY ) )
        {
	     if(g_UiPlaybackRepeatRange == UI_PLAYBACKRANGE_REPEATAB)	
	     {
	      		if(IsInsideAB(&UiBookMark[pos].PlayInfo)==FALSE)
		  	{
		  		RepeatAB_Counter = REPEAT_AB_OFF;
		  		PlaybackModeChangeSuccess(UI_PLAYBACKRANGE_REPEATNONE,g_UiPlaybackMethod);
				
		  	}
	      }
	     //<<bond add for la bug: 1928 031014
            if(g_UiPlaybackRepeatRange==UI_PLAYBACKRANGE_REPEATONE)
            {       //added by jane
            	   if (IsInsideChapter(&UiBookMark[pos].PlayInfo)==FALSE)
            	   		UiClearPlaybckMd();
                 	NVGetCurInfo(&tempPoint);//bond add for la bug: 1928 031014
                 	if(UiBookMark[pos].PlayInfo.wTTN!=tempPoint.wTTN)
		  				UiClearPlaybckMd();	
            }
            SendVFDPart1Show();
            //if ( DiscType == C_CDDA || DiscType == C_HDCDDA)
              //  CmdUIMsg( C_FP_KEY, C_KEY_CONSOLE );
        }
        else
            return UI_NOUSE_FUNC_MSG;
        break;
#if 0//maggie for cancel
    case V_KEY_FILEOPEN:
        if (g_UiCrntSubFunc == UI_SUBFUNC_BMARK)
        {
            ClearRectArea(gui_hdc, GUITYPE_MODEGUI);
            SetTimer(OSD5_TM_ID, BookMarkTimer, INFINITETIME);
        }
        for (i = 0;i <= MAXMARKNUMBER;i++)
            Bookmark(i, BOOKMARK_CLEAR); /* clear data */
        ShowMarkSearch(BOOKMARK_OSD_RESET); /* reset OSD */
        return UI_NOUSE_FUNC_MSG;
#endif//maggie for cancel
    case V_KEY_TMSCR: //V_KEY_BOOKMARK:
        ClearRectArea(gui_hdc, GUITYPE_MODEGUI);
        SetTimer(OSD5_TM_ID, BookMarkTimer, INFINITETIME);
         //<<bond added it for bug 2191 031025
        if(RepeatAB_Counter==REPEAT_AB_A)
        	 ShowModeGui(MSG_REPEAT_A,0,0);
	//>>
      //RecoverOsdIcon();//bond add for bug 2191. 031024
        //David: Console+Zoom
	if(gZoomFuncPlus == TRUE)
	{
	      g_UiCrntSubFunc = UI_SUBFUNC_ZOOM;
	      gZoomFuncPlus = FALSE;
	}
	else
        g_UiCrntSubFunc = UI_SUBFUNC_BASAL;
#ifdef _MUTE_ENABLE_
		ptr_GetMuteVolumeStatus = GetMuteVolumeStatus;
		if((*ptr_GetMuteVolumeStatus)() == MUTEVOLUME_STATUS_MUTE)
		{
//			RecoverMuteIcon();
			ptr_RecoverMuteIcon=RecoverMuteIcon;
			(*ptr_RecoverMuteIcon)();
		}
#endif
        break;

    case V_KEY_OPEN:
        if ( g_UiCrntSubFunc == UI_SUBFUNC_BMARK )
        {
            ClearRectArea(gui_hdc, GUITYPE_MODEGUI);
            SetTimer(OSD5_TM_ID, BookMarkTimer, INFINITETIME);
        }
        for ( i = 0;i <= MAXMARKNUMBER;i++ )
            Bookmark( i, BOOKMARK_CLEAR );
        return UI_IS_FUNC_MSG;

    case V_KEY_VOLUM:
        if(SYSOption.bDTS == C_OFF)
	    {
	    	if(g_UiCoreState != UI_CORE_STOP &&( AudioType == C_DTS || AudioType == C_DTS_CD_AUDIO))
	    	{
	            ShowDiscInfo( MSG_INVALID, MSG_NULL );

	    		return UI_NOUSE_FUNC_MSG;
	    	}
	    }
        ClearRectArea(gui_hdc, GUITYPE_MODEGUI);
        SetTimer(OSD5_TM_ID, BookMarkTimer, INFINITETIME);
        g_UiCrntSubFunc = UI_SUBFUNC_BASAL;
        return UI_NOUSE_FUNC_MSG;

   // case V_KEY_CONSOLE:
    case V_KEY_SEARCH:
    //case V_KEY_ZOOM:
    case V_KEY_SETUP:
    case V_KEY_NEXT:
    case V_KEY_PREV:
    case V_KEY_STOP:
    case V_KEY_BOOKMARK:
    case V_KEY_VOICE:
        ClearRectArea(gui_hdc, GUITYPE_MODEGUI);
        SetTimer(OSD5_TM_ID, BookMarkTimer, INFINITETIME);
        g_UiCrntSubFunc = UI_SUBFUNC_BASAL;
        return UI_NOUSE_FUNC_MSG;
    //David: Console+Zoom		
    case V_KEY_ZOOM:
	    if (g_UiCoreState != UI_CORE_STOP)
	    {
			if(gZoomFuncPlus == TRUE)
			{

⌨️ 快捷键说明

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