wgui_categories_IMPS.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:196k
源码类别:
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_categories_IMPS.c
- *
- * Project:
- * --------
- * MAUI
- *
- * Description:
- * ------------
- * IMPS related categories.
- *
- * [Category420] About Me Screen
- * [Category425] Contact List Screen (also used by PoC)
- * [Category435] Chat Screen with Popup Editor
- *
- *
- * TTY related categories.
- * [Category430] Chat Log Screen
- *
- * 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!
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- ****************************************************************************/
- #include "MMI_features.h"
- /* framework related include */
- #include "EventsGprot.h"
- #include "GlobalDefs.h"
- #include "FrameworkStruct.h"
- #include "EventsDef.h"
- #include "Unicodexdcl.h"
- #include "DebugInitDef.h"
- /* gui related include */
- #include "gui_themes.h"
- #include "wgui.h"
- #include "wgui_softkeys.h"
- #include "wgui_tab_bars.h"
- #include "wgui_categories.h"
- #include "wgui_categories_defs.h"
- #include "wgui_categories_inputs.h"
- #include "wgui_categories_IMPS.h"
- #include "wgui_categories_popup.h"
- #include "wgui_inputs.h"
- #ifdef __MMI_TOUCH_SCREEN__
- #include "wgui_touch_screen.h"
- #include "EditorPen.h"
- #include "wgui_virtual_keyboard.h"
- #endif /* __MMI_TOUCH_SCREEN__ */
- #include "gdi_include.h"
- #include "gd_primitive.h"
- #include "kal_non_specific_general_types.h" /* include this for kal data type */
- #include "lcd_sw_rnd.h"
- #include "gui_setting.h"
- #if (defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__)) || defined(__MMI_SMART_MESSAGE_MT__)
- #include "MyPicture.h"
- #endif
- #ifdef __MMI_T9__
- #include "T9Main.h" /* T9SynT9WithInputBox() */
- extern void InuptMethodEnterCategory5(void);
- #elif defined __MMI_ZI__
- extern void ZiInuptMethodEnterCategory5(void);
- //KP Jerry add on 2007-3-8 start
- #elif defined __MMI_CSTAR__
- extern void CstarInputMethodEnterCategory5(void);
- //KP Jerry add on 2007-3-8 end
- #elif defined __MMI_KA__
- extern void KonkaInuptMethodEnterCategory5(void);
- #elif defined __MMI_ITAP__
- /* under construction !*/
- #endif
- extern S32 gui_asyncdynamic_list_error;
- extern BOOL r2lMMIFlag;
- /*****************************************************************************
- * Customizable Definitions
- *****************************************************************************/
- /*
- * Category 420
- */
- #if defined(__MMI_MAINLCD_128X160__)
- /* Whether to display mood/status description text */
- #undef CAT420_DISP_INFO_TEXT
- #define CAT420_TOP_MARGIN 2
- /* Between information and description text */
- #define CAT420_BOTTOM_MARGIN 4
- #define CAT420_LEFT_MARGIN 5
- #define CAT420_RIGHT_MARGIN 3
- #define CAT420_IMAGE_H_SPACING (CAT420_RIGHT_MARGIN)
- #define CAT420_LINE_EXTRA_PIXEL 10
- #define CAT420_NAME_LINE_V_SPACING 3
- #define CAT420_LINE_IMAGE_V_SPACING 6
- #define CAT420_CAPTION_IMAGE_H_SPACING 6
- #define CAT420_MOOD_STATUS_V_SPACING 3
- /* Default image width */
- #define CAT420_IMAGE_AREA_WIDTH (60)
- /* Minimum image width */
- #define CAT420_IMAGE_AREA_MIN_WIDTH (40)
- #define CAT420_EDITOR_LEFT_BORDER_PADDING (CAT420_LEFT_MARGIN)
- #define CAT420_EDITOR_RIGHT_BORDER_PADDING (CAT420_RIGHT_MARGIN)
- #define CAT420_EDITOR_BOTTOM_PADDING (5)
- #elif defined(__MMI_MAINLCD_176X220__)
- /* Whether to display mood/status description text */
- #define CAT420_DISP_INFO_TEXT
- #define CAT420_TOP_MARGIN 2
- /* Between information and description text */
- #define CAT420_BOTTOM_MARGIN 7
- #define CAT420_LEFT_MARGIN 7
- #define CAT420_RIGHT_MARGIN 5
- #define CAT420_IMAGE_H_SPACING (CAT420_RIGHT_MARGIN)
- #define CAT420_LINE_EXTRA_PIXEL 10
- #define CAT420_NAME_LINE_V_SPACING 3
- #define CAT420_LINE_IMAGE_V_SPACING 6
- #define CAT420_CAPTION_IMAGE_H_SPACING 6
- #define CAT420_MOOD_STATUS_V_SPACING 3
- /* Default image width */
- #define CAT420_IMAGE_AREA_WIDTH (65)
- /* Minimum image width */
- #define CAT420_IMAGE_AREA_MIN_WIDTH (45)
- #define CAT420_EDITOR_LEFT_BORDER_PADDING (CAT420_LEFT_MARGIN)
- #define CAT420_EDITOR_RIGHT_BORDER_PADDING (CAT420_RIGHT_MARGIN)
- #define CAT420_EDITOR_BOTTOM_PADDING (7)
- #else
- /* For 240x320. 128x128 is also compiled but not linked */
- /* Whether to display mood/status description text */
- #define CAT420_DISP_INFO_TEXT
- #define CAT420_TOP_MARGIN 2
- /* Between information and description text */
- #define CAT420_BOTTOM_MARGIN 7
- #define CAT420_LEFT_MARGIN 6
- #define CAT420_RIGHT_MARGIN 6
- #define CAT420_IMAGE_H_SPACING (CAT420_RIGHT_MARGIN)
- #define CAT420_LINE_EXTRA_PIXEL 15
- #define CAT420_NAME_LINE_V_SPACING 4
- #define CAT420_LINE_IMAGE_V_SPACING 8
- #define CAT420_CAPTION_IMAGE_H_SPACING 6
- #define CAT420_MOOD_STATUS_V_SPACING 4
- /* Default image width */
- #define CAT420_IMAGE_AREA_WIDTH (100)
- /* Minimum image width */
- #define CAT420_IMAGE_AREA_MIN_WIDTH (60)
- #define CAT420_EDITOR_LEFT_BORDER_PADDING (CAT420_LEFT_MARGIN)
- #define CAT420_EDITOR_RIGHT_BORDER_PADDING (CAT420_RIGHT_MARGIN)
- #define CAT420_EDITOR_BOTTOM_PADDING (7)
- #endif
- #define CAT420_TEXT_COLOR_R 64
- #define CAT420_TEXT_COLOR_G 64
- #define CAT420_TEXT_COLOR_B 64
- #define CAT420_LINE_COLOR_R 144
- #define CAT420_LINE_COLOR_G 104
- #define CAT420_LINE_COLOR_B 48
- /*
- * Category 425
- */
- #if defined(__MMI_MAINLCD_128X160__)
- #define CAT425_DEFAULT_ICON_WIDTH 26
- #define CAT425_DEFAULT_ICON_HEIGHT 26
- #define CAT425_DEFAULT_ICON2_WIDTH 10
- #define CAT425_DEFAULT_ICON2_HEIGHT 10
- #define CAT425_ICON_X 2
- #define CAT425_ICON_Y 4
- #define CAT425_ICON_TEXT_GAP 4
- #define CAT425_TEXT_SCROLLBAR_GAP 2
- #define CAT425_TEXT1_Y 0
- #define CAT425_TEXT2_Y 16
- #define CAT425_TEXT_HEIGHT 16
- #define CAT425_MENUITEM_HEIGHT 33
- #define CAT425_MENUITEM_HEIGHT_NO_TAB 39
- #define CAT425_TEXT2_BRACKET_GAP 1
- #elif defined(__MMI_MAINLCD_176X220__)
- #define CAT425_DEFAULT_ICON_WIDTH 32
- #define CAT425_DEFAULT_ICON_HEIGHT 32
- #define CAT425_DEFAULT_ICON2_WIDTH 10
- #define CAT425_DEFAULT_ICON2_HEIGHT 10
- #define CAT425_ICON_X 2
- #define CAT425_ICON_Y 1
- #define CAT425_ICON_TEXT_GAP 4
- #define CAT425_TEXT_SCROLLBAR_GAP 2
- #define CAT425_TEXT1_Y 0
- #define CAT425_TEXT2_Y 17
- #define CAT425_TEXT_HEIGHT 17
- #define CAT425_MENUITEM_HEIGHT 35
- #define CAT425_MENUITEM_HEIGHT_NO_TAB 39
- #define CAT425_TEXT2_BRACKET_GAP 1
- #else
- /* For 240x320. 128x128 is also compiled but not linked */
- #define CAT425_DEFAULT_ICON_WIDTH 40
- #define CAT425_DEFAULT_ICON_HEIGHT 42
- #define CAT425_DEFAULT_ICON2_WIDTH 10
- #define CAT425_DEFAULT_ICON2_HEIGHT 10
- #define CAT425_ICON_X 2
- #define CAT425_ICON_Y 5
- #define CAT425_ICON_TEXT_GAP 6
- #define CAT425_TEXT_SCROLLBAR_GAP 3
- #define CAT425_TEXT1_Y 0
- #define CAT425_TEXT2_Y 27
- #define CAT425_TEXT_HEIGHT 22
- #define CAT425_MENUITEM_HEIGHT 55
- #define CAT425_MENUITEM_HEIGHT_NO_TAB 60
- #define CAT425_TEXT2_BRACKET_GAP 2
- #endif
- #if defined(__MMI_MAINLCD_240X320__)
- #define CAT425_ICON_BORDER_COLOR_R 187
- #define CAT425_ICON_BORDER_COLOR_G 227
- #define CAT425_ICON_BORDER_COLOR_B 254
- #define CAT425_ICON_HIGHLIGHT_BORDER_COLOR_R 128
- #define CAT425_ICON_HIGHLIGHT_BORDER_COLOR_G 0
- #define CAT425_ICON_HIGHLIGHT_BORDER_COLOR_B 0
- // #define CAT425_TEXT1_COLOR_R 230
- // #define CAT425_TEXT1_COLOR_G 230
- // #define CAT425_TEXT1_COLOR_B 230
- // #define CAT425_TEXT2_COLOR_R 148
- // #define CAT425_TEXT2_COLOR_G 188
- // #define CAT425_TEXT2_COLOR_B 220
- // #define CAT425_TEXT1_HIGHLIGHT_COLOR_R 255
- // #define CAT425_TEXT1_HIGHLIGHT_COLOR_G 255
- // #define CAT425_TEXT1_HIGHLIGHT_COLOR_B 255
- // #define CAT425_TEXT2_HIGHLIGHT_COLOR_R 255
- // #define CAT425_TEXT2_HIGHLIGHT_COLOR_G 255
- // #define CAT425_TEXT2_HIGHLIGHT_COLOR_B 106
- #define CAT425_TEXT2_BRACKET_COLOR_R 187
- #define CAT425_TEXT2_BRACKET_COLOR_G 227
- #define CAT425_TEXT2_BRACKET_COLOR_B 254
- #define CAT425_LINE_COLOR_R 192
- #define CAT425_LINE_COLOR_G 192
- #define CAT425_LINE_COLOR_B 192
- #else /* defined(__MMI_MAINLCD_240X320__) */
- #define CAT425_ICON_BORDER_COLOR_R 0
- #define CAT425_ICON_BORDER_COLOR_G 56
- #define CAT425_ICON_BORDER_COLOR_B 136
- #define CAT425_ICON_HIGHLIGHT_BORDER_COLOR_R 128
- #define CAT425_ICON_HIGHLIGHT_BORDER_COLOR_G 0
- #define CAT425_ICON_HIGHLIGHT_BORDER_COLOR_B 0
- #define CAT425_TEXT1_COLOR_R 72
- #define CAT425_TEXT1_COLOR_G 72
- #define CAT425_TEXT1_COLOR_B 72
- #define CAT425_TEXT2_COLOR_R 48
- #define CAT425_TEXT2_COLOR_G 88
- #define CAT425_TEXT2_COLOR_B 120
- #define CAT425_TEXT1_HIGHLIGHT_COLOR_R 255
- #define CAT425_TEXT1_HIGHLIGHT_COLOR_G 255
- #define CAT425_TEXT1_HIGHLIGHT_COLOR_B 255
- #define CAT425_TEXT2_HIGHLIGHT_COLOR_R 255
- #define CAT425_TEXT2_HIGHLIGHT_COLOR_G 255
- #define CAT425_TEXT2_HIGHLIGHT_COLOR_B 106
- #define CAT425_TEXT2_BRACKET_COLOR_R 56
- #define CAT425_TEXT2_BRACKET_COLOR_G 112
- #define CAT425_TEXT2_BRACKET_COLOR_B 200
- #define CAT425_LINE_COLOR_R 142
- #define CAT425_LINE_COLOR_G 142
- #define CAT425_LINE_COLOR_B 142
- #endif /* defined(__MMI_MAINLCD_240X320__) */
- /*
- * Category 430
- */
- #define CAT430_NAME1_COLOR_R 107
- #define CAT430_NAME1_COLOR_G 93
- #define CAT430_NAME1_COLOR_B 247
- #define CAT430_NAME2_COLOR_R 231
- #define CAT430_NAME2_COLOR_G 77
- #define CAT430_NAME2_COLOR_B 198
- #define CAT430_NAME_FONT_ENUM MEDIUM_FONT
- #define CAT430_NAME_FONT (&MMI_medium_font)
- #define CAT430_SENT_COLOR_MARKER GUI_INPUT_COLOR_BLACK
- /* Marker length in sending box, we use two color code */
- #define CAT430_MARKER_COUNT 2
- #ifdef __MMI_MAINLCD_240X320__
- #define CAT430_VERTICAL_GAP 4
- #define CAT430_HORIZONTAL_GAP 3
- #define CAT430_SENDING_BOX_V_GAP 2
- #define CAT430_SENDING_BOX_H_GAP 0
- #else /* __MMI_MAINLCD_240X320__ */
- #define CAT430_VERTICAL_GAP 2
- #define CAT430_HORIZONTAL_GAP 2
- #define CAT430_SENDING_BOX_V_GAP 2
- #define CAT430_SENDING_BOX_H_GAP 0
- #endif /* __MMI_MAINLCD_240X320__ */
- #if !defined(__MMI_MAINLCD_128X128__)
- /* Show name outside logbox */
- #undef CAT430_NAME_IN_LOG
- #else /* !defined(__MMI_MAINLCD_128X128__) */
- /* Show name inside logbox */
- #define CAT430_NAME_IN_LOG
- #endif /* !defined(__MMI_MAINLCD_128X128__) */
- /*
- * Category 435
- */
- #define CAT435_POPUP_X (MMI_content_x)
- #define CAT435_POPUP_WIDTH (MMI_CONTENT_WIDTH_WITH_H_TAB)
- #ifdef __MMI_MAINLCD_128X160__
- #define CAT435_POPUP_OVERLAP_TAB_BAR 1
- #define CAT435_POPUP_Y (MMI_CONTENT_Y_WITH_H_TAB - 6)
- #define CAT435_POPUP_HEIGHT (MMI_CONTENT_HEIGHT_WITH_H_TAB + 6)
- #undef CAT435_SHOW_LOG_BOX_WITH_POPUP
- #undef CAT435_POPUP_WITH_BORDER_TITLE
- /* Title height in popup */
- #define CAT435_POPUP_TITLE_HEIGHT 18
- /* Bottom gap between editor and multitap */
- #define CAT435_POPUP_BOTTOM_GAP 0 /* HACK. 0 for ZI input method */
- /* Horizontal gap */
- #define CAT435_POPUP_H_GAP 0 /* HACK. 0 for ZI input method */
- #elif defined(__MMI_MAINLCD_176X220__)
- #undef CAT435_POPUP_OVERLAP_TAB_BAR
- #ifdef __MMI_TOUCH_SCREEN__
- /* Virtual keyboard takes more space */
- #define CAT435_POPUP_Y (MMI_CONTENT_Y_WITH_H_TAB - 4)
- #define CAT435_POPUP_HEIGHT (MMI_CONTENT_HEIGHT_WITH_H_TAB + 4)
- #undef CAT435_SHOW_LOG_BOX_WITH_POPUP
- #else /* __MMI_TOUCH_SCREEN__ */
- #define CAT435_POPUP_Y (MMI_CONTENT_Y_WITH_H_TAB + (MMI_CONTENT_HEIGHT_WITH_H_TAB /5))
- #define CAT435_POPUP_HEIGHT (MMI_CONTENT_HEIGHT_WITH_H_TAB - (MMI_CONTENT_HEIGHT_WITH_H_TAB /5))
- #define CAT435_SHOW_LOG_BOX_WITH_POPUP
- #endif /* __MMI_TOUCH_SCREEN__ */
- #define CAT435_POPUP_WITH_BORDER_TITLE
- /* Title height in popup */
- #define CAT435_POPUP_TITLE_HEIGHT 19
- /* Bottom gap between editor and multitap */
- #define CAT435_POPUP_BOTTOM_GAP 0 /* HACK. 0 for ZI input method */
- /* Horizontal gap */
- #define CAT435_POPUP_H_GAP 0 /* HACK. 0 for ZI input method */
- #else
- /* For 240x320. 128x128 is also compiled but not linked */
- #ifdef __MMI_TOUCH_SCREEN__
- /* Virtual keyboard takes more space */
- #define CAT435_POPUP_Y (MMI_CONTENT_Y_WITH_H_TAB)
- #define CAT435_POPUP_HEIGHT (MMI_CONTENT_HEIGHT_WITH_H_TAB)
- #undef CAT435_SHOW_LOG_BOX_WITH_POPUP
- #else /* __MMI_TOUCH_SCREEN__ */
- #define CAT435_POPUP_Y (MMI_CONTENT_Y_WITH_H_TAB + (MMI_CONTENT_HEIGHT_WITH_H_TAB /5))
- #define CAT435_POPUP_HEIGHT (MMI_CONTENT_HEIGHT_WITH_H_TAB - (MMI_CONTENT_HEIGHT_WITH_H_TAB /5))
- #define CAT435_SHOW_LOG_BOX_WITH_POPUP
- #endif /* __MMI_TOUCH_SCREEN__ */
- #define CAT435_POPUP_WITH_BORDER_TITLE
- /* Title height in popup */
- #define CAT435_POPUP_TITLE_HEIGHT 30
- /* Bottom gap between editor and multitap */
- #define CAT435_POPUP_BOTTOM_GAP 0 /* HACK. 0 for ZI input method */
- /* Horizontal gap */
- #define CAT435_POPUP_H_GAP 0 /* HACK. 0 for ZI input method */
- #endif
- #define CAT435_BACKGROUND_WHITE_VALUE (80)
- /*****************************************************************************
- * Typedef
- *****************************************************************************/
- /*
- * Category 420
- */
- typedef struct
- {
- /* Data */
- UI_string_type name;
- U16 mood_caption;
- UI_string_type mood_string;
- PU8 mood_icon;
- U16 status_caption;
- UI_string_type status_string;
- PU8 status_icon;
- S16 image_ori_width, image_ori_height;
- /* Image cache */
- U32 display_image:1;
- U32 image_is_cached:1;
- gdi_handle cache_layer;
- /* Layout */
- S16 content_width;
- S16 editor_header_height;
- S16 name_x, name_y, name_width;
- S16 line_x1, line_x2, line_y;
- S16 mood_caption_x, mood_caption_y;
- S16 mood_image_x, mood_image_y;
- #ifdef CAT420_DISP_INFO_TEXT
- S16 mood_text_x, mood_text_y;
- #endif
- S16 status_caption_x, status_caption_y;
- S16 status_image_x, status_image_y;
- #ifdef CAT420_DISP_INFO_TEXT
- S16 status_text_x, status_text_y;
- #endif
- S16 image_area_x, image_area_y;
- S16 image_area_width, image_area_height;
- S16 image_x_offset, image_y_offset;
- S16 image_resized_width, image_resized_height; /* 0 if no resize */
- } gui_cat420_context_struct;
- /*
- * Category 425
- */
- typedef struct
- {
- U32 backup_menu_flags;
- UI_filled_area *backup_menu_filler;
- S16 icon_border_x1, icon_border_y1, icon_border_x2, icon_border_y2;
- S16 bracket_x, bracket_y;
- S16 num_tab;
- S32 content_x, content_y, content_width, content_height;
- /* For RefreshCategory425Screen */
- GetAsyncItemFuncPtr get_item_func;
- GetAsyncHintFuncPtr get_hint_func;
- } gui_cat425_context_struct;
- /*
- * Category 430
- */
- typedef struct
- {
- /* Another input box */
- multi_line_input_box log_box1;
- U8 *allocated_color_buffer; /* Add color marker */
- /* Data */
- U8 *name1, *name2;
- U8 *log_buffer1;
- U8 *log_buffer2;
- U8 *sending_buffer;
- S16 log_buffer_size1;
- S16 log_buffer_size2;
- S16 max_sending_buffer_size;
- S16 sent_count;
- S16 allocated_color_buffer_size;
- MMI_BOOL show_sending_buffer;
- #ifdef __MMI_TOUCH_SCREEN__
- U8 pen_object; /* 0: none, 1: log_box1, 2: log_box2 */
- #endif
- /* Layout */
- #ifndef CAT430_NAME_IN_LOG
- S16 name1_x, name1_y;
- S16 name2_x, name2_y;
- #else /* CAT430_NAME_IN_LOG */
- S16 log_box_header_height;
- #endif /* CAT430_NAME_IN_LOG */
- S16 log_box1_x, log_box1_y;
- S16 log_box1_width, log_box1_height;
- S16 log_box2_x, log_box2_y;
- S16 log_box2_width, log_box2_height;
- S16 log_box2_footer_height;
- S16 sending_box_x, sending_box_y; /* relative coordinates */
- S16 sending_box_width;
- } gui_cat430_context_struct;
- typedef struct
- {
- S32 dummy;
- } gui_cat430_history_header_struct;
- /*
- * Category 435
- */
- typedef struct
- {
- /* Backup original MMI context */
- UI_filled_area *backup_multitap_filler;
- color backup_information_bar_color;
- S32 backup_MMI_editor_width, backup_MMI_editor_height;
- /* Log editor box */
- multi_line_input_box log_box;
- UI_filled_area log_box_scrollbar_sbutton_filler;
- /* Category parameters */
- U16 right_softkey;
- U16 right_softkey_icon;
- U16 left_softkey;
- U16 left_softkey_icon;
- U16 editor_right_softkey;
- U16 editor_right_softkey_icon;
- U16 editor_left_softkey;
- U16 editor_left_softkey_icon;
- UI_string_type popup_title;
- /* Softkey handlers */
- void (*editor_LSK_func) (void);
- void (*editor_RSK_func) (void);
- void (*LSK_func) (void);
- void (*RSK_func) (void);
- /* Whether the popup editor is displayed */
- BOOL show_popup;
- /* Data used to setup the popup editor */
- BOOL editor_created; /* For debug only */
- S16 input_type;
- U8 *buffer;
- S8 icon_height;
- S32 buffer_size;
- multi_line_input_box_icon_hdlr icon_callback;
- } gui_cat435_context_struct;
- typedef struct
- {
- U8 show_popup;
- U8 dummy[3]; /* Align to four bytes */
- } gui_cat435_history_header_struct;
- /*****************************************************************************
- * Local Variable
- *****************************************************************************/
- /*
- * Category 420
- */
- static gui_cat420_context_struct *g_mmi_gui_cat420_context_p;
- #define CAT420_CTX (g_mmi_gui_cat420_context_p)
- static const U8 g_mmi_gui_cat420_line_style[] = {1, 1, 1, 0, 1, 0};
- static UI_filled_area g_mmi_gui_cat420_text_filler = {UI_FILLED_AREA_TYPE_COLOR | UI_FILLED_AREA_BORDER,
- NULL,
- NULL,
- {200, 248, 232, 100},
- {0, 0, 0, 0},
- {80, 136, 80, 0},
- {0, 0, 0, 0},
- 0
- };
- /*
- * Category 425
- */
- static gui_cat425_context_struct *g_mmi_gui_cat425_context_p;
- #define CAT425_CTX (g_mmi_gui_cat425_context_p)
- #if 0
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- #endif /* 0 */
- static const U8 g_mmi_gui_cat425_line_bitvalues[] = {1, 1, 0};
- /*
- * Category 430
- */
- static gui_cat430_context_struct *g_mmi_gui_cat430_context_p;
- #define CAT430_CTX (g_mmi_gui_cat430_context_p)
- static const UI_filled_area g_mmi_gui_cat430_logbox_filler =
- {
- UI_FILLED_AREA_TYPE_COLOR | UI_FILLED_AREA_BORDER,
- NULL,
- NULL,
- {255, 255, 255, 100},
- {0, 0, 0, 0},
- {33, 28, 140, 100},
- {0, 0, 0, 0},
- 0
- };
- static const UI_filled_area g_mmi_gui_cat430_sending_filler =
- {
- UI_FILLED_AREA_TYPE_COLOR,
- NULL,
- NULL,
- {225, 220, 225, 100},
- {0, 0, 0, 0},
- {0, 0, 0, 100},
- {0, 0, 0, 0},
- 0
- };
- /*
- * Category 435
- */
- static gui_cat435_context_struct *g_mmi_gui_cat435_context_p;
- #define CAT435_CTX (g_mmi_gui_cat435_context_p)
- static const UI_filled_area g_mmi_gui_cat435_editor_filler =
- {
- #ifdef __MMI_TOUCH_SCREEN__
- UI_FILLED_AREA_TYPE_COLOR, /* No border due to virtual keyboard */
- #else
- UI_FILLED_AREA_TYPE_COLOR | UI_FILLED_AREA_BORDER,
- #endif
- NULL,
- NULL,
- {255, 254, 209, 100},
- {0, 0, 0, 0},
- {184, 184, 184, 100},
- {0, 0, 0, 0},
- 0
- };
- static const UI_filled_area g_mmi_gui_cat435_multitap_filler = {UI_FILLED_AREA_TYPE_COLOR,
- NULL,
- NULL,
- {216, 208, 200, 100},
- {0, 0, 0, 0},
- {0, 0, 0, 0},
- {0, 0, 0, 0},
- 0
- };
- static const color g_mmi_gui_cat435_popup_color = {216, 208, 200, 100};
- #if defined (__MMI_WALLPAPER_ON_BOTTOM__)
- static MMI_ID_TYPE editor_scr_bg_ID;
- static S8 *editor_scr_bg_filename;
- static S32 editor_scr_bg_x, editor_scr_bg_y;
- static U8 editor_scr_bg_opacity;
- #endif /* defined (__MMI_WALLPAPER_ON_BOTTOM__) */
- /*****************************************************************************
- * Local Function
- *****************************************************************************/
- /*
- * Category 420
- */
- /*****************************************************************************
- * FUNCTION
- * category420_compute_layout
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void category420_compute_layout(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 sw, sh; /* string width/height */
- S32 iw, ih; /* image width/height */
- S32 cw; /* content width */
- S32 line_height, tmp_y;
- S32 img_left_bound, img_left_lower_bound;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- cw = CAT420_CTX->content_width = UI_device_width - current_MMI_theme->scrollbar_size;
- gui_set_font(&MMI_medium_font);
- /* Name */
- Get_StringWidthHeight((U8*) CAT420_CTX->name, &sw, &sh);
- if (sw > UI_device_width - (CAT420_LINE_EXTRA_PIXEL << 1))
- {
- sw = UI_device_width - (CAT420_LINE_EXTRA_PIXEL << 1);
- }
- CAT420_CTX->name_x = (cw - sw) >> 1;
- CAT420_CTX->name_y = CAT420_TOP_MARGIN;
- CAT420_CTX->name_width = sw;
- CAT420_CTX->line_x1 = CAT420_CTX->name_x - CAT420_LINE_EXTRA_PIXEL;
- CAT420_CTX->line_x2 = CAT420_CTX->name_x + sw + CAT420_LINE_EXTRA_PIXEL - 1;
- if (CAT420_CTX->line_x1 < 0)
- {
- CAT420_CTX->line_x1 = 0;
- }
- if (CAT420_CTX->line_x2 >= cw)
- {
- CAT420_CTX->line_x2 = cw - 1;
- }
- CAT420_CTX->line_y = CAT420_CTX->name_y + sh + CAT420_NAME_LINE_V_SPACING;
- img_left_lower_bound = 0;
- /* Mood */
- #ifdef CAT420_DISP_INFO_TEXT
- tmp_y = CAT420_CTX->line_y + CAT420_LINE_IMAGE_V_SPACING;
- Get_StringWidthHeight((U8*) GetString(CAT420_CTX->mood_caption), &sw, &sh);
- gui_measure_image(CAT420_CTX->mood_icon, &iw, &ih);
- CAT420_CTX->mood_caption_x = CAT420_LEFT_MARGIN;
- CAT420_CTX->mood_image_x = CAT420_CTX->mood_caption_x + sw + CAT420_CAPTION_IMAGE_H_SPACING;
- line_height = sh > ih ? sh : ih;
- CAT420_CTX->mood_caption_y = tmp_y + ((line_height - sh) >> 1);
- CAT420_CTX->mood_image_y = tmp_y + ((line_height - ih) >> 1);
- if (CAT420_CTX->mood_image_x + iw > img_left_lower_bound)
- {
- img_left_lower_bound = CAT420_CTX->mood_image_x + iw;
- }
- Get_StringWidthHeight((U8*) CAT420_CTX->mood_string, &sw, &sh);
- CAT420_CTX->mood_text_x = CAT420_LEFT_MARGIN;
- CAT420_CTX->mood_text_y = tmp_y + line_height + CAT420_MOOD_STATUS_V_SPACING;
- if (CAT420_CTX->mood_text_x + sw > img_left_lower_bound)
- {
- img_left_lower_bound = CAT420_CTX->mood_text_x + sw;
- }
- #else /* CAT420_DISP_INFO_TEXT */
- UI_UNUSED_PARAMETER(line_height);
- tmp_y = CAT420_CTX->line_y + CAT420_LINE_IMAGE_V_SPACING;
- Get_StringWidthHeight((U8*) GetString(CAT420_CTX->mood_caption), &sw, &sh);
- gui_measure_image(CAT420_CTX->mood_icon, &iw, &ih);
- CAT420_CTX->mood_caption_x = CAT420_LEFT_MARGIN;
- CAT420_CTX->mood_caption_y = tmp_y;
- CAT420_CTX->mood_image_x = CAT420_LEFT_MARGIN;
- CAT420_CTX->mood_image_y = tmp_y + sh + CAT420_MOOD_STATUS_V_SPACING;
- if (CAT420_CTX->mood_caption_x + sw > img_left_lower_bound)
- {
- img_left_lower_bound = CAT420_CTX->mood_caption_x + sw;
- }
- if (CAT420_CTX->mood_image_x + iw > img_left_lower_bound)
- {
- img_left_lower_bound = CAT420_CTX->mood_image_x + iw;
- }
- #endif /* CAT420_DISP_INFO_TEXT */
- /* Status */
- #ifdef CAT420_DISP_INFO_TEXT
- tmp_y = CAT420_CTX->mood_text_y + sh + CAT420_MOOD_STATUS_V_SPACING;
- Get_StringWidthHeight((U8*) GetString(CAT420_CTX->status_caption), &sw, &sh);
- gui_measure_image(CAT420_CTX->status_icon, &iw, &ih);
- CAT420_CTX->status_caption_x = CAT420_LEFT_MARGIN;
- CAT420_CTX->status_image_x = CAT420_CTX->status_caption_x + sw + CAT420_CAPTION_IMAGE_H_SPACING;
- line_height = sh > ih ? sh : ih;
- CAT420_CTX->status_caption_y = tmp_y + ((line_height - sh) >> 1);
- CAT420_CTX->status_image_y = tmp_y + ((line_height - ih) >> 1);
- if (CAT420_CTX->status_image_x + iw > img_left_lower_bound)
- {
- img_left_lower_bound = CAT420_CTX->status_image_x + iw;
- }
- Get_StringWidthHeight((U8*) CAT420_CTX->status_string, &sw, &sh);
- CAT420_CTX->status_text_x = CAT420_LEFT_MARGIN;
- CAT420_CTX->status_text_y = tmp_y + line_height + CAT420_MOOD_STATUS_V_SPACING;
- if (CAT420_CTX->status_text_x + sw > img_left_lower_bound)
- {
- img_left_lower_bound = CAT420_CTX->status_text_x + sw;
- }
- #else /* CAT420_DISP_INFO_TEXT */
- tmp_y = CAT420_CTX->mood_image_y + ih + CAT420_MOOD_STATUS_V_SPACING;
- Get_StringWidthHeight((U8*) GetString(CAT420_CTX->status_caption), &sw, &sh);
- gui_measure_image(CAT420_CTX->status_icon, &iw, &ih);
- CAT420_CTX->status_caption_x = CAT420_LEFT_MARGIN;
- CAT420_CTX->status_caption_y = tmp_y;
- CAT420_CTX->status_image_x = CAT420_LEFT_MARGIN;
- CAT420_CTX->status_image_y = tmp_y + sh + CAT420_MOOD_STATUS_V_SPACING;
- if (CAT420_CTX->status_caption_x + sw > img_left_lower_bound)
- {
- img_left_lower_bound = CAT420_CTX->status_caption_x + sw;
- }
- if (CAT420_CTX->status_image_x + iw > img_left_lower_bound)
- {
- img_left_lower_bound = CAT420_CTX->status_image_x + iw;
- }
- #endif /* CAT420_DISP_INFO_TEXT */
- /* Compute image width */
- img_left_lower_bound += CAT420_IMAGE_H_SPACING;
- if (img_left_lower_bound > cw - CAT420_RIGHT_MARGIN - CAT420_IMAGE_AREA_MIN_WIDTH)
- {
- img_left_lower_bound = cw - CAT420_RIGHT_MARGIN - CAT420_IMAGE_AREA_MIN_WIDTH;
- }
- img_left_bound = cw - CAT420_RIGHT_MARGIN - CAT420_IMAGE_AREA_WIDTH;
- if (img_left_bound < img_left_lower_bound)
- {
- img_left_bound = img_left_lower_bound;
- }
- img_left_lower_bound -= CAT420_IMAGE_H_SPACING;
- /* Total height */
- #ifdef CAT420_DISP_INFO_TEXT
- CAT420_CTX->editor_header_height = CAT420_CTX->status_text_y + sh + CAT420_BOTTOM_MARGIN;
- #else
- CAT420_CTX->editor_header_height = CAT420_CTX->status_image_y + ih + CAT420_BOTTOM_MARGIN;
- #endif
- /* Image */
- if (img_left_bound + CAT420_RIGHT_MARGIN >= cw || CAT420_CTX->image_ori_width == 0 ||
- CAT420_CTX->image_ori_height == 0)
- {
- CAT420_CTX->display_image = MMI_FALSE;
- }
- CAT420_CTX->image_area_x = img_left_bound;
- CAT420_CTX->image_area_y = CAT420_CTX->line_y + CAT420_LINE_IMAGE_V_SPACING;
- CAT420_CTX->image_area_width = cw - CAT420_RIGHT_MARGIN - img_left_bound;
- #ifdef CAT420_DISP_INFO_TEXT
- CAT420_CTX->image_area_height = CAT420_CTX->status_text_y + sh - CAT420_CTX->image_area_y;
- #else
- CAT420_CTX->image_area_height = CAT420_CTX->status_image_y + ih - CAT420_CTX->image_area_y;
- #endif
- /* Align text/icon to right for Arabic language */
- if (r2lMMIFlag)
- {
- S32 xd;
- /* Align mood to right */
- xd = CAT420_CTX->mood_caption_x - CAT420_LEFT_MARGIN;
- sw = gui_get_string_width((UI_string_type) GetString(CAT420_CTX->mood_caption));
- CAT420_CTX->mood_caption_x = img_left_lower_bound - xd - sw + 1;
- xd = CAT420_CTX->mood_image_x - CAT420_LEFT_MARGIN;
- gui_measure_image(CAT420_CTX->mood_icon, &iw, &ih);
- CAT420_CTX->mood_image_x = img_left_lower_bound - xd - iw + 1;
- #ifdef CAT420_DISP_INFO_TEXT
- xd = CAT420_CTX->mood_text_x - CAT420_LEFT_MARGIN;
- sw = gui_get_string_width(CAT420_CTX->mood_string);
- CAT420_CTX->mood_text_x = img_left_lower_bound - xd - sw + 1;
- #endif /* CAT420_DISP_INFO_TEXT */
- /* Align status to right */
- xd = CAT420_CTX->status_caption_x - CAT420_LEFT_MARGIN;
- sw = gui_get_string_width((UI_string_type) GetString(CAT420_CTX->status_caption));
- CAT420_CTX->status_caption_x = img_left_lower_bound - xd - sw + 1;
- xd = CAT420_CTX->status_image_x - CAT420_LEFT_MARGIN;
- gui_measure_image(CAT420_CTX->status_icon, &iw, &ih);
- CAT420_CTX->status_image_x = img_left_lower_bound - xd - iw + 1;
- #ifdef CAT420_DISP_INFO_TEXT
- xd = CAT420_CTX->status_text_x - CAT420_LEFT_MARGIN;
- sw = gui_get_string_width(CAT420_CTX->status_string);
- CAT420_CTX->status_text_x = img_left_lower_bound - xd - sw + 1;
- #endif /* CAT420_DISP_INFO_TEXT */
- }
- /* Resize photo if required */
- if (CAT420_CTX->display_image)
- {
- S32 zoom_offset_x, zoom_offset_y, zoom_size_width, zoom_size_height;
- if (CAT420_CTX->image_ori_width <= CAT420_CTX->image_area_width &&
- CAT420_CTX->image_ori_height <= CAT420_CTX->image_area_height)
- {
- zoom_offset_x = (CAT420_CTX->image_area_width - CAT420_CTX->image_ori_width) >> 1;
- zoom_offset_y = (CAT420_CTX->image_area_height - CAT420_CTX->image_ori_height) >> 1;
- zoom_size_width = 0;
- zoom_size_height = 0;
- }
- else
- {
- gdi_image_util_fit_bbox(
- (S32) CAT420_CTX->image_area_width,
- (S32) CAT420_CTX->image_area_height,
- (S32) CAT420_CTX->image_ori_width,
- (S32) CAT420_CTX->image_ori_height,
- &zoom_offset_x,
- &zoom_offset_y,
- &zoom_size_width,
- &zoom_size_height);
- }
- CAT420_CTX->image_x_offset = (S16) CAT420_CTX->image_area_x + zoom_offset_x;
- CAT420_CTX->image_y_offset = (S16) CAT420_CTX->image_area_y + zoom_offset_y;
- CAT420_CTX->image_resized_width = (S16) zoom_size_width;
- CAT420_CTX->image_resized_height = (S16) zoom_size_height;
- }
- }
- /* FIXME. We may move image caching routines to wgui.c */
- /*****************************************************************************
- * FUNCTION
- * category420_cache_image
- * DESCRIPTION
- *
- * PARAMETERS
- * image_path [?]
- * alternative_image [?]
- * use_alternative_image [IN]
- * RETURNS
- * void
- *****************************************************************************/
- static void category420_cache_image(S8 *image_path, U8 *alternative_image, S32 use_alternative_image)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (!CAT420_CTX->display_image)
- {
- CAT420_CTX->image_is_cached = 0;
- CAT420_CTX->cache_layer = GDI_LAYER_EMPTY_HANDLE;
- }
- else
- {
- CAT420_CTX->image_is_cached = 1;
- gdi_layer_multi_layer_enable();
- gdi_layer_create(0, 0, UI_device_width, UI_device_height, &CAT420_CTX->cache_layer);
- gdi_layer_push_and_set_active(CAT420_CTX->cache_layer);
- if (CAT420_CTX->image_resized_width == 0 || CAT420_CTX->image_resized_height == 0)
- {
- /* Fill background in case that the image is truncated */
- gdi_draw_solid_rect(
- 0,
- 0,
- CAT420_CTX->image_ori_width,
- CAT420_CTX->image_ori_height,
- gdi_act_color_from_rgb(255, 255, 255, 255));
- if (use_alternative_image)
- {
- gdi_image_draw(0, 0, alternative_image);
- }
- else
- {
- gdi_image_draw_file(0, 0, image_path);
- }
- }
- else
- {
- gdi_draw_solid_rect(
- 0,
- 0,
- CAT420_CTX->image_resized_width,
- CAT420_CTX->image_resized_height,
- gdi_act_color_from_rgb(255, 255, 255, 255));
- if (use_alternative_image)
- {
- gdi_image_draw_resized(
- 0,
- 0,
- CAT420_CTX->image_resized_width,
- CAT420_CTX->image_resized_height,
- alternative_image);
- }
- else
- {
- gdi_image_draw_resized_file(
- 0,
- 0,
- CAT420_CTX->image_resized_width,
- CAT420_CTX->image_resized_height,
- image_path);
- }
- }
- gdi_layer_pop_and_restore_active();
- }
- }
- /* Free GDI layer of the image cache */
- /*****************************************************************************
- * FUNCTION
- * category420_free_image_cache
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void category420_free_image_cache(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (CAT420_CTX->image_is_cached)
- {
- gdi_layer_free(CAT420_CTX->cache_layer);
- gdi_layer_multi_layer_disable();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * category420_show_cached_image
- * DESCRIPTION
- *
- * PARAMETERS
- * x_offset [IN]
- * y_offset [IN]
- * width [IN]
- * height [IN]
- * RETURNS
- * void
- *****************************************************************************/
- static void category420_show_cached_image(S32 x_offset, S32 y_offset, S32 width, S32 height)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 x1, y1, x2, y2, x, y, y_multiple;
- U16 *cached_buffer;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (!CAT420_CTX->image_is_cached)
- {
- return;
- }
- /* Get clipping region inside the editor */
- gdi_layer_get_clip(&x1, &y1, &x2, &y2);
- gdi_layer_push_and_set_active(CAT420_CTX->cache_layer);
- gdi_layer_get_buffer_ptr((U8 **) & cached_buffer);
- gdi_layer_pop_and_restore_active();
- if (x1 < x_offset)
- {
- x1 = x_offset;
- }
- if (y1 < y_offset)
- {
- y1 = y_offset;
- }
- if (x2 > x_offset + width - 1)
- {
- x2 = x_offset + width - 1;
- }
- if (y2 > y_offset + height - 1)
- {
- y2 = y_offset + height - 1;
- }
- y_multiple = (y1 - y_offset) * UI_device_width;
- for (y = y1; y <= y2; y++)
- {
- for (x = x1; x <= x2; x++)
- {
- GDI_SET_BUFFER_PIXEL(x, y, cached_buffer[y_multiple + x - x_offset]);
- }
- y_multiple += UI_device_width;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * category420_header_callback
- * DESCRIPTION
- *
- * PARAMETERS
- * yoffset [IN]
- * clip_x1 [IN]
- * clip_y1 [IN]
- * clip_x2 [IN]
- * clip_y2 [IN]
- * RETURNS
- * void
- *****************************************************************************/
- static void category420_header_callback(S32 yoffset, S32 clip_x1, S32 clip_y1, S32 clip_x2, S32 clip_y2)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 sw, sh; /* string width/height */
- color tc;
- gdi_color c;
- S32 xoffset = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Hack. xoffset should be provided in callback function */
- if (r2lMMIFlag)
- {
- xoffset = MMI_multiline_inputbox.vbar.width;
- }
- gui_push_clip();
- gui_push_text_clip();
- gui_set_clip(clip_x1, clip_y1, clip_x2, clip_y2);
- gui_set_text_clip(clip_x1, clip_y1, clip_x2, clip_y2);
- gui_set_font(&MMI_medium_font);
- tc.r = CAT420_TEXT_COLOR_R;
- tc.g = CAT420_TEXT_COLOR_G;
- tc.b = CAT420_TEXT_COLOR_B;
- tc.alpha = 100;
- gui_set_text_color(tc);
- c = gdi_act_color_from_rgb(255, CAT420_LINE_COLOR_R, CAT420_LINE_COLOR_G, CAT420_LINE_COLOR_B);
- /* Name */
- Get_StringWidthHeight((U8*) CAT420_CTX->name, &sw, &sh);
- if (sw > CAT420_CTX->name_width)
- {
- if (r2lMMIFlag)
- {
- gui_print_truncated_text(
- xoffset + CAT420_CTX->name_x + CAT420_CTX->name_width - 1,
- yoffset + CAT420_CTX->name_y,
- CAT420_CTX->name_width,
- CAT420_CTX->name);
- }
- else
- {
- gui_print_truncated_text(
- xoffset + CAT420_CTX->name_x,
- yoffset + CAT420_CTX->name_y,
- CAT420_CTX->name_width,
- CAT420_CTX->name);
- }
- }
- else
- {
- if (r2lMMIFlag)
- {
- gui_move_text_cursor(xoffset + CAT420_CTX->name_x + sw - 1, yoffset + CAT420_CTX->name_y);
- }
- else
- {
- gui_move_text_cursor(xoffset + CAT420_CTX->name_x, yoffset + CAT420_CTX->name_y);
- }
- gui_print_text(CAT420_CTX->name);
- }
- gdi_draw_line_style(
- xoffset + CAT420_CTX->line_x1,
- yoffset + CAT420_CTX->line_y,
- xoffset + CAT420_CTX->line_x2,
- yoffset + CAT420_CTX->line_y,
- c,
- sizeof(g_mmi_gui_cat420_line_style),
- g_mmi_gui_cat420_line_style);
- /* Mood */
- sw = gui_get_string_width((UI_string_type) GetString(CAT420_CTX->mood_caption));
- if (r2lMMIFlag)
- {
- gui_move_text_cursor(xoffset + CAT420_CTX->mood_caption_x + sw - 1, yoffset + CAT420_CTX->mood_caption_y);
- }
- else
- {
- gui_move_text_cursor(xoffset + CAT420_CTX->mood_caption_x, yoffset + CAT420_CTX->mood_caption_y);
- }
- gui_print_text((UI_string_type) GetString(CAT420_CTX->mood_caption));
- gui_show_transparent_image(
- xoffset + CAT420_CTX->mood_image_x,
- yoffset + CAT420_CTX->mood_image_y,
- CAT420_CTX->mood_icon,
- UI_DEFAULT_TRANSPARENT_COLOR);
- #ifdef CAT420_DISP_INFO_TEXT
- sw = gui_get_string_width(CAT420_CTX->mood_string);
- if (r2lMMIFlag)
- {
- gui_move_text_cursor(xoffset + CAT420_CTX->mood_text_x + sw - 1, yoffset + CAT420_CTX->mood_text_y);
- }
- else
- {
- gui_move_text_cursor(xoffset + CAT420_CTX->mood_text_x, yoffset + CAT420_CTX->mood_text_y);
- }
- gui_print_text(CAT420_CTX->mood_string);
- #endif /* CAT420_DISP_INFO_TEXT */
- /* Status */
- sw = gui_get_string_width((UI_string_type) GetString(CAT420_CTX->status_caption));
- if (r2lMMIFlag)
- {
- gui_move_text_cursor(xoffset + CAT420_CTX->status_caption_x + sw - 1, yoffset + CAT420_CTX->status_caption_y);
- }
- else
- {
- gui_move_text_cursor(xoffset + CAT420_CTX->status_caption_x, yoffset + CAT420_CTX->status_caption_y);
- }
- gui_print_text((UI_string_type) GetString(CAT420_CTX->status_caption));
- gui_show_transparent_image(
- xoffset + CAT420_CTX->status_image_x,
- yoffset + CAT420_CTX->status_image_y,
- CAT420_CTX->status_icon,
- UI_DEFAULT_TRANSPARENT_COLOR);
- #ifdef CAT420_DISP_INFO_TEXT
- sw = gui_get_string_width(CAT420_CTX->status_string);
- if (r2lMMIFlag)
- {
- gui_move_text_cursor(xoffset + CAT420_CTX->status_text_x + sw - 1, yoffset + CAT420_CTX->status_text_y);
- }
- else
- {
- gui_move_text_cursor(xoffset + CAT420_CTX->status_text_x, yoffset + CAT420_CTX->status_text_y);
- }
- gui_print_text(CAT420_CTX->status_string);
- #endif /* CAT420_DISP_INFO_TEXT */
- /* Image */
- if (CAT420_CTX->display_image)
- {
- if (CAT420_CTX->image_resized_width == 0 || CAT420_CTX->image_resized_height == 0)
- {
- category420_show_cached_image(
- xoffset + CAT420_CTX->image_x_offset,
- yoffset + CAT420_CTX->image_y_offset,
- CAT420_CTX->image_ori_width,
- CAT420_CTX->image_ori_height);
- }
- else
- {
- category420_show_cached_image(
- xoffset + CAT420_CTX->image_x_offset,
- yoffset + CAT420_CTX->image_y_offset,
- CAT420_CTX->image_resized_width,
- CAT420_CTX->image_resized_height);
- }
- }
- gdi_draw_rect(
- xoffset + CAT420_CTX->image_area_x - 1,
- yoffset + CAT420_CTX->image_area_y - 1,
- xoffset + CAT420_CTX->image_area_x + CAT420_CTX->image_area_width,
- yoffset + CAT420_CTX->image_area_y + CAT420_CTX->image_area_height,
- c);
- gui_pop_text_clip();
- gui_pop_clip();
- }
- /*
- * Category 425
- */
- /*****************************************************************************
- * FUNCTION
- * category425_set_icontext_list_text_color
- * DESCRIPTION
- *
- * PARAMETERS
- * col [IN]
- * c1 [IN]
- * c2 [IN]
- * RETURNS
- * void
- *****************************************************************************/
- static void category425_set_icontext_list_text_color(int col, color c1, color c2)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_fixed_icontext_list_menuitem.normal_text_colors[col] = c1;
- MMI_fixed_icontext_list_menuitem.disabled_text_colors[col] = c1;
- MMI_fixed_icontext_list_menuitem.selected_text_colors[col] = c2;
- MMI_fixed_icontext_list_menuitem.focussed_text_colors[col] = c2;
- }
- /*****************************************************************************
- * FUNCTION
- * category425_setup_text_color
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void category425_setup_text_color(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- color c1, c2;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_MAINLCD_240X320__
- c1 = *current_MMI_theme->list_normal_text_color;
- c2 = *current_MMI_theme->list_selected_text_color;
- #else /* __MMI_MAINLCD_240X320__ */
- c1.r = CAT425_TEXT1_COLOR_R;
- c1.g = CAT425_TEXT1_COLOR_G;
- c1.b = CAT425_TEXT1_COLOR_B;
- c2.r = CAT425_TEXT1_HIGHLIGHT_COLOR_R;
- c2.g = CAT425_TEXT1_HIGHLIGHT_COLOR_G;
- c2.b = CAT425_TEXT1_HIGHLIGHT_COLOR_B;
- #endif /* __MMI_MAINLCD_240X320__ */
- category425_set_icontext_list_text_color(0, c1, c2);
- #ifndef __MMI_MAINLCD_240X320__
- c1.r = CAT425_TEXT2_COLOR_R;
- c1.g = CAT425_TEXT2_COLOR_G;
- c1.b = CAT425_TEXT2_COLOR_B;
- c2.r = CAT425_TEXT2_HIGHLIGHT_COLOR_R;
- c2.g = CAT425_TEXT2_HIGHLIGHT_COLOR_G;
- c2.b = CAT425_TEXT2_HIGHLIGHT_COLOR_B;
- #endif /* __MMI_MAINLCD_240X320__ */
- category425_set_icontext_list_text_color(1, c1, c2);
- }
- /*****************************************************************************
- * FUNCTION
- * category425_reset_context
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void category425_reset_context(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_fixed_list_menu.flags = CAT425_CTX->backup_menu_flags;
- MMI_fixed_list_menu.normal_filler = CAT425_CTX->backup_menu_filler;
- fixed_icontext_list_menuitem_apply_current_theme();
- OslMfree(g_mmi_gui_cat425_context_p);
- g_mmi_gui_cat425_context_p = NULL;
- }
- /*****************************************************************************
- * FUNCTION
- * category425_post_display_menuitem
- * DESCRIPTION
- *
- * PARAMETERS
- * item [?]
- * common_item_data [?]
- * x [IN]
- * y [IN]
- * RETURNS
- * void
- *****************************************************************************/
- static void category425_post_display_menuitem(void *item, void *common_item_data, S32 x, S32 y)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- color c;
- fixed_icontext_list_menuitem *m = (fixed_icontext_list_menuitem*) common_item_data;
- fixed_icontext_list_menuitem_type *mi = (fixed_icontext_list_menuitem_type*) item;
- S32 x2, y2;
- gdi_color border_color;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- x2 = x + m->width - 1;
- y2 = y + m->height - 1;
- gui_push_clip();
- gui_set_clip(x, y, x2, y2);
- border_color =
- (gdi_color) ((mi->flags & UI_MENUITEM_STATE_FOCUSSED) ?
- gdi_act_color_from_rgb(
- 255,
- CAT425_ICON_HIGHLIGHT_BORDER_COLOR_R,
- CAT425_ICON_HIGHLIGHT_BORDER_COLOR_G,
- CAT425_ICON_HIGHLIGHT_BORDER_COLOR_B) : gdi_act_color_from_rgb(
- 255,
- CAT425_ICON_BORDER_COLOR_R,
- CAT425_ICON_BORDER_COLOR_G,
- CAT425_ICON_BORDER_COLOR_B));
- c.r = CAT425_TEXT2_BRACKET_COLOR_R;
- c.g = CAT425_TEXT2_BRACKET_COLOR_G;
- c.b = CAT425_TEXT2_BRACKET_COLOR_B;
- gui_set_text_color(c);
- if (r2lMMIFlag)
- {
- gui_move_text_cursor(x2 - CAT425_CTX->bracket_x, y + CAT425_CTX->bracket_y);
- gui_print_text((UI_string_type) L"]");
- gui_move_text_cursor(
- x2 - m->text_coordinates[1].x - m->text_coordinates[1].width - CAT425_TEXT2_BRACKET_GAP,
- y + CAT425_CTX->bracket_y);
- gui_print_text((UI_string_type) L"[");
- gdi_draw_rect(
- x2 - CAT425_CTX->icon_border_x1,
- y + CAT425_CTX->icon_border_y1,
- x2 - CAT425_CTX->icon_border_x2,
- y + CAT425_CTX->icon_border_y2,
- border_color);
- }
- else
- {
- gui_move_text_cursor(x + CAT425_CTX->bracket_x, y + CAT425_CTX->bracket_y);
- gui_print_text((UI_string_type) L"[");
- gui_move_text_cursor(
- x + m->text_coordinates[1].x + m->text_coordinates[1].width + CAT425_TEXT2_BRACKET_GAP,
- y + CAT425_CTX->bracket_y);
- gui_print_text((UI_string_type) L"]");
- gdi_draw_rect(
- x + CAT425_CTX->icon_border_x1,
- y + CAT425_CTX->icon_border_y1,
- x + CAT425_CTX->icon_border_x2,
- y + CAT425_CTX->icon_border_y2,
- border_color);
- }
- gdi_draw_line_style(
- x,
- y2,
- x2,
- y2,
- gdi_act_color_from_rgb(255, CAT425_LINE_COLOR_R, CAT425_LINE_COLOR_G, CAT425_LINE_COLOR_B),
- sizeof(g_mmi_gui_cat425_line_bitvalues),
- g_mmi_gui_cat425_line_bitvalues);
- gui_pop_clip();
- }
- /*
- * Category 430
- */
- /* b is configured, and b->height is computed */
- /*****************************************************************************
- * FUNCTION
- * category430_create_sending_box
- * DESCRIPTION
- *
- * PARAMETERS
- * b [?]
- * x [IN]
- * y [IN]
- * RETURNS
- * void
- *****************************************************************************/
- static void category430_create_sending_box(multi_line_input_box *b, S16 x, S16 y)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 length;
- S32 read_index;
- wgui_color_buffer_writer_struct writer;
- S32 h;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- length = gui_strlen((UI_string_type) CAT430_CTX->sending_buffer);
- /* Create color text buffer */
- MMI_ASSERT(CAT430_CTX->sent_count <= length && length <= CAT430_CTX->max_sending_buffer_size);
- CAT430_CTX->allocated_color_buffer[0] = CAT430_CTX->allocated_color_buffer[1] = 0;
- wgui_color_buffer_create_writer(
- &writer,
- CAT430_CTX->allocated_color_buffer,
- CAT430_CTX->allocated_color_buffer_size);
- wgui_color_buffer_write_char(&writer, GUI_INPUT_COLOR_BLACK);
- for (read_index = 0; read_index < CAT430_CTX->sent_count; read_index++)
- {
- wgui_color_buffer_write_char(&writer, *((U16*) & CAT430_CTX->sending_buffer[read_index << 1]));
- }
- wgui_color_buffer_write_char(&writer, GUI_INPUT_COLOR_TEAL);
- for (read_index = CAT430_CTX->sent_count; read_index < length; read_index++)
- {
- wgui_color_buffer_write_char(&writer, *((U16*) & CAT430_CTX->sending_buffer[read_index << 1]));
- }
- gui_create_multi_line_input_box_set_buffer(
- b,
- x,
- y,
- CAT430_CTX->sending_box_width,
- UI_device_height /* max height */ ,
- (UI_string_type) CAT430_CTX->allocated_color_buffer,
- CAT430_CTX->max_sending_buffer_size * 2,
- (length + 1) * 2,
- 0);
- b->flags |=
- (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_VIEW_MODE |
- UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR | UI_MULTI_LINE_INPUT_BOX_RICHTEXT);
- b->normal_filler = (UI_filled_area*)&g_mmi_gui_cat430_sending_filler;
- /* Compute text height and adjust scroll offset */
- b->flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- gui_show_multi_line_input_box(b);
- b->flags &= ~UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- /* Setup height */
- h = b->text_height + b->text_y;
- gui_resize_multi_line_input_box(b, b->width, h);
- }
- /*****************************************************************************
- * FUNCTION
- * category430_setup_sending_box
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void category430_setup_sending_box(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- multi_line_input_box b;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (CAT430_CTX->show_sending_buffer)
- {
- CAT430_CTX->sending_box_x = CAT430_SENDING_BOX_H_GAP;
- CAT430_CTX->sending_box_y = CAT430_SENDING_BOX_V_GAP;
- CAT430_CTX->sending_box_width = CAT430_CTX->log_box2_width -
- 2 * CAT430_SENDING_BOX_H_GAP - current_multi_line_input_box_theme->vbar_width;
- category430_create_sending_box(&b, 0, 0);
- CAT430_CTX->log_box2_footer_height = b.height + 2 * CAT430_SENDING_BOX_V_GAP;
- }
- else
- {
- CAT430_CTX->log_box2_footer_height = 0;
- }
- }
- #ifdef CAT430_NAME_IN_LOG
- /*****************************************************************************
- * FUNCTION
- * category430_header1_callback
- * DESCRIPTION
- *
- * PARAMETERS
- * yoffset [IN]
- * clip_x1 [IN]
- * clip_y1 [IN]
- * clip_x2 [IN]
- * clip_y2 [IN]
- * RETURNS
- * void
- *****************************************************************************/
- static void category430_header1_callback(S32 yoffset, S32 clip_x1, S32 clip_y1, S32 clip_x2, S32 clip_y2)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 sw;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_push_clip();
- gui_set_clip(clip_x1, clip_y1, clip_x2, clip_y2);
- gui_set_font(CAT430_NAME_FONT);
- sw = gui_get_string_width((UI_string_type) CAT430_CTX->name1);
- if (r2lMMIFlag)
- {
- gui_move_text_cursor(CAT430_CTX->log_box1_x + CAT430_HORIZONTAL_GAP + sw - 1, yoffset);
- }
- else
- {
- gui_move_text_cursor(CAT430_CTX->log_box1_x + CAT430_HORIZONTAL_GAP, yoffset);
- }
- gui_set_text_color(gui_color(CAT430_NAME1_COLOR_R, CAT430_NAME1_COLOR_G, CAT430_NAME1_COLOR_B));
- gui_print_text((UI_string_type) CAT430_CTX->name1);
- gui_pop_clip();
- }
- /*****************************************************************************
- * FUNCTION
- * category430_header2_callback
- * DESCRIPTION
- *
- * PARAMETERS
- * yoffset [IN]
- * clip_x1 [IN]
- * clip_y1 [IN]
- * clip_x2 [IN]
- * clip_y2 [IN]
- * RETURNS
- * void
- *****************************************************************************/
- static void category430_header2_callback(S32 yoffset, S32 clip_x1, S32 clip_y1, S32 clip_x2, S32 clip_y2)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 sw;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_push_clip();
- gui_set_clip(clip_x1, clip_y1, clip_x2, clip_y2);
- gui_set_font(CAT430_NAME_FONT);
- sw = gui_get_string_width((UI_string_type) CAT430_CTX->name2);
- if (r2lMMIFlag)
- {
- gui_move_text_cursor(CAT430_CTX->log_box2_x + CAT430_HORIZONTAL_GAP + sw - 1, yoffset);
- }
- else
- {
- gui_move_text_cursor(CAT430_CTX->log_box2_x + CAT430_HORIZONTAL_GAP, yoffset);
- }
- gui_set_text_color(gui_color(CAT430_NAME2_COLOR_R, CAT430_NAME2_COLOR_G, CAT430_NAME2_COLOR_B));
- gui_print_text((UI_string_type) CAT430_CTX->name2);
- gui_pop_clip();
- }
- #endif /* CAT430_NAME_IN_LOG */
- /*****************************************************************************
- * FUNCTION
- * category430_footer_callback
- * DESCRIPTION
- *
- * PARAMETERS
- * yoffset [IN]
- * clip_x1 [IN]
- * clip_y1 [IN]
- * clip_x2 [IN]
- * clip_y2 [IN]
- * RETURNS
- * void
- *****************************************************************************/
- static void category430_footer_callback(S32 yoffset, S32 clip_x1, S32 clip_y1, S32 clip_x2, S32 clip_y2)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- multi_line_input_box b;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- category430_create_sending_box(&b, (S16) CAT430_CTX->sending_box_x, (S16) (yoffset + CAT430_CTX->sending_box_y));
- b.flags |= UI_MULTI_LINE_INPUT_BOX_USE_PRESET_CLIPPING;
- gui_push_clip();
- gui_set_clip(clip_x1, clip_y1, clip_x2, clip_y2);
- gui_show_multi_line_input_box(&b);
- gui_pop_clip();
- }
- /*****************************************************************************
- * FUNCTION
- * category430_setup_log_box1
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void category430_setup_log_box1(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*
- * In Arabic, the ailgnment format is decided by the content of file.
- * * MSN align chat log to left.
- */
- S32 log_length;
- multi_line_input_box *b = &CAT430_CTX->log_box1;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- log_length = gui_strlen((UI_string_type) CAT430_CTX->log_buffer1);
- gui_create_multi_line_input_box_set_buffer(
- b,
- CAT430_CTX->log_box1_x,
- CAT430_CTX->log_box1_y,
- CAT430_CTX->log_box1_width,
- CAT430_CTX->log_box1_height,
- (UI_string_type) CAT430_CTX->log_buffer1,
- CAT430_CTX->log_buffer_size1 * 2,
- (log_length + 1) * 2,
- 0);
- #ifdef CAT430_NAME_IN_LOG
- b->header_height = CAT430_CTX->log_box_header_height;
- b->header_callback = category430_header1_callback;
- #endif /* CAT430_NAME_IN_LOG */
- b->flags |= (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_VIEW_MODE);
- b->normal_filler = (UI_filled_area*)&g_mmi_gui_cat430_logbox_filler;
- /* Compute text height and adjust scroll offset */
- b->flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- gui_show_multi_line_input_box(b);
- b->flags &= ~UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- if (b->text_height > b->edit_height)
- {
- b->text_offset_y = -(b->text_height - b->edit_height);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * category430_setup_log_box2
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void category430_setup_log_box2(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*
- * In Arabic, the ailgnment format is decided by the content of file.
- * * MSN align chat log to left.
- */
- S32 log_length;
- multi_line_input_box *b = &MMI_multiline_inputbox;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- log_length = gui_strlen((UI_string_type) CAT430_CTX->log_buffer2);
- gui_create_multi_line_input_box_set_buffer(
- b,
- CAT430_CTX->log_box2_x,
- CAT430_CTX->log_box2_y,
- CAT430_CTX->log_box2_width,
- CAT430_CTX->log_box2_height,
- (UI_string_type) CAT430_CTX->log_buffer2,
- CAT430_CTX->log_buffer_size2 * 2,
- (log_length + 1) * 2,
- 0);
- #ifdef CAT430_NAME_IN_LOG
- b->header_height = CAT430_CTX->log_box_header_height;
- b->header_callback = category430_header2_callback;
- #endif /* CAT430_NAME_IN_LOG */
- b->footer_height = CAT430_CTX->log_box2_footer_height;
- b->footer_callback = category430_footer_callback;
- b->max_empty_text_height = 1; /* For the case sending box is not empty but log box2 is empty. */
- b->flags |= (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_VIEW_MODE);
- b->normal_filler = (UI_filled_area*)&g_mmi_gui_cat430_logbox_filler;
- /* Compute text height and adjust scroll offset */
- b->flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- gui_show_multi_line_input_box(b);
- b->flags &= ~UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- if (b->text_height > b->edit_height)
- {
- b->text_offset_y = -(b->text_height - b->edit_height);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * category430_draw_content_area
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void category430_draw_content_area(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- #ifndef CAT430_NAME_IN_LOG
- S32 sw;
- #endif
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifndef __MMI_WALLPAPER_ON_BOTTOM__
- gui_draw_filled_area(
- MMI_content_x,
- MMI_content_y,
- MMI_content_x + MMI_content_width - 1,
- MMI_content_y + MMI_content_height - 1,
- MMI_fixed_list_menu.normal_filler);
- #endif /* __MMI_WALLPAPER_ON_BOTTOM__ */
- #ifndef CAT430_NAME_IN_LOG
- gui_set_font(CAT430_NAME_FONT);
- sw = gui_get_string_width((UI_string_type) CAT430_CTX->name1);
- if (r2lMMIFlag)
- {
- gui_move_text_cursor(CAT430_CTX->name1_x + sw - 1, CAT430_CTX->name1_y);
- }
- else
- {
- gui_move_text_cursor(CAT430_CTX->name1_x, CAT430_CTX->name1_y);
- }
- gui_set_text_color(gui_color(CAT430_NAME1_COLOR_R, CAT430_NAME1_COLOR_G, CAT430_NAME1_COLOR_B));
- gui_print_text((UI_string_type) CAT430_CTX->name1);
- sw = gui_get_string_width((UI_string_type) CAT430_CTX->name2);
- if (r2lMMIFlag)
- {
- gui_move_text_cursor(CAT430_CTX->name2_x + sw - 1, CAT430_CTX->name2_y);
- }
- else
- {
- gui_move_text_cursor(CAT430_CTX->name2_x, CAT430_CTX->name2_y);
- }
- gui_set_text_color(gui_color(CAT430_NAME2_COLOR_R, CAT430_NAME2_COLOR_G, CAT430_NAME2_COLOR_B));
- gui_print_text((UI_string_type) CAT430_CTX->name2);
- #endif /* CAT430_NAME_IN_LOG */
- gui_show_multi_line_input_box(&CAT430_CTX->log_box1);
- gui_show_multi_line_input_box(&MMI_multiline_inputbox);
- }
- /*****************************************************************************
- * FUNCTION
- * category430_previous_line
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void category430_previous_line(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_lock_double_buffer();
- gui_multi_line_input_box_previous_line(&CAT430_CTX->log_box1);
- gui_show_multi_line_input_box(&CAT430_CTX->log_box1);
- gui_multi_line_input_box_previous_line(&MMI_multiline_inputbox);
- gui_show_multi_line_input_box(&MMI_multiline_inputbox);
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
- }
- /*****************************************************************************
- * FUNCTION
- * category430_next_line
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void category430_next_line(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_lock_double_buffer();
- gui_multi_line_input_box_next_line(&CAT430_CTX->log_box1);
- gui_show_multi_line_input_box(&CAT430_CTX->log_box1);
- gui_multi_line_input_box_next_line(&MMI_multiline_inputbox);
- gui_show_multi_line_input_box(&MMI_multiline_inputbox);
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
- }
- /*****************************************************************************
- * FUNCTION
- * category430_draw_controlled_area
- * DESCRIPTION
- *
- * PARAMETERS
- * coordinate [?]
- * RETURNS
- * void
- *****************************************************************************/
- void category430_draw_controlled_area(dm_coordinates *coordinate)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- category430_draw_content_area();
- }
- #ifdef __MMI_TOUCH_SCREEN__
- /*****************************************************************************
- * FUNCTION
- * category430_control_area_pen_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * point [IN]
- * pen_event [IN]
- * RETURNS
- *
- *****************************************************************************/
- static MMI_BOOL category430_control_area_pen_handler(mmi_pen_point_struct point, mmi_pen_event_type_enum pen_event)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- gui_multi_line_input_box_pen_enum event;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (!CAT430_CTX)
- {
- MMI_DBG_ASSERT(0);
- return MMI_FALSE;
- }
- if (pen_event == MMI_PEN_EVENT_DOWN)
- {
- CAT430_CTX->pen_object = 0;
- if (gui_multi_line_input_box_translate_pen_event(&CAT430_CTX->log_box1, pen_event, point.x, point.y, &event))
- {
- CAT430_CTX->pen_object = 1;
- return MMI_TRUE;
- }
- if (gui_multi_line_input_box_translate_pen_event(&MMI_multiline_inputbox, pen_event, point.x, point.y, &event))
- {
- CAT430_CTX->pen_object = 2;
- return MMI_TRUE;
- }
- else
- {
- return MMI_FALSE;
- }
- }
- else
- {
- switch (CAT430_CTX->pen_object)
- {
- case 1:
- return gui_multi_line_input_box_translate_pen_event(
- &CAT430_CTX->log_box1,
- pen_event,
- point.x,
- point.y,
- &event);
- case 2:
- return gui_multi_line_input_box_translate_pen_event(
- &MMI_multiline_inputbox,
- pen_event,
- point.x,
- point.y,
- &event);
- default:
- return MMI_TRUE;
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * category430_control_area_pen_down_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * point [IN]
- * RETURNS
- *
- *****************************************************************************/
- static MMI_BOOL category430_control_area_pen_down_handler(mmi_pen_point_struct point)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return category430_control_area_pen_handler(point, MMI_PEN_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * category430_control_area_pen_move_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * point [IN]
- * RETURNS
- *
- *****************************************************************************/
- static MMI_BOOL category430_control_area_pen_move_handler(mmi_pen_point_struct point)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return category430_control_area_pen_handler(point, MMI_PEN_EVENT_MOVE);
- }
- /*****************************************************************************
- * FUNCTION
- * category430_control_area_pen_longtap_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * point [IN]
- * RETURNS
- *
- *****************************************************************************/
- static MMI_BOOL category430_control_area_pen_longtap_handler(mmi_pen_point_struct point)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return category430_control_area_pen_handler(point, MMI_PEN_EVENT_LONG_TAP);
- }
- /*****************************************************************************
- * FUNCTION
- * category430_control_area_pen_repeat_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * point [IN]
- * RETURNS
- *
- *****************************************************************************/
- static MMI_BOOL category430_control_area_pen_repeat_handler(mmi_pen_point_struct point)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return category430_control_area_pen_handler(point, MMI_PEN_EVENT_REPEAT);
- }
- /*****************************************************************************
- * FUNCTION
- * category430_control_area_pen_up_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * point [IN]
- * RETURNS
- *
- *****************************************************************************/
- static MMI_BOOL category430_control_area_pen_up_handler(mmi_pen_point_struct point)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return category430_control_area_pen_handler(point, MMI_PEN_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * category430_control_area_pen_abort_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * point [IN]
- * RETURNS
- *
- *****************************************************************************/
- static MMI_BOOL category430_control_area_pen_abort_handler(mmi_pen_point_struct point)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return category430_control_area_pen_handler(point, MMI_PEN_EVENT_ABORT);
- }
- #endif /* __MMI_TOUCH_SCREEN__ */
- /*
- * Category 435
- */
- /*****************************************************************************
- * FUNCTION
- * category435_hide_multitap
- * DESCRIPTION
- * Hide function for multitap
- *
- * Internal function
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void category435_hide_multitap(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* We fill the multitap bar across the screen instead of using MMI_multitap_x & MMI_multitap_width */
- gui_lock_double_buffer();
- gui_reset_clip();
- /* HACK. IME might clear the background. We can not use MMI_multitap_x & MMI_multitap_width to erase background */
- gui_fill_rectangle(
- 0,
- MMI_multitap_y,
- UI_device_width - 1,
- MMI_multitap_y + MMI_multitap_height - 1,
- g_mmi_gui_cat435_popup_color);
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, MMI_multitap_y, UI_device_width - 1, MMI_multitap_y + MMI_multitap_height - 1);
- }
- /*****************************************************************************
- * FUNCTION
- * category435_setup_log_box
- * DESCRIPTION
- *
- * PARAMETERS
- * log_buffer [?]
- * log_buffer_size [IN]
- * RETURNS
- * void
- *****************************************************************************/
- static void category435_setup_log_box(U8 *log_buffer, S32 log_buffer_size)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*
- * In Arabic, the ailgnment format is decided by the content of file.
- * * MSN align chat log to left.
- */
- S32 log_length;
- multi_line_input_box *b = &CAT435_CTX->log_box;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- log_length = gui_strlen((UI_string_type) log_buffer);
- gui_create_multi_line_input_box_set_buffer(
- b,
- MMI_CONTENT_X_WITH_H_TAB,
- MMI_CONTENT_Y_WITH_H_TAB,
- MMI_CONTENT_WIDTH_WITH_H_TAB,
- MMI_CONTENT_HEIGHT_WITH_H_TAB,
- (UI_string_type) log_buffer,
- log_buffer_size * 2,
- (log_length + 1) * 2,
- 0);
- gui_move_multi_line_input_box(b, MMI_CONTENT_X_WITH_H_TAB, MMI_CONTENT_Y_WITH_H_TAB);
- gui_resize_multi_line_input_box(b, MMI_CONTENT_WIDTH_WITH_H_TAB, MMI_CONTENT_HEIGHT_WITH_H_TAB);
- b->flags |=
- (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_VIEW_MODE |
- UI_MULTI_LINE_INPUT_BOX_RICHTEXT);
- #ifdef __MMI_WALLPAPER_ON_BOTTOM__
- b->flags |= UI_MULTI_LINE_INPUT_BOX_TRANSPARENT_BACKGROUND;
- #endif
- b->icon_callback = CAT435_CTX->icon_callback;
- // b->min_line_height = (S16) CAT435_CTX->icon_height + 1; /* Editor has one more pixel between lines */
- // b->normal_filler = (UI_filled_area *)&g_mmi_gui_cat435_editor_filler;
- // TODO: combine the following two procedure in one function in gui_inputs.c
- /* Compute text height and adjust scroll offset */
- b->flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- gui_show_multi_line_input_box(b);
- b->flags &= ~UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- if (b->text_height > b->edit_height)
- {
- b->text_offset_y = -(b->text_height - b->edit_height);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * category435_log_box_previous_line
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void category435_log_box_previous_line(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_lock_double_buffer();
- gui_multi_line_input_box_previous_line(&CAT435_CTX->log_box);
- gui_show_multi_line_input_box(&CAT435_CTX->log_box);
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
- }
- /*****************************************************************************
- * FUNCTION
- * category435_log_box_next_line
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void category435_log_box_next_line(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_lock_double_buffer();
- gui_multi_line_input_box_next_line(&CAT435_CTX->log_box);
- gui_show_multi_line_input_box(&CAT435_CTX->log_box);
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
- }
- #if defined(__MMI_TOUCH_SCREEN__)
- /*****************************************************************************
- * FUNCTION
- * cat435_virtual_keypad_callback
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void cat435_virtual_keypad_callback(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_pen_editor_resize_multiline_input_box_for_vk();
- }
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- /*****************************************************************************
- * FUNCTION
- * category435_setup_editor_box
- * DESCRIPTION
- *
- * PARAMETERS
- * buffer [?]
- * buffer_size [IN]
- * input_type [IN]
- * history_buffer [?]
- * RETURNS
- * void
- *****************************************************************************/
- static void category435_setup_editor_box(U8 *buffer, S32 buffer_size, S16 input_type, U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 inputbox_x = CAT435_POPUP_X + CAT435_POPUP_H_GAP;
- S32 inputbox_y = CAT435_POPUP_Y + CAT435_POPUP_TITLE_HEIGHT;
- S32 inputbox_width = CAT435_POPUP_WIDTH - CAT435_POPUP_H_GAP * 2;
- S32 inputbox_height = CAT435_POPUP_HEIGHT - CAT435_POPUP_TITLE_HEIGHT - CAT435_POPUP_BOTTOM_GAP;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #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
- register_hide_multitap(category435_hide_multitap);
- /* Workaround. we need to set following variables */
- MMI_multiline_inputbox_width = inputbox_width;
- MMI_multiline_inputbox_height = inputbox_height;
- /* HACK. Arabic editor does not handle UI_MULTI_LINE_INPUT_BOX_AUTO_DISABLE_SCROLLBAR well */
- wgui_setup_inputbox_ext(
- inputbox_x,
- inputbox_y,
- inputbox_width,
- inputbox_height,
- buffer,
- buffer_size,
- MMI_CATEGORY435_ID,
- get_string(CAT435_CTX->editor_right_softkey),
- get_image(CAT435_CTX->editor_right_softkey_icon),
- input_type,
- history_buffer,
- 1,
- r2lMMIFlag ? 0 : UI_MULTI_LINE_INPUT_BOX_AUTO_DISABLE_SCROLLBAR,
- 0,
- #ifdef __MMI_T9__ /* T9 doesn't support icon in editor */
- 0,
- #else
- (S16) (CAT435_CTX->icon_height + 1),
- #endif
- 0,
- 0,
- #ifdef __MMI_T9__
- NULL
- #else
- CAT435_CTX->icon_callback
- #endif
- );
- /* Resize editor height */
- #if defined(__MMI_FULL_SCREEN_EDITOR__)
- inputbox_height =
- CAT435_POPUP_HEIGHT - CAT435_POPUP_TITLE_HEIGHT - CAT435_POPUP_BOTTOM_GAP -
- wgui_inputbox_information_bar_height - 1;
- #else /* defined(__MMI_FULL_SCREEN_EDITOR__) */
- inputbox_height =
- CAT435_POPUP_HEIGHT - CAT435_POPUP_TITLE_HEIGHT - CAT435_POPUP_BOTTOM_GAP - MMI_multitap_height -
- wgui_inputbox_information_bar_height - 1;
- #endif /* defined(__MMI_FULL_SCREEN_EDITOR__) */
- resize_multiline_inputbox(inputbox_width, inputbox_height);
- show_multiline_inputbox_no_draw(); /* recompute cursor position */
- /* Override editor style */
- MMI_multiline_inputbox.normal_filler = (UI_filled_area*)&g_mmi_gui_cat435_editor_filler;
- #ifdef __MMI_WALLPAPER_ON_BOTTOM__
- MMI_multiline_inputbox.flags |= UI_MULTI_LINE_INPUT_BOX_TRANSPARENT_BACKGROUND;
- #endif
- /* Key handler (category435_reset_editor_box reset wgui_inputbox_RSK_function) */
- wgui_inputbox_RSK_function = CAT435_CTX->editor_RSK_func;
- SetLeftSoftkeyFunction(CAT435_CTX->editor_LSK_func, KEY_EVENT_UP);
- /* Virtual keyboard */
- #ifdef __MMI_TOUCH_SCREEN__
- dm_register_vkpad_callback(cat435_virtual_keypad_callback);
- #endif
- /* For draw manager, wgui_setup_inputbox_ext and wgui_close_inputbox should be paired. */
- MMI_DBG_ASSERT(!CAT435_CTX->editor_created);
- CAT435_CTX->editor_created = 1;
- }
- /*****************************************************************************
- * FUNCTION
- * category435_reset_editor_box
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void category435_reset_editor_box(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_lock_double_buffer();
- /* Virtual keyboard */
- #ifdef __MMI_TOUCH_SCREEN__
- dm_register_vkpad_callback(NULL);
- #endif
- wgui_close_inputbox();
- reset_multitaps();
- gui_unlock_double_buffer();
- CAT435_CTX->editor_created = 0;
- }
- /* We need to sync with T9 internal state */
- /*****************************************************************************
- * FUNCTION
- * category435_sync_with_T9
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- static void category435_sync_with_T9(void)
- {
- #ifdef __MMI_T9__
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- switch (MMI_current_input_type & INPUT_TYPE_MASK)
- {
- case INPUT_TYPE_TR_BOPOMO:
- case INPUT_TYPE_SM_PINYIN:
- case INPUT_TYPE_TR_STROKE:
- case INPUT_TYPE_SM_STROKE:
- case INPUT_TYPE_SMART_UPPERCASE_ABC:
- case INPUT_TYPE_SMART_LOWERCASE_ABC:
- case INPUT_TYPE_TR_MULTITAP_BOPOMO:
- case INPUT_TYPE_SM_MULTITAP_PINYIN:
- #if defined(__MMI_T9_SPANISH__)
- case INPUT_TYPE_SMART_UPPERCASE_SPANISH:
- case INPUT_TYPE_SMART_LOWERCASE_SPANISH:
- #endif /* defined(__MMI_T9_SPANISH__) */
- /* PMT VIKASG START 20050729 */
- #if defined(__MMI_T9_DANISH__)
- case INPUT_TYPE_SMART_UPPERCASE_DANISH:
- case INPUT_TYPE_SMART_LOWERCASE_DANISH:
- #endif /* defined(__MMI_T9_DANISH__) */
- //PMT VIKASG END 20050729
- //PMT CZ_PO_TU START 20050812