?? aphearsay.h
字號(hào):
/****************************************************************************/
/* */
/* Copyright (C) 2005 SHENZHEN MEIJIN CO.LTD */
/* */
/* FILE NAME: ApHearSay.h */
/* MODULE NAME: AP應(yīng)用程序Header */
/* DESCRIPTION: 復(fù)讀機(jī)學(xué)習(xí)AP的函數(shù) Header */
/* */
/* FUNCTIONS: */
/* */
/****************************************************************************/
/* NAME DATE REMARKS */
/* ========== ============ ==============================================*/
/* DennyHan 2006-03-07 First Issue */
/****************************************************************************/
#ifndef _APHEARSAY_H_
#define _APHEARSAY_H_ 1
#define APHS_KEY_A ('A')
#define APHS_KEY_A_EXP (APHS_KEY_A+0x4000)
#define APHS_IFINITE_CYCLE_SET 1
#define APHS_MAX_CYCLE 10
#define APHS_MIN_CYCLE 2
#ifdef APHS_IFINITE_CYCLE_SET
#define APHS_IFINITE_CYCLE (APHS_MAX_CYCLE+1)
#else
#define APHS_IFINITE_CYCLE (APHS_MAX_CYCLE)
#endif
#define APHS_AUTO_INVERT_EN 1
#define APHS_AUTO_KEY_VIEW_DIS 1 // Disable key browser
//==========================================================================
//
// Export function
//
//-----------------------------------
#define APC_HEARSAY_RTNUP 0 // Return last interface
#define APC_HEARSAY_RTNDN 1 // going to next interface
INT ApComHearSay(INT *pRet,const char *pTitle, UINT8 *pFile);
//==========================================================================
// Internal Used
//-----------------------------------
#define APHEARSAY_MAX_PATH (FILE_LENGTH_NAME + 1)
//======================================================
// Hearsayfile.h
//---------------------------------------------------------
#define RR_MODE_MANUAL 1 //手動(dòng)模式
#define RR_MODE_AUTOMATIC 2 //自動(dòng)模式
#define RR_MODE_NOMST 4 //不是MST文件
#define RR_MODE_TEXT 8 //是TXT文件
#define RR_MODE_NOTEXT 16 //不是TXT文件
//MST頭文件結(jié)構(gòu)
typedef struct tagMSTFILE_HEADER
{
UINT32 dwSignature; //文件類型標(biāo)識(shí),必須為"MST\0",即值0x54534D;
UINT16 wHeaderSize; //頭結(jié)構(gòu)大小,必須等于"sizeof(MSTFILE_HEADER)"
UINT16 wReserved1; //MST文件保留字,必須為0
UINT32 dwMp3NameOffs; //對(duì)應(yīng)MP3文件名所在的偏移位置
UINT16 wNodes; //時(shí)間點(diǎn)索引個(gè)數(shù)
UINT16 wReserved2; //MST文件保留字,必須為0
} MSTFILE_HEADER;
// MST文件數(shù)據(jù)結(jié)構(gòu)
typedef struct tagSYNCDATAITEM
{
UINT32 wTime; //本項(xiàng)同步文本對(duì)應(yīng)的起始時(shí)間點(diǎn)
UINT32 wTimeLen; //本項(xiàng)同步文本對(duì)應(yīng)的時(shí)間長(zhǎng)度
UINT32 dwDataOffset; //本項(xiàng)同步文本所在MST文件的偏移位置
} SYNCDATAITEM;
#define APHS_TBUF_SIZE (12+2*(FILE_MAX_NAMELEN + 1))
#define APHS_TEMPBUF_SIZE ((APHS_TBUF_SIZE+sizeof(unsigned)-1 ) \
/(sizeof(unsigned))*(sizeof(unsigned)) )
#define MVOIC_BUFFER ((sizeof(MVoicePlayParam)+3)/4*4)
typedef struct tagPalyS
{
VoiceHandle hPlay; // For Play
BOOL bOpen; // 0= Close, 1 Open
UINT32 dwPlayTm; // For Play Time
UINT32 dwTotalTm; // For Play Time
UINT16 wStep; // For Time Bar step every 0.5S
UINT16 wTotalStep; // For Time Bar total step every 0.5S
UINT32 dwPrevTm; // For Play Time // back for play time for repeat
UINT32 dwCurTm; // For Follow Mode BackUp
}tfsPLAY;
// for Sound Mode
#define APHS_SOUND_NONE 0x00 // Play sound
#define APHS_SOUND_PLAY 0x01 // Play sound
#define APHS_SOUND_PLAYREC 0x02 // Play record
#define APHS_SOUND_REC 0x04 // Record
#define APHS_REPEAT 0x0200 // Repeat
#define APHS_FOLLOW 0x0400 // Follow
#define APHS_JUMP 0x0800 // Jump
#define APHS_REPEAT_OCCUR 0x1000 // Repeat
//------------------------------
// total 168 bytes for this structure
typedef struct tagRrParam //Reread狀態(tài)參數(shù)
{
//-----------------------------------------------------------
// Added by dennyhan
INT nApRet;
const UINT8 *pTitle;
UINT8 *pFile;
UINT uStopCntDelay; /// For bug 2886
//--------------------------------------------------
UINT16 wSndMode;
UINT16 wSavekPevNode; // for browser text node
// if invert is diabled
//--------------------------------------------------
UINT8 *pHint;
UINT16 wHintCnt;
UINT16 wPadding1;
//----------------
UINT16 wSkipMstCnt;
UINT16 wNode;
//--------------------------------------------------
APGUI_STRUCT *pBwrGui;
UINT8 *pTBuf; //[sizeof(UINT8*)]; //[12+FILE_LENGTH_NAME + 1]; // Must be >=INI file Length
//--------------------------------------------------
BOOL bSyncMtlEntry;
//----------------------------------------------------------------
INT hRrMstFile;
INT hTmpFile; // Temp Text File
// Only Mst File and Txt File use the following
UINT uTmpFileBlkTotalNum; // Temp Text File
UINT uTmpFileBlkNum; // Temp Text File
UINT uTmpFileBlkLen; // Temp Text File
UINT uTmpFileLen; // Temp Text File
UINT8 *pTempBlkBuf;
UINT uTempFilePos;
UINT uTmpCurLen;
//-----------------------------------------------------------------
UINT8 *pDispBuf; // it is used file buffer
UINT8 *pTextBuf; // it is used as text display buffer
MSTFILE_HEADER *pMstFileHdr;
UINT8 *pBwrBuf; // for Browser Display Buffer
UINT32 dwDispHead; // Mst display started pointer
UINT32 dwDispLength; // mst display ending pointer
UINT32 dwStLine; // Mst current Node Start Line
UINT32 dwEndLine; // Mst current Node End Line
BOOL bMarkFlag; // for Mark
UINT16 wRptMode; //復(fù)讀狀態(tài)
UINT16 wRptTotalCycles; //復(fù)讀總循環(huán)數(shù)
UINT16 wRptCycles; //當(dāng)前復(fù)讀環(huán)數(shù)
UINT16 wPadding2;
UINT32 dwRptTmA; // Repeat time of A
UINT32 dwRptTmB; // Repeat time of B
BOOL bRpt;
//----------
UINT16 wFollowCycles; //對(duì)比數(shù)
//-------------------------------
UINT16 wTmABSetFlag; //Time of A
#define APHS_TMA_SET 1
#define APHS_TMB_SET 2
#define APHS_TMAB_BAK_SET 4
#define APHS_TMA_KEY_SET 8
UINT32 dwTmA; //Time of A
UINT32 dwTmB; //Time of B
UINT16 wStepA; //Step of A // Temp V
UINT16 wStepB; //Step of B // Temp V
UINT32 dwBakTmA; //Time of A
UINT32 dwBakTmB; //Time of B
//--------------------------------------------------------------
#define APHS_TIMERID 0x4150
#define APHS_TIMER_LEN 500
HTIMER hTimer;
//---------------------------------------------------------------
MRecord *mRecord;
// MVoicePlayParam aPlayParam; // 聲音狀態(tài)
MVoicePlayParam *pPlayParam; // For play param of voice control
tfsPLAY aPlay[2];
}RrParam, *PRRPARAM, HEARSAY,*PHEARSAY;
typedef struct setting
{
// BOOL hFileDir;
BOOL hAuto;
UINT32 hTimes;
} HEARSAYSET,*PHEARSAYSET;
//==================================================================================
//
// AP應(yīng)用程序接口函數(shù)聲明
//
//==================================================================================
//==================================================================================
// init.c
//--------------
BOOL ApHearsayIniParam(VOID); //Allocation memory
//==================================================================================
// init.c
//--------------
BOOL EditSaveSetting(VOID);
BOOL EditLoadSetting(VOID);
BOOL PathSaveSetting(VOID);
BOOL LoadSaveParam (VOID);
BOOL LoadSaveFile (UINT8 *p);
//==================================================================================
// Set.c
//--------------
INT HearSaySetMain(INT nParam);
BOOL EditLoadSetting(VOID);
//=====================================================================
// Ap Heasrsaybar.c
//---------------
#define HEARSAY_BTN_T (BT_TYPE_ICON)
#define HEARSAY_BTN_W 15
#define HEARSAY_BTN_H 18
#define HEARSAY_BTN_W_SP ((LCD_SCREEN_WIDTH)/4-8-HEARSAY_BTN_W)
#define HEARSAY_BTN_TXSP 4
#define HEARSAY_BTN_X 0
#define HEARSAY_BTN_Y (LCD_SCREEN_HEIGHT-AP_STATEBAR_HEIGHT+5) //299)
#define HEARSAY_BTN1_X 8
#define HEARSAY_BTN1_W HEARSAY_BTN_W
#define HEARSAY_BTN1_H HEARSAY_BTN_H
#define HEARSAY_BTN1_Y HEARSAY_BTN_Y
#define HEARSAY_BTN1_T HEARSAY_BTN_T
#define HEARSAY_BTN1_CMD (CM_USER+0)
//#define HEARSAY_BTN1_KEY '1' // Play/Pause
#define HEARSAY_BTN1_KEY 'Q' // Play/Pause
#define HEARSAY_BTN11_KEY 'q' // Play/Pause
#define HEARSAY_BTN2_X 8+55
#define HEARSAY_BTN2_W HEARSAY_BTN_W
#define HEARSAY_BTN2_H HEARSAY_BTN_H
#define HEARSAY_BTN2_Y HEARSAY_BTN_Y
#define HEARSAY_BTN2_T HEARSAY_BTN_T
#define HEARSAY_BTN2_CMD (CM_USER+1)
//#define HEARSAY_BTN2_KEY '2' // Fudu
#define HEARSAY_BTN2_KEY 'W' // Fudu
#define HEARSAY_BTN22_KEY 'w' // Fudu
#define HEARSAY_BTN3_X (HEARSAY_BTN2_X+55)
#define HEARSAY_BTN3_W HEARSAY_BTN_W
#define HEARSAY_BTN3_H HEARSAY_BTN_H
#define HEARSAY_BTN3_Y HEARSAY_BTN_Y
#define HEARSAY_BTN3_T HEARSAY_BTN_T
#define HEARSAY_BTN3_CMD (CM_USER+2)
//#define HEARSAY_BTN3_KEY '3' // Repeat
#define HEARSAY_BTN3_KEY 'E' // Repeat
#define HEARSAY_BTN33_KEY 'e' // Repeat
#define HEARSAY_BTN4_X (HEARSAY_BTN3_X+55)
#define HEARSAY_BTN4_W HEARSAY_BTN_W
#define HEARSAY_BTN4_H HEARSAY_BTN_H
#define HEARSAY_BTN4_Y HEARSAY_BTN_Y
#define HEARSAY_BTN4_T HEARSAY_BTN_T
#define HEARSAY_BTN4_CMD (CM_USER+3)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -