mmimms_wintable.c
上传用户:amanda_214
上传日期:2014-04-26
资源大小:163k
文件大小:463k
开发平台:

C/C++

  1. /****************************************************************************
  2. ** File Name:      mmimms_wintable.c                                       *
  3. ** Author:                                                                 *
  4. ** Date:           2004.8.23                                               *
  5. ** Copyright:      2004 Spreatrum, Incoporated. All Rights Reserved.       *
  6. ** Description:    This file is used to describe the MMS                   *
  7. ****************************************************************************
  8. **                         Important Edit History                          *
  9. ** ------------------------------------------------------------------------*
  10. ** DATE           NAME             DESCRIPTION                             *
  11. ** 2004.8        Bruce.Chi         Create
  12. ** 
  13. ****************************************************************************/
  14. /**---------------------------------------------------------------------------*
  15. **                        Include Files                                     *
  16. **---------------------------------------------------------------------------*/
  17. #include "window_parse.h"
  18. #include "mmk_app.h" 
  19. #include "im.h"
  20. #include "guicommon.h"
  21. #include "guimenu.h"
  22. #include "guieditbox.h"
  23. #include "guilistbox.h"
  24. #include "guimsgbox.h"
  25. #include "mmi_menutable.h"
  26. #include "mmi_id.h"
  27. #include "mmi_text.h"
  28. #include "mmi_image.h"
  29. #include "mmi_pubwin.h"
  30. #include "mmidisplay_data.h"
  31. #include "mainapp.h"
  32. #include "ccapp.h"
  33. #include "tb_dal.h"
  34. #include "guilabel.h"
  35. #include "guitextbox.h"
  36. #include "guibutton.h"
  37. #include "mmipb.h"
  38. #include "mmipb_wintab.h"
  39. #include "mmiset.h"
  40. #include "mmimms_internal.h"
  41. #include "mmk_timer.h"
  42. #include "ccapp.h"
  43. #include "mmi_common.h"
  44. #include "mmi_default.h"
  45. #include "mmismsapp_wintab.h"
  46. #include "mmidc.h"
  47. #include "mmi_appmsg.h"
  48. #include "mmimms.h"
  49. //cr36254 jian.ma start
  50. #include "mmk_type.h"
  51. #include "mmi_message.h"
  52. #include "mmiivr.h"
  53. #include "mmiset.h"
  54. #include "mmiphone.h"
  55. #include "mmimb.h"
  56. #include "mmi_pubwin.h"
  57. #include "mmibrowser.h"
  58. #include "mmibrowser_internal.h"
  59. #include "tempX.h"
  60. #include "Cms_MMSDoc.h"
  61. #include "Cms_MMSProvide.h"
  62. #include "Cms_WAPMain.h"
  63. #include "Cms_MMSFilefunc.h"
  64. #include "mms_text.h"
  65. #include "mms_anim.h"
  66. #include "mmimpeg4.h"
  67. #include "mmimp3.h"
  68. #include "mmi_modu_main.h"
  69. #include "MakeDrvInc.h"
  70. /**--------------------------------------------------------------------------*
  71. **                         MACRO DEFINITION                                 *
  72. **--------------------------------------------------------------------------*/
  73. #define MMIMMS_FILL_RECT()
  74. {
  75. GUI_RECT_T rect;
  76. rect.left = MMIMMS_FULLSCREEN_CLIENT_LEFT;
  77. rect.top = MMIMMS_FULLSCREEN_CLIENT_TOP;
  78. rect.right = MMIMMS_FULLSCREEN_CLIENT_RIGHT;
  79. rect.bottom = MMIMMS_FULLSCREEN_CLIENT_BOTTOM;
  80. LCD_FillRect(0, rect, MMI_WHITE_COLOR);
  81. }
  82. #define MATH_ABS(x) ((x) < 0 ? ((x) * (-1)) : (x))
  83. #define TITLE_HEIGHT MMI_TITLE_HEIGHT
  84. #define SK_HEIGH MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT
  85. #define LABEL_HEIGHT 16
  86. #define EDIT_FULL_X1 0
  87. #define EDIT_FULL_Y1 TITLE_HEIGHT
  88. #define EDIT_FULL_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
  89. #define EDIT_FULL_Y2 MMI_INPUT_EDITBOX_BOTTOM
  90. #define EDIT_HALF_X1 0
  91. #define EDIT_HALF_Y1 TITLE_HEIGHT
  92. #define EDIT_HALF_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
  93. #define EDIT_HALF_Y2 MMI_INPUT_EDITBOX_BOTTOM/2
  94. #define EDIT_1LINE_X1 10//0
  95. #define EDIT_1LINE_Y1 40//TITLE_HEIGHT
  96. #define EDIT_1LINE_X2 120//MMI_MAINSCREEN_RIGHT_MAX_PIXEL
  97. #define EDIT_1LINE_Y2 80//40
  98. #define EDIT_3LINE_X1 10
  99. #define EDIT_3LINE_Y1 40
  100. #define EDIT_3LINE_X2 120
  101. #define EDIT_3LINE_Y2 87//80
  102. #define MENU_X1 0
  103. #define MENU_Y1 0
  104. #define MENU_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
  105. #define MENU_Y2 MMI_CLIENT_RECT_BOTTOM
  106. #define LIST_X1 0
  107. #define LIST_Y1 TITLE_HEIGHT
  108. #define LIST_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
  109. #define LIST_Y2 (MMI_MAINSCREEN_BOTTOM_MAX_PIXEL - SK_HEIGH)
  110. #define LABEL_X1        0
  111. #define LABEL_Y1        (MMI_CLIENT_RECT_BOTTOM - LABEL_HEIGHT)
  112. #define LABEL_X2        (MMI_MAINSCREEN_RIGHT_MAX_PIXEL - 4 * LABEL_HEIGHT)
  113. #define LABEL_Y2        (LABEL_Y1 + LABEL_HEIGHT)
  114. #define CONTENT_EDIT_X1        0
  115. #define CONTENT_EDIT_Y1        (MMI_TITLE_HEIGHT+4*MMI_LIST_ITEM_HEIGHT)
  116. #define CONTENT_EDIT_X2        MMI_MAINSCREEN_RIGHT_MAX_PIXEL
  117. #define CONTENT_EDIT_Y2        (MMI_CLIENT_RECT_BOTTOM-LABEL_HEIGHT-1)
  118. #define PREVIEW_TEXT_X1        0
  119. #define PREVIEW_TEXT_Y1        (MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT)
  120. #define PREVIEW_TEXT_X2        MMI_MAINSCREEN_RIGHT_MAX_PIXEL
  121. #define PREVIEW_TEXT_Y2        MMI_CLIENT_RECT_BOTTOM
  122. #define MEMSTATE_LABEL5_X1 0
  123. #define MEMSTATE_LABEL5_Y1 (MEMSTATE_LABEL4_Y2)
  124. #define MEMSTATE_LABEL5_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
  125. #define MEMSTATE_LABEL5_Y2 (MEMSTATE_LABEL5_Y1 + MEMSTATE_LABEL_HEIGH)
  126. //liangl added 2005-10-25 for mms detail show
  127. #define MEMSTATE_TEXTBOX_X1 0
  128. #define MEMSTATE_TEXTBOX_Y1 (MEMSTATE_LABEL4_Y2)
  129. #define MEMSTATE_TEXTBOX_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
  130. #define MEMSTATE_TEXTBOX_Y2 MMI_MAINSCREEN_BOTTOM_MAX_PIXEL -TITLE_HEIGHT
  131. //fnh add 20060512 
  132. #define MMS_DETAIL_LEFT 0
  133. #define MMS_DETAIL_TOP MMI_TITLE_HEIGHT
  134. #define MMS_DETAIL_WIDTH (MMI_MAINSCREEN_WIDTH - 1)
  135. #define MMS_DETAIL_HEIGHT (MMI_MAINSCREEN_HEIGHT - 1 - MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT)
  136. #define MMI_1SECONDS 1000  //1000毫秒
  137. #define WAITING_ANIM_X1 0
  138. #define WAITING_ANIM_Y1 TITLE_HEIGHT
  139. #define WAITING_ANIM_X2 1
  140. #define WAITING_ANIM_Y2 (TITLE_HEIGHT + 1)
  141. #define MMIMMS_RENAME_RECT_LEFT          4
  142. #define MMIMMS_RENAME_RECT_TOP           78//58
  143. #define MMIMMS_RENAME_RECT_RIGHT         172//125
  144. #define MMIMMS_RENAME_RECT_BOTTOM        110//90 
  145. #define WAITING_TEXT_X1 0
  146. #define WAITING_TEXT_Y1 94
  147. #define WAITING_TEXT_X2 127
  148. #define WAITING_TEXT_Y2 109
  149. #define ALERT_SEND_DOWNLOAD_RESULT_TIMEOUT (6*1000)
  150. #define TIME_3SECONDS    3000//3 second
  151. #define TIME_6SECONDS    6000//6 second
  152. #define PREVIEW_LABEL_SLIDE_LEFT  0//90
  153. #define PREVIEW_LABEL_SIZE_LEFT   95
  154. #define PREVIEW_LABEL_SLIDE_RIGHT 35
  155. #define PREVIEW_LABEL_LEFT  (MMI_MAINSCREEN_RIGHT_MAX_PIXEL - 20)
  156. #define PREVIEW_LABEL_TOP   MMI_TITLE_HEIGHT
  157. //fnh add begin
  158. #define TWOLINEHEIGHT  35
  159. #define LABEL_CUR_X1 0
  160. #define LABEL_CUR_Y1 0
  161. #define LABEL_CUR_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
  162. #define LABEL_CUR_Y2 TITLE_HEIGHT
  163. #define LABEL_TEXT_X1 0
  164. #define LABEL_TEXT_Y1 MMI_MAINSCREEN_HEIGHT - MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-TWOLINEHEIGHT
  165. #define LABEL_TEXT_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
  166. #define LABEL_TEXT_Y2 MMI_MAINSCREEN_HEIGHT - MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT
  167. #define IMAGE_RECT_X1 0
  168. #define IMAGE_RECT_Y1 TITLE_HEIGHT
  169. #define IMAGE_RECT_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
  170. #define IMAGE_RECT_Y2 MMI_MAINSCREEN_HEIGHT - MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-TWOLINEHEIGHT
  171. //fnh add end
  172. //fnh add begin
  173. #define MMIMMS_FULLSCREEN_CLIENT_LEFT     0 
  174. #define MMIMMS_FULLSCREEN_CLIENT_TOP      MMI_TITLE_HEIGHT
  175. #define MMIMMS_FULLSCREEN_CLIENT_BOTTOM   (MMI_MAINSCREEN_BOTTOM_MAX_PIXEL - MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT)
  176. #define MMIMMS_FULLSCREEN_CLIENT_RIGHT  MMI_MAINSCREEN_RIGHT_MAX_PIXEL
  177. #define MMS_MAX_FILE_NAME_LENGTH 128
  178. #define MMIMMS_SINGLE_PHONENUMBE_LEFT 10
  179. #define MMIMMS_SINGLE_PHONENUMBE_TOP 40
  180. #define MMIMMS_SINGLE_PHONENUMBE_RIGHT 120
  181. #define MMIMMS_SINGLE_PHONENUMBE_BOTTOM 80
  182. #define MMIMMS_SET_ONTIME_LEFT 0//28
  183. #define MMIMMS_SET_ONTIME_TOP (MMI_TITLE_HEIGHT+1)//68
  184. #define MMIMMS_SET_ONTIME_RIGHT MMI_MAINSCREEN_RIGHT_MAX_PIXEL//99
  185. #define MMIMMS_SET_ONTIME_BOTTOM (MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT)//100
  186. #define  MMIMMS_3SECOND   3000
  187. #define MMIMMS_RANDOM_FILE_NAME_MAX_LEN 20
  188. #define INSERT_VIDEO_MAX_SIZE  100*1024 //临时的大小,增加视频。
  189. #define MMS_ADDRESS_SEPERATE_SYMBOL     ','
  190. #ifndef ALERT_TIMEOUT  
  191. #define ALERT_TIMEOUT   3000
  192. #endif
  193. uint8 play_or_preview = 0; //播放或预览
  194. #define MMIMMS_CLEAR_CLIENT()
  195. MMIMMS_FILL_CLIENT()
  196. #define MMIMMS_FILL_CLIENT()
  197. {
  198. GUI_RECT_T rect = MMI_CLIENT_RECT;
  199. LCD_FillRect(0, rect, MMI_WINDOW_BACKGROUND_COLOR);
  200. }
  201. typedef enum
  202. {
  203. MMIMMS_PREVIEW_PLAYING,
  204. MMIMMS_PREVIEW_STOP,
  205. MMIMMS_PREVIEW_LEAVE
  206. }MMIMMS_PREVIEW_STATE;
  207. #define MOVE_UP_DOWN_STEP 14 //pixel //this is the same as Defaut_Text_Font of TEXT_BOX
  208. #define MOVE_LEFT_RIGHT_STEP 14
  209. #define     MMISET_DATE_BIG_MONTH_DAY           31
  210. #define     MMISET_DATE_SMALL_MONTH_DAY         30
  211. #define     MMISET_DATE_LEAP_MONTH_DAY          29
  212. #define     MMISET_DATE_NOT_LEAP_MONTH_DAY      28
  213. /*---------------------------------------------------------------------------*/
  214. /*                          TYPE AND CONSTANT                                */
  215. /*---------------------------------------------------------------------------*/
  216. typedef enum 
  217. {
  218. MMS_PLAY,
  219. MMS_PREVIEW,
  220. MMS_CONTENT_DISPLAY
  221. }MMS_DISPLAY_CONTENT;
  222. MMS_SEND_ONTIME_TIME g_set_date;
  223. /*编辑器之编辑接收人窗口*/
  224. typedef struct TAG_MMS_RECEIVER_PARAM   /* 参数 */
  225. {
  226. int32 receiver_win_title;  /*窗口标题*/
  227. void* p_receiver;  /* 待显示数据列表 */
  228. } MMS_RECEIVER_PARAM,*P_MMS_RECEIVER_PARAM;
  229. typedef enum
  230. {
  231. MMS_RECEIVER_TO,
  232. MMS_RECEIVER_CC,
  233. MMS_RECEIVER_BCC
  234. }MMS_RECEIVER_TYPE;
  235. typedef enum
  236. {
  237. MMS_RECEIVER_ADD,
  238. MMS_RECEIVER_MODIFY
  239. }MMS_RECEIVER_MODIFY_OR_ADD;
  240. typedef enum
  241. {
  242. MMS_EDIT_NEW_MMS, //新建彩信
  243. MMS_EDIT_ANSWER_MMS, //回复彩信
  244. MMS_EDIT_FORWARD_MMS, //转发彩信
  245. MMS_EDIT_REPEAT_EDIT_MMS,//重新编辑
  246. MMS_EDIT_ANSWER_SMSORPB,//回复短信或电话本
  247. MMS_EDIT_SEND_IMAGE //发送图片
  248. }MMS_EDIT_STATUS;
  249. typedef enum
  250. {
  251. MMS_EDIT_RECEIVER, //编辑收件人
  252. MMS_EDIT_SINGLE, //编辑单个的
  253. MMS_EDIT_GROUP //编辑群组
  254. }MMS_EDIT_REC_TYPE;
  255. typedef enum 
  256. {
  257. MMS_FOLDER_SAVE_TYPE_IMAGE,
  258. MMS_FOLDER_SAVE_TYPE_MUSIC
  259. }MMS_FOLDER_SAVE_SAVE_TYPE;
  260. typedef struct TAG_MMS_FOLDER_SAVE_PARAM
  261. {
  262. pMMS_EDocument p_edit_doc; //
  263. int16 save_type ; //保存的类型
  264. }MMS_FOLDER_SAVE_PARAM,*P_MMS_FOLDER_SAVE_PARAM;
  265. typedef struct TAG_MMS_SAVE_VIDEO_PARAM
  266. {
  267. uint8 * video_str;
  268. uint32  video_size;
  269. uint32  video_type;
  270. MMIMULTIM_SAVE_FILE_CALLBACK_PFUNC callback_func;
  271. }MMS_SAVE_VIDEO_PARAM,*P_MMS_SAVE_VIDEO_PARAM;
  272. typedef struct TAG_MMS_SAVE_MP3_PARAM
  273. {
  274. uint8* mp3_str;
  275. uint32 mp3_size;
  276. uint32 mp3_type;
  277. MMIMULTIM_SAVE_FILE_CALLBACK_PFUNC callback_func;
  278. }MMS_SAVE_MP3_PARAM,*P_MMS_SAVE_MP3_PARAM;
  279. /* 增加(修改)收件人窗口 */
  280. typedef struct TAG_MMS_ADDMODIFY_PARAM   /* 参数 */
  281. {
  282. int32 win_title; /* 窗口标题 */
  283. BOOLEAN modify_flag; /* 是修改还是添加TRUE:MODIFY;FALSE:ADD */  
  284. void* p_receiver; /* 修改时进入编辑框的初始值 */
  285. } MMS_ADDMODIFY_PARAM,*P_MMS_ADDMODIFY_PARAM;
  286. /**--------------------------------------------------------------------------*
  287.  **                         EXTERNAL DECLARE                                 *
  288.  **--------------------------------------------------------------------------*/
  289. extern BOOLEAN g_inboxneedsave;
  290. extern BOOLEAN g_issendingreadrpt;
  291. extern BOOLEAN g_donewmms;
  292. extern char *g_filename;
  293. extern HFS inboxfile_openstatus ;
  294. //add end 
  295. //fnh add end
  296. extern P_ManagerDocument g_pManager ;
  297. extern MMIMMS_NV_SETTING g_nv_setting_mirror; //mirror of NV mms setting
  298. extern uint32 g_progressneedsize;
  299. extern uint32 g_progresscurrentsize;
  300. extern uint8 g_videoname_arr[MMIMMS_MAX_FILE_NAME_LEN+1] ;//make it gloal for MMIMPEG4_AddOne
  301. extern uint8 g_mp3name_arr[MMIMMS_MAX_FILE_NAME_LEN+1] ;//make it gloal for MMIMPEG4_AddOne
  302. extern BOOLEAN g_backautodownload;
  303. extern pMMS_EDocument g_pcur_signdoc ;
  304. extern MMIMMS_MEM_STORE_T g_mms_save_in_mem; //used between edit and save in ram modules
  305. extern FILE_DEV_E_T MMICMS_GetCurrentFFS( void );
  306.  /**-------------------------------------------------------------------------*
  307.  **                         GLOBAL DEFINITION                                *
  308.  **--------------------------------------------------------------------------*/
  309. uint16 g_mms_edit_status = 0;
  310. uint16 g_mms_edit_rec_status = 0;
  311. uint16 g_mms_receiver_status = 0;
  312. uint16 g_mms_receiver_mod_or_add = 0;
  313. uint16 g_mms_Receiver_cur_sel = 0;
  314. uint8 g_mmimms_preview_timer_id = 0;
  315. uint16 iFClose = 0; //fnh add 0324 for MS00041490
  316. //linalgiu added 2005-11-18 for g_readsignstate
  317. MMIMMS_READ_STATE_CHANGED g_readforstate = MMS_MSG_INBOX_READ_FOR_NULL;
  318. MMIMMS_READ_STATE_SIGN g_readsignstate= MMS_MSG_READ_SIGN_NULL;
  319. MMIMMS_SAVEMANAGERFILE_STATE g_savestate = MMS_MSG_SAVEFILE_FOR_NULL;
  320. MMIMMS_SAVEMAMMS_STATE     g_savemmsstate = MMS_MSG_SAVEMMS_FOR_NULL;
  321. MMIMMS_NETUSING_STATE    g_netusing = MMS_MSG_NETUSING_NULL;
  322. pMessageList g_pCurrentList = PNULL;
  323. int8* g_p_mms_subject = NULL;  //主题字符串,生存期为编辑窗口开关时间
  324. pMMS_EDocument g_peditdoc = NULL;  // 编辑文档,编辑器内部使用,生存期为编辑器主窗口开关时间 */
  325. /*以下是3个收件人地址的链表,生存周期为编辑窗口的开关*/
  326. p_MMS_RECEPIENT g_p_mms_to = NULL;
  327. p_MMS_RECEPIENT g_p_mms_cc = NULL;
  328. p_MMS_RECEPIENT g_p_mms_bcc = NULL;
  329. /*以下是3个收件人为群组时的地址链表*/
  330. p_MMS_GROUP g_p_mms_to_group = NULL; //记录收件人组信息
  331. p_MMS_GROUP g_p_mms_cc_group = NULL; //记录抄送人组信息
  332. p_MMS_GROUP g_p_mms_bcc_group = NULL; //记录密送人组信息
  333. uint8 g_mailbox_status = 0;
  334. FILE_DEV_E_T g_filetype;
  335. /**--------------------------------------------------------------------------*
  336.  **                         STATIC DEFINITION                                *
  337.  **--------------------------------------------------------------------------*/
  338. LOCAL BOOLEAN s_mms_is_preview_ring = FALSE;//MMS是否在预览彩信中的铃声
  339. LOCAL GUI_RECT_T s_mms_preview_display_rect = {0, MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT, MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
  340.                                                 MMI_MAINSCREEN_BOTTOM_MAX_PIXEL - MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT};
  341. LOCAL   BOOLEAN s_is_mms_suspend_mp3 = FALSE;
  342. LOCAL   BOOLEAN s_is_mmscontent_suspend_mp3 = FALSE;
  343. static uint8  s_mailbox_index;
  344. /*---------------------------------------------------------------------------*/
  345. /*                          LOCAL FUNCTION DECLARE                           */
  346. /*---------------------------------------------------------------------------*/
  347. /*****************************************************************************/
  348. //  Description : 彩信主窗口消息处理函数
  349. //  Global resource dependence : 
  350. //  Author:Bill.Ji
  351. //  Note:
  352. /*****************************************************************************/
  353. LOCAL MMI_RESULT_E Main_HandleMmsMainWin( MMI_WIN_ID_T   win_id, 
  354.                                           MMI_MESSAGE_ID_E  msg_id, 
  355.                                           DPARAM            param );
  356. /*****************************************************************************/
  357. //  Description : 彩信主窗口控件初始化
  358. //  Global resource dependence : 
  359. //  Author:Bill.Ji
  360. //  Note:
  361. /*****************************************************************************/
  362. LOCAL void Main_MmsInitCtrl( uint8  cur_index );
  363. /*****************************************************************************/
  364. //  Description : 彩信主窗口列表控件初始化
  365. //  Global resource dependence : 
  366. //  Author:Bill.Ji
  367. //  Note:
  368. /*****************************************************************************/
  369. LOCAL void Main_MmsInitList( MMIMSG_MAILBOX_TYPE_E  mailbox_type );
  370. /*****************************************************************************/
  371. //  Description : 写新彩信的回调函数
  372. //  Global resource dependence : 
  373. //  Author:Bill.Ji
  374. //  Note:
  375. /*****************************************************************************/
  376. LOCAL MMI_RESULT_E Main_MmsNewMmsCallBack( void );
  377. /*****************************************************************************/
  378. //     Description : 5.1A Edit MMS   window message handler
  379. //    Global resource dependence : 
  380. //  Author:Bruce.Chi
  381. //    Note: 
  382. /*****************************************************************************/
  383. LOCAL MMI_RESULT_E  Edit_HandleEditMMSWinMsg(
  384.                                      MMI_WIN_ID_T win_id, 
  385.                                      MMI_MESSAGE_ID_E msg_id, 
  386.                                      DPARAM param
  387.                                      );
  388. /*****************************************************************************/
  389. //     Description : 5.1A set MMS edit control text 
  390. //    Global resource dependence : 
  391. //  Author:Bruce.Chi
  392. //    Note: 
  393. /*****************************************************************************/
  394. LOCAL BOOLEAN Edit_SetEditCtrlContent(MMI_CTRL_ID_T ctrl_id,pMMS_EDocument p_cur_edoc);
  395. /*****************************************************************************/
  396. //     Description : 5.1A set MMS label text (N/M x.yK)
  397. //    Global resource dependence : 
  398. //  Author:Bruce.Chi
  399. //    Note:    N: Current slide index.    M: total slide
  400. //            x: how many kilos        y: how many hundreds
  401. /*****************************************************************************/
  402. LOCAL BOOLEAN Edit_SetLabelContent(MMI_CTRL_ID_T ctrl_id,pMMS_EDocument p_cur_edoc);
  403. /*****************************************************************************/
  404. //     Description : 5.1A set MMS label text (N/M x.yK)
  405. //    Global resource dependence : 
  406. //  Author:Bruce.Chi
  407. //    Note:    N: Current slide index.    M: total slide
  408. //            x: how many kilos        y: how many hundreds
  409. /*****************************************************************************/
  410. LOCAL BOOLEAN Edit_SetSignLabelContent(MMI_CTRL_ID_T ctrl_id,pMMS_EDocument p_cur_edoc);
  411. /*****************************************************************************/
  412. //  Description : 预览界面的向上按钮回调函数
  413. //  Global resource dependence : 
  414. //  Author:yuhua.shi
  415. //  Note:
  416. /*****************************************************************************/
  417. LOCAL MMI_RESULT_E Edit_PreviewUpButtonCallBack( void );
  418. /*****************************************************************************/
  419. //  Description : 预览界面的向下按钮回调函数
  420. //  Global resource dependence : 
  421. //  Author:Bill.Ji
  422. //  Note:
  423. /*****************************************************************************/
  424. LOCAL MMI_RESULT_E Edit_PreviewDownButtonCallBack( void );
  425. /*****************************************************************************/
  426. //  Description : 预览界面的向左按钮回调函数
  427. //  Global resource dependence : 
  428. //  Author:Bill.Ji
  429. //  Note:
  430. /*****************************************************************************/
  431. LOCAL MMI_RESULT_E Edit_PreviewLeftButtonCallBack( void );
  432. /*****************************************************************************/
  433. //  Description : 预览界面的向右按钮回调函数
  434. //  Global resource dependence : 
  435. //  Author:Bill.Ji
  436. //  Note:
  437. /*****************************************************************************/
  438. LOCAL MMI_RESULT_E Edit_PreviewRightButtonCallBack( void );
  439. /*****************************************************************************/
  440. //  Description : 预览界面的停止播放按钮回调函数
  441. //  Global resource dependence : 
  442. //  Author:Bill.Ji
  443. //  Note:
  444. /*****************************************************************************/
  445. LOCAL MMI_RESULT_E Edit_PreviewPlayButtonCallBack( void );
  446. /*****************************************************************************/
  447. //  Description : 5.1.5 Edit: preview   window message handler
  448. // Global resource dependence : 
  449. //  Author:Bruce.Chi
  450. // Note: 
  451. /*****************************************************************************/
  452. LOCAL MMI_RESULT_E Edit_HandlePreviewMMSMsg(
  453. MMS_WINDOW_ID_E win_id, 
  454. MMI_MESSAGE_ID_E msg_id, 
  455. DPARAM param
  456. );
  457. /*****************************************************************************/
  458. //  Description : 5.1.13 Edit: set slide time   window message handler
  459. // Global resource dependence : 
  460. //  Author:Bruce.Chi
  461. // Note: 
  462. /*****************************************************************************/
  463. LOCAL MMI_RESULT_E  Edit_HandleSetSlideTimeWinMsg(
  464. MMS_WINDOW_ID_E win_id, 
  465. MMI_MESSAGE_ID_E msg_id, 
  466. DPARAM param
  467. ); 
  468. /*****************************************************************************/
  469. //  Description : 5.4.1A Inbox: message list  window message handler
  470. // Global resource dependence : 
  471. //  Author:liangliu@palmsource.com
  472. // Note: 
  473. /*****************************************************************************/
  474. LOCAL MMI_RESULT_E  MMSSPACE_HandleListWinMsg(
  475. MMS_WINDOW_ID_E win_id, 
  476. MMI_MESSAGE_ID_E msg_id, 
  477. DPARAM param
  478. );
  479. /*****************************************************************************/
  480. //  Description : 5.4.1A Inbox: message list  window message handler
  481. // Global resource dependence : 
  482. //  Author:Bruce.Chi
  483. // Note: 
  484. /*****************************************************************************/
  485. LOCAL MMI_RESULT_E  Inbox_HandleListWinMsg(
  486. MMS_WINDOW_ID_E win_id, 
  487. MMI_MESSAGE_ID_E msg_id, 
  488. DPARAM param
  489. );
  490. /*****************************************************************************/
  491. //  Description :5.4.1C Inbox : Option menu of MMS  window message handler
  492. // Global resource dependence : 
  493. //  Author:Bruce.Chi
  494. // Note: 
  495. /*****************************************************************************/
  496. LOCAL MMI_RESULT_E  Inbox_HandleMMSMenuWinMsg(
  497. MMS_WINDOW_ID_E win_id, 
  498. MMI_MESSAGE_ID_E msg_id, 
  499. DPARAM param
  500. );
  501. /*****************************************************************************/
  502. //  Description : 5.4.7 Inbox : MMS detail  window message handler
  503. // Global resource dependence : 
  504. //  Author:Bruce.Chi
  505. // Note: 
  506. /*****************************************************************************/
  507. LOCAL MMI_RESULT_E  Inbox_HandleMMSDetailWinMsg(
  508. MMS_WINDOW_ID_E win_id, 
  509. MMI_MESSAGE_ID_E msg_id, 
  510. DPARAM param
  511. );
  512. /*****************************************************************************/
  513. //  Description : 5.5.1A Sentbox: message list  window message handler
  514. // Global resource dependence : 
  515. //  Author:Bruce.Chi
  516. // Note: 
  517. /*****************************************************************************/
  518. LOCAL MMI_RESULT_E  Sentbox_HandleListWinMsg(
  519. MMS_WINDOW_ID_E win_id, 
  520. MMI_MESSAGE_ID_E msg_id, 
  521. DPARAM param
  522. );
  523. /*****************************************************************************/
  524. //  Description : 5.7.1A Outbox: message list  window message handler
  525. // Global resource dependence : 
  526. //  Author:Bruce.Chi
  527. // Note: 
  528. /*****************************************************************************/
  529. LOCAL MMI_RESULT_E  Outbox_HandleListWinMsg(
  530. MMS_WINDOW_ID_E win_id, 
  531. MMI_MESSAGE_ID_E msg_id, 
  532. DPARAM param
  533. );
  534. /*****************************************************************************/
  535. //  Description : 5.7.1A DraftBox : list of draft  window message handler
  536. // Global resource dependence : 
  537. //  Author:Bruce.Chi
  538. // Note: 
  539. /*****************************************************************************/
  540. LOCAL MMI_RESULT_E  DraftBox_HandleListWinMsg(
  541. MMS_WINDOW_ID_E win_id, 
  542. MMI_MESSAGE_ID_E msg_id, 
  543. DPARAM param
  544.   );
  545. /*****************************************************************************/
  546. //  Description : MMS Setting menu  
  547. // Global resource dependence : 
  548. //  Author:Aoke.Hu
  549. // Note: 
  550. /*****************************************************************************/
  551. LOCAL MMI_RESULT_E Setting_HandleMenuWinMsg(
  552. MMS_WINDOW_ID_E win_id, 
  553. MMI_MESSAGE_ID_E msg_id, 
  554. DPARAM param
  555.   );
  556. /*****************************************************************************/
  557. //  Description : 5.8.1 Setting : autodownload  window message handler
  558. // Global resource dependence : 
  559. //  Author:Bruce.Chi
  560. // Note: 
  561. /*****************************************************************************/
  562. LOCAL MMI_RESULT_E  Setting_HandleAutoDownloadListWinMsg(
  563. MMS_WINDOW_ID_E win_id, 
  564. MMI_MESSAGE_ID_E msg_id, 
  565. DPARAM param
  566.   );
  567. /*****************************************************************************/
  568. //  Description : 5.8.6 Setting : Arrive report  window message handler
  569. // Global resource dependence : 
  570. //  Author:liangliu
  571. //  date : 2005-11-15
  572. // Note: 
  573. /*****************************************************************************/
  574. LOCAL MMI_RESULT_E  Setting_HandleArriveReportWinMsg(
  575. MMS_WINDOW_ID_E win_id, 
  576. MMI_MESSAGE_ID_E msg_id, 
  577. DPARAM param
  578.   );
  579. /*****************************************************************************/
  580. //  Description : 5.8.6 Setting : Read report  window message handler
  581. // Global resource dependence : 
  582. //  Author:liangliu@palmsource.com
  583. //  date : 2005-11-15
  584. // Note: 
  585. /*****************************************************************************/
  586. LOCAL MMI_RESULT_E  Setting_HandleReadReportWinMsg(
  587. MMS_WINDOW_ID_E win_id, 
  588. MMI_MESSAGE_ID_E msg_id, 
  589. DPARAM param
  590.   );
  591. /* ----------------------------------------------------------------------------
  592. * Function Name: Setting_HandleOpenSignWinMsg
  593. * Purpose: 设置中自动签名的窗口处理消息
  594. * Input: MMS_WINDOW_ID_E win_id, 
  595.  MMI_MESSAGE_ID_E msg_id, 
  596.  DPARAM param
  597. * Returns: MMI_RESULT_E
  598. * Author:nihongf@mobilesoft.com.cn
  599. * ----------------------------------------------------------------------------*/ 
  600. LOCAL MMI_RESULT_E  Setting_HandleOpenSignWinMsg(
  601. MMS_WINDOW_ID_E win_id, 
  602. MMI_MESSAGE_ID_E msg_id, 
  603. DPARAM param
  604.   );
  605. /* ----------------------------------------------------------------------------
  606. * Function Name: Setting_HandleAnonymityWinMsg
  607. * Purpose: 设置中匿名发送的窗口处理消息
  608. * Input: MMS_WINDOW_ID_E win_id, 
  609.  MMI_MESSAGE_ID_E msg_id, 
  610.  DPARAM param
  611. * Returns: MMI_RESULT_E
  612. * Author:nihongf@mobilesoft.com.cn
  613. * ----------------------------------------------------------------------------*/ 
  614. LOCAL MMI_RESULT_E  Setting_HandleAnonymityWinMsg(
  615. MMS_WINDOW_ID_E win_id, 
  616. MMI_MESSAGE_ID_E msg_id, 
  617. DPARAM param
  618.   );
  619. /* ----------------------------------------------------------------------------
  620. * Function Name: Setting_HandleSoundWinMsg
  621. * Purpose: 设置中播放声音的窗口处理消息
  622. * Input: MMS_WINDOW_ID_E win_id, 
  623.  MMI_MESSAGE_ID_E msg_id, 
  624.  DPARAM param
  625. * Returns: MMI_RESULT_E
  626. * Author:nihongf@mobilesoft.com.cn
  627. * ----------------------------------------------------------------------------*/ 
  628. LOCAL MMI_RESULT_E  Setting_HandleSoundWinMsg(
  629. MMS_WINDOW_ID_E win_id, 
  630. MMI_MESSAGE_ID_E msg_id, 
  631. DPARAM param
  632.   );
  633. /* ----------------------------------------------------------------------------
  634. * Function Name: Setting_HandleAdvertisingWinMsg
  635. * Purpose: 设置中是否允许广告的窗口处理消息
  636. * Input: MMS_WINDOW_ID_E win_id, 
  637.  MMI_MESSAGE_ID_E msg_id, 
  638.  DPARAM param
  639. * Returns: MMI_RESULT_E
  640. * Author:nihongf@mobilesoft.com.cn
  641. * ----------------------------------------------------------------------------*/ 
  642. LOCAL MMI_RESULT_E  Setting_HandleAdvertisingWinMsg(
  643. MMS_WINDOW_ID_E win_id, 
  644. MMI_MESSAGE_ID_E msg_id, 
  645. DPARAM param
  646.   );
  647. /*****************************************************************************/
  648. //  Description : 5.8.2 Setting : Priority  window message handler
  649. // Global resource dependence : 
  650. //  Author:Bruce.Chi
  651. // Note: 
  652. /*****************************************************************************/
  653. LOCAL MMI_RESULT_E  Setting_HandlePriorityListWinMsg(
  654. MMS_WINDOW_ID_E win_id, 
  655. MMI_MESSAGE_ID_E msg_id, 
  656. DPARAM param
  657.   );
  658. /*****************************************************************************/
  659. //  Description : 5.8.3 Setting : mms duaration  window message handler
  660. // Global resource dependence : 
  661. //  Author:Bruce.Chi
  662. // Note: 
  663. /*****************************************************************************/
  664. LOCAL MMI_RESULT_E  Setting_HandleValidPeriodListWinMsg(
  665. MMS_WINDOW_ID_E win_id, 
  666. MMI_MESSAGE_ID_E msg_id, 
  667. DPARAM param
  668.   );
  669. /*****************************************************************************/
  670. //  Description : 5.8.5 Setting : mmsc
  671. // Global resource dependence : 
  672. //  Author:Bruce.Chi
  673. // Note: 
  674. /*****************************************************************************/
  675. LOCAL MMI_RESULT_E  Setting_HandleMMSCWinMsg(
  676. MMS_WINDOW_ID_E win_id, 
  677. MMI_MESSAGE_ID_E msg_id, 
  678. DPARAM param
  679.   );
  680. /*****************************************************************************/
  681. //  Description : 5.8.5 Setting : gateway
  682. // Global resource dependence : 
  683. //  Author:Bruce.Chi
  684. // Note: 
  685. /*****************************************************************************/
  686. LOCAL MMI_RESULT_E  Setting_HandleGateWayWinMsg(
  687. MMS_WINDOW_ID_E win_id, 
  688. MMI_MESSAGE_ID_E msg_id, 
  689. DPARAM param
  690.   );
  691. /*****************************************************************************/
  692. //  Description : 5.8.5 Setting : SIGN
  693. // Global resource dependence : 
  694. //  Author:Aoke.Hu
  695. // Note: 
  696. /*****************************************************************************/
  697. LOCAL BOOLEAN Setting_HandleSignWinMsg(
  698. MMI_WIN_ID_T win_id, 
  699. MMI_MESSAGE_ID_E msg_id, 
  700. DPARAM param
  701. );
  702. /*****************************************************************************/
  703. //  Description : 5.8.5 Setting : Network
  704. // Global resource dependence : 
  705. //  Author:Aoke.Hu
  706. // Note: 
  707. /*****************************************************************************/
  708. LOCAL BOOLEAN Setting_HandleNetworkWinMsg(
  709. MMI_WIN_ID_T win_id, 
  710. MMI_MESSAGE_ID_E msg_id, 
  711. DPARAM param
  712. );
  713. /*****************************************************************************/
  714. //  Description : 5.8.5 Setting : Port
  715. // Global resource dependence : 
  716. //  Author:Bruce.Chi
  717. // Note: 
  718. /*****************************************************************************/
  719. LOCAL MMI_RESULT_E  Setting_HandlePortWinMsg(
  720. MMS_WINDOW_ID_E win_id, 
  721. MMI_MESSAGE_ID_E msg_id, 
  722. DPARAM param
  723.   );
  724. /*****************************************************************************/
  725. //  Description : 5.8.5 Setting : UserName
  726. // Global resource dependence : 
  727. //  Author:Bruce.Chi
  728. // Note: 
  729. /*****************************************************************************/
  730. LOCAL MMI_RESULT_E  Setting_HandleUserNameWinMsg(
  731. MMS_WINDOW_ID_E win_id, 
  732. MMI_MESSAGE_ID_E msg_id, 
  733. DPARAM param
  734.   );
  735. /*****************************************************************************/
  736. //  Description : 5.8.5 Setting : Password
  737. // Global resource dependence : 
  738. //  Author:Bruce.Chi
  739. // Note: 
  740. /*****************************************************************************/
  741. LOCAL MMI_RESULT_E  Setting_HandlePasswordWinMsg(
  742. MMS_WINDOW_ID_E win_id, 
  743. MMI_MESSAGE_ID_E msg_id, 
  744. DPARAM param
  745.   );
  746. /*****************************************************************************/
  747. //  Description : 5.8.5 Setting : APN
  748. // Global resource dependence : 
  749. //  Author:Bruce.Chi
  750. // Note: 
  751. /*****************************************************************************/
  752. LOCAL MMI_RESULT_E  Setting_HandleAPNWinMsg(
  753. MMS_WINDOW_ID_E win_id, 
  754. MMI_MESSAGE_ID_E msg_id, 
  755. DPARAM param
  756.   );
  757. /* ----------------------------------------------------------------------------
  758. * Function Name: Download_HandleDownloadingWin
  759. * Purpose: 下载彩信的窗口消息处理函数
  760. * Input: MMS_WINDOW_ID_E win_id, 
  761.  MMI_MESSAGE_ID_E msg_id, 
  762.  DPARAM param
  763. * Returns: MMI_RESULT_E
  764. * Author:nihongf@mobilesoft.com.cn
  765. * ----------------------------------------------------------------------------*/ 
  766. LOCAL MMI_RESULT_E  Download_HandleDownloadingWin(
  767.  MMS_WINDOW_ID_E win_id, 
  768.  MMI_MESSAGE_ID_E msg_id, 
  769.  DPARAM param
  770.  );
  771. /* ----------------------------------------------------------------------------
  772. * Function Name: SendMMS_HandleWaitingWin
  773. * Purpose: 发送彩信时的等待窗口消息处理函数
  774. * Input: MMS_WINDOW_ID_E win_id, 
  775.  MMI_MESSAGE_ID_E msg_id, 
  776.  DPARAM param
  777. * Returns: MMI_RESULT_E
  778. * Author:nihongf@mobilesoft.com.cn
  779. * ----------------------------------------------------------------------------*/ 
  780. LOCAL MMI_RESULT_E  SendMMS_HandleWaitingWin(
  781.  MMS_WINDOW_ID_E win_id, 
  782.  MMI_MESSAGE_ID_E msg_id, 
  783.  DPARAM param
  784.  );
  785. /* ----------------------------------------------------------------------------
  786. * Function Name: SendReadRpt_HandleWaitingWin
  787. * Purpose: 发送阅读报告时的等待窗口消息处理函数
  788. * Input: MMS_WINDOW_ID_E win_id, 
  789.  MMI_MESSAGE_ID_E msg_id, 
  790.  DPARAM param
  791. * Returns: MMI_RESULT_E
  792. * Author:nihongf@mobilesoft.com.cn
  793. * ----------------------------------------------------------------------------*/ 
  794. LOCAL MMI_RESULT_E  SendReadRpt_HandleWaitingWin(
  795.  MMS_WINDOW_ID_E win_id, 
  796.  MMI_MESSAGE_ID_E msg_id, 
  797.  DPARAM param
  798.  );
  799. /* ----------------------------------------------------------------------------
  800. * Function Name: MMIMMS_HandleNormalWaitingWin
  801. * Purpose: 删除彩信时等待窗口消息处理函数
  802. * Input: MMS_WINDOW_ID_E win_id, 
  803.  MMI_MESSAGE_ID_E msg_id, 
  804.  DPARAM param
  805. * Returns: MMI_RESULT_E
  806. * Author:nihongf@mobilesoft.com.cn
  807. * ----------------------------------------------------------------------------*/ 
  808. LOCAL MMI_RESULT_E   MMIMMS_HandleNormalWaitingWin(
  809.  MMS_WINDOW_ID_E win_id, 
  810.  MMI_MESSAGE_ID_E msg_id, 
  811.  DPARAM param
  812.  );
  813. /* ----------------------------------------------------------------------------
  814. * Function Name: MMIMMS_HandleReadMMSWaitingWin
  815. * Purpose: 读取彩信时等待窗口消息处理函数
  816. * Input: MMS_WINDOW_ID_E win_id, 
  817.  MMI_MESSAGE_ID_E msg_id, 
  818.  DPARAM param
  819. * Returns: MMI_RESULT_E
  820. * Author:nihongf@mobilesoft.com.cn
  821. * ----------------------------------------------------------------------------*/ 
  822. LOCAL MMI_RESULT_E  MMIMMS_HandleReadMMSWaitingWin(
  823.  MMS_WINDOW_ID_E win_id, 
  824.  MMI_MESSAGE_ID_E msg_id, 
  825.  DPARAM param
  826.  );
  827. /* ----------------------------------------------------------------------------
  828. * Function Name: MMIMMS_HandleSaveMMSWaitingWin
  829. * Purpose: 保存彩信时等待窗口消息处理函数
  830. * Input: MMS_WINDOW_ID_E win_id, 
  831.  MMI_MESSAGE_ID_E msg_id, 
  832.  DPARAM param
  833. * Returns: MMI_RESULT_E
  834. * Author:nihongf@mobilesoft.com.cn
  835. * ----------------------------------------------------------------------------*/ 
  836. LOCAL MMI_RESULT_E  MMIMMS_HandleSaveMMSWaitingWin(
  837.  MMS_WINDOW_ID_E win_id, 
  838.  MMI_MESSAGE_ID_E msg_id, 
  839.  DPARAM param
  840.  );
  841. /*****************************************************************************/
  842. //  Description : to append the info to listbox
  843. // Global resource dependence : 
  844. //  Author:louis.wei
  845. // Note: 
  846. /*****************************************************************************/
  847. LOCAL void AppendListItemByTextId(
  848.  uint32  text_id,
  849.  MMS_CONTROL_ID_E ctrl_id
  850.  );
  851. /*****************************************************************************/
  852. //  Description : to append the info to listbox
  853. // Global resource dependence : 
  854. //  Author:louis.wei
  855. // Note: 
  856. /*****************************************************************************/
  857. LOCAL void AppendListItem(
  858.                      uint8  *string_ptr,
  859.                      uint8 string_len,
  860.                      BOOLEAN      is_ucs2,
  861.                      MMS_CONTROL_ID_E ctrl_id,
  862.                      uint16 left_softkey_id
  863.                      );
  864. /*****************************************************************************/
  865. //  Description : to append the info to listbox
  866. // Global resource dependence : 
  867. //  Author:louis.wei
  868. // Note: 
  869. /*****************************************************************************/
  870. LOCAL void AppendListItemWithIcon(
  871.                      uint8  *string_ptr,
  872.                      uint8 string_len,
  873.                      uint32                           icon_id,
  874.                      BOOLEAN      is_ucs2,
  875.                      MMS_CONTROL_ID_E ctrl_id,
  876.                      uint16 left_softkey_id
  877.                      );
  878. /* ----------------------------------------------------------------------------
  879. * Function Name: Preview_PlayCurrentSlide
  880. * Purpose: 播放当前祯内容
  881. * Input:  x_start:起点X坐标
  882.       y_start:起点Y坐标
  883.     win_id:窗口ID
  884.     anim_ctrl_Id:图形控件ID
  885.     textbox_ctrl_id:文本控件ID
  886.     is_new_slide:是否第一次显示
  887. * Returns: BOOLEAN
  888. * Author:nihongf@mobilesoft.com.cn
  889. * ----------------------------------------------------------------------------*/ 
  890. LOCAL BOOLEAN Preview_PlayCurrentSlide(pMMS_EDocument p_cur_edoc, //当前编辑文档
  891.    int x_start, //显示区域起始横坐标
  892. int y_start, //显示区域起始纵坐标
  893. MMS_WINDOW_ID_E win_id, //窗口ID
  894. MMS_CONTROL_ID_E anim_ctrl_id, //图形显示控件ID
  895. MMS_CONTROL_ID_E textbox_ctrl_id,//文本显示控件ID
  896. BOOLEAN is_new_slide, //是否是第一次显示
  897. BOOLEAN is_beginning,
  898. BOOLEAN is_update //是否刷新
  899. );
  900. /*****************************************************************************/
  901. //  Description : judge whether current slide is the last slide
  902. // Global resource dependence : 
  903. //  Author: Bruce.chi
  904. // Note:
  905. /*****************************************************************************/
  906. LOCAL BOOLEAN Edit_isLastSlide(pMMS_EDocument p_cur_edoc);
  907. /*****************************************************************************/
  908. //  Description : 显示彩信签名页。
  909. // Global resource dependence : 
  910. //  Author: nihongf
  911. // Note:
  912. /*****************************************************************************/
  913. LOCAL MMI_RESULT_E  Edit_HandleMMSEditSignWin(
  914. MMS_WINDOW_ID_E win_id, 
  915. MMI_MESSAGE_ID_E msg_id, 
  916. DPARAM param
  917. );
  918. /*****************************************************************************/
  919. //  Description : open multim download pictures insert image window
  920. // Global resource dependence : 
  921. //  Author: Jassmine
  922. // Note:
  923. /*****************************************************************************/
  924. LOCAL BOOLEAN Edit_OpenInsertDpicWin(
  925.                                      MMS_WINDOW_ID_E    win_id
  926.                                      );
  927. /*****************************************************************************/
  928. //  Description : open multim insert music window
  929. // Global resource dependence : 
  930. //  Author: Jassmine
  931. // Note:
  932. /*****************************************************************************/
  933. LOCAL BOOLEAN Edit_OpenInsertDringWin(
  934.                                       MMS_WINDOW_ID_E   win_id
  935.                                       );
  936. /* ----------------------------------------------------------------------------
  937. * Function Name: CmsDelContent
  938. * Purpose: 删除彩信结构中对应类型的内容(目前仅用来删除文本内容)
  939. * Input: editor_doc: 彩信结构地址 
  940.  slide: 所在页地址
  941.  del_type: 待删除内容的类
  942. * Returns: void
  943. * Author:nihongf@mobilesoft.com.cn
  944. * ----------------------------------------------------------------------------*/ 
  945. void CmsDelContent(pMMS_EDocument editor_doc, pMMS_Slide slide, uint16 del_type);
  946. /* ----------------------------------------------------------------------------
  947. * Function Name: Edit_HandleMMSSetSendDateWin
  948. * Purpose: 设置发送日期窗口
  949. * Input: win_id:窗口ID,
  950.  msg_Id:消息ID,
  951.  param:窗口参数
  952. * Returns: MMI_RESULT_E
  953. * Author:nihongf@mobilesoft.com.cn
  954. * ----------------------------------------------------------------------------*/ 
  955. LOCAL MMI_RESULT_E  Edit_HandleMMSSetSendDateWin(
  956. MMS_WINDOW_ID_E win_id, 
  957. MMI_MESSAGE_ID_E msg_id, 
  958. DPARAM param
  959. );
  960. /******************************************************************************
  961.  * 函数定义: cmsmms_HandlesaveimageWinMsg
  962.  * 函数说明: 保存彩信内容中的图象
  963.  * 参数说明: win_id:窗口id
  964. msg_id:消息id
  965. param:窗口参数
  966.  * 返回值: 空
  967. ********************************************************************************/
  968. LOCAL MMI_RESULT_E  cmsmms_HandlesaveimageWinMsg(
  969. MMS_WINDOW_ID_E win_id, 
  970. MMI_MESSAGE_ID_E msg_id, 
  971. DPARAM param
  972. );
  973. /******************************************************************************
  974.  * 函数定义: cmsmms_HandlesaveimageWinMsg
  975.  * 函数说明: 保存彩信内容中的音乐
  976.  * 参数说明: win_id:窗口id
  977. msg_id:消息id
  978. param:窗口参数
  979.  * 返回值: 空
  980. ********************************************************************************/
  981. LOCAL MMI_RESULT_E  cmsmms_HandlesavemusicWinMsg(
  982. MMS_WINDOW_ID_E win_id, 
  983. MMI_MESSAGE_ID_E msg_id, 
  984. DPARAM param
  985. );
  986. /******************************************************************************
  987.  * 函数定义: cmsmms_HandlesavevideoWinMsg
  988.  * 函数说明: 保存彩信内容中的视频
  989.  * 参数说明: win_id:窗口id
  990. msg_id:消息id
  991. param:窗口参数
  992.  * 返回值: 空
  993. ********************************************************************************/
  994. LOCAL MMI_RESULT_E  cmsmms_HandlesavevideoWinMsg(
  995. MMS_WINDOW_ID_E win_id, 
  996. MMI_MESSAGE_ID_E msg_id, 
  997. DPARAM param
  998. );
  999. /*****************************************************************************/
  1000. //  Description : display "current_slide_index/total_slide_num"
  1001. // Global resource dependence : 
  1002. //  Author:Bruce.Chi
  1003. // Note: 
  1004. /*****************************************************************************/
  1005. LOCAL void Preview_DispSlideNum(MMS_CONTROL_ID_E label_ctrl_id,pMMS_EDocument p_cur_edoc);
  1006. /*****************************************************************************/
  1007. //  Description : to continue play mp3
  1008. // Global resource dependence : 
  1009. //  Author:Jassmine.Meng
  1010. // Note: 
  1011. /*****************************************************************************/
  1012. LOCAL void MmsRingCallBack(void);
  1013. /******************************************************************************
  1014.  * 函数定义: HandleDownloadVideoInputName
  1015.  * 函数说明: 保存视频时重新输入名字
  1016.  * 参数说明: win_id:窗口ID
  1017. msg_id:消息ID
  1018. param:窗口附加值
  1019.  * 返回值: 空
  1020. ********************************************************************************/
  1021. LOCAL MMI_RESULT_E HandleDownloadVideoInputName(
  1022.                                               MMS_WINDOW_ID_E      win_id,
  1023.                                               MMI_MESSAGE_ID_E     msg_id,
  1024.                                               DPARAM             param
  1025.                                               );
  1026. /* ----------------------------------------------------------------------------
  1027. * Function Name: HandleDownloadmp3InputName
  1028. * Purpose: 保存MP3时重新输入名字窗口处理函数
  1029. * Input: win_id:窗口ID,
  1030.  msg_Id:消息ID,
  1031.  param:窗口参数
  1032. * Returns: MMI_RESULT_E
  1033. * Author:nihongf@mobilesoft.com.cn
  1034. * ----------------------------------------------------------------------------*/ 
  1035. LOCAL MMI_RESULT_E HandleDownloadmp3InputName(
  1036.                                               MMS_WINDOW_ID_E      win_id,
  1037.                                               MMI_MESSAGE_ID_E     msg_id,
  1038.                                               DPARAM             param
  1039.                                               );
  1040. /* ----------------------------------------------------------------------------
  1041. * Function Name: MMIMMS_GenRandomNameAndSet
  1042. * Purpose: 取得随机名字并设置
  1043. * Input:uint8  *suffix_ptr,    
  1044.         MMS_CONTROL_ID_E         ctrl_id  
  1045. * Returns: void
  1046. * Author:nihongf@mobilesoft.com.cn
  1047. * ----------------------------------------------------------------------------*/ 
  1048. LOCAL void MMIMMS_GenRandomNameAndSet(
  1049.                                uint8                    *suffix_ptr,    
  1050.                                MMS_CONTROL_ID_E         ctrl_id  
  1051.                                );
  1052. /*****************************************************************************/
  1053. //  Description : this function handle MMS edit, select insert photo or Dpic window message
  1054. //  Global resource dependence : 
  1055. //  Author:Rui.Zhang
  1056. //  Note:
  1057. /*****************************************************************************/
  1058. LOCAL MMI_RESULT_E MMS_HandleEditSelectImageWinMsg( 
  1059.  MMI_WIN_ID_T   win_id, 
  1060.                                              MMI_MESSAGE_ID_E  msg_id, 
  1061.                                              DPARAM            param );
  1062. /*****************************************************************************/
  1063. //  Description : this function handle MMS edit, select insert RING or MP3 window message
  1064. //  Global resource dependence : 
  1065. //  Author:AOKE.HU
  1066. //  Note:
  1067. /*****************************************************************************/
  1068. LOCAL MMI_RESULT_E MMS_HandleEditSelectMusicWinMsg( 
  1069.    MMI_WIN_ID_T   win_id, 
  1070.                                                    MMI_MESSAGE_ID_E  msg_id, 
  1071.                                                    DPARAM            param );
  1072. /* ----------------------------------------------------------------------------
  1073. * Function Name: MmsStopPreviewRing
  1074. * Purpose: 停止预览彩信铃声
  1075. * Input: void
  1076. * Returns: void
  1077. * Author:nihongf@mobilesoft.com.cn
  1078. * ----------------------------------------------------------------------------*/ 
  1079. LOCAL void MmsStopPreviewRing(void);
  1080. /* ----------------------------------------------------------------------------
  1081. * Function Name: Detail_FormTime
  1082. * Purpose: 详情中得到时间字符串
  1083. * Input:  MMI_STRING_T *str_dst, //out.
  1084.   uint8* time
  1085. * Returns: BOOLEAN
  1086. * Author:nihongf@mobilesoft.com.cn
  1087. * ----------------------------------------------------------------------------*/ 
  1088. LOCAL BOOLEAN Detail_FormTime(
  1089.                                    MMI_STRING_T *str_dst, //out.
  1090. uint8* time);
  1091. /* ----------------------------------------------------------------------------
  1092. * Function Name: Detail_FormSize
  1093. * Purpose: 详情中得到彩信大小字符串
  1094. * Input:  MMI_STRING_T *str_dst, //out.
  1095.   uint8* size
  1096. * Returns: BOOLEAN
  1097. * Author:nihongf@mobilesoft.com.cn
  1098. * ----------------------------------------------------------------------------*/ 
  1099. LOCAL BOOLEAN Detail_FormSize(
  1100.                                    MMI_STRING_T *str_dst, //out.
  1101. uint32 size);
  1102. /* ----------------------------------------------------------------------------
  1103. * Function Name: Detail_FormSubject
  1104. * Purpose: 详情中得到彩信标题字符串
  1105. * Input:  MMI_STRING_T *str_dst, //out.
  1106.   uint8* subject
  1107. * Returns: BOOLEAN
  1108. * Author:nihongf@mobilesoft.com.cn
  1109. * ----------------------------------------------------------------------------*/ 
  1110. LOCAL BOOLEAN Detail_FormSubject(
  1111.                                    MMI_STRING_T *str_dst, //out.
  1112. uint8* subject);
  1113. /* ----------------------------------------------------------------------------
  1114. * Function Name: Detail_FormCc
  1115. * Purpose: 详情中得到抄送人的字符串
  1116. * Input:  MMI_STRING_T *str_dst, //out.
  1117.   uint8* cc
  1118. * Returns: BOOLEAN
  1119. * Author:nihongf@mobilesoft.com.cn
  1120. * ----------------------------------------------------------------------------*/ 
  1121. LOCAL BOOLEAN Detail_FormCc(
  1122.                                    MMI_STRING_T *str_dst, //out.
  1123. uint8* cc);
  1124. /* ----------------------------------------------------------------------------
  1125. * Function Name: Detail_FormTo
  1126. * Purpose: 详情中得到收件人的字符串
  1127. * Input:  MMI_STRING_T *str_dst, //out.
  1128.   uint8* to
  1129. * Returns: BOOLEAN
  1130. * Author:nihongf@mobilesoft.com.cn
  1131. * ----------------------------------------------------------------------------*/ 
  1132. LOCAL BOOLEAN Detail_FormTo(
  1133.                                    MMI_STRING_T *str_dst, //out.
  1134. uint8* to);
  1135. /* ----------------------------------------------------------------------------
  1136. * Function Name: Detail_FormSender
  1137. * Purpose: 详情中得到发件人的字符串
  1138. * Input:  MMI_STRING_T *str_dst, //out.
  1139.   uint8* sender
  1140. * Returns: BOOLEAN
  1141. * Author:nihongf@mobilesoft.com.cn
  1142. * ----------------------------------------------------------------------------*/ 
  1143. LOCAL BOOLEAN Detail_FormSender(
  1144.                                    MMI_STRING_T *str_dst, //out.
  1145. uint8* sender
  1146.  );
  1147.  /* ----------------------------------------------------------------------------
  1148. * Function Name: Detail_FormPriority
  1149. * Purpose: 详情中得到优先级的字符串
  1150. * Input:  MMI_STRING_T *str_dst, //out.
  1151.   uint8* prioruty
  1152. * Returns: BOOLEAN
  1153. * Author:nihongf@mobilesoft.com.cn
  1154. * ----------------------------------------------------------------------------*/ 
  1155. LOCAL BOOLEAN Detail_FormPriority(
  1156.                                    MMI_STRING_T *str_dst, //out.
  1157. uint32 prioruty);
  1158. /* ----------------------------------------------------------------------------
  1159. * Function Name: Detail_FormExpiry
  1160. * Purpose: 详情中得到有效期的字符串
  1161. * Input:  MMI_STRING_T *str_dst, //out.
  1162.   uint8* expiry
  1163. * Returns: BOOLEAN
  1164. * Author:nihongf@mobilesoft.com.cn
  1165. * ----------------------------------------------------------------------------*/ 
  1166. LOCAL BOOLEAN Detail_FormExpiry(
  1167.                                    MMI_STRING_T *str_dst, //out.
  1168. uint32 expiry);
  1169. /* ----------------------------------------------------------------------------
  1170. * Function Name: MmsDelReceiver
  1171. * Purpose: 删除所有收件人
  1172. * Input:  p_receiver: 收件人列表
  1173. * Returns: int16
  1174. * Author:nihongf@mobilesoft.com.cn
  1175. * ----------------------------------------------------------------------------*/ 
  1176. LOCAL int16 MmsDelReceiver(p_MMS_RECEPIENT p_receiver);
  1177. /**---------------------------------------------------------------------------*
  1178. **                         Constant Variables                                *
  1179. **---------------------------------------------------------------------------*/
  1180. //the following is for Edit mms module
  1181. #if defined(TRUE_KEY_INPUT)
  1182. WINDOW_TABLE( MMIMMS_EDIT_WIN_TAB ) = 
  1183. {
  1184.     CLEAR_LCD,
  1185.     WIN_PRIO(WIN_ONE_LEVEL),
  1186.     //WIN_TITLE_ID(TXT_MMS_EDIT),          //maksed by cloud6 
  1187.     WIN_FUNC((uint32) Edit_HandleEditMMSWinMsg),    
  1188.     WIN_ID(MMIMMS_EDIT_WIN_ID),
  1189.     
  1190.     //lable of address,mms_to
  1191.     CREATE_BUTTON_CTRL(0,
  1192.                       1,//MMI_TITLE_HEIGHT+1,
  1193.                        MMIMMS_ADDRESS_BTN_WIDTH,
  1194.                        MMI_LIST_ITEM_HEIGHT-3,//MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT-3,
  1195.                        GUI_BUTTON_ICON_CENTER,
  1196.                        IMAGE_BTN_THREE_NORMAL,//IMAGE_SMS_EDIT_TO_NORMAL,
  1197.                        IMAGE_BTN_THREE_DOWN,
  1198.                        COMMON_IMAGE_NULL,
  1199.                        MMIMMS_EDIT_SELETENUM_CTRL_ID),  
  1200.     //edit address,mms_to                  
  1201.      CREATE_TEXTEDITBOX_CTRL(MMIMMS_ADDRESS_BTN_WIDTH+1,
  1202.                             1,//MMI_TITLE_HEIGHT,
  1203.                             MMI_MAINSCREEN_WIDTH-1-20,//MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
  1204.                             MMI_LIST_ITEM_HEIGHT-2,//MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT-2,
  1205.                             (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
  1206.                             (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
  1207.                             IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
  1208.                             IM_DIGITAL_MODE,
  1209.                             MMIMMS_ADDR_EDITBOX_CTRL_ID),
  1210. //lable of address,mms_cc
  1211.     CREATE_BUTTON_CTRL(0,
  1212.                        /*MMI_TITLE_HEIGHT+*/MMI_LIST_ITEM_HEIGHT+1,
  1213.                        MMIMMS_ADDRESS_BTN_WIDTH,
  1214.                        /*MMI_TITLE_HEIGHT+*/2*MMI_LIST_ITEM_HEIGHT-3,
  1215.                        GUI_BUTTON_ICON_CENTER,
  1216.                        IMAGE_BTN_THREE_NORMAL,//IMAGE_SMS_EDIT_TO_NORMAL,
  1217.                        IMAGE_BTN_THREE_DOWN,
  1218.                        COMMON_IMAGE_NULL,
  1219.                        MMIMMS_EDIT_SELETENUM_MMSCC_CTRL_ID),  
  1220.     //edit address,mms_cc                 
  1221.      CREATE_TEXTEDITBOX_CTRL(MMIMMS_ADDRESS_BTN_WIDTH+1,
  1222.                             /*MMI_TITLE_HEIGHT+*/MMI_LIST_ITEM_HEIGHT,
  1223.                             MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
  1224.                             /*MMI_TITLE_HEIGHT+*/2*MMI_LIST_ITEM_HEIGHT-2,
  1225.                             (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
  1226.                             (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
  1227.                             IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
  1228.                             IM_DIGITAL_MODE,
  1229.                             MMIMMS_ADDR_EDITBOX_MMSCC_CTRL_ID),
  1230. //lable of address,mms_bcc
  1231.     CREATE_BUTTON_CTRL(0,
  1232.                        /*MMI_TITLE_HEIGHT+*/2*MMI_LIST_ITEM_HEIGHT+1,
  1233.                        MMIMMS_ADDRESS_BTN_WIDTH,
  1234.                        /*MMI_TITLE_HEIGHT+*/3*MMI_LIST_ITEM_HEIGHT-3,
  1235.                        GUI_BUTTON_ICON_CENTER,
  1236.                        IMAGE_BTN_THREE_NORMAL,//IMAGE_SMS_EDIT_TO_NORMAL,
  1237.                        IMAGE_BTN_THREE_DOWN,
  1238.                        COMMON_IMAGE_NULL,
  1239.                        MMIMMS_EDIT_SELETENUM_MMSBCC_CTRL_ID),  
  1240.     //edit address,mms_bcc                  
  1241.      CREATE_TEXTEDITBOX_CTRL(MMIMMS_ADDRESS_BTN_WIDTH+1,
  1242.                             /*MMI_TITLE_HEIGHT+*/2*MMI_LIST_ITEM_HEIGHT,
  1243.                             MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
  1244.                             /*MMI_TITLE_HEIGHT+*/3*MMI_LIST_ITEM_HEIGHT-2,
  1245.                             (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
  1246.                             (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
  1247.                             IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
  1248.                             IM_DIGITAL_MODE,
  1249.                             MMIMMS_ADDR_EDITBOX_MMSBCC_CTRL_ID),
  1250.     
  1251.     //lable of subject
  1252.     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,
  1253.                         GUILABEL_LEFT, 0, MMIMMS_EDIT_SUBJ_LABEL_CTRL_ID),
  1254.     //edit subject                    
  1255.     CREATE_TEXTEDITBOX_CTRL(MMIMMS_ADDRESS_BTN_WIDTH+1,
  1256.                             /*MMI_TITLE_HEIGHT+*/3*MMI_LIST_ITEM_HEIGHT,
  1257.                             MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
  1258.                             /*MMI_TITLE_HEIGHT+*/4*MMI_LIST_ITEM_HEIGHT-1,
  1259.                             40,
  1260.                             40,
  1261.                             IM_PINYIN_TYPE | IM_STROKE_TYPE | IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
  1262.                             IM_PINYIN_MODE,
  1263.                             MMIMMS_EDIT_SUBJECT_CTRL_ID),                    
  1264.     //edit mms content
  1265.     CREATE_TEXTEDITBOX_CTRL(CONTENT_EDIT_X1, /*CONTENT_EDIT_Y1*/4*MMI_LIST_ITEM_HEIGHT, CONTENT_EDIT_X2,
  1266.                             CONTENT_EDIT_Y2 - MMI_TITLE_HEIGHT, MMIMMS_MAX_TEXT_LEN, MMIMMS_MAX_TEXT_LEN, 
  1267.                             IM_PINYIN_TYPE | IM_STROKE_TYPE | IM_CHARACTER_TYPE | IM_ENGLISH_TYPE | IM_DIGITAL_TYPE, 
  1268.                             IM_PINYIN_MODE, MMIMMS_EDIT_CTRL_ID),
  1269.     CREATE_LABEL_CTRL(LABEL_X1, LABEL_Y1- MMI_TITLE_HEIGHT, LABEL_X2-LABEL_HEIGHT, LABEL_Y2- MMI_TITLE_HEIGHT,
  1270.                         GUILABEL_LEFT, 0, MMIMMS_EDIT_LABEL_CTRL_ID),
  1271. CREATE_BUTTON_CTRL(LABEL_X2-LABEL_HEIGHT+1,LABEL_Y1- MMI_TITLE_HEIGHT,LABEL_X2,LABEL_Y2- MMI_TITLE_HEIGHT,
  1272.                        GUI_BUTTON_ICON_CENTER,
  1273.                        IMAGE_MMS_INSERT_VIDEO_ICON,//IMAGE_MMS_INSERT_RING_ICON,
  1274.                        IMAGE_MMS_INSERT_VIDEO_ICON,//IMAGE_MMS_INSERT_RING_ICON,
  1275.                        COMMON_IMAGE_NULL,
  1276.                        MMIMMS_EDIT_VIDEO_CTRL_ID),
  1277.                         
  1278.     CREATE_BUTTON_CTRL(LABEL_X2+1,LABEL_Y1- MMI_TITLE_HEIGHT,LABEL_X2+LABEL_HEIGHT,LABEL_Y2- MMI_TITLE_HEIGHT,
  1279.                        GUI_BUTTON_ICON_CENTER,
  1280.                        IMAGE_MMS_INSERT_SLIDE_ICON,
  1281.                        IMAGE_MMS_INSERT_SLIDE_ICON,
  1282.                        COMMON_IMAGE_NULL,
  1283.                        MMIMMS_EDIT_ADD_SLIDE_CTRL_ID),  
  1284.     CREATE_BUTTON_CTRL(LABEL_X2+LABEL_HEIGHT+1,LABEL_Y1- MMI_TITLE_HEIGHT,LABEL_X2+2*LABEL_HEIGHT,LABEL_Y2- MMI_TITLE_HEIGHT,
  1285.                        GUI_BUTTON_ICON_CENTER,
  1286.                        IMAGE_MMS_INSERT_PIC_ICON,
  1287.                        IMAGE_MMS_INSERT_PIC_ICON,
  1288.                        COMMON_IMAGE_NULL,
  1289.                        MMIMMS_EDIT_PIC_CTRL_ID),    
  1290.     CREATE_BUTTON_CTRL(LABEL_X2+2*LABEL_HEIGHT+1,LABEL_Y1- MMI_TITLE_HEIGHT,LABEL_X2+3*LABEL_HEIGHT,LABEL_Y2- MMI_TITLE_HEIGHT,
  1291.                        GUI_BUTTON_ICON_CENTER,
  1292.                        IMAGE_MMS_INSERT_RING_ICON,
  1293.                        IMAGE_MMS_INSERT_RING_ICON,
  1294.                        COMMON_IMAGE_NULL,
  1295.                        MMIMMS_EDIT_RING_CTRL_ID),
  1296.     CREATE_BUTTON_CTRL(LABEL_X2+3*LABEL_HEIGHT+1,LABEL_Y1- MMI_TITLE_HEIGHT,LABEL_X2+4*LABEL_HEIGHT,LABEL_Y2- MMI_TITLE_HEIGHT,
  1297.                        GUI_BUTTON_ICON_CENTER,
  1298.                        IMAGE_MMS_DEL_SLIDE_ICON,
  1299.                        IMAGE_MMS_DEL_SLIDE_ICON,
  1300.                        IMAGE_MMS_DEL_SLIDE_GRAYED_ICON,
  1301.                        MMIMMS_EDIT_DEL_SLIDE_CTRL_ID),
  1302.                                                                                                             
  1303.     CREATE_POP_MENU_CTRL(0,
  1304.                          MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-4*MMI_POPUP_MENU_HEIGHT,
  1305.                          MMI_POPUP_MENU_WIDTH-1,
  1306.                          MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-1,
  1307.                          MENU_MMS_POP_OPTION,
  1308.                          MMIMMS_EDIT_MENU_CTRL_ID),
  1309.     END_WIN
  1310. };
  1311. #else
  1312. WINDOW_TABLE( MMIMMS_EDIT_WIN_TAB ) = 
  1313. {
  1314.     CLEAR_LCD,
  1315.     WIN_PRIO(WIN_ONE_LEVEL),
  1316.     WIN_TITLE_ID(TXT_MMS_EDIT),
  1317.     WIN_FUNC((uint32) Edit_HandleEditMMSWinMsg),    
  1318.     WIN_ID(MMIMMS_EDIT_WIN_ID),
  1319.     
  1320.     //lable of address,mms_to
  1321.     CREATE_BUTTON_CTRL(0,
  1322.                        MMI_TITLE_HEIGHT+1,
  1323.                        MMIMMS_ADDRESS_BTN_WIDTH,
  1324.                        MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT-3,
  1325.                        GUI_BUTTON_ICON_CENTER,
  1326.                        IMAGE_BTN_THREE_NORMAL,//IMAGE_SMS_EDIT_TO_NORMAL,
  1327.                        IMAGE_BTN_THREE_DOWN,
  1328.                        COMMON_IMAGE_NULL,
  1329.                        MMIMMS_EDIT_SELETENUM_CTRL_ID),  
  1330.     //edit address,mms_to                  
  1331.      CREATE_TEXTEDITBOX_CTRL(MMIMMS_ADDRESS_BTN_WIDTH+1,
  1332.                             MMI_TITLE_HEIGHT,
  1333.                             MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
  1334.                             MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT-2,
  1335.                             (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
  1336.                             (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
  1337.                             IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
  1338.                             IM_DIGITAL_MODE,
  1339.                             MMIMMS_ADDR_EDITBOX_CTRL_ID),
  1340. //lable of address,mms_cc
  1341.     CREATE_BUTTON_CTRL(0,
  1342.                        MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT+1,
  1343.                        MMIMMS_ADDRESS_BTN_WIDTH,
  1344.                        MMI_TITLE_HEIGHT+2*MMI_LIST_ITEM_HEIGHT-3,
  1345.                        GUI_BUTTON_ICON_CENTER,
  1346.                        IMAGE_BTN_THREE_NORMAL,//IMAGE_SMS_EDIT_TO_NORMAL,
  1347.                        IMAGE_BTN_THREE_DOWN,
  1348.                        COMMON_IMAGE_NULL,
  1349.                        MMIMMS_EDIT_SELETENUM_MMSCC_CTRL_ID),  
  1350.     //edit address,mms_cc                 
  1351.      CREATE_TEXTEDITBOX_CTRL(MMIMMS_ADDRESS_BTN_WIDTH+1,
  1352.                             MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT,
  1353.                             MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
  1354.                             MMI_TITLE_HEIGHT+2*MMI_LIST_ITEM_HEIGHT-2,
  1355.                             (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
  1356.                             (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
  1357.                             IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
  1358.                             IM_DIGITAL_MODE,
  1359.                             MMIMMS_ADDR_EDITBOX_MMSCC_CTRL_ID),
  1360. //lable of address,mms_bcc
  1361.     CREATE_BUTTON_CTRL(0,
  1362.                        MMI_TITLE_HEIGHT+2*MMI_LIST_ITEM_HEIGHT+1,
  1363.                        MMIMMS_ADDRESS_BTN_WIDTH,
  1364.                        MMI_TITLE_HEIGHT+3*MMI_LIST_ITEM_HEIGHT-3,
  1365.                        GUI_BUTTON_ICON_CENTER,
  1366.                        IMAGE_BTN_THREE_NORMAL,//IMAGE_SMS_EDIT_TO_NORMAL,
  1367.                        IMAGE_BTN_THREE_DOWN,
  1368.                        COMMON_IMAGE_NULL,
  1369.                        MMIMMS_EDIT_SELETENUM_MMSBCC_CTRL_ID),  
  1370.     //edit address,mms_bcc                  
  1371.      CREATE_TEXTEDITBOX_CTRL(MMIMMS_ADDRESS_BTN_WIDTH+1,
  1372.                             MMI_TITLE_HEIGHT+2*MMI_LIST_ITEM_HEIGHT,
  1373.                             MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
  1374.                             MMI_TITLE_HEIGHT+3*MMI_LIST_ITEM_HEIGHT-2,
  1375.                             (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
  1376.                             (MMIMMS_MAX_ADDRESS_LEN+2)*MMIMMS_MAX_ADDRESS_NUM,
  1377.                             IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
  1378.                             IM_DIGITAL_MODE,
  1379.                             MMIMMS_ADDR_EDITBOX_MMSBCC_CTRL_ID),
  1380.     
  1381.     //lable of subject
  1382.     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,
  1383.                         GUILABEL_LEFT, 0, MMIMMS_EDIT_SUBJ_LABEL_CTRL_ID),
  1384.     //edit subject                    
  1385.     CREATE_TEXTEDITBOX_CTRL(MMIMMS_ADDRESS_BTN_WIDTH+1,
  1386.                             MMI_TITLE_HEIGHT+3*MMI_LIST_ITEM_HEIGHT,
  1387.                             MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
  1388.                             MMI_TITLE_HEIGHT+4*MMI_LIST_ITEM_HEIGHT-1,
  1389.                             40,
  1390.                             40,
  1391.                             IM_PINYIN_TYPE | IM_STROKE_TYPE | IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
  1392.                             IM_PINYIN_MODE,
  1393.                             MMIMMS_EDIT_SUBJECT_CTRL_ID),                    
  1394.     //edit mms content
  1395.     CREATE_TEXTEDITBOX_CTRL(CONTENT_EDIT_X1, CONTENT_EDIT_Y1, CONTENT_EDIT_X2,
  1396.                             CONTENT_EDIT_Y2, MMIMMS_MAX_TEXT_LEN, MMIMMS_MAX_TEXT_LEN, 
  1397.                             IM_PINYIN_TYPE | IM_STROKE_TYPE | IM_CHARACTER_TYPE | IM_ENGLISH_TYPE | IM_DIGITAL_TYPE, 
  1398.                             IM_PINYIN_MODE, MMIMMS_EDIT_CTRL_ID),
  1399.     CREATE_LABEL_CTRL(LABEL_X1, LABEL_Y1, LABEL_X2-LABEL_HEIGHT, LABEL_Y2,
  1400.                         GUILABEL_LEFT, 0, MMIMMS_EDIT_LABEL_CTRL_ID),
  1401. CREATE_BUTTON_CTRL(LABEL_X2-LABEL_HEIGHT+1,LABEL_Y1,LABEL_X2,LABEL_Y2,
  1402.                        GUI_BUTTON_ICON_CENTER,
  1403.                        IMAGE_MMS_INSERT_VIDEO_ICON,//IMAGE_MMS_INSERT_RING_ICON,
  1404.                        IMAGE_MMS_INSERT_VIDEO_ICON,//IMAGE_MMS_INSERT_RING_ICON,
  1405.                        COMMON_IMAGE_NULL,
  1406.                        MMIMMS_EDIT_VIDEO_CTRL_ID),
  1407.                         
  1408.     CREATE_BUTTON_CTRL(LABEL_X2+1,LABEL_Y1,LABEL_X2+LABEL_HEIGHT,LABEL_Y2,
  1409.                        GUI_BUTTON_ICON_CENTER,
  1410.                        IMAGE_MMS_INSERT_SLIDE_ICON,
  1411.                        IMAGE_MMS_INSERT_SLIDE_ICON,
  1412.                        COMMON_IMAGE_NULL,
  1413.                        MMIMMS_EDIT_ADD_SLIDE_CTRL_ID),  
  1414.     CREATE_BUTTON_CTRL(LABEL_X2+LABEL_HEIGHT+1,LABEL_Y1,LABEL_X2+2*LABEL_HEIGHT,LABEL_Y2,
  1415.                        GUI_BUTTON_ICON_CENTER,
  1416.                        IMAGE_MMS_INSERT_PIC_ICON,
  1417.                        IMAGE_MMS_INSERT_PIC_ICON,
  1418.                        COMMON_IMAGE_NULL,
  1419.                        MMIMMS_EDIT_PIC_CTRL_ID),    
  1420.     CREATE_BUTTON_CTRL(LABEL_X2+2*LABEL_HEIGHT+1,LABEL_Y1,LABEL_X2+3*LABEL_HEIGHT,LABEL_Y2,
  1421.                        GUI_BUTTON_ICON_CENTER,
  1422.                        IMAGE_MMS_INSERT_RING_ICON,
  1423.                        IMAGE_MMS_INSERT_RING_ICON,
  1424.                        COMMON_IMAGE_NULL,
  1425.                        MMIMMS_EDIT_RING_CTRL_ID),
  1426.     CREATE_BUTTON_CTRL(LABEL_X2+3*LABEL_HEIGHT+1,LABEL_Y1,LABEL_X2+4*LABEL_HEIGHT,LABEL_Y2,
  1427.                        GUI_BUTTON_ICON_CENTER,
  1428.                        IMAGE_MMS_DEL_SLIDE_ICON,
  1429.                        IMAGE_MMS_DEL_SLIDE_ICON,
  1430.                        IMAGE_MMS_DEL_SLIDE_GRAYED_ICON,
  1431.                        MMIMMS_EDIT_DEL_SLIDE_CTRL_ID),
  1432.                                                                                                             
  1433.     CREATE_POP_MENU_CTRL(0,
  1434.                          MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-4*MMI_POPUP_MENU_HEIGHT,
  1435.                          MMI_POPUP_MENU_WIDTH-1,
  1436.                          MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-1,
  1437.                          MENU_MMS_POP_OPTION,
  1438.                          MMIMMS_EDIT_MENU_CTRL_ID),
  1439.     END_WIN
  1440. };
  1441. #endif
  1442. WINDOW_TABLE(MMIMMS_EDIT_SET_SEND_DATE_TAB) = 
  1443. {
  1444.     CLEAR_LCD,
  1445.     WIN_PRIO(WIN_ONE_LEVEL),
  1446. WIN_TITLE_ID(TXT_MMS_EDIT_SET_SEND_ONTIME_TIME),
  1447. WIN_FUNC((uint32)Edit_HandleMMSSetSendDateWin),    
  1448. WIN_ID(MMIMMS_EDIT_SET_SEND_DATE_WIN_ID),
  1449. 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),
  1450. 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),
  1451. END_WIN
  1452. };
  1453. WINDOW_TABLE(MMIMMS_SETTING_EDIT_SIGN_TAB) =
  1454. {
  1455.     CLEAR_LCD,
  1456.     WIN_PRIO(WIN_ONE_LEVEL),
  1457. WIN_TITLE_ID(TXT_MMS_EDIT),
  1458. WIN_FUNC((uint32)Edit_HandleMMSEditSignWin),
  1459. WIN_ID(MMIMMS_SETTING_EDIT_SIGN_WIN),
  1460. //edit mms content
  1461.     CREATE_TEXTEDITBOX_CTRL(CONTENT_EDIT_X1, MMI_TITLE_HEIGHT, CONTENT_EDIT_X2,
  1462.                             CONTENT_EDIT_Y2, MMIMMS_MAX_TEXT_LEN, MMIMMS_MAX_TEXT_LEN, 
  1463.                             IM_PINYIN_TYPE | IM_STROKE_TYPE | IM_CHARACTER_TYPE | IM_ENGLISH_TYPE | IM_DIGITAL_TYPE, 
  1464.                             IM_PINYIN_MODE, MMIMMS_EDITSIGN_CTRL_ID),
  1465.     CREATE_LABEL_CTRL(LABEL_X1, LABEL_Y1, LABEL_X2-LABEL_HEIGHT, LABEL_Y2,
  1466.                         GUILABEL_LEFT, 0, MMIMMS_EDITSIGN_LABEL_CTRL_ID),
  1467. CREATE_BUTTON_CTRL(LABEL_X2+LABEL_HEIGHT+1,LABEL_Y1,LABEL_X2+2*LABEL_HEIGHT,LABEL_Y2,
  1468.                        GUI_BUTTON_ICON_CENTER,
  1469.                        IMAGE_MMS_INSERT_VIDEO_ICON,//IMAGE_MMS_INSERT_RING_ICON,
  1470.                        IMAGE_MMS_INSERT_VIDEO_ICON,//IMAGE_MMS_INSERT_RING_ICON,
  1471.                        COMMON_IMAGE_NULL,
  1472.                        MMIMMS_EDITSIGN_VIDEO_CTRL_ID), 
  1473.     CREATE_BUTTON_CTRL(LABEL_X2+2*LABEL_HEIGHT+1,LABEL_Y1,LABEL_X2+3*LABEL_HEIGHT,LABEL_Y2,
  1474.                        GUI_BUTTON_ICON_CENTER,
  1475.                        IMAGE_MMS_INSERT_PIC_ICON,
  1476.                        IMAGE_MMS_INSERT_PIC_ICON,
  1477.                        COMMON_IMAGE_NULL,
  1478.                        MMIMMS_EDITSIGN_PIC_CTRL_ID),    
  1479.     CREATE_BUTTON_CTRL(LABEL_X2+3*LABEL_HEIGHT+1,LABEL_Y1,LABEL_X2+4*LABEL_HEIGHT,LABEL_Y2,
  1480.                        GUI_BUTTON_ICON_CENTER,
  1481.                        IMAGE_MMS_INSERT_RING_ICON,
  1482.                        IMAGE_MMS_INSERT_RING_ICON,
  1483.                        COMMON_IMAGE_NULL,
  1484.                        MMIMMS_EDITSIGN_RING_CTRL_ID),    
  1485. END_WIN
  1486. };
  1487. //5.1.5 Edit: preview 
  1488. WINDOW_TABLE(MMIMMS_EDIT_PREVIEW_TAB) = 
  1489. {
  1490.     CLEAR_LCD,
  1491.     WIN_PRIO(WIN_ONE_LEVEL),
  1492. WIN_TITLE_ID(TXT_MMS_PREVIEW),
  1493. WIN_FUNC((uint32)Edit_HandlePreviewMMSMsg),    
  1494. WIN_ID(MMIMMS_EDIT_PREVIEW_WIN_ID),
  1495. CREATE_ANIMATION(0, 0, 1, 1, 
  1496. ANIM_EXTERNAL, 0, MMIMMS_EDIT_IMAGE_PREVIEW_CTRL_ID
  1497. ),
  1498. CREATE_BUTTON_CTRL(10, MMI_TITLE_HEIGHT+2, 28, MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT-1, GUI_BUTTON_ICON_CENTER,
  1499.                        IMAGE_MMS_UP_NORMAL, IMAGE_MMS_UP_DOWN, COMMON_IMAGE_NULL,
  1500.                        MMIMMS_EDIT_PREVIEW_LEFT_BUTTON_CTRL_ID),
  1501.     CREATE_BUTTON_CTRL(38, MMI_TITLE_HEIGHT+2, 56, MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT-1, GUI_BUTTON_ICON_CENTER,
  1502.                        IMAGE_MMS_DOWN_NORMAL, IMAGE_MMS_DOWN_DOWN, COMMON_IMAGE_NULL,
  1503.                        MMIMMS_EDIT_PREVIEW_RIGHT_BUTTON_CTRL_ID),
  1504. CREATE_TEXTBOX_CTRL(PREVIEW_TEXT_X1, PREVIEW_TEXT_Y1, PREVIEW_TEXT_X2, PREVIEW_TEXT_Y2, 
  1505. MAINLCD_ID, MMIMMS_EDIT_TEXT_PREVIEW_CTRL_ID
  1506. ),
  1507. CREATE_LABEL_CTRL(PREVIEW_LABEL_LEFT, PREVIEW_LABEL_TOP, MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
  1508.                       MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT-1, GUILABEL_RIGHT, 0, MMIMMS_EDIT_PREVIEW_LABEL_CTRL_ID),
  1509. END_WIN
  1510. };
  1511. //5.1.13 Edit: set slide time
  1512. WINDOW_TABLE(MMIMMS_EDIT_SLIDE_TIME_TAB) = 
  1513. {
  1514.     CLEAR_LCD,
  1515.     WIN_PRIO(WIN_ONE_LEVEL),
  1516. WIN_TITLE_ID(TXT_MMS_SET_SLIDE_TIME),
  1517. WIN_FUNC((uint32) Edit_HandleSetSlideTimeWinMsg),    
  1518. WIN_ID(MMIMMS_EDIT_SLIDE_TIME_WIN_ID),
  1519. CREATE_DIGITALEDITBOX_CTRL(0, MMI_TITLE_HEIGHT, MMI_MAINSCREEN_RIGHT_MAX_PIXEL, MMI_CLIENT_RECT_BOTTOM,
  1520.         3, MMIMMS_EDIT_SLIDE_TIME_CTRL_ID),
  1521. END_WIN
  1522. };
  1523. WINDOW_TABLE(MMIMMS_RECVING_MMS_WIN) = 
  1524. {
  1525.       CLEAR_LCD,
  1526.        WIN_PRIO(WIN_ONE_LEVEL),
  1527. WIN_TITLE_ID(TXT_MMS_DOWNLOADING),
  1528. WIN_FUNC((uint32) Download_HandleDownloadingWin),    
  1529. WIN_ID(MMIMMS_DOWNLOAD_DOWNLOADING_WIN_ID),
  1530. END_WIN
  1531. };
  1532. WINDOW_TABLE(MMIMMS_SENDING_MMS_WIN) = 
  1533. {
  1534.       CLEAR_LCD,
  1535.        WIN_PRIO(WIN_ONE_LEVEL),
  1536. WIN_TITLE_ID(TXT_MMS_SENDING),
  1537. WIN_FUNC((uint32) SendMMS_HandleWaitingWin),    
  1538. WIN_ID(MMIMMS_SEND_MMS_WAITING_WIN_ID),
  1539. END_WIN
  1540. };
  1541. WINDOW_TABLE(MMIMMS_MMSSPACE_LIST_WIN) = 
  1542. {
  1543.     CLEAR_LCD,
  1544.     WIN_PRIO(WIN_ONE_LEVEL),
  1545. WIN_TITLE_ID(TXT_MMS_MESSAGESPACE),
  1546. WIN_FUNC((uint32) MMSSPACE_HandleListWinMsg),    
  1547. WIN_ID(MMIMMS_MMSSPACE_LIST_WIN_ID),
  1548.        CREATE_TEXTBOX_CTRL(0, TITLE_HEIGHT, MEMSTATE_TEXTBOX_X2, MEMSTATE_TEXTBOX_Y2, 
  1549. MAINLCD_ID, MMIMMS_MMSSPACE_TEXTBOX_CTRL_ID
  1550. ),
  1551. END_WIN
  1552. };
  1553. //5.4.1A Inbox: message list
  1554. WINDOW_TABLE(MMIMMS_INBOX_LIST_WIN) = 
  1555. {
  1556.     CLEAR_LCD,
  1557.     WIN_PRIO(WIN_ONE_LEVEL),
  1558. WIN_TITLE_ID(TXT_MMS_INBOX),
  1559. WIN_FUNC((uint32) Inbox_HandleListWinMsg),    
  1560. WIN_ID(MMIMMS_INBOX_LIST_WIN_ID),
  1561. CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
  1562.         LISTBOX_TEXTLIST_E, LISTBOX_TEXT1_E, MMIMMS_INBOX_LIST_CTRL_ID),
  1563. END_WIN
  1564. };
  1565. //5.4.1C Inbox : Option menu of MMS
  1566. WINDOW_TABLE(MMIMMS_INBOX_MMSMENU_WIN) = 
  1567. {
  1568.     CLEAR_LCD,
  1569.     WIN_PRIO(WIN_ONE_LEVEL),
  1570. WIN_TITLE_ID(TXT_SMS_OPTION),
  1571. WIN_FUNC((uint32) Inbox_HandleMMSMenuWinMsg),    
  1572. WIN_ID(MMIMMS_INBOX_MMSOPT_MENU_WIN_ID),
  1573. CREATE_MENU_CTRL(MENU_X1, MENU_Y1, MENU_X2, MENU_Y2, MENU_MMS_INBOX_MMSOPTION, MMIMMS_INBOX_MMSOPT_MENU_CTRL_ID),
  1574. END_WIN
  1575. };
  1576. //5.4.1C Inbox : Option menu of MMSNotification
  1577. WINDOW_TABLE(MMIMMS_INBOX_MMSNOTIMENU_WIN) = 
  1578. {
  1579.     CLEAR_LCD,
  1580.     WIN_PRIO(WIN_ONE_LEVEL),
  1581. WIN_TITLE_ID(TXT_SMS_OPTION),
  1582. WIN_FUNC((uint32) Inbox_HandleMMSMenuWinMsg),    
  1583. WIN_ID(MMIMMS_INBOX_MMSNOTIOPT_MENU_WIN_ID),
  1584. CREATE_MENU_CTRL(MENU_X1, MENU_Y1, MENU_X2, MENU_Y2, MENU_MMS_INBOX_MMSNOTIOPTION, MMIMMS_INBOX_MMSOPT_MENU_CTRL_ID),
  1585. END_WIN
  1586. };
  1587. //5.4.7 Inbox : Detail changed liangliu 2005-10-28
  1588. WINDOW_TABLE(MMIMMS_INBOX_DETAIL_WIN) = 
  1589. {
  1590.     CLEAR_LCD,
  1591. WIN_PRIO(WIN_ONE_LEVEL),
  1592. WIN_TITLE_ID(TXT_MMS_DETAIL),
  1593. WIN_FUNC((uint32) Inbox_HandleMMSDetailWinMsg),    
  1594. WIN_ID(MMIMMS_INBOX_DETAIL_WIN_ID),
  1595. CREATE_TEXTBOX_CTRL(MMS_DETAIL_LEFT, MMS_DETAIL_TOP, MMS_DETAIL_WIDTH, MMS_DETAIL_HEIGHT, 
  1596. MAINLCD_ID, MMIMMS_DETAIL_TEXTBOX_CTRL_ID
  1597. ),
  1598. END_WIN
  1599. };
  1600. //5.5.1A Sentbox: message list
  1601. WINDOW_TABLE(MMIMMS_SENTBOX_LIST_WIN) = 
  1602. {
  1603.     CLEAR_LCD,
  1604.     WIN_PRIO(WIN_ONE_LEVEL),
  1605. WIN_TITLE_ID(TXT_MMS_SENTBOX),
  1606. WIN_FUNC((uint32) Sentbox_HandleListWinMsg),    
  1607. WIN_ID(MMIMMS_SENTBOX_LIST_WIN_ID),
  1608. CREATE_POP_MENU_CTRL(0,
  1609.                          MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-5*MMI_POPUP_MENU_HEIGHT,
  1610.                          MMI_POPUP_MENU_WIDTH-1,
  1611.                          MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-1,
  1612.                          MENU_MMS_SENTBOX_POP_OPTION,
  1613.                          MMIMMS_SENTBOX_POPMENU_CTRL_ID),
  1614. CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
  1615.         LISTBOX_TEXTLIST_E, LISTBOX_TEXT1_E, MMIMMS_SENTBOX_LIST_CTRL_ID),
  1616. END_WIN
  1617. };
  1618. //5.7.1A Outbox: message list
  1619. WINDOW_TABLE(MMIMMS_OUTBOX_LIST_WIN) = 
  1620. {
  1621.     CLEAR_LCD,
  1622.     WIN_PRIO(WIN_ONE_LEVEL),
  1623. WIN_TITLE_ID(TXT_MMS_OUTBOX),
  1624. WIN_FUNC((uint32) Outbox_HandleListWinMsg),    
  1625. WIN_ID(MMIMMS_OUTBOX_LIST_WIN_ID),
  1626. CREATE_POP_MENU_CTRL(0,
  1627.                          MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-5*MMI_POPUP_MENU_HEIGHT,
  1628.                          MMI_POPUP_MENU_WIDTH-1,
  1629.                          MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-1,
  1630.                          MENU_MMS_OUTBOX_POP_OPTION,
  1631.                          MMIMMS_OUTBOX_POPMENU_CTRL_ID),
  1632. CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
  1633.         LISTBOX_TEXTLIST_E, LISTBOX_TEXT1_E, MMIMMS_OUTBOX_LIST_CTRL_ID),
  1634. END_WIN
  1635. };
  1636. //5.7.1A Draftbox: message list
  1637. WINDOW_TABLE(MMIMMS_DRAFTBOX_LIST_WIN) = 
  1638. {
  1639.     CLEAR_LCD,
  1640.     WIN_PRIO(WIN_ONE_LEVEL),
  1641. WIN_TITLE_ID(TXT_MMS_DRAFTBOX),
  1642. WIN_FUNC((uint32) DraftBox_HandleListWinMsg),    
  1643. WIN_ID(MMIMMS_DRAFTBOX_LIST_WIN_ID),
  1644. CREATE_POP_MENU_CTRL(0,
  1645.                          MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-3*MMI_POPUP_MENU_HEIGHT,
  1646.                          MMI_POPUP_MENU_WIDTH-1,
  1647.                          MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-1,
  1648.                          MENU_MMS_DRAFTBOX_POP_OPTION,
  1649.                          MMIMMS_DRAFTBOX_POPMENU_CTRL_ID),
  1650. CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
  1651.         LISTBOX_TEXTLIST_E, LISTBOX_TEXT1_E, MMIMMS_DRAFTBOX_LIST_CTRL_ID),
  1652. END_WIN
  1653. };
  1654. //5.8.0 setting win added by liangliu 2005-11-14
  1655. WINDOW_TABLE(MMIMMS_SETTING_MENU_WIN) = 
  1656. {
  1657.     CLEAR_LCD,
  1658.     WIN_PRIO(WIN_ONE_LEVEL),
  1659. WIN_TITLE_ID(TXT_MMS_MMSSETTING),
  1660. WIN_FUNC((uint32) Setting_HandleMenuWinMsg),    
  1661. WIN_ID(MMIMMS_SETTING_MENU_WIN_ID),
  1662. CREATE_MENU_CTRL(MENU_X1, MENU_Y1, MENU_X2, MENU_Y2, MENU_MMS_SETTING, MMIMMS_SETTING_MENU_CTRL_ID),
  1663. END_WIN
  1664. };
  1665. // menu window for NETWORK 
  1666. WINDOW_TABLE( MMIMMS_SETTING_NETWORK_WIN ) = 
  1667. {
  1668.     CLEAR_LCD,
  1669.     WIN_PRIO( WIN_ONE_LEVEL ),
  1670.     WIN_FUNC( (uint32)Setting_HandleNetworkWinMsg ),    
  1671.     WIN_ID( MMIMMS_SETTING_NETWORK_WIN_ID ),
  1672.     WIN_TITLE_ID( TXT_MMS_NETWORK_SETTING ),
  1673.     CREATE_MENU_CTRL(MENU_X1, MENU_Y1, MENU_X2, MENU_Y2,MENU_MMS_SETTING_NETWORK, MMIMMS_SETTING_NETWORK_CTRL_ID),
  1674.     END_WIN
  1675. };
  1676. // menu window for SIGN 
  1677. WINDOW_TABLE( MMIMMS_SETTING_SIGN_WIN ) = 
  1678. {
  1679.     CLEAR_LCD,
  1680.     WIN_PRIO( WIN_ONE_LEVEL ),
  1681.     WIN_FUNC( (uint32)Setting_HandleSignWinMsg ),    
  1682.     WIN_ID( MMIMMS_SETTING_SIGN_WIN_ID ),
  1683.     WIN_TITLE_ID( TXT_CMS_MMS_SIGN ),
  1684.     CREATE_MENU_CTRL(MENU_X1, MENU_Y1, MENU_X2, MENU_Y2,MENU_MMS_SETTING_SIGN, MMIMMS_SETTING_SIGN_CTRL_ID),
  1685.     END_WIN
  1686. };
  1687. //5.8.1 Setting : autodownload
  1688. WINDOW_TABLE(MMIMMS_SETTING_AUTODOWNLOAD_LIST_WIN) = 
  1689. {
  1690.     CLEAR_LCD,
  1691.     WIN_PRIO(WIN_ONE_LEVEL),
  1692. WIN_TITLE_ID(TXT_MMS_AUTO_DOWNLOAD),
  1693. WIN_FUNC((uint32) Setting_HandleAutoDownloadListWinMsg),    
  1694. WIN_ID(MMIMMS_SETTING_AUTO_DOWNLOAD_LIST_WIN_ID),
  1695. CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
  1696.         LISTBOX_RADIOLIST_E, LISTBOX_RADIO1_E, MMIMMS_SETTING_AUTO_DOWNLOAD_LIST_CTRL_ID),
  1697. END_WIN
  1698. };
  1699. //5.8.4 Setting : arrive report
  1700. WINDOW_TABLE(MMIMMS_SETTING_ARRIVE_LIST_WIN) = 
  1701. {
  1702.     CLEAR_LCD,
  1703.     WIN_PRIO(WIN_ONE_LEVEL),
  1704. WIN_TITLE_ID(TXT_MMS_ARRIVE_REPORT),
  1705. WIN_FUNC((uint32) Setting_HandleArriveReportWinMsg),    
  1706. WIN_ID(MMIMMS_SETTING_ARRIVE_REPORT_LIST_WIN),
  1707. CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
  1708.         LISTBOX_RADIOLIST_E, LISTBOX_RADIO1_E, MMIMMS_SETTING_ARRIVE_REPORT_LIST_CTRL_ID),
  1709. END_WIN
  1710. };
  1711. //5.8.5 Setting : read report
  1712. WINDOW_TABLE(MMIMMS_SETTING_READREPORT_LIST_WIN) = 
  1713. {
  1714.     CLEAR_LCD,
  1715.     WIN_PRIO(WIN_ONE_LEVEL),
  1716. WIN_TITLE_ID(TXT_MMS_READ_REPORT),
  1717. WIN_FUNC((uint32) Setting_HandleReadReportWinMsg),    
  1718. WIN_ID(MMIMMS_SETTING_READ_REPORT_LIST_WIN),
  1719. CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
  1720.         LISTBOX_RADIOLIST_E, LISTBOX_RADIO1_E, MMIMMS_SETTING_READ_REPORT_LIST_CTRL_ID),
  1721. END_WIN
  1722. };
  1723. //FNH add 0516
  1724. WINDOW_TABLE(MMIMMS_SETTING_OPENSIGN_LIST_WIN) = 
  1725. {
  1726.     CLEAR_LCD,
  1727.     WIN_PRIO(WIN_ONE_LEVEL),
  1728. WIN_TITLE_ID(TXT_CMS_MMS_SIGN), //开启自动签名
  1729. WIN_FUNC((uint32) Setting_HandleOpenSignWinMsg),    
  1730. WIN_ID(MMIMMS_SETTING_OPEN_SIGN_LIST_WIN),
  1731. CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
  1732.         LISTBOX_RADIOLIST_E, LISTBOX_RADIO1_E, MMIMMS_SETTING_OPEN_SIGN_LIST_CTRL_ID),
  1733. END_WIN
  1734. };
  1735. //5.8.6 Setting : anonumity
  1736. WINDOW_TABLE(MMIMMS_SETTING_ANONYMITYWHETHER_LIST_WIN) = 
  1737. {
  1738.     CLEAR_LCD,
  1739.     WIN_PRIO(WIN_ONE_LEVEL),
  1740. WIN_TITLE_ID(TXT_MMS_ANONYMITY),
  1741. WIN_FUNC((uint32) Setting_HandleAnonymityWinMsg),    
  1742. WIN_ID(MMIMMS_SETTING_ANONYMITY_LIST_WIN),
  1743. CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
  1744.         LISTBOX_RADIOLIST_E, LISTBOX_RADIO1_E, MMIMMS_SETTING_ANONYMITY_LIST_CTRL_ID),
  1745. END_WIN
  1746. };
  1747. //5.8.7 Setting : sound
  1748. WINDOW_TABLE(MMIMMS_SETTING_SOUNDALLOWABLE_LIST_WIN) = 
  1749. {
  1750.     CLEAR_LCD,
  1751.     WIN_PRIO(WIN_ONE_LEVEL),
  1752. WIN_TITLE_ID(TXT_MMS_PLAY_SOUND),
  1753. WIN_FUNC((uint32) Setting_HandleSoundWinMsg),    
  1754. WIN_ID(MMIMMS_SETTING_SOUND_LIST_WIN),
  1755. CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
  1756.         LISTBOX_RADIOLIST_E, LISTBOX_RADIO1_E, MMIMMS_SETTING_SOUND_LIST_CTRL_ID),
  1757. END_WIN
  1758. };
  1759. //5.8.8 Setting : advertising
  1760. WINDOW_TABLE(MMIMMS_SETTING_ADVERTISINGALLOWABLE_LIST_WIN) = 
  1761. {
  1762.     CLEAR_LCD,
  1763.     WIN_PRIO(WIN_ONE_LEVEL),
  1764. WIN_TITLE_ID(TXT_MMS_ADVERTISING),
  1765. WIN_FUNC((uint32) Setting_HandleAdvertisingWinMsg),    
  1766. WIN_ID(MMIMMS_SETTING_ADVERTISING_LIST_WIN),
  1767. CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
  1768.         LISTBOX_RADIOLIST_E, LISTBOX_RADIO1_E, MMIMMS_SETTING_ADVERTISING_LIST_CTRL_ID),
  1769. END_WIN
  1770. };
  1771. //5.8.2 Setting : Priority
  1772. WINDOW_TABLE(MMIMMS_SETTING_PRIORITY_LIST_WIN) = 
  1773. {
  1774.     CLEAR_LCD,
  1775.     WIN_PRIO(WIN_ONE_LEVEL),
  1776. WIN_TITLE_ID(TXT_MMS_PRIORITY),
  1777. WIN_FUNC((uint32) Setting_HandlePriorityListWinMsg),    
  1778. WIN_ID(MMIMMS_SETTING_PRIORITY_LIST_WIN_ID),
  1779. CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
  1780.         LISTBOX_RADIOLIST_E, LISTBOX_RADIO1_E, MMIMMS_SETTING_PRIORITY_LIST_CTRL_ID),
  1781. END_WIN
  1782. };
  1783. //5.8.3 Setting : mms duaration
  1784. WINDOW_TABLE(MMIMMS_SETTING_VALIDE_PERIOD_LIST_WIN) = 
  1785. {
  1786.     CLEAR_LCD,
  1787.     WIN_PRIO(WIN_ONE_LEVEL),
  1788. WIN_TITLE_ID(TXT_SMS_SETTING_VP_TITLE),
  1789. WIN_FUNC((uint32) Setting_HandleValidPeriodListWinMsg),    
  1790. WIN_ID(MMIMMS_SETTING_VALIDATE_PERIOD_LIST_WIN_ID),
  1791. CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
  1792.         LISTBOX_RADIOLIST_E, LISTBOX_RADIO1_E, MMIMMS_SETTING_VALIDATE_PERIOD_LIST_CTRL_ID),
  1793. END_WIN
  1794. };
  1795. //5.8.3 Setting : mmsc
  1796. WINDOW_TABLE(MMIMMS_SETTING_MMSC_WIN) = 
  1797. {
  1798.     CLEAR_LCD,
  1799.     WIN_PRIO(WIN_ONE_LEVEL),
  1800. WIN_TITLE_ID(TXT_MMS_MMSC),
  1801. WIN_FUNC((uint32) Setting_HandleMMSCWinMsg),    
  1802. WIN_ID(MMIMMS_SETTING_MMSC_WIN_ID),
  1803. CREATE_TEXTEDITBOX_CTRL(EDIT_FULL_X1, EDIT_FULL_Y1, EDIT_FULL_X2, EDIT_FULL_Y2, 
  1804.                             MMIMMS_MMSC_MAX_LEN ,MMIMMS_MMSC_MAX_LEN,
  1805.                             IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
  1806.                             IM_ENGLISH_MODE, MMIMMS_SETTING_MMSC_CTRL_ID),
  1807. END_WIN
  1808. };
  1809. //5.8.3 Setting : GATEWAY
  1810. WINDOW_TABLE(MMIMMS_SETTING_GATEWAY_WIN) = 
  1811. {
  1812.     CLEAR_LCD,
  1813.     WIN_PRIO(WIN_ONE_LEVEL),
  1814. WIN_TITLE_ID(TXT_MMS_SETTING_GATEWAY),
  1815. WIN_FUNC((uint32) Setting_HandleGateWayWinMsg),    
  1816. WIN_ID(MMIMMS_SETTING_GATEWAY_WIN_ID),
  1817. CREATE_TEXTEDITBOX_CTRL(EDIT_FULL_X1, EDIT_FULL_Y1, EDIT_FULL_X2, EDIT_FULL_Y2, 
  1818.                             MMIMMS_GATEWAY_MAX_LEN ,MMIMMS_GATEWAY_MAX_LEN,
  1819.                             IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
  1820.                             IM_DIGITAL_MODE, MMIMMS_SETTING_GATEWAY_CTRL_ID),
  1821. END_WIN
  1822. };
  1823. //5.8.3 Setting : PORT
  1824. WINDOW_TABLE(MMIMMS_SETTING_PORT_WIN) = 
  1825. {
  1826.     CLEAR_LCD,
  1827.     WIN_PRIO(WIN_ONE_LEVEL),
  1828. WIN_TITLE_ID(TXT_MMS_SETTING_PORT),
  1829. WIN_FUNC((uint32) Setting_HandlePortWinMsg),    
  1830. WIN_ID(MMIMMS_SETTING_PORT_WIN_ID),
  1831. // CREATE_PHONENUMEDITBOX_CTRL(EDIT_FULL_X1, EDIT_FULL_Y1, EDIT_FULL_X2, EDIT_FULL_Y2,
  1832. // MMIMMS_PORT_MAX_LEN, MMIMMS_SETTING_PORT_CTRL_ID),
  1833. CREATE_TEXTEDITBOX_CTRL(EDIT_FULL_X1, EDIT_FULL_Y1, EDIT_FULL_X2, EDIT_FULL_Y2,
  1834. MMIMMS_PORT_MAX_LEN, MMIMMS_PORT_MAX_LEN, 
  1835. IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE, 
  1836. IM_DIGITAL_MODE, 
  1837. MMIMMS_SETTING_PORT_CTRL_ID),
  1838. END_WIN
  1839. };
  1840. //5.8.3 Setting : USERNAME
  1841. WINDOW_TABLE(MMIMMS_SETTING_USERNAME_WIN) = 
  1842. {
  1843.     CLEAR_LCD,
  1844.     WIN_PRIO(WIN_ONE_LEVEL),
  1845. WIN_TITLE_ID(TXT_MMS_SETTING_USERNAME), //临时
  1846. WIN_FUNC((uint32) Setting_HandleUserNameWinMsg),    
  1847. WIN_ID(MMIMMS_SETTING_USERNAME_WIN_ID),
  1848. CREATE_TEXTEDITBOX_CTRL(EDIT_FULL_X1, EDIT_FULL_Y1, EDIT_FULL_X2, EDIT_FULL_Y2, 
  1849.                             MMIMMS_USERNAME_MAX_LEN ,MMIMMS_USERNAME_MAX_LEN,
  1850.                             IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
  1851.                             IM_ENGLISH_MODE, MMIMMS_SETTING_USERNAME_CTRL_ID),
  1852. END_WIN
  1853. };
  1854. //5.8.3 Setting : PASSWORD
  1855. WINDOW_TABLE(MMIMMS_SETTING_PASSWORD_WIN) = 
  1856. {
  1857.     CLEAR_LCD,
  1858.     WIN_PRIO(WIN_ONE_LEVEL),
  1859. WIN_TITLE_ID(TXT_MMS_SETTING_PASSWORD), //临时
  1860. WIN_FUNC((uint32) Setting_HandlePasswordWinMsg),    
  1861. WIN_ID(MMIMMS_SETTING_PASSWORD_WIN_ID),
  1862. CREATE_TEXTEDITBOX_CTRL(EDIT_FULL_X1, EDIT_FULL_Y1, EDIT_FULL_X2, EDIT_FULL_Y2, 
  1863. MMIMMS_PASSWORD_MAX_LEN, MMIMMS_PASSWORD_MAX_LEN,
  1864. IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
  1865. IM_ENGLISH_MODE,
  1866. MMIMMS_SETTING_PASSWORD_CTRL_ID),
  1867. END_WIN
  1868. };
  1869. //5.8.3 Setting : APN
  1870. WINDOW_TABLE(MMIMMS_SETTING_APN_WIN) = 
  1871. {
  1872.     CLEAR_LCD,
  1873.     WIN_PRIO(WIN_ONE_LEVEL),
  1874. WIN_TITLE_ID(TXT_MMS_SETTING_APN), //临时
  1875. WIN_FUNC((uint32) Setting_HandleAPNWinMsg),    
  1876. WIN_ID(MMIMMS_SETTING_APN_WIN_ID),
  1877. CREATE_TEXTEDITBOX_CTRL(EDIT_FULL_X1, EDIT_FULL_Y1, EDIT_FULL_X2, EDIT_FULL_Y2,
  1878. MMIMMS_APN_MAX_LEN, MMIMMS_APN_MAX_LEN,
  1879. IM_ENGLISH_TYPE | IM_CHARACTER_TYPE | IM_DIGITAL_TYPE,
  1880. IM_ENGLISH_MODE,
  1881. MMIMMS_SETTING_APN_CTRL_ID),
  1882. END_WIN
  1883. };
  1884. //待保存的图象列表
  1885. WINDOW_TABLE(MMIMMS_SAVE_IMAGE_LIST_TAB) = 
  1886. {
  1887.     CLEAR_LCD,
  1888.     WIN_PRIO(WIN_ONE_LEVEL),
  1889. WIN_TITLE_ID(TXT_MMS_IMAGE_LIST),
  1890. WIN_FUNC((uint32) cmsmms_HandlesaveimageWinMsg),    
  1891. WIN_ID(MMIMMS_SAVE_IMAGE_LIST_WIN_ID),
  1892. CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
  1893.         LISTBOX_TEXTLIST_E, LISTBOX_TEXT1_E, MMIMMS_SAVE_IMAGE_LIST_CTRL_ID),
  1894. END_WIN
  1895. };
  1896. //待保存的声音列表
  1897. WINDOW_TABLE(MMIMMS_SAVE_MUSIC_LIST_TAB) = 
  1898. {
  1899.     CLEAR_LCD,
  1900.     WIN_PRIO(WIN_ONE_LEVEL),
  1901. WIN_TITLE_ID(TXT_MMS_AUDIO_LIST),
  1902. WIN_FUNC((uint32) cmsmms_HandlesavemusicWinMsg),    
  1903. WIN_ID(MMIMMS_SAVE_MUSIC_LIST_WIN_ID),
  1904. CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
  1905.         LISTBOX_TEXTLIST_E, LISTBOX_TEXT1_E, MMIMMS_SAVE_MUSIC_LIST_CTRL_ID),
  1906. END_WIN
  1907. };
  1908. //待保存的视频列表
  1909. WINDOW_TABLE(MMIMMS_SAVE_VIDEO_LIST_TAB) = 
  1910. {
  1911.     CLEAR_LCD,
  1912.     WIN_PRIO(WIN_ONE_LEVEL),
  1913. WIN_TITLE_ID(TXT_MMS_VIDEO_LIST),
  1914. WIN_FUNC((uint32) cmsmms_HandlesavevideoWinMsg),    
  1915. WIN_ID(MMIMMS_SAVE_VIDEO_LIST_WIN_ID),
  1916. CREATE_LISTBOX_CTRL(LIST_X1, LIST_Y1, LIST_X2, LIST_Y2,
  1917.         LISTBOX_TEXTLIST_E, LISTBOX_TEXT1_E, MMIMMS_SAVE_VIDEO_LIST_CTRL_ID),
  1918. END_WIN
  1919. };
  1920. WINDOW_TABLE(MMIMMS_DOWNLOAD_MP3_NAME_WIN_TAB) = 
  1921. {
  1922.     CLEAR_LCD,
  1923.     WIN_PRIO(WIN_ONE_LEVEL),
  1924.     WIN_FUNC((uint32)HandleDownloadmp3InputName ),    
  1925.     WIN_ID(MMIMMS_DOWNLOAD_MP3_NAME_WIN_ID),
  1926.     WIN_TITLE_ID(TXT_DC_INPUTNAME),
  1927.     CREATE_TEXTEDITBOX_CTRL(MMIMMS_RENAME_RECT_LEFT,MMIMMS_RENAME_RECT_TOP,MMIMMS_RENAME_RECT_RIGHT,MMIMMS_RENAME_RECT_BOTTOM, 
  1928.                             MMIMMS_MAX_FILE_NAME_LEN, MMIMMS_MAX_FILE_NAME_LEN / 2, 
  1929.                             IM_PINYIN_TYPE | IM_STROKE_TYPE| IM_CHARACTER_TYPE | IM_ENGLISH_TYPE | IM_DIGITAL_TYPE, IM_PINYIN_MODE, 
  1930.                             MMIMMS_DOWNLOAD_MP3_NAME_EDITBOX_CTRL_ID),
  1931. END_WIN
  1932. };
  1933. //video input name win
  1934. WINDOW_TABLE(MMIMMS_DOWNLOAD_VIDEO_NAME_WIN_TAB) = 
  1935. {
  1936.     CLEAR_LCD,
  1937.     WIN_PRIO(WIN_ONE_LEVEL),
  1938.     WIN_FUNC((uint32)HandleDownloadVideoInputName ),    
  1939.     WIN_ID(MMIMMS_DOWNLOAD_VIDEO_NAME_WIN_ID),
  1940.     WIN_TITLE_ID(TXT_DC_INPUTNAME),
  1941. CREATE_TEXTEDITBOX_CTRL(MMIMMS_RENAME_RECT_LEFT,MMIMMS_RENAME_RECT_TOP,MMIMMS_RENAME_RECT_RIGHT,MMIMMS_RENAME_RECT_BOTTOM, 
  1942.                             MMIMMS_MAX_FILE_NAME_LEN, MMIMMS_MAX_FILE_NAME_LEN / 2, 
  1943.                             IM_PINYIN_TYPE | IM_STROKE_TYPE| IM_CHARACTER_TYPE | IM_ENGLISH_TYPE | IM_DIGITAL_TYPE, IM_PINYIN_MODE, 
  1944.                             MMIMMS_DOWNLOAD_VIDEO_NAME_EDITBOX_CTRL_ID),
  1945.     END_WIN
  1946. };
  1947. //彩信主窗口
  1948. WINDOW_TABLE( MMIMMS_MAIN_WIN_TAB ) = 
  1949. {
  1950.     CLEAR_LCD,
  1951.     WIN_PRIO( WIN_ONE_LEVEL ),
  1952.     WIN_FUNC( (uint32)Main_HandleMmsMainWin ),    
  1953.     WIN_ID( MMIMSG_MAIN_WIN_ID ),
  1954.     WIN_TITLE_ID(TXT_CHATROOM_TYPE_MMS),
  1955.     CREATE_LISTBOX_CTRL(0,MMI_CLIENT_RECT_TOP,MMI_MAINSCREEN_RIGHT_MAX_PIXEL,
  1956.                         MMI_CLIENT_RECT_BOTTOM, LISTBOX_TEXTLIST_E,
  1957.                         LISTBOX_TEXT1_E,MMIMMS_MAIN_LIST_CTRL_ID),
  1958.     CREATE_POP_MENU_CTRL(0,
  1959.                          MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-3*MMI_POPUP_MENU_HEIGHT,
  1960.                          MMI_POPUP_MENU_WIDTH,
  1961.                          MMI_MAINSCREEN_HEIGHT-MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-1,
  1962.                          MENU_MMIMMS_MAIN_VIEW,
  1963.                          MMIMMS_MAIN_POPMENU_CTRL_ID),
  1964.     //WIN_STYLE(WS_HAS_SHORTCUTBAR),
  1965.     END_WIN
  1966. };
  1967. // MMS edit, select insert photo or Dpic window
  1968. WINDOW_TABLE(MMIMMS_EDIT_SELECT_IMAGE_WIN_TAB) =
  1969. {
  1970.     CLEAR_LCD,
  1971.     WIN_PRIO(WIN_ONE_LEVEL),
  1972.     WIN_FUNC((uint32)MMS_HandleEditSelectImageWinMsg),
  1973.     WIN_ID( MMIMMS_EDIT_SELECT_IMAGE_WIN_ID ),
  1974.     WIN_TITLE_ID(TXT_MMS_INSERT_IMAGE),
  1975.     CREATE_MENU_CTRL(MENU_X1, MENU_Y1, MENU_X2, MENU_Y2, MENU_MMS_INSERT_IMAGE_OPT, MMIMMS_EDIT_SELECT_IMAGE_CTRL_ID),
  1976.     END_WIN
  1977. };
  1978. // MMS edit, select insert MP3 or ring window
  1979. WINDOW_TABLE(MMIMMS_EDIT_SELECT_MUSIC_WIN_TAB) =
  1980. {
  1981.     CLEAR_LCD,
  1982.     WIN_PRIO(WIN_ONE_LEVEL),
  1983.     WIN_FUNC((uint32)MMS_HandleEditSelectMusicWinMsg),
  1984.     WIN_ID( MMIMMS_EDIT_SELECT_MUSIC_WIN_ID ),
  1985.     WIN_TITLE_ID(TXT_MMS_INSERT_MUSIC),
  1986.     CREATE_MENU_CTRL(MENU_X1, MENU_Y1, MENU_X2, MENU_Y2, MENU_MMS_INSERT_MUSIC_OPT, MMIMMS_EDIT_SELECT_MUSIC_CTRL_ID),
  1987.     END_WIN
  1988. };
  1989. /*---------------------------------------------------------------------------*/
  1990. /*                         FUNCTION DEFINITION                               */
  1991. /*---------------------------------------------------------------------------*/
  1992. /*****************************************************************************/
  1993. //  Description : 打开彩信主窗口
  1994. //  Global resource dependence : 
  1995. //  Author:Bill.Ji
  1996. //  Note:
  1997. /*****************************************************************************/
  1998. PUBLIC void MMIMMS_OpenMainWindow(void)
  1999. {
  2000.     
  2001.   if ( MMK_IsOpenWin( MMIMSG_MAIN_WIN_ID )) 
  2002.   {
  2003.      MMK_ShowWindow(MMK_GetWinPtrBaseWinId(MMIMSG_MAIN_WIN_ID));
  2004. //   MMK_ShowWindow(MMK_GetWinPtrBaseWinId(MMIMMS_MAIN_MENU_WIN_ID));
  2005.   
  2006.   } 
  2007.   else 
  2008.   {
  2009.      MMK_CreateWin((uint32 *)MMIMMS_MAIN_WIN_TAB, PNULL);
  2010. //   MMK_CreateWin((uint32*)MMIMMS_MENUWIN_TAB, PNULL);
  2011.   }
  2012. }
  2013. /*****************************************************************************/
  2014. //  Description : 彩信主窗口消息处理函数
  2015. //  Global resource dependence : 
  2016. //  Author:Bill.Ji
  2017. //  Note:
  2018. /*****************************************************************************/
  2019. LOCAL MMI_RESULT_E Main_HandleMmsMainWin( MMI_WIN_ID_T   win_id, 
  2020.                                           MMI_MESSAGE_ID_E  msg_id, 
  2021.                                           DPARAM            param )
  2022. {
  2023.   MMI_RESULT_E           recode = MMI_RESULT_TRUE;
  2024.   MMI_CTRL_ID_T          ctrl_id = 0;
  2025.   uint16                 index;
  2026.   MMI_MENU_GROUP_ID_T    group_id = 0;
  2027.   MMI_MENU_ID_T          menu_id  = 0;
  2028.   SCI_TRACE_LOW("Main_HandleMmsMainWin open %d",msg_id);
  2029.   switch( msg_id )
  2030.   {
  2031.     case MSG_OPEN_WINDOW:
  2032.   SCI_TRACE_LOW("Main_HandleMmsMainWin MSG_OPEN_WINDOW");
  2033.       s_mailbox_index = 0;
  2034.       MMK_SetAtvCtrl( win_id,  MMIMMS_MAIN_LIST_CTRL_ID );
  2035.   MMICMSBRW_InitCache();
  2036.   //暂停mp3播放   
  2037.       if(MMIMP3_IsMp3PlayingAsBg())
  2038.       {
  2039.          MMIMP3_SuspendMp3(TRUE);
  2040.          SCI_TRACE_LOW("MMIMP3__SuspendMp3: s_is_mms_suspend_mp3=TRUE");
  2041.          s_is_mms_suspend_mp3=TRUE;
  2042.       }
  2043.       MMK_SetWinSoftkeyId(win_id, STXT_OPTION, COMMON_TXT_NULL, STXT_RETURN, FALSE);
  2044.       break;
  2045.     case MSG_FULL_PAINT:
  2046. SCI_TRACE_LOW("Main_HandleMmsMainWin MSG_FULL_PAINT");
  2047.       //MMITHEME_DrawMenuBarLine();
  2048.       Main_MmsInitCtrl(s_mailbox_index);
  2049.       break;
  2050.       
  2051.     case MSG_APP_OK:
  2052.  if(MMK_GetActiveCtrlId(win_id) != MMIMMS_MAIN_POPMENU_CTRL_ID)
  2053.         MMK_TrackPopupMenu(win_id);
  2054.         break;
  2055. case MSG_MMS_READ_PLAY_SIGN_FAILED:
  2056. {
  2057. if (g_readsignstate== MMS_MSG_READ_SIGN_FOR_SET)
  2058. {
  2059. MMK_CreateWin((uint32 *)MMIMMS_SETTING_EDIT_SIGN_TAB,PNULL);
  2060. }
  2061. else if (g_readsignstate== MMS_MSG_READ_SIGN_FOR_EDIT)
  2062. {
  2063. g_mms_edit_status = MMS_EDIT_NEW_MMS;
  2064. MMIMMS_WriteNewMMS();
  2065. }
  2066. else if (g_readsignstate == MMS_MSG_READ_SIGN_FOR_ANSWER_MMS)
  2067. {
  2068. MMK_CreateWin((uint32 *)MMIMMS_EDIT_WIN_TAB,PNULL);
  2069. }
  2070. }
  2071. break;
  2072. case MSG_MMS_READ_PLAY_SIGN_OK:
  2073. SCI_TRACE_LOW("FNH MSG_MMS_READ_PLAY_SIGN");
  2074. g_pcur_signdoc = MMS_New();
  2075. SCI_ASSERT(g_pcur_signdoc != NULL);
  2076. SCI_TRACE_LOW("FNH MSG_MMS_READ_PLAY_SIGN_OK before cms_parse_mms");
  2077. cms_parse_mms((char *)"signtempfile.mms",g_pcur_signdoc);
  2078. mmsf_Remove((char *)"signtempfile.mms");
  2079. if (g_readsignstate== MMS_MSG_READ_SIGN_FOR_SET)
  2080. {
  2081. MMK_CreateWin((uint32 *)MMIMMS_SETTING_EDIT_SIGN_TAB,PNULL);
  2082. }
  2083. else if (g_readsignstate== MMS_MSG_READ_SIGN_FOR_EDIT)
  2084. {
  2085. g_mms_edit_status = MMS_EDIT_NEW_MMS;
  2086. MMIMMS_WriteNewMMS();
  2087. }
  2088. else if (g_readsignstate == MMS_MSG_READ_SIGN_FOR_ANSWER_MMS)
  2089. {
  2090. MMK_CreateWin((uint32 *)MMIMMS_EDIT_WIN_TAB,PNULL);
  2091. }
  2092. break;
  2093.         
  2094.     case MSG_CTL_OK:
  2095.     case MSG_CTL_PENOK:
  2096.     case MSG_CTL_DBCLICK: 
  2097.       ctrl_id = (MMI_CTRL_ID_T)param;
  2098.       switch( ctrl_id )
  2099.   {
  2100.         case MMIMMS_MAIN_LIST_CTRL_ID:
  2101.           index = GUILISTBOX_GetCurItemIndex( MMIMMS_MAIN_LIST_CTRL_ID );
  2102.           SCI_ASSERT(index < MMIMESSAGE_BOX_TOTAL+1);
  2103.           s_mailbox_index = index;
  2104.           if(0 == index)
  2105.           {
  2106.               //新建彩信
  2107.               Main_MmsNewMmsCallBack();
  2108.           }
  2109.           else
  2110.           {
  2111.               //彩信信箱          
  2112.             MMIMMS_Apart_OpenMMSMailBox( index-1 );
  2113.           }
  2114.           break;
  2115.         
  2116.         // 查看菜单
  2117.         case MMIMMS_MAIN_POPMENU_CTRL_ID:
  2118.             GUIMENU_GetRetID((MMI_CTRL_ID_T)param, &group_id, &menu_id);
  2119.             if (ID_MMIMMS_MAIN_SET == menu_id)
  2120.             {
  2121. MMK_CreateWin((uint32*)MMIMMS_SETTING_MENU_WIN, PNULL );
  2122.             }
  2123.             else if (ID_MMIMMS_MAIN_NETWORK == menu_id)
  2124.             {
  2125. // MMICMSBRW_OpenSettingListWin();
  2126. MMK_CreateWin((uint32 *)MMIMMS_SETTING_NETWORK_WIN,PNULL);
  2127.             }
  2128.             else if (ID_MMIMMS_MAIN_CAPACITY == menu_id)
  2129.             {
  2130. MMK_CreateWin((uint32 *)MMIMMS_MMSSPACE_LIST_WIN,PNULL);
  2131.             }
  2132.             else
  2133.             {
  2134.                 SCI_ASSERT(0);
  2135.             }
  2136.             break;
  2137.             
  2138.         default:
  2139.           break;
  2140.       }
  2141.       break;
  2142. /*****************added by cloud6************************/
  2143. case MSG_APP_WEB:
  2144.           index = GUILISTBOX_GetCurItemIndex( MMIMMS_MAIN_LIST_CTRL_ID );
  2145.           SCI_ASSERT(index < MMIMESSAGE_BOX_TOTAL+1);
  2146.           s_mailbox_index = index;
  2147.           if(0 == index)
  2148.           {
  2149.               //新建彩信
  2150.               Main_MmsNewMmsCallBack();
  2151.           }
  2152.           else
  2153.           {
  2154.               //彩信信箱          
  2155.             MMIMMS_Apart_OpenMMSMailBox( index-1 );
  2156.           }
  2157.      break;
  2158. /*******************end added*******************************/
  2159.     case MSG_GET_FOCUS:
  2160.       //set active control
  2161.       MMK_SetAtvCtrl( win_id,  MMIMMS_MAIN_LIST_CTRL_ID );
  2162.       if(MMIMP3_IsMp3PlayingAsBg())
  2163.       {
  2164.          MMIMP3_SuspendMp3(TRUE);
  2165.          SCI_TRACE_LOW("MMIMP3__SuspendMp3: s_is_mms_suspend_mp3=TRUE");
  2166.          s_is_mms_suspend_mp3=TRUE;
  2167.       }
  2168.       break;
  2169.    
  2170. case MSG_CLOSE_WINDOW:
  2171. MMICMSBRW_FreeGlobalBuffer();
  2172.         destroy_mms_mem_file_info();//free all the virtual file when exit the menu win.
  2173.             //恢复mp3播放
  2174.         if(s_is_mms_suspend_mp3)
  2175.         {
  2176.           s_is_mms_suspend_mp3=FALSE;
  2177.           MMIMP3_ContinuePlayMp3();
  2178.         }
  2179. if (g_pcur_signdoc != NULL) //自动签名
  2180. {
  2181. SCI_TRACE_LOW("FNH before free p_cur_edit");
  2182. MMSDelDocument(g_pcur_signdoc);
  2183. g_pcur_signdoc = NULL;
  2184. }
  2185.          break;
  2186.     case MSG_APP_CANCEL:
  2187.     case MSG_CTL_CANCEL:
  2188.       if(MMK_GetActiveCtrlId(win_id) == MMIMMS_MAIN_POPMENU_CTRL_ID)
  2189. {
  2190.        uint8 i = 4;
  2191.  uint32 j = 0x00ad0002;
  2192. MMK_SetAtvCtrl(win_id, MMIMMS_MAIN_LIST_CTRL_ID);
  2193. MMK_PostMsg(win_id, MSG_TP_PRESS_DOWN, (DPARAM)&j, i);
  2194. }
  2195. else
  2196. {
  2197.          MMK_CloseWin(win_id);
  2198. }           //cloud6
  2199.       break;
  2200.     default:
  2201. SCI_TRACE_LOW("Main_HandleMmsMainWin default");
  2202.       recode = MMI_RESULT_FALSE;
  2203.       break;
  2204.   }
  2205.   return recode;
  2206. }
  2207. /*****************************************************************************/
  2208. //  Description : 彩信主窗口控件初始化
  2209. //  Global resource dependence : 
  2210. //  Author:Bill.Ji
  2211. //  Note:
  2212. /*****************************************************************************/
  2213. LOCAL void Main_MmsInitCtrl( uint8  cur_index )
  2214. {
  2215.   uint16          i;
  2216.   MMI_STRING_T    text_str;
  2217.   GUI_LISTBOX_ITEM_T item;
  2218.   MMI_STRING_T       string = { 0, FALSE, PNULL };
  2219.   //初始化列表
  2220.   GUILISTBOX_SetMaxItem(MMIMMS_MAIN_LIST_CTRL_ID, MMIMESSAGE_BOX_TOTAL+1);
  2221.   //新建
  2222.   //  SCI_MEMSET(&item, 0x00, sizeof(GUI_LISTBOX_ITEM_T));
  2223.   SCI_MEMSET(&item, 0, sizeof(GUI_LISTBOX_ITEM_T));
  2224.     // 获得文本
  2225.     MMI_GetLabelTextByLang(TXT_ADD, &string);
  2226.     item.is_ucs2 = string.is_ucs2;
  2227.     item.str_len = string.length;
  2228.     SCI_MEMCPY(item.str, string.str_ptr, string.length);
  2229.     item.left_icon_id = IMAGE_MMS_NEW;
  2230.     GUILISTBOX_AppendItem(MMIMMS_MAIN_LIST_CTRL_ID, &item);
  2231. SCI_TRACE_LOW("Main_MmsInitCtrl getnew");
  2232.   for ( i = 0; i < MMIMESSAGE_BOX_TOTAL; i++ )
  2233.   {
  2234.  SCI_TRACE_LOW("Main_MmsInitCtrl Main_MmsInitList:%d",i);
  2235.      Main_MmsInitList( MMIMESSAGE_INBOX+i );
  2236.   }
  2237.   GUILISTBOX_SetCurItemIndex(MMIMMS_MAIN_LIST_CTRL_ID, cur_index);
  2238. }
  2239. /*****************************************************************************/
  2240. //  Description : 彩信主窗口列表控件初始化
  2241. //  Global resource dependence : 
  2242. //  Author:Bill.Ji
  2243. //  Note:
  2244. /*****************************************************************************/
  2245. LOCAL void Main_MmsInitList( MMIMSG_MAILBOX_TYPE_E  mailbox_type )
  2246. {
  2247. MMI_STRING_T            item_str;
  2248. GUI_LISTBOX_ITEM_T      item_list;
  2249. uint8                   num_buf[10];
  2250. uint8                   ucs2_buf[22];
  2251. uint8                   count = 0;
  2252. uint8                   count_len = 0;
  2253. MMI_IMAGE_ID_T          icon_id = 0;
  2254.   //初始化
  2255. SCI_MEMSET(&item_list, 0, sizeof(GUI_LISTBOX_ITEM_T));
  2256. SCI_MEMSET(&item_str, 0, sizeof(MMI_STRING_T));
  2257. SCI_MEMSET(num_buf, 0, sizeof(num_buf));
  2258. SCI_MEMSET(ucs2_buf, 0, sizeof(ucs2_buf));
  2259. // SCI_TRACE_LOW("Main_MmsInitCtrl before count g_pManager =%p,g_pManager->currentfolder = %d",g_pManager,g_pManager->currentfolder);
  2260.   //读取信箱的条数
  2261.   count = MMIMMS_GetMailboxMsgNum( mailbox_type );
  2262. // g_pManager->currentfolder =g_pManager->inboxfolder;
  2263. // count = MMIMMS_GetMessageNum(g_pManager->currentfolder);
  2264. SCI_TRACE_LOW("Main_MmsInitCtrl after count");
  2265. sprintf((char*)num_buf, " (%d)", count);  
  2266.   //设置列表项
  2267. switch( mailbox_type )
  2268. {
  2269. case MMIMESSAGE_INBOX:
  2270. MMI_GetLabelTextByLang(TXT_MMS_INBOX, &item_str);
  2271. item_list.left_icon_id = IMAGE_MMS_INBOX;        
  2272. break;
  2273. case MMIMESSAGE_SENTBOX:
  2274. MMI_GetLabelTextByLang(TXT_MMS_SENTBOX, &item_str);
  2275. item_list.left_icon_id = IMAGE_SEND_SUCCESS_MMS_ICON;        
  2276. break;
  2277. case MMIMESSAGE_OUTBOX:
  2278. MMI_GetLabelTextByLang(TXT_MMS_OUTBOX, &item_str);
  2279. item_list.left_icon_id = IMAGE_SEND_FAIL_MMS_ICON;        
  2280. break;
  2281. case MMIMESSAGE_DRAFTBOX:
  2282. MMI_GetLabelTextByLang(TXT_MMS_DRAFTBOX, &item_str);
  2283. item_list.left_icon_id = IMAGE_DRAFT_MMS_ICON;        
  2284. break;
  2285. default:
  2286. SCI_ASSERT(FALSE);
  2287. break;
  2288. }
  2289. MMI_MEMCPY(item_list.str, LISTBOX_STRING_MAX_NUM, item_str.str_ptr,
  2290.              item_str.length, item_str.length);
  2291. item_list.str_len = (uint8)item_str.length ;
  2292. item_list.is_ucs2 = item_str.is_ucs2;
  2293. count_len = strlen(( char *)num_buf );
  2294. if ( item_str.is_ucs2 )
  2295. {
  2296. MMI_NumStrToUCS2( num_buf, count_len, ucs2_buf );
  2297. count_len += count_len;
  2298. else 
  2299. {
  2300. MMI_MEMCPY(ucs2_buf, 20, num_buf, count_len, count_len);
  2301. }
  2302. MMI_MEMCPY(item_list.str+item_list.str_len,LISTBOX_STRING_MAX_NUM - item_list.str_len,
  2303.              ucs2_buf, count_len, count_len);
  2304. item_list.str_len += count_len ;
  2305.   //添加到列表控件
  2306. SCI_TRACE_LOW("Main_MmsInitCtrl before append");
  2307. GUILISTBOX_AppendItem(MMIMMS_MAIN_LIST_CTRL_ID, &item_list);
  2308. SCI_TRACE_LOW("Main_MmsInitCtrl after append");
  2309. }
  2310. /*****************************************************************************/
  2311. //  Description : 写新彩信的回调函数
  2312. //  Global resource dependence : 
  2313. //  Author:Bill.Ji
  2314. //  Note:
  2315. /*****************************************************************************/
  2316. LOCAL MMI_RESULT_E Main_MmsNewMmsCallBack( void )
  2317. {
  2318. MMK_WinGetActive(MMIMSG_MAIN_WIN_ID);
  2319. g_filetype = MMICMS_GetCurrentFFS();
  2320. if ((g_nv_setting_mirror.auto_sign == MMS_MSG_SETTINGS_ON) && (g_filetype != FS_INVALID))
  2321. {
  2322. MMIMMS_CreateReadMMSWaitingWin();
  2323. g_readsignstate= MMS_MSG_READ_SIGN_FOR_EDIT;
  2324. MMIMMS_ReadAutosign() ;
  2325. }
  2326. else if (g_nv_setting_mirror.auto_sign == MMS_MSG_SETTINGS_OFF)
  2327. {
  2328. g_mms_edit_status = MMS_EDIT_NEW_MMS;
  2329. MMIMMS_WriteNewMMS();
  2330. }
  2331. return MMI_RESULT_TRUE;
  2332. }
  2333. /*****************************************************************************/
  2334. //     Description : 5.1A set MMS label text (N/M x.yK), 
  2335. //                and 2 icons that indicate whether there is image or music in this slide.
  2336. //    Global resource dependence : 
  2337. //  Author:Bruce.Chi
  2338. //    Note:    N: Current slide index.    M: total slide
  2339. //            x: how many ONE_KILOs        y: how many hundreds
  2340. /*****************************************************************************/
  2341. LOCAL BOOLEAN Edit_SetLabelContent(MMI_CTRL_ID_T ctrl_id,pMMS_EDocument p_cur_edoc)
  2342. {
  2343.     T_UWORD            slide_index = 0;
  2344.     uint32            slide_total_num = 0;
  2345.     T_UWORD            total_size = 0;
  2346.     char            label_string[64] = {0};
  2347.     MMI_STRING_T    string_save;
  2348.     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};
  2349.     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};
  2350.     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};
  2351.     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};
  2352. 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};
  2353.     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};
  2354.     uint32             slide_num = 0;
  2355. SCI_TRACE_LOW("Edit_SetLabelContent enter");
  2356. slide_index = MMSGetSlideIndex(p_cur_edoc);
  2357. slide_total_num = MMSGetSlideCount(p_cur_edoc);
  2358. total_size = p_cur_edoc->totalsize;
  2359. SCI_TRACE_LOW("%f",p_cur_edoc->totalsize);
  2360.   //  total_size += 99;    //up trunk
  2361.     SCI_MEMSET(label_string, 0, 64);
  2362.     sprintf(label_string, "%d/%d %d.%dk", 
  2363.             (int)slide_index,                //N
  2364.             (int)slide_total_num,            //M
  2365.             (int)(total_size / ONE_KILO),//1000,            //x
  2366.             (int)((total_size % ONE_KILO) / 100)    //y
  2367.             );
  2368.     string_save.is_ucs2 = FALSE;
  2369.     string_save.length = SCI_STRLEN(label_string);
  2370.     SCI_ASSERT(string_save.length < 64);
  2371.     string_save.str_ptr = (uint8 *)label_string;
  2372.     GUILABEL_SetText(ctrl_id, &string_save, FALSE);
  2373. //whether image exist
  2374.     if (p_cur_edoc->slide_cur->image_flag == 1)
  2375.     {
  2376.         //Edit_DrawIcon(LABEL_X2 + 1, LABEL_Y1, IMAGE_MMS_INSERT_PIC_ICON);
  2377.         GUIBUTTON_SetBackGround(MMIMMS_EDIT_PIC_CTRL_ID, del_pic_ctl_bg);
  2378.     }
  2379.     else
  2380.     {
  2381.         GUIBUTTON_SetBackGround(MMIMMS_EDIT_PIC_CTRL_ID, add_pic_ctl_bg);
  2382.     }
  2383.     //whether audio exist
  2384.     if (p_cur_edoc->slide_cur->audiosize !=0)
  2385.     {
  2386.         //Edit_DrawIcon(LABEL_X2 + LABEL_HEIGHT + 1, LABEL_Y1, IMAGE_MMS_INSERT_RING_ICON);
  2387.         GUIBUTTON_SetBackGround(MMIMMS_EDIT_RING_CTRL_ID, del_ring_ctl_bg);
  2388.     }
  2389.     else
  2390.     {
  2391.         GUIBUTTON_SetBackGround(MMIMMS_EDIT_RING_CTRL_ID, add_ring_ctl_bg);
  2392.     }
  2393. //whether video exist
  2394.     if (p_cur_edoc->slide_cur->video_flag == 1)
  2395.     {
  2396.         //Edit_DrawIcon(LABEL_X2 + LABEL_HEIGHT + 1, LABEL_Y1, IMAGE_MMS_INSERT_RING_ICON);
  2397.         GUIBUTTON_SetBackGround(MMIMMS_EDIT_VIDEO_CTRL_ID, del_video_ctl_bg);
  2398.     }
  2399.     else
  2400.     {
  2401.         GUIBUTTON_SetBackGround(MMIMMS_EDIT_VIDEO_CTRL_ID, add_video_ctl_bg);
  2402.     }
  2403. slide_num=MMSGetSlideCount(p_cur_edoc);
  2404.     if(slide_num <= 1)
  2405.     {
  2406.         GUIBUTTON_SetGrayed(MMIMMS_EDIT_DEL_SLIDE_CTRL_ID, TRUE, FALSE);
  2407.     }
  2408.     else
  2409.     {
  2410.         GUIBUTTON_SetGrayed(MMIMMS_EDIT_DEL_SLIDE_CTRL_ID, FALSE, FALSE);
  2411.     }
  2412.     
  2413.     return TRUE;
  2414. }
  2415. /*****************************************************************************/
  2416. //     Description : 5.1A set MMS label text (N/M x.yK), 
  2417. //                and 2 icons that indicate whether there is image or music in this slide.
  2418. //    Global resource dependence : 
  2419. //  Author:Bruce.Chi
  2420. //    Note:    N: Current slide index.    M: total slide
  2421. //            x: how many ONE_KILOs        y: how many hundreds
  2422. /*****************************************************************************/
  2423. LOCAL BOOLEAN Edit_SetSignLabelContent(MMI_CTRL_ID_T ctrl_id,pMMS_EDocument p_cur_edoc)
  2424. {
  2425.     T_UWORD            slide_index = 0;
  2426.     uint32            slide_total_num = 0;
  2427.     T_UWORD            total_size = 0;
  2428.     char            label_string[64] = {0};
  2429.     MMI_STRING_T    string_save;
  2430.     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};
  2431.     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};
  2432.     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};
  2433.     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};
  2434. 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};
  2435.     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};
  2436.     uint32             slide_num = 0;
  2437. SCI_TRACE_LOW("Edit_SetSignLabelContent enter");
  2438. slide_index = MMSGetSlideIndex(p_cur_edoc);
  2439. slide_total_num = MMSGetSlideCount(p_cur_edoc);
  2440. total_size = p_cur_edoc->totalsize;
  2441. SCI_TRACE_LOW("%f",p_cur_edoc->totalsize);
  2442.   //  total_size += 99;    //up trunk
  2443.     SCI_MEMSET(label_string, 0, 64);
  2444.     sprintf(label_string, "%d/%d %d.%dk", 
  2445.             (int)slide_index,                //N
  2446.             (int)slide_total_num,            //M
  2447.             (int)(total_size / ONE_KILO),//1000,            //x
  2448.             (int)((total_size % ONE_KILO) / 100)    //y
  2449.             );
  2450.     string_save.is_ucs2 = FALSE;
  2451.     string_save.length = SCI_STRLEN(label_string);
  2452.     SCI_ASSERT(string_save.length < 64);
  2453.     string_save.str_ptr = (uint8 *)label_string;
  2454.     GUILABEL_SetText(ctrl_id, &string_save, FALSE);
  2455. //whether image exist
  2456.     if (p_cur_edoc->slide_cur->image_flag == 1)
  2457.     {
  2458.         //Edit_DrawIcon(LABEL_X2 + 1, LABEL_Y1, IMAGE_MMS_INSERT_PIC_ICON);
  2459.         GUIBUTTON_SetBackGround(MMIMMS_EDITSIGN_PIC_CTRL_ID, del_pic_ctl_bg);
  2460.     }
  2461.     else
  2462.     {
  2463.         GUIBUTTON_SetBackGround(MMIMMS_EDITSIGN_PIC_CTRL_ID, add_pic_ctl_bg);
  2464.     }
  2465.     //whether audio exist
  2466.     if (p_cur_edoc->slide_cur->audiosize !=0)
  2467.     {
  2468.         //Edit_DrawIcon(LABEL_X2 + LABEL_HEIGHT + 1, LABEL_Y1, IMAGE_MMS_INSERT_RING_ICON);
  2469.         GUIBUTTON_SetBackGround(MMIMMS_EDITSIGN_RING_CTRL_ID, del_ring_ctl_bg);
  2470.     }
  2471.     else
  2472.     {
  2473.         GUIBUTTON_SetBackGround(MMIMMS_EDITSIGN_RING_CTRL_ID, add_ring_ctl_bg);
  2474.     }
  2475. //whether video exist
  2476.     if (p_cur_edoc->slide_cur->video_flag == 1)
  2477.     {
  2478.         //Edit_DrawIcon(LABEL_X2 + LABEL_HEIGHT + 1, LABEL_Y1, IMAGE_MMS_INSERT_RING_ICON);
  2479.         GUIBUTTON_SetBackGround(MMIMMS_EDITSIGN_VIDEO_CTRL_ID, del_video_ctl_bg);
  2480.     }
  2481.     else
  2482.     {
  2483.         GUIBUTTON_SetBackGround(MMIMMS_EDITSIGN_VIDEO_CTRL_ID, add_video_ctl_bg);
  2484.     }    
  2485.     return TRUE;
  2486. }
  2487. /*****************************************************************************/
  2488. //     Description : 5.1A set MMS edit control text 
  2489. //    Global resource dependence : 
  2490. //  Author:Bruce.Chi
  2491. //    Note: 
  2492. /*****************************************************************************/
  2493. LOCAL BOOLEAN Edit_SetEditCtrlContent(MMI_CTRL_ID_T ctrl_id, pMMS_EDocument p_cur_edoc)
  2494. {
  2495. TEXTEDIT_STRING_INFO_T edit_string;
  2496. MMI_STRING_T saved_string;
  2497. int16 slide_count= 0;
  2498. T_Composer_Text mms_text;
  2499. slide_count = MMSGetSlideCount(p_cur_edoc);
  2500. if (slide_count == 0)
  2501. {
  2502. MMS_New_Slide(p_cur_edoc);
  2503. if((p_cur_edoc == g_peditdoc)
  2504. &&((g_mms_edit_status == MMS_EDIT_NEW_MMS)||(g_mms_edit_status == MMS_EDIT_ANSWER_MMS))
  2505. &&(g_nv_setting_mirror.auto_sign == MMS_MSG_SETTINGS_ON)
  2506. &&(g_filetype != FS_INVALID)
  2507. && (g_pcur_signdoc != NULL))
  2508. {
  2509. pMMS_Slide pSlide = NULL;
  2510. pSlide = g_pcur_signdoc->slide_cur;
  2511. g_peditdoc->slide_cur->next = pSlide;
  2512. pSlide->prev = g_peditdoc->slide_cur;
  2513. g_peditdoc->totalsize = g_peditdoc->totalsize + g_pcur_signdoc->totalsize - 500; //这里的500个字节是库里初始化时加的,所以这里要减去
  2514. }
  2515. }
  2516. SCI_MEMSET(&mms_text, 0, sizeof(mms_text));
  2517. if(Edit_CurContentTextExist(p_cur_edoc))
  2518. {
  2519. saved_string =  Edit_GetContentText(p_cur_edoc);
  2520. saved_string.str_ptr[saved_string.length] = '';
  2521. GUIEDITBOX_SetTextEditBoxStringInfo(
  2522. ctrl_id, 
  2523. saved_string.str_ptr,
  2524. saved_string.length,
  2525. saved_string.is_ucs2
  2526. );
  2527. }
  2528. else
  2529. {
  2530. GUIEDITBOX_ClearAllStr(ctrl_id);
  2531. }
  2532.     return TRUE;
  2533. }
  2534. /*****************************************************************************/
  2535. // Description : to parse the multisend dest address for mms
  2536. // Global resource dependence :
  2537. // Author:yuhua.shi
  2538. // Note:
  2539. /*****************************************************************************/
  2540. void MMIMMS_ParseDestAddr(TEXTEDIT_STRING_INFO_T* text_info, To_Addr* addr_list)                  
  2541. {
  2542.     
  2543.     uint16    i = 0;
  2544.     uint16      start_index = 0, end_index = 0;
  2545.     uint8      addr_len = 0;
  2546.     uint8      address[MMIMMS_MAX_ADDRESS_LEN+2];
  2547.     TEXTEDIT_STRING_INFO_T* p_text_info = text_info;
  2548.     
  2549.     SCI_ASSERT(PNULL != p_text_info);
  2550.     SCI_ASSERT(FALSE == p_text_info->is_ucs2);
  2551. SCI_ASSERT(addr_list != PNULL);
  2552.     
  2553.     //there is no dest address, return
  2554.     if((0 == p_text_info->str_len) || ('' == p_text_info->str_ptr))
  2555.     {
  2556.         SCI_TRACE_LOW("MMIMMS::MMIMMS_ParseDestAddr(), no address!");
  2557.         return;
  2558.     }
  2559.     
  2560.     //delete all dest address
  2561.     Edit_DeleteToAddrAll(addr_list);
  2562.     SCI_MEMSET(address, 0, MMIMMS_MAX_ADDRESS_LEN+2);
  2563.     
  2564.     for (i=0; i<p_text_info->str_len; i++)
  2565.     {
  2566.         //process the string when current char is comma
  2567.         if(MMS_ADDRESS_SEPERATE_SYMBOL == p_text_info->str_ptr[i])
  2568.         {
  2569.             //the first char is comma, skip it and next continue
  2570.             if(0 == i)
  2571.             {
  2572.                 start_index = 1;
  2573.                 continue;
  2574.             }
  2575.             
  2576.             //record the comma char's index
  2577.             end_index = i;
  2578.             
  2579.             SCI_ASSERT(start_index <= end_index);
  2580.             
  2581.             //there is no other string between the two comma, so skip it
  2582.             if(start_index == end_index)
  2583.             {
  2584.                 start_index = end_index + 1;
  2585.                 continue;        
  2586.             }
  2587.             
  2588.             //get the address string
  2589.             addr_len = end_index - start_index;
  2590.             addr_len = (addr_len <= MMIMMS_MAX_ADDRESS_LEN) ? addr_len : MMIMMS_MAX_ADDRESS_LEN;
  2591.             strncpy((char*)address, (char*)&p_text_info->str_ptr[start_index], addr_len);
  2592.             address[addr_len] = '';
  2593.             
  2594.             //set the address string to dest address
  2595.             Edit_AddToAddr((uint8 *)address,addr_list);
  2596.             
  2597.             //record the new string start index
  2598.             start_index = end_index + 1;
  2599.         }
  2600.     }
  2601.     
  2602.     //get the last address string if exist
  2603.     if(start_index < p_text_info->str_len)
  2604.     {
  2605.         //get the address string
  2606.         addr_len = p_text_info->str_len - start_index;
  2607.         addr_len = (addr_len <= MMIMMS_MAX_ADDRESS_LEN) ? addr_len : MMIMMS_MAX_ADDRESS_LEN;
  2608.         strncpy((char*)address, (char*)&p_text_info->str_ptr[start_index], addr_len);
  2609.         address[addr_len] = '';
  2610.         
  2611.         //set the address string to dest address
  2612.         Edit_AddToAddr((uint8 *)address,addr_list);
  2613.     }
  2614.     
  2615. }
  2616. /*****************************************************************************/
  2617. //     Description : to handle the message of editwin      
  2618. //    Global resource dependence : is_need_to_load_former_text
  2619. //  Author:louis.wei
  2620. //    Note: 
  2621. /*****************************************************************************/
  2622. static BOOLEAN is_need_to_load_former_text = FALSE;    //编辑彩信,按确定键和1键(弹出符号表),都能产生lose_focus消息,要区分开。
  2623. static MMI_MENU_ID_T s_opt_menu_id;
  2624. static MMI_CTRL_ID_T getwin_contrl_id = MMIMMS_EDIT_CTRL_ID;
  2625. LOCAL MMI_RESULT_E  Edit_HandleEditMMSWinMsg(
  2626.                                      MMI_WIN_ID_T win_id, 
  2627.                                      MMI_MESSAGE_ID_E msg_id, 
  2628.                                      DPARAM param
  2629.                                      )
  2630. {
  2631.     MMI_RESULT_E        err_code = MMI_RESULT_TRUE;
  2632.     MMI_CTRL_ID_T    edit_contrl_id = MMIMMS_EDIT_CTRL_ID;
  2633. MMI_CTRL_ID_T    subject_contrl_id = MMIMMS_EDIT_SUBJECT_CTRL_ID;
  2634. MMI_CTRL_ID_T    address_contrl_id = MMIMMS_ADDR_EDITBOX_CTRL_ID;
  2635. MMI_CTRL_ID_T    address_cc_contrl_id = MMIMMS_ADDR_EDITBOX_MMSCC_CTRL_ID;
  2636. MMI_CTRL_ID_T    address_bcc_contrl_id = MMIMMS_ADDR_EDITBOX_MMSBCC_CTRL_ID;
  2637.     MMI_MENU_ID_T       menu_id  = 0;
  2638.     MMI_MENU_GROUP_ID_T group_id = 0;
  2639.     uint32    slide_num = 0;
  2640.     T_Composer_Image                        composer_img;
  2641.     T_Composer_Audio                        composer_audio;
  2642. T_Composer_Video composer_video;
  2643.     MMIMULTIM_SELECTED_RETURN_T                *multim_return_info_ptr = PNULL;
  2644. MMIMPEG4_BUFFER_FILE_INFO_T      *mpeg4_return_info_ptr = PNULL;
  2645. MMIMP3_TETURN_INFO_T  *mp3_return_info_ptr = PNULL;
  2646.     uint8 tele_num[MMIMMS_MAX_ADDRESS_LEN + 2] = {0};
  2647.     MMI_STRING_T        prompt_str = { 0, FALSE, PNULL };
  2648.     SAVEFS_WRITE_RESULT        savefs_result = SAVEFS_WRITE_SUCCEED;
  2649.     MMI_STRING_T        waiting_str = { 0, FALSE, PNULL };
  2650.     FFS_OVERLAPPED_RESULT_T    *efs_result_ptr = PNULL;
  2651.     uint32                   button_index = 0;
  2652.     uint8                    *addr_ptr = PNULL;
  2653.     uint8                    max_selected_num = 0;
  2654.     TEXTEDIT_STRING_INFO_T   addr_edit_string;
  2655.     TEXTEDIT_STRING_INFO_T   subj_edit_string;
  2656.     TEXTEDIT_STRING_INFO_T   content_edit_string;
  2657.     uint8                     all_addr_str[MMIMMS_MAX_ADDRESS_NUM*(MMIMMS_MAX_ADDRESS_LEN+2)] = {0};   
  2658.     uint16                     all_addr_str_len = 0;
  2659.     MMI_STRING_T             saved_subj_string = { 0, FALSE, PNULL };
  2660.     uint8                    exist_addr_num = 0;
  2661. TEXTEDIT_STRING_INFO_T  edit_string;
  2662. MMI_STRING_T saved_string;
  2663. int32 i_size_free = 0;
  2664. To_Addr* addr_list = PNULL;
  2665. SCI_TRACE_LOW("Edit_HandleEditMMSWinMsg ENTER msg_id=%d",msg_id);
  2666.     switch(msg_id)
  2667.     {
  2668.     case MSG_FULL_PAINT:
  2669. SCI_TRACE_LOW("Edit_HandleEditMMSWinMsg MSG_FULL_PAINT");
  2670.         MMIMMS_CLEAR_CLIENT();
  2671. SCI_TRACE_LOW("Edit_HandleEditMMSWinMsg MSG_FULL_PAINT clear client over");
  2672.         //set label window text
  2673.         Edit_SetLabelContent(MMIMMS_EDIT_LABEL_CTRL_ID,g_peditdoc);
  2674.         break;
  2675.         
  2676.     case MSG_OPEN_WINDOW:
  2677. if (MMS_EDIT_SEND_IMAGE != g_mms_edit_status)
  2678. {
  2679. MMICMSBRW_InitCache(); //fnh add
  2680. }
  2681. MMIMMS_Construction(); 
  2682. GUIEDITBOX_SetEditBoxScroll(address_contrl_id, SCROLLBAR_NONE);
  2683.         GUIEDITBOX_SetEditBoxToSingle(address_contrl_id, SINGLE_ALIGN_CENTER);
  2684. GUIEDITBOX_SetInputType(address_contrl_id, INPUT_KEYBOARD_TYPE);
  2685.         GUIEDITBOX_SetMutiPhoneNumStyle(address_contrl_id);
  2686. GUIEDITBOX_SetEditBoxScroll(address_cc_contrl_id, SCROLLBAR_NONE);
  2687.         GUIEDITBOX_SetEditBoxToSingle(address_cc_contrl_id, SINGLE_ALIGN_CENTER);
  2688. GUIEDITBOX_SetInputType(address_cc_contrl_id, INPUT_KEYBOARD_TYPE);
  2689.         GUIEDITBOX_SetMutiPhoneNumStyle(address_cc_contrl_id);
  2690.         
  2691.         GUIEDITBOX_SetEditBoxScroll(address_bcc_contrl_id, SCROLLBAR_NONE);
  2692.         GUIEDITBOX_SetEditBoxToSingle(address_bcc_contrl_id, SINGLE_ALIGN_CENTER);
  2693. GUIEDITBOX_SetInputType(address_bcc_contrl_id, INPUT_KEYBOARD_TYPE);
  2694.         GUIEDITBOX_SetMutiPhoneNumStyle(address_bcc_contrl_id);
  2695.         GUIEDITBOX_SetEditBoxScroll(MMIMMS_EDIT_SUBJECT_CTRL_ID, SCROLLBAR_NONE);
  2696.         GUIEDITBOX_SetEditBoxToSingle(MMIMMS_EDIT_SUBJECT_CTRL_ID, SINGLE_ALIGN_CENTER);
  2697.         MMK_SetWinSoftkeyId(win_id, STXT_OPTION, COMMON_TXT_NULL, STXT_RETURN, FALSE);
  2698.         MMK_SetWinSKBButton(win_id, MMI_SOFTKEYBAR_LEFT_ICON, IMAGE_PICTURE_PREV_PAGE_ON,IMAGE_PICTURE_PREV_PAGE_OFF,COMMON_IMAGE_NULL, TRUE);
  2699.         MMK_SetWinSKBButton(win_id, MMI_SOFTKEYBAR_MIDDLE_ICON, IMAGE_MMS_PREVIEW_PLAY,IMAGE_MMS_PREVIEW_PLAY,COMMON_IMAGE_NULL, TRUE);
  2700.         MMK_SetWinSKBButton(win_id, MMI_SOFTKEYBAR_RIGHT_ICON, IMAGE_PICTURE_NEXT_PAGE_ON,IMAGE_PICTURE_NEXT_PAGE_OFF,COMMON_IMAGE_NULL, TRUE);
  2701.         //need to load former text
  2702.         is_need_to_load_former_text = TRUE;
  2703. //暂停mp3播放   
  2704. if(MMIMP3_IsMp3PlayingAsBg())
  2705. {
  2706. MMIMP3_SuspendMp3(TRUE);
  2707. s_is_mmscontent_suspend_mp3 = TRUE;
  2708. }
  2709.         
  2710.         //set address lable
  2711.         MMI_GetLabelTextByLang(TXT_MMS_EDIT_MMS_TO, &prompt_str);
  2712.         GUIBUTTON_SetText(MMIMMS_EDIT_SELETENUM_CTRL_ID, &prompt_str);
  2713. MMI_GetLabelTextByLang(TXT_MMS_EDIT_MMS_CC, &prompt_str);
  2714.         GUIBUTTON_SetText(MMIMMS_EDIT_SELETENUM_MMSCC_CTRL_ID, &prompt_str);
  2715. MMI_GetLabelTextByLang(TXT_MMS_EDIT_MMS_BCC, &prompt_str);
  2716. GUIBUTTON_SetText(MMIMMS_EDIT_SELETENUM_MMSBCC_CTRL_ID, &prompt_str);
  2717.         
  2718.         //set subject lable
  2719.         MMI_GetLabelTextByLang(TXT_MMS_EDIT_SUBJ/*TXT_SCH_EDIT_CONTENT*/, &prompt_str);
  2720.         GUILABEL_SetText(MMIMMS_EDIT_SUBJ_LABEL_CTRL_ID, &prompt_str, FALSE);
  2721.             
  2722.         //get MMS_TO addr sting
  2723. exist_addr_num = MmsGetReceiverCount(g_p_mms_to);
  2724.         if((exist_addr_num > 0) && (exist_addr_num <= MMIMMS_MAX_ADDRESS_NUM))
  2725.         {
  2726. p_MMS_RECEPIENT p_temp = NULL;
  2727.            
  2728.             SCI_MEMSET(all_addr_str, 0, MMIMMS_MAX_ADDRESS_NUM*(MMIMMS_MAX_ADDRESS_LEN+2));
  2729.     all_addr_str_len = 0;
  2730. p_temp = g_p_mms_to;
  2731. while(p_temp != NULL)
  2732. {
  2733. addr_ptr = (uint8 *) p_temp->m_address;
  2734. if (addr_ptr != PNULL)
  2735. {
  2736.                     //judge if need to add comma char
  2737.    if(0 != all_addr_str_len)
  2738.    {
  2739.    if(MMS_ADDRESS_SEPERATE_SYMBOL != all_addr_str[all_addr_str_len-1])
  2740.    {
  2741.    //add the comma char
  2742.    all_addr_str[all_addr_str_len] = MMS_ADDRESS_SEPERATE_SYMBOL;
  2743.    all_addr_str_len++;
  2744.    }
  2745.    }    
  2746.    strcat((char*)all_addr_str, (char*)addr_ptr);
  2747.    all_addr_str_len = strlen((char*)all_addr_str);
  2748.                 }
  2749. p_temp = p_temp->p_next;
  2750. }
  2751.             
  2752.             if(0 != all_addr_str_len)
  2753.             {
  2754.                 //set the address editbox
  2755.                 GUIEDITBOX_SetTextEditBoxStringInfo(
  2756.                             address_contrl_id,
  2757.                             all_addr_str,
  2758.                             all_addr_str_len,
  2759.                             FALSE
  2760.                             );
  2761.             }
  2762.         }
  2763. //get MMS_CC addr sting
  2764. exist_addr_num = MmsGetReceiverCount(g_p_mms_cc);
  2765.         if((exist_addr_num > 0) && (exist_addr_num <= MMIMMS_MAX_ADDRESS_NUM))
  2766.         {
  2767. p_MMS_RECEPIENT p_temp = NULL;
  2768.            
  2769.             SCI_MEMSET(all_addr_str, 0, MMIMMS_MAX_ADDRESS_NUM*(MMIMMS_MAX_ADDRESS_LEN+2));
  2770.     all_addr_str_len = 0;
  2771. p_temp = g_p_mms_cc;
  2772. while(p_temp != NULL)
  2773. {
  2774. addr_ptr = (uint8 *) p_temp->m_address;
  2775. if (addr_ptr != PNULL)
  2776. {
  2777.                     //judge if need to add comma char
  2778.    if(0 != all_addr_str_len)
  2779.    {
  2780.    if(MMS_ADDRESS_SEPERATE_SYMBOL != all_addr_str[all_addr_str_len-1])
  2781.    {
  2782.    //add the comma char
  2783.    all_addr_str[all_addr_str_len] = MMS_ADDRESS_SEPERATE_SYMBOL;
  2784.    all_addr_str_len++;
  2785.    }
  2786.    }    
  2787.    strcat((char*)all_addr_str, (char*)addr_ptr);
  2788.    all_addr_str_len = strlen((char*)all_addr_str);
  2789.                 }
  2790. p_temp = p_temp->p_next;
  2791. }
  2792.             
  2793.             if(0 != all_addr_str_len)
  2794.             {
  2795.                 //set the mms_cc address editbox
  2796.                 GUIEDITBOX_SetTextEditBoxStringInfo(
  2797.                             address_cc_contrl_id,
  2798.                             all_addr_str,
  2799.                             all_addr_str_len,
  2800.                             FALSE
  2801.                             );
  2802.             }
  2803.         }
  2804. //get MMS_bcc addr sting
  2805. exist_addr_num = MmsGetReceiverCount(g_p_mms_bcc);
  2806.         if((exist_addr_num > 0) && (exist_addr_num <= MMIMMS_MAX_ADDRESS_NUM))
  2807.         {
  2808. p_MMS_RECEPIENT p_temp = NULL;
  2809.            
  2810.             SCI_MEMSET(all_addr_str, 0, MMIMMS_MAX_ADDRESS_NUM*(MMIMMS_MAX_ADDRESS_LEN+2));
  2811.     all_addr_str_len = 0;
  2812. p_temp = g_p_mms_bcc;
  2813. while(p_temp != NULL)
  2814. {
  2815. addr_ptr = (uint8 *) p_temp->m_address;
  2816. if (addr_ptr != PNULL)
  2817. {
  2818.                     //judge if need to add comma char
  2819.    if(0 != all_addr_str_len)
  2820.    {
  2821.    if(MMS_ADDRESS_SEPERATE_SYMBOL != all_addr_str[all_addr_str_len-1])
  2822.    {
  2823.    //add the comma char
  2824.    all_addr_str[all_addr_str_len] = MMS_ADDRESS_SEPERATE_SYMBOL;
  2825.    all_addr_str_len++;
  2826.    }
  2827.    }    
  2828.    strcat((char*)all_addr_str, (char*)addr_ptr);
  2829.    all_addr_str_len = strlen((char*)all_addr_str);
  2830.                 }
  2831. p_temp = p_temp->p_next;
  2832. }
  2833.             
  2834.             if(0 != all_addr_str_len)
  2835.             {
  2836.                 //set the address editbox
  2837.                 GUIEDITBOX_SetTextEditBoxStringInfo(
  2838.                             address_bcc_contrl_id,
  2839.                             all_addr_str,
  2840.                             all_addr_str_len,
  2841.                             FALSE
  2842.                             );
  2843.             }
  2844.         }
  2845.                
  2846.         //get subject string if exist
  2847.         if (Edit_CurSubjectExist())
  2848.         {
  2849.             saved_subj_string =  Edit_GetSubject();
  2850.             
  2851.             GUIEDITBOX_SetTextEditBoxStringInfo(
  2852.                 MMIMMS_EDIT_SUBJECT_CTRL_ID, 
  2853.                 saved_subj_string.str_ptr,
  2854.                 saved_subj_string.length,
  2855.                 saved_subj_string.is_ucs2
  2856.                 );
  2857.         }
  2858.         GUIMENU_InitGrayed();
  2859.         
  2860.         //set mms content edit window text
  2861.         if (is_need_to_load_former_text)
  2862.         {
  2863.             Edit_SetEditCtrlContent(edit_contrl_id,g_peditdoc);
  2864.         }        
  2865.         //set active control
  2866.         MMK_SetAtvCtrl(win_id, edit_contrl_id);
  2867. SCI_TRACE_LOW("Edit_HandleEditMMSWinMsg open end");
  2868.         break;
  2869.         //fall through
  2870. case MSG_CTL_EDITBOX_UPDATE_STRNUM:
  2871. getwin_contrl_id = MMK_GetActiveCtrlId(win_id);
  2872.  if(edit_contrl_id == getwin_contrl_id)
  2873.  {
  2874. SCI_MEMSET( &edit_string, 0, sizeof( TEXTEDIT_STRING_INFO_T ) );
  2875. GUIEDITBOX_GetTextEditBoxInfo( edit_contrl_id, &edit_string);
  2876. edit_string.str_ptr[edit_string.str_len] = '';
  2877. if (g_peditdoc->slide_cur->text_flag) /*判断当前是否已有文本类型?*/
  2878. {
  2879. CmsDelContent(g_peditdoc, g_peditdoc->slide_cur, MMS_TYPE_TEXT);
  2880. g_peditdoc->slide_cur->text_flag = 0;
  2881. }
  2882. if (edit_string.str_len != 0)
  2883. {
  2884. saved_string.str_ptr = edit_string.str_ptr;
  2885. saved_string.length = edit_string.str_len;
  2886. saved_string.is_ucs2 = edit_string.is_ucs2;
  2887. SCI_TRACE_LOW("FNH saved_string.length = %d",saved_string.length);
  2888. {
  2889. int16 type = 0;
  2890. char text_fname[MMS_MAX_FILE_NAME_LENGTH] = {0};
  2891. SCI_FILE* fd = 0;
  2892. unsigned long value = 0;
  2893. unsigned short buff_size = 0;
  2894. int16 uni_len = 0;
  2895. char* str_utf16 = NULL;
  2896. if (edit_string.is_ucs2 == 0)
  2897. {
  2898. uni_len = Cms_UTF8toUTF16Len(edit_string.str_ptr);
  2899. }
  2900. else
  2901. {
  2902. uni_len = edit_string.str_len;
  2903. }
  2904. SCI_TRACE_LOW("FNH uni_len = %d",uni_len);
  2905. if ((g_peditdoc->totalsize +uni_len ) >= MMS_SIZE_OF_MESSAGE)
  2906. {
  2907. SCI_TRACE_LOW("the mms is too big!");
  2908. PUBWIN_OpenPromptAlertWin(
  2909. PUBWIN_SOFTKEY_ONE, 
  2910. TXT_MMS_MMS_TOO_BIG, 
  2911. IMAGE_PROMPT_ICON_WRONG, 
  2912. ALERT_TIMEOUT, 
  2913. PNULL
  2914. );
  2915. break;
  2916. }
  2917. value = TM_GetTotalSeconds();
  2918. sprintf(text_fname,"%ld",value);
  2919. type = MMS_TYPE_TEXT;
  2920. strcat(text_fname,".txt");
  2921. fd =(SCI_FILE*)mmsf_Open((char*)text_fname,"w");
  2922. if ( !fd )
  2923. {
  2924. SCI_TRACE_LOW("open the file error");
  2925. return ;
  2926. }
  2927. if (edit_string.is_ucs2 == 0)
  2928. {
  2929. str_utf16 =(char*)cms_malloc(uni_len+1);
  2930. SCI_MEMSET(str_utf16,0,uni_len+1);
  2931. Cms_UTF8toUTF16(edit_string.str_ptr,edit_string.str_len,uni_len,str_utf16);
  2932. }
  2933. buff_size = uni_len;
  2934. mmsf_Write((char *)(&buff_size),1,sizeof(unsigned short),(FILE_HANDLE)fd);
  2935. SCI_TRACE_LOW("FNH buff_size = %d",buff_size);
  2936. if (edit_string.is_ucs2 == 0)
  2937. {
  2938. mmsf_Write((char *)str_utf16,1,uni_len,(FILE_HANDLE)fd);
  2939. SCI_TRACE_LOW("FNH after write str_utr16 = %s,uni_len = %d",str_utf16,uni_len);
  2940. }
  2941. else
  2942. {
  2943. mmsf_Write((char *)edit_string.str_ptr,1,uni_len,(FILE_HANDLE)fd);
  2944. SCI_TRACE_BUF("FNH enit_string.str_ptr = ",edit_string.str_ptr,10);
  2945. SCI_TRACE_LOW("FNH uni_len = %d",uni_len);
  2946. }
  2947. mmsf_Close((FILE_HANDLE)fd);
  2948. if (str_utf16)
  2949. {
  2950. cms_free(str_utf16);
  2951. str_utf16 = NULL;
  2952. }
  2953. if (MMS_New_Content((unsigned char *)text_fname,type,g_peditdoc->slide_cur,g_peditdoc))
  2954. {
  2955. SCI_TRACE_LOW("insert text is ok!");
  2956. }
  2957. else 
  2958. {
  2959. SCI_TRACE_LOW("insert text is failed!");
  2960. }
  2961. }
  2962. }
  2963.  }
  2964.  else if(subject_contrl_id == getwin_contrl_id)
  2965.  {
  2966. uint8 *temp_subject = NULL;
  2967. SCI_MEMSET( &edit_string, 0, sizeof( TEXTEDIT_STRING_INFO_T ) );
  2968. GUIEDITBOX_GetTextEditBoxInfo( MMIMMS_EDIT_SUBJECT_CTRL_ID, &edit_string);
  2969. edit_string.str_ptr[edit_string.str_len] = '';
  2970. if (Edit_CurSubjectExist())
  2971. {
  2972. Edit_DeleteSubject();
  2973. }
  2974. SCI_TRACE_LOW("FNH before add subject edit_string.str_ptr = %x",edit_string.str_ptr,10);
  2975. SCI_TRACE_LOW("FNH before add subject edit_string.str_len = %d",edit_string.str_len);
  2976. SCI_TRACE_LOW("FNH before add subject edit_string.is_ucs2 = %d",edit_string.is_ucs2);
  2977. SCI_MEMSET(g_p_mms_subject,0,MMIMMS_MAX_SUBJECTS_LEN+1);
  2978. if (edit_string.is_ucs2 == 0)
  2979. {
  2980. uint16 uni_len = 0;
  2981. uni_len = Cms_UTF8toUTF16Len(edit_string.str_ptr);
  2982. if (uni_len > 0)
  2983. {
  2984. temp_subject =(uint8 *) cms_malloc(uni_len+1);
  2985. SCI_MEMSET(temp_subject,0,uni_len+1);
  2986. SCI_TRACE_LOW("FNH edit_string.str_ptr = %s",edit_string.str_ptr);
  2987. Cms_UTF8toUTF16(edit_string.str_ptr,edit_string.str_len,uni_len,temp_subject);
  2988. if (uni_len > MMIMMS_MAX_SUBJECTS_LEN-2)
  2989. {
  2990. uni_len = MMIMMS_MAX_SUBJECTS_LEN-2;
  2991. }
  2992. SCI_MEMCPY(g_p_mms_subject,&uni_len,2);
  2993. SCI_MEMCPY((int8 *)(g_p_mms_subject+2),temp_subject,uni_len); 
  2994. SCI_TRACE_BUF("FNH g_p_mms_subject = ",g_p_mms_subject,10);
  2995. if (temp_subject)
  2996. {
  2997. cms_free(temp_subject);
  2998. temp_subject = NULL;
  2999. }
  3000. }
  3001. }
  3002. else
  3003. {
  3004. if (edit_string.str_len > MMIMMS_MAX_SUBJECTS_LEN - 2)
  3005. {
  3006. edit_string.str_len = MMIMMS_MAX_SUBJECTS_LEN - 2;
  3007. }
  3008. SCI_MEMCPY(g_p_mms_subject,&edit_string.str_len,2);
  3009. SCI_TRACE_BUF("fnh edit_string.str_ptr = %x",edit_string.str_ptr,10);
  3010. SCI_TRACE_LOW("FNH edit_string.str_len = %d",edit_string.str_len);
  3011. SCI_MEMCPY((int8 *)(g_p_mms_subject+2),edit_string.str_ptr,edit_string.str_len); 
  3012. }
  3013.  }
  3014.  else if(address_contrl_id == getwin_contrl_id)
  3015.  {
  3016.  addr_list = &(g_mms_save_in_mem.to);
  3017.  EditStringToGlobal(getwin_contrl_id,addr_list);
  3018.  }
  3019.  else if(address_cc_contrl_id == getwin_contrl_id)
  3020.  {
  3021.  addr_list = &(g_mms_save_in_mem.cc);
  3022.  EditStringToGlobal(getwin_contrl_id,addr_list);
  3023.  }
  3024.  else if(address_bcc_contrl_id == getwin_contrl_id)
  3025.  {
  3026.  addr_list = &(g_mms_save_in_mem.bcc);
  3027.  EditStringToGlobal(getwin_contrl_id,addr_list);
  3028.  }
  3029.  break;
  3030.      case MSG_GET_FOCUS:
  3031.         //暂时不用
  3032.         GUIMENU_InitGrayed();
  3033. //        GUIMENU_SetGrayed(MENU_MMS_POP_INSERT, ID_MMS_INSERT_PHOTO, GRAYED);
  3034.         //set mms content edit window text
  3035.         if (is_need_to_load_former_text)
  3036.         {
  3037.             Edit_SetEditCtrlContent(edit_contrl_id,g_peditdoc);
  3038.         }
  3039.         //set active control
  3040.         //MMK_SetAtvCtrl(win_id, edit_contrl_id);
  3041.         break;
  3042.     case MSG_CTL_PENUP:
  3043.   //      Edit_SaveMMSText(edit_contrl_id);
  3044. // Edit_SetEditCtrlContent(edit_contrl_id);
  3045.         switch ((MMI_CTRL_ID_T)param)
  3046.         {
  3047.         case MMIMMS_EDIT_ADD_SLIDE_CTRL_ID:
  3048. slide_num=MMSGetSlideCount(g_peditdoc);
  3049. if (( slide_num < MMIMMS_MAX_SLIDE) &&(g_peditdoc->totalsize < MMS_SIZE_OF_MESSAGE-MMS_SINGLE_SLIDE_SIZE))
  3050. if (( slide_num < MMIMMS_MAX_SLIDE) &&(g_peditdoc->totalsize < MMS_SIZE_OF_MESSAGE))
  3051.             {
  3052. MMS_New_Slide(g_peditdoc);
  3053. Edit_SetEditCtrlContent(edit_contrl_id,g_peditdoc);
  3054. MMK_SetAtvCtrl(win_id, edit_contrl_id);
  3055. MMK_SendMessage(PNULL, MSG_FULL_PAINT, PNULL);
  3056.             }
  3057.             else
  3058.             {
  3059.                 //reach MAX_SLIDE_NUMBER. alert.
  3060.                 PUBWIN_OpenPromptAlertWin(
  3061.                     PUBWIN_SOFTKEY_ONE, 
  3062.                     TXT_MMS_CANNOT_INSERT_SLIDE, 
  3063.                     IMAGE_PROMPT_ICON_ALERT,
  3064.                     ALERT_TIMEOUT, 
  3065.                     PNULL
  3066.                     );
  3067.             }
  3068.             break;
  3069.         
  3070.         case MMIMMS_EDIT_PIC_CTRL_ID:
  3071. if (g_peditdoc->slide_cur->image_flag == 1)
  3072. {
  3073. s_opt_menu_id = ID_MMS_EDIT_DEL_IMAGE;
  3074. PUBWIN_OpenPromptQueryWin(TXT_MMS_IF_DEL, IMAGE_PROMPT_ICON_QUERY);
  3075. }
  3076. else if (g_peditdoc->slide_cur->video_flag == 1)
  3077. {
  3078. PUBWIN_OpenPromptAlertWin(
  3079. PUBWIN_SOFTKEY_ONE, 
  3080. TXT_CMS_MMS_VIDEO_NOPIC, 
  3081. IMAGE_PROMPT_ICON_ALERT,
  3082. ALERT_TIMEOUT, 
  3083. PNULL
  3084. );
  3085. }
  3086. else
  3087. {
  3088. s_opt_menu_id = ID_MMS_INSERT_DPIC;
  3089. // Edit_OpenInsertDpicWin(win_id);
  3090. MMK_CreateWin( (uint32*)MMIMMS_EDIT_SELECT_IMAGE_WIN_TAB, (ADD_DATA)win_id);
  3091. }
  3092.             break;
  3093.         
  3094.         case MMIMMS_EDIT_RING_CTRL_ID:
  3095. if (g_peditdoc->slide_cur->audiosize !=0)
  3096. {
  3097. s_opt_menu_id = ID_MMS_EDIT_DEL_MUSIC;
  3098. PUBWIN_OpenPromptQueryWin(TXT_MMS_IF_DEL, IMAGE_PROMPT_ICON_QUERY);
  3099. }
  3100. else if (g_peditdoc->slide_cur->video_flag == 1)
  3101. {
  3102. PUBWIN_OpenPromptAlertWin(
  3103. PUBWIN_SOFTKEY_ONE, 
  3104. TXT_CMS_MMS_VIDEO_NOMUSIC, 
  3105. IMAGE_PROMPT_ICON_ALERT,
  3106. ALERT_TIMEOUT, 
  3107. PNULL
  3108. );
  3109. }
  3110. else
  3111. {
  3112. s_opt_menu_id = ID_MMS_EDIT_INSERT_MUSIC;
  3113. // Edit_OpenInsertDringWin(win_id);
  3114. MMK_CreateWin( (uint32*)MMIMMS_EDIT_SELECT_MUSIC_WIN_TAB, (ADD_DATA)win_id);
  3115. }
  3116.             break;
  3117. case MMIMMS_EDIT_VIDEO_CTRL_ID:
  3118. if (g_peditdoc->slide_cur->image_flag == 1)
  3119. {
  3120. PUBWIN_OpenPromptAlertWin(
  3121. PUBWIN_SOFTKEY_ONE, 
  3122. TXT_CMS_MMS_PIC_NOVIDEO, 
  3123. IMAGE_PROMPT_ICON_ALERT,
  3124. ALERT_TIMEOUT, 
  3125. PNULL
  3126. );
  3127. }
  3128. else if (g_peditdoc->slide_cur->audiosize != 0)
  3129. {
  3130. PUBWIN_OpenPromptAlertWin(
  3131. PUBWIN_SOFTKEY_ONE, 
  3132. TXT_CMS_MMS_MUSIC_NOVIDEO, 
  3133. IMAGE_PROMPT_ICON_ALERT,
  3134. ALERT_TIMEOUT, 
  3135. PNULL
  3136. );
  3137. }
  3138. else if (g_peditdoc->slide_cur->video_flag==1)
  3139. {
  3140. s_opt_menu_id = ID_MMS_EDIT_DEL_VIDEO;
  3141. PUBWIN_OpenPromptQueryWin(TXT_MMS_IF_DEL, IMAGE_PROMPT_ICON_QUERY);
  3142. }
  3143. else 
  3144. {
  3145. s_opt_menu_id = ID_MMS_EDIT_INSERT_VIDEO;
  3146. i_size_free = MMS_SIZE_OF_MESSAGE - g_peditdoc->totalsize;
  3147. if (i_size_free <= 0)
  3148. {
  3149. i_size_free = 0;
  3150. }
  3151. //添加视频接口
  3152. MMIMPEG4_SelectAndGetFile(i_size_free , win_id, 1);
  3153. //MMIMPEG4_OpenMPEG4WinForMms(INSERT_VIDEO_MAX_SIZE,win_id);//liangliu delete 2006-1-13 for a while.
  3154. }
  3155. break;
  3156.         
  3157.         case MMIMMS_EDIT_DEL_SLIDE_CTRL_ID:
  3158.             s_opt_menu_id = ID_MMS_EDIT_DEL_CUR_SLIDE;
  3159.             PUBWIN_OpenPromptQueryWin(TXT_MMS_DEL_SLIDE, IMAGE_PROMPT_ICON_QUERY);
  3160.             break;
  3161. case MMIMMS_EDIT_SELETENUM_CTRL_ID:
  3162. getwin_contrl_id = address_contrl_id;
  3163. //get address string 
  3164.             SCI_MEMSET( &addr_edit_string, 0, sizeof( TEXTEDIT_STRING_INFO_T ) );
  3165.             GUIEDITBOX_GetTextEditBoxInfo( getwin_contrl_id, &addr_edit_string);
  3166. addr_edit_string.str_ptr[addr_edit_string.str_len] = '';
  3167.             SCI_ASSERT(FALSE == addr_edit_string.is_ucs2);
  3168.             //parse the dest address
  3169. //            MMIMMS_ParseDestAddr(&addr_edit_string,g_mms_save_in_mem.to);  
  3170.             //open the number select win
  3171.             //需要获得当前允许输入的个数,调用pb接口窗口
  3172.         if(Edit_GetToAddTotalNumber() < MMIMMS_MAX_ADDRESS_NUM)//if( max_selected_num > 0 )
  3173.             {
  3174.                 max_selected_num = MMIMMS_MAX_ADDRESS_NUM - Edit_GetToAddTotalNumber();
  3175.                 //更新为新的pb接口
  3176. MMK_CreateWin((uint32*)MMIPB_GROUP_SEND_WIN_TAB, (ADD_DATA)max_selected_num);
  3177.             }
  3178.             else
  3179.             {
  3180.                 //Alert : list is full
  3181.                 PUBWIN_OpenPromptAlertWin(PUBWIN_SOFTKEY_ONE,
  3182.                                               TXT_SMS_FULL_LIST,
  3183.                                               IMAGE_PROMPT_ICON_ALERT,
  3184.                                               MMISMS_3SECOND, 
  3185.                                               PNULL);
  3186.             }
  3187. break;
  3188. case MMIMMS_EDIT_SELETENUM_MMSCC_CTRL_ID:
  3189. getwin_contrl_id = address_cc_contrl_id;
  3190. //get address string 
  3191.             SCI_MEMSET( &addr_edit_string, 0, sizeof( TEXTEDIT_STRING_INFO_T ) );
  3192.             GUIEDITBOX_GetTextEditBoxInfo( getwin_contrl_id, &addr_edit_string);
  3193. addr_edit_string.str_ptr[addr_edit_string.str_len] = '';
  3194.             SCI_ASSERT(FALSE == addr_edit_string.is_ucs2);
  3195.             //parse the dest address
  3196. //            MMIMMS_ParseDestAddr(&addr_edit_string,g_mms_save_in_mem.cc);  
  3197.             //open the number select win
  3198.             //需要获得当前允许输入的个数,调用pb接口窗口
  3199.         if(Edit_GetToAddTotalNumber() < MMIMMS_MAX_ADDRESS_NUM)//if( max_selected_num > 0 )
  3200.             {
  3201.                 max_selected_num = MMIMMS_MAX_ADDRESS_NUM - Edit_GetToAddTotalNumber();
  3202.                 //更新为新的pb接口
  3203.                 MMK_CreateWin((uint32*)MMIPB_GROUP_SEND_WIN_TAB, (ADD_DATA)max_selected_num);            
  3204.             }
  3205.             else
  3206.             {
  3207.                 //Alert : list is full
  3208.                 PUBWIN_OpenPromptAlertWin(PUBWIN_SOFTKEY_ONE,
  3209.                                               TXT_SMS_FULL_LIST,
  3210.                                               IMAGE_PROMPT_ICON_ALERT,
  3211.                                               MMISMS_3SECOND, 
  3212.                                               PNULL);
  3213.             }
  3214. break;
  3215.         case MMIMMS_EDIT_SELETENUM_MMSBCC_CTRL_ID:
  3216. getwin_contrl_id = address_bcc_contrl_id;
  3217.             {
  3218.                 //get address string 
  3219.                 SCI_MEMSET( &addr_edit_string, 0, sizeof( TEXTEDIT_STRING_INFO_T ) );
  3220.                 GUIEDITBOX_GetTextEditBoxInfo( getwin_contrl_id, &addr_edit_string);
  3221. addr_edit_string.str_ptr[addr_edit_string.str_len] = '';
  3222.                 SCI_ASSERT(FALSE == addr_edit_string.is_ucs2);
  3223.                 //parse the dest address
  3224.  //               MMIMMS_ParseDestAddr(&addr_edit_string,g_mms_save_in_mem.bcc);
  3225.                 
  3226.                 //open the number select win
  3227.                 //需要获得当前允许输入的个数
  3228.                 //调用pb接口窗口
  3229.                  //需要考虑当Edit_GetToAddTotalNumber() > MMIMMS_MAX_ADDRESS_NUM的情况
  3230.             if(Edit_GetToAddTotalNumber() < MMIMMS_MAX_ADDRESS_NUM)//if( max_selected_num > 0 )
  3231.                 {
  3232.                     max_selected_num = MMIMMS_MAX_ADDRESS_NUM - Edit_GetToAddTotalNumber();
  3233.                     //更新为新的pb接口
  3234.                     MMK_CreateWin((uint32*)MMIPB_GROUP_SEND_WIN_TAB, (ADD_DATA)max_selected_num);           
  3235.                 }
  3236.                 else
  3237.                 {
  3238.                     //Alert : list is full
  3239.                     PUBWIN_OpenPromptAlertWin(PUBWIN_SOFTKEY_ONE,
  3240.                                               TXT_SMS_FULL_LIST,
  3241.                                               IMAGE_PROMPT_ICON_ALERT,
  3242.                                               MMISMS_3SECOND, 
  3243.                                               PNULL);
  3244.                 }
  3245.             }
  3246.             break;
  3247.         default:
  3248.             break;
  3249.         }
  3250.         break;
  3251.    case MMI_PB_MULTI_SELECT_LIST_RETURN:
  3252.        {
  3253.            uint16             count = MMIPB_GetSelectedListCount();
  3254.            uint16             i     = 0;
  3255.            MMIPB_BCD_NUMBER_T number;
  3256.            uint8              tele_len = 0;
  3257.            MMI_STRING_T       email_addr;
  3258.    addr_list = PNULL;
  3259.    if(getwin_contrl_id == address_contrl_id)
  3260.    {
  3261.    addr_list = &(g_mms_save_in_mem.to);
  3262.    }
  3263.    else if(getwin_contrl_id == address_cc_contrl_id)
  3264.    {
  3265.    addr_list = &(g_mms_save_in_mem.cc);
  3266.    }
  3267.    else if(getwin_contrl_id == address_bcc_contrl_id)
  3268.    {
  3269.    addr_list = &(g_mms_save_in_mem.bcc);
  3270.    }
  3271.            if(count > 0)
  3272.            {    
  3273.                //get address string 
  3274.                SCI_MEMSET( &addr_edit_string, 0, sizeof( TEXTEDIT_STRING_INFO_T ) );
  3275.                GUIEDITBOX_GetTextEditBoxInfo( getwin_contrl_id, &addr_edit_string);
  3276.    addr_edit_string.str_ptr[addr_edit_string.str_len] = '';
  3277.                SCI_ASSERT(FALSE == addr_edit_string.is_ucs2);
  3278.            SCI_MEMSET(all_addr_str, 0, MMIMMS_MAX_ADDRESS_NUM*(MMIMMS_MAX_ADDRESS_LEN+2));
  3279.                SCI_MEMCPY(all_addr_str, addr_edit_string.str_ptr, addr_edit_string.str_len);
  3280.                all_addr_str_len = strlen((char*)all_addr_str);
  3281.            }
  3282.            else
  3283.            {
  3284.                   break;
  3285.            }
  3286.            
  3287.            for( i = 0; i < count; i++ )
  3288.            {
  3289.                uint8 max_len = 0;
  3290.                SCI_MEMSET(&number, 0, sizeof(number));
  3291.                SCI_MEMSET(&email_addr, 0, sizeof(email_addr));
  3292.                email_addr.str_ptr = cms_malloc(MMIPB_MAX_MAIL_LEN);
  3293.                SCI_MEMSET(email_addr.str_ptr, 0, MMIPB_MAX_MAIL_LEN);
  3294.                
  3295.                MMIPB_GetDetailInSelectedList(PNULL, &number, &email_addr, i);
  3296.                //judge returned is number or email
  3297.                if (number.number_len != 0)
  3298.                {
  3299.                    max_len = MIN( MMIMMS_MAX_ADDRESS_LEN, number.number_len);
  3300.                    tele_len = MMI_GenDispNumber(
  3301.                        MMIPB_GetNumberTypeFromUint8(number.npi_ton), 
  3302.                        max_len, 
  3303.                        number.number, 
  3304.                        tele_num, 
  3305.                        MMIMMS_MAX_ADDRESS_LEN + 2
  3306.                        );
  3307.                    
  3308.                    //judge if need to add comma char
  3309.                    if(0 != all_addr_str_len)
  3310.                    {
  3311.                        if(MMS_ADDRESS_SEPERATE_SYMBOL != all_addr_str[all_addr_str_len-1])
  3312.                        {
  3313.                            //add the comma char
  3314.                            all_addr_str[all_addr_str_len] = MMS_ADDRESS_SEPERATE_SYMBOL;
  3315.                            all_addr_str_len++;
  3316.                        }
  3317.                    }
  3318.                    
  3319.                    strcat((char*)all_addr_str, (char*)tele_num);
  3320.                    all_addr_str_len = strlen((char*)all_addr_str);
  3321.                    
  3322.                    //set the number to dest address
  3323.                    Edit_AddToAddr((uint8 *)tele_num,addr_list);
  3324.                }
  3325.                
  3326.                if (email_addr.length != 0)
  3327.                {
  3328.                    if (!email_addr.is_ucs2)
  3329.                    {
  3330.                        //judge if need to add comma char
  3331.                        if(0 != all_addr_str_len)
  3332.                        {
  3333.                            if(MMS_ADDRESS_SEPERATE_SYMBOL != all_addr_str[all_addr_str_len-1])
  3334.                            {
  3335.                                //add the comma char
  3336.                                all_addr_str[all_addr_str_len] = MMS_ADDRESS_SEPERATE_SYMBOL;
  3337.                                all_addr_str_len++;
  3338.                            }
  3339.                        }
  3340.                        
  3341.                        strcat((char*)all_addr_str, (char*)email_addr.str_ptr);
  3342.                        all_addr_str_len = strlen((char*)all_addr_str);
  3343.                        
  3344.                        //set the number to dest address
  3345.                        Edit_AddToAddr((uint8 *)email_addr.str_ptr,addr_list);
  3346.                    }
  3347.                }
  3348.                
  3349.                //free MMI_STRING_T.str_ptr
  3350.                cms_free(email_addr.str_ptr);
  3351.            }
  3352.            
  3353.            //update the address editbox
  3354.            GUIEDITBOX_SetTextEditBoxStringInfo(getwin_contrl_id, all_addr_str, all_addr_str_len, FALSE); 
  3355.    EditStringToGlobal(getwin_contrl_id,addr_list);
  3356.            
  3357.            break;
  3358.        }
  3359.        
  3360.     case MMI_PB_GROUP_SELECT_LIST_RETURN:
  3361.         {
  3362.             MMIPB_BCD_NUMBER_T    number;
  3363.             MMI_STRING_T        email_addr;
  3364.                 
  3365.             uint16    count = MMIPB_GetSelectedListCount();
  3366.             uint16    i = 0;
  3367.             uint8    tele_len = 0;
  3368.             uint8    max_len = 0;
  3369.             //clean former
  3370.             Edit_DeleteToAddrAll(addr_list);
  3371.             //fill newer
  3372.             if ( count > 0 )
  3373.             {
  3374. //get address string 
  3375.                SCI_MEMSET( &addr_edit_string, 0, sizeof( TEXTEDIT_STRING_INFO_T ) );
  3376.                GUIEDITBOX_GetTextEditBoxInfo( getwin_contrl_id, &addr_edit_string);
  3377.    addr_edit_string.str_ptr[addr_edit_string.str_len] = '';
  3378.                SCI_ASSERT(FALSE == addr_edit_string.is_ucs2);
  3379.            SCI_MEMSET(all_addr_str, 0, MMIMMS_MAX_ADDRESS_NUM*(MMIMMS_MAX_ADDRESS_LEN+2));
  3380.                SCI_MEMCPY(all_addr_str, addr_edit_string.str_ptr, addr_edit_string.str_len);
  3381.                all_addr_str_len = strlen((char*)all_addr_str);
  3382.                 for (i = 0; i < count; i++ )
  3383.                 {
  3384.                     SCI_MEMSET(&number, 0, sizeof(number));
  3385.                     SCI_MEMSET(&email_addr, 0, sizeof(email_addr));
  3386.                     email_addr.str_ptr = cms_malloc(MMIPB_MAX_MAIL_LEN);
  3387.                     SCI_MEMSET(email_addr.str_ptr, 0, MMIPB_MAX_MAIL_LEN);
  3388.                     if( MMIPB_GetDetailInSelectedList( PNULL, &number, &email_addr, i ))
  3389.                     {
  3390.                         if (number.number_len != 0)
  3391.                         {
  3392.                                max_len = MIN( MMIMMS_MAX_ADDRESS_LEN, number.number_len);
  3393.                                tele_len = MMI_GenDispNumber(
  3394.                                                 MMIPB_GetNumberTypeFromUint8(number.npi_ton), 
  3395.                                                 max_len, 
  3396.                                                 number.number, 
  3397.                                                 tele_num, 
  3398.                                                 MMIMMS_MAX_ADDRESS_LEN + 2
  3399.                                                 );
  3400. //judge if need to add comma char
  3401. if(0 != all_addr_str_len)
  3402. {
  3403. if(MMS_ADDRESS_SEPERATE_SYMBOL != all_addr_str[all_addr_str_len-1])
  3404. {
  3405. //add the comma char
  3406. all_addr_str[all_addr_str_len] = MMS_ADDRESS_SEPERATE_SYMBOL;
  3407. all_addr_str_len++;
  3408. }
  3409. }                  
  3410. strcat((char*)all_addr_str, (char*)tele_num);
  3411. all_addr_str_len = strlen((char*)all_addr_str);
  3412.                             Edit_AddToAddr((uint8 *)tele_num,addr_list);
  3413.                         }
  3414.                         if (email_addr.length != 0)
  3415.                         {
  3416.                             if (!email_addr.is_ucs2)
  3417.                             {
  3418.                                 Edit_AddToAddr(email_addr.str_ptr,addr_list);
  3419.                             }
  3420.                         }
  3421.                     }
  3422.                     //free
  3423.                     cms_free(email_addr.str_ptr);
  3424.                 }
  3425.                 // send the mms
  3426.      //           Send_CreateSendingWin(SEND_MMS_NORMAL);
  3427.             }
  3428. GUIEDITBOX_SetTextEditBoxStringInfo(getwin_contrl_id, all_addr_str, all_addr_str_len, FALSE); 
  3429. EditStringToGlobal(getwin_contrl_id,&g_mms_save_in_mem.to);
  3430.         }
  3431.         break;
  3432. #ifdef HAVE_MPEG4
  3433. case MSG_MPEG4_READ_FFS_DONE:
  3434. SCI_ASSERT(param != NULL);
  3435. SCI_TRACE_LOW("FNH enter MSG_MULTIM_SLEECTED_RETURN");
  3436. mpeg4_return_info_ptr = (MMIMPEG4_BUFFER_FILE_INFO_T *)param;
  3437. if ((PNULL == mpeg4_return_info_ptr->buf_ptr) || (0 == mpeg4_return_info_ptr->memory_size))
  3438. {
  3439. PUBWIN_OpenPromptAlertWin(
  3440. PUBWIN_SOFTKEY_ONE, 
  3441. TXT_MMS_EDIT_ADD_FAIL, 
  3442. IMAGE_PROMPT_ICON_WRONG, 
  3443. ALERT_TIMEOUT, 
  3444. PNULL
  3445. );
  3446. break;
  3447. }