?? cmscps_interface.h
字號(hào):
/* $ID:CmsCps_interface.h V1.0 2004/05/17 */
/************************************************************************
*
* FILE: CmsCps_interface.h
*
* MODULE: MMS
*
* PURPOSE: Define the macro,struct and apis used by the mms UI designer.
*
* AUTHOR(S): XiaoLin Xiao
*
* GROUP: TERMINAL
*
* DATE CREATED:2004/05/18
*
* REFERENCE DOCUMENT ID:
*
* MODIFICATIONS:
* Date user Name Description
* 2004/05/18 XiaoLin Xiao Create this file
*************************************************************************/
#ifndef _CmsCPS_INTERFACE_H
#define _CmsCPS_INTERFACE_H
#include "sysTypes.h"
#include "mmimpeg4.h"
#include "Cms_MMSDoc.h"
/* Error number */
#define COMPOSER_SUCCESS 0 /* 操作成功 */
#define COMPOSER_MEMERY_ALLOC_FAIL -1 /* 內(nèi)存分配失敗 */
#define COMPOSER_MODULE_IS_USING -2 /* 模塊正處于編輯模式 */
#define COMPOSER_MEDIA_HAS_EXIST -3 /* 資源已經(jīng)存在 */
#define COMPOSER_MEDIA_EXIST_VIDEO -4 /* 已經(jīng)存在視頻 */
#define COMPOSER_MEDIA_EXIST_IMG_AUD -5 /* 已經(jīng)存在聲音和圖像*/
#define COMPOSER_REACH_MAX_SLIDE -6 /* 已經(jīng)達(dá)到了最大slide */
#define COMPOSER_JUST_ONE_EMPTY_SLIDE -7 /* 當(dāng)前只剩唯一空白頁 */
#define COMPOSER_MEDIA_NOT_EXIST -8 /* 資源不存在 */
#define COMPOSER_GOTO_THE_END -9 /* 已到了最后頁面 */
#define COMPOSER_GOTO_THE_FIRST -10 /* 已到第一個(gè)頁面 */
#define COMPOSER_GLOBE_VAR_ERROR -11 /* 內(nèi)部全局變量錯(cuò)誤 */
#define COMPOSER_INPUT_PARAM_ERROR -12 /* 函數(shù)參數(shù)錯(cuò)誤 */
#define COMPOSER_CURRENT_SLIDE_NOT_EXIST -13 /* 當(dāng)前slide不存在 */
#define COMPOSER_UNKNOWN_ERROR -16 /* 不確定錯(cuò)誤 */
/* image content type macros */
#define COMPOSER_IMAGE_GIF "image/gif"
#define COMPOSER_IMAGE_JPEG "image/jpeg"
#define COMPOSER_IMAGE_PNG "image/png"
#define COMPOSER_IMAGE_WBMP "image/vnd.wap.wbmp"
#define COMPOSER_IMAGE_BMP "image/bmp"
/* audio content type macros */
#define COMPOSER_AUDIO_WAV "audio/wav"
#define COMPOSER_AUDIO_IMELODY "audio/imelody"
#define COMPOSER_AUDIO_MIDI "audio/midi"
#define COMPOSER_AUDIO_AMR "audio/amr"
#define COMPOSER_AUDIO_MP3 "audio/mp3"
/* video content type macros */
#define COMPOSER_VIDEO_MPEG "video/mpeg"
#ifdef __cplusplus
extern "C" {
#endif /*end of __cplusplus*/
/* 顯示矩形區(qū)域結(jié)構(gòu) */ /*record display position */
typedef struct T_Composer_Rectangle_tag{
T_WORD x; /*x start coordinate of screen*/
T_WORD y; /*y start coordinate of screen*/
T_WORD width; /*width of display position*/
T_WORD height; /*height of display postion*/
}T_Composer_Rectangle;
/*插入圖片的資源信息*/
typedef struct T_Composer_Image{
T_UBYTE* ImgBuf; /*image data*/
T_CHAR* Type; /*image type*/
T_WORD begin; /*begin time of image display*/
T_WORD end; /*end time of image display*/
T_WORD size; /*size of image data*/
T_Composer_Rectangle region; /* image's region */
}T_Composer_Image;
/*插入文本的資源信息*/
typedef struct T_Composer_Text{
T_UBYTE* TxtBuf; /*text data*/
T_WORD begin; /*begin time of text show*/
T_WORD end; /*end time of text show*/
T_WORD size; /* the size of the text content */
T_Composer_Rectangle region; /* text's region */
}T_Composer_Text;
/*插入聲音資源信息*/
typedef struct T_Composer_Audio{
T_UBYTE* AudBuf; /*audio data buffer*/
T_CHAR *Type; /* audio type */
T_WORD begin; /*begin time of audio play*/
T_WORD end; /*end time of audio play*/
T_WORD size; /*size of audio data*/
}T_Composer_Audio;
/*插入聲音資源信息*/
typedef struct T_Composer_Video{
T_UBYTE* VidBuf; /*video data buffer*/
MMIMPEG4_TYPE_E Type; /* video type */
T_WORD begin; /*begin time of video play*/
T_WORD end; /*end time of video play*/
T_WORD size; /*size of video data*/
T_Composer_Rectangle region; /* video's region */
}T_Composer_Video;
#if 0 //haiyang for wap2.0
/* 顯示矩形區(qū)域結(jié)構(gòu) */
typedef struct{ /*record display position */
T_WORD x; /*x start coordinate of screen*/
T_WORD y;/*y start coordinate of screen*/
T_WORD width; /*width of display position*/
T_WORD height; /*height of display postion*/
}T_Composer_Rectangle;
/*插入圖片的資源信息*/
typedef struct T_Composer_Image{
T_UBYTE* ImgBuf; /*image data*/
T_CHAR* Type; /*image type*/
T_WORD begin; /*begin time of image display*/
T_WORD end; /*end time of image display*/
T_WORD size; /*size of image data*/
T_Composer_Rectangle region; /* image's region */
}T_Composer_Image;
/*插入文本的資源信息*/
typedef struct T_Composer_Text{
T_UBYTE* TxtBuf; /*text data*/
T_WORD begin; /*begin time of text show*/
T_WORD end; /*end time of text show*/
T_WORD size; /* the size of the text content */
T_Composer_Rectangle region; /* text's region */
}T_Composer_Text;
/*插入聲音資源信息*/
typedef struct T_Composer_Audio{
T_UBYTE* AudBuf; /*audio data buffer*/
T_CHAR *Type; /* audio type */
T_WORD begin; /*begin time of audio play*/
T_WORD end; /*end time of audio play*/
T_WORD size; /*size of audio data*/
}T_Composer_Audio;
/*插入聲音資源信息*/
typedef struct T_Composer_Video{
T_UBYTE* VidBuf; /*video data buffer*/
T_CHAR *Type; /* video type */
T_WORD begin; /*begin time of video play*/
T_WORD end; /*end time of video play*/
T_WORD size; /*size of video data*/
T_Composer_Rectangle region; /* video's region */
}T_Composer_Video;
#endif
/*=============================================================================
* API Defines
*=============================================================================*/
/* 新建彩信 */
T_WORD fnCPS_NewMms(T_VOID);
/* 再編輯彩信 */
T_WORD fnCPS_ReEditMms(T_UBYTE*Pdu,T_WORD Size);
/* 退出編輯模塊 */
T_VOID fnCPS_Quit (T_VOID);
/* 檢查當(dāng)前頁面是否包含圖像 */
T_BOOL fnCPS_CurImageExist(T_VOID);
/* 檢查當(dāng)前頁面是否包含文本 */
T_BOOL fnCPS_CurTextExist(T_VOID);
/* 檢查當(dāng)前頁面是否包含音樂 */
T_BOOL fnCPS_CurAudioExist(T_VOID);
/* 檢查當(dāng)前頁面是否包含視頻 */
T_BOOL fnCPS_CurVideoExist(T_VOID);
/* 在當(dāng)前頁添加圖像 */
T_WORD fnCPS_AddImage(T_Composer_Image*Image,pMMS_EDocument p_cur_doc);
/* 在當(dāng)前頁添加文本 */
T_WORD fnCPS_AddText(T_Composer_Text*Text);
/* 在當(dāng)前頁添加音樂 */
T_WORD fnCPS_AddAudio(T_Composer_Audio*Audio,pMMS_EDocument p_cur_doc);
/* 在當(dāng)前頁添加視頻 */
T_WORD fnCPS_AddVideo(T_Composer_Video*Video,pMMS_EDocument p_cur_doc);
/* 在當(dāng)前頁后面添加新的空白頁面 */
T_WORD fnCPS_AddSlide (T_VOID);
/* 設(shè)置當(dāng)前頁面的延時(shí) */
T_WORD fnCPS_SetCurSlideDuration(T_WORD delay);
/* 獲得當(dāng)前頁面的延時(shí) */
T_WORD fnCPS_GetCurSlideDuration(pMMS_EDocument p_cur_doc);
/* 從當(dāng)前頁刪除圖像 */
T_WORD fnCPS_DeleteCurImage(pMMS_EDocument p_cur_doc);
/* 從當(dāng)前頁刪除文本 */
T_WORD fnCPS_DeleteCurText(T_VOID);
/* 從當(dāng)前頁刪除音樂 */
T_WORD fnCPS_DeleteCurAudio(T_VOID);
/* 從當(dāng)前頁刪除視頻 */
T_WORD fnCPS_DeleteCurVideo(pMMS_EDocument p_cur_doc);
/* 刪除當(dāng)前頁面,包括該頁的資源 */
T_WORD fnCPS_DeleteCurSlide(T_VOID);
/* 對(duì)編輯模塊進(jìn)行清空,放棄已完成的編輯工作 */
T_VOID fnCPS_Empty(T_VOID);
/* 移動(dòng)到下個(gè)頁面 */
T_WORD fnCPS_GoNextSlide (T_VOID);
/* 移動(dòng)到上個(gè)頁面 */
T_WORD fnCPS_GoPreSlide (T_VOID);
/* 得到當(dāng)前頁的圖像信息 */
T_WORD fnCPS_GetCurImage(T_Composer_Image*Image);
/* 得到當(dāng)前頁的文本信息 */
T_WORD fnCPS_GetCurText(T_Composer_Text*Text,pMMS_EDocument p_cur_doc);
/* 得到當(dāng)前頁的音樂信息 */
T_WORD fnCPS_GetCurAudio(T_Composer_Audio*Audio);
/* 得到當(dāng)前頁的視頻信息 */
T_WORD fnCPS_GetCurVideo(T_Composer_Video*Video);
/* 得到當(dāng)前頁的索引 */
T_WORD fnCPS_GetCurSlideIndex(T_VOID);
/*得到總頁數(shù)*/
T_WORD fnCPS_GetTotalSlides(T_VOID);
/* 得到當(dāng)前編輯彩信的資源大小 */
T_WORD fnCPS_GetTotalSize(T_VOID);
/* 得到當(dāng)前編輯彩信的Body PDU */
T_UBYTE* fnCPS_GetMmsContentPdu(T_WORD *Size);
#ifdef __cplusplus
}
#endif //end of #ifdef __cplusplus
#endif
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -