⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wgui_categories_mms.c

📁 The font library converting tool MCT mainly introduces the process of the font formats to give us a
💻 C
📖 第 1 页 / 共 3 页
字号:
/*****************************************************************************
*  Copyright Statement:
*  --------------------
*  This software is protected by Copyright and the information contained
*  herein is confidential. The software may not be copied and the information
*  contained herein may not be used or disclosed except with the written
*  permission of MediaTek Inc. (C) 2005
*
*  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
*  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
*  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
*  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
*  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
*  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
*  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
*  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
*  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
*  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
*  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
*  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
*  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
*  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
*  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
*  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
*  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. 
*
*  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
*  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
*  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
*  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
*  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*****************************************************************************/

/*****************************************************************************
 *
 * Filename:
 * ---------
 *  wgui_categories_MMS.c
 *
 * Project:
 * --------
 *  MAUI
 *
 * Description:
 * ------------
 *  MMS related categories. 
 *
 *	 [Category275]			MMS SMIL editor
 *
 *  Note: Most MMS screens are located in mcu\wapadp\msf_ui\ instead of here.
 *
 * Author:
 * -------
 * -------
 *
 *============================================================================
 *             HISTORY
 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
 *------------------------------------------------------------------------------
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 *------------------------------------------------------------------------------
 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
 *============================================================================
 ****************************************************************************/

#define __NEWSIMULATOR 
#include "MMI_features.h"
#include "StdC.h"
#include "L4Dr1.h"


/* framework related include */
#include "EventsGprot.h"
#include "GlobalDefs.h"
#include "FrameworkStruct.h"
#include "EventsDef.h"
#include "Unicodexdcl.h"
#include "DebugInitDef.h"

/* gui related include */
#include "gui_themes.h"
#include "wgui.h"
#include "wgui_softkeys.h"
#include "wgui_categories.h"
#include "wgui_categories_defs.h"
#include "wgui_categories_inputs.h"
#include "wgui_categories_MMS.h"
#include "wgui_draw_manager.h"
#if defined(__MMI_TOUCH_SCREEN__)
#include "EditorPen.h"
#endif

#if defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__)
/* under construction !*/
#endif

#undef __NEWSIMULATOR 

#if defined(__MMI_SMART_MESSAGE_MT__) || (defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__))
/* under construction !*/
/* under construction !*/
#endif

#ifdef __MMI_T9__
#include "T9Main.h" /* T9SynT9WithInputBox() */
extern void InuptMethodEnterCategory5(void);
#elif defined __MMI_ZI__
extern void ZiInuptMethodEnterCategory5(void);
#elif defined __MMI_KA__
extern void KonkaInuptMethodEnterCategory5(void);
#elif defined __MMI_ITAP__
extern void ItapInuptMethodEnterCategory5(void);
#elif defined __MMI_GB__  //InuptMethodEnterCategory5
#include "gb_wrapper.h"
#endif
 
extern void dm_set_scr_bg_image_no_draw(U16 image_id, S8* file_name, S32 x, S32 y, U8 opacity);//092005 grayscale Calvin
 
/***************************************************************************** 
* Define
*****************************************************************************/
#if defined(__MMI_MAINLCD_240X320__)
#define CAT275_MIN_LINE_HEIGHT			(26)
#elif defined(__MMI_MAINLCD_176X220__)
#define CAT275_MIN_LINE_HEIGHT			(20)
#elif defined(__MMI_MAINLCD_128X160__)
#define CAT275_MIN_LINE_HEIGHT			(19)
#else
/* However, category 275 should not be used on 128x128 display */
#define CAT275_MIN_LINE_HEIGHT			(19)
#endif

/***************************************************************************** 
* Typedef 
*****************************************************************************/

typedef struct
{
	U32 identifier;
	mmi_wgui_cat275_draw_title_hdlr draw_title_fp;
	mmi_wgui_cat275_draw_area_hdlr draw_area_1_fp; 
	mmi_wgui_cat275_draw_area_hdlr draw_area_2_fp; 
	S16 draw_area_1_height;
	S16 draw_area_2_height;
	UI_filled_area *backup_normal_filler;	/* normal filler of editor */
	UI_filled_area *backup_multitap_filler;
} mmi_gui_cat275_context_struct;

/***************************************************************************** 
* Local Variable
*****************************************************************************/

static mmi_gui_cat275_context_struct *g_mmi_gui_cat275_context_p;

static BOOL g_mmi_gui_cat275_modified;

#define CAT275_CTX 			(g_mmi_gui_cat275_context_p)

static UI_filled_area g_mmi_gui_cat275_editor_filler=
{	UI_FILLED_AREA_TYPE_COLOR | UI_FILLED_AREA_BORDER,
	NULL,
	NULL,
	{	255,255,255,100	},
	{	0,0,0,0				},
	{	0,0,0,0				},
	{	0,0,0,0				},
	0
};

