wgui_inline_edit.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:887k
源码类别:
MTK
开发平台:
C/C++
- /* 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 !*/
- #else /* 0 */
- /* Lock frame buffer to avoid partial screen update
- (e.g. softkey changed before list is redrawn) */
- gdi_layer_lock_frame_buffer();
- fixed_list_goto_next_item();
- gdi_layer_unlock_frame_buffer();
- gdi_layer_blt_previous(0, 0, UI_device_width - 1, UI_device_height - 1);
- #if defined(__MMI_TOUCH_SCREEN__)
- /* W06.05 Do not draw fixed list in category57 because of virtual keyboard */
- if (GUI_VIRTUAL_KEYBOARD_EMPTY_TRAY != MMI_virtual_keyboard.lang_type)
- {
- mmi_pen_editor_clear_and_show_virtual_keyboard_area();
- }
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- #endif /* 0 */
- }
- /*****************************************************************************
- * FUNCTION
- * inline_fixed_list_goto_item
- * DESCRIPTION
- *
- * PARAMETERS
- * index [IN]
- * backward [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void inline_fixed_list_goto_item(S32 index, BOOL backward)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* FIXME. register as complete_inline_item_edit()? */
- if (!(MMI_multiline_inputbox.flags & UI_MULTI_LINE_INPUT_BOX_VIEW_MODE) &&
- (MMI_multiline_inputbox.flags & UI_MULTI_LINE_INPUT_BOX_INSIDE_INLINE_MENU))
- {
- handle_inline_multi_line_edit_complete();
- }
- if (backward)
- {
- wgui_inline_edit_arrow_key_flag = CATEGORY57_UP_ARROW_KEY_FLAG;
- }
- else
- {
- wgui_inline_edit_arrow_key_flag = CATEGORY57_DOWN_ARROW_KEY_FLAG;
- }
- clear_inline_item_keys();
- register_inline_fixed_list_keys();
- #if 0 /* defined(__MMI_TOUCH_SCREEN__) */
- /* 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 !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- #else /* 0 */
- /* Lock frame buffer to avoid partial screen update
- (e.g. softkey changed before list is redrawn) */
- gdi_layer_lock_frame_buffer();
- fixed_list_goto_item(index);
- gdi_layer_unlock_frame_buffer();
- gdi_layer_blt_previous(0, 0, UI_device_width - 1, UI_device_height - 1);
- #if defined(__MMI_TOUCH_SCREEN__)
- /* W06.05 Do not draw fixed list in category57 because of virtual keyboard */
- if (GUI_VIRTUAL_KEYBOARD_EMPTY_TRAY != MMI_virtual_keyboard.lang_type)
- {
- mmi_pen_editor_clear_and_show_virtual_keyboard_area();
- }
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- #endif /* 0 */
- }
- /*****************************************************************************
- * FUNCTION
- * inline_fixed_list_key_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * vkey_code [IN]
- * key_state [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void inline_fixed_list_key_handler(S32 vkey_code, S32 key_state)
- {
- #if(MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32)
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (key_state)
- {
- switch (vkey_code)
- {
- case 37:
- break;
- case 39:
- break;
- case 38:
- inline_fixed_list_goto_previous_item();
- break;
- case 40:
- inline_fixed_list_goto_next_item();
- break;
- case 36:
- clear_inline_item_keys();
- fixed_list_goto_home();
- break;
- case 35:
- clear_inline_item_keys();
- fixed_list_goto_end();
- break;
- case 33:
- clear_inline_item_keys();
- fixed_list_goto_previous_page();
- break;
- case 34:
- clear_inline_item_keys();
- fixed_list_goto_next_page();
- break;
- }
- }
- #else /* (MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32) */
- UI_UNUSED_PARAMETER(vkey_code);
- UI_UNUSED_PARAMETER(key_state);
- #endif /* (MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32) */
- }
- /*****************************************************************************
- * FUNCTION
- * register_inline_fixed_list_keys
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void register_inline_fixed_list_keys(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- register_keyboard_key_handler(inline_fixed_list_key_handler);
- SetKeyHandler(inline_fixed_list_goto_previous_item, KEY_UP_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(inline_fixed_list_goto_next_item, KEY_DOWN_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(inline_fixed_list_goto_previous_item, KEY_VOL_UP, KEY_EVENT_DOWN);
- SetKeyHandler(inline_fixed_list_goto_next_item, KEY_VOL_DOWN, KEY_EVENT_DOWN);
- }
- /* Changes to allow Back/Done key and Clear key in case of Inline edit */
- /* Max: add state to set RSK to "Clear" */
- /*****************************************************************************
- * FUNCTION
- * wgui_inline_edit_get_RSK_string
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- *
- *****************************************************************************/
- UI_string_type wgui_inline_edit_get_RSK_string(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (wgui_inline_list_menu_changed)
- {
- if (wgui_inline_list_menu_disable_done == 1)
- {
- return ((UI_string_type) get_string(STR_GLOBAL_BACK));
- }
- else if (wgui_inline_list_menu_disable_done == 2)
- {
- return ((UI_string_type) get_string(STR_GLOBAL_CLEAR));
- }
- else
- {
- return ((UI_string_type) get_string(WGUI_CATEGORY_DONE_STRING_ID));
- }
- }
- else
- {
- return ((UI_string_type) get_string(STR_GLOBAL_BACK));
- }
- }
- /*****************************************************************************
- * FUNCTION
- * execute_wgui_inline_edit_DONE_function
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void execute_wgui_inline_edit_DONE_function(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- complete_inline_item_edit();
- MMI_multi_line_inputbox_present = 0;
- if (wgui_inline_edit_DONE_function != NULL)
- {
- wgui_inline_edit_DONE_function();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * execute_wgui_inline_edit_BACK_function
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void execute_wgui_inline_edit_BACK_function(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (wgui_inline_edit_BACK_function != NULL)
- {
- MMI_multi_line_inputbox_present = 0;
- wgui_inline_edit_BACK_function();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * execute_wgui_inline_edit_RSK_function
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void execute_wgui_inline_edit_RSK_function(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (wgui_inline_list_menu_changed)
- {
- if (wgui_inline_list_menu_disable_done)
- {
- execute_wgui_inline_edit_BACK_function();
- }
- else
- {
- execute_wgui_inline_edit_DONE_function();
- }
- }
- else
- {
- execute_wgui_inline_edit_BACK_function();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * execute_wgui_inline_edit_LSK_function
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void execute_wgui_inline_edit_LSK_function(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- complete_inline_item_edit();
- if (wgui_inline_edit_LSK_function != NULL)
- {
- wgui_inline_edit_LSK_function();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * set_wgui_inline_list_menu_changed
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void set_wgui_inline_list_menu_changed(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* MTK Leo start 20051001, for sending inline items' change notify to application */
- if (inline_item_changed_handler != NULL)
- {
- inline_item_changed_handler((U16) wgui_inline_item_highlighted_index);
- }
- /* MTK Leo end */
- if (wgui_inline_list_menu_disable_done)
- {
- return;
- }
- if (wgui_inline_list_menu_changed)
- {
- return;
- }
- wgui_inline_list_menu_changed = 1;
- set_right_softkey_label(wgui_inline_edit_get_RSK_string());
- set_right_softkey_icon(NULL);
- register_right_softkey_handler();
- set_right_softkey_function(execute_wgui_inline_edit_RSK_function, KEY_EVENT_UP);
- redraw_right_softkey();
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_inline_edit_register_BACK_function
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_inline_edit_register_BACK_function(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- set_right_softkey_function(execute_wgui_inline_edit_BACK_function, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_inline_edit_register_ckey_BACK_function
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_inline_edit_register_ckey_BACK_function(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SetKeyHandler(execute_wgui_inline_edit_BACK_function, KEY_CLEAR, KEY_EVENT_UP);
- }
- /* PMT VIKAS START 20050707 */
- #ifdef __MMI_UI_DALMATIAN_SOFTKEYS__
- extern is_button_bar_shuffled;
- #endif
- /* PMT VIKAS END 20050707 */
- /*****************************************************************************
- * FUNCTION
- * wgui_inline_text_edit_set_RSK_BACK_function
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_inline_text_edit_set_RSK_BACK_function(void)
- { /* reset_right_softkey(); */
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (wgui_inline_list_menu_disable_done)
- {
- #if defined(__MMI_WITH_C_KEY__)
- SetKeyHandler(UI_dummy_function, KEY_CLEAR, KEY_EVENT_DOWN);
- SetKeyHandler(wgui_inline_edit_register_ckey_BACK_function, KEY_CLEAR, KEY_EVENT_UP);
- #else /* defined(__MMI_WITH_C_KEY__) */
- set_right_softkey_label((UI_string_type) get_string(STR_GLOBAL_BACK));
- set_right_softkey_icon(NULL);
- set_right_softkey_function(wgui_inline_edit_register_BACK_function, KEY_EVENT_UP);
- set_right_softkey_function(UI_dummy_function, KEY_EVENT_DOWN);
- #endif /* defined(__MMI_WITH_C_KEY__) */
- }
- else
- {
- reset_right_softkey();
- set_right_softkey_label(NULL);
- set_right_softkey_icon(NULL);
- /* PMT VIKAS START 20050707 */
- #ifdef __MMI_UI_DALMATIAN_SOFTKEYS__
- is_button_bar_shuffled = 1;
- gui_call_shuffle(); /* To shuffle the key as button up is not called. */
- #endif /* __MMI_UI_DALMATIAN_SOFTKEYS__ */
- /* PMT VIKAS END 20050707 */
- }
- redraw_right_softkey();
- }
- /* 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
- /*----------------------------------------------------------------------------
- "Display only" inline item implementation
- ----------------------------------------------------------------------------*/
- /*****************************************************************************
- * FUNCTION
- * handle_inline_display_only
- * DESCRIPTION
- *
- * PARAMETERS
- * x [IN]
- * y [IN]
- * width [IN]
- * height [IN]
- * key_code [IN]
- * key_event [IN]
- * text_p [IN]
- * item [?]
- * flags [IN]
- * history_buffer [?]
- * RETURNS
- * void
- *****************************************************************************/
- void handle_inline_display_only(
- S32 x,
- S32 y,
- S32 width,
- S32 height,
- S32 key_code,
- S32 key_event,
- U8 **text_p,
- void *item,
- U32 flags,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(x);
- UI_UNUSED_PARAMETER(y);
- UI_UNUSED_PARAMETER(height);
- UI_UNUSED_PARAMETER(width);
- UI_UNUSED_PARAMETER(key_code);
- UI_UNUSED_PARAMETER(key_event);
- UI_UNUSED_PARAMETER(text_p);
- UI_UNUSED_PARAMETER(item);
- UI_UNUSED_PARAMETER(flags);
- }
- /*****************************************************************************
- * FUNCTION
- * SetInlineItemDisplayOnly
- * DESCRIPTION
- *
- * PARAMETERS
- * item [?]
- * text_p [?]
- * RETURNS
- * void
- *****************************************************************************/
- void SetInlineItemDisplayOnly(InlineItem *item, U8 *text_p)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- item->item = NULL;
- item->text_p = text_p;
- item->handler = handle_inline_display_only;
- item->flags = INLINE_ITEM_TYPE_DISPLAY_ONLY;
- }
- /*****************************************************************************
- * FUNCTION
- * ReConfigureInlineItemDisplayOnly
- * DESCRIPTION
- *
- * PARAMETERS
- * item [?]
- * text_p [?]
- * RETURNS
- * void
- *****************************************************************************/
- void ReConfigureInlineItemDisplayOnly(InlineItem *item, U8 *text_p)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if ((item->flags & 0xff) != INLINE_ITEM_TYPE_DISPLAY_ONLY)
- {
- return;
- }
- item->text_p = text_p;
- }
- /*----------------------------------------------------------------------------
- "Caption" inline item implementation
- ----------------------------------------------------------------------------*/
- /*****************************************************************************
- * FUNCTION
- * handle_inline_caption
- * DESCRIPTION
- *
- * PARAMETERS
- * x [IN]
- * y [IN]
- * width [IN]
- * height [IN]
- * key_code [IN]
- * key_event [IN]
- * text_p [IN]
- * item [?]
- * flags [IN]
- * history_buffer [?]
- * RETURNS
- * void
- *****************************************************************************/
- void handle_inline_caption(
- S32 x,
- S32 y,
- S32 width,
- S32 height,
- S32 key_code,
- S32 key_event,
- U8 **text_p,
- void *item,
- U32 flags,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(x);
- UI_UNUSED_PARAMETER(y);
- UI_UNUSED_PARAMETER(height);
- UI_UNUSED_PARAMETER(width);
- UI_UNUSED_PARAMETER(key_code);
- UI_UNUSED_PARAMETER(key_event);
- UI_UNUSED_PARAMETER(text_p);
- UI_UNUSED_PARAMETER(item);
- UI_UNUSED_PARAMETER(flags);
- }
- /*****************************************************************************
- * FUNCTION
- * SetInlineItemCaption
- * DESCRIPTION
- *
- * PARAMETERS
- * item [?]
- * text_p [?]
- * RETURNS
- * void
- *****************************************************************************/
- void SetInlineItemCaption(InlineItem *item, U8 *text_p)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- item->item = NULL;
- item->text_p = text_p;
- item->handler = handle_inline_caption;
- item->flags = INLINE_ITEM_TYPE_CAPTION;
- }
- /*****************************************************************************
- * FUNCTION
- * ReconfigureInlineItemCaption
- * DESCRIPTION
- *
- * PARAMETERS
- * item [?]
- * text_p [?]
- * RETURNS
- * void
- *****************************************************************************/
- void ReconfigureInlineItemCaption(InlineItem *item, U8 *text_p)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if ((item->flags & 0xff) != INLINE_ITEM_TYPE_CAPTION)
- {
- return;
- }
- item->text_p = text_p;
- }
- /*----------------------------------------------------------------------------
- Inline text edit (single line) implementation
- ----------------------------------------------------------------------------*/
- //#define MAX_INLINE_TEXT_EDIT_ITEMS 10
- //#define MAX_INLINE_TEXT_EDIT_BUFFER_SIZE 88
- wgui_inline_item_text_edit wgui_inline_text_edit_items[MAX_INLINE_TEXT_EDIT_ITEMS];
- U8 wgui_inline_text_edit_buffer[MAX_INLINE_TEXT_EDIT_BUFFER_SIZE];
- U8 wgui_inline_full_screen_text_edit_buffer[MAX_INLINE_FULL_SCREEN_TEXT_EDIT_BUFFER_SIZE];
- wgui_inline_item_text_edit *current_wgui_inline_text_edit_item;
- U8 **current_wgui_inline_text_edit_text_p;
- single_line_input_box MMI_inline_singleline_inputbox;
- U8 inline_text_edit_mask_buffers[MAX_INLINE_TEXT_EDIT_ITEMS][MAX_INLINE_TEXT_EDIT_BUFFER_SIZE];
- UI_character_type inline_text_edit_mask_character = (UI_character_type) '*';
- U8 wgui_inline_singleline_inputbox_decimal_flag = 0;
- U8 wgui_inline_singleline_inputbox_decimal_input_mode_flag = 0;
- extern U8 MMI_current_input_mode;
- S32 wgui_inline_singleline_inputbox_buffer_size = 0;
- void (*inline_singleline_inputbox_input_callback) (void) = UI_dummy_function;
- void (*inline_singleline_inputbox_navigate_callback) (void) = UI_dummy_function;
- extern S32(*wgui_inputbox_UCS2_count_function) (void);
- #if((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_INLINE_SINGLELINE_INPUTBOX_FRAME_SKIPPING))
- S32 wgui_inline_singleline_inputbox_frame_counter = 0;
- #endif
- UI_filled_area temp_inline_edit_background_filler = {UI_FILLED_AREA_TYPE_COLOR | UI_FILLED_AREA_SINGLE_BORDER,
- NULL,
- NULL,
- /* MTK Leo modify 0912 */
- #ifdef __MMI_DEFAULT_THEME_3__
- {206, 206, 206, 100},
- #else
- {167, 232, 93, 100},
- #endif
- /* MTK Leo end */
- {0, 0, 0, 0},
- {0, 0, 0, 100},
- {0, 0, 0, 0},
- 0
- };
- UI_filled_area temp_inline_edit_background_filler2 = {UI_FILLED_AREA_TYPE_COLOR | UI_FILLED_AREA_SINGLE_BORDER,
- NULL,
- NULL,
- {255, 255, 255, 100},
- {0, 0, 0, 0},
- {0, 0, 0, 100},
- {0, 0, 0, 0},
- 0
- };
- UI_filled_area temp_inline_edit_background_filler3 = {UI_FILLED_AREA_TYPE_COLOR,
- NULL,
- NULL,
- {167, 232, 93, 100},
- {0, 0, 0, 0},
- {0, 0, 0, 100},
- {0, 0, 0, 0},
- 0
- };
- /* Filler used for focussed inputbox with boundary */
- UI_single_line_input_box_theme wgui_inline_singleline_inputbox_focussed_theme = { &temp_inline_edit_background_filler,
- &temp_inline_edit_background_filler,
- &temp_inline_edit_background_filler,
- {0, 0, 0, 100},
- {128, 128, 128, 100},
- {0, 0, 0, 100},
- {255, 255, 255, 100},
- {51, 88, 171, 100},
- {255, 0, 0, 100},
- &MMI_default_font,
- 1,
- UI_SINGLE_LINE_INPUT_BOX_CENTER_Y,
- '*'
- };
- /* Filler used for unfocussed inputbox with boundary */
- UI_single_line_input_box_theme wgui_inline_singleline_inputbox_unfocussed_theme =
- { &temp_inline_edit_background_filler2,
- &temp_inline_edit_background_filler2,
- &temp_inline_edit_background_filler2,
- {0, 0, 0, 100},
- {128, 128, 128, 100},
- {0, 0, 0, 100},
- {255, 255, 255, 100},
- {51, 88, 171, 100},
- {255, 0, 0, 100},
- &MMI_default_font,
- 1,
- UI_SINGLE_LINE_INPUT_BOX_CENTER_Y,
- '*'
- };
- /* Filler used for inputbox without boundary */
- UI_single_line_input_box_theme wgui_inline_singleline_inputbox_no_boundary_theme =
- { &temp_inline_edit_background_filler3,
- &temp_inline_edit_background_filler3,
- &temp_inline_edit_background_filler3,
- {0, 0, 0, 100},
- {128, 128, 128, 100},
- {0, 0, 0, 100},
- {255, 255, 255, 100},
- {51, 88, 171, 100},
- {255, 0, 0, 100},
- &MMI_default_font,
- 1,
- UI_SINGLE_LINE_INPUT_BOX_CENTER_Y,
- '*'
- };
- void (*inline_text_edit_RSK_function) (void) = NULL;
- U8 inline_text_edit_RSK_label_clear = 0;
- UI_string_type inline_text_edit_RSK_label_string;
- PU8 inline_text_edit_RSK_label_icon;
- #define WGUI_INLINE_TEXT_EDIT_MULTITAP_NONE 0
- #define WGUI_INLINE_TEXT_EDIT_MULTITAP_STAR 1
- #define WGUI_INLINE_TEXT_EDIT_MULTITAP_ANY 2
- /* MTK Elvis */
- #define WGUI_INLINE_TEXT_EDIT_MULTITAP_ZERO 3
- /* MTK end */
- U8 wgui_inline_text_edit_active_multitap = WGUI_INLINE_TEXT_EDIT_MULTITAP_NONE;
- UI_character_type wgui_inline_edit_phone_number_star_key_string[] = { '*', '+', 'p', 'w', ' ' };
- multitap_input wgui_inline_text_edit_multitap_star_key;
- /* MTK Elvis */
- UI_character_type wgui_inline_edit_phone_number_zero_key_string[] = { '+', 'p', 'w', ' ' };
- multitap_input wgui_inline_text_edit_multitap_zero_key;
- /* MTK end */
- extern void MMI_key_0_down(void);
- extern void MMI_key_0_up(void);
- /*****************************************************************************
- * FUNCTION
- * inline_edit_prepare_mask_buffer
- * DESCRIPTION
- *
- * PARAMETERS
- * buffer1 [?]
- * buffer2 [?]
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_prepare_mask_buffer(U8 *buffer1, U8 *buffer2)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_character_type c = (UI_character_type) - 1;
- U16 eos = ' ';
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- while (!UI_STRING_END_OF_STRING_CHARACTER(c))
- {
- UI_STRING_GET_NEXT_CHARACTER(buffer1, c);
- if (UI_STRING_END_OF_STRING_CHARACTER(c))
- {
- UI_STRING_INSERT_CHARACTER(buffer2, eos);
- }
- else
- {
- UI_STRING_INSERT_CHARACTER(buffer2, inline_text_edit_mask_character);
- }
- }
- }
- /*
- * void UI_dummy_edit_complete_handler(U8 *buffer,S32 buffer_size)
- * { UI_UNUSED_PARAMETER(buffer);
- * UI_UNUSED_PARAMETER(buffer_size);
- */
- /*****************************************************************************
- * FUNCTION
- * create_inline_edit_singleline_inputbox_set_buffer
- * DESCRIPTION
- *
- * PARAMETERS
- * buffer [IN]
- * buffer_length [IN]
- * text_length [IN]
- * edit_position [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void create_inline_edit_singleline_inputbox_set_buffer(
- UI_string_type buffer,
- S32 buffer_length,
- S32 text_length,
- S32 edit_position)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_single_line_input_box_theme *t = current_single_line_input_box_theme;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- current_single_line_input_box_theme = &wgui_inline_singleline_inputbox_focussed_theme;
- inline_singleline_inputbox_input_callback = UI_dummy_function;
- inline_singleline_inputbox_navigate_callback = UI_dummy_function;
- #ifdef __UCS2_ENCODING
- gui_create_single_line_input_box_set_buffer(
- &MMI_inline_singleline_inputbox,
- MMI_singleline_inputbox_x,
- MMI_singleline_inputbox_y,
- MMI_singleline_inputbox_width,
- MMI_singleline_inputbox_height,
- buffer,
- buffer_length * 2,
- (text_length + 1) * 2,
- edit_position);
- #endif /* __UCS2_ENCODING */
- #ifdef __ASCII
- gui_create_single_line_input_box_set_buffer(
- &MMI_inline_singleline_inputbox,
- MMI_singleline_inputbox_x,
- MMI_singleline_inputbox_y,
- MMI_singleline_inputbox_width,
- MMI_singleline_inputbox_height,
- buffer,
- buffer_length,
- text_length + 1,
- edit_position);
- #endif /* __ASCII */
- current_single_line_input_box_theme = t;
- #if((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_INLINE_SINGLELINE_INPUTBOX_FRAME_SKIPPING))
- wgui_inline_singleline_inputbox_frame_counter = 0;
- #endif
- }
- /*****************************************************************************
- * FUNCTION
- * show_inline_singleline_inputbox
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void show_inline_singleline_inputbox(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_single_line_input_box_theme *t = current_single_line_input_box_theme;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- current_single_line_input_box_theme = &wgui_inline_singleline_inputbox_focussed_theme;
- gui_set_single_line_input_box_current_theme(&MMI_inline_singleline_inputbox);
- /* MTK Leo add, currency convertor & unit convertor input box, set font to medium font */
- MMI_inline_singleline_inputbox.text_font = &MMI_medium_font;
- /* MTK Leo end */
- gui_show_single_line_input_box(&MMI_inline_singleline_inputbox);
- gdi_layer_blt_previous(
- MMI_inline_singleline_inputbox.x,
- MMI_inline_singleline_inputbox.y,
- MMI_inline_singleline_inputbox.x + MMI_inline_singleline_inputbox.width,
- MMI_inline_singleline_inputbox.y + MMI_inline_singleline_inputbox.height);
- current_single_line_input_box_theme = t;
- }
- #if((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_INLINE_SINGLELINE_INPUTBOX_FRAME_SKIPPING))
- /*****************************************************************************
- * FUNCTION
- * wgui_inline_singleline_inputbox_end_frame
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_inline_singleline_inputbox_end_frame(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (wgui_inline_singleline_inputbox_frame_counter >= 1)
- {
- gui_show_single_line_input_box(&MMI_inline_singleline_inputbox);
- gdi_layer_blt_previous(
- MMI_inline_singleline_inputbox.x,
- MMI_inline_singleline_inputbox.y,
- MMI_inline_singleline_inputbox.x + MMI_inline_singleline_inputbox.width,
- MMI_inline_singleline_inputbox.y + MMI_inline_singleline_inputbox.height);
- wgui_inline_singleline_inputbox_frame_counter = 0;
- gui_start_timer(UI_FRAME_SKIP_TIMEOUT, wgui_inline_singleline_inputbox_end_frame);
- }
- }
- #endif /* ((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_INLINE_SINGLELINE_INPUTBOX_FRAME_SKIPPING)) */
- /*****************************************************************************
- * FUNCTION
- * redraw_inline_singleline_inputbox
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void redraw_inline_singleline_inputbox(void)
- {
- #if((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_INLINE_SINGLELINE_INPUTBOX_FRAME_SKIPPING))
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_POPUP_REACH_MAX_LENGTH_MSG__
- if (GetExitScrnID() != POPUP_SCREENID)
- {
- #endif /* __MMI_POPUP_REACH_MAX_LENGTH_MSG__ */
- if (wgui_inline_singleline_inputbox_frame_counter > 0)
- {
- wgui_inline_singleline_inputbox_frame_counter++;
- }
- else
- {
- wgui_inline_singleline_inputbox_frame_counter = 1;
- gui_start_timer(UI_FRAME_START_TIMEOUT, wgui_inline_singleline_inputbox_end_frame);
- }
- #ifdef __MMI_POPUP_REACH_MAX_LENGTH_MSG__
- }
- #endif
- #else /* ((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_INLINE_SINGLELINE_INPUTBOX_FRAME_SKIPPING)) */
- #ifdef __MMI_POPUP_REACH_MAX_LENGTH_MSG__
- if (GetExitScrnID() != POPUP_SCREENID)
- {
- #endif /* __MMI_POPUP_REACH_MAX_LENGTH_MSG__ */
- gui_show_single_line_input_box(&MMI_inline_singleline_inputbox);
- #ifdef __MMI_POPUP_REACH_MAX_LENGTH_MSG__
- }
- #endif
- gdi_layer_blt_previous(
- MMI_inline_singleline_inputbox.x,
- MMI_inline_singleline_inputbox.y,
- MMI_inline_singleline_inputbox.x + MMI_inline_singleline_inputbox.width,
- MMI_inline_singleline_inputbox.y + MMI_inline_singleline_inputbox.height);
- #endif /* ((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_INLINE_SINGLELINE_INPUTBOX_FRAME_SKIPPING)) */
- }
- /*****************************************************************************
- * FUNCTION
- * clear_inline_singleline_inputbox_keys
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void clear_inline_singleline_inputbox_keys(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ClearInputEventHandler(MMI_DEVICE_KEY);
- clear_keyboard_key_handler();
- clear_multitap_key_handlers();
- clear_MMI_key_input_handler();
- clear_key_down_handler();
- clear_keyboard_input_handler();
- clear_inline_item_keys = UI_dummy_function;
- }
- void inline_edit_singleline_inputbox_multitap_input_no_draw(UI_character_type c);
- void inline_edit_singleline_inputbox_multitap_input_complete_no_draw(void);
- void inline_text_edit_handle_multitap_input_complete(S32 type);
- /*****************************************************************************
- * FUNCTION
- * reset_inline_singleline_inputbox
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void reset_inline_singleline_inputbox(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- inline_text_edit_handle_multitap_input_complete(WGUI_INLINE_TEXT_EDIT_MULTITAP_ANY);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input_no_draw,
- inline_edit_singleline_inputbox_multitap_input_complete_no_draw);
- #if(UI_BLINKING_CURSOR_SUPPORT)
- //gui_cancel_timer(UI_inputbox_blink_cursor);
- //MTK Elvis
- StopMyTimer(BLINKING_CURSOR);
- /* MTK end */
- #endif /* (UI_BLINKING_CURSOR_SUPPORT) */
- #if((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_INLINE_SINGLELINE_INPUTBOX_FRAME_SKIPPING))
- gui_cancel_timer(wgui_inline_singleline_inputbox_end_frame);
- wgui_inline_singleline_inputbox_frame_counter = 0;
- #endif /* ((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_INLINE_SINGLELINE_INPUTBOX_FRAME_SKIPPING)) */
- reset_multitaps();
- clear_inline_singleline_inputbox_keys();
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_singleline_inputbox_delete_character
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_singleline_inputbox_delete_character(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_single_line_input_box_delete_character(&MMI_inline_singleline_inputbox);
- wgui_inline_list_menu_changed = 1;
- redraw_inline_singleline_inputbox();
- inline_singleline_inputbox_input_callback();
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_singleline_inputbox_previous_character
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_singleline_inputbox_previous_character(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_single_line_input_box_previous(&MMI_inline_singleline_inputbox);
- redraw_inline_singleline_inputbox();
- inline_singleline_inputbox_navigate_callback();
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_singleline_inputbox_next_character
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_singleline_inputbox_next_character(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_single_line_input_box_next(&MMI_inline_singleline_inputbox);
- redraw_inline_singleline_inputbox();
- inline_singleline_inputbox_navigate_callback();
- }
- /*****************************************************************************
- * FUNCTION
- * set_inline_edit_singleline_inputbox_mask
- * DESCRIPTION
- *
- * PARAMETERS
- * m [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void set_inline_edit_singleline_inputbox_mask(U8 m)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- switch (m)
- {
- case 0:
- MMI_inline_singleline_inputbox.flags &= ~UI_SINGLE_LINE_INPUT_BOX_MASK_CHARACTERS;
- break;
- case 1:
- MMI_inline_singleline_inputbox.flags |= UI_SINGLE_LINE_INPUT_BOX_MASK_CHARACTERS;
- break;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_resize_singleline_inputbox
- * DESCRIPTION
- *
- * PARAMETERS
- * width [IN]
- * height [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_resize_singleline_inputbox(S32 width, S32 height)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_resize_single_line_input_box(&MMI_inline_singleline_inputbox, width, height);
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_move_singleline_inputbox
- * DESCRIPTION
- *
- * PARAMETERS
- * x [IN]
- * y [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_move_singleline_inputbox(S32 x, S32 y)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_move_single_line_input_box(&MMI_inline_singleline_inputbox, x, y);
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_register_singleline_inputbox_input_callback
- * DESCRIPTION
- *
- * PARAMETERS
- * f [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_register_singleline_inputbox_input_callback(void (*f) (void))
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- inline_singleline_inputbox_input_callback = f;
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_register_singleline_inputbox_navigate_callback
- * DESCRIPTION
- *
- * PARAMETERS
- * f [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_register_singleline_inputbox_navigate_callback(void (*f) (void))
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- inline_singleline_inputbox_navigate_callback = f;
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_singleline_inputbox_toggle_insert_mode
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_singleline_inputbox_toggle_insert_mode(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_single_line_input_box_toggle_insert_mode(&MMI_inline_singleline_inputbox);
- redraw_inline_singleline_inputbox();
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_singleline_inputbox_delete_all_characters
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_singleline_inputbox_delete_all_characters(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_single_line_input_box_delete_all(&MMI_inline_singleline_inputbox);
- wgui_inline_list_menu_changed = 1;
- redraw_inline_singleline_inputbox();
- inline_singleline_inputbox_input_callback();
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_singleline_inputbox_delete_current_character
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_singleline_inputbox_delete_current_character(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_single_line_input_box_delete_current_character(&MMI_inline_singleline_inputbox);
- wgui_inline_list_menu_changed = 1;
- redraw_inline_singleline_inputbox();
- inline_singleline_inputbox_input_callback();
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_singleline_inputbox_multitap_input
- * DESCRIPTION
- *
- * PARAMETERS
- * c [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_singleline_inputbox_multitap_input(UI_character_type c)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- single_line_input_box *b = &MMI_inline_singleline_inputbox;
- U32 flag = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if( (c == '+') && (b->text[0] != '+') && b->current_text_p == b->text && ((b->last_position_p - b->text) >= (b->available_length)) )
- {
- b->available_length =
- (wgui_inline_singleline_inputbox_buffer_size + 1) * ENCODING_LENGTH;
- flag = 1;
- }
- gui_single_line_input_box_insert_multitap_character(&MMI_inline_singleline_inputbox, c);
- if(flag)
- {
- switch (wgui_inline_text_edit_active_multitap)
- {
- case WGUI_INLINE_TEXT_EDIT_MULTITAP_STAR:
- if (MMI_inline_singleline_inputbox.flags & UI_SINGLE_LINE_INPUT_BOX_STATE_MULTITAP)
- {
- gui_cancel_timer(inline_edit_phone_number_input_complete_multitap_star_key);
- gui_multitap_input_complete(&wgui_inline_text_edit_multitap_star_key);
- }
- break;
- case WGUI_INLINE_TEXT_EDIT_MULTITAP_ZERO:
- if (MMI_inline_singleline_inputbox.flags & UI_SINGLE_LINE_INPUT_BOX_STATE_MULTITAP)
- {
- gui_cancel_timer(inline_edit_phone_number_input_complete_multitap_zero_key);
- gui_multitap_input_complete(&wgui_inline_text_edit_multitap_zero_key);
- }
- break;
- }
- }
- wgui_inline_list_menu_changed = 1;
- redraw_inline_singleline_inputbox();
- inline_singleline_inputbox_input_callback();
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_singleline_inputbox_multitap_input_complete
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_singleline_inputbox_multitap_input_complete(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_single_line_input_box_confirm_multitap_character(&MMI_inline_singleline_inputbox);
- wgui_inline_list_menu_changed = 1;
- redraw_inline_singleline_inputbox();
- inline_singleline_inputbox_input_callback();
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_singleline_inputbox_multitap_input_no_draw
- * DESCRIPTION
- *
- * PARAMETERS
- * c [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_singleline_inputbox_multitap_input_no_draw(UI_character_type c)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_single_line_input_box_insert_multitap_character(&MMI_inline_singleline_inputbox, c);
- wgui_inline_list_menu_changed = 1;
- inline_singleline_inputbox_input_callback();
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_singleline_inputbox_multitap_input_complete_no_draw
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_singleline_inputbox_multitap_input_complete_no_draw(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_single_line_input_box_confirm_multitap_character(&MMI_inline_singleline_inputbox);
- wgui_inline_list_menu_changed = 1;
- inline_singleline_inputbox_input_callback();
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_singleline_inputbox_direct_input
- * DESCRIPTION
- *
- * PARAMETERS
- * c [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_singleline_inputbox_direct_input(UI_character_type c)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- single_line_input_box *b = &MMI_inline_singleline_inputbox;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if( (c == '+') && (b->text[0] != '+') && b->current_text_p == b->text && ((b->last_position_p - b->text) >= (b->available_length)) )
- {
- b->available_length =
- (wgui_inline_singleline_inputbox_buffer_size + 1) * ENCODING_LENGTH;
- }
- gui_single_line_input_box_insert_character(&MMI_inline_singleline_inputbox, c);
- wgui_inline_list_menu_changed = 1;
- redraw_inline_singleline_inputbox();
- inline_singleline_inputbox_input_callback();
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * keyc [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler(S32 keyc)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (keyc > 0x1f)
- {
- inline_edit_singleline_inputbox_direct_input((U8) keyc);
- }
- else if (keyc == 0x08)
- {
- inline_edit_singleline_inputbox_delete_character();
- }
- else if (keyc == 0x1b)
- {
- inline_edit_singleline_inputbox_delete_all_characters();
- }
- else if (keyc == 0x0d);
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_singleline_inputbox_numeric_keyboard_input_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * keyc [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_singleline_inputbox_numeric_keyboard_input_handler(S32 keyc)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (keyc >= '0' && keyc <= '9')
- {
- inline_edit_singleline_inputbox_direct_input((U8) keyc);
- }
- else if (keyc == 0x08)
- {
- inline_edit_singleline_inputbox_delete_character();
- }
- else if (keyc == 0x1b)
- {
- inline_edit_singleline_inputbox_delete_all_characters();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_singleline_inputbox_handle_key_down
- * DESCRIPTION
- *
- * PARAMETERS
- * k [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_singleline_inputbox_handle_key_down(MMI_key_code_type k)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_inline_list_menu_changed = 1;
- inline_edit_singleline_inputbox_direct_input((UI_character_type) ('0' + k));
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_change_singleline_inputbox_mode
- * DESCRIPTION
- *
- * PARAMETERS
- * mode [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_change_singleline_inputbox_mode(U8 mode)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- switch (mode)
- {
- case INPUT_MODE_MULTITAP_UPPERCASE_ABC:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_ABC);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_ABC:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_ABC);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_123:
- change_multitap_mode(INPUT_MODE_123);
- clear_multitap_key_handlers();
- register_MMI_key_input_handler();
- register_key_down_handler(inline_edit_singleline_inputbox_handle_key_down);
- register_keyboard_input_handler(inline_edit_singleline_inputbox_numeric_keyboard_input_handler);
- break;
- /* PMT dara added for Multitap thai */
- #if defined (__MMI_MULTITAP_THAI__)
- case INPUT_MODE_MULTITAP_THAI:
- change_multitap_mode(INPUT_MODE_MULTITAP_THAI);
- //W05.36 Fix Vietnamese Tone Input Issue
- //change_inputbox_type_multitapthai(SINGLELINE_INPUTBOX);
- register_multitap_no_draw_key_handlers();
- register_MMI_key_input_extend_handler(); /* msz065_20050418 */
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined (__MMI_MULTITAP_THAI__) */
- /* MTK Terry for Spanish French German Italian Russian Turkish Portuguese Indonesian Malay Vietnamese */
- #if defined(__MMI_MULTITAP_SPANISH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_SPANISH:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_SPANISH);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_SPANISH:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_SPANISH);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_SPANISH__) */
- /* PMT VIKASG START 20050729 */
- #if defined(__MMI_MULTITAP_DANISH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_DANISH:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_DANISH);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_DANISH:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_DANISH);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_DANISH__) */
- //PMT VIKASG END 20050729
- //PMT CZ_PO_TU START 20050812
- #if defined(__MMI_MULTITAP_POLISH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_POLISH:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_POLISH);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_POLISH:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_POLISH);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_POLISH__) */
- /* PMT CZ_PO_TU END 20050812 */
- #if defined(__MMI_MULTITAP_FRENCH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_FRENCH:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_FRENCH);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_FRENCH:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_FRENCH);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_FRENCH__) */
- #if defined(__MMI_MULTITAP_GERMAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_GERMAN:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_GERMAN);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_GERMAN:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_GERMAN);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_GERMAN__) */
- #if defined(__MMI_MULTITAP_ITALIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_ITALIAN:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_ITALIAN);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_ITALIAN:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_ITALIAN);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_ITALIAN__) */
- #if defined(__MMI_MULTITAP_RUSSIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_RUSSIAN:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_RUSSIAN);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_RUSSIAN:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_RUSSIAN);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_RUSSIAN__) */
- /* PMT BULGARIAN START 20051201 */
- #if defined(__MMI_MULTITAP_BULGARIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_BULGARIAN:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_BULGARIAN);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_BULGARIAN:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_BULGARIAN);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_BULGARIAN__) */
- /* PMT BULGARIAN END 20051201 */
- #if defined(__MMI_MULTITAP_TURKISH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_TURKISH:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_TURKISH);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_TURKISH:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_TURKISH);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_TURKISH__) */
- #if defined(__MMI_MULTITAP_PORTUGUESE__)
- case INPUT_MODE_MULTITAP_UPPERCASE_PORTUGUESE:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_PORTUGUESE);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_PORTUGUESE:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_PORTUGUESE);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_PORTUGUESE__) */
- #if defined(__MMI_MULTITAP_INDONESIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_INDONESIAN:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_INDONESIAN);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_INDONESIAN:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_INDONESIAN);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_INDONESIAN__) */
- /* PMT CZ_PO_TU START 20050812 */
- #if defined(__MMI_MULTITAP_CZECH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_CZECH:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_CZECH);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_CZECH:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_CZECH);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_CZECH__) */
- /* PMT CZ_PO_TU END 20050812 */
- #if defined(__MMI_MULTITAP_MALAY__)
- case INPUT_MODE_MULTITAP_UPPERCASE_MALAY:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_MALAY);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_MALAY:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_MALAY);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_MALAY__) */
- #if defined(__MMI_MULTITAP_VIETNAMESE__)
- case INPUT_MODE_MULTITAP_UPPERCASE_VIETNAMESE:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_VIETNAMESE);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_VIETNAMESE:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_VIETNAMESE);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_VIETNAMESE__) */
- /* PMT START HU_FI 20050825 */
- #if defined(__MMI_MULTITAP_FINNISH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_FINNISH:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_FINNISH);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_FINNISH:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_FINNISH);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_FINNISH__) */
- #if defined(__MMI_MULTITAP_HUNGARIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_HUNGARIAN:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_HUNGARIAN);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_HUNGARIAN:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_HUNGARIAN);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_HUNGARIAN__) */
- /* PMT END HU_FI 20050825 */
- /* MTK end */
- /* PMT START GR_HE_CZ_FI_DA_HU 20051007 */
- #if defined(__MMI_MULTITAP_HEBREW__)
- case INPUT_MODE_MULTITAP_HEBREW:
- change_multitap_mode(INPUT_MODE_MULTITAP_HEBREW);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_HEBREW__) */
- //PMT END GR_HE_CZ_FI_DA_HU 20051007
- //PMT NO_AR_SL_DU START 20050909
- #if defined(__MMI_MULTITAP_SLOVAK__)
- case INPUT_MODE_MULTITAP_UPPERCASE_SLOVAK:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_SLOVAK);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_SLOVAK:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_SLOVAK);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_SLOVAK__) */
- #if defined(__MMI_MULTITAP_DUTCH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_DUTCH:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_DUTCH);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_DUTCH:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_DUTCH);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_DUTCH__) */
- #if defined(__MMI_MULTITAP_ARABIC__)
- case INPUT_MODE_MULTITAP_ARABIC:
- change_multitap_mode(INPUT_MODE_MULTITAP_ARABIC);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_ARABIC__) */
- /* Norwegian start */
- #if defined(__MMI_MULTITAP_NORWEGIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_NORWEGIAN:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_NORWEGIAN);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_NORWEGIAN:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_NORWEGIAN);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_NORWEGIAN__) */
- //Norwegian end
- //PMT NO_AR_SL_DU END 20050909
- //PMT START SWEDISH 20050916
- #if defined(__MMI_MULTITAP_SWEDISH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_SWEDISH:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_SWEDISH);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_SWEDISH:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_SWEDISH);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_SWEDISH__) */
- //PMT END SWEDISH 20050916
- //PMT START CR_ROM_SLO 20050923
- #if defined(__MMI_MULTITAP_CROATIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_CROATIAN:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_CROATIAN);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_CROATIAN:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_CROATIAN);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_CROATIAN__) */
- #if defined(__MMI_MULTITAP_ROMANIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_ROMANIAN:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_ROMANIAN);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_ROMANIAN:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_ROMANIAN);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_ROMANIAN__) */
- #if defined(__MMI_MULTITAP_SLOVENIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_SLOVENIAN:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_SLOVENIAN);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_SLOVENIAN:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_SLOVENIAN);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_SLOVENIAN__) */
- //PMT END CR_ROM_SLO 20050923
- //PMT START GR_HE_CZ_FI_DA_HU 20051007
- #if defined(__MMI_MULTITAP_GREEK__)
- case INPUT_MODE_MULTITAP_UPPERCASE_GREEK:
- change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_GREEK);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- case INPUT_MODE_MULTITAP_LOWERCASE_GREEK:
- change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_GREEK);
- register_multitap_no_draw_key_handlers();
- register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
- set_multitap_functions(
- inline_edit_singleline_inputbox_multitap_input,
- inline_edit_singleline_inputbox_multitap_input_complete);
- break;
- #endif /* defined(__MMI_MULTITAP_GREEK__) */
- /* PMT END GR_HE_CZ_FI_DA_HU 20051007 */
- }
- }
- void clear_inline_singleline_inputbox_keys(void);
- void handle_inline_text_edit_complete(void);
- /*****************************************************************************
- * FUNCTION
- * inline_text_edit_handle_up_arrow
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void inline_text_edit_handle_up_arrow(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (MMI_fixed_list_menu.n_items != 1)
- {
- handle_inline_text_edit_complete();
- inline_fixed_list_goto_previous_item();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * inline_text_edit_handle_down_arrow
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void inline_text_edit_handle_down_arrow(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (MMI_fixed_list_menu.n_items != 1)
- {
- handle_inline_text_edit_complete();
- inline_fixed_list_goto_next_item();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * inline_singleline_inputbox_key_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * vkey_code [IN]
- * key_state [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void inline_singleline_inputbox_key_handler(S32 vkey_code, S32 key_state)
- {
- #if(MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32)
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (key_state)
- {
- switch (vkey_code)
- {
- case 37:
- inline_edit_singleline_inputbox_previous_character();
- break;
- case 38:
- inline_text_edit_handle_up_arrow();
- break;
- case 39:
- inline_edit_singleline_inputbox_next_character();
- break;
- case 40:
- inline_text_edit_handle_down_arrow();
- break;
- case 45:
- inline_edit_singleline_inputbox_toggle_insert_mode();
- break;
- case 46:
- inline_edit_singleline_inputbox_delete_current_character();
- break;
- }
- }
- #else /* (MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32) */
- UI_UNUSED_PARAMETER(vkey_code);
- UI_UNUSED_PARAMETER(key_state);
- #endif /* (MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32) */
- }
- /*****************************************************************************
- * FUNCTION
- * register_inline_singleline_inputbox_keys
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void register_inline_singleline_inputbox_keys(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SetKeyHandler(inline_edit_singleline_inputbox_previous_character, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(inline_edit_singleline_inputbox_next_character, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- /* SetKeyHandler(inline_edit_singleline_inputbox_delete_character,KEY_CLEAR,KEY_EVENT_DOWN); */
- register_keyboard_key_handler(inline_singleline_inputbox_key_handler);
- }
- /*****************************************************************************
- * FUNCTION
- * inline_singleline_inputbox_test_change_input_mode
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- *
- *****************************************************************************/
- U8 inline_singleline_inputbox_test_change_input_mode(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (MMI_inline_singleline_inputbox.flags & UI_SINGLE_LINE_INPUT_BOX_USE_ENCODING_BASED_LENGTH)
- {
- if (MMI_inline_singleline_inputbox.UCS2_count <= 0)
- {
- if ((MMI_inline_singleline_inputbox.flags & UI_SINGLE_LINE_INPUT_BOX_ONE_LESS_CHARACTER) &&
- (MMI_inline_singleline_inputbox.text_length >=
- ((MMI_inline_singleline_inputbox.available_length >> 1) - 1)))
- {
- return (0);
- }
- else if (MMI_inline_singleline_inputbox.text_length >=
- (MMI_inline_singleline_inputbox.available_length >> 1))
- {
- return (0);
- }
- else
- {
- return (1);
- }
- }
- else
- {
- return (1);
- }
- }
- else
- {
- return (1);
- }
- }
- void wgui_hide_inline_input_method(void);
- void wgui_display_inline_input_method(void);
- /*****************************************************************************
- * FUNCTION
- * handle_inline_text_edit_complete
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void handle_inline_text_edit_complete(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 input_type = current_wgui_inline_text_edit_item->input_type & INPUT_TYPE_MASK;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- reset_inline_singleline_inputbox();
- current_wgui_inline_text_edit_item->UCS2_count = MMI_inline_singleline_inputbox.UCS2_count;
- register_inline_fixed_list_keys();
- gui_strcpy(
- (UI_string_type) current_wgui_inline_text_edit_item->buffer,
- (UI_string_type) wgui_inline_text_edit_buffer);
- if ((input_type == INPUT_TYPE_NUMERIC_PASSWORD) || (input_type == INPUT_TYPE_ALPHANUMERIC_PASSWORD) ||
- (input_type == INPUT_TYPE_SAT_NUMERIC_PASSWORD))
- {
- inline_edit_prepare_mask_buffer(
- current_wgui_inline_text_edit_item->buffer,
- current_wgui_inline_text_edit_item->mask_buffer);
- *current_wgui_inline_text_edit_text_p = current_wgui_inline_text_edit_item->mask_buffer;
- }
- else
- {
- /* PMT MANISH START 20050722 */
- #ifdef __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__
- if ((IsInlineItemDefaultTextEnable()) &&
- (gui_strlen((UI_string_type) current_wgui_inline_text_edit_item->buffer) == 0))
- {
- *current_wgui_inline_text_edit_text_p = current_wgui_inline_text_edit_item->default_item_text;
- }
- else
- #endif /* __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__ */
- /* PMT MANISH END 20050722 */
- *current_wgui_inline_text_edit_text_p = current_wgui_inline_text_edit_item->buffer;
- /* PMT MANISH START 20050722 */
- #ifdef __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__
- MMI_fixed_icontext_menuitems[wgui_inline_item_highlighted_index].item_text =
- (UI_string_type) (*current_wgui_inline_text_edit_text_p);
- #endif /* __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__ */
- /* PMT MANISH END 20050722 */
- }
- inline_text_edit_RSK_function = NULL;
- clear_left_softkey();
- clear_right_softkey();
- #if defined(__MMI_TOUCH_SCREEN__) || defined(__MMI_HANDWRITING_PAD__)
- mmi_pen_editor_close_input_box();
- #endif
- wgui_inline_item_handled = 0;
- current_wgui_inline_text_edit_item->edit_complete_callback(
- current_wgui_inline_text_edit_item->buffer,
- current_wgui_inline_text_edit_item->buffer_size);
- redraw_current_inline_item = UI_dummy_function;
- wgui_inputbox_UCS2_count_function = NULL;
- wgui_inputbox_not_empty_callback = NULL;
- wgui_inputbox_empty_callback = NULL;
- wgui_inputbox_validation_callback = NULL;
- complete_inline_item_edit = UI_dummy_function;
- test_change_input_mode = NULL;
- MMI_allow_only_english_input_modes = 0;
- /*
- * MTK Elvis Because we use wgui_current_inline_item_type(wgui_get_inline_history)
- * * to check which inline data struct(inline text edit or full screen edit) history
- * * will be stored in history, we have to reset it while switching to other inline item.
- * * Otherwise, if other inline item(INLINE_ITEM_TYPE_FULL_SCREEN_EDIT) is not set wgui_current_inline_item_type, then
- * * wgui_current_inline_item_type keeps the old setting and causes not required input box history be stored in history
- * * One example:
- * * 1. In PHB email inline editing box wgui_current_inline_item_type= INLINE_ITEM_TYPE_TEXT_EDIT and input_type is abc
- * * 2. goto previous one item(full screen edit while pressing LSK"Edit")
- * * 3. At this momnet, charger in and cuase the INLINE_ITEM_TYPE_TEXT_EDIT(input method is abc) stored in history
- * * 4. goto previous item(home number editing box)
- * * 5. the history is re-stored into current inline text editing box
- * * 6. the input method is abc, but 123
- */
- //W05.33 Fix inline text edit history issue
- //wgui_current_inline_item_type = 0;
- //MTK end
- //gui_cancel_timer(UI_inputbox_blink_cursor);
- //MTK Elvis
- StopMyTimer(BLINKING_CURSOR);
- /* MTK end */
- gui_cancel_timer(wgui_hide_inline_input_method);
- gui_cancel_timer(wgui_display_inline_input_method);
- /* MTK Terry for Firefly #189 */
- gui_cancel_timer(inline_edit_phone_number_input_complete_multitap_star_key);
- gui_cancel_timer(inline_edit_phone_number_input_complete_multitap_zero_key);
- /* MTK end */
- /* W05.36 Fix Vietnamese Tone Input Issue */
- set_current_input_box_type(EDITOR_NONE_INPUT_BOX);
- #if defined(__MMI_TOUCH_SCREEN__)
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_EMPTY_TRAY);
- //W06.09 Draw Center Softkey when entering new screen
- //But in in-line editor, redrawing is needed when completing in-line item
- #ifdef __MMI_WGUI_CSK_ENABLE__
- redraw_softkey(MMI_CENTER_SOFTKEY);
- #endif
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- //MTK Leo add 0511, to reduce stack size
- // draw_title();
- //MTK Leo end
- }
- /*****************************************************************************
- * FUNCTION
- * handle_inline_text_edit_cancel
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void handle_inline_text_edit_cancel(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- reset_inline_singleline_inputbox();
- register_inline_fixed_list_keys();
- inline_text_edit_RSK_function = NULL;
- clear_left_softkey();
- clear_right_softkey();
- #if defined(__MMI_TOUCH_SCREEN__) || defined(__MMI_HANDWRITING_PAD__)
- mmi_pen_editor_close_input_box();
- #endif
- wgui_inline_item_handled = 0;
- wgui_text_menuitem_restart_scrolling();
- show_fixed_list();
- inline_edit_current_highlight_handler(wgui_inline_item_highlighted_index);
- redraw_current_inline_item = UI_dummy_function;
- wgui_inputbox_UCS2_count_function = NULL;
- wgui_inputbox_not_empty_callback = NULL;
- wgui_inputbox_empty_callback = NULL;
- wgui_inputbox_validation_callback = NULL;
- complete_inline_item_edit = UI_dummy_function;
- test_change_input_mode = NULL;
- MMI_allow_only_english_input_modes = 0;
- //gui_cancel_timer(UI_inputbox_blink_cursor);
- //MTK Elvis
- StopMyTimer(BLINKING_CURSOR);
- /* MTK end */
- gui_cancel_timer(wgui_hide_inline_input_method);
- gui_cancel_timer(wgui_display_inline_input_method);
- /* W05.36 Fix Vietnamese Tone Input Issue */
- set_current_input_box_type(EDITOR_NONE_INPUT_BOX);
- #if defined(__MMI_TOUCH_SCREEN__)
- wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_EMPTY_TRAY);
- //W06.09 Draw Center Softkey when entering new screen
- //But in in-line editor, redrawing is needed when completing in-line item
- #ifdef __MMI_WGUI_CSK_ENABLE__
- redraw_softkey(MMI_CENTER_SOFTKEY);
- #endif
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- //MTK Leo add 0511, to reduce stack size
- // draw_title();
- //MTK Leo end
- }
- /* Clear / Back RSK functionality handling for inline text edit */
- /*****************************************************************************
- * FUNCTION
- * handle_inline_text_edit_right_softkey_down
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void handle_inline_text_edit_right_softkey_down(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (wgui_inline_singleline_inputbox_decimal_input_mode_flag)
- {
- if (wgui_inline_singleline_inputbox_decimal_flag)
- {
- UI_buffer_type p = MMI_inline_singleline_inputbox.current_text_p;
- UI_character_type c;
- if (p != MMI_inline_singleline_inputbox.text)
- {
- UI_STRING_GET_PREVIOUS_CHARACTER(p, c);
- if (c == (UI_character_type) '.')
- {
- wgui_inline_singleline_inputbox_decimal_flag = 0;
- }
- }
- }
- if (gui_single_line_input_box_get_text_length(&MMI_inline_singleline_inputbox) > 0)
- {
- inline_edit_singleline_inputbox_delete_character();
- }
- }
- else
- {
- if (gui_single_line_input_box_get_text_length(&MMI_inline_singleline_inputbox) > 0)
- {
- inline_edit_singleline_inputbox_delete_character();
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * handle_inline_text_edit_right_softkey_up
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void handle_inline_text_edit_right_softkey_up(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (inline_text_edit_RSK_function != NULL)
- {
- inline_text_edit_RSK_function();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * register_inline_text_edit_handle_right_softkey_up
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void register_inline_text_edit_handle_right_softkey_up(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- set_right_softkey_function(handle_inline_text_edit_right_softkey_up, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * register_inline_text_edit_handle_clear_key_up
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void register_inline_text_edit_handle_clear_key_up(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SetKeyHandler(handle_inline_text_edit_right_softkey_up, KEY_CLEAR, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * handle_inline_text_edit_right_softkey_long_press
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void handle_inline_text_edit_right_softkey_long_press(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- inline_edit_singleline_inputbox_delete_all_characters();
- if (wgui_inline_singleline_inputbox_decimal_input_mode_flag)
- {
- wgui_inline_singleline_inputbox_decimal_flag = 0;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * handle_inline_text_edit_input
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void handle_inline_text_edit_input(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (gui_single_line_input_box_get_text_length(&MMI_inline_singleline_inputbox) > 0)
- {
- #ifdef __MMI_WITH_C_KEY__
- /* MTK for RSK display with C Key */
- /* Need to consider wgui_inline_list_menu_disable_done */
- if (wgui_inline_list_menu_changed && !(wgui_inline_list_menu_disable_done))
- {
- set_right_softkey_label(NULL);
- set_right_softkey_icon(NULL);
- /* PMT VIKAS START 20050707 */
- #ifdef __MMI_UI_DALMATIAN_SOFTKEYS__
- /* To show proper key arrangement */
- show_softkey_background();
- redraw_left_softkey();
- #endif /* __MMI_UI_DALMATIAN_SOFTKEYS__ */
- /* PMT VIKAS END 20050707 */
- redraw_right_softkey();
- }
- if (inline_text_edit_RSK_label_clear == 0)
- {
- //reset_right_softkey();
- //set_right_softkey_label(NULL);
- //set_right_softkey_icon(NULL);
- //redraw_right_softkey();
- if (wgui_inputbox_not_empty_callback != NULL)
- {
- wgui_inputbox_not_empty_callback();
- }
- inline_text_edit_RSK_label_clear = 1;
- SetKeyHandler(handle_inline_text_edit_right_softkey_down, KEY_CLEAR, KEY_EVENT_DOWN);
- SetKeyHandler(UI_dummy_function, KEY_CLEAR, KEY_EVENT_UP);
- SetKeyHandler(handle_inline_text_edit_right_softkey_long_press, KEY_CLEAR, KEY_EVENT_LONG_PRESS);
- }
- #else /* __MMI_WITH_C_KEY__ */
- if (inline_text_edit_RSK_label_clear == 0)
- {
- set_right_softkey_label((UI_string_type) get_string(WGUI_CATEGORY_CLEAR_STRING_ID));
- set_right_softkey_icon(NULL);
- if (wgui_inputbox_not_empty_callback != NULL)
- {
- wgui_inputbox_not_empty_callback();
- }
- register_right_softkey_handler();
- redraw_right_softkey();
- inline_text_edit_RSK_label_clear = 1;
- set_right_softkey_function(UI_dummy_function, KEY_EVENT_UP);
- set_right_softkey_function(handle_inline_text_edit_right_softkey_down, KEY_EVENT_DOWN);
- }
- #endif /* __MMI_WITH_C_KEY__ */
- }
- else
- {
- if (inline_text_edit_RSK_label_clear == 1)
- {
- if (wgui_inline_list_menu_changed)
- {
- wgui_inline_text_edit_set_RSK_BACK_function();
- inline_text_edit_RSK_label_clear = 0;
- if (wgui_inputbox_empty_callback != NULL)
- {
- wgui_inputbox_empty_callback();
- }
- }
- else
- {
- #if defined(__MMI_WITH_C_KEY__)
- /* MTK Terry butterfly_836 #420 */
- if (wgui_inputbox_empty_callback != NULL)
- {
- wgui_inputbox_empty_callback();
- }
- inline_text_edit_RSK_label_clear = 0;
- SetKeyHandler(UI_dummy_function, KEY_CLEAR, KEY_EVENT_DOWN);
- SetKeyHandler(register_inline_text_edit_handle_clear_key_up, KEY_CLEAR, KEY_EVENT_UP);
- SetKeyHandler(UI_dummy_function, KEY_CLEAR, KEY_EVENT_LONG_PRESS);
- #else /* defined(__MMI_WITH_C_KEY__) */
- set_right_softkey_label(inline_text_edit_RSK_label_string);
- set_right_softkey_icon(inline_text_edit_RSK_label_icon);
- if (wgui_inputbox_empty_callback != NULL)
- {
- wgui_inputbox_empty_callback();
- }
- register_right_softkey_handler();
- redraw_right_softkey();
- inline_text_edit_RSK_label_clear = 0;
- set_right_softkey_function(register_inline_text_edit_handle_right_softkey_up, KEY_EVENT_UP);
- set_right_softkey_function(UI_dummy_function, KEY_EVENT_DOWN);
- #endif /* defined(__MMI_WITH_C_KEY__) */
- }
- }
- }
- #if(0)
- if (pixtel_UI_single_line_input_box_test_first_position(&MMI_inline_singleline_inputbox))
- {
- if (inline_text_edit_RSK_label_clear == 1)
- {
- if (wgui_inline_list_menu_changed)
- {
- wgui_inline_text_edit_set_RSK_BACK_function();
- inline_text_edit_RSK_label_clear = 0;
- }
- else
- {
- set_right_softkey_label(inline_text_edit_RSK_label_string);
- set_right_softkey_icon(inline_text_edit_RSK_label_icon);
- register_right_softkey_handler();
- redraw_right_softkey();
- inline_text_edit_RSK_label_clear = 0;
- set_right_softkey_function(register_inline_text_edit_handle_right_softkey_up, KEY_EVENT_UP);
- set_right_softkey_function(UI_dummy_function, KEY_EVENT_DOWN);
- }
- }
- }
- #endif /* (0) */
- if (MMI_inline_singleline_inputbox.flags & UI_SINGLE_LINE_INPUT_BOX_PLUS_CHARACTER_HANDLING)
- {
- if (MMI_inline_singleline_inputbox.text[0] == '+')
- {
- MMI_inline_singleline_inputbox.available_length =
- (wgui_inline_singleline_inputbox_buffer_size + 1) * ENCODING_LENGTH;
- }
- else
- {
- MMI_inline_singleline_inputbox.available_length =
- wgui_inline_singleline_inputbox_buffer_size * ENCODING_LENGTH;
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * handle_inline_text_edit_navigate
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void handle_inline_text_edit_navigate(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (gui_single_line_input_box_test_first_position(&MMI_inline_singleline_inputbox))
- {
- if (inline_text_edit_RSK_label_clear == 1)
- {
- if (wgui_inline_list_menu_changed)
- {
- wgui_inline_text_edit_set_RSK_BACK_function();
- inline_text_edit_RSK_label_clear = 0;
- }
- else
- {
- set_right_softkey_label(inline_text_edit_RSK_label_string);
- set_right_softkey_icon(inline_text_edit_RSK_label_icon);
- register_right_softkey_handler();
- redraw_right_softkey();
- inline_text_edit_RSK_label_clear = 0;
- set_right_softkey_function(handle_inline_text_edit_right_softkey_up, KEY_EVENT_UP);
- set_right_softkey_function(UI_dummy_function, KEY_EVENT_DOWN);
- }
- }
- }
- else
- {
- if (inline_text_edit_RSK_label_clear == 0)
- {
- set_right_softkey_label((UI_string_type) get_string(WGUI_CATEGORY_CLEAR_STRING_ID));
- set_right_softkey_icon(NULL);
- register_right_softkey_handler();
- redraw_right_softkey();
- inline_text_edit_RSK_label_clear = 1;
- set_right_softkey_function(UI_dummy_function, KEY_EVENT_UP);
- set_right_softkey_function(handle_inline_text_edit_right_softkey_down, KEY_EVENT_DOWN);
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * inline_text_edit_handle_multitap_input_complete
- * DESCRIPTION
- *
- * PARAMETERS
- * type [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void inline_text_edit_handle_multitap_input_complete(S32 type)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (wgui_inline_text_edit_active_multitap == WGUI_INLINE_TEXT_EDIT_MULTITAP_NONE)
- {
- return;
- }
- switch (wgui_inline_text_edit_active_multitap)
- {
- case WGUI_INLINE_TEXT_EDIT_MULTITAP_STAR:
- if (type == WGUI_INLINE_TEXT_EDIT_MULTITAP_STAR)
- {
- return;
- }
- if (MMI_inline_singleline_inputbox.flags & UI_SINGLE_LINE_INPUT_BOX_STATE_MULTITAP)
- {
- gui_cancel_timer(inline_edit_phone_number_input_complete_multitap_star_key);
- gui_multitap_input_complete(&wgui_inline_text_edit_multitap_star_key);
- }
- break;
- /* MTK Elvis */
- case WGUI_INLINE_TEXT_EDIT_MULTITAP_ZERO:
- if (type == WGUI_INLINE_TEXT_EDIT_MULTITAP_ZERO)
- {
- return;
- }
- if (MMI_inline_singleline_inputbox.flags & UI_SINGLE_LINE_INPUT_BOX_STATE_MULTITAP)
- {
- gui_cancel_timer(inline_edit_phone_number_input_complete_multitap_zero_key);
- gui_multitap_input_complete(&wgui_inline_text_edit_multitap_zero_key);
- }
- break;
- /* MTK Elvis */
- }
- wgui_inline_text_edit_active_multitap = WGUI_INLINE_TEXT_EDIT_MULTITAP_NONE;
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_phone_number_input_complete_multitap_star_key
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_phone_number_input_complete_multitap_star_key(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_multitap_input_complete(&wgui_inline_text_edit_multitap_star_key);
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_phone_number_input_handle_multitap_star_key_down
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_phone_number_input_handle_multitap_star_key_down(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- inline_text_edit_handle_multitap_input_complete(WGUI_INLINE_TEXT_EDIT_MULTITAP_STAR);
- wgui_inline_text_edit_active_multitap = WGUI_INLINE_TEXT_EDIT_MULTITAP_STAR;
- gui_change_multitap_input_state(&wgui_inline_text_edit_multitap_star_key);
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_phone_number_input_handle_multitap_star_key_up
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_phone_number_input_handle_multitap_star_key_up(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_start_timer(MMI_MULTITAP_TIMEOUT, inline_edit_phone_number_input_complete_multitap_star_key);
- }
- /* MTK Elvis */
- extern void MMI_key_0_down(void);
- extern void MMI_key_0_up(void);
- /*****************************************************************************
- * FUNCTION
- * inline_edit_phone_number_input_complete_multitap_zero_key
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_phone_number_input_complete_multitap_zero_key(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_multitap_input_complete(&wgui_inline_text_edit_multitap_zero_key);
- SetKeyHandler(MMI_key_0_down, KEY_0, KEY_EVENT_DOWN);
- SetKeyHandler(MMI_key_0_down, KEY_0, KEY_REPEAT);
- SetKeyHandler(MMI_key_0_up, KEY_0, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_phone_number_input_handle_multitap_zero_key_down
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_phone_number_input_handle_multitap_zero_key_down(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- inline_text_edit_handle_multitap_input_complete(WGUI_INLINE_TEXT_EDIT_MULTITAP_ZERO);
- wgui_inline_text_edit_active_multitap = WGUI_INLINE_TEXT_EDIT_MULTITAP_ZERO;
- gui_change_multitap_input_state(&wgui_inline_text_edit_multitap_zero_key);
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_phone_number_input_handle_multitap_zero_key_up
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_phone_number_input_handle_multitap_zero_key_up(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_start_timer(MMI_MULTITAP_TIMEOUT + 400, inline_edit_phone_number_input_complete_multitap_zero_key);
- }
- /*****************************************************************************
- * FUNCTION
- * inline_edit_phone_number_input_handle_zero_key_long_press
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_phone_number_input_handle_zero_key_long_press(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SetKeyHandler(UI_dummy_function, KEY_0, KEY_REPEAT);
- inline_edit_singleline_inputbox_delete_character();
- inline_edit_phone_number_input_handle_multitap_zero_key_down();
- SetKeyHandler(inline_edit_phone_number_input_handle_multitap_zero_key_down, KEY_0, KEY_EVENT_DOWN);
- SetKeyHandler(inline_edit_phone_number_input_handle_multitap_zero_key_up, KEY_0, KEY_EVENT_UP);
- }
- /* MTK end */
- /*****************************************************************************
- * FUNCTION
- * inline_edit_phone_number_input_handle_hash_key_down
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_phone_number_input_handle_hash_key_down(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- inline_text_edit_handle_multitap_input_complete(WGUI_INLINE_TEXT_EDIT_MULTITAP_ANY);
- inline_edit_singleline_inputbox_direct_input((UI_character_type) '#');
- }
- /* MTK Elvis */
- /*****************************************************************************
- * FUNCTION
- * inline_edit_phone_number_input_handle_star_key_down
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void inline_edit_phone_number_input_handle_star_key_down(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- inline_text_edit_handle_multitap_input_complete(WGUI_INLINE_TEXT_EDIT_MULTITAP_ANY);
- inline_edit_singleline_inputbox_direct_input((UI_character_type) '*');
- }
- /* MTK end */