mmimms_wintable.c
资源名称:MMS.rar [点击查看]
上传用户:tqh2500
上传日期:2014-05-09
资源大小:163k
文件大小:463k
源码类别:
手机彩信(MMS)编程
开发平台:
Visual C++
- /****************************************************************************
- ** File Name: mmimms_wintable.c *
- ** Author: *
- ** Date: 2004.8.23 *
- ** Copyright: 2004 Spreatrum, Incoporated. All Rights Reserved. *
- ** Description: This file is used to describe the MMS *
- ****************************************************************************
- ** Important Edit History *
- ** ------------------------------------------------------------------------*
- ** DATE NAME DESCRIPTION *
- ** 2004.8 Bruce.Chi Create
- **
- ****************************************************************************/
- /**---------------------------------------------------------------------------*
- ** Include Files *
- **---------------------------------------------------------------------------*/
- #include "window_parse.h"
- #include "mmk_app.h"
- #include "im.h"
- #include "guicommon.h"
- #include "guimenu.h"
- #include "guieditbox.h"
- #include "guilistbox.h"
- #include "guimsgbox.h"
- #include "mmi_menutable.h"
- #include "mmi_id.h"
- #include "mmi_text.h"
- #include "mmi_image.h"
- #include "mmi_pubwin.h"
- #include "mmidisplay_data.h"
- #include "mainapp.h"
- #include "ccapp.h"
- #include "tb_dal.h"
- #include "guilabel.h"
- #include "guitextbox.h"
- #include "guibutton.h"
- #include "mmipb.h"
- #include "mmipb_wintab.h"
- #include "mmiset.h"
- #include "mmimms_internal.h"
- #include "mmk_timer.h"
- #include "ccapp.h"
- #include "mmi_common.h"
- #include "mmi_default.h"
- #include "mmismsapp_wintab.h"
- #include "mmidc.h"
- #include "mmi_appmsg.h"
- #include "mmimms.h"
- //cr36254 jian.ma start
- #include "mmk_type.h"
- #include "mmi_message.h"
- #include "mmiivr.h"
- #include "mmiset.h"
- #include "mmiphone.h"
- #include "mmimb.h"
- #include "mmi_pubwin.h"
- #include "mmibrowser.h"
- #include "mmibrowser_internal.h"
- #include "tempX.h"
- #include "Cms_MMSDoc.h"
- #include "Cms_MMSProvide.h"
- #include "Cms_WAPMain.h"
- #include "Cms_MMSFilefunc.h"
- #include "mms_text.h"
- #include "mms_anim.h"
- #include "mmimpeg4.h"
- #include "mmimp3.h"
- #include "mmi_modu_main.h"
- #include "MakeDrvInc.h"
- /**--------------------------------------------------------------------------*
- ** MACRO DEFINITION *
- **--------------------------------------------------------------------------*/
- #define MMIMMS_FILL_RECT()
- {
- GUI_RECT_T rect;
- rect.left = MMIMMS_FULLSCREEN_CLIENT_LEFT;
- rect.top = MMIMMS_FULLSCREEN_CLIENT_TOP;
- rect.right = MMIMMS_FULLSCREEN_CLIENT_RIGHT;
- rect.bottom = MMIMMS_FULLSCREEN_CLIENT_BOTTOM;
- LCD_FillRect(0, rect, MMI_WHITE_COLOR);
- }
- #define MATH_ABS(x) ((x) < 0 ? ((x) * (-1)) : (x))
- #define TITLE_HEIGHT MMI_TITLE_HEIGHT
- #define SK_HEIGH MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT
- #define LABEL_HEIGHT 16
- #define EDIT_FULL_X1 0
- #define EDIT_FULL_Y1 TITLE_HEIGHT
- #define EDIT_FULL_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
- #define EDIT_FULL_Y2 MMI_INPUT_EDITBOX_BOTTOM
- #define EDIT_HALF_X1 0
- #define EDIT_HALF_Y1 TITLE_HEIGHT
- #define EDIT_HALF_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
- #define EDIT_HALF_Y2 MMI_INPUT_EDITBOX_BOTTOM/2
- #define EDIT_1LINE_X1 10//0
- #define EDIT_1LINE_Y1 40//TITLE_HEIGHT
- #define EDIT_1LINE_X2 120//MMI_MAINSCREEN_RIGHT_MAX_PIXEL
- #define EDIT_1LINE_Y2 80//40
- #define EDIT_3LINE_X1 10
- #define EDIT_3LINE_Y1 40
- #define EDIT_3LINE_X2 120
- #define EDIT_3LINE_Y2 87//80
- #define MENU_X1 0
- #define MENU_Y1 0
- #define MENU_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
- #define MENU_Y2 MMI_CLIENT_RECT_BOTTOM
- #define LIST_X1 0
- #define LIST_Y1 TITLE_HEIGHT
- #define LIST_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
- #define LIST_Y2 (MMI_MAINSCREEN_BOTTOM_MAX_PIXEL - SK_HEIGH)
- #define LABEL_X1 0
- #define LABEL_Y1 (MMI_CLIENT_RECT_BOTTOM - LABEL_HEIGHT)
- #define LABEL_X2 (MMI_MAINSCREEN_RIGHT_MAX_PIXEL - 4 * LABEL_HEIGHT)
- #define LABEL_Y2 (LABEL_Y1 + LABEL_HEIGHT)
- #define CONTENT_EDIT_X1 0
- #define CONTENT_EDIT_Y1 (MMI_TITLE_HEIGHT+4*MMI_LIST_ITEM_HEIGHT)
- #define CONTENT_EDIT_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
- #define CONTENT_EDIT_Y2 (MMI_CLIENT_RECT_BOTTOM-LABEL_HEIGHT-1)
- #define PREVIEW_TEXT_X1 0
- #define PREVIEW_TEXT_Y1 (MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT)
- #define PREVIEW_TEXT_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
- #define PREVIEW_TEXT_Y2 MMI_CLIENT_RECT_BOTTOM
- #define MEMSTATE_LABEL5_X1 0
- #define MEMSTATE_LABEL5_Y1 (MEMSTATE_LABEL4_Y2)
- #define MEMSTATE_LABEL5_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
- #define MEMSTATE_LABEL5_Y2 (MEMSTATE_LABEL5_Y1 + MEMSTATE_LABEL_HEIGH)
- //liangl added 2005-10-25 for mms detail show
- #define MEMSTATE_TEXTBOX_X1 0
- #define MEMSTATE_TEXTBOX_Y1 (MEMSTATE_LABEL4_Y2)
- #define MEMSTATE_TEXTBOX_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
- #define MEMSTATE_TEXTBOX_Y2 MMI_MAINSCREEN_BOTTOM_MAX_PIXEL -TITLE_HEIGHT
- //fnh add 20060512
- #define MMS_DETAIL_LEFT 0
- #define MMS_DETAIL_TOP MMI_TITLE_HEIGHT
- #define MMS_DETAIL_WIDTH (MMI_MAINSCREEN_WIDTH - 1)
- #define MMS_DETAIL_HEIGHT (MMI_MAINSCREEN_HEIGHT - 1 - MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT)
- #define MMI_1SECONDS 1000 //1000毫秒
- #define WAITING_ANIM_X1 0
- #define WAITING_ANIM_Y1 TITLE_HEIGHT
- #define WAITING_ANIM_X2 1
- #define WAITING_ANIM_Y2 (TITLE_HEIGHT + 1)
- #define MMIMMS_RENAME_RECT_LEFT 4
- #define MMIMMS_RENAME_RECT_TOP 78//58
- #define MMIMMS_RENAME_RECT_RIGHT 172//125
- #define MMIMMS_RENAME_RECT_BOTTOM 110//90
- #define WAITING_TEXT_X1 0
- #define WAITING_TEXT_Y1 94
- #define WAITING_TEXT_X2 127
- #define WAITING_TEXT_Y2 109
- #define ALERT_SEND_DOWNLOAD_RESULT_TIMEOUT (6*1000)
- #define TIME_3SECONDS 3000//3 second
- #define TIME_6SECONDS 6000//6 second
- #define PREVIEW_LABEL_SLIDE_LEFT 0//90
- #define PREVIEW_LABEL_SIZE_LEFT 95
- #define PREVIEW_LABEL_SLIDE_RIGHT 35
- #define PREVIEW_LABEL_LEFT (MMI_MAINSCREEN_RIGHT_MAX_PIXEL - 20)
- #define PREVIEW_LABEL_TOP MMI_TITLE_HEIGHT
- //fnh add begin
- #define TWOLINEHEIGHT 35
- #define LABEL_CUR_X1 0
- #define LABEL_CUR_Y1 0
- #define LABEL_CUR_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
- #define LABEL_CUR_Y2 TITLE_HEIGHT
- #define LABEL_TEXT_X1 0
- #define LABEL_TEXT_Y1 MMI_MAINSCREEN_HEIGHT - MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-TWOLINEHEIGHT
- #define LABEL_TEXT_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
- #define LABEL_TEXT_Y2 MMI_MAINSCREEN_HEIGHT - MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT
- #define IMAGE_RECT_X1 0
- #define IMAGE_RECT_Y1 TITLE_HEIGHT
- #define IMAGE_RECT_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
- #define IMAGE_RECT_Y2 MMI_MAINSCREEN_HEIGHT - MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-TWOLINEHEIGHT
- //fnh add end
- //fnh add begin
- #define MMIMMS_FULLSCREEN_CLIENT_LEFT 0
- #define MMIMMS_FULLSCREEN_CLIENT_TOP MMI_TITLE_HEIGHT
- #define MMIMMS_FULLSCREEN_CLIENT_BOTTOM (MMI_MAINSCREEN_BOTTOM_MAX_PIXEL - MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT)
- #define MMIMMS_FULLSCREEN_CLIENT_RIGHT MMI_MAINSCREEN_RIGHT_MAX_PIXEL
- #define MMS_MAX_FILE_NAME_LENGTH 128
- #define MMIMMS_SINGLE_PHONENUMBE_LEFT 10
- #define MMIMMS_SINGLE_PHONENUMBE_TOP 40
- #define MMIMMS_SINGLE_PHONENUMBE_RIGHT 120
- #define MMIMMS_SINGLE_PHONENUMBE_BOTTOM 80
- #define MMIMMS_SET_ONTIME_LEFT 0//28
- #define MMIMMS_SET_ONTIME_TOP (MMI_TITLE_HEIGHT+1)//68
- #define MMIMMS_SET_ONTIME_RIGHT MMI_MAINSCREEN_RIGHT_MAX_PIXEL//99
- #define MMIMMS_SET_ONTIME_BOTTOM (MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT)//100
- #define MMIMMS_3SECOND 3000
- #define MMIMMS_RANDOM_FILE_NAME_MAX_LEN 20
- #define INSERT_VIDEO_MAX_SIZE 100*1024 //临时的大小,增加视频。
- #define MMS_ADDRESS_SEPERATE_SYMBOL ','
- #ifndef ALERT_TIMEOUT
- #define ALERT_TIMEOUT 3000
- #endif
- uint8 play_or_preview = 0; //播放或预览
- #define MMIMMS_CLEAR_CLIENT()
- MMIMMS_FILL_CLIENT()
- #define MMIMMS_FILL_CLIENT()
- {
- GUI_RECT_T rect = MMI_CLIENT_RECT;
- LCD_FillRect(0, rect, MMI_WINDOW_BACKGROUND_COLOR);
- }
- typedef enum
- {
- MMIMMS_PREVIEW_PLAYING,
- MMIMMS_PREVIEW_STOP,
- MMIMMS_PREVIEW_LEAVE
- }MMIMMS_PREVIEW_STATE;
- #define MOVE_UP_DOWN_STEP 14 //pixel //this is the same as Defaut_Text_Font of TEXT_BOX
- #define MOVE_LEFT_RIGHT_STEP 14
- #define MMISET_DATE_BIG_MONTH_DAY 31
- #define MMISET_DATE_SMALL_MONTH_DAY 30
- #define MMISET_DATE_LEAP_MONTH_DAY 29
- #define MMISET_DATE_NOT_LEAP_MONTH_DAY 28
- /*---------------------------------------------------------------------------*/
- /* TYPE AND CONSTANT */
- /*---------------------------------------------------------------------------*/
- typedef enum
- {
- MMS_PLAY,
- MMS_PREVIEW,
- MMS_CONTENT_DISPLAY
- }MMS_DISPLAY_CONTENT;
- MMS_SEND_ONTIME_TIME g_set_date;
- /*编辑器之编辑接收人窗口*/
- typedef struct TAG_MMS_RECEIVER_PARAM /* 参数 */
- {
- int32 receiver_win_title; /*窗口标题*/
- void* p_receiver; /* 待显示数据列表 */
- } MMS_RECEIVER_PARAM,*P_MMS_RECEIVER_PARAM;
- typedef enum
- {
- MMS_RECEIVER_TO,
- MMS_RECEIVER_CC,
- MMS_RECEIVER_BCC
- }MMS_RECEIVER_TYPE;
- typedef enum
- {
- MMS_RECEIVER_ADD,
- MMS_RECEIVER_MODIFY
- }MMS_RECEIVER_MODIFY_OR_ADD;
- typedef enum
- {
- MMS_EDIT_NEW_MMS, //新建彩信
- MMS_EDIT_ANSWER_MMS, //回复彩信
- MMS_EDIT_FORWARD_MMS, //转发彩信
- MMS_EDIT_REPEAT_EDIT_MMS,//重新编辑
- MMS_EDIT_ANSWER_SMSORPB,//回复短信或电话本
- MMS_EDIT_SEND_IMAGE //发送图片
- }MMS_EDIT_STATUS;
- typedef enum
- {
- MMS_EDIT_RECEIVER, //编辑收件人
- MMS_EDIT_SINGLE, //编辑单个的
- MMS_EDIT_GROUP //编辑群组
- }MMS_EDIT_REC_TYPE;
- typedef enum
- {
- MMS_FOLDER_SAVE_TYPE_IMAGE,
- MMS_FOLDER_SAVE_TYPE_MUSIC
- }MMS_FOLDER_SAVE_SAVE_TYPE;
- typedef struct TAG_MMS_FOLDER_SAVE_PARAM
- {
- pMMS_EDocument p_edit_doc; //
- int16 save_type ; //保存的类型
- }MMS_FOLDER_SAVE_PARAM,*P_MMS_FOLDER_SAVE_PARAM;
- typedef struct TAG_MMS_SAVE_VIDEO_PARAM
- {
- uint8 * video_str;
- uint32 video_size;
- uint32 video_type;
- MMIMULTIM_SAVE_FILE_CALLBACK_PFUNC callback_func;
- }MMS_SAVE_VIDEO_PARAM,*P_MMS_SAVE_VIDEO_PARAM;
- typedef struct TAG_MMS_SAVE_MP3_PARAM
- {
- uint8* mp3_str;
- uint32 mp3_size;
- uint32 mp3_type;
- MMIMULTIM_SAVE_FILE_CALLBACK_PFUNC callback_func;
- }MMS_SAVE_MP3_PARAM,*P_MMS_SAVE_MP3_PARAM;
- /* 增加(修改)收件人窗口 */
- typedef struct TAG_MMS_ADDMODIFY_PARAM /* 参数 */
- {
- int32 win_title; /* 窗口标题 */
- BOOLEAN modify_flag; /* 是修改还是添加TRUE:MODIFY;FALSE:ADD */
- void* p_receiver; /* 修改时进入编辑框的初始值 */
- } MMS_ADDMODIFY_PARAM,*P_MMS_ADDMODIFY_PARAM;
- /**--------------------------------------------------------------------------*
- ** EXTERNAL DECLARE *
- **--------------------------------------------------------------------------*/
- extern BOOLEAN g_inboxneedsave;
- extern BOOLEAN g_issendingreadrpt;
- extern BOOLEAN g_donewmms;
- extern char *g_filename;
- extern HFS inboxfile_openstatus ;
- //add end
- //fnh add end
- extern P_ManagerDocument g_pManager ;
- extern MMIMMS_NV_SETTING g_nv_setting_mirror; //mirror of NV mms setting
- extern uint32 g_progressneedsize;
- extern uint32 g_progresscurrentsize;
- extern uint8 g_videoname_arr[MMIMMS_MAX_FILE_NAME_LEN+1] ;//make it gloal for MMIMPEG4_AddOne
- extern uint8 g_mp3name_arr[MMIMMS_MAX_FILE_NAME_LEN+1] ;//make it gloal for MMIMPEG4_AddOne
- extern BOOLEAN g_backautodownload;
- extern pMMS_EDocument g_pcur_signdoc ;
- extern MMIMMS_MEM_STORE_T g_mms_save_in_mem; //used between edit and save in ram modules
- extern FILE_DEV_E_T MMICMS_GetCurrentFFS( void );
- /**-------------------------------------------------------------------------*
- ** GLOBAL DEFINITION *
- **--------------------------------------------------------------------------*/
- uint16 g_mms_edit_status = 0;
- uint16 g_mms_edit_rec_status = 0;
- uint16 g_mms_receiver_status = 0;
- uint16 g_mms_receiver_mod_or_add = 0;
- uint16 g_mms_Receiver_cur_sel = 0;
- uint8 g_mmimms_preview_timer_id = 0;
- uint16 iFClose = 0; //fnh add 0324 for MS00041490
- //linalgiu added 2005-11-18 for g_readsignstate
- MMIMMS_READ_STATE_CHANGED g_readforstate = MMS_MSG_INBOX_READ_FOR_NULL;
- MMIMMS_READ_STATE_SIGN g_readsignstate= MMS_MSG_READ_SIGN_NULL;
- MMIMMS_SAVEMANAGERFILE_STATE g_savestate = MMS_MSG_SAVEFILE_FOR_NULL;
- MMIMMS_SAVEMAMMS_STATE g_savemmsstate = MMS_MSG_SAVEMMS_FOR_NULL;
- MMIMMS_NETUSING_STATE g_netusing = MMS_MSG_NETUSING_NULL;
- pMessageList g_pCurrentList = PNULL;
- int8* g_p_mms_subject = NULL; //主题字符串,生存期为编辑窗口开关时间
- pMMS_EDocument g_peditdoc = NULL; // 编辑文档,编辑器内部使用,生存期为编辑器主窗口开关时间 */
- /*以下是3个收件人地址的链表,生存周期为编辑窗口的开关*/
- p_MMS_RECEPIENT g_p_mms_to = NULL;
- p_MMS_RECEPIENT g_p_mms_cc = NULL;
- p_MMS_RECEPIENT g_p_mms_bcc = NULL;
- /*以下是3个收件人为群组时的地址链表*/
- p_MMS_GROUP g_p_mms_to_group = NULL; //记录收件人组信息
- p_MMS_GROUP g_p_mms_cc_group = NULL; //记录抄送人组信息
- p_MMS_GROUP g_p_mms_bcc_group = NULL; //记录密送人组信息
- uint8 g_mailbox_status = 0;
- FILE_DEV_E_T g_filetype;
- /**--------------------------------------------------------------------------*
- ** STATIC DEFINITION *
- **--------------------------------------------------------------------------*/
- LOCAL BOOLEAN s_mms_is_preview_ring = FALSE;//MMS是否在预览彩信中的铃声
- LOCAL GUI_RECT_T s_mms_preview_display_rect = {0, MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT, MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
- MMI_MAINSCREEN_BOTTOM_MAX_PIXEL - MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT};
- LOCAL BOOLEAN s_is_mms_suspend_mp3 = FALSE;
- LOCAL BOOLEAN s_is_mmscontent_suspend_mp3 = FALSE;
- static uint8 s_mailbox_index;
- /*---------------------------------------------------------------------------*/
- /* LOCAL FUNCTION DECLARE */
- /*---------------------------------------------------------------------------*/
- /*****************************************************************************/
- // Description : 彩信主窗口消息处理函数
- // Global resource dependence :
- // Author:Bill.Ji
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Main_HandleMmsMainWin( MMI_WIN_ID_T win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param );
- /*****************************************************************************/
- // Description : 彩信主窗口控件初始化
- // Global resource dependence :
- // Author:Bill.Ji
- // Note:
- /*****************************************************************************/
- LOCAL void Main_MmsInitCtrl( uint8 cur_index );
- /*****************************************************************************/
- // Description : 彩信主窗口列表控件初始化
- // Global resource dependence :
- // Author:Bill.Ji
- // Note:
- /*****************************************************************************/
- LOCAL void Main_MmsInitList( MMIMSG_MAILBOX_TYPE_E mailbox_type );
- /*****************************************************************************/
- // Description : 写新彩信的回调函数
- // Global resource dependence :
- // Author:Bill.Ji
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Main_MmsNewMmsCallBack( void );
- /*****************************************************************************/
- // Description : 5.1A Edit MMS window message handler
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Edit_HandleEditMMSWinMsg(
- MMI_WIN_ID_T win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : 5.1A set MMS edit control text
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note:
- /*****************************************************************************/
- LOCAL BOOLEAN Edit_SetEditCtrlContent(MMI_CTRL_ID_T ctrl_id,pMMS_EDocument p_cur_edoc);
- /*****************************************************************************/
- // Description : 5.1A set MMS label text (N/M x.yK)
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note: N: Current slide index. M: total slide
- // x: how many kilos y: how many hundreds
- /*****************************************************************************/
- LOCAL BOOLEAN Edit_SetLabelContent(MMI_CTRL_ID_T ctrl_id,pMMS_EDocument p_cur_edoc);
- /*****************************************************************************/
- // Description : 5.1A set MMS label text (N/M x.yK)
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note: N: Current slide index. M: total slide
- // x: how many kilos y: how many hundreds
- /*****************************************************************************/
- LOCAL BOOLEAN Edit_SetSignLabelContent(MMI_CTRL_ID_T ctrl_id,pMMS_EDocument p_cur_edoc);
- /*****************************************************************************/
- // Description : 预览界面的向上按钮回调函数
- // Global resource dependence :
- // Author:yuhua.shi
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Edit_PreviewUpButtonCallBack( void );
- /*****************************************************************************/
- // Description : 预览界面的向下按钮回调函数
- // Global resource dependence :
- // Author:Bill.Ji
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Edit_PreviewDownButtonCallBack( void );
- /*****************************************************************************/
- // Description : 预览界面的向左按钮回调函数
- // Global resource dependence :
- // Author:Bill.Ji
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Edit_PreviewLeftButtonCallBack( void );
- /*****************************************************************************/
- // Description : 预览界面的向右按钮回调函数
- // Global resource dependence :
- // Author:Bill.Ji
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Edit_PreviewRightButtonCallBack( void );
- /*****************************************************************************/
- // Description : 预览界面的停止播放按钮回调函数
- // Global resource dependence :
- // Author:Bill.Ji
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Edit_PreviewPlayButtonCallBack( void );
- /*****************************************************************************/
- // Description : 5.1.5 Edit: preview window message handler
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Edit_HandlePreviewMMSMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : 5.1.13 Edit: set slide time window message handler
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Edit_HandleSetSlideTimeWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : 5.4.1A Inbox: message list window message handler
- // Global resource dependence :
- // Author:liangliu@palmsource.com
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E MMSSPACE_HandleListWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : 5.4.1A Inbox: message list window message handler
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Inbox_HandleListWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description :5.4.1C Inbox : Option menu of MMS window message handler
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Inbox_HandleMMSMenuWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : 5.4.7 Inbox : MMS detail window message handler
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Inbox_HandleMMSDetailWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : 5.5.1A Sentbox: message list window message handler
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Sentbox_HandleListWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : 5.7.1A Outbox: message list window message handler
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Outbox_HandleListWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : 5.7.1A DraftBox : list of draft window message handler
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E DraftBox_HandleListWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : MMS Setting menu
- // Global resource dependence :
- // Author:Aoke.Hu
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Setting_HandleMenuWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : 5.8.1 Setting : autodownload window message handler
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Setting_HandleAutoDownloadListWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : 5.8.6 Setting : Arrive report window message handler
- // Global resource dependence :
- // Author:liangliu
- // date : 2005-11-15
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Setting_HandleArriveReportWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : 5.8.6 Setting : Read report window message handler
- // Global resource dependence :
- // Author:liangliu@palmsource.com
- // date : 2005-11-15
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Setting_HandleReadReportWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /* ----------------------------------------------------------------------------
- * Function Name: Setting_HandleOpenSignWinMsg
- * Purpose: 设置中自动签名的窗口处理消息
- * Input: MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- * Returns: MMI_RESULT_E
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL MMI_RESULT_E Setting_HandleOpenSignWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /* ----------------------------------------------------------------------------
- * Function Name: Setting_HandleAnonymityWinMsg
- * Purpose: 设置中匿名发送的窗口处理消息
- * Input: MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- * Returns: MMI_RESULT_E
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL MMI_RESULT_E Setting_HandleAnonymityWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /* ----------------------------------------------------------------------------
- * Function Name: Setting_HandleSoundWinMsg
- * Purpose: 设置中播放声音的窗口处理消息
- * Input: MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- * Returns: MMI_RESULT_E
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL MMI_RESULT_E Setting_HandleSoundWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /* ----------------------------------------------------------------------------
- * Function Name: Setting_HandleAdvertisingWinMsg
- * Purpose: 设置中是否允许广告的窗口处理消息
- * Input: MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- * Returns: MMI_RESULT_E
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL MMI_RESULT_E Setting_HandleAdvertisingWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : 5.8.2 Setting : Priority window message handler
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Setting_HandlePriorityListWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : 5.8.3 Setting : mms duaration window message handler
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Setting_HandleValidPeriodListWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : 5.8.5 Setting : mmsc
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Setting_HandleMMSCWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : 5.8.5 Setting : gateway
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Setting_HandleGateWayWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : 5.8.5 Setting : SIGN
- // Global resource dependence :
- // Author:Aoke.Hu
- // Note:
- /*****************************************************************************/
- LOCAL BOOLEAN Setting_HandleSignWinMsg(
- MMI_WIN_ID_T win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : 5.8.5 Setting : Network
- // Global resource dependence :
- // Author:Aoke.Hu
- // Note:
- /*****************************************************************************/
- LOCAL BOOLEAN Setting_HandleNetworkWinMsg(
- MMI_WIN_ID_T win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : 5.8.5 Setting : Port
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Setting_HandlePortWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : 5.8.5 Setting : UserName
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Setting_HandleUserNameWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : 5.8.5 Setting : Password
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Setting_HandlePasswordWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : 5.8.5 Setting : APN
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Setting_HandleAPNWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /* ----------------------------------------------------------------------------
- * Function Name: Download_HandleDownloadingWin
- * Purpose: 下载彩信的窗口消息处理函数
- * Input: MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- * Returns: MMI_RESULT_E
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL MMI_RESULT_E Download_HandleDownloadingWin(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /* ----------------------------------------------------------------------------
- * Function Name: SendMMS_HandleWaitingWin
- * Purpose: 发送彩信时的等待窗口消息处理函数
- * Input: MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- * Returns: MMI_RESULT_E
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL MMI_RESULT_E SendMMS_HandleWaitingWin(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /* ----------------------------------------------------------------------------
- * Function Name: SendReadRpt_HandleWaitingWin
- * Purpose: 发送阅读报告时的等待窗口消息处理函数
- * Input: MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- * Returns: MMI_RESULT_E
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL MMI_RESULT_E SendReadRpt_HandleWaitingWin(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /* ----------------------------------------------------------------------------
- * Function Name: MMIMMS_HandleNormalWaitingWin
- * Purpose: 删除彩信时等待窗口消息处理函数
- * Input: MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- * Returns: MMI_RESULT_E
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL MMI_RESULT_E MMIMMS_HandleNormalWaitingWin(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /* ----------------------------------------------------------------------------
- * Function Name: MMIMMS_HandleReadMMSWaitingWin
- * Purpose: 读取彩信时等待窗口消息处理函数
- * Input: MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- * Returns: MMI_RESULT_E
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL MMI_RESULT_E MMIMMS_HandleReadMMSWaitingWin(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /* ----------------------------------------------------------------------------
- * Function Name: MMIMMS_HandleSaveMMSWaitingWin
- * Purpose: 保存彩信时等待窗口消息处理函数
- * Input: MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- * Returns: MMI_RESULT_E
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL MMI_RESULT_E MMIMMS_HandleSaveMMSWaitingWin(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : to append the info to listbox
- // Global resource dependence :
- // Author:louis.wei
- // Note:
- /*****************************************************************************/
- LOCAL void AppendListItemByTextId(
- uint32 text_id,
- MMS_CONTROL_ID_E ctrl_id
- );
- /*****************************************************************************/
- // Description : to append the info to listbox
- // Global resource dependence :
- // Author:louis.wei
- // Note:
- /*****************************************************************************/
- LOCAL void AppendListItem(
- uint8 *string_ptr,
- uint8 string_len,
- BOOLEAN is_ucs2,
- MMS_CONTROL_ID_E ctrl_id,
- uint16 left_softkey_id
- );
- /*****************************************************************************/
- // Description : to append the info to listbox
- // Global resource dependence :
- // Author:louis.wei
- // Note:
- /*****************************************************************************/
- LOCAL void AppendListItemWithIcon(
- uint8 *string_ptr,
- uint8 string_len,
- uint32 icon_id,
- BOOLEAN is_ucs2,
- MMS_CONTROL_ID_E ctrl_id,
- uint16 left_softkey_id
- );
- /* ----------------------------------------------------------------------------
- * Function Name: Preview_PlayCurrentSlide
- * Purpose: 播放当前祯内容
- * Input: x_start:起点X坐标
- y_start:起点Y坐标
- win_id:窗口ID
- anim_ctrl_Id:图形控件ID
- textbox_ctrl_id:文本控件ID
- is_new_slide:是否第一次显示
- * Returns: BOOLEAN
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL BOOLEAN Preview_PlayCurrentSlide(pMMS_EDocument p_cur_edoc, //当前编辑文档
- int x_start, //显示区域起始横坐标
- int y_start, //显示区域起始纵坐标
- MMS_WINDOW_ID_E win_id, //窗口ID
- MMS_CONTROL_ID_E anim_ctrl_id, //图形显示控件ID
- MMS_CONTROL_ID_E textbox_ctrl_id,//文本显示控件ID
- BOOLEAN is_new_slide, //是否是第一次显示
- BOOLEAN is_beginning,
- BOOLEAN is_update //是否刷新
- );
- /*****************************************************************************/
- // Description : judge whether current slide is the last slide
- // Global resource dependence :
- // Author: Bruce.chi
- // Note:
- /*****************************************************************************/
- LOCAL BOOLEAN Edit_isLastSlide(pMMS_EDocument p_cur_edoc);
- /*****************************************************************************/
- // Description : 显示彩信签名页。
- // Global resource dependence :
- // Author: nihongf
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Edit_HandleMMSEditSignWin(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : open multim download pictures insert image window
- // Global resource dependence :
- // Author: Jassmine
- // Note:
- /*****************************************************************************/
- LOCAL BOOLEAN Edit_OpenInsertDpicWin(
- MMS_WINDOW_ID_E win_id
- );
- /*****************************************************************************/
- // Description : open multim insert music window
- // Global resource dependence :
- // Author: Jassmine
- // Note:
- /*****************************************************************************/
- LOCAL BOOLEAN Edit_OpenInsertDringWin(
- MMS_WINDOW_ID_E win_id
- );
- /* ----------------------------------------------------------------------------
- * Function Name: CmsDelContent
- * Purpose: 删除彩信结构中对应类型的内容(目前仅用来删除文本内容)
- * Input: editor_doc: 彩信结构地址
- slide: 所在页地址
- del_type: 待删除内容的类
- * Returns: void
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- void CmsDelContent(pMMS_EDocument editor_doc, pMMS_Slide slide, uint16 del_type);
- /* ----------------------------------------------------------------------------
- * Function Name: Edit_HandleMMSSetSendDateWin
- * Purpose: 设置发送日期窗口
- * Input: win_id:窗口ID,
- msg_Id:消息ID,
- param:窗口参数
- * Returns: MMI_RESULT_E
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL MMI_RESULT_E Edit_HandleMMSSetSendDateWin(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /******************************************************************************
- * 函数定义: cmsmms_HandlesaveimageWinMsg
- * 函数说明: 保存彩信内容中的图象
- * 参数说明: win_id:窗口id
- msg_id:消息id
- param:窗口参数
- * 返回值: 空
- ********************************************************************************/
- LOCAL MMI_RESULT_E cmsmms_HandlesaveimageWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /******************************************************************************
- * 函数定义: cmsmms_HandlesaveimageWinMsg
- * 函数说明: 保存彩信内容中的音乐
- * 参数说明: win_id:窗口id
- msg_id:消息id
- param:窗口参数
- * 返回值: 空
- ********************************************************************************/
- LOCAL MMI_RESULT_E cmsmms_HandlesavemusicWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /******************************************************************************
- * 函数定义: cmsmms_HandlesavevideoWinMsg
- * 函数说明: 保存彩信内容中的视频
- * 参数说明: win_id:窗口id
- msg_id:消息id
- param:窗口参数
- * 返回值: 空
- ********************************************************************************/
- LOCAL MMI_RESULT_E cmsmms_HandlesavevideoWinMsg(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /*****************************************************************************/
- // Description : display "current_slide_index/total_slide_num"
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note:
- /*****************************************************************************/
- LOCAL void Preview_DispSlideNum(MMS_CONTROL_ID_E label_ctrl_id,pMMS_EDocument p_cur_edoc);
- /*****************************************************************************/
- // Description : to continue play mp3
- // Global resource dependence :
- // Author:Jassmine.Meng
- // Note:
- /*****************************************************************************/
- LOCAL void MmsRingCallBack(void);
- /******************************************************************************
- * 函数定义: HandleDownloadVideoInputName
- * 函数说明: 保存视频时重新输入名字
- * 参数说明: win_id:窗口ID
- msg_id:消息ID
- param:窗口附加值
- * 返回值: 空
- ********************************************************************************/
- LOCAL MMI_RESULT_E HandleDownloadVideoInputName(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /* ----------------------------------------------------------------------------
- * Function Name: HandleDownloadmp3InputName
- * Purpose: 保存MP3时重新输入名字窗口处理函数
- * Input: win_id:窗口ID,
- msg_Id:消息ID,
- param:窗口参数
- * Returns: MMI_RESULT_E
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL MMI_RESULT_E HandleDownloadmp3InputName(
- MMS_WINDOW_ID_E win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- );
- /* ----------------------------------------------------------------------------
- * Function Name: MMIMMS_GenRandomNameAndSet
- * Purpose: 取得随机名字并设置
- * Input:uint8 *suffix_ptr,
- MMS_CONTROL_ID_E ctrl_id
- * Returns: void
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL void MMIMMS_GenRandomNameAndSet(
- uint8 *suffix_ptr,
- MMS_CONTROL_ID_E ctrl_id
- );
- /*****************************************************************************/
- // Description : this function handle MMS edit, select insert photo or Dpic window message
- // Global resource dependence :
- // Author:Rui.Zhang
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E MMS_HandleEditSelectImageWinMsg(
- MMI_WIN_ID_T win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param );
- /*****************************************************************************/
- // Description : this function handle MMS edit, select insert RING or MP3 window message
- // Global resource dependence :
- // Author:AOKE.HU
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E MMS_HandleEditSelectMusicWinMsg(
- MMI_WIN_ID_T win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param );
- /* ----------------------------------------------------------------------------
- * Function Name: MmsStopPreviewRing
- * Purpose: 停止预览彩信铃声
- * Input: void
- * Returns: void
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL void MmsStopPreviewRing(void);
- /* ----------------------------------------------------------------------------
- * Function Name: Detail_FormTime
- * Purpose: 详情中得到时间字符串
- * Input: MMI_STRING_T *str_dst, //out.
- uint8* time
- * Returns: BOOLEAN
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL BOOLEAN Detail_FormTime(
- MMI_STRING_T *str_dst, //out.
- uint8* time);
- /* ----------------------------------------------------------------------------
- * Function Name: Detail_FormSize
- * Purpose: 详情中得到彩信大小字符串
- * Input: MMI_STRING_T *str_dst, //out.
- uint8* size
- * Returns: BOOLEAN
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL BOOLEAN Detail_FormSize(
- MMI_STRING_T *str_dst, //out.
- uint32 size);
- /* ----------------------------------------------------------------------------
- * Function Name: Detail_FormSubject
- * Purpose: 详情中得到彩信标题字符串
- * Input: MMI_STRING_T *str_dst, //out.
- uint8* subject
- * Returns: BOOLEAN
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL BOOLEAN Detail_FormSubject(
- MMI_STRING_T *str_dst, //out.
- uint8* subject);
- /* ----------------------------------------------------------------------------
- * Function Name: Detail_FormCc
- * Purpose: 详情中得到抄送人的字符串
- * Input: MMI_STRING_T *str_dst, //out.
- uint8* cc
- * Returns: BOOLEAN
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL BOOLEAN Detail_FormCc(
- MMI_STRING_T *str_dst, //out.
- uint8* cc);
- /* ----------------------------------------------------------------------------
- * Function Name: Detail_FormTo
- * Purpose: 详情中得到收件人的字符串
- * Input: MMI_STRING_T *str_dst, //out.
- uint8* to
- * Returns: BOOLEAN
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL BOOLEAN Detail_FormTo(
- MMI_STRING_T *str_dst, //out.
- uint8* to);
- /* ----------------------------------------------------------------------------
- * Function Name: Detail_FormSender
- * Purpose: 详情中得到发件人的字符串
- * Input: MMI_STRING_T *str_dst, //out.
- uint8* sender
- * Returns: BOOLEAN
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL BOOLEAN Detail_FormSender(
- MMI_STRING_T *str_dst, //out.
- uint8* sender
- );
- /* ----------------------------------------------------------------------------
- * Function Name: Detail_FormPriority
- * Purpose: 详情中得到优先级的字符串
- * Input: MMI_STRING_T *str_dst, //out.
- uint8* prioruty
- * Returns: BOOLEAN
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL BOOLEAN Detail_FormPriority(
- MMI_STRING_T *str_dst, //out.
- uint32 prioruty);
- /* ----------------------------------------------------------------------------
- * Function Name: Detail_FormExpiry
- * Purpose: 详情中得到有效期的字符串
- * Input: MMI_STRING_T *str_dst, //out.
- uint8* expiry
- * Returns: BOOLEAN
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL BOOLEAN Detail_FormExpiry(
- MMI_STRING_T *str_dst, //out.
- uint32 expiry);
- /* ----------------------------------------------------------------------------
- * Function Name: MmsDelReceiver
- * Purpose: 删除所有收件人
- * Input: p_receiver: 收件人列表
- * Returns: int16
- * Author:nihongf@mobilesoft.com.cn
- * ----------------------------------------------------------------------------*/
- LOCAL int16 MmsDelReceiver(p_MMS_RECEPIENT p_receiver);
- /**---------------------------------------------------------------------------*
- ** Constant Variables *
- **---------------------------------------------------------------------------*/
- //the following is for Edit mms module
- #if defined(TRUE_KEY_INPUT)
- WINDOW_TABLE( MMIMMS_EDIT_WIN_TAB ) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- //WIN_TITLE_ID(TXT_MMS_EDIT), //maksed by cloud6
- WIN_FUNC((uint32) Edit_HandleEditMMSWinMsg),
- WIN_ID(MMIMMS_EDIT_WIN_ID),
- //lable of address,mms_to
- CREATE_BUTTON_CTRL(0,
- 1,//MMI_TITLE_HEIGHT+1,
- MMIMMS_ADDRESS_BTN_WIDTH,
- MMI_LIST_ITEM_HEIGHT-3,//MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT-3,
- GUI_BUTTON_ICON_CENTER,
- IMAGE_BTN_THREE_NORMAL,//IMAGE_SMS_EDIT_TO_NORMAL,
- IMAGE_BTN_THREE_DOWN,
- COMMON_IMAGE_NULL,
- MMIMMS_EDIT_SELETENUM_CTRL_ID),
- //edit address,mms_to
- CREATE_TEXTEDITBOX_CTRL(MMIMMS_ADDRESS_BTN_WIDTH+1,
- 1,//MMI_TITLE_HEIGHT,
- MMI_MAINSCREEN_WIDTH-1-20,//MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
- MMI_LIST_ITEM_HEIGHT-2,//MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT-2,
- (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
- (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
- IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
- IM_DIGITAL_MODE,
- MMIMMS_ADDR_EDITBOX_CTRL_ID),
- //lable of address,mms_cc
- CREATE_BUTTON_CTRL(0,
- /*MMI_TITLE_HEIGHT+*/MMI_LIST_ITEM_HEIGHT+1,
- MMIMMS_ADDRESS_BTN_WIDTH,
- /*MMI_TITLE_HEIGHT+*/2*MMI_LIST_ITEM_HEIGHT-3,
- GUI_BUTTON_ICON_CENTER,
- IMAGE_BTN_THREE_NORMAL,//IMAGE_SMS_EDIT_TO_NORMAL,
- IMAGE_BTN_THREE_DOWN,
- COMMON_IMAGE_NULL,
- MMIMMS_EDIT_SELETENUM_MMSCC_CTRL_ID),
- //edit address,mms_cc
- CREATE_TEXTEDITBOX_CTRL(MMIMMS_ADDRESS_BTN_WIDTH+1,
- /*MMI_TITLE_HEIGHT+*/MMI_LIST_ITEM_HEIGHT,
- MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
- /*MMI_TITLE_HEIGHT+*/2*MMI_LIST_ITEM_HEIGHT-2,
- (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
- (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
- IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
- IM_DIGITAL_MODE,
- MMIMMS_ADDR_EDITBOX_MMSCC_CTRL_ID),
- //lable of address,mms_bcc
- CREATE_BUTTON_CTRL(0,
- /*MMI_TITLE_HEIGHT+*/2*MMI_LIST_ITEM_HEIGHT+1,
- MMIMMS_ADDRESS_BTN_WIDTH,
- /*MMI_TITLE_HEIGHT+*/3*MMI_LIST_ITEM_HEIGHT-3,
- GUI_BUTTON_ICON_CENTER,
- IMAGE_BTN_THREE_NORMAL,//IMAGE_SMS_EDIT_TO_NORMAL,
- IMAGE_BTN_THREE_DOWN,
- COMMON_IMAGE_NULL,
- MMIMMS_EDIT_SELETENUM_MMSBCC_CTRL_ID),
- //edit address,mms_bcc
- CREATE_TEXTEDITBOX_CTRL(MMIMMS_ADDRESS_BTN_WIDTH+1,
- /*MMI_TITLE_HEIGHT+*/2*MMI_LIST_ITEM_HEIGHT,
- MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
- /*MMI_TITLE_HEIGHT+*/3*MMI_LIST_ITEM_HEIGHT-2,
- (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
- (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
- IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
- IM_DIGITAL_MODE,
- MMIMMS_ADDR_EDITBOX_MMSBCC_CTRL_ID),
- //lable of subject
- CREATE_LABEL_CTRL(0, /*MMI_TITLE_HEIGHT+*/3*MMI_LIST_ITEM_HEIGHT, MMIMMS_ADDRESS_BTN_WIDTH, /*MMI_TITLE_HEIGHT+*/4*MMI_LIST_ITEM_HEIGHT-1,
- GUILABEL_LEFT, 0, MMIMMS_EDIT_SUBJ_LABEL_CTRL_ID),
- //edit subject
- CREATE_TEXTEDITBOX_CTRL(MMIMMS_ADDRESS_BTN_WIDTH+1,
- /*MMI_TITLE_HEIGHT+*/3*MMI_LIST_ITEM_HEIGHT,
- MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
- /*MMI_TITLE_HEIGHT+*/4*MMI_LIST_ITEM_HEIGHT-1,
- 40,
- 40,
- IM_PINYIN_TYPE | IM_STROKE_TYPE | IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
- IM_PINYIN_MODE,
- MMIMMS_EDIT_SUBJECT_CTRL_ID),
- //edit mms content
- CREATE_TEXTEDITBOX_CTRL(CONTENT_EDIT_X1, /*CONTENT_EDIT_Y1*/4*MMI_LIST_ITEM_HEIGHT, CONTENT_EDIT_X2,
- CONTENT_EDIT_Y2 - MMI_TITLE_HEIGHT, MMIMMS_MAX_TEXT_LEN, MMIMMS_MAX_TEXT_LEN,
- IM_PINYIN_TYPE | IM_STROKE_TYPE | IM_CHARACTER_TYPE | IM_ENGLISH_TYPE | IM_DIGITAL_TYPE,
- IM_PINYIN_MODE, MMIMMS_EDIT_CTRL_ID),
- CREATE_LABEL_CTRL(LABEL_X1, LABEL_Y1- MMI_TITLE_HEIGHT, LABEL_X2-LABEL_HEIGHT, LABEL_Y2- MMI_TITLE_HEIGHT,
- GUILABEL_LEFT, 0, MMIMMS_EDIT_LABEL_CTRL_ID),
- CREATE_BUTTON_CTRL(LABEL_X2-LABEL_HEIGHT+1,LABEL_Y1- MMI_TITLE_HEIGHT,LABEL_X2,LABEL_Y2- MMI_TITLE_HEIGHT,
- GUI_BUTTON_ICON_CENTER,
- IMAGE_MMS_INSERT_VIDEO_ICON,//IMAGE_MMS_INSERT_RING_ICON,
- IMAGE_MMS_INSERT_VIDEO_ICON,//IMAGE_MMS_INSERT_RING_ICON,
- COMMON_IMAGE_NULL,
- MMIMMS_EDIT_VIDEO_CTRL_ID),
- CREATE_BUTTON_CTRL(LABEL_X2+1,LABEL_Y1- MMI_TITLE_HEIGHT,LABEL_X2+LABEL_HEIGHT,LABEL_Y2- MMI_TITLE_HEIGHT,
- GUI_BUTTON_ICON_CENTER,
- IMAGE_MMS_INSERT_SLIDE_ICON,
- IMAGE_MMS_INSERT_SLIDE_ICON,
- COMMON_IMAGE_NULL,
- MMIMMS_EDIT_ADD_SLIDE_CTRL_ID),
- CREATE_BUTTON_CTRL(LABEL_X2+LABEL_HEIGHT+1,LABEL_Y1- MMI_TITLE_HEIGHT,LABEL_X2+2*LABEL_HEIGHT,LABEL_Y2- MMI_TITLE_HEIGHT,
- GUI_BUTTON_ICON_CENTER,
- IMAGE_MMS_INSERT_PIC_ICON,
- IMAGE_MMS_INSERT_PIC_ICON,
- COMMON_IMAGE_NULL,
- MMIMMS_EDIT_PIC_CTRL_ID),
- CREATE_BUTTON_CTRL(LABEL_X2+2*LABEL_HEIGHT+1,LABEL_Y1- MMI_TITLE_HEIGHT,LABEL_X2+3*LABEL_HEIGHT,LABEL_Y2- MMI_TITLE_HEIGHT,
- GUI_BUTTON_ICON_CENTER,
- IMAGE_MMS_INSERT_RING_ICON,
- IMAGE_MMS_INSERT_RING_ICON,
- COMMON_IMAGE_NULL,
- MMIMMS_EDIT_RING_CTRL_ID),
- CREATE_BUTTON_CTRL(LABEL_X2+3*LABEL_HEIGHT+1,LABEL_Y1- MMI_TITLE_HEIGHT,LABEL_X2+4*LABEL_HEIGHT,LABEL_Y2- MMI_TITLE_HEIGHT,
- GUI_BUTTON_ICON_CENTER,
- IMAGE_MMS_DEL_SLIDE_ICON,
- IMAGE_MMS_DEL_SLIDE_ICON,
- IMAGE_MMS_DEL_SLIDE_GRAYED_ICON,
- MMIMMS_EDIT_DEL_SLIDE_CTRL_ID),
- CREATE_POP_MENU_CTRL(0,
- MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-4*MMI_POPUP_MENU_HEIGHT,
- MMI_POPUP_MENU_WIDTH-1,
- MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-1,
- MENU_MMS_POP_OPTION,
- MMIMMS_EDIT_MENU_CTRL_ID),
- END_WIN
- };
- #else
- WINDOW_TABLE( MMIMMS_EDIT_WIN_TAB ) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_EDIT),
- WIN_FUNC((uint32) Edit_HandleEditMMSWinMsg),
- WIN_ID(MMIMMS_EDIT_WIN_ID),
- //lable of address,mms_to
- CREATE_BUTTON_CTRL(0,
- MMI_TITLE_HEIGHT+1,
- MMIMMS_ADDRESS_BTN_WIDTH,
- MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT-3,
- GUI_BUTTON_ICON_CENTER,
- IMAGE_BTN_THREE_NORMAL,//IMAGE_SMS_EDIT_TO_NORMAL,
- IMAGE_BTN_THREE_DOWN,
- COMMON_IMAGE_NULL,
- MMIMMS_EDIT_SELETENUM_CTRL_ID),
- //edit address,mms_to
- CREATE_TEXTEDITBOX_CTRL(MMIMMS_ADDRESS_BTN_WIDTH+1,
- MMI_TITLE_HEIGHT,
- MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
- MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT-2,
- (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
- (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
- IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
- IM_DIGITAL_MODE,
- MMIMMS_ADDR_EDITBOX_CTRL_ID),
- //lable of address,mms_cc
- CREATE_BUTTON_CTRL(0,
- MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT+1,
- MMIMMS_ADDRESS_BTN_WIDTH,
- MMI_TITLE_HEIGHT+2*MMI_LIST_ITEM_HEIGHT-3,
- GUI_BUTTON_ICON_CENTER,
- IMAGE_BTN_THREE_NORMAL,//IMAGE_SMS_EDIT_TO_NORMAL,
- IMAGE_BTN_THREE_DOWN,
- COMMON_IMAGE_NULL,
- MMIMMS_EDIT_SELETENUM_MMSCC_CTRL_ID),
- //edit address,mms_cc
- CREATE_TEXTEDITBOX_CTRL(MMIMMS_ADDRESS_BTN_WIDTH+1,
- MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT,
- MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
- MMI_TITLE_HEIGHT+2*MMI_LIST_ITEM_HEIGHT-2,
- (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
- (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
- IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
- IM_DIGITAL_MODE,
- MMIMMS_ADDR_EDITBOX_MMSCC_CTRL_ID),
- //lable of address,mms_bcc
- CREATE_BUTTON_CTRL(0,
- MMI_TITLE_HEIGHT+2*MMI_LIST_ITEM_HEIGHT+1,
- MMIMMS_ADDRESS_BTN_WIDTH,
- MMI_TITLE_HEIGHT+3*MMI_LIST_ITEM_HEIGHT-3,
- GUI_BUTTON_ICON_CENTER,
- IMAGE_BTN_THREE_NORMAL,//IMAGE_SMS_EDIT_TO_NORMAL,
- IMAGE_BTN_THREE_DOWN,
- COMMON_IMAGE_NULL,
- MMIMMS_EDIT_SELETENUM_MMSBCC_CTRL_ID),
- //edit address,mms_bcc
- CREATE_TEXTEDITBOX_CTRL(MMIMMS_ADDRESS_BTN_WIDTH+1,
- MMI_TITLE_HEIGHT+2*MMI_LIST_ITEM_HEIGHT,
- MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
- MMI_TITLE_HEIGHT+3*MMI_LIST_ITEM_HEIGHT-2,
- (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
- (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
- IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
- IM_DIGITAL_MODE,
- MMIMMS_ADDR_EDITBOX_MMSBCC_CTRL_ID),
- //lable of subject
- CREATE_LABEL_CTRL(0, MMI_TITLE_HEIGHT+3*MMI_LIST_ITEM_HEIGHT, MMIMMS_ADDRESS_BTN_WIDTH, MMI_TITLE_HEIGHT+4*MMI_LIST_ITEM_HEIGHT-1,
- GUILABEL_LEFT, 0, MMIMMS_EDIT_SUBJ_LABEL_CTRL_ID),
- //edit subject
- CREATE_TEXTEDITBOX_CTRL(MMIMMS_ADDRESS_BTN_WIDTH+1,
- MMI_TITLE_HEIGHT+3*MMI_LIST_ITEM_HEIGHT,
- MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
- MMI_TITLE_HEIGHT+4*MMI_LIST_ITEM_HEIGHT-1,
- 40,
- 40,
- IM_PINYIN_TYPE | IM_STROKE_TYPE | IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
- IM_PINYIN_MODE,
- MMIMMS_EDIT_SUBJECT_CTRL_ID),
- //edit mms content
- CREATE_TEXTEDITBOX_CTRL(CONTENT_EDIT_X1, CONTENT_EDIT_Y1, CONTENT_EDIT_X2,
- CONTENT_EDIT_Y2, MMIMMS_MAX_TEXT_LEN, MMIMMS_MAX_TEXT_LEN,
- IM_PINYIN_TYPE | IM_STROKE_TYPE | IM_CHARACTER_TYPE | IM_ENGLISH_TYPE | IM_DIGITAL_TYPE,
- IM_PINYIN_MODE, MMIMMS_EDIT_CTRL_ID),
- CREATE_LABEL_CTRL(LABEL_X1, LABEL_Y1, LABEL_X2-LABEL_HEIGHT, LABEL_Y2,
- GUILABEL_LEFT, 0, MMIMMS_EDIT_LABEL_CTRL_ID),
- CREATE_BUTTON_CTRL(LABEL_X2-LABEL_HEIGHT+1,LABEL_Y1,LABEL_X2,LABEL_Y2,
- GUI_BUTTON_ICON_CENTER,
- IMAGE_MMS_INSERT_VIDEO_ICON,//IMAGE_MMS_INSERT_RING_ICON,
- IMAGE_MMS_INSERT_VIDEO_ICON,//IMAGE_MMS_INSERT_RING_ICON,
- COMMON_IMAGE_NULL,
- MMIMMS_EDIT_VIDEO_CTRL_ID),
- CREATE_BUTTON_CTRL(LABEL_X2+1,LABEL_Y1,LABEL_X2+LABEL_HEIGHT,LABEL_Y2,
- GUI_BUTTON_ICON_CENTER,
- IMAGE_MMS_INSERT_SLIDE_ICON,
- IMAGE_MMS_INSERT_SLIDE_ICON,
- COMMON_IMAGE_NULL,
- MMIMMS_EDIT_ADD_SLIDE_CTRL_ID),
- CREATE_BUTTON_CTRL(LABEL_X2+LABEL_HEIGHT+1,LABEL_Y1,LABEL_X2+2*LABEL_HEIGHT,LABEL_Y2,
- GUI_BUTTON_ICON_CENTER,
- IMAGE_MMS_INSERT_PIC_ICON,
- IMAGE_MMS_INSERT_PIC_ICON,
- COMMON_IMAGE_NULL,
- MMIMMS_EDIT_PIC_CTRL_ID),
- CREATE_BUTTON_CTRL(LABEL_X2+2*LABEL_HEIGHT+1,LABEL_Y1,LABEL_X2+3*LABEL_HEIGHT,LABEL_Y2,
- GUI_BUTTON_ICON_CENTER,
- IMAGE_MMS_INSERT_RING_ICON,
- IMAGE_MMS_INSERT_RING_ICON,
- COMMON_IMAGE_NULL,
- MMIMMS_EDIT_RING_CTRL_ID),
- CREATE_BUTTON_CTRL(LABEL_X2+3*LABEL_HEIGHT+1,LABEL_Y1,LABEL_X2+4*LABEL_HEIGHT,LABEL_Y2,
- GUI_BUTTON_ICON_CENTER,
- IMAGE_MMS_DEL_SLIDE_ICON,
- IMAGE_MMS_DEL_SLIDE_ICON,
- IMAGE_MMS_DEL_SLIDE_GRAYED_ICON,
- MMIMMS_EDIT_DEL_SLIDE_CTRL_ID),
- CREATE_POP_MENU_CTRL(0,
- MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-4*MMI_POPUP_MENU_HEIGHT,
- MMI_POPUP_MENU_WIDTH-1,
- MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-1,
- MENU_MMS_POP_OPTION,
- MMIMMS_EDIT_MENU_CTRL_ID),
- END_WIN
- };
- #endif
- WINDOW_TABLE(MMIMMS_EDIT_SET_SEND_DATE_TAB) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_EDIT_SET_SEND_ONTIME_TIME),
- WIN_FUNC((uint32)Edit_HandleMMSSetSendDateWin),
- WIN_ID(MMIMMS_EDIT_SET_SEND_DATE_WIN_ID),
- CREATE_DATEEDITBOX_CTRL(MMIMMS_SET_ONTIME_LEFT, MMIMMS_SET_ONTIME_TOP, MMIMMS_SET_ONTIME_RIGHT, MMIMMS_SET_ONTIME_BOTTOM, YEAR_MONTH_DAY_TYPE, MMIMMS_SET_SEND_DATE_CTRL_ID),
- CREATE_TIMEEDITBOX_CTRL(MMIMMS_SET_ONTIME_LEFT, MMIMMS_SET_ONTIME_BOTTOM+1, MMIMMS_SET_ONTIME_RIGHT, MMIMMS_SET_ONTIME_BOTTOM+MMI_LIST_ITEM_HEIGHT, MMIMMS_SET_SEND_TIME_CTRL_ID),
- END_WIN
- };
- WINDOW_TABLE(MMIMMS_SETTING_EDIT_SIGN_TAB) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_EDIT),
- WIN_FUNC((uint32)Edit_HandleMMSEditSignWin),
- WIN_ID(MMIMMS_SETTING_EDIT_SIGN_WIN),
- //edit mms content
- CREATE_TEXTEDITBOX_CTRL(CONTENT_EDIT_X1, MMI_TITLE_HEIGHT, CONTENT_EDIT_X2,
- CONTENT_EDIT_Y2, MMIMMS_MAX_TEXT_LEN, MMIMMS_MAX_TEXT_LEN,
- IM_PINYIN_TYPE | IM_STROKE_TYPE | IM_CHARACTER_TYPE | IM_ENGLISH_TYPE | IM_DIGITAL_TYPE,
- IM_PINYIN_MODE, MMIMMS_EDITSIGN_CTRL_ID),
- CREATE_LABEL_CTRL(LABEL_X1, LABEL_Y1, LABEL_X2-LABEL_HEIGHT, LABEL_Y2,
- GUILABEL_LEFT, 0, MMIMMS_EDITSIGN_LABEL_CTRL_ID),
- CREATE_BUTTON_CTRL(LABEL_X2+LABEL_HEIGHT+1,LABEL_Y1,LABEL_X2+2*LABEL_HEIGHT,LABEL_Y2,
- GUI_BUTTON_ICON_CENTER,
- IMAGE_MMS_INSERT_VIDEO_ICON,//IMAGE_MMS_INSERT_RING_ICON,
- IMAGE_MMS_INSERT_VIDEO_ICON,//IMAGE_MMS_INSERT_RING_ICON,
- COMMON_IMAGE_NULL,
- MMIMMS_EDITSIGN_VIDEO_CTRL_ID),
- CREATE_BUTTON_CTRL(LABEL_X2+2*LABEL_HEIGHT+1,LABEL_Y1,LABEL_X2+3*LABEL_HEIGHT,LABEL_Y2,
- GUI_BUTTON_ICON_CENTER,
- IMAGE_MMS_INSERT_PIC_ICON,
- IMAGE_MMS_INSERT_PIC_ICON,
- COMMON_IMAGE_NULL,
- MMIMMS_EDITSIGN_PIC_CTRL_ID),
- CREATE_BUTTON_CTRL(LABEL_X2+3*LABEL_HEIGHT+1,LABEL_Y1,LABEL_X2+4*LABEL_HEIGHT,LABEL_Y2,
- GUI_BUTTON_ICON_CENTER,
- IMAGE_MMS_INSERT_RING_ICON,
- IMAGE_MMS_INSERT_RING_ICON,
- COMMON_IMAGE_NULL,
- MMIMMS_EDITSIGN_RING_CTRL_ID),
- END_WIN
- };
- //5.1.5 Edit: preview
- WINDOW_TABLE(MMIMMS_EDIT_PREVIEW_TAB) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_PREVIEW),
- WIN_FUNC((uint32)Edit_HandlePreviewMMSMsg),
- WIN_ID(MMIMMS_EDIT_PREVIEW_WIN_ID),
- CREATE_ANIMATION(0, 0, 1, 1,
- ANIM_EXTERNAL, 0, MMIMMS_EDIT_IMAGE_PREVIEW_CTRL_ID
- ),
- CREATE_BUTTON_CTRL(10, MMI_TITLE_HEIGHT+2, 28, MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT-1, GUI_BUTTON_ICON_CENTER,
- IMAGE_MMS_UP_NORMAL, IMAGE_MMS_UP_DOWN, COMMON_IMAGE_NULL,
- MMIMMS_EDIT_PREVIEW_LEFT_BUTTON_CTRL_ID),
- CREATE_BUTTON_CTRL(38, MMI_TITLE_HEIGHT+2, 56, MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT-1, GUI_BUTTON_ICON_CENTER,
- IMAGE_MMS_DOWN_NORMAL, IMAGE_MMS_DOWN_DOWN, COMMON_IMAGE_NULL,
- MMIMMS_EDIT_PREVIEW_RIGHT_BUTTON_CTRL_ID),
- CREATE_TEXTBOX_CTRL(PREVIEW_TEXT_X1, PREVIEW_TEXT_Y1, PREVIEW_TEXT_X2, PREVIEW_TEXT_Y2,
- MAINLCD_ID, MMIMMS_EDIT_TEXT_PREVIEW_CTRL_ID
- ),
- CREATE_LABEL_CTRL(PREVIEW_LABEL_LEFT, PREVIEW_LABEL_TOP, MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
- MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT-1, GUILABEL_RIGHT, 0, MMIMMS_EDIT_PREVIEW_LABEL_CTRL_ID),
- END_WIN
- };
- //5.1.13 Edit: set slide time
- WINDOW_TABLE(MMIMMS_EDIT_SLIDE_TIME_TAB) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_SET_SLIDE_TIME),
- WIN_FUNC((uint32) Edit_HandleSetSlideTimeWinMsg),
- WIN_ID(MMIMMS_EDIT_SLIDE_TIME_WIN_ID),
- CREATE_DIGITALEDITBOX_CTRL(0, MMI_TITLE_HEIGHT, MMI_MAINSCREEN_RIGHT_MAX_PIXEL, MMI_CLIENT_RECT_BOTTOM,
- 3, MMIMMS_EDIT_SLIDE_TIME_CTRL_ID),
- END_WIN
- };
- WINDOW_TABLE(MMIMMS_RECVING_MMS_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_DOWNLOADING),
- WIN_FUNC((uint32) Download_HandleDownloadingWin),
- WIN_ID(MMIMMS_DOWNLOAD_DOWNLOADING_WIN_ID),
- END_WIN
- };
- WINDOW_TABLE(MMIMMS_SENDING_MMS_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_SENDING),
- WIN_FUNC((uint32) SendMMS_HandleWaitingWin),
- WIN_ID(MMIMMS_SEND_MMS_WAITING_WIN_ID),
- END_WIN
- };
- WINDOW_TABLE(MMIMMS_MMSSPACE_LIST_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_MESSAGESPACE),
- WIN_FUNC((uint32) MMSSPACE_HandleListWinMsg),
- WIN_ID(MMIMMS_MMSSPACE_LIST_WIN_ID),
- CREATE_TEXTBOX_CTRL(0, TITLE_HEIGHT, MEMSTATE_TEXTBOX_X2, MEMSTATE_TEXTBOX_Y2,
- MAINLCD_ID, MMIMMS_MMSSPACE_TEXTBOX_CTRL_ID
- ),
- END_WIN
- };
- //5.4.1A Inbox: message list
- WINDOW_TABLE(MMIMMS_INBOX_LIST_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_INBOX),
- WIN_FUNC((uint32) Inbox_HandleListWinMsg),
- WIN_ID(MMIMMS_INBOX_LIST_WIN_ID),
- CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
- LISTBOX_TEXTLIST_E, LISTBOX_TEXT1_E, MMIMMS_INBOX_LIST_CTRL_ID),
- END_WIN
- };
- //5.4.1C Inbox : Option menu of MMS
- WINDOW_TABLE(MMIMMS_INBOX_MMSMENU_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_SMS_OPTION),
- WIN_FUNC((uint32) Inbox_HandleMMSMenuWinMsg),
- WIN_ID(MMIMMS_INBOX_MMSOPT_MENU_WIN_ID),
- CREATE_MENU_CTRL(MENU_X1, MENU_Y1, MENU_X2, MENU_Y2, MENU_MMS_INBOX_MMSOPTION, MMIMMS_INBOX_MMSOPT_MENU_CTRL_ID),
- END_WIN
- };
- //5.4.1C Inbox : Option menu of MMSNotification
- WINDOW_TABLE(MMIMMS_INBOX_MMSNOTIMENU_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_SMS_OPTION),
- WIN_FUNC((uint32) Inbox_HandleMMSMenuWinMsg),
- WIN_ID(MMIMMS_INBOX_MMSNOTIOPT_MENU_WIN_ID),
- CREATE_MENU_CTRL(MENU_X1, MENU_Y1, MENU_X2, MENU_Y2, MENU_MMS_INBOX_MMSNOTIOPTION, MMIMMS_INBOX_MMSOPT_MENU_CTRL_ID),
- END_WIN
- };
- //5.4.7 Inbox : Detail changed liangliu 2005-10-28
- WINDOW_TABLE(MMIMMS_INBOX_DETAIL_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_DETAIL),
- WIN_FUNC((uint32) Inbox_HandleMMSDetailWinMsg),
- WIN_ID(MMIMMS_INBOX_DETAIL_WIN_ID),
- CREATE_TEXTBOX_CTRL(MMS_DETAIL_LEFT, MMS_DETAIL_TOP, MMS_DETAIL_WIDTH, MMS_DETAIL_HEIGHT,
- MAINLCD_ID, MMIMMS_DETAIL_TEXTBOX_CTRL_ID
- ),
- END_WIN
- };
- //5.5.1A Sentbox: message list
- WINDOW_TABLE(MMIMMS_SENTBOX_LIST_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_SENTBOX),
- WIN_FUNC((uint32) Sentbox_HandleListWinMsg),
- WIN_ID(MMIMMS_SENTBOX_LIST_WIN_ID),
- CREATE_POP_MENU_CTRL(0,
- MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-5*MMI_POPUP_MENU_HEIGHT,
- MMI_POPUP_MENU_WIDTH-1,
- MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-1,
- MENU_MMS_SENTBOX_POP_OPTION,
- MMIMMS_SENTBOX_POPMENU_CTRL_ID),
- CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
- LISTBOX_TEXTLIST_E, LISTBOX_TEXT1_E, MMIMMS_SENTBOX_LIST_CTRL_ID),
- END_WIN
- };
- //5.7.1A Outbox: message list
- WINDOW_TABLE(MMIMMS_OUTBOX_LIST_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_OUTBOX),
- WIN_FUNC((uint32) Outbox_HandleListWinMsg),
- WIN_ID(MMIMMS_OUTBOX_LIST_WIN_ID),
- CREATE_POP_MENU_CTRL(0,
- MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-5*MMI_POPUP_MENU_HEIGHT,
- MMI_POPUP_MENU_WIDTH-1,
- MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-1,
- MENU_MMS_OUTBOX_POP_OPTION,
- MMIMMS_OUTBOX_POPMENU_CTRL_ID),
- CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
- LISTBOX_TEXTLIST_E, LISTBOX_TEXT1_E, MMIMMS_OUTBOX_LIST_CTRL_ID),
- END_WIN
- };
- //5.7.1A Draftbox: message list
- WINDOW_TABLE(MMIMMS_DRAFTBOX_LIST_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_DRAFTBOX),
- WIN_FUNC((uint32) DraftBox_HandleListWinMsg),
- WIN_ID(MMIMMS_DRAFTBOX_LIST_WIN_ID),
- CREATE_POP_MENU_CTRL(0,
- MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-3*MMI_POPUP_MENU_HEIGHT,
- MMI_POPUP_MENU_WIDTH-1,
- MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-1,
- MENU_MMS_DRAFTBOX_POP_OPTION,
- MMIMMS_DRAFTBOX_POPMENU_CTRL_ID),
- CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
- LISTBOX_TEXTLIST_E, LISTBOX_TEXT1_E, MMIMMS_DRAFTBOX_LIST_CTRL_ID),
- END_WIN
- };
- //5.8.0 setting win added by liangliu 2005-11-14
- WINDOW_TABLE(MMIMMS_SETTING_MENU_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_MMSSETTING),
- WIN_FUNC((uint32) Setting_HandleMenuWinMsg),
- WIN_ID(MMIMMS_SETTING_MENU_WIN_ID),
- CREATE_MENU_CTRL(MENU_X1, MENU_Y1, MENU_X2, MENU_Y2, MENU_MMS_SETTING, MMIMMS_SETTING_MENU_CTRL_ID),
- END_WIN
- };
- // menu window for NETWORK
- WINDOW_TABLE( MMIMMS_SETTING_NETWORK_WIN ) =
- {
- CLEAR_LCD,
- WIN_PRIO( WIN_ONE_LEVEL ),
- WIN_FUNC( (uint32)Setting_HandleNetworkWinMsg ),
- WIN_ID( MMIMMS_SETTING_NETWORK_WIN_ID ),
- WIN_TITLE_ID( TXT_MMS_NETWORK_SETTING ),
- CREATE_MENU_CTRL(MENU_X1, MENU_Y1, MENU_X2, MENU_Y2,MENU_MMS_SETTING_NETWORK, MMIMMS_SETTING_NETWORK_CTRL_ID),
- END_WIN
- };
- // menu window for SIGN
- WINDOW_TABLE( MMIMMS_SETTING_SIGN_WIN ) =
- {
- CLEAR_LCD,
- WIN_PRIO( WIN_ONE_LEVEL ),
- WIN_FUNC( (uint32)Setting_HandleSignWinMsg ),
- WIN_ID( MMIMMS_SETTING_SIGN_WIN_ID ),
- WIN_TITLE_ID( TXT_CMS_MMS_SIGN ),
- CREATE_MENU_CTRL(MENU_X1, MENU_Y1, MENU_X2, MENU_Y2,MENU_MMS_SETTING_SIGN, MMIMMS_SETTING_SIGN_CTRL_ID),
- END_WIN
- };
- //5.8.1 Setting : autodownload
- WINDOW_TABLE(MMIMMS_SETTING_AUTODOWNLOAD_LIST_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_AUTO_DOWNLOAD),
- WIN_FUNC((uint32) Setting_HandleAutoDownloadListWinMsg),
- WIN_ID(MMIMMS_SETTING_AUTO_DOWNLOAD_LIST_WIN_ID),
- CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
- LISTBOX_RADIOLIST_E, LISTBOX_RADIO1_E, MMIMMS_SETTING_AUTO_DOWNLOAD_LIST_CTRL_ID),
- END_WIN
- };
- //5.8.4 Setting : arrive report
- WINDOW_TABLE(MMIMMS_SETTING_ARRIVE_LIST_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_ARRIVE_REPORT),
- WIN_FUNC((uint32) Setting_HandleArriveReportWinMsg),
- WIN_ID(MMIMMS_SETTING_ARRIVE_REPORT_LIST_WIN),
- CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
- LISTBOX_RADIOLIST_E, LISTBOX_RADIO1_E, MMIMMS_SETTING_ARRIVE_REPORT_LIST_CTRL_ID),
- END_WIN
- };
- //5.8.5 Setting : read report
- WINDOW_TABLE(MMIMMS_SETTING_READREPORT_LIST_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_READ_REPORT),
- WIN_FUNC((uint32) Setting_HandleReadReportWinMsg),
- WIN_ID(MMIMMS_SETTING_READ_REPORT_LIST_WIN),
- CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
- LISTBOX_RADIOLIST_E, LISTBOX_RADIO1_E, MMIMMS_SETTING_READ_REPORT_LIST_CTRL_ID),
- END_WIN
- };
- //FNH add 0516
- WINDOW_TABLE(MMIMMS_SETTING_OPENSIGN_LIST_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_CMS_MMS_SIGN), //开启自动签名
- WIN_FUNC((uint32) Setting_HandleOpenSignWinMsg),
- WIN_ID(MMIMMS_SETTING_OPEN_SIGN_LIST_WIN),
- CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
- LISTBOX_RADIOLIST_E, LISTBOX_RADIO1_E, MMIMMS_SETTING_OPEN_SIGN_LIST_CTRL_ID),
- END_WIN
- };
- //5.8.6 Setting : anonumity
- WINDOW_TABLE(MMIMMS_SETTING_ANONYMITYWHETHER_LIST_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_ANONYMITY),
- WIN_FUNC((uint32) Setting_HandleAnonymityWinMsg),
- WIN_ID(MMIMMS_SETTING_ANONYMITY_LIST_WIN),
- CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
- LISTBOX_RADIOLIST_E, LISTBOX_RADIO1_E, MMIMMS_SETTING_ANONYMITY_LIST_CTRL_ID),
- END_WIN
- };
- //5.8.7 Setting : sound
- WINDOW_TABLE(MMIMMS_SETTING_SOUNDALLOWABLE_LIST_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_PLAY_SOUND),
- WIN_FUNC((uint32) Setting_HandleSoundWinMsg),
- WIN_ID(MMIMMS_SETTING_SOUND_LIST_WIN),
- CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
- LISTBOX_RADIOLIST_E, LISTBOX_RADIO1_E, MMIMMS_SETTING_SOUND_LIST_CTRL_ID),
- END_WIN
- };
- //5.8.8 Setting : advertising
- WINDOW_TABLE(MMIMMS_SETTING_ADVERTISINGALLOWABLE_LIST_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_ADVERTISING),
- WIN_FUNC((uint32) Setting_HandleAdvertisingWinMsg),
- WIN_ID(MMIMMS_SETTING_ADVERTISING_LIST_WIN),
- CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
- LISTBOX_RADIOLIST_E, LISTBOX_RADIO1_E, MMIMMS_SETTING_ADVERTISING_LIST_CTRL_ID),
- END_WIN
- };
- //5.8.2 Setting : Priority
- WINDOW_TABLE(MMIMMS_SETTING_PRIORITY_LIST_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_PRIORITY),
- WIN_FUNC((uint32) Setting_HandlePriorityListWinMsg),
- WIN_ID(MMIMMS_SETTING_PRIORITY_LIST_WIN_ID),
- CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
- LISTBOX_RADIOLIST_E, LISTBOX_RADIO1_E, MMIMMS_SETTING_PRIORITY_LIST_CTRL_ID),
- END_WIN
- };
- //5.8.3 Setting : mms duaration
- WINDOW_TABLE(MMIMMS_SETTING_VALIDE_PERIOD_LIST_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_SMS_SETTING_VP_TITLE),
- WIN_FUNC((uint32) Setting_HandleValidPeriodListWinMsg),
- WIN_ID(MMIMMS_SETTING_VALIDATE_PERIOD_LIST_WIN_ID),
- CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
- LISTBOX_RADIOLIST_E, LISTBOX_RADIO1_E, MMIMMS_SETTING_VALIDATE_PERIOD_LIST_CTRL_ID),
- END_WIN
- };
- //5.8.3 Setting : mmsc
- WINDOW_TABLE(MMIMMS_SETTING_MMSC_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_MMSC),
- WIN_FUNC((uint32) Setting_HandleMMSCWinMsg),
- WIN_ID(MMIMMS_SETTING_MMSC_WIN_ID),
- CREATE_TEXTEDITBOX_CTRL(EDIT_FULL_X1, EDIT_FULL_Y1, EDIT_FULL_X2, EDIT_FULL_Y2,
- MMIMMS_MMSC_MAX_LEN ,MMIMMS_MMSC_MAX_LEN,
- IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
- IM_ENGLISH_MODE, MMIMMS_SETTING_MMSC_CTRL_ID),
- END_WIN
- };
- //5.8.3 Setting : GATEWAY
- WINDOW_TABLE(MMIMMS_SETTING_GATEWAY_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_SETTING_GATEWAY),
- WIN_FUNC((uint32) Setting_HandleGateWayWinMsg),
- WIN_ID(MMIMMS_SETTING_GATEWAY_WIN_ID),
- CREATE_TEXTEDITBOX_CTRL(EDIT_FULL_X1, EDIT_FULL_Y1, EDIT_FULL_X2, EDIT_FULL_Y2,
- MMIMMS_GATEWAY_MAX_LEN ,MMIMMS_GATEWAY_MAX_LEN,
- IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
- IM_DIGITAL_MODE, MMIMMS_SETTING_GATEWAY_CTRL_ID),
- END_WIN
- };
- //5.8.3 Setting : PORT
- WINDOW_TABLE(MMIMMS_SETTING_PORT_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_SETTING_PORT),
- WIN_FUNC((uint32) Setting_HandlePortWinMsg),
- WIN_ID(MMIMMS_SETTING_PORT_WIN_ID),
- // CREATE_PHONENUMEDITBOX_CTRL(EDIT_FULL_X1, EDIT_FULL_Y1, EDIT_FULL_X2, EDIT_FULL_Y2,
- // MMIMMS_PORT_MAX_LEN, MMIMMS_SETTING_PORT_CTRL_ID),
- CREATE_TEXTEDITBOX_CTRL(EDIT_FULL_X1, EDIT_FULL_Y1, EDIT_FULL_X2, EDIT_FULL_Y2,
- MMIMMS_PORT_MAX_LEN, MMIMMS_PORT_MAX_LEN,
- IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
- IM_DIGITAL_MODE,
- MMIMMS_SETTING_PORT_CTRL_ID),
- END_WIN
- };
- //5.8.3 Setting : USERNAME
- WINDOW_TABLE(MMIMMS_SETTING_USERNAME_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_SETTING_USERNAME), //临时
- WIN_FUNC((uint32) Setting_HandleUserNameWinMsg),
- WIN_ID(MMIMMS_SETTING_USERNAME_WIN_ID),
- CREATE_TEXTEDITBOX_CTRL(EDIT_FULL_X1, EDIT_FULL_Y1, EDIT_FULL_X2, EDIT_FULL_Y2,
- MMIMMS_USERNAME_MAX_LEN ,MMIMMS_USERNAME_MAX_LEN,
- IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
- IM_ENGLISH_MODE, MMIMMS_SETTING_USERNAME_CTRL_ID),
- END_WIN
- };
- //5.8.3 Setting : PASSWORD
- WINDOW_TABLE(MMIMMS_SETTING_PASSWORD_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_SETTING_PASSWORD), //临时
- WIN_FUNC((uint32) Setting_HandlePasswordWinMsg),
- WIN_ID(MMIMMS_SETTING_PASSWORD_WIN_ID),
- CREATE_TEXTEDITBOX_CTRL(EDIT_FULL_X1, EDIT_FULL_Y1, EDIT_FULL_X2, EDIT_FULL_Y2,
- MMIMMS_PASSWORD_MAX_LEN, MMIMMS_PASSWORD_MAX_LEN,
- IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
- IM_ENGLISH_MODE,
- MMIMMS_SETTING_PASSWORD_CTRL_ID),
- END_WIN
- };
- //5.8.3 Setting : APN
- WINDOW_TABLE(MMIMMS_SETTING_APN_WIN) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_SETTING_APN), //临时
- WIN_FUNC((uint32) Setting_HandleAPNWinMsg),
- WIN_ID(MMIMMS_SETTING_APN_WIN_ID),
- CREATE_TEXTEDITBOX_CTRL(EDIT_FULL_X1, EDIT_FULL_Y1, EDIT_FULL_X2, EDIT_FULL_Y2,
- MMIMMS_APN_MAX_LEN, MMIMMS_APN_MAX_LEN,
- IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
- IM_ENGLISH_MODE,
- MMIMMS_SETTING_APN_CTRL_ID),
- END_WIN
- };
- //待保存的图象列表
- WINDOW_TABLE(MMIMMS_SAVE_IMAGE_LIST_TAB) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_IMAGE_LIST),
- WIN_FUNC((uint32) cmsmms_HandlesaveimageWinMsg),
- WIN_ID(MMIMMS_SAVE_IMAGE_LIST_WIN_ID),
- CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
- LISTBOX_TEXTLIST_E, LISTBOX_TEXT1_E, MMIMMS_SAVE_IMAGE_LIST_CTRL_ID),
- END_WIN
- };
- //待保存的声音列表
- WINDOW_TABLE(MMIMMS_SAVE_MUSIC_LIST_TAB) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_AUDIO_LIST),
- WIN_FUNC((uint32) cmsmms_HandlesavemusicWinMsg),
- WIN_ID(MMIMMS_SAVE_MUSIC_LIST_WIN_ID),
- CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
- LISTBOX_TEXTLIST_E, LISTBOX_TEXT1_E, MMIMMS_SAVE_MUSIC_LIST_CTRL_ID),
- END_WIN
- };
- //待保存的视频列表
- WINDOW_TABLE(MMIMMS_SAVE_VIDEO_LIST_TAB) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_TITLE_ID(TXT_MMS_VIDEO_LIST),
- WIN_FUNC((uint32) cmsmms_HandlesavevideoWinMsg),
- WIN_ID(MMIMMS_SAVE_VIDEO_LIST_WIN_ID),
- CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
- LISTBOX_TEXTLIST_E, LISTBOX_TEXT1_E, MMIMMS_SAVE_VIDEO_LIST_CTRL_ID),
- END_WIN
- };
- WINDOW_TABLE(MMIMMS_DOWNLOAD_MP3_NAME_WIN_TAB) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_FUNC((uint32)HandleDownloadmp3InputName ),
- WIN_ID(MMIMMS_DOWNLOAD_MP3_NAME_WIN_ID),
- WIN_TITLE_ID(TXT_DC_INPUTNAME),
- CREATE_TEXTEDITBOX_CTRL(MMIMMS_RENAME_RECT_LEFT,MMIMMS_RENAME_RECT_TOP,MMIMMS_RENAME_RECT_RIGHT,MMIMMS_RENAME_RECT_BOTTOM,
- MMIMMS_MAX_FILE_NAME_LEN, MMIMMS_MAX_FILE_NAME_LEN / 2,
- IM_PINYIN_TYPE | IM_STROKE_TYPE| IM_CHARACTER_TYPE | IM_ENGLISH_TYPE | IM_DIGITAL_TYPE, IM_PINYIN_MODE,
- MMIMMS_DOWNLOAD_MP3_NAME_EDITBOX_CTRL_ID),
- END_WIN
- };
- //video input name win
- WINDOW_TABLE(MMIMMS_DOWNLOAD_VIDEO_NAME_WIN_TAB) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_FUNC((uint32)HandleDownloadVideoInputName ),
- WIN_ID(MMIMMS_DOWNLOAD_VIDEO_NAME_WIN_ID),
- WIN_TITLE_ID(TXT_DC_INPUTNAME),
- CREATE_TEXTEDITBOX_CTRL(MMIMMS_RENAME_RECT_LEFT,MMIMMS_RENAME_RECT_TOP,MMIMMS_RENAME_RECT_RIGHT,MMIMMS_RENAME_RECT_BOTTOM,
- MMIMMS_MAX_FILE_NAME_LEN, MMIMMS_MAX_FILE_NAME_LEN / 2,
- IM_PINYIN_TYPE | IM_STROKE_TYPE| IM_CHARACTER_TYPE | IM_ENGLISH_TYPE | IM_DIGITAL_TYPE, IM_PINYIN_MODE,
- MMIMMS_DOWNLOAD_VIDEO_NAME_EDITBOX_CTRL_ID),
- END_WIN
- };
- //彩信主窗口
- WINDOW_TABLE( MMIMMS_MAIN_WIN_TAB ) =
- {
- CLEAR_LCD,
- WIN_PRIO( WIN_ONE_LEVEL ),
- WIN_FUNC( (uint32)Main_HandleMmsMainWin ),
- WIN_ID( MMIMSG_MAIN_WIN_ID ),
- WIN_TITLE_ID(TXT_CHATROOM_TYPE_MMS),
- CREATE_LISTBOX_CTRL(0,MMI_CLIENT_RECT_TOP,MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
- MMI_CLIENT_RECT_BOTTOM, LISTBOX_TEXTLIST_E,
- LISTBOX_TEXT1_E,MMIMMS_MAIN_LIST_CTRL_ID),
- CREATE_POP_MENU_CTRL(0,
- MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-3*MMI_POPUP_MENU_HEIGHT,
- MMI_POPUP_MENU_WIDTH,
- MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-1,
- MENU_MMIMMS_MAIN_VIEW,
- MMIMMS_MAIN_POPMENU_CTRL_ID),
- //WIN_STYLE(WS_HAS_SHORTCUTBAR),
- END_WIN
- };
- // MMS edit, select insert photo or Dpic window
- WINDOW_TABLE(MMIMMS_EDIT_SELECT_IMAGE_WIN_TAB) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_FUNC((uint32)MMS_HandleEditSelectImageWinMsg),
- WIN_ID( MMIMMS_EDIT_SELECT_IMAGE_WIN_ID ),
- WIN_TITLE_ID(TXT_MMS_INSERT_IMAGE),
- CREATE_MENU_CTRL(MENU_X1, MENU_Y1, MENU_X2, MENU_Y2, MENU_MMS_INSERT_IMAGE_OPT, MMIMMS_EDIT_SELECT_IMAGE_CTRL_ID),
- END_WIN
- };
- // MMS edit, select insert MP3 or ring window
- WINDOW_TABLE(MMIMMS_EDIT_SELECT_MUSIC_WIN_TAB) =
- {
- CLEAR_LCD,
- WIN_PRIO(WIN_ONE_LEVEL),
- WIN_FUNC((uint32)MMS_HandleEditSelectMusicWinMsg),
- WIN_ID( MMIMMS_EDIT_SELECT_MUSIC_WIN_ID ),
- WIN_TITLE_ID(TXT_MMS_INSERT_MUSIC),
- CREATE_MENU_CTRL(MENU_X1, MENU_Y1, MENU_X2, MENU_Y2, MENU_MMS_INSERT_MUSIC_OPT, MMIMMS_EDIT_SELECT_MUSIC_CTRL_ID),
- END_WIN
- };
- /*---------------------------------------------------------------------------*/
- /* FUNCTION DEFINITION */
- /*---------------------------------------------------------------------------*/
- /*****************************************************************************/
- // Description : 打开彩信主窗口
- // Global resource dependence :
- // Author:Bill.Ji
- // Note:
- /*****************************************************************************/
- PUBLIC void MMIMMS_OpenMainWindow(void)
- {
- if ( MMK_IsOpenWin( MMIMSG_MAIN_WIN_ID ))
- {
- MMK_ShowWindow(MMK_GetWinPtrBaseWinId(MMIMSG_MAIN_WIN_ID));
- // MMK_ShowWindow(MMK_GetWinPtrBaseWinId(MMIMMS_MAIN_MENU_WIN_ID));
- }
- else
- {
- MMK_CreateWin((uint32 *)MMIMMS_MAIN_WIN_TAB, PNULL);
- // MMK_CreateWin((uint32*)MMIMMS_MENUWIN_TAB, PNULL);
- }
- }
- /*****************************************************************************/
- // Description : 彩信主窗口消息处理函数
- // Global resource dependence :
- // Author:Bill.Ji
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Main_HandleMmsMainWin( MMI_WIN_ID_T win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param )
- {
- MMI_RESULT_E recode = MMI_RESULT_TRUE;
- MMI_CTRL_ID_T ctrl_id = 0;
- uint16 index;
- MMI_MENU_GROUP_ID_T group_id = 0;
- MMI_MENU_ID_T menu_id = 0;
- SCI_TRACE_LOW("Main_HandleMmsMainWin open %d",msg_id);
- switch( msg_id )
- {
- case MSG_OPEN_WINDOW:
- SCI_TRACE_LOW("Main_HandleMmsMainWin MSG_OPEN_WINDOW");
- s_mailbox_index = 0;
- MMK_SetAtvCtrl( win_id, MMIMMS_MAIN_LIST_CTRL_ID );
- MMICMSBRW_InitCache();
- //暂停mp3播放
- if(MMIMP3_IsMp3PlayingAsBg())
- {
- MMIMP3_SuspendMp3(TRUE);
- SCI_TRACE_LOW("MMIMP3__SuspendMp3: s_is_mms_suspend_mp3=TRUE");
- s_is_mms_suspend_mp3=TRUE;
- }
- MMK_SetWinSoftkeyId(win_id, STXT_OPTION, COMMON_TXT_NULL, STXT_RETURN, FALSE);
- break;
- case MSG_FULL_PAINT:
- SCI_TRACE_LOW("Main_HandleMmsMainWin MSG_FULL_PAINT");
- //MMITHEME_DrawMenuBarLine();
- Main_MmsInitCtrl(s_mailbox_index);
- break;
- case MSG_APP_OK:
- if(MMK_GetActiveCtrlId(win_id) != MMIMMS_MAIN_POPMENU_CTRL_ID)
- MMK_TrackPopupMenu(win_id);
- break;
- case MSG_MMS_READ_PLAY_SIGN_FAILED:
- {
- if (g_readsignstate== MMS_MSG_READ_SIGN_FOR_SET)
- {
- MMK_CreateWin((uint32 *)MMIMMS_SETTING_EDIT_SIGN_TAB,PNULL);
- }
- else if (g_readsignstate== MMS_MSG_READ_SIGN_FOR_EDIT)
- {
- g_mms_edit_status = MMS_EDIT_NEW_MMS;
- MMIMMS_WriteNewMMS();
- }
- else if (g_readsignstate == MMS_MSG_READ_SIGN_FOR_ANSWER_MMS)
- {
- MMK_CreateWin((uint32 *)MMIMMS_EDIT_WIN_TAB,PNULL);
- }
- }
- break;
- case MSG_MMS_READ_PLAY_SIGN_OK:
- SCI_TRACE_LOW("FNH MSG_MMS_READ_PLAY_SIGN");
- g_pcur_signdoc = MMS_New();
- SCI_ASSERT(g_pcur_signdoc != NULL);
- SCI_TRACE_LOW("FNH MSG_MMS_READ_PLAY_SIGN_OK before cms_parse_mms");
- cms_parse_mms((char *)"signtempfile.mms",g_pcur_signdoc);
- mmsf_Remove((char *)"signtempfile.mms");
- if (g_readsignstate== MMS_MSG_READ_SIGN_FOR_SET)
- {
- MMK_CreateWin((uint32 *)MMIMMS_SETTING_EDIT_SIGN_TAB,PNULL);
- }
- else if (g_readsignstate== MMS_MSG_READ_SIGN_FOR_EDIT)
- {
- g_mms_edit_status = MMS_EDIT_NEW_MMS;
- MMIMMS_WriteNewMMS();
- }
- else if (g_readsignstate == MMS_MSG_READ_SIGN_FOR_ANSWER_MMS)
- {
- MMK_CreateWin((uint32 *)MMIMMS_EDIT_WIN_TAB,PNULL);
- }
- break;
- case MSG_CTL_OK:
- case MSG_CTL_PENOK:
- case MSG_CTL_DBCLICK:
- ctrl_id = (MMI_CTRL_ID_T)param;
- switch( ctrl_id )
- {
- case MMIMMS_MAIN_LIST_CTRL_ID:
- index = GUILISTBOX_GetCurItemIndex( MMIMMS_MAIN_LIST_CTRL_ID );
- SCI_ASSERT(index < MMIMESSAGE_BOX_TOTAL+1);
- s_mailbox_index = index;
- if(0 == index)
- {
- //新建彩信
- Main_MmsNewMmsCallBack();
- }
- else
- {
- //彩信信箱
- MMIMMS_Apart_OpenMMSMailBox( index-1 );
- }
- break;
- // 查看菜单
- case MMIMMS_MAIN_POPMENU_CTRL_ID:
- GUIMENU_GetRetID((MMI_CTRL_ID_T)param, &group_id, &menu_id);
- if (ID_MMIMMS_MAIN_SET == menu_id)
- {
- MMK_CreateWin((uint32*)MMIMMS_SETTING_MENU_WIN, PNULL );
- }
- else if (ID_MMIMMS_MAIN_NETWORK == menu_id)
- {
- // MMICMSBRW_OpenSettingListWin();
- MMK_CreateWin((uint32 *)MMIMMS_SETTING_NETWORK_WIN,PNULL);
- }
- else if (ID_MMIMMS_MAIN_CAPACITY == menu_id)
- {
- MMK_CreateWin((uint32 *)MMIMMS_MMSSPACE_LIST_WIN,PNULL);
- }
- else
- {
- SCI_ASSERT(0);
- }
- break;
- default:
- break;
- }
- break;
- /*****************added by cloud6************************/
- case MSG_APP_WEB:
- index = GUILISTBOX_GetCurItemIndex( MMIMMS_MAIN_LIST_CTRL_ID );
- SCI_ASSERT(index < MMIMESSAGE_BOX_TOTAL+1);
- s_mailbox_index = index;
- if(0 == index)
- {
- //新建彩信
- Main_MmsNewMmsCallBack();
- }
- else
- {
- //彩信信箱
- MMIMMS_Apart_OpenMMSMailBox( index-1 );
- }
- break;
- /*******************end added*******************************/
- case MSG_GET_FOCUS:
- //set active control
- MMK_SetAtvCtrl( win_id, MMIMMS_MAIN_LIST_CTRL_ID );
- if(MMIMP3_IsMp3PlayingAsBg())
- {
- MMIMP3_SuspendMp3(TRUE);
- SCI_TRACE_LOW("MMIMP3__SuspendMp3: s_is_mms_suspend_mp3=TRUE");
- s_is_mms_suspend_mp3=TRUE;
- }
- break;
- case MSG_CLOSE_WINDOW:
- MMICMSBRW_FreeGlobalBuffer();
- destroy_mms_mem_file_info();//free all the virtual file when exit the menu win.
- //恢复mp3播放
- if(s_is_mms_suspend_mp3)
- {
- s_is_mms_suspend_mp3=FALSE;
- MMIMP3_ContinuePlayMp3();
- }
- if (g_pcur_signdoc != NULL) //自动签名
- {
- SCI_TRACE_LOW("FNH before free p_cur_edit");
- MMSDelDocument(g_pcur_signdoc);
- g_pcur_signdoc = NULL;
- }
- break;
- case MSG_APP_CANCEL:
- case MSG_CTL_CANCEL:
- if(MMK_GetActiveCtrlId(win_id) == MMIMMS_MAIN_POPMENU_CTRL_ID)
- {
- uint8 i = 4;
- uint32 j = 0x00ad0002;
- MMK_SetAtvCtrl(win_id, MMIMMS_MAIN_LIST_CTRL_ID);
- MMK_PostMsg(win_id, MSG_TP_PRESS_DOWN, (DPARAM)&j, i);
- }
- else
- {
- MMK_CloseWin(win_id);
- } //cloud6
- break;
- default:
- SCI_TRACE_LOW("Main_HandleMmsMainWin default");
- recode = MMI_RESULT_FALSE;
- break;
- }
- return recode;
- }
- /*****************************************************************************/
- // Description : 彩信主窗口控件初始化
- // Global resource dependence :
- // Author:Bill.Ji
- // Note:
- /*****************************************************************************/
- LOCAL void Main_MmsInitCtrl( uint8 cur_index )
- {
- uint16 i;
- MMI_STRING_T text_str;
- GUI_LISTBOX_ITEM_T item;
- MMI_STRING_T string = { 0, FALSE, PNULL };
- //初始化列表
- GUILISTBOX_SetMaxItem(MMIMMS_MAIN_LIST_CTRL_ID, MMIMESSAGE_BOX_TOTAL+1);
- //新建
- // SCI_MEMSET(&item, 0x00, sizeof(GUI_LISTBOX_ITEM_T));
- SCI_MEMSET(&item, 0, sizeof(GUI_LISTBOX_ITEM_T));
- // 获得文本
- MMI_GetLabelTextByLang(TXT_ADD, &string);
- item.is_ucs2 = string.is_ucs2;
- item.str_len = string.length;
- SCI_MEMCPY(item.str, string.str_ptr, string.length);
- item.left_icon_id = IMAGE_MMS_NEW;
- GUILISTBOX_AppendItem(MMIMMS_MAIN_LIST_CTRL_ID, &item);
- SCI_TRACE_LOW("Main_MmsInitCtrl getnew");
- for ( i = 0; i < MMIMESSAGE_BOX_TOTAL; i++ )
- {
- SCI_TRACE_LOW("Main_MmsInitCtrl Main_MmsInitList:%d",i);
- Main_MmsInitList( MMIMESSAGE_INBOX+i );
- }
- GUILISTBOX_SetCurItemIndex(MMIMMS_MAIN_LIST_CTRL_ID, cur_index);
- }
- /*****************************************************************************/
- // Description : 彩信主窗口列表控件初始化
- // Global resource dependence :
- // Author:Bill.Ji
- // Note:
- /*****************************************************************************/
- LOCAL void Main_MmsInitList( MMIMSG_MAILBOX_TYPE_E mailbox_type )
- {
- MMI_STRING_T item_str;
- GUI_LISTBOX_ITEM_T item_list;
- uint8 num_buf[10];
- uint8 ucs2_buf[22];
- uint8 count = 0;
- uint8 count_len = 0;
- MMI_IMAGE_ID_T icon_id = 0;
- //初始化
- SCI_MEMSET(&item_list, 0, sizeof(GUI_LISTBOX_ITEM_T));
- SCI_MEMSET(&item_str, 0, sizeof(MMI_STRING_T));
- SCI_MEMSET(num_buf, 0, sizeof(num_buf));
- SCI_MEMSET(ucs2_buf, 0, sizeof(ucs2_buf));
- // SCI_TRACE_LOW("Main_MmsInitCtrl before count g_pManager =%p,g_pManager->currentfolder = %d",g_pManager,g_pManager->currentfolder);
- //读取信箱的条数
- count = MMIMMS_GetMailboxMsgNum( mailbox_type );
- // g_pManager->currentfolder =g_pManager->inboxfolder;
- // count = MMIMMS_GetMessageNum(g_pManager->currentfolder);
- SCI_TRACE_LOW("Main_MmsInitCtrl after count");
- sprintf((char*)num_buf, " (%d)", count);
- //设置列表项
- switch( mailbox_type )
- {
- case MMIMESSAGE_INBOX:
- MMI_GetLabelTextByLang(TXT_MMS_INBOX, &item_str);
- item_list.left_icon_id = IMAGE_MMS_INBOX;
- break;
- case MMIMESSAGE_SENTBOX:
- MMI_GetLabelTextByLang(TXT_MMS_SENTBOX, &item_str);
- item_list.left_icon_id = IMAGE_SEND_SUCCESS_MMS_ICON;
- break;
- case MMIMESSAGE_OUTBOX:
- MMI_GetLabelTextByLang(TXT_MMS_OUTBOX, &item_str);
- item_list.left_icon_id = IMAGE_SEND_FAIL_MMS_ICON;
- break;
- case MMIMESSAGE_DRAFTBOX:
- MMI_GetLabelTextByLang(TXT_MMS_DRAFTBOX, &item_str);
- item_list.left_icon_id = IMAGE_DRAFT_MMS_ICON;
- break;
- default:
- SCI_ASSERT(FALSE);
- break;
- }
- MMI_MEMCPY(item_list.str, LISTBOX_STRING_MAX_NUM, item_str.str_ptr,
- item_str.length, item_str.length);
- item_list.str_len = (uint8)item_str.length ;
- item_list.is_ucs2 = item_str.is_ucs2;
- count_len = strlen(( char *)num_buf );
- if ( item_str.is_ucs2 )
- {
- MMI_NumStrToUCS2( num_buf, count_len, ucs2_buf );
- count_len += count_len;
- }
- else
- {
- MMI_MEMCPY(ucs2_buf, 20, num_buf, count_len, count_len);
- }
- MMI_MEMCPY(item_list.str+item_list.str_len,LISTBOX_STRING_MAX_NUM - item_list.str_len,
- ucs2_buf, count_len, count_len);
- item_list.str_len += count_len ;
- //添加到列表控件
- SCI_TRACE_LOW("Main_MmsInitCtrl before append");
- GUILISTBOX_AppendItem(MMIMMS_MAIN_LIST_CTRL_ID, &item_list);
- SCI_TRACE_LOW("Main_MmsInitCtrl after append");
- }
- /*****************************************************************************/
- // Description : 写新彩信的回调函数
- // Global resource dependence :
- // Author:Bill.Ji
- // Note:
- /*****************************************************************************/
- LOCAL MMI_RESULT_E Main_MmsNewMmsCallBack( void )
- {
- MMK_WinGetActive(MMIMSG_MAIN_WIN_ID);
- g_filetype = MMICMS_GetCurrentFFS();
- if ((g_nv_setting_mirror.auto_sign == MMS_MSG_SETTINGS_ON) && (g_filetype != FS_INVALID))
- {
- MMIMMS_CreateReadMMSWaitingWin();
- g_readsignstate= MMS_MSG_READ_SIGN_FOR_EDIT;
- MMIMMS_ReadAutosign() ;
- }
- else if (g_nv_setting_mirror.auto_sign == MMS_MSG_SETTINGS_OFF)
- {
- g_mms_edit_status = MMS_EDIT_NEW_MMS;
- MMIMMS_WriteNewMMS();
- }
- return MMI_RESULT_TRUE;
- }
- /*****************************************************************************/
- // Description : 5.1A set MMS label text (N/M x.yK),
- // and 2 icons that indicate whether there is image or music in this slide.
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note: N: Current slide index. M: total slide
- // x: how many ONE_KILOs y: how many hundreds
- /*****************************************************************************/
- LOCAL BOOLEAN Edit_SetLabelContent(MMI_CTRL_ID_T ctrl_id,pMMS_EDocument p_cur_edoc)
- {
- T_UWORD slide_index = 0;
- uint32 slide_total_num = 0;
- T_UWORD total_size = 0;
- char label_string[64] = {0};
- MMI_STRING_T string_save;
- GUI_BUTTON_BG_T add_pic_ctl_bg = {GUI_BUTTON_BG_IMAGE_ONLY, IMAGE_MMS_INSERT_PIC_ICON, IMAGE_MMS_INSERT_PIC_ICON, 0, 0};
- GUI_BUTTON_BG_T del_pic_ctl_bg = {GUI_BUTTON_BG_IMAGE_ONLY, IMAGE_MMS_DEL_PIC_ICON, IMAGE_MMS_DEL_PIC_ICON, 0, 0};
- GUI_BUTTON_BG_T add_ring_ctl_bg = {GUI_BUTTON_BG_IMAGE_ONLY, IMAGE_MMS_INSERT_RING_ICON, IMAGE_MMS_INSERT_RING_ICON, 0, 0};
- GUI_BUTTON_BG_T del_ring_ctl_bg = {GUI_BUTTON_BG_IMAGE_ONLY, IMAGE_MMS_DEL_RING_ICON, IMAGE_MMS_DEL_RING_ICON, 0, 0};
- GUI_BUTTON_BG_T add_video_ctl_bg = {GUI_BUTTON_BG_IMAGE_ONLY, IMAGE_MMS_INSERT_VIDEO_ICON, IMAGE_MMS_INSERT_VIDEO_ICON, 0, 0};
- GUI_BUTTON_BG_T del_video_ctl_bg = {GUI_BUTTON_BG_IMAGE_ONLY, IMAGE_MMS_DEL_VIDEO_ICON, IMAGE_MMS_DEL_VIDEO_ICON, 0, 0};
- uint32 slide_num = 0;
- SCI_TRACE_LOW("Edit_SetLabelContent enter");
- slide_index = MMSGetSlideIndex(p_cur_edoc);
- slide_total_num = MMSGetSlideCount(p_cur_edoc);
- total_size = p_cur_edoc->totalsize;
- SCI_TRACE_LOW("%f",p_cur_edoc->totalsize);
- // total_size += 99; //up trunk
- SCI_MEMSET(label_string, 0, 64);
- sprintf(label_string, "%d/%d %d.%dk",
- (int)slide_index, //N
- (int)slide_total_num, //M
- (int)(total_size / ONE_KILO),//1000, //x
- (int)((total_size % ONE_KILO) / 100) //y
- );
- string_save.is_ucs2 = FALSE;
- string_save.length = SCI_STRLEN(label_string);
- SCI_ASSERT(string_save.length < 64);
- string_save.str_ptr = (uint8 *)label_string;
- GUILABEL_SetText(ctrl_id, &string_save, FALSE);
- //whether image exist
- if (p_cur_edoc->slide_cur->image_flag == 1)
- {
- //Edit_DrawIcon(LABEL_X2 + 1, LABEL_Y1, IMAGE_MMS_INSERT_PIC_ICON);
- GUIBUTTON_SetBackGround(MMIMMS_EDIT_PIC_CTRL_ID, del_pic_ctl_bg);
- }
- else
- {
- GUIBUTTON_SetBackGround(MMIMMS_EDIT_PIC_CTRL_ID, add_pic_ctl_bg);
- }
- //whether audio exist
- if (p_cur_edoc->slide_cur->audiosize !=0)
- {
- //Edit_DrawIcon(LABEL_X2 + LABEL_HEIGHT + 1, LABEL_Y1, IMAGE_MMS_INSERT_RING_ICON);
- GUIBUTTON_SetBackGround(MMIMMS_EDIT_RING_CTRL_ID, del_ring_ctl_bg);
- }
- else
- {
- GUIBUTTON_SetBackGround(MMIMMS_EDIT_RING_CTRL_ID, add_ring_ctl_bg);
- }
- //whether video exist
- if (p_cur_edoc->slide_cur->video_flag == 1)
- {
- //Edit_DrawIcon(LABEL_X2 + LABEL_HEIGHT + 1, LABEL_Y1, IMAGE_MMS_INSERT_RING_ICON);
- GUIBUTTON_SetBackGround(MMIMMS_EDIT_VIDEO_CTRL_ID, del_video_ctl_bg);
- }
- else
- {
- GUIBUTTON_SetBackGround(MMIMMS_EDIT_VIDEO_CTRL_ID, add_video_ctl_bg);
- }
- slide_num=MMSGetSlideCount(p_cur_edoc);
- if(slide_num <= 1)
- {
- GUIBUTTON_SetGrayed(MMIMMS_EDIT_DEL_SLIDE_CTRL_ID, TRUE, FALSE);
- }
- else
- {
- GUIBUTTON_SetGrayed(MMIMMS_EDIT_DEL_SLIDE_CTRL_ID, FALSE, FALSE);
- }
- return TRUE;
- }
- /*****************************************************************************/
- // Description : 5.1A set MMS label text (N/M x.yK),
- // and 2 icons that indicate whether there is image or music in this slide.
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note: N: Current slide index. M: total slide
- // x: how many ONE_KILOs y: how many hundreds
- /*****************************************************************************/
- LOCAL BOOLEAN Edit_SetSignLabelContent(MMI_CTRL_ID_T ctrl_id,pMMS_EDocument p_cur_edoc)
- {
- T_UWORD slide_index = 0;
- uint32 slide_total_num = 0;
- T_UWORD total_size = 0;
- char label_string[64] = {0};
- MMI_STRING_T string_save;
- GUI_BUTTON_BG_T add_pic_ctl_bg = {GUI_BUTTON_BG_IMAGE_ONLY, IMAGE_MMS_INSERT_PIC_ICON, IMAGE_MMS_INSERT_PIC_ICON, 0, 0};
- GUI_BUTTON_BG_T del_pic_ctl_bg = {GUI_BUTTON_BG_IMAGE_ONLY, IMAGE_MMS_DEL_PIC_ICON, IMAGE_MMS_DEL_PIC_ICON, 0, 0};
- GUI_BUTTON_BG_T add_ring_ctl_bg = {GUI_BUTTON_BG_IMAGE_ONLY, IMAGE_MMS_INSERT_RING_ICON, IMAGE_MMS_INSERT_RING_ICON, 0, 0};
- GUI_BUTTON_BG_T del_ring_ctl_bg = {GUI_BUTTON_BG_IMAGE_ONLY, IMAGE_MMS_DEL_RING_ICON, IMAGE_MMS_DEL_RING_ICON, 0, 0};
- GUI_BUTTON_BG_T add_video_ctl_bg = {GUI_BUTTON_BG_IMAGE_ONLY, IMAGE_MMS_INSERT_VIDEO_ICON, IMAGE_MMS_INSERT_VIDEO_ICON, 0, 0};
- GUI_BUTTON_BG_T del_video_ctl_bg = {GUI_BUTTON_BG_IMAGE_ONLY, IMAGE_MMS_DEL_VIDEO_ICON, IMAGE_MMS_DEL_VIDEO_ICON, 0, 0};
- uint32 slide_num = 0;
- SCI_TRACE_LOW("Edit_SetSignLabelContent enter");
- slide_index = MMSGetSlideIndex(p_cur_edoc);
- slide_total_num = MMSGetSlideCount(p_cur_edoc);
- total_size = p_cur_edoc->totalsize;
- SCI_TRACE_LOW("%f",p_cur_edoc->totalsize);
- // total_size += 99; //up trunk
- SCI_MEMSET(label_string, 0, 64);
- sprintf(label_string, "%d/%d %d.%dk",
- (int)slide_index, //N
- (int)slide_total_num, //M
- (int)(total_size / ONE_KILO),//1000, //x
- (int)((total_size % ONE_KILO) / 100) //y
- );
- string_save.is_ucs2 = FALSE;
- string_save.length = SCI_STRLEN(label_string);
- SCI_ASSERT(string_save.length < 64);
- string_save.str_ptr = (uint8 *)label_string;
- GUILABEL_SetText(ctrl_id, &string_save, FALSE);
- //whether image exist
- if (p_cur_edoc->slide_cur->image_flag == 1)
- {
- //Edit_DrawIcon(LABEL_X2 + 1, LABEL_Y1, IMAGE_MMS_INSERT_PIC_ICON);
- GUIBUTTON_SetBackGround(MMIMMS_EDITSIGN_PIC_CTRL_ID, del_pic_ctl_bg);
- }
- else
- {
- GUIBUTTON_SetBackGround(MMIMMS_EDITSIGN_PIC_CTRL_ID, add_pic_ctl_bg);
- }
- //whether audio exist
- if (p_cur_edoc->slide_cur->audiosize !=0)
- {
- //Edit_DrawIcon(LABEL_X2 + LABEL_HEIGHT + 1, LABEL_Y1, IMAGE_MMS_INSERT_RING_ICON);
- GUIBUTTON_SetBackGround(MMIMMS_EDITSIGN_RING_CTRL_ID, del_ring_ctl_bg);
- }
- else
- {
- GUIBUTTON_SetBackGround(MMIMMS_EDITSIGN_RING_CTRL_ID, add_ring_ctl_bg);
- }
- //whether video exist
- if (p_cur_edoc->slide_cur->video_flag == 1)
- {
- //Edit_DrawIcon(LABEL_X2 + LABEL_HEIGHT + 1, LABEL_Y1, IMAGE_MMS_INSERT_RING_ICON);
- GUIBUTTON_SetBackGround(MMIMMS_EDITSIGN_VIDEO_CTRL_ID, del_video_ctl_bg);
- }
- else
- {
- GUIBUTTON_SetBackGround(MMIMMS_EDITSIGN_VIDEO_CTRL_ID, add_video_ctl_bg);
- }
- return TRUE;
- }
- /*****************************************************************************/
- // Description : 5.1A set MMS edit control text
- // Global resource dependence :
- // Author:Bruce.Chi
- // Note:
- /*****************************************************************************/
- LOCAL BOOLEAN Edit_SetEditCtrlContent(MMI_CTRL_ID_T ctrl_id, pMMS_EDocument p_cur_edoc)
- {
- TEXTEDIT_STRING_INFO_T edit_string;
- MMI_STRING_T saved_string;
- int16 slide_count= 0;
- T_Composer_Text mms_text;
- slide_count = MMSGetSlideCount(p_cur_edoc);
- if (slide_count == 0)
- {
- MMS_New_Slide(p_cur_edoc);
- if((p_cur_edoc == g_peditdoc)
- &&((g_mms_edit_status == MMS_EDIT_NEW_MMS)||(g_mms_edit_status == MMS_EDIT_ANSWER_MMS))
- &&(g_nv_setting_mirror.auto_sign == MMS_MSG_SETTINGS_ON)
- &&(g_filetype != FS_INVALID)
- && (g_pcur_signdoc != NULL))
- {
- pMMS_Slide pSlide = NULL;
- pSlide = g_pcur_signdoc->slide_cur;
- g_peditdoc->slide_cur->next = pSlide;
- pSlide->prev = g_peditdoc->slide_cur;
- g_peditdoc->totalsize = g_peditdoc->totalsize + g_pcur_signdoc->totalsize - 500; //这里的500个字节是库里初始化时加的,所以这里要减去
- }
- }
- SCI_MEMSET(&mms_text, 0, sizeof(mms_text));
- if(Edit_CurContentTextExist(p_cur_edoc))
- {
- saved_string = Edit_GetContentText(p_cur_edoc);
- saved_string.str_ptr[saved_string.length] = ' ';
- GUIEDITBOX_SetTextEditBoxStringInfo(
- ctrl_id,
- saved_string.str_ptr,
- saved_string.length,
- saved_string.is_ucs2
- );
- }
- else
- {
- GUIEDITBOX_ClearAllStr(ctrl_id);
- }
- return TRUE;
- }
- /*****************************************************************************/
- // Description : to parse the multisend dest address for mms
- // Global resource dependence :
- // Author:yuhua.shi
- // Note:
- /*****************************************************************************/
- void MMIMMS_ParseDestAddr(TEXTEDIT_STRING_INFO_T* text_info, To_Addr* addr_list)
- {
- uint16 i = 0;
- uint16 start_index = 0, end_index = 0;
- uint8 addr_len = 0;
- uint8 address[MMIMMS_MAX_ADDRESS_LEN+2];
- TEXTEDIT_STRING_INFO_T* p_text_info = text_info;
- SCI_ASSERT(PNULL != p_text_info);
- SCI_ASSERT(FALSE == p_text_info->is_ucs2);
- SCI_ASSERT(addr_list != PNULL);
- //there is no dest address, return
- if((0 == p_text_info->str_len) || (' ' == p_text_info->str_ptr))
- {
- SCI_TRACE_LOW("MMIMMS::MMIMMS_ParseDestAddr(), no address!");
- return;
- }
- //delete all dest address
- Edit_DeleteToAddrAll(addr_list);
- SCI_MEMSET(address, 0, MMIMMS_MAX_ADDRESS_LEN+2);
- for (i=0; i<p_text_info->str_len; i++)
- {
- //process the string when current char is comma
- if(MMS_ADDRESS_SEPERATE_SYMBOL == p_text_info->str_ptr[i])
- {
- //the first char is comma, skip it and next continue
- if(0 == i)
- {
- start_index = 1;
- continue;
- }
- //record the comma char's index
- end_index = i;
- SCI_ASSERT(start_index <= end_index);
- //there is no other string between the two comma, so skip it
- if(start_index == end_index)
- {
- start_index = end_index + 1;
- continue;
- }
- //get the address string
- addr_len = end_index - start_index;
- addr_len = (addr_len <= MMIMMS_MAX_ADDRESS_LEN) ? addr_len : MMIMMS_MAX_ADDRESS_LEN;
- strncpy((char*)address, (char*)&p_text_info->str_ptr[start_index], addr_len);
- address[addr_len] = ' ';
- //set the address string to dest address
- Edit_AddToAddr((uint8 *)address,addr_list);
- //record the new string start index
- start_index = end_index + 1;
- }
- }
- //get the last address string if exist
- if(start_index < p_text_info->str_len)
- {
- //get the address string
- addr_len = p_text_info->str_len - start_index;
- addr_len = (addr_len <= MMIMMS_MAX_ADDRESS_LEN) ? addr_len : MMIMMS_MAX_ADDRESS_LEN;
- strncpy((char*)address, (char*)&p_text_info->str_ptr[start_index], addr_len);
- address[addr_len] = ' ';
- //set the address string to dest address
- Edit_AddToAddr((uint8 *)address,addr_list);
- }
- }
- /*****************************************************************************/
- // Description : to handle the message of editwin
- // Global resource dependence : is_need_to_load_former_text
- // Author:louis.wei
- // Note:
- /*****************************************************************************/
- static BOOLEAN is_need_to_load_former_text = FALSE; //编辑彩信,按确定键和1键(弹出符号表),都能产生lose_focus消息,要区分开。
- static MMI_MENU_ID_T s_opt_menu_id;
- static MMI_CTRL_ID_T getwin_contrl_id = MMIMMS_EDIT_CTRL_ID;
- LOCAL MMI_RESULT_E Edit_HandleEditMMSWinMsg(
- MMI_WIN_ID_T win_id,
- MMI_MESSAGE_ID_E msg_id,
- DPARAM param
- )
- {
- MMI_RESULT_E err_code = MMI_RESULT_TRUE;
- MMI_CTRL_ID_T edit_contrl_id = MMIMMS_EDIT_CTRL_ID;
- MMI_CTRL_ID_T subject_contrl_id = MMIMMS_EDIT_SUBJECT_CTRL_ID;
- MMI_CTRL_ID_T address_contrl_id = MMIMMS_ADDR_EDITBOX_CTRL_ID;
- MMI_CTRL_ID_T address_cc_contrl_id = MMIMMS_ADDR_EDITBOX_MMSCC_CTRL_ID;
- MMI_CTRL_ID_T address_bcc_contrl_id = MMIMMS_ADDR_EDITBOX_MMSBCC_CTRL_ID;
- MMI_MENU_ID_T menu_id = 0;
- MMI_MENU_GROUP_ID_T group_id = 0;
- uint32 slide_num = 0;
- T_Composer_Image composer_img;
- T_Composer_Audio composer_audio;
- T_Composer_Video composer_video;
- MMIMULTIM_SELECTED_RETURN_T *multim_return_info_ptr = PNULL;
- MMIMPEG4_BUFFER_FILE_INFO_T *mpeg4_return_info_ptr = PNULL;
- MMIMP3_TETURN_INFO_T *mp3_return_info_ptr = PNULL;
- uint8 tele_num[MMIMMS_MAX_ADDRESS_LEN + 2] = {0};
- MMI_STRING_T prompt_str = { 0, FALSE, PNULL };
- SAVEFS_WRITE_RESULT savefs_result = SAVEFS_WRITE_SUCCEED;
- MMI_STRING_T waiting_str = { 0, FALSE, PNULL };
- FFS_OVERLAPPED_RESULT_T *efs_result_ptr = PNULL;
- uint32 button_index = 0;
- uint8 *addr_ptr = PNULL;
- uint8 max_selected_num = 0;
- TEXTEDIT_STRING_INFO_T addr_edit_string;
- TEXTEDIT_STRING_INFO_T subj_edit_string;
- TEXTEDIT_STRING_INFO_T content_edit_string;
- uint8 all_addr_str[MMIMMS_MAX_ADDRESS_NUM*(MMIMMS_MAX_ADDRESS_LEN+2)] = {0};
- uint16 all_addr_str_len = 0;
- MMI_STRING_T saved_subj_string = { 0, FALSE, PNULL };
- uint8 exist_addr_num = 0;
- TEXTEDIT_STRING_INFO_T edit_string;
- MMI_STRING_T saved_string;
- int32 i_size_free = 0;
- To_Addr* addr_list = PNULL;
- SCI_TRACE_LOW("Edit_HandleEditMMSWinMsg ENTER msg_id=%d",msg_id);
- switch(msg_id)
- {
- case MSG_FULL_PAINT:
- SCI_TRACE_LOW("Edit_HandleEditMMSWinMsg MSG_FULL_PAINT");
- MMIMMS_CLEAR_CLIENT();
- SCI_TRACE_LOW("Edit_HandleEditMMSWinMsg MSG_FULL_PAINT clear client over");
- //set label window text
- Edit_SetLabelContent(MMIMMS_EDIT_LABEL_CTRL_ID,g_peditdoc);
- break;
- case MSG_OPEN_WINDOW:
- if (MMS_EDIT_SEND_IMAGE != g_mms_edit_status)
- {
- MMICMSBRW_InitCache(); //fnh add
- }
- MMIMMS_Construction();
- GUIEDITBOX_SetEditBoxScroll(address_contrl_id, SCROLLBAR_NONE);
- GUIEDITBOX_SetEditBoxToSingle(address_contrl_id, SINGLE_ALIGN_CENTER);
- GUIEDITBOX_SetInputType(address_contrl_id, INPUT_KEYBOARD_TYPE);
- GUIEDITBOX_SetMutiPhoneNumStyle(address_contrl_id);
- GUIEDITBOX_SetEditBoxScroll(address_cc_contrl_id, SCROLLBAR_NONE);
- GUIEDITBOX_SetEditBoxToSingle(address_cc_contrl_id, SINGLE_ALIGN_CENTER);
- GUIEDITBOX_SetInputType(address_cc_contrl_id, INPUT_KEYBOARD_TYPE);
- GUIEDITBOX_SetMutiPhoneNumStyle(address_cc_contrl_id);
- GUIEDITBOX_SetEditBoxScroll(address_bcc_contrl_id, SCROLLBAR_NONE);
- GUIEDITBOX_SetEditBoxToSingle(address_bcc_contrl_id, SINGLE_ALIGN_CENTER);
- GUIEDITBOX_SetInputType(address_bcc_contrl_id, INPUT_KEYBOARD_TYPE);
- GUIEDITBOX_SetMutiPhoneNumStyle(address_bcc_contrl_id);
- GUIEDITBOX_SetEditBoxScroll(MMIMMS_EDIT_SUBJECT_CTRL_ID, SCROLLBAR_NONE);
- GUIEDITBOX_SetEditBoxToSingle(MMIMMS_EDIT_SUBJECT_CTRL_ID, SINGLE_ALIGN_CENTER);
- MMK_SetWinSoftkeyId(win_id, STXT_OPTION, COMMON_TXT_NULL, STXT_RETURN, FALSE);
- MMK_SetWinSKBButton(win_id, MMI_SOFTKEYBAR_LEFT_ICON, IMAGE_PICTURE_PREV_PAGE_ON,IMAGE_PICTURE_PREV_PAGE_OFF,COMMON_IMAGE_NULL, TRUE);
- MMK_SetWinSKBButton(win_id, MMI_SOFTKEYBAR_MIDDLE_ICON, IMAGE_MMS_PREVIEW_PLAY,IMAGE_MMS_PREVIEW_PLAY,COMMON_IMAGE_NULL, TRUE);
- MMK_SetWinSKBButton(win_id, MMI_SOFTKEYBAR_RIGHT_ICON, IMAGE_PICTURE_NEXT_PAGE_ON,IMAGE_PICTURE_NEXT_PAGE_OFF,COMMON_IMAGE_NULL, TRUE);
- //need to load former text
- is_need_to_load_former_text = TRUE;
- //暂停mp3播放
- if(MMIMP3_IsMp3PlayingAsBg())
- {
- MMIMP3_SuspendMp3(TRUE);
- s_is_mmscontent_suspend_mp3 = TRUE;
- }
- //set address lable
- MMI_GetLabelTextByLang(TXT_MMS_EDIT_MMS_TO, &prompt_str);
- GUIBUTTON_SetText(MMIMMS_EDIT_SELETENUM_CTRL_ID, &prompt_str);
- MMI_GetLabelTextByLang(TXT_MMS_EDIT_MMS_CC, &prompt_str);
- GUIBUTTON_SetText(MMIMMS_EDIT_SELETENUM_MMSCC_CTRL_ID, &prompt_str);
- MMI_GetLabelTextByLang(TXT_MMS_EDIT_MMS_BCC, &prompt_str);
- GUIBUTTON_SetText(MMIMMS_EDIT_SELETENUM_MMSBCC_CTRL_ID, &prompt_str);
- //set subject lable
- MMI_GetLabelTextByLang(TXT_MMS_EDIT_SUBJ/*TXT_SCH_EDIT_CONTENT*/, &prompt_str);
- GUILABEL_SetText(MMIMMS_EDIT_SUBJ_LABEL_CTRL_ID, &prompt_str, FALSE);
- //get MMS_TO addr sting
- exist_addr_num = MmsGetReceiverCount(g_p_mms_to);
- if((exist_addr_num > 0) && (exist_addr_num <= MMIMMS_MAX_ADDRESS_NUM))
- {
- p_MMS_RECEPIENT p_temp = NULL;
- SCI_MEMSET(all_addr_str, 0, MMIMMS_MAX_ADDRESS_NUM*(MMIMMS_MAX_ADDRESS_LEN+2));
- all_addr_str_len = 0;
- p_temp = g_p_mms_to;
- while(p_temp != NULL)
- {
- addr_ptr = (uint8 *) p_temp->m_address;
- if (addr_ptr != PNULL)
- {
- //judge if need to add comma char
- if(0 != all_addr_str_len)
- {
- if(MMS_ADDRESS_SEPERATE_SYMBOL != all_addr_str[all_addr_str_len-1])
- {
- //add the comma char
- all_addr_str[all_addr_str_len] = MMS_ADDRESS_SEPERATE_SYMBOL;
- all_addr_str_len++;
- }
- }
- strcat((char*)all_addr_str, (char*)addr_ptr);
- all_addr_str_len = strlen((char*)all_addr_str);
- }
- p_temp = p_temp->p_next;
- }
- if(0 != all_addr_str_len)
- {
- //set the address editbox
- GUIEDITBOX_SetTextEditBoxStringInfo(
- address_contrl_id,
- all_addr_str,
- all_addr_str_len,
- FALSE
- );
- }
- }
- //get MMS_CC addr sting
- exist_addr_num = MmsGetReceiverCount(g_p_mms_cc);
- if((exist_addr_num > 0) && (exist_addr_num <= MMIMMS_MAX_ADDRESS_NUM))
- {
- p_MMS_RECEPIENT p_temp = NULL;
- SCI_MEMSET(all_addr_str, 0, MMIMMS_MAX_ADDRESS_NUM*(MMIMMS_MAX_ADDRESS_LEN+2));
- all_addr_str_len = 0;
- p_temp = g_p_mms_cc;
- while(p_temp != NULL)
- {
- addr_ptr = (uint8 *) p_temp->m_address;
- if (addr_ptr != PNULL)
- {
- //judge if need to add comma char
- if(0 != all_addr_str_len)
- {
- if(MMS_ADDRESS_SEPERATE_SYMBOL != all_addr_str[all_addr_str_len-1])
- {
- //add the comma char
- all_addr_str[all_addr_str_len] = MMS_ADDRESS_SEPERATE_SYMBOL;
- all_addr_str_len++;
- }
- }
- strcat((char*)all_addr_str, (char*)addr_ptr);
- all_addr_str_len = strlen((char*)all_addr_str);
- }
- p_temp = p_temp->p_next;
- }
- if(0 != all_addr_str_len)
- {
- //set the mms_cc address editbox
- GUIEDITBOX_SetTextEditBoxStringInfo(
- address_cc_contrl_id,
- all_addr_str,
- all_addr_str_len,
- FALSE
- );
- }
- }
- //get MMS_bcc addr sting
- exist_addr_num = MmsGetReceiverCount(g_p_mms_bcc);
- if((exist_addr_num > 0) && (exist_addr_num <= MMIMMS_MAX_ADDRESS_NUM))
- {
- p_MMS_RECEPIENT p_temp = NULL;
- SCI_MEMSET(all_addr_str, 0, MMIMMS_MAX_ADDRESS_NUM*(MMIMMS_MAX_ADDRESS_LEN+2));
- all_addr_str_len = 0;
- p_temp = g_p_mms_bcc;
- while(p_temp != NULL)
- {
- addr_ptr = (uint8 *) p_temp->m_address;
- if (addr_ptr != PNULL)
- {
- //judge if need to add comma char
- if(0 != all_addr_str_len)
- {
- if(MMS_ADDRESS_SEPERATE_SYMBOL != all_addr_str[all_addr_str_len-1])
- {
- //add the comma char
- all_addr_str[all_addr_str_len] = MMS_ADDRESS_SEPERATE_SYMBOL;
- all_addr_str_len++;
- }
- }
- strcat((char*)all_addr_str, (char*)addr_ptr);
- all_addr_str_len = strlen((char*)all_addr_str);
- }
- p_temp = p_temp->p_next;
- }
- if(0 != all_addr_str_len)
- {
- //set the address editbox
- GUIEDITBOX_SetTextEditBoxStringInfo(
- address_bcc_contrl_id,
- all_addr_str,
- all_addr_str_len,
- FALSE
- );
- }
- }
- //get subject string if exist
- if (Edit_CurSubjectExist())
- {
- saved_subj_string = Edit_GetSubject();
- GUIEDITBOX_SetTextEditBoxStringInfo(
- MMIMMS_EDIT_SUBJECT_CTRL_ID,
- saved_subj_string.str_ptr,
- saved_subj_string.length,
- saved_subj_string.is_ucs2
- );
- }
- GUIMENU_InitGrayed();
- //set mms content edit window text
- if (is_need_to_load_former_text)
- {
- Edit_SetEditCtrlContent(edit_contrl_id,g_peditdoc);
- }
- //set active control
- MMK_SetAtvCtrl(win_id, edit_contrl_id);
- SCI_TRACE_LOW("Edit_HandleEditMMSWinMsg open end");
- break;
- //fall through
- case MSG_CTL_EDITBOX_UPDATE_STRNUM:
- getwin_contrl_id = MMK_GetActiveCtrlId(win_id);
- if(edit_contrl_id == getwin_contrl_id)
- {
- SCI_MEMSET( &edit_string, 0, sizeof( TEXTEDIT_STRING_INFO_T ) );
- GUIEDITBOX_GetTextEditBoxInfo( edit_contrl_id, &edit_string);
- edit_string.str_ptr[edit_string.str_len] = ' ';
- if (g_peditdoc->slide_cur->text_flag) /*判断当前是否已有文本类型?*/
- {
- CmsDelContent(g_peditdoc, g_peditdoc->slide_cur, MMS_TYPE_TEXT);
- g_peditdoc->slide_cur->text_flag = 0;
- }
- if (edit_string.str_len != 0)
- {
- saved_string.str_ptr = edit_string.str_ptr;
- saved_string.length = edit_string.str_len;
- saved_string.is_ucs2 = edit_string.is_ucs2;
- SCI_TRACE_LOW("FNH saved_string.length = %d",saved_string.length);
- {
- int16 type = 0;
- char text_fname[MMS_MAX_FILE_NAME_LENGTH] = {0};
- SCI_FILE* fd = 0;
- unsigned long value = 0;
- unsigned short buff_size = 0;
- int16 uni_len = 0;
- char* str_utf16 = NULL;
- if (edit_string.is_ucs2 == 0)
- {
- uni_len = Cms_UTF8toUTF16Len(edit_string.str_ptr);
- }
- else
- {
- uni_len = edit_string.str_len;
- }
- SCI_TRACE_LOW("FNH uni_len = %d",uni_len);
- if ((g_peditdoc->totalsize +uni_len ) >= MMS_SIZE_OF_MESSAGE)
- {
- SCI_TRACE_LOW("the mms is too big!");
- PUBWIN_OpenPromptAlertWin(
- PUBWIN_SOFTKEY_ONE,
- TXT_MMS_MMS_TOO_BIG,
- IMAGE_PROMPT_ICON_WRONG,
- ALERT_TIMEOUT,
- PNULL
- );
- break;
- }
- value = TM_GetTotalSeconds();
- sprintf(text_fname,"%ld",value);
- type = MMS_TYPE_TEXT;
- strcat(text_fname,".txt");
- fd =(SCI_FILE*)mmsf_Open((char*)text_fname,"w");
- if ( !fd )
- {
- SCI_TRACE_LOW("open the file error");
- return ;
- }
- if (edit_string.is_ucs2 == 0)
- {
- str_utf16 =(char*)cms_malloc(uni_len+1);
- SCI_MEMSET(str_utf16,0,uni_len+1);
- Cms_UTF8toUTF16(edit_string.str_ptr,edit_string.str_len,uni_len,str_utf16);
- }
- buff_size = uni_len;
- mmsf_Write((char *)(&buff_size),1,sizeof(unsigned short),(FILE_HANDLE)fd);
- SCI_TRACE_LOW("FNH buff_size = %d",buff_size);
- if (edit_string.is_ucs2 == 0)
- {
- mmsf_Write((char *)str_utf16,1,uni_len,(FILE_HANDLE)fd);
- SCI_TRACE_LOW("FNH after write str_utr16 = %s,uni_len = %d",str_utf16,uni_len);
- }
- else
- {
- mmsf_Write((char *)edit_string.str_ptr,1,uni_len,(FILE_HANDLE)fd);
- SCI_TRACE_BUF("FNH enit_string.str_ptr = ",edit_string.str_ptr,10);
- SCI_TRACE_LOW("FNH uni_len = %d",uni_len);
- }
- mmsf_Close((FILE_HANDLE)fd);
- if (str_utf16)
- {
- cms_free(str_utf16);
- str_utf16 = NULL;
- }
- if (MMS_New_Content((unsigned char *)text_fname,type,g_peditdoc->slide_cur,g_peditdoc))
- {
- SCI_TRACE_LOW("insert text is ok!");
- }
- else
- {
- SCI_TRACE_LOW("insert text is failed!");
- }
- }
- }
- }
- else if(subject_contrl_id == getwin_contrl_id)
- {
- uint8 *temp_subject = NULL;
- SCI_MEMSET( &edit_string, 0, sizeof( TEXTEDIT_STRING_INFO_T ) );
- GUIEDITBOX_GetTextEditBoxInfo( MMIMMS_EDIT_SUBJECT_CTRL_ID, &edit_string);
- edit_string.str_ptr[edit_string.str_len] = ' ';
- if (Edit_CurSubjectExist())
- {
- Edit_DeleteSubject();
- }
- SCI_TRACE_LOW("FNH before add subject edit_string.str_ptr = %x",edit_string.str_ptr,10);
- SCI_TRACE_LOW("FNH before add subject edit_string.str_len = %d",edit_string.str_len);
- SCI_TRACE_LOW("FNH before add subject edit_string.is_ucs2 = %d",edit_string.is_ucs2);
- SCI_MEMSET(g_p_mms_subject,0,MMIMMS_MAX_SUBJECTS_LEN+1);
- if (edit_string.is_ucs2 == 0)
- {
- uint16 uni_len = 0;
- uni_len = Cms_UTF8toUTF16Len(edit_string.str_ptr);
- if (uni_len > 0)
- {
- temp_subject =(uint8 *) cms_malloc(uni_len+1);
- SCI_MEMSET(temp_subject,0,uni_len+1);
- SCI_TRACE_LOW("FNH edit_string.str_ptr = %s",edit_string.str_ptr);
- Cms_UTF8toUTF16(edit_string.str_ptr,edit_string.str_len,uni_len,temp_subject);
- if (uni_len > MMIMMS_MAX_SUBJECTS_LEN-2)
- {
- uni_len = MMIMMS_MAX_SUBJECTS_LEN-2;
- }
- SCI_MEMCPY(g_p_mms_subject,&uni_len,2);
- SCI_MEMCPY((int8 *)(g_p_mms_subject+2),temp_subject,uni_len);
- SCI_TRACE_BUF("FNH g_p_mms_subject = ",g_p_mms_subject,10);
- if (temp_subject)
- {
- cms_free(temp_subject);
- temp_subject = NULL;
- }
- }
- }
- else
- {
- if (edit_string.str_len > MMIMMS_MAX_SUBJECTS_LEN - 2)
- {
- edit_string.str_len = MMIMMS_MAX_SUBJECTS_LEN - 2;
- }
- SCI_MEMCPY(g_p_mms_subject,&edit_string.str_len,2);
- SCI_TRACE_BUF("fnh edit_string.str_ptr = %x",edit_string.str_ptr,10);
- SCI_TRACE_LOW("FNH edit_string.str_len = %d",edit_string.str_len);
- SCI_MEMCPY((int8 *)(g_p_mms_subject+2),edit_string.str_ptr,edit_string.str_len);
- }
- }
- else if(address_contrl_id == getwin_contrl_id)
- {
- addr_list = &(g_mms_save_in_mem.to);
- EditStringToGlobal(getwin_contrl_id,addr_list);
- }
- else if(address_cc_contrl_id == getwin_contrl_id)
- {
- addr_list = &(g_mms_save_in_mem.cc);
- EditStringToGlobal(getwin_contrl_id,addr_list);
- }
- else if(address_bcc_contrl_id == getwin_contrl_id)
- {
- addr_list = &(g_mms_save_in_mem.bcc);
- EditStringToGlobal(getwin_contrl_id,addr_list);
- }
- break;
- case MSG_GET_FOCUS:
- //暂时不用
- GUIMENU_InitGrayed();
- // GUIMENU_SetGrayed(MENU_MMS_POP_INSERT, ID_MMS_INSERT_PHOTO, GRAYED);
- //set mms content edit window text
- if (is_need_to_load_former_text)
- {
- Edit_SetEditCtrlContent(edit_contrl_id,g_peditdoc);
- }
- //set active control
- //MMK_SetAtvCtrl(win_id, edit_contrl_id);
- break;
- case MSG_CTL_PENUP:
- // Edit_SaveMMSText(edit_contrl_id);
- // Edit_SetEditCtrlContent(edit_contrl_id);
- switch ((MMI_CTRL_ID_T)param)
- {
- case MMIMMS_EDIT_ADD_SLIDE_CTRL_ID:
- slide_num=MMSGetSlideCount(g_peditdoc);
- if (( slide_num < MMIMMS_MAX_SLIDE) &&(g_peditdoc->totalsize < MMS_SIZE_OF_MESSAGE-MMS_SINGLE_SLIDE_SIZE))
- if (( slide_num < MMIMMS_MAX_SLIDE) &&(g_peditdoc->totalsize < MMS_SIZE_OF_MESSAGE))
- {
- MMS_New_Slide(g_peditdoc);
- Edit_SetEditCtrlContent(edit_contrl_id,g_peditdoc);
- MMK_SetAtvCtrl(win_id, edit_contrl_id);
- MMK_SendMessage(PNULL, MSG_FULL_PAINT, PNULL);
- }
- else
- {
- //reach MAX_SLIDE_NUMBER. alert.
- PUBWIN_OpenPromptAlertWin(
- PUBWIN_SOFTKEY_ONE,
- TXT_MMS_CANNOT_INSERT_SLIDE,
- IMAGE_PROMPT_ICON_ALERT,
- ALERT_TIMEOUT,
- PNULL
- );
- }
- break;
- case MMIMMS_EDIT_PIC_CTRL_ID:
- if (g_peditdoc->slide_cur->image_flag == 1)
- {
- s_opt_menu_id = ID_MMS_EDIT_DEL_IMAGE;
- PUBWIN_OpenPromptQueryWin(TXT_MMS_IF_DEL, IMAGE_PROMPT_ICON_QUERY);
- }
- else if (g_peditdoc->slide_cur->video_flag == 1)
- {
- PUBWIN_OpenPromptAlertWin(
- PUBWIN_SOFTKEY_ONE,
- TXT_CMS_MMS_VIDEO_NOPIC,
- IMAGE_PROMPT_ICON_ALERT,
- ALERT_TIMEOUT,
- PNULL
- );
- }
- else
- {
- s_opt_menu_id = ID_MMS_INSERT_DPIC;
- // Edit_OpenInsertDpicWin(win_id);
- MMK_CreateWin( (uint32*)MMIMMS_EDIT_SELECT_IMAGE_WIN_TAB, (ADD_DATA)win_id);
- }
- break;
- case MMIMMS_EDIT_RING_CTRL_ID:
- if (g_peditdoc->slide_cur->audiosize !=0)
- {
- s_opt_menu_id = ID_MMS_EDIT_DEL_MUSIC;
- PUBWIN_OpenPromptQueryWin(TXT_MMS_IF_DEL, IMAGE_PROMPT_ICON_QUERY);
- }
- else if (g_peditdoc->slide_cur->video_flag == 1)
- {
- PUBWIN_OpenPromptAlertWin(
- PUBWIN_SOFTKEY_ONE,
- TXT_CMS_MMS_VIDEO_NOMUSIC,
- IMAGE_PROMPT_ICON_ALERT,
- ALERT_TIMEOUT,
- PNULL
- );
- }
- else
- {
- s_opt_menu_id = ID_MMS_EDIT_INSERT_MUSIC;
- // Edit_OpenInsertDringWin(win_id);
- MMK_CreateWin( (uint32*)MMIMMS_EDIT_SELECT_MUSIC_WIN_TAB, (ADD_DATA)win_id);
- }
- break;
- case MMIMMS_EDIT_VIDEO_CTRL_ID:
- if (g_peditdoc->slide_cur->image_flag == 1)
- {
- PUBWIN_OpenPromptAlertWin(
- PUBWIN_SOFTKEY_ONE,
- TXT_CMS_MMS_PIC_NOVIDEO,
- IMAGE_PROMPT_ICON_ALERT,
- ALERT_TIMEOUT,
- PNULL
- );
- }
- else if (g_peditdoc->slide_cur->audiosize != 0)
- {
- PUBWIN_OpenPromptAlertWin(
- PUBWIN_SOFTKEY_ONE,
- TXT_CMS_MMS_MUSIC_NOVIDEO,
- IMAGE_PROMPT_ICON_ALERT,
- ALERT_TIMEOUT,
- PNULL
- );
- }
- else if (g_peditdoc->slide_cur->video_flag==1)
- {
- s_opt_menu_id = ID_MMS_EDIT_DEL_VIDEO;
- PUBWIN_OpenPromptQueryWin(TXT_MMS_IF_DEL, IMAGE_PROMPT_ICON_QUERY);
- }
- else
- {
- s_opt_menu_id = ID_MMS_EDIT_INSERT_VIDEO;
- i_size_free = MMS_SIZE_OF_MESSAGE - g_peditdoc->totalsize;
- if (i_size_free <= 0)
- {
- i_size_free = 0;
- }
- //添加视频接口
- MMIMPEG4_SelectAndGetFile(i_size_free , win_id, 1);
- //MMIMPEG4_OpenMPEG4WinForMms(INSERT_VIDEO_MAX_SIZE,win_id);//liangliu delete 2006-1-13 for a while.
- }
- break;
- case MMIMMS_EDIT_DEL_SLIDE_CTRL_ID:
- s_opt_menu_id = ID_MMS_EDIT_DEL_CUR_SLIDE;
- PUBWIN_OpenPromptQueryWin(TXT_MMS_DEL_SLIDE, IMAGE_PROMPT_ICON_QUERY);
- break;
- case MMIMMS_EDIT_SELETENUM_CTRL_ID:
- getwin_contrl_id = address_contrl_id;
- //get address string
- SCI_MEMSET( &addr_edit_string, 0, sizeof( TEXTEDIT_STRING_INFO_T ) );
- GUIEDITBOX_GetTextEditBoxInfo( getwin_contrl_id, &addr_edit_string);
- addr_edit_string.str_ptr[addr_edit_string.str_len] = ' ';
- SCI_ASSERT(FALSE == addr_edit_string.is_ucs2);
- //parse the dest address
- // MMIMMS_ParseDestAddr(&addr_edit_string,g_mms_save_in_mem.to);
- //open the number select win
- //需要获得当前允许输入的个数,调用pb接口窗口
- if(Edit_GetToAddTotalNumber() < MMIMMS_MAX_ADDRESS_NUM)//if( max_selected_num > 0 )
- {
- max_selected_num = MMIMMS_MAX_ADDRESS_NUM - Edit_GetToAddTotalNumber();
- //更新为新的pb接口
- MMK_CreateWin((uint32*)MMIPB_GROUP_SEND_WIN_TAB, (ADD_DATA)max_selected_num);
- }
- else
- {
- //Alert : list is full
- PUBWIN_OpenPromptAlertWin(PUBWIN_SOFTKEY_ONE,
- TXT_SMS_FULL_LIST,
- IMAGE_PROMPT_ICON_ALERT,
- MMISMS_3SECOND,
- PNULL);
- }
- break;
- case MMIMMS_EDIT_SELETENUM_MMSCC_CTRL_ID:
- getwin_contrl_id = address_cc_contrl_id;
- //get address string
- SCI_MEMSET( &addr_edit_string, 0, sizeof( TEXTEDIT_STRING_INFO_T ) );
- GUIEDITBOX_GetTextEditBoxInfo( getwin_contrl_id, &addr_edit_string);
- addr_edit_string.str_ptr[addr_edit_string.str_len] = ' ';
- SCI_ASSERT(FALSE == addr_edit_string.is_ucs2);
- //parse the dest address
- // MMIMMS_ParseDestAddr(&addr_edit_string,g_mms_save_in_mem.cc);
- //open the number select win
- //需要获得当前允许输入的个数,调用pb接口窗口
- if(Edit_GetToAddTotalNumber() < MMIMMS_MAX_ADDRESS_NUM)//if( max_selected_num > 0 )
- {
- max_selected_num = MMIMMS_MAX_ADDRESS_NUM - Edit_GetToAddTotalNumber();
- //更新为新的pb接口
- MMK_CreateWin((uint32*)MMIPB_GROUP_SEND_WIN_TAB, (ADD_DATA)max_selected_num);
- }
- else
- {
- //Alert : list is full
- PUBWIN_OpenPromptAlertWin(PUBWIN_SOFTKEY_ONE,
- TXT_SMS_FULL_LIST,
- IMAGE_PROMPT_ICON_ALERT,
- MMISMS_3SECOND,
- PNULL);
- }
- break;
- case MMIMMS_EDIT_SELETENUM_MMSBCC_CTRL_ID:
- getwin_contrl_id = address_bcc_contrl_id;
- {
- //get address string
- SCI_MEMSET( &addr_edit_string, 0, sizeof( TEXTEDIT_STRING_INFO_T ) );
- GUIEDITBOX_GetTextEditBoxInfo( getwin_contrl_id, &addr_edit_string);
- addr_edit_string.str_ptr[addr_edit_string.str_len] = ' ';
- SCI_ASSERT(FALSE == addr_edit_string.is_ucs2);
- //parse the dest address
- // MMIMMS_ParseDestAddr(&addr_edit_string,g_mms_save_in_mem.bcc);
- //open the number select win
- //需要获得当前允许输入的个数
- //调用pb接口窗口
- //需要考虑当Edit_GetToAddTotalNumber() > MMIMMS_MAX_ADDRESS_NUM的情况
- if(Edit_GetToAddTotalNumber() < MMIMMS_MAX_ADDRESS_NUM)//if( max_selected_num > 0 )
- {
- max_selected_num = MMIMMS_MAX_ADDRESS_NUM - Edit_GetToAddTotalNumber();
- //更新为新的pb接口
- MMK_CreateWin((uint32*)MMIPB_GROUP_SEND_WIN_TAB, (ADD_DATA)max_selected_num);
- }
- else
- {
- //Alert : list is full
- PUBWIN_OpenPromptAlertWin(PUBWIN_SOFTKEY_ONE,
- TXT_SMS_FULL_LIST,
- IMAGE_PROMPT_ICON_ALERT,
- MMISMS_3SECOND,
- PNULL);
- }
- }
- break;
- default:
- break;
- }
- break;
- case MMI_PB_MULTI_SELECT_LIST_RETURN:
- {
- uint16 count = MMIPB_GetSelectedListCount();
- uint16 i = 0;
- MMIPB_BCD_NUMBER_T number;
- uint8 tele_len = 0;
- MMI_STRING_T email_addr;
- addr_list = PNULL;
- if(getwin_contrl_id == address_contrl_id)
- {
- addr_list = &(g_mms_save_in_mem.to);
- }
- else if(getwin_contrl_id == address_cc_contrl_id)
- {
- addr_list = &(g_mms_save_in_mem.cc);
- }
- else if(getwin_contrl_id == address_bcc_contrl_id)
- {
- addr_list = &(g_mms_save_in_mem.bcc);
- }
- if(count > 0)
- {
- //get address string
- SCI_MEMSET( &addr_edit_string, 0, sizeof( TEXTEDIT_STRING_INFO_T ) );
- GUIEDITBOX_GetTextEditBoxInfo( getwin_contrl_id, &addr_edit_string);
- addr_edit_string.str_ptr[addr_edit_string.str_len] = ' ';
- SCI_ASSERT(FALSE == addr_edit_string.is_ucs2);
- SCI_MEMSET(all_addr_str, 0, MMIMMS_MAX_ADDRESS_NUM*(MMIMMS_MAX_ADDRESS_LEN+2));
- SCI_MEMCPY(all_addr_str, addr_edit_string.str_ptr, addr_edit_string.str_len);
- all_addr_str_len = strlen((char*)all_addr_str);
- }
- else
- {
- break;
- }
- for( i = 0; i < count; i++ )
- {
- uint8 max_len = 0;
- SCI_MEMSET(&number, 0, sizeof(number));
- SCI_MEMSET(&email_addr, 0, sizeof(email_addr));
- email_addr.str_ptr = cms_malloc(MMIPB_MAX_MAIL_LEN);
- SCI_MEMSET(email_addr.str_ptr, 0, MMIPB_MAX_MAIL_LEN);
- MMIPB_GetDetailInSelectedList(PNULL, &number, &email_addr, i);
- //judge returned is number or email
- if (number.number_len != 0)
- {
- max_len = MIN( MMIMMS_MAX_ADDRESS_LEN, number.number_len);
- tele_len = MMI_GenDispNumber(
- MMIPB_GetNumberTypeFromUint8(number.npi_ton),
- max_len,
- number.number,
- tele_num,
- MMIMMS_MAX_ADDRESS_LEN + 2
- );
- //judge if need to add comma char
- if(0 != all_addr_str_len)
- {
- if(MMS_ADDRESS_SEPERATE_SYMBOL != all_addr_str[all_addr_str_len-1])
- {
- //add the comma char
- all_addr_str[all_addr_str_len] = MMS_ADDRESS_SEPERATE_SYMBOL;
- all_addr_str_len++;
- }
- }
- strcat((char*)all_addr_str, (char*)tele_num);
- all_addr_str_len = strlen((char*)all_addr_str);
- //set the number to dest address
- Edit_AddToAddr((uint8 *)tele_num,addr_list);
- }
- if (email_addr.length != 0)
- {
- if (!email_addr.is_ucs2)
- {
- //judge if need to add comma char
- if(0 != all_addr_str_len)
- {
- if(MMS_ADDRESS_SEPERATE_SYMBOL != all_addr_str[all_addr_str_len-1])
- {
- //add the comma char
- all_addr_str[all_addr_str_len] = MMS_ADDRESS_SEPERATE_SYMBOL;
- all_addr_str_len++;
- }
- }
- strcat((char*)all_addr_str, (char*)email_addr.str_ptr);
- all_addr_str_len = strlen((char*)all_addr_str);
- //set the number to dest address
- Edit_AddToAddr((uint8 *)email_addr.str_ptr,addr_list);
- }
- }
- //free MMI_STRING_T.str_ptr
- cms_free(email_addr.str_ptr);
- }
- //update the address editbox
- GUIEDITBOX_SetTextEditBoxStringInfo(getwin_contrl_id, all_addr_str, all_addr_str_len, FALSE);
- EditStringToGlobal(getwin_contrl_id,addr_list);
- break;
- }
- case MMI_PB_GROUP_SELECT_LIST_RETURN:
- {
- MMIPB_BCD_NUMBER_T number;
- MMI_STRING_T email_addr;
- uint16 count = MMIPB_GetSelectedListCount();
- uint16 i = 0;
- uint8 tele_len = 0;
- uint8 max_len = 0;
- //clean former
- Edit_DeleteToAddrAll(addr_list);
- //fill newer
- if ( count > 0 )
- {
- //get address string
- SCI_MEMSET( &addr_edit_string, 0, sizeof( TEXTEDIT_STRING_INFO_T ) );
- GUIEDITBOX_GetTextEditBoxInfo( getwin_contrl_id, &addr_edit_string);
- addr_edit_string.str_ptr[addr_edit_string.str_len] = ' ';
- SCI_ASSERT(FALSE == addr_edit_string.is_ucs2);
- SCI_MEMSET(all_addr_str, 0, MMIMMS_MAX_ADDRESS_NUM*(MMIMMS_MAX_ADDRESS_LEN+2));
- SCI_MEMCPY(all_addr_str, addr_edit_string.str_ptr, addr_edit_string.str_len);
- all_addr_str_len = strlen((char*)all_addr_str);
- for (i = 0; i < count; i++ )
- {
- SCI_MEMSET(&number, 0, sizeof(number));
- SCI_MEMSET(&email_addr, 0, sizeof(email_addr));
- email_addr.str_ptr = cms_malloc(MMIPB_MAX_MAIL_LEN);
- SCI_MEMSET(email_addr.str_ptr, 0, MMIPB_MAX_MAIL_LEN);
- if( MMIPB_GetDetailInSelectedList( PNULL, &number, &email_addr, i ))
- {
- if (number.number_len != 0)
- {
- max_len = MIN( MMIMMS_MAX_ADDRESS_LEN, number.number_len);
- tele_len = MMI_GenDispNumber(
- MMIPB_GetNumberTypeFromUint8(number.npi_ton),
- max_len,
- number.number,
- tele_num,
- MMIMMS_MAX_ADDRESS_LEN + 2
- );
- //judge if need to add comma char
- if(0 != all_addr_str_len)
- {
- if(MMS_ADDRESS_SEPERATE_SYMBOL != all_addr_str[all_addr_str_len-1])
- {
- //add the comma char
- all_addr_str[all_addr_str_len] = MMS_ADDRESS_SEPERATE_SYMBOL;
- all_addr_str_len++;
- }
- }
- strcat((char*)all_addr_str, (char*)tele_num);
- all_addr_str_len = strlen((char*)all_addr_str);
- Edit_AddToAddr((uint8 *)tele_num,addr_list);
- }
- if (email_addr.length != 0)
- {
- if (!email_addr.is_ucs2)
- {
- Edit_AddToAddr(email_addr.str_ptr,addr_list);
- }
- }
- }
- //free
- cms_free(email_addr.str_ptr);
- }
- // send the mms
- // Send_CreateSendingWin(SEND_MMS_NORMAL);
- }
- GUIEDITBOX_SetTextEditBoxStringInfo(getwin_contrl_id, all_addr_str, all_addr_str_len, FALSE);
- EditStringToGlobal(getwin_contrl_id,&g_mms_save_in_mem.to);
- }
- break;
- #ifdef HAVE_MPEG4
- case MSG_MPEG4_READ_FFS_DONE:
- SCI_ASSERT(param != NULL);
- SCI_TRACE_LOW("FNH enter MSG_MULTIM_SLEECTED_RETURN");
- mpeg4_return_info_ptr = (MMIMPEG4_BUFFER_FILE_INFO_T *)param;
- if ((PNULL == mpeg4_return_info_ptr->buf_ptr) || (0 == mpeg4_return_info_ptr->memory_size))
- {
- PUBWIN_OpenPromptAlertWin(
- PUBWIN_SOFTKEY_ONE,
- TXT_MMS_EDIT_ADD_FAIL,
- IMAGE_PROMPT_ICON_WRONG,
- ALERT_TIMEOUT,
- PNULL
- );
- break;
- }