static UI_filled_area g_mmi_gui_cat275_multitap_filler=
{	UI_FILLED_AREA_TYPE_COLOR,
	NULL,
	NULL,
	{	255,255,255,100	},
	{	0,0,0,0				},
	{	0,0,0,0				},
	{	0,0,0,0				},
	0
};

/* 070505 Calvin Start */
#if defined (__MMI_WALLPAPER_ON_BOTTOM__)
static UI_image_ID_type editor_scr_bg_ID;
static S8* editor_scr_bg_filename;
static S32 editor_scr_bg_x, editor_scr_bg_y;
static U8 editor_scr_bg_opacity;//070505 Calvin added
#endif
/* 070505 Calvin End */


/***************************************************************************** 
* Local Function
*****************************************************************************/

static color category275_get_multitap_color(void)
{
	color c = *(current_MMI_theme->information_bar_color);

	if (c.r <= 215) c.r += 40; else c.r = 255;
	if (c.g <= 215) c.g += 40; else c.g = 255;
	if (c.b <= 215) c.b += 40; else c.b = 255;

	c.alpha = 100;
	return c;
}

/* c.f. category5_hide_multitap */
static void category275_hide_multitap(void)
{
	/* We fill the multitap bar across the screen instead of using MMI_multitap_x & MMI_multitap_width*/
	color c;

	pixtel_UI_lock_double_buffer();

/* 101805 multitap Calvin Start */
	//c = category275_get_multitap_color();
#ifdef __MMI_DEFAULT_THEME_3__
	c.r=206;
	c.g=206;
	c.b=206;
#else
	c.r=255;
	c.g=255;
	c.b=255;
#endif
	c.alpha=100;
/* 101805 multitap Calvin End */
	
	pixtel_UI_reset_clip();
	//W05.45 Adjust the height of multitap to avoid the overlap with soft key
	pixtel_UI_fill_rectangle(0,MMI_multitap_y,UI_device_width - 1,MMI_multitap_y+MMI_multitap_height-1,c);

	pixtel_UI_unlock_double_buffer();
	pixtel_UI_BLT_double_buffer(0, MMI_multitap_y, UI_device_width - 1, MMI_multitap_y+MMI_multitap_height+1);
}


static void category275_header_callback(s32 yoffset, s32 clip_x1, s32 clip_y1, s32 clip_x2, s32 clip_y2)
{
	if (CAT275_CTX)
	{
		CAT275_CTX->draw_area_1_fp(CAT275_CTX->identifier, yoffset, clip_x1, clip_y1, clip_x2, clip_y2);
	}
}


static void category275_footer_callback(s32 yoffset, s32 clip_x1, s32 clip_y1, s32 clip_x2, s32 clip_y2)
{
	if (CAT275_CTX)
	{
		CAT275_CTX->draw_area_2_fp(CAT275_CTX->identifier, yoffset, clip_x1, clip_y1, clip_x2, clip_y2);	
	}
}

static void category275_change_callback(void)
{
	g_mmi_gui_cat275_modified = TRUE;
}


/* We need to sync with T9 internal state */
static void category275_sync_with_T9(void)
{
#ifdef __MMI_T9__
	switch(MMI_current_input_type & INPUT_TYPE_MASK)
	{
     case INPUT_TYPE_TR_BOPOMO:
     case INPUT_TYPE_SM_PINYIN:
     case INPUT_TYPE_TR_STROKE:
     case INPUT_TYPE_SM_STROKE:
     case INPUT_TYPE_SMART_UPPERCASE_ABC:
     case INPUT_TYPE_SMART_LOWERCASE_ABC:
     case INPUT_TYPE_TR_MULTITAP_BOPOMO:
     case INPUT_TYPE_SM_MULTITAP_PINYIN:

#if defined(__MMI_T9_SPANISH__)
     case INPUT_TYPE_SMART_UPPERCASE_SPANISH:
     case INPUT_TYPE_SMART_LOWERCASE_SPANISH:
#endif
//PMT VIKASG START 20050729
#if defined(__MMI_T9_DANISH__)
     case INPUT_TYPE_SMART_UPPERCASE_DANISH:
     case INPUT_TYPE_SMART_LOWERCASE_DANISH:
#endif
//PMT VIKASG END 20050729
//PMT CZ_PO_TU START 20050812	
#if defined(__MMI_T9_POLISH__)
     case INPUT_TYPE_SMART_UPPERCASE_POLISH:
     case INPUT_TYPE_SMART_LOWERCASE_POLISH:
#endif
//PMT CZ_PO_TU END 20050812	

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -