/****************************************************************************
** File Name: mmimms_wintable.c *
** Author: *
** Date: 2004.8.23 *
** Copyright: 2004 Spreatrum, Incoporated. All Rights Reserved. *
** Description: This file is used to describe the MMS *
****************************************************************************
** Important Edit History *
** ------------------------------------------------------------------------*
** DATE NAME DESCRIPTION *
** 2004.8 Bruce.Chi Create
**
****************************************************************************/
/**---------------------------------------------------------------------------*
** Include Files *
**---------------------------------------------------------------------------*/
#include "window_parse.h"
#include "mmk_app.h"
#include "im.h"
#include "guicommon.h"
#include "guimenu.h"
#include "guieditbox.h"
#include "guilistbox.h"
#include "guimsgbox.h"
#include "mmi_menutable.h"
#include "mmi_id.h"
#include "mmi_text.h"
#include "mmi_image.h"
#include "mmi_pubwin.h"
#include "mmidisplay_data.h"
#include "mainapp.h"
#include "ccapp.h"
#include "tb_dal.h"
#include "guilabel.h"
#include "guitextbox.h"
#include "guibutton.h"
#include "mmipb.h"
#include "mmipb_wintab.h"
#include "mmiset.h"
#include "mmimms_internal.h"
#include "mmk_timer.h"
#include "ccapp.h"
#include "mmi_common.h"
#include "mmi_default.h"
#include "mmismsapp_wintab.h"
#include "mmidc.h"
#include "mmi_appmsg.h"
#include "mmimms.h"
//cr36254 jian.ma start
#include "mmk_type.h"
#include "mmi_message.h"
#include "mmiivr.h"
#include "mmiset.h"
#include "mmiphone.h"
#include "mmimb.h"
#include "mmi_pubwin.h"
#include "mmibrowser.h"
#include "mmibrowser_internal.h"
#include "tempX.h"
#include "Cms_MMSDoc.h"
#include "Cms_MMSProvide.h"
#include "Cms_WAPMain.h"
#include "Cms_MMSFilefunc.h"
#include "mms_text.h"
#include "mms_anim.h"
#include "mmimpeg4.h"
#include "mmimp3.h"
#include "mmi_modu_main.h"
#include "MakeDrvInc.h"
/**--------------------------------------------------------------------------*
** MACRO DEFINITION *
**--------------------------------------------------------------------------*/
#define MMIMMS_FILL_RECT()\
{\
GUI_RECT_T rect;\
rect.left = MMIMMS_FULLSCREEN_CLIENT_LEFT;\
rect.top = MMIMMS_FULLSCREEN_CLIENT_TOP;\
rect.right = MMIMMS_FULLSCREEN_CLIENT_RIGHT;\
rect.bottom = MMIMMS_FULLSCREEN_CLIENT_BOTTOM;\
LCD_FillRect(0, rect, MMI_WHITE_COLOR);\
}
#define MATH_ABS(x) ((x) < 0 ? ((x) * (-1)) : (x))
#define TITLE_HEIGHT MMI_TITLE_HEIGHT
#define SK_HEIGH MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT
#define LABEL_HEIGHT 16
#define EDIT_FULL_X1 0
#define EDIT_FULL_Y1 TITLE_HEIGHT
#define EDIT_FULL_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
#define EDIT_FULL_Y2 MMI_INPUT_EDITBOX_BOTTOM
#define EDIT_HALF_X1 0
#define EDIT_HALF_Y1 TITLE_HEIGHT
#define EDIT_HALF_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
#define EDIT_HALF_Y2 MMI_INPUT_EDITBOX_BOTTOM/2
#define EDIT_1LINE_X1 10//0
#define EDIT_1LINE_Y1 40//TITLE_HEIGHT
#define EDIT_1LINE_X2 120//MMI_MAINSCREEN_RIGHT_MAX_PIXEL
#define EDIT_1LINE_Y2 80//40
#define EDIT_3LINE_X1 10
#define EDIT_3LINE_Y1 40
#define EDIT_3LINE_X2 120
#define EDIT_3LINE_Y2 87//80
#define MENU_X1 0
#define MENU_Y1 0
#define MENU_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
#define MENU_Y2 MMI_CLIENT_RECT_BOTTOM
#define LIST_X1 0
#define LIST_Y1 TITLE_HEIGHT
#define LIST_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
#define LIST_Y2 (MMI_MAINSCREEN_BOTTOM_MAX_PIXEL - SK_HEIGH)
#define LABEL_X1 0
#define LABEL_Y1 (MMI_CLIENT_RECT_BOTTOM - LABEL_HEIGHT)
#define LABEL_X2 (MMI_MAINSCREEN_RIGHT_MAX_PIXEL - 4 * LABEL_HEIGHT)
#define LABEL_Y2 (LABEL_Y1 + LABEL_HEIGHT)
#define CONTENT_EDIT_X1 0
#define CONTENT_EDIT_Y1 (MMI_TITLE_HEIGHT+4*MMI_LIST_ITEM_HEIGHT)
#define CONTENT_EDIT_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
#define CONTENT_EDIT_Y2 (MMI_CLIENT_RECT_BOTTOM-LABEL_HEIGHT-1)
#define PREVIEW_TEXT_X1 0
#define PREVIEW_TEXT_Y1 (MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT)
#define PREVIEW_TEXT_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
#define PREVIEW_TEXT_Y2 MMI_CLIENT_RECT_BOTTOM
#define MEMSTATE_LABEL5_X1 0
#define MEMSTATE_LABEL5_Y1 (MEMSTATE_LABEL4_Y2)
#define MEMSTATE_LABEL5_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
#define MEMSTATE_LABEL5_Y2 (MEMSTATE_LABEL5_Y1 + MEMSTATE_LABEL_HEIGH)
//liangl added 2005-10-25 for mms detail show
#define MEMSTATE_TEXTBOX_X1 0
#define MEMSTATE_TEXTBOX_Y1 (MEMSTATE_LABEL4_Y2)
#define MEMSTATE_TEXTBOX_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
#define MEMSTATE_TEXTBOX_Y2 MMI_MAINSCREEN_BOTTOM_MAX_PIXEL -TITLE_HEIGHT
//fnh add 20060512
#define MMS_DETAIL_LEFT 0
#define MMS_DETAIL_TOP MMI_TITLE_HEIGHT
#define MMS_DETAIL_WIDTH (MMI_MAINSCREEN_WIDTH - 1)
#define MMS_DETAIL_HEIGHT (MMI_MAINSCREEN_HEIGHT - 1 - MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT)
#define MMI_1SECONDS 1000 //1000毫秒
#define WAITING_ANIM_X1 0
#define WAITING_ANIM_Y1 TITLE_HEIGHT
#define WAITING_ANIM_X2 1
#define WAITING_ANIM_Y2 (TITLE_HEIGHT + 1)
#define MMIMMS_RENAME_RECT_LEFT 4
#define MMIMMS_RENAME_RECT_TOP 78//58
#define MMIMMS_RENAME_RECT_RIGHT 172//125
#define MMIMMS_RENAME_RECT_BOTTOM 110//90
#define WAITING_TEXT_X1 0
#define WAITING_TEXT_Y1 94
#define WAITING_TEXT_X2 127
#define WAITING_TEXT_Y2 109
#define ALERT_SEND_DOWNLOAD_RESULT_TIMEOUT (6*1000)
#define TIME_3SECONDS 3000//3 second
#define TIME_6SECONDS 6000//6 second
#define PREVIEW_LABEL_SLIDE_LEFT 0//90
#define PREVIEW_LABEL_SIZE_LEFT 95
#define PREVIEW_LABEL_SLIDE_RIGHT 35
#define PREVIEW_LABEL_LEFT (MMI_MAINSCREEN_RIGHT_MAX_PIXEL - 20)
#define PREVIEW_LABEL_TOP MMI_TITLE_HEIGHT
//fnh add begin
#define TWOLINEHEIGHT 35
#define LABEL_CUR_X1 0
#define LABEL_CUR_Y1 0
#define LABEL_CUR_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
#define LABEL_CUR_Y2 TITLE_HEIGHT
#define LABEL_TEXT_X1 0
#define LABEL_TEXT_Y1 MMI_MAINSCREEN_HEIGHT - MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-TWOLINEHEIGHT
#define LABEL_TEXT_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
#define LABEL_TEXT_Y2 MMI_MAINSCREEN_HEIGHT - MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT
#define IMAGE_RECT_X1 0
#define IMAGE_RECT_Y1 TITLE_HEIGHT
#define IMAGE_RECT_X2 MMI_MAINSCREEN_RIGHT_MAX_PIXEL
#define IMAGE_RECT_Y2 MMI_MAINSCREEN_HEIGHT - MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT-TWOLINEHEIGHT
//fnh add end
//fnh add begin
#define MMIMMS_FULLSCREEN_CLIENT_LEFT 0
#define MMIMMS_FULLSCREEN_CLIENT_TOP MMI_TITLE_HEIGHT
#define MMIMMS_FULLSCREEN_CLIENT_BOTTOM (MMI_MAINSCREEN_BOTTOM_MAX_PIXEL - MMI_FULLSCREEN_SOFTKEY_BAR_HEIGHT)
#define MMIMMS_FULLSCREEN_CLIENT_RIGHT MMI_MAINSCREEN_RIGHT_MAX_PIXEL
#define MMS_MAX_FILE_NAME_LENGTH 128
#define MMIMMS_SINGLE_PHONENUMBE_LEFT 10
#define MMIMMS_SINGLE_PHONENUMBE_TOP 40
#define MMIMMS_SINGLE_PHONENUMBE_RIGHT 120
#define MMIMMS_SINGLE_PHONENUMBE_BOTTOM 80
#define MMIMMS_SET_ONTIME_LEFT 0//28
#define MMIMMS_SET_ONTIME_TOP (MMI_TITLE_HEIGHT+1)//68
#define MMIMMS_SET_ONTIME_RIGHT MMI_MAINSCREEN_RIGHT_MAX_PIXEL//99
#define MMIMMS_SET_ONTIME_BOTTOM (MMI_TITLE_HEIGHT+MMI_LIST_ITEM_HEIGHT)//100
#define MMIMMS_3SECOND 3000
#define MMIMMS_RANDOM_FILE_NAME_MAX_LEN 20
#define INSERT_VIDEO_MAX_SIZE 100*1024 //临时的大小,增加视频。
#define MMS_ADDRESS_SEPERATE_SYMBOL ','
#ifndef ALERT_TIMEOUT
#define ALER