wgui_inline_edit.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:887k
源码类别:
MTK
开发平台:
C/C++
- /*****************************************************************************
- * Copyright Statement:
- * --------------------
- * This software is protected by Copyright and the information contained
- * herein is confidential. The software may not be copied and the information
- * contained herein may not be used or disclosed except with the written
- * permission of MediaTek Inc. (C) 2005
- *
- * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
- * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
- * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
- * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
- * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
- * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
- * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
- * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
- * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
- * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
- *
- * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
- * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
- * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
- * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
- * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
- *
- * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
- * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
- * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
- * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
- * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
- *
- *****************************************************************************/
- /*****************************************************************************
- *
- * Filename:
- * ---------
- * wgui_inline_edit.C
- *
- * Project:
- * --------
- * MAUI
- *
- * Description:
- * ------------
- * Functions for Inline items.
- *
- * Author:
- * -------
- * -------
- * -------
- * -------
- *
- *============================================================================
- * HISTORY
- * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *------------------------------------------------------------------------------
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- ****************************************************************************/
- /**
- * Copyright Notice
- * (c) 2002 - 2003, Pixtel Communications, Inc., 1489 43rd Ave. W.,
- * Vancouver, B.C. V6M 4K8 Canada. All Rights Reserved.
- * (It is illegal to remove this copyright notice from this software or any
- * portion of it)
- */
- /**********************************************************************************
- Filename: wgui_inline_edit.c
- Author: manju
- Date Created: June-17-2003
- Contains: Implementation for inline editing
- **********************************************************************************/
- #include "GlobalDefs.h"
- #include "CustDataRes.h"
- #include "CustDataProts.h"
- #include "gui_themes.h"
- #include "gui_config.h"
- #include "wgui_categories.h"
- #include "wgui_status_icons.h"
- #include "wgui_datetime.h"
- #include "MMI_features.h"
- #include "TimerEvents.h"
- #include "DebugInitDef.h"
- /* MTK Leo add 20040413, add category257 for currency convertor */
- #include "HistoryGprot.h"
- #include "wgui_inline_edit.h"
- #include "wgui_categories_inputs.h"
- #include "wgui_categories_defs.h"
- #include "CommonScreens.h"
- #include "gui_setting.h"
- /* W05.36 Temp Solution for Pop Screen in Full Screen Editor */
- #include "wap.h"
- #include "pocgprot.h"
- #include "messagesresourcedata.h"
- #include "satdefs.h"
- #include "wgui_draw_manager.h"
- #include "wgui_virtual_keyboard.h"
- #if defined(__MMI_TOUCH_SCREEN__) || defined(__MMI_HANDWRITING_PAD__)
- #include "EditorPen.h"
- static BOOL mmi_pen_editor_is_closecategory57;
- #endif /* defined(__MMI_TOUCH_SCREEN__) || defined(__MMI_HANDWRITING_PAD__) */
- /* MTK Elvis */
- extern U16 StopMyTimer(U16 nTimerId);
- extern U16 StartMyTimerInt(U16 nTimerId, U32 nTimeDuration, oslTimerFuncPtr TimerExpiry, U8 alignment);
- /* MTK end */
- /* MTK Elvis for R2L characters */
- extern BOOL r2lMMIFlag;
- /* MTK end */
- /* 041205 Calvin added */
- extern GDI_HANDLE MOMT_animation_handle;
- /* 041205 Calvin end */
- /* MTK Terry for 0x81 encoding support for Phone Book */
- extern S16 MMI_current_input_ext_type;
- extern U8 MMI_allow_only_english_input_modes;
- /* MTK Add By Elvis for T9Init declare */
- /*
- * #ifdef __MMI_T9__
- * extern void (*t9_inputbox_LSK_function)(void);
- * extern void InuptMethodEnterCategory5(void);
- * //MTK Elvis 20040521 ---patch for inline multiline input box
- * //Leo 0530extern void InuptMethodEnterInlineMultilineScreen(void);
- * //MTK end
- * #elif defined __MMI_ZI__
- * extern void (*zi_inputbox_LSK_function)(void);
- * extern void ZiInuptMethodEnterCategory5(void);
- * #elif defined __MMI_KA__
- * extern void (*ka_inputbox_LSK_function)(void);
- * extern void KonkaInuptMethodEnterCategory5(void);
- * #elif defined __MMI_ITAP__
- * extern void (*itap_inputbox_LSK_function)(void);
- * extern void ItapInuptMethodEnterCategory5(void);
- * #endif
- */
- /* MTK end */
- #ifdef __MMI_T9__
- #include "t9definition.h"
- #include "t9api.h"
- extern void T9SetInputboxLSKFunction(FuncPtr f);
- extern void InuptMethodEnterCategory5(void);
- extern void InuptMethodExitCategory5(void);
- extern void T9InputMethodExit(void);
- #elif defined __MMI_ZI__
- extern void ZiSetInputboxLSKFunction(FuncPtr f);
- extern void ZiInuptMethodEnterSinglelineInputBox(void);
- extern void ZiInuptMethodExitSinglelineInputBox(void);
- extern void ZiInuptMethodEnterCategory5(void);
- extern void ZiInuptMethodExitCategory5(void);
- extern void ZiInputMethodExit(void);
- //KP Jerry add on 2007-3-8 start
- #elif defined __MMI_CSTAR__
- #include "cstarime.h"
- //KP Jerry add on 2007-3-8 end
- #elif defined __MMI_KA__
- extern void KonKaSetInputboxLSKFunction(FuncPtr f);
- extern void KonkaInuptMethodEnterSinglelineInputBox(void);
- extern void KonkaInuptMethodExitSinglelineInputBox(void);
- extern void KonkaInuptMethodEnterCategory5(void);
- extern void KonkaInuptMethodExitCategory5(void);
- extern void KonkaInputMethodExit(void);
- #elif defined __MMI_ITAP__
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- #endif
- /* MTK Elvis for multitap zero key */
- #ifdef __MMI_MULTITAP_KEY_0__
- #define ENABLE_DIALER_ZERO_KEY_MULTITAP 1 /* 0 */
- #else
- #define ENABLE_DIALER_ZERO_KEY_MULTITAP 0
- #endif
- /* MTK end */
- /* Amount of time (milliseconds) to wait before displaying the
- current input method pop up for inline text edit items */
- #define INLINE_INPUT_METHOD_DISPLAY_WAIT (1000)
- /* Amount of time (milliseconds) to display the current input method */
- #define INLINE_INPUT_METHOD_HIDE_WAIT (2000)
- /*----------------------------------------------------------------------------
- Inline edit data
- ----------------------------------------------------------------------------*/
- /* 072904 Calvin moved for centralized control */
- // #define ENABLE_INLINE_SINGLELINE_INPUTBOX_FRAME_SKIPPING 1
- /* Calvin end */
- /* History IDs for inline items */
- #define INLINE_TEXT_EDIT_HISTORY_ID 1
- #define INLINE_SELECT_HISTORY_ID 3
- #define INLINE_USER_DEFINED_SELECT_HISTORY_ID 4
- #define INLINE_DATE_HISTORY_ID 5
- #define INLINE_TIME_HISTORY_ID 6
- #define INLINE_DOW_SELECT_HISTORY_ID 7
- #define INLINE_TIME_PERIOD_HISTORY_ID 8
- #define INLINE_IP4_HISTORY_ID 9
- #define INLINE_FULL_SCREEN_EDIT_HISTORY_ID 10
- #define INLINE_MULTI_LINE_EDIT_HISTORY_ID 11
- #define INLINE_COLOR_SELECT_SCREEN_ID 12
- wgui_inline_item wgui_inline_items[MAX_INLINE_ITEMS];
- wgui_inline_item *current_wgui_inline_item = NULL;
- /* Start Yogesh 20040816 */
- extern pBOOL flag_use_current_input_type;
- //End Yogesh 20040816
- //PMT VIKAS START 20050707
- #ifdef __MMI_UI_DALMATIAN_FIXEDLIST__
- extern void gui_disable_inline_bottom_line_draw(void);
- extern void gui_enable_inline_bottom_line_draw(void);
- extern void gui_enable_fixed_list_line_draw();
- extern void gui_disable_fixed_list_line_draw(void);
- extern BOOL line_draw;
- #endif /* __MMI_UI_DALMATIAN_FIXEDLIST__ */
- /* PMT VIKAS END 20050707 */
- S32 wgui_n_inline_items = 0;
- S32 wgui_inline_item_highlighted_index = -1;
- S32 wgui_inline_item_key_code = -1;
- S32 wgui_inline_item_key_event = -1;
- S32 wgui_inline_item_x = 0;
- S32 wgui_inline_item_y = 0;
- S32 wgui_inline_item_width = 0;
- S32 wgui_inline_item_height = 0;
- U8 wgui_inline_item_handled = 0;
- S32 wgui_current_inline_item_type = 0;
- U8 *wgui_current_history_buffer = NULL;
- U8 wgui_disable_inline_input_method_hints = 1;
- #if defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__)
- S8 MMI_multi_line_inputbox_present = 0;
- #endif
- /* Added to handle (Back/Done) on RSK */
- U8 wgui_inline_list_menu_changed = 0;
- U8 wgui_inline_list_menu_disable_done = 0;
- void (*wgui_inline_edit_BACK_function) (void) = NULL;
- void (*wgui_inline_edit_DONE_function) (void) = NULL;
- void (*wgui_inline_edit_LSK_function) (void) = NULL;
- extern UI_single_line_input_box_theme date_time_input_theme;
- extern UI_filled_area date_time_input_background_filler;
- extern UI_filled_area time_period_input_background_filler;
- extern void set_current_input_box_type(mmi_editor_inoutbox_enum input_box_type);
- #define MAX_INLINE_TEXT_EDIT_ITEMS 15
- #define MAX_INLINE_TEXT_EDIT_BUFFER_SIZE 124 /* For Email */
- /* Pixtel - Gurinder - 3/24/2004 To Support Signature Control. */
- #define MAX_INLINE_FULL_SCREEN_TEXT_EDIT_BUFFER_SIZE 512
- S32 n_inline_text_edit_items = 0;
- S8 inline_multiline_complete = 0;
- wgui_inline_item_text_edit wgui_inline_text_edit_items[MAX_INLINE_TEXT_EDIT_ITEMS];
- U8 inline_text_edit_mask_buffers[MAX_INLINE_TEXT_EDIT_ITEMS][MAX_INLINE_TEXT_EDIT_BUFFER_SIZE];
- UI_string_type inline_full_screen_edit_saved_title = (UI_string_type) NULL;
- UI_string_type inline_full_screen_edit_saved_LSK_label = (UI_string_type) NULL;
- UI_string_type inline_full_screen_edit_saved_RSK_label = (UI_string_type) NULL;
- PU8 inline_full_screen_edit_saved_LSK_icon = (PU8) NULL;
- PU8 inline_full_screen_edit_saved_RSK_icon = (PU8) NULL;
- PU8 inline_full_screen_edit_saved_title_icon = (PU8) NULL;
- U8 inline_full_screen_edit_changed = 0;
- wgui_inline_item_text_edit *current_wgui_inline_text_edit_item;
- U8 **current_wgui_inline_text_edit_text_p;
- U8 wgui_inline_full_screen_text_edit_buffer[MAX_INLINE_FULL_SCREEN_TEXT_EDIT_BUFFER_SIZE];
- void handle_inline_full_screen_edit_cancel(void);
- void inline_edit_prepare_mask_buffer(U8 *, U8 *);
- void wgui_inline_edit_handle_multiline_inputbox_input(void);
- void handle_inline_full_screen_edit_complete(void);
- void handle_inline_full_screen_edit_close(void);
- void wgui_inline_edit_default_list_highlight_handler(S32 item_index);
- /** New Image Text Control ***/
- #if defined __MMI_PLUTO_GPRS__
- #define MAX_INLINE_IMAGE_TEXT_ITEMS 10
- /* Issue: Email: 144 - Gurinder 30/4/2004 */
- #define IMAGE_TEXT_CONTROL_TEXT_X 26
- #define IMAGE_TEXT_CONTROL_TEXT_WIDTH 83
- U8 inline_scroll_flag = FALSE;
- S32 image_text_control_scroll_x = 0;
- scrolling_text wgui_inline_scroll_text;
- PU8 inline_last_image = NULL;
- S32 inline_y_pos_image = 0;
- U8 inline_image_text_edit_flag = 0;
- void draw_image_text_control(
- wgui_inline_image_text *control,
- S32 x1,
- S32 y1,
- S32 iwidth,
- S32 iheight,
- PU8 image1,
- PU8 image2,
- PU8 image3,
- U8 *text,
- U8 highlight_flag);
- void wgui_show_image_text_item(S32 x1, S32 y1, S32 iwidth, S32 iheight, wgui_inline_item *item);
- wgui_inline_image_text wgui_inline_image_text_items[MAX_INLINE_IMAGE_TEXT_ITEMS];
- wgui_inline_image_text *current_image_text_control = NULL;
- S32 n_inline_image_text = 0;
- void handle_inline_full_screen_edit(
- S32 x,
- S32 y,
- S32 width,
- S32 height,
- S32 key_code,
- S32 key_event,
- U8 **text_p,
- void *item,
- U32 flags,
- U8 *history_buffer);
- void handle_inline_full_screen_imagetext_edit(
- S32 x,
- S32 y,
- S32 width,
- S32 height,
- S32 key_code,
- S32 key_event,
- U8 **text_p,
- void *item,
- U32 flags,
- U8 *history_buffer);
- #endif /* defined __MMI_PLUTO_GPRS__ */
- #ifdef __MMI_TOUCH_SCREEN__
- typedef enum
- {
- /* Ignore pen events */
- WGUI_INLINE_PEN_HANDLER_NONE,
- /* Prepare to change highlight on Pen Up. Do nothing else. */
- WGUI_INLINE_PEN_HANDLER_SWITCH_ITEM,
- /* Redirect pen events to scrollbar */
- WGUI_INLINE_PEN_HANDLER_SCROLLBAR,
- /* Redirect pen events to the current menu item */
- WGUI_INLINE_PEN_HANDLER_CURRENT_ITEM,
- /* Wait long press animation to invoke LSK */
- WGUI_INLINE_PEN_HANDLER_WAIT_LONGPRESS,
- /* Redirect pen events to fullscreen editor */
- WGUI_INLINE_PEN_HANDLER_FULLSCREEN_EDITOR
- } wgui_inline_pen_handler_type_enum;
- static wgui_inline_pen_handler_type_enum wgui_inline_pen_handler_type;
- static S32 wgui_inline_pen_down_item_index;
- static BOOL(*wgui_current_inline_item_pen_function) (mmi_pen_event_type_enum pen_event, S16 x, S16 y,
- gui_inline_item_pen_enum *item_event) =
- UI_dummy_inline_item_pen_function;
- #endif /* __MMI_TOUCH_SCREEN__ */
- /* 101105 inline Calvin Start */
- #if defined (__MMI_WALLPAPER_ON_BOTTOM__)
- static MMI_ID_TYPE inline_edit_scr_bg_ID;
- static S8 *inline_edit_scr_bg_filename;
- static S32 inline_edit_scr_bg_x, inline_edit_scr_bg_y;
- static U8 inline_edit_scr_bg_opacity;
- #endif /* defined (__MMI_WALLPAPER_ON_BOTTOM__) */
- /* 101105 Calvin End */
- extern icontext_button MMI_softkeys[];
- /* MTK Leo start 20051001, for sending inline items' change notify to application */
- static void (*inline_item_changed_handler) (U16 index);
- /* MTK Leo end */
- /************************/
- void redraw_inline_full_screen_edit(void);
- void inline_edit_phone_number_input_complete_multitap_star_key(void);
- /* MTK Elvis */
- void inline_edit_phone_number_input_complete_multitap_zero_key(void);
- /* MTK Elvis */
- void cat57_virtual_keypad_callback(void);
- /* Used to highlight the same item again after editing (ex: After return from full screen edit */
- void (*inline_edit_current_highlight_handler) (S32 item_index) = MMI_dummy_highlight_handler;
- UI_filled_area temp_inline_list_menu_background_filler =
- {
- UI_FILLED_AREA_TYPE_COLOR,
- UI_NULL_IMAGE,
- NULL,
- /* MTK Leo modify 0912 */
- #ifdef __MMI_DEFAULT_THEME_3__
- {206, 206, 206, 100},
- #else
- {240, 240, 240, 100},
- #endif
- /* MTK Leo end */
- {0, 0, 0, 0},
- {0, 0, 0, 100},
- {0, 0, 0, 0},
- 0
- };
- UI_filled_area temp_inline_list_menu_normal_item_filler = {UI_FILLED_AREA_TYPE_COLOR,
- UI_NULL_IMAGE,
- NULL,
- /* MTK Leo modify 0912 */
- #ifdef __MMI_DEFAULT_THEME_3__
- {206, 206, 206, 100},
- #else
- {240, 240, 240, 100},
- #endif
- /* MTK Leo end */
- {0, 0, 0, 0},
- {0, 0, 0, 0},
- {0, 0, 0, 0},
- 0
- };
- UI_filled_area temp_inline_list_menu_selected_item_filler = {UI_FILLED_AREA_TYPE_COLOR,
- UI_NULL_IMAGE,
- NULL,
- /* MTK Leo modify 0912 */
- #ifdef __MMI_DEFAULT_THEME_3__
- {255, 255, 255, 100},
- #else
- {167, 232, 93, 100},
- #endif
- /* MTK Leo end */
- {0, 0, 0, 0},
- {0, 0, 0, 0},
- {0, 0, 0, 0},
- 0
- };
- UI_filled_area temp_inline_list_menu_disabled_item_filler = {UI_FILLED_AREA_TYPE_COLOR,
- UI_NULL_IMAGE,
- NULL,
- {192, 192, 192, 100},
- {0, 0, 0, 0},
- {0, 0, 0, 0},
- {0, 0, 0, 0},
- 0
- };
- UI_fixed_list_menu_theme wgui_inline_fixed_list_menu_theme = { &temp_inline_list_menu_background_filler,
- &temp_inline_list_menu_background_filler,
- 5,
- UI_LIST_MENU_LOOP
- };
- UI_fixed_icontext_menuitem_theme wgui_inline_fixed_icontext_menuitem_theme =
- { &temp_inline_list_menu_normal_item_filler,
- &temp_inline_list_menu_disabled_item_filler,
- &temp_inline_list_menu_selected_item_filler,
- &temp_inline_list_menu_selected_item_filler,
- {0, 0, 0, 100},
- {0, 0, 0, 100},
- {0, 0, 0, 100},
- {0, 0, 0, 100},
- &MMI_default_font,
- UI_MENUITEM_CENTER_TEXT_Y | UI_MENUITEM_CENTER_ICON_Y
- };
- UI_filled_area temp_inline_select_menu_filler = {UI_FILLED_AREA_TYPE_COLOR,
- NULL,
- NULL,
- {71, 127, 255, 100},
- {0, 0, 0, 0},
- {0, 0, 0, 100},
- {0, 0, 0, 0},
- 0
- };
- UI_horizontal_select_theme temp_inline_select_menu_theme = { &temp_inline_select_menu_filler,
- UI_HORIZONTAL_SELECT_LOOP,
- };
- UI_fixed_text_menuitem_theme wgui_inline_select_fixed_text_menuitem_theme = { &temp_inline_list_menu_normal_item_filler,
- &temp_inline_list_menu_disabled_item_filler,
- &temp_inline_list_menu_selected_item_filler,
- &temp_inline_list_menu_selected_item_filler,
- {0, 0, 0, 100},
- {0, 0, 0, 100},
- {0, 0, 0, 100},
- {0, 0, 0, 100},
- &MMI_default_font,
- UI_MENUITEM_CENTER_TEXT_Y
- };
- /* PMT MANISH START 20050722 */
- #ifdef __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__
- U8 wgui_enable_inline_item_default_text = 0;
- UI_filled_area temp_inline_edit_normal_filler =
- {UI_FILLED_AREA_TYPE_COLOR | UI_FILLED_AREA_SINGLE_BORDER | UI_FILLED_AREA_ROUNDED_BORDER,
- UI_NULL_IMAGE,
- NULL,
- /* 20051012 HIMANSHU START COMMON */
- {255, 229, 172, 100},
- /* 20051012 HIMANSHU END COMMON */
- {0, 0, 0, 0},
- {0, 0, 0, 100},
- {0, 0, 0, 0},
- 0
- };
- #endif /* __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__ */
- /* PMT MANISH END 20050722 */
- /*----------------------------------------------------------------------------
- Key handlers for the inline fixed list
- ----------------------------------------------------------------------------*/
- #define CATEGORY57_NO_KEY_FLAG 0
- #define CATEGORY57_UP_ARROW_KEY_FLAG 1
- #define CATEGORY57_DOWN_ARROW_KEY_FLAG 2
- U8 wgui_inline_edit_arrow_key_flag = CATEGORY57_NO_KEY_FLAG;
- void (*clear_inline_item_keys) (void) = UI_dummy_function;
- void (*redraw_current_inline_item) (void) = UI_dummy_function;
- void (*complete_inline_item_edit) (void) = UI_dummy_function;
- void register_inline_fixed_list_keys(void);
- void ShowCommonCategoryInlineEdit(UI_string_type title, U16 title_icon, U16 left_softkey, U16 left_softkey_icon,
- U16 right_softkey, U16 right_softkey_icon, S32 number_of_items, U16 *list_of_icons,
- InlineItem *list_of_items, S32 highlighted_item, U8 *history_buffer,
- void (*highlight_handler) (S32 item_index),
- void (*unhighlight_handler) (S32 item_index), U16 history_id);
- /* 20051012 HIMANSHU START COMMON */
- #ifdef __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__
- void inline_item_default_text_show_background(S32 x1, S32 y1, S32 x2, S32 y2);
- void inline_text_edit_show_background(single_line_input_box *b);
- #endif /* __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__ */
- /* 20051012 HIMANSHU END INLINE EDIT */
- /* For transparent color filler */
- //PMT VIKAS START 20050630
- // This part of code should be removed
- #if 0
- /* under construction !*/
- /* under construction !*/
- #ifdef __MMI_UI_TRANSPARENT_EFFECT__
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- #endif
- /* under construction !*/
- /* under construction !*/
- #endif /* 0 */
- /* PMT VIKAS END 20050630 */
- /* Function Added To Get The Status Of Inline Screen - Gurinder 15/4/2004 */
- /*****************************************************************************
- * FUNCTION
- * get_wgui_inline_list_menu_status
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- *
- *****************************************************************************/
- S32 get_wgui_inline_list_menu_status(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return wgui_inline_list_menu_changed;
- }
- /*****************************************************************************
- * FUNCTION
- * set_wgui_inline_list_menu_status
- * DESCRIPTION
- *
- * PARAMETERS
- * status [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void set_wgui_inline_list_menu_status(S32 status)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_inline_list_menu_changed = (U8) status;
- }
- /*** Image Text Control *****/
- #if defined __MMI_PLUTO_GPRS__
- /*****************************************************************************
- * FUNCTION
- * ShowAsControl
- * DESCRIPTION
- *
- * PARAMETERS
- * item [?]
- * RETURNS
- * void
- *****************************************************************************/
- void ShowAsControl(InlineItem *item)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- item->show_img_flag = TRUE;
- }
- /*****************************************************************************
- * FUNCTION
- * SetInlineFullScreenEditCustomFunctionImageText
- * DESCRIPTION
- *
- * PARAMETERS
- * item [?]
- * f [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void SetInlineFullScreenEditCustomFunctionImageText(InlineItem *item, void (*f) (void))
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- wgui_inline_image_text *image_item = (wgui_inline_image_text*) item->item;
- wgui_inline_item_text_edit *i = (wgui_inline_item_text_edit*) image_item->inline_full_text;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- i->custom_setup_function = f;
- }
- /*****************************************************************************
- * FUNCTION
- * UI_dummy_edit_complete_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * buffer [?]
- * buffer_size [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void UI_dummy_edit_complete_handler(U8 *buffer, S32 buffer_size)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(buffer);
- UI_UNUSED_PARAMETER(buffer_size);
- }
- #ifdef __MMI_TOUCH_SCREEN__
- /*****************************************************************************
- * FUNCTION
- * inline_image_text_redraw_image_by_pen
- * DESCRIPTION
- *
- * PARAMETERS
- * i [?]
- * RETURNS
- * void
- *****************************************************************************/
- void inline_image_text_redraw_image_by_pen(wgui_inline_image_text *i)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 index = i->pen_down_image_index;
- PU8 image = NULL; /* 111605 warning Calvin */
- S32 image_y_offset = 0;
- S32 x1, y1, x2, y2;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (index < 0)
- {
- return;
- }
- gdi_layer_push_clip();
- gdi_layer_reset_clip();
- gdi_layer_lock_frame_buffer();
- x1 = i->image_left_top[index].x;
- y1 = i->image_left_top[index].y;
- x2 = i->image_right_bottom[index].x;
- y2 = i->image_right_bottom[index].y;
- gui_draw_filled_area(x1, y1, x2, y2 + 1, wgui_inline_select_fixed_text_menuitem_theme.selected_filler);
- if (index == i->pen_curr_pressed_image_index)
- {
- image_y_offset++;
- }
- if (index == 0)
- {
- image = i->image2;
- }
- else if (index == 1)
- {
- image = i->image3;
- }
- else
- {
- MMI_ASSERT(0);
- }
- gui_show_transparent_image(x1, y1 + image_y_offset, image, 0);
- gui_pop_clip();
- gdi_layer_unlock_frame_buffer();
- gdi_layer_blt_previous(x1, y1, x2, y2 + 1);
- }
- /*****************************************************************************
- * FUNCTION
- * inline_image_text_pen_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * pen_event [IN]
- * x [IN]
- * y [IN]
- * item_event [?]
- * RETURNS
- *
- *****************************************************************************/
- BOOL inline_image_text_pen_handler(
- mmi_pen_event_type_enum pen_event,
- S16 x,
- S16 y,
- gui_inline_item_pen_enum *item_event)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- BOOL ret = MMI_TRUE;
- wgui_inline_image_text *i = current_image_text_control;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *item_event = GUI_INLINE_ITEM_PEN_NONE;
- if (!i)
- {
- MMI_DBG_ASSERT(0);
- return MMI_FALSE;
- }
- switch (pen_event)
- {
- case MMI_PEN_EVENT_DOWN:
- i->pen_down_image_index = -1;
- if (i->image2 && i->image_callback[0] && x >= i->image_left_top[0].x && y >= i->image_left_top[0].y &&
- x <= i->image_right_bottom[0].x && y <= i->image_right_bottom[0].y)
- {
- i->pen_down_image_index = 0;
- i->pen_curr_pressed_image_index = 0;
- inline_image_text_redraw_image_by_pen(i);
- }
- else if (i->image3 && i->image_callback[1] && x >= i->image_left_top[1].x && y >= i->image_left_top[1].y &&
- x <= i->image_right_bottom[1].x && y <= i->image_right_bottom[1].y)
- {
- i->pen_down_image_index = 1;
- i->pen_curr_pressed_image_index = 1;
- inline_image_text_redraw_image_by_pen(i);
- }
- else
- {
- ret = MMI_FALSE;
- }
- break;
- case MMI_PEN_EVENT_MOVE:
- if (i->pen_down_image_index >= 0)
- {
- S32 index = i->pen_down_image_index;
- if (i->pen_curr_pressed_image_index == i->pen_down_image_index)
- {
- if (!(x >= i->image_left_top[index].x && y >= i->image_left_top[index].y &&
- x <= i->image_right_bottom[index].x && y <= i->image_right_bottom[index].y))
- {
- i->pen_curr_pressed_image_index = -1;
- inline_image_text_redraw_image_by_pen(i);
- }
- }
- else
- {
- if (x >= i->image_left_top[index].x && y >= i->image_left_top[index].y &&
- x <= i->image_right_bottom[index].x && y <= i->image_right_bottom[index].y)
- {
- i->pen_curr_pressed_image_index = index;
- inline_image_text_redraw_image_by_pen(i);
- }
- }
- }
- break;
- case MMI_PEN_EVENT_UP:
- if (i->pen_down_image_index >= 0 && i->pen_curr_pressed_image_index >= 0)
- {
- i->pen_curr_pressed_image_index = -1;
- inline_image_text_redraw_image_by_pen(i);
- if (i->image_callback[i->pen_down_image_index])
- {
- (i->image_callback[i->pen_down_image_index]) ();
- }
- }
- break;
- case MMI_PEN_EVENT_ABORT:
- if (i->pen_down_image_index >= 0 && i->pen_curr_pressed_image_index >= 0)
- {
- i->pen_curr_pressed_image_index = -1;
- inline_image_text_redraw_image_by_pen(i);
- }
- break;
- }
- return ret;
- }
- #endif /* __MMI_TOUCH_SCREEN__ */
- /*****************************************************************************
- * FUNCTION
- * SetInlineItemImageText
- * DESCRIPTION
- *
- * PARAMETERS
- * item [?]
- * text [?]
- * image1 [IN]
- * image2 [IN]
- * image3 [IN]
- * buf_size [IN]
- * title [IN]
- * title_icon [IN]
- * input_type [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void SetInlineItemImageText(
- InlineItem *item,
- U8 *text,
- PU8 image1,
- PU8 image2,
- PU8 image3,
- S32 buf_size,
- U16 title,
- U16 title_icon,
- S16 input_type)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- wgui_inline_image_text *image_item;
- wgui_inline_item_text_edit *i;
- UI_buffer_type mask_buffer;
- S16 t = input_type & INPUT_TYPE_MASK;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (n_inline_image_text >= MAX_INLINE_IMAGE_TEXT_ITEMS)
- {
- return;
- }
- if (n_inline_text_edit_items >= MAX_INLINE_TEXT_EDIT_ITEMS)
- {
- return;
- }
- item->item = (void*)&wgui_inline_image_text_items[n_inline_image_text];
- item->flags = INLINE_ITEM_IMAGE_TEXT_TYPE;
- item->show_img_flag = FALSE;
- n_inline_image_text++;
- image_item = (wgui_inline_image_text*) item->item;
- image_item->flags = 0;
- image_item->buffer_size = buf_size;
- image_item->image1 = image1;
- image_item->image2 = image2;
- image_item->image3 = image3;
- image_item->text = text;
- item->handler = handle_inline_full_screen_imagetext_edit; /* wgui_show_image_text_item;//handle_inline_full_screen_imagetext_edit ; */
- #ifdef __MMI_TOUCH_SCREEN__
- memset(image_item->image_callback, 0, sizeof(image_item->image_callback));
- memset(image_item->image_left_top, 0, sizeof(image_item->image_left_top));
- memset(image_item->image_right_bottom, 0, sizeof(image_item->image_right_bottom));
- image_item->pen_down_image_index = -1;
- image_item->pen_curr_pressed_image_index = -1;
- #endif /* __MMI_TOUCH_SCREEN__ */
- image_item->inline_full_text = (void*)&wgui_inline_text_edit_items[n_inline_text_edit_items];
- mask_buffer = inline_text_edit_mask_buffers[n_inline_text_edit_items];
- n_inline_text_edit_items++;
- i = (wgui_inline_item_text_edit*) image_item->inline_full_text;
- i->title = title;
- i->title_icon = title_icon;
- i->buffer = text;
- i->buffer_size = buf_size;
- i->flags = 0;
- i->input_type = input_type;
- item->text_p = i->buffer;
- i->edit_complete_callback = UI_dummy_edit_complete_handler;
- i->custom_setup_function = NULL;
- i->validation_callback = UI_dummy_validation_function;
- if ((t == INPUT_TYPE_NUMERIC_PASSWORD) || (t == INPUT_TYPE_ALPHANUMERIC_PASSWORD) ||
- (t == INPUT_TYPE_SAT_NUMERIC_PASSWORD))
- {
- inline_edit_prepare_mask_buffer(text, mask_buffer);
- i->mask_buffer = mask_buffer;
- item->text_p = mask_buffer;
- }
- /* UCS2_count==-1 means this field hasn't been edited */
- i->UCS2_count = -1;
- }
- #ifdef __MMI_TOUCH_SCREEN__
- /*****************************************************************************
- * FUNCTION
- * SetInlineImageTextPenHandler
- * DESCRIPTION
- *
- * PARAMETERS
- * item [?]
- * image2_callback [IN]
- * image3_callback [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void SetInlineImageTextPenHandler(InlineItem *item, FuncPtr image2_callback, FuncPtr image3_callback)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- wgui_inline_image_text *image_item = (wgui_inline_image_text*) item->item;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- image_item->image_callback[0] = image2_callback;
- image_item->image_callback[1] = image3_callback;
- }
- #endif /* __MMI_TOUCH_SCREEN__ */
- /*****************************************************************************
- * FUNCTION
- * wgui_inlinescrolling_timer
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_inlinescrolling_timer(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_handle_scrolling_text(&wgui_inline_scroll_text);
- if (inline_last_image)
- {
- gui_show_transparent_image(103, inline_y_pos_image, inline_last_image, 0);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_scrolling_text_draw_background
- * DESCRIPTION
- *
- * PARAMETERS
- * x1 [IN]
- * y1 [IN]
- * x2 [IN]
- * y2 [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_scrolling_text_draw_background(S32 x1, S32 y1, S32 x2, S32 y2)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_draw_filled_area(x1, y1, x2, y2, (wgui_inline_select_fixed_text_menuitem_theme.selected_filler));
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_show_image_text_control
- * DESCRIPTION
- *
- * PARAMETERS
- * i [?]
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_show_image_text_control(wgui_inline_image_text *i)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- //S32 y1 = i->y ;
- //S32 height = 0;
- wgui_inline_item_text_edit *i_edit = (wgui_inline_item_text_edit*) i->inline_full_text;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- draw_image_text_control(i, i->x, i->y, i->width, i->height, i->image1, i->image2, i->image3, i_edit->buffer, 1);
- }
- /*****************************************************************************
- * FUNCTION
- * redraw_image_text_control
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void redraw_image_text_control(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- wgui_show_image_text_control(current_image_text_control);
- gdi_layer_unlock_frame_buffer();
- gdi_layer_blt_previous(
- current_image_text_control->x,
- current_image_text_control->y,
- current_image_text_control->x + current_image_text_control->width - 1,
- current_image_text_control->y + current_image_text_control->height - 1);
- }
- /*****************************************************************************
- * FUNCTION
- * draw_image_text_control
- * DESCRIPTION
- *
- * PARAMETERS
- * control [?]
- * x1 [IN]
- * y1 [IN]
- * iwidth [IN]
- * iheight [IN]
- * image1 [IN]
- * image2 [IN]
- * image3 [IN]
- * text [?]
- * highlight_flag [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void draw_image_text_control(
- wgui_inline_image_text *control,
- S32 x1,
- S32 y1,
- S32 iwidth,
- S32 iheight,
- PU8 image1,
- PU8 image2,
- PU8 image3,
- U8 *text,
- U8 highlight_flag)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 width = 0, height = 0, char_height = 0, img_y1 = 0, text_y;
- color text_colr = gui_color(0, 0, 0);
- S32 temp_x = x1 + 1;
- S32 text_x = 0, text_width = 0, text_height = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_push_clip();
- gdi_layer_reset_clip();
- gui_reset_text_clip();
- /* MTK Elvis for R2L characters */
- if (!r2lMMIFlag)
- {
- if (image1)
- {
- gui_measure_image((PU8) image1, &width, &height);
- img_y1 = (MMI_INLINE_EDIT_MENUITEM_HEIGHT >> 1) - (height >> 1);
- gui_show_transparent_image(temp_x, (y1 + img_y1), image1, 0);
- temp_x = x1 + width + 4;
- }
- else
- /* 20051012 HIMANSHU START INLINE SELECT */
- #ifdef __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__
- if (!IsInlineItemDefaultTextEnable())
- #endif
- /* 20051012 HIMANSHU END INLINE SELECT */
- temp_x = x1 + MMI_fixed_icontext_menuitem.text_x;
- if (image2)
- {
- gui_measure_image(image2, &width, &height);
- img_y1 = (MMI_INLINE_EDIT_MENUITEM_HEIGHT >> 1) - (height >> 1);
- gui_show_transparent_image(temp_x, (y1 + img_y1), image2, 0);
- text_x = temp_x + width + 2;
- text_width = iwidth - text_x;
- #ifdef __MMI_TOUCH_SCREEN__
- if (control)
- {
- control->image_left_top[0].x = temp_x;
- control->image_left_top[0].y = y1 + img_y1;
- control->image_right_bottom[0].x = temp_x + width - 1;
- control->image_right_bottom[0].y = y1 + img_y1 + height - 1;
- }
- #endif /* __MMI_TOUCH_SCREEN__ */
- }
- else
- {
- text_x = temp_x;
- text_width = iwidth - text_x - x1 - 4;
- }
- if (image3)
- {
- gui_measure_image(image3, &width, &height);
- temp_x = x1 + 1 + iwidth - width - 2;
- img_y1 = (MMI_INLINE_EDIT_MENUITEM_HEIGHT >> 1) - (height >> 1);
- gui_show_transparent_image(temp_x, (y1 + img_y1), image3, 0);
- text_width = temp_x - text_x - 2;
- #ifdef __MMI_TOUCH_SCREEN__
- if (control)
- {
- control->image_left_top[1].x = temp_x;
- control->image_left_top[1].y = y1 + img_y1;
- control->image_right_bottom[1].x = temp_x + width - 1;
- control->image_right_bottom[1].y = y1 + img_y1 + height - 1;
- }
- #endif /* __MMI_TOUCH_SCREEN__ */
- }
- }
- else
- {
- temp_x = UI_device_width - 1;
- if (image1)
- {
- gui_measure_image((PU8) image1, &width, &height);
- img_y1 = (MMI_INLINE_EDIT_MENUITEM_HEIGHT >> 1) - (height >> 1);
- temp_x -= width;
- gui_show_transparent_image(temp_x, (y1 + img_y1), image1, 0);
- }
- else
- {
- temp_x = UI_device_width - MMI_fixed_icontext_menuitem.text_x;
- }
- if (image3)
- {
- gui_measure_image(image3, &width, &height);
- img_y1 = (MMI_INLINE_EDIT_MENUITEM_HEIGHT >> 1) - (height >> 1);
- temp_x -= (width + 2);
- gui_show_transparent_image(temp_x, (y1 + img_y1), image3, 0);
- text_x = temp_x - 2;
- text_width = iwidth - (UI_device_width - text_x);
- #ifdef __MMI_TOUCH_SCREEN__
- if (control)
- {
- control->image_left_top[1].x = temp_x;
- control->image_left_top[1].y = y1 + img_y1;
- control->image_right_bottom[1].x = temp_x + width - 1;
- control->image_right_bottom[1].y = y1 + img_y1 + height - 1;
- }
- #endif /* __MMI_TOUCH_SCREEN__ */
- }
- else
- {
- text_x = temp_x;
- text_width = iwidth - (UI_device_width - text_x) - 2;
- }
- if (image2)
- {
- gui_measure_image(image2, &width, &height);
- img_y1 = (MMI_INLINE_EDIT_MENUITEM_HEIGHT >> 1) - (height >> 1);
- temp_x = (UI_device_width - 1) - iwidth + 2;
- gui_show_transparent_image(temp_x, (y1 + img_y1), image2, 0);
- text_width = text_x - temp_x - 2 - width;
- #ifdef __MMI_TOUCH_SCREEN__
- if (control)
- {
- control->image_left_top[0].x = temp_x;
- control->image_left_top[0].y = y1 + img_y1;
- control->image_right_bottom[0].x = temp_x + width - 1;
- control->image_right_bottom[0].y = y1 + img_y1 + height - 1;
- }
- #endif /* __MMI_TOUCH_SCREEN__ */
- }
- }
- char_height = gui_get_character_height();
- gui_measure_string((UI_string_type) text, &width, &height);
- text_height = height;
- text_y = y1 + (MMI_INLINE_EDIT_MENUITEM_HEIGHT >> 1) - (height >> 1);
- if (highlight_flag)
- {
- text_colr = MMI_fixed_icontext_menuitem.focussed_text_color;
- if (width > text_width)
- {
- if (r2lMMIFlag)
- {
- gui_create_scrolling_text(&wgui_inline_scroll_text, text_x - text_width, text_y, text_width, text_height, (UI_string_type) text, wgui_inlinescrolling_timer, wgui_scrolling_text_draw_background, text_colr, text_colr); /* 031205 Calvin modified */
- }
- else
- {
- gui_create_scrolling_text(&wgui_inline_scroll_text, text_x, text_y, text_width, text_height, (UI_string_type) text, wgui_inlinescrolling_timer, wgui_scrolling_text_draw_background, text_colr, text_colr); /* 031205 Calvin modified */
- }
- gui_show_scrolling_text(&wgui_inline_scroll_text);
- }
- else
- {
- if (r2lMMIFlag)
- {
- gdi_layer_set_clip(text_x - text_width, text_y - 1, text_x, text_y + text_height + 1);
- }
- else
- {
- gdi_layer_set_clip(text_x, text_y - 1, text_x + text_width, text_y + text_height + 1);
- }
- gui_move_text_cursor(text_x, text_y);
- gui_set_text_color(text_colr);
- gui_print_text((UI_string_type) text);
- }
- }
- else
- {
- text_colr = MMI_fixed_icontext_menuitem.normal_text_color;
- if (r2lMMIFlag)
- {
- gdi_layer_set_clip(text_x - text_width, text_y - 1, text_x, text_y + text_height + 1);
- }
- else
- {
- gdi_layer_set_clip(text_x, text_y - 1, text_x + text_width, text_y + text_height + 1);
- }
- gui_move_text_cursor(text_x, text_y);
- gui_set_text_color(text_colr);
- gui_print_text((UI_string_type) text);
- }
- gui_pop_clip();
- UI_UNUSED_PARAMETER(char_height);
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_show_image_text_item
- * DESCRIPTION
- *
- * PARAMETERS
- * x1 [IN]
- * y1 [IN]
- * iwidth [IN]
- * iheight [IN]
- * item [?]
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_show_image_text_item(S32 x1, S32 y1, S32 iwidth, S32 iheight, wgui_inline_item *item)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- wgui_inline_image_text *i = (wgui_inline_image_text*) item->item;
- wgui_inline_item_text_edit *i_edit = (wgui_inline_item_text_edit*) i->inline_full_text;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- draw_image_text_control(i, x1, y1, iwidth, iheight, i->image1, i->image2, i->image3, i_edit->buffer, 0);
- }
- /*****************************************************************************
- * FUNCTION
- * clear_inline_image_text_item
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void clear_inline_image_text_item(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_scrolling_text_stop(&wgui_inline_scroll_text);
- inline_scroll_flag = FALSE;
- memset(&wgui_inline_scroll_text, 0, sizeof(wgui_inline_scroll_text));
- clear_inline_item_keys = UI_dummy_function;
- redraw_current_inline_item = UI_dummy_function;
- #ifdef __MMI_TOUCH_SCREEN__
- wgui_current_inline_item_pen_function = UI_dummy_inline_item_pen_function;
- #endif
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_show_image_text_item_highlight
- * DESCRIPTION
- *
- * PARAMETERS
- * x1 [IN]
- * y1 [IN]
- * iwidth [IN]
- * iheight [IN]
- * item [?]
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_show_image_text_item_highlight(S32 x1, S32 y1, S32 iwidth, S32 iheight, wgui_inline_item *item)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- wgui_inline_image_text *i = (wgui_inline_image_text*) item->item;
- wgui_inline_item_text_edit *i_edit = (wgui_inline_item_text_edit*) i->inline_full_text;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- i->x = x1;
- i->y = y1;
- i->width = iwidth;
- i->height = iheight;
- clear_inline_item_keys = clear_inline_image_text_item;
- redraw_current_inline_item = redraw_image_text_control;
- #ifdef __MMI_TOUCH_SCREEN__
- wgui_current_inline_item_pen_function = inline_image_text_pen_handler;
- #endif
- current_image_text_control = i;
- draw_image_text_control(i, x1, y1, iwidth, iheight, i->image1, i->image2, i->image3, i_edit->buffer, 1);
- }
- /*****************************************************************************
- * FUNCTION
- * handle_inline_full_screen_imagetext_edit
- * 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_full_screen_imagetext_edit(
- 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 */
- /*----------------------------------------------------------------*/
- S32 input_type;
- wgui_inline_image_text *image_type = (wgui_inline_image_text*) item;
- /* wgui_inline_item_text_edit *i=&wgui_inline_text_edit_items[0];//(wgui_inline_item_text_edit*)image_type->inline_full_text; */
- wgui_inline_item_text_edit *i = (wgui_inline_item_text_edit*) image_type->inline_full_text;
- S32 inputbox_x = 0;
- S32 inputbox_y = (MMI_title_y + MMI_title_height);
- S32 inputbox_width = MMI_content_width;
- S32 inputbox_height = MMI_content_height - MMI_multitap_height;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(x);
- UI_UNUSED_PARAMETER(y);
- UI_UNUSED_PARAMETER(width);
- UI_UNUSED_PARAMETER(height);
- UI_UNUSED_PARAMETER(key_code);
- UI_UNUSED_PARAMETER(key_event);
- UI_UNUSED_PARAMETER(flags);
- if (i->custom_setup_function != NULL)
- {
- i->custom_setup_function();
- return;
- }
- #ifdef __MMI_T9__
- InuptMethodEnterCategory5();
- #elif defined __MMI_ZI__
- ZiInuptMethodEnterCategory5();
- //KP Jerry add on 2007-3-8 start
- #elif defined __MMI_CSTAR__
- CstarInputMethodEnterCategory5();
- //KP Jerry add on 2007-3-8 end
- #elif defined __MMI_KA__
- KonkaInuptMethodEnterCategory5();
- #elif defined __MMI_ITAP__
- /* under construction !*/
- #endif
- gdi_layer_lock_frame_buffer();
- wgui_text_menuitem_reset_scrolling();
- clear_inline_image_text_item();
- if (i->flags & INLINE_ITEM_CHANGED)
- {
- inline_full_screen_edit_changed = 1;
- }
- else
- {
- inline_full_screen_edit_changed = 0;
- }
- wgui_current_inline_item_type = INLINE_ITEM_TYPE_FULL_SCREEN_EDIT;
- current_wgui_inline_text_edit_item = i;
- current_wgui_inline_text_edit_text_p = text_p;
- input_type = i->input_type;
- if (inline_image_text_edit_flag == 0)
- {
- if (!(i->flags & INLINE_ITEM_OPEN))
- {
- gui_strcpy((UI_string_type) wgui_inline_full_screen_text_edit_buffer, (UI_string_type) i->buffer);
- history_buffer = NULL;
- }
- }
- inline_image_text_edit_flag = 1;
- i->flags &= ~INLINE_ITEM_OPEN;
- inline_full_screen_edit_saved_title = MMI_title_string;
- inline_full_screen_edit_saved_title_icon = MMI_title_icon;
- inline_full_screen_edit_saved_LSK_label = MMI_softkeys[MMI_LEFT_SOFTKEY].text;
- inline_full_screen_edit_saved_RSK_label = MMI_softkeys[MMI_RIGHT_SOFTKEY].text;
- inline_full_screen_edit_saved_LSK_icon = MMI_softkeys[MMI_LEFT_SOFTKEY].normal_up_icon;
- inline_full_screen_edit_saved_RSK_icon = MMI_softkeys[MMI_RIGHT_SOFTKEY].normal_up_icon;
- change_left_softkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- change_right_softkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- MMI_menu_shortcut_number = -1;
- MMI_disable_title_shortcut_display = 1;
- clear_key_handlers();
- change_left_softkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- change_right_softkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- clear_left_softkey();
- clear_right_softkey();
- register_left_softkey_handler();
- register_right_softkey_handler();
- register_default_hide_softkeys();
- MMI_title_string = get_string(i->title);
- MMI_title_icon = get_image(i->title_icon);
- register_hide_multitap(category5_hide_multitap);
- wgui_inputbox_validation_callback = i->validation_callback;
- wgui_setup_inputbox(
- inputbox_x,
- inputbox_y,
- inputbox_width,
- inputbox_height,
- wgui_inline_full_screen_text_edit_buffer,
- i->buffer_size,
- INLINE_FULL_SCREEN_EDIT_HISTORY_ID,
- get_string(STR_GLOBAL_BACK),
- get_image(IMG_GLOBAL_BACK),
- (S16) input_type,
- history_buffer,
- 1);
- inputbox_height = MMI_content_height - MMI_multitap_height - wgui_inputbox_information_bar_height;
- if (MMI_multiline_inputbox.height > inputbox_height)
- {
- gui_resize_multi_line_input_box(&MMI_multiline_inputbox, MMI_multiline_inputbox.width, inputbox_height);
- }
- /* 101105 inline Calvin Start */
- #ifdef __MMI_WALLPAPER_ON_BOTTOM__
- MMI_multiline_inputbox.flags |= UI_MULTI_LINE_INPUT_BOX_TRANSPARENT_BACKGROUND;
- dm_get_scr_bg_image(
- &inline_edit_scr_bg_ID,
- &inline_edit_scr_bg_filename,
- &inline_edit_scr_bg_x,
- &inline_edit_scr_bg_y,
- &inline_edit_scr_bg_opacity);
- dm_set_scr_bg_image(inline_edit_scr_bg_ID, inline_edit_scr_bg_filename, inline_edit_scr_bg_x, inline_edit_scr_bg_y, current_MMI_theme->bg_opacity_low); /* 100605 editor opacity Calvin */
- #endif /* __MMI_WALLPAPER_ON_BOTTOM__ */
- /* 101105 Calvin End */
- register_multiline_inputbox_input_callback(wgui_inline_edit_handle_multiline_inputbox_input);
- wgui_inputbox_RSK_function = handle_inline_full_screen_edit_cancel;
- redraw_current_inline_item = redraw_inline_full_screen_edit;
- set_left_softkey_function(handle_inline_full_screen_edit_complete, KEY_EVENT_UP);
- #if defined(__MMI_TOUCH_SCREEN__) || defined(__MMI_HANDWRITING_PAD__)
- mmi_pen_editor_set_inputbox_LSK_Function(handle_inline_full_screen_edit_complete);
- #endif
- gdi_layer_unlock_frame_buffer();
- redraw_inline_full_screen_edit();
- complete_inline_item_edit = handle_inline_full_screen_edit_close;
- }
- /* / ATTACHMENT CONTROL//////////////////// */
- #define ATTACHMENT_IMAGE_ITEM_HIGHLIGHTED 1
- #define ATTACHMENT_IMAGE_ITEM_UNHIGHLIGHTED 0
- #define ATTACHMENT_IMAGE_ITEM_ICON_MARGIN 4 /* Margin Between Icon of Inline item and start of Image Attachment Control */
- #define ATTACHMENT_IMAGE_ICON_MARGIN 2 /* Margin Between Attachment Images in Image Attachment Control */
- #define MAX_INLINE_IMAGE_ATTACHMENT_ITEMS 2
- /* 0 ~ (MAX_INLINE_IMAGE_ATTACHMENT_ITEMS-1) inline items containing image attachments controls */
- static wgui_inline_image_attachment wgui_inline_image_attachment_items[MAX_INLINE_IMAGE_ATTACHMENT_ITEMS];
- static S32 n_inline_attach_items = 0;
- /* 0 ~ (MAX_IMAGES_IN_INLINE_ATTACHMENT-1) images inside current image attachment control */
- static S32 n_images_in_inline_attach_item = 0;
- static wgui_inline_image_attachment *current_attach_control = NULL;
- static MMI_BOOL attach_disable_flag = MMI_FALSE;
- extern void show_attachment_images(
- S32 x1,
- S32 y1,
- S32 iwidth,
- S32 iheight,
- wgui_inline_image_attachment *image_control,
- U8);
- extern void handle_attachment_image(
- S32 x,
- S32 y,
- S32 width,
- S32 height,
- S32 key_code,
- S32 key_event,
- U8 **text_p,
- void *item,
- U32 flags,
- U8 *history_buffer);
- #ifdef __MMI_TOUCH_SCREEN__
- extern BOOL inline_image_attachment_pen_handler(
- mmi_pen_event_type_enum pen_event,
- S16 x,
- S16 y,
- gui_inline_item_pen_enum *item_event);
- #endif /* __MMI_TOUCH_SCREEN__ */
- /*****************************************************************************
- * FUNCTION
- * clear_inline_image_attachment_item
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void clear_inline_image_attachment_item(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* FIXME. reset current_attach_control? */
- clear_inline_item_keys = UI_dummy_function;
- redraw_current_inline_item = UI_dummy_function;
- ClearKeyHandler(KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- ClearKeyHandler(KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- #ifdef __MMI_TOUCH_SCREEN__
- wgui_current_inline_item_pen_function = UI_dummy_inline_item_pen_function;
- #endif
- }
- /*****************************************************************************
- * FUNCTION
- * redraw_image_attachment_control
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void redraw_image_attachment_control(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- wgui_inline_image_attachment *attach_item = current_attach_control;
- #ifdef __MMI_TOUCH_SCREEN__
- S32 x1;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- if (attach_disable_flag)
- {
- x1 = attach_item->control_x1 + 17;
- }
- else
- {
- x1 = attach_item->control_x1;
- }
- gui_draw_filled_area(
- x1,
- attach_item->control_y1,
- attach_item->control_x1 + attach_item->control_width - 1,
- attach_item->control_y1 + attach_item->control_height - 1,
- wgui_inline_select_fixed_text_menuitem_theme.selected_filler);
- gdi_layer_unlock_frame_buffer();
- gdi_layer_blt_previous(
- x1,
- attach_item->control_y1,
- attach_item->control_x1 + attach_item->control_width - 1,
- attach_item->control_y1 + attach_item->control_height - 1);
- #endif /* __MMI_TOUCH_SCREEN__ */
- show_attachment_images(
- attach_item->control_x1,
- attach_item->control_y1,
- attach_item->control_width,
- attach_item->control_height,
- attach_item,
- ATTACHMENT_IMAGE_ITEM_HIGHLIGHTED);
- }
- /*****************************************************************************
- * FUNCTION
- * RegisterAttachmentLskFunction
- * DESCRIPTION
- *
- * PARAMETERS
- * item [?]
- * f [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void RegisterAttachmentLskFunction(InlineItem *item, void (*f) (PU8 image, UI_string_type str))
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- wgui_inline_image_attachment *attach_item;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (f)
- {
- attach_item = (wgui_inline_image_attachment*) item->item;
- attach_item->lsk_function = f;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * RegisterAttachmentRskFunction
- * DESCRIPTION
- *
- * PARAMETERS
- * item [?]
- * f [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void RegisterAttachmentRskFunction(InlineItem *item, void (*f) (PU8 image, UI_string_type str))
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- wgui_inline_image_attachment *attach_item;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (f)
- {
- attach_item = (wgui_inline_image_attachment*) item->item;
- attach_item->rsk_function = f;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * SetCurrentHighlightedAttachment
- * DESCRIPTION
- *
- * PARAMETERS
- * item [IN]
- * index [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void SetHighlightedAttachment(wgui_inline_item *inline_item, S32 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- wgui_inline_image_attachment *image = (wgui_inline_image_attachment*)inline_item->item;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- image->highlited_image = (S16) index;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCurrentHighlightedAttachment
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- *
- *****************************************************************************/
- S32 GetCurrentHighlightedAttachment(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("current highlighted attachment is %d", current_attach_control->highlited_image));
- return current_attach_control->highlited_image;
- }
- /* Right arrow key handler */
- /*****************************************************************************
- * FUNCTION
- * attach_control_right_arrow
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void attach_control_right_arrow(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 temp_x1 = 0;
- wgui_inline_image_attachment *image = current_attach_control;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- image->highlited_image++;
- if (image->highlited_image >= n_images_in_inline_attach_item)
- {
- image->highlited_image = 0;
- }
- if ( image->image_change_cb )
- {
- image->image_change_cb(image->highlited_image);
- }
- if (attach_disable_flag)
- {
- temp_x1 = image->control_x1 + 17;
- }
- else
- {
- temp_x1 = image->control_x1;
- }
- gui_draw_filled_area(
- temp_x1,
- image->control_y1,
- image->control_x1 + image->control_width - 1,
- image->control_y1 + image->control_height - 1,
- wgui_inline_select_fixed_text_menuitem_theme.selected_filler);
- gdi_layer_unlock_frame_buffer();
- show_attachment_images(
- image->control_x1,
- image->control_y1,
- image->control_width,
- image->control_height,
- image,
- ATTACHMENT_IMAGE_ITEM_HIGHLIGHTED);
- }
- /* Left arrow key handler */
- /*****************************************************************************
- * FUNCTION
- * attach_control_left_arrow
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void attach_control_left_arrow(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 temp_x1 = 0;
- wgui_inline_image_attachment *image = current_attach_control;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- if (image->highlited_image == 0)
- {
- image->highlited_image = (S16) (n_images_in_inline_attach_item - 1);
- }
- else
- {
- image->highlited_image--;
- }
- if ( image->image_change_cb )
- {
- image->image_change_cb(image->highlited_image);
- }
- if (attach_disable_flag)
- {
- temp_x1 = image->control_x1 + 17;
- }
- else
- {
- temp_x1 = image->control_x1;
- }
- gui_draw_filled_area(
- temp_x1,
- image->control_y1,
- image->control_x1 + image->control_width - 1,
- image->control_y1 + image->control_height - 1,
- wgui_inline_select_fixed_text_menuitem_theme.selected_filler);
- gdi_layer_unlock_frame_buffer();
- show_attachment_images(
- image->control_x1,
- image->control_y1,
- image->control_width,
- image->control_height,
- image,
- ATTACHMENT_IMAGE_ITEM_HIGHLIGHTED);
- }
- /*****************************************************************************
- * FUNCTION
- * ClearAllAttachmentImages
- * DESCRIPTION
- *
- * PARAMETERS
- * item [?]
- * attachments_present [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void ClearAllAttachmentImages(InlineItem *item, S32 attachments_present)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i;
- wgui_inline_image_attachment *attach_item;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- attach_item = (wgui_inline_image_attachment*) item->item;
- for (i = 0; i < attachments_present; i++)
- {
- attach_item->attach_image[i].image1 = 0;
- gui_strcpy((UI_string_type) (attach_item->attach_image[i].image_file_name), (UI_string_type) L"