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

📄 wgui_inline_edit.c

📁 The font library converting tool MCT mainly introduces the process of the font formats to give us a
💻 C
📖 第 1 页 / 共 5 页
字号:
/* 041205 Calvin end */

/*MTK Terry for 0x81 encoding support for Phone Book */
extern S16 MMI_current_input_ext_type;
extern byte MMI_allow_only_english_input_modes;

//MTK Add By Elvis for T9Init declare
/*
   #ifdef __MMI_T9__
   extern void (*t9_inputbox_LSK_function)(void);
   extern void InuptMethodEnterCategory5(void);
   //MTK Elvis 20040521 ---patch for inline multiline input box
   //Leo 0530extern void InuptMethodEnterInlineMultilineScreen(void);
   //MTK end
   #elif defined __MMI_ZI__
   extern void (*zi_inputbox_LSK_function)(void);
   extern void ZiInuptMethodEnterCategory5(void);
   #elif defined __MMI_KA__
   extern void (*ka_inputbox_LSK_function)(void);
   extern void KonkaInuptMethodEnterCategory5(void);
   #elif defined __MMI_ITAP__
   extern void (*itap_inputbox_LSK_function)(void);
   extern void ItapInuptMethodEnterCategory5(void);
   #endif
 */
//MTK end
#ifdef __MMI_T9__
#include "t9definition.h"
#include "t9api.h"
extern void T9SetInputboxLSKFunction(FuncPtr f);
extern void InuptMethodEnterCategory5(void);
extern void InuptMethodExitCategory5(void);
extern void T9InputMethodExit(void);
#elif defined __MMI_ZI__
extern void ZiSetInputboxLSKFunction(FuncPtr f);
extern void ZiInuptMethodEnterSinglelineInputBox(void);
extern void ZiInuptMethodExitSinglelineInputBox(void);
extern void ZiInuptMethodEnterCategory5(void);
extern void ZiInuptMethodExitCategory5(void);
extern void ZiInputMethodExit(void);
#elif defined __MMI_KA__
extern void KonKaSetInputboxLSKFunction(FuncPtr f);
extern void KonkaInuptMethodEnterSinglelineInputBox(void);
extern void KonkaInuptMethodExitSinglelineInputBox(void);
extern void KonkaInuptMethodEnterCategory5(void);
extern void KonkaInuptMethodExitCategory5(void);
extern void KonkaInputMethodExit(void);
#elif defined __MMI_ITAP__
extern void ItapSetInputboxLSKFunction(FuncPtr f);

#include "iTapHmiDef.h"
#include "iTapHmiStruct.h"
#include "iTapHmiGprot.h"
#elif defined(__MMI_GB__)
#include "gb_wrapper.h"

#endif


//MTK Elvis for multitap zero key
#ifdef __MMI_MULTITAP_KEY_0__
#define ENABLE_DIALER_ZERO_KEY_MULTITAP				1	//0
#else
#define ENABLE_DIALER_ZERO_KEY_MULTITAP				0
#endif
//MTK end

/* Amount of time (milliseconds) to wait before displaying the
   current input method pop up for inline text edit items               */
#define INLINE_INPUT_METHOD_DISPLAY_WAIT			(1000)

/* Amount of time (milliseconds) to display the current input method    */
#define INLINE_INPUT_METHOD_HIDE_WAIT				(2000)

/*----------------------------------------------------------------------------
	Inline edit data
----------------------------------------------------------------------------*/

/* 072904 Calvin moved for centralized control */
//#define ENABLE_INLINE_SINGLELINE_INPUTBOX_FRAME_SKIPPING  1
/* Calvin end */

/* History IDs for inline items  */

#define INLINE_TEXT_EDIT_HISTORY_ID						1
#define INLINE_SELECT_HISTORY_ID							3
#define INLINE_USER_DEFINED_SELECT_HISTORY_ID		4
#define INLINE_DATE_HISTORY_ID							5
#define INLINE_TIME_HISTORY_ID							6
#define INLINE_DOW_SELECT_HISTORY_ID					7
#define INLINE_TIME_PERIOD_HISTORY_ID					8
#define INLINE_IP4_HISTORY_ID								9
#define INLINE_FULL_SCREEN_EDIT_HISTORY_ID			10
#define INLINE_MULTI_LINE_EDIT_HISTORY_ID			   11
#define INLINE_COLOR_SELECT_SCREEN_ID					12

wgui_inline_item wgui_inline_items[MAX_INLINE_ITEMS];
wgui_inline_item *current_wgui_inline_item = NULL;

//Start Yogesh 20040816 
extern pBOOL flag_use_current_input_type;

//End Yogesh 20040816   
//PMT VIKAS START 20050707    
#ifdef __MMI_UI_DALMATIAN_FIXEDLIST__
extern void pixtel_UI_disable_inline_bottom_line_draw(void);
extern void pixtel_UI_enable_inline_bottom_line_draw(void);

extern void pixtel_UI_enable_fixed_list_line_draw();
extern void pixtel_UI_disable_fixed_list_line_draw(void);
extern BOOL line_draw;
#endif
//PMT VIKAS END 20050707
S32 wgui_n_inline_items = 0;
S32 wgui_inline_item_highlighted_index = -1;
S32 wgui_inline_item_key_code = -1;
S32 wgui_inline_item_key_event = -1;
S32 wgui_inline_item_x = 0;
S32 wgui_inline_item_y = 0;
S32 wgui_inline_item_width = 0;
S32 wgui_inline_item_height = 0;
byte wgui_inline_item_handled = 0;
S32 wgui_current_inline_item_type = 0;
U8 *wgui_current_history_buffer = NULL;
byte wgui_disable_inline_input_method_hints = 1;

#if defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__)
S8 MMI_multi_line_inputbox_present = 0;
#endif

/* Added to handle (Back/Done) on RSK  */
byte wgui_inline_list_menu_changed = 0;
byte wgui_inline_list_menu_disable_done = 0;
void (*wgui_inline_edit_BACK_function) (void) = NULL;
void (*wgui_inline_edit_DONE_function) (void) = NULL;
void (*wgui_inline_edit_LSK_function) (void) = NULL;

extern UI_single_line_input_box_theme date_time_input_theme;
extern UI_filled_area date_time_input_background_filler;
extern UI_filled_area time_period_input_background_filler;

extern void set_current_input_box_type(mmi_editor_inoutbox_enum input_box_type);

#define MAX_INLINE_TEXT_EDIT_ITEMS							15
#define MAX_INLINE_TEXT_EDIT_BUFFER_SIZE					124	//For Email
//Pixtel - Gurinder - 3/24/2004 To Support Signature Control.
#define MAX_INLINE_FULL_SCREEN_TEXT_EDIT_BUFFER_SIZE		402


S32 n_inline_text_edit_items = 0;
S8 inline_multiline_complete = 0;
wgui_inline_item_text_edit wgui_inline_text_edit_items[MAX_INLINE_TEXT_EDIT_ITEMS];
U8 inline_text_edit_mask_buffers[MAX_INLINE_TEXT_EDIT_ITEMS][MAX_INLINE_TEXT_EDIT_BUFFER_SIZE];
UI_string_type inline_full_screen_edit_saved_title = (UI_string_type) NULL;
UI_string_type inline_full_screen_edit_saved_LSK_label = (UI_string_type) NULL;
UI_string_type inline_full_screen_edit_saved_RSK_label = (UI_string_type) NULL;
UI_image_type inline_full_screen_edit_saved_LSK_icon = (UI_image_type) NULL;
UI_image_type inline_full_screen_edit_saved_RSK_icon = (UI_image_type) NULL;
UI_image_type inline_full_screen_edit_saved_title_icon = (UI_image_type) NULL;
byte inline_full_screen_edit_changed = 0;
wgui_inline_item_text_edit *current_wgui_inline_text_edit_item;
U8 **current_wgui_inline_text_edit_text_p;
U8 wgui_inline_full_screen_text_edit_buffer[MAX_INLINE_FULL_SCREEN_TEXT_EDIT_BUFFER_SIZE];

void handle_inline_full_screen_edit_cancel(void);
void inline_edit_prepare_mask_buffer(U8 *, U8 *);
void wgui_inline_edit_handle_multiline_inputbox_input(void);
void handle_inline_full_screen_edit_complete(void);
void handle_inline_full_screen_edit_close(void);
void wgui_inline_edit_default_list_highlight_handler(S32 item_index);

/** New Image Text Control ***/
#if defined __MMI_PLUTO_GPRS__

#define MAX_INLINE_IMAGE_TEXT_ITEMS							10
//Issue: Email: 144 - Gurinder 30/4/2004
#define	IMAGE_TEXT_CONTROL_TEXT_X			26
#define	IMAGE_TEXT_CONTROL_TEXT_WIDTH		83


U8 inline_scroll_flag = FALSE;
S32 image_text_control_scroll_x = 0;
scrolling_text wgui_inline_scroll_text;
UI_image_type inline_last_image = NULL;
S32 inline_y_pos_image = 0;
U8 inline_image_text_edit_flag = 0;

void draw_image_text_control(wgui_inline_image_text * control, S32 x1, S32 y1, S32 iwidth, S32 iheight,
									  UI_image_type image1, UI_image_type image2, UI_image_type image3, U8 * text,
									  U8 highlight_flag);
void wpixtel_UI_show_image_text_item(S32 x1, S32 y1, S32 iwidth, S32 iheight, wgui_inline_item * item);
wgui_inline_image_text wgui_inline_image_text_items[MAX_INLINE_IMAGE_TEXT_ITEMS];
wgui_inline_image_text *current_image_text_control = NULL;
S32 n_inline_image_text = 0;
void handle_inline_full_screen_edit(S32 x, S32 y, S32 width, S32 height, S32 key_code, S32 key_event, U8 ** text_p,
												void *item, dword flags, U8 * history_buffer);
void handle_inline_full_screen_imagetext_edit(S32 x, S32 y, S32 width, S32 height, S32 key_code, S32 key_event,
															 U8 ** text_p, void *item, dword flags, U8 * history_buffer);

#endif //__MMI_PLUTO_GPRS__


#ifdef __MMI_TOUCH_SCREEN__

typedef enum
{
	/* Ignore pen events */
	WGUI_INLINE_PEN_HANDLER_NONE,
	/* Prepare to change highlight on Pen Up. Do nothing else. */
	WGUI_INLINE_PEN_HANDLER_SWITCH_ITEM,
	/* Redirect pen events to scrollbar */
	WGUI_INLINE_PEN_HANDLER_SCROLLBAR,
	/* Redirect pen events to the current menu item */
	WGUI_INLINE_PEN_HANDLER_CURRENT_ITEM,
	/* Wait long press animation to invoke LSK */
	WGUI_INLINE_PEN_HANDLER_WAIT_LONGPRESS,
	/* Redirect pen events to fullscreen editor */
	WGUI_INLINE_PEN_HANDLER_FULLSCREEN_EDITOR
} wgui_inline_pen_handler_type_enum;

static wgui_inline_pen_handler_type_enum wgui_inline_pen_handler_type;
static S32 wgui_inline_pen_down_item_index;

static BOOL(*wgui_current_inline_item_pen_function) (mmi_pen_event_type_enum pen_event, S16 x, S16 y,
																	  mmi_gui_inline_item_pen_enum * item_event) =
	UI_dummy_inline_item_pen_function;

#endif /* __MMI_TOUCH_SCREEN__ */

/* 101105 inline Calvin Start */
#if defined (__MMI_WALLPAPER_ON_BOTTOM__)
static UI_image_ID_type inline_edit_scr_bg_ID;
static S8 *inline_edit_scr_bg_filename;
static S32 inline_edit_scr_bg_x, inline_edit_scr_bg_y;
static U8 inline_edit_scr_bg_opacity;
#endif
/* 101105 Calvin End */

extern icontext_button MMI_softkeys[];

/* MTK Leo start 20051001, for sending inline items' change notify to application */
static void (*inline_item_changed_handler) (U16 index);

/* MTK Leo end */

/************************/
void redraw_inline_full_screen_edit(void);

void inline_edit_phone_number_input_complete_multitap_star_key(void);

//MTK Elvis
void inline_edit_phone_number_input_complete_multitap_zero_key(void);

//MTK Elvis

void cat57_virtual_keypad_callback(void);

/* Used to highlight the same item again after editing (ex: After return from full screen edit  */
void (*inline_edit_current_highlight_handler) (S32 item_index) = MMI_dummy_highlight_handler;

UI_filled_area temp_inline_list_menu_background_filler = {
	UI_FILLED_AREA_TYPE_COLOR,
	UI_NULL_IMAGE,
	NULL,
	//MTK Leo modify 0912
#ifdef	__MMI_DEFAULT_THEME_3__
	{206, 206, 206, 100},
#else
	{240, 240, 240, 100},
#endif
	//MTK Leo end
	{0, 0, 0, 0},
	{0, 0, 0, 100},
	{0, 0, 0, 0},
	0
};

UI_filled_area temp_inline_list_menu_normal_item_filler = { UI_FILLED_AREA_TYPE_COLOR,
	UI_NULL_IMAGE,
	NULL,
	//MTK Leo modify 0912
#ifdef	__MMI_DEFAULT_THEME_3__
	{206, 206, 206, 100},
#else
	{240, 240, 240, 100},
#endif
	//MTK Leo end
	{0, 0, 0, 0},
	{0, 0, 0, 0},
	{0, 0, 0, 0},
	0
};

UI_filled_area temp_inline_list_menu_selected_item_filler = { UI_FILLED_AREA_TYPE_COLOR,
	UI_NULL_IMAGE,
	NULL,
	//MTK Leo modify 0912
#ifdef	__MMI_DEFAULT_THEME_3__
	{255, 255, 255, 100},
#else
	{167, 232, 93, 100},
#endif
	//MTK Leo end
	{0, 0, 0, 0},
	{0, 0, 0, 0},
	{0, 0, 0, 0},
	0
};

UI_filled_area temp_inline_list_menu_disabled_item_filler = { UI_FILLED_AREA_TYPE_COLOR,
	UI_NULL_IMAGE,
	NULL,
	{192, 192, 192, 100},
	{0, 0, 0, 0},
	{0, 0, 0, 0},
	{0, 0, 0, 0},
	0
};

UI_fixed_list_menu_theme wgui_inline_fixed_list_menu_theme = { &temp_inline_list_menu_background_filler,
	&temp_inline_list_menu_background_filler,
	5,
	UI_LIST_MENU_LOOP
};

UI_fixed_icontext_menuitem_theme wgui_inline_fixed_icontext_menuitem_theme =
	{ &temp_inline_list_menu_normal_item_filler,
	&temp_inline_list_menu_disabled_item_filler,
	&temp_inline_list_menu_selected_item_filler,
	&temp_inline_list_menu_selected_item_filler,
	{0, 0, 0, 100},
	{0, 0, 0, 100},
	{0, 0, 0, 100},
	{0, 0, 0, 100},
	&MMI_default_font,
	UI_MENUITEM_CENTER_TEXT_Y | UI_MENUITEM_CENTER_ICON_Y
};

UI_filled_area temp_inline_select_menu_filler = { UI_FILLED_AREA_TYPE_COLOR,
	NULL,
	NULL,
	{71, 127, 255, 100},
	{0, 0, 0, 0},
	{0, 0, 0, 100},
	{0, 0, 0, 0},
	0
};

UI_horizontal_select_theme temp_inline_select_menu_theme = { &temp_inline_select_menu_filler,
	UI_HORIZONTAL_SELECT_LOOP,
};

UI_fixed_text_menuitem_theme wgui_inline_select_fixed_text_menuitem_theme = { &temp_inline_list_menu_normal_item_filler,
	&temp_inline_list_menu_disabled_item_filler,
	&temp_inline_list_menu_selected_item_filler,
	&temp_inline_list_menu_selected_item_filler,
	{0, 0, 0, 100},
	{0, 0, 0, 100},
	{0, 0, 0, 100},
	{0, 0, 0, 100},
	&MMI_default_font,
	UI_MENUITEM_CENTER_TEXT_Y
};

/*PMT  MANISH  START  20050722 */
#ifdef __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__
byte wgui_enable_inline_item_default_text = 0;

UI_filled_area temp_inline_edit_normal_filler =
	{ UI_FILLED_AREA_TYPE_COLOR | UI_FILLED_AREA_SINGLE_BORDER | UI_FILLED_AREA_ROUNDED_BORDER,
	UI_NULL_IMAGE,
	NULL,
	//20051012 HIMANSHU START COMMON
	{255, 229, 172, 100},
	//20051012 HIMANSHU END COMMON
	{0, 0, 0, 0},
	{0, 0, 0, 100},
	{0, 0, 0, 0},
	0
};
#endif
/*PMT  MANISH  END  20050722 */

/*----------------------------------------------------------------------------
	Key handlers for the inline fixed list
----------------------------------------------------------------------------*/

#define CATEGORY57_NO_KEY_FLAG			0
#define CATEGORY57_UP_ARROW_KEY_FLAG	1
#define CATEGORY57_DOWN_ARROW_KEY_FLAG	2

byte wgui_inline_edit_arrow_key_flag = CATEGORY57_NO_KEY_FLAG;
void (*clear_inline_item_keys) (void) = UI_dummy_function;
void (*redraw_current_inline_item) (void) = UI_dummy_function;
void (*complete_inline_item_edit) (void) = UI_dummy_function;
void register_inline_fixed_list_keys(void);
void ShowCommonCategoryInlineEdit(UI_string_type title, U16 title_icon, U16 left_softkey, U16 left_softkey_icon,
											 U16 right_softkey, U16 right_softkey_icon, S32 number_of_items, U16 * list_of_icons,
											 InlineItem * list_of_items, S32 highlighted_item, U8 * history_buffer,
											 void (*highlight_handler) (S32 item_index),
											 void (*unhighlight_handler) (S32 item_index), word history_id);

//20051012 HIMANSHU START COMMON
#ifdef __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__
void inline_item_default_text_show_background(S32 x1, S32 y1, S32 x2, S32 y2);
void inline_text_edit_show_background(single_line_input_box * b);
#endif
//20051012 HIMANSHU END INLINE EDIT



/* For transparent color filler */
//PMT VIKAS START 20050630
// This part of code should be removed
#if 0
/* under construction !*/
/* under construction !*/
#ifdef __MMI_UI_TRANSPARENT_EFFECT__
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/

⌨️ 快捷键说明

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