wgui_virtual_keyboard.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:59k
源码类别:
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_virtual_keyboard.c
- *
- * Project:
- * --------
- * MAUI
- *
- * Description:
- * ------------
- * Virtual keyboard - WGUI integration
- *
- * 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!
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- ****************************************************************************/
- #include "PixtelDataTypes.h"
- #include "MMI_features.h"
- #include "gui_data_types.h"
- #include "gui.h"
- #include "gdi_include.h"
- #include "wgui.h"
- #include "wgui_virtual_keyboard.h"
- #include "wgui_categories_defs.h"
- #include "DebugInitDef.h"
- /*****************************************************************************
- * Define
- *****************************************************************************/
- /* Dead keys (also as normal symbol) */
- #define GRAVE_ACCENT 0x60 /* ` */
- #define ACCUTE_ACCENT 0xB4
- #define CIRCUMFLEX_ACCENT 0x5E /* ^ */
- #define DIAERESIS 0xA8
- #define TILDE 0x7E /* ~ */
- /* Common european symbols */
- #define EURO 0x20AC
- /*****************************************************************************
- * Typedef
- *****************************************************************************/
- /*****************************************************************************
- * Local Variable
- *****************************************************************************/
- /*****************************************************************************
- * Local Function
- *****************************************************************************/
- /*****************************************************************************
- * Global Variable
- *****************************************************************************/
- virtual_keyboard MMI_virtual_keyboard;
- /* Maximum required size of key image cache. */
- S32 MMI_virtual_keyboard_bitmap_cache_size;
- /****************************
- * Standard layout
- ****************************/
- static const gui_matrix_key_layout_struct gui_standard_matrix_layout =
- {
- MMI_VKBD_STANDARD_MATRIX_X, MMI_VKBD_STANDARD_MATRIX_Y,
- MMI_VKBD_STANDARD_MATRIX_COLUMN, MMI_VKBD_STANDARD_MATRIX_ROW,
- MMI_VKBD_STANDARD_MATRIX_WIDTH, MMI_VKBD_STANDARD_MATRIX_HEIGHT,
- MMI_VKBD_MATRIX_KEY_WIDTH, MMI_VKBD_MATRIX_KEY_HEIGHT,
- MMI_VKBD_MATRIX_KEY_H_GAP, MMI_VKBD_MATRIX_KEY_V_GAP
- };
- #ifdef __MMI_MAINLCD_240X320__
- static const gui_custom_key_layout_struct gui_standard_custom_key_layout[] =
- {
- {141, 2, 19, 19},
- {161, 2, 19, 19},
- {181, 2, 19, 19},
- {201, 2, 38, 19},
- {141, 22, 19, 19},
- {161, 22, 19, 19},
- {181, 22, 19, 19},
- {201, 22, 38, 19},
- {141, 42, 19, 19},
- {161, 42, 39, 19},
- {201, 42, 38, 19}
- };
- #else /* __MMI_MAINLCD_240X320__ */
- static const gui_custom_key_layout_struct gui_standard_custom_key_layout[] =
- {
- {106, 1, 14, 14},
- {121, 1, 14, 14},
- {136, 1, 14, 14},
- {151, 1, 24, 14},
- {106, 16, 14, 14},
- {121, 16, 14, 14},
- {136, 16, 14, 14},
- {151, 16, 24, 14},
- {106, 31, 14, 14},
- {121, 31, 29, 14},
- {151, 31, 24, 14}
- };
- #endif /* __MMI_MAINLCD_240X320__ */
- static const gui_keyboard_layout_struct gui_virtual_keyboard_standard_layout =
- {
- MMI_VKBD_STANDARD_WIDTH,
- MMI_VKBD_STANDARD_HEIGHT,
- 1,
- 11,
- &gui_standard_matrix_layout,
- gui_standard_custom_key_layout,
- IMG_VKBD_STANDARD
- };
- /* English lowercase */
- static const gui_keyboard_language_struct gui_keyboard_english_lowercase_string =
- {
- MMI_FALSE,
- 1,
- 11,
- {
- {'q', 'w', 'e', 'r', 't', 'y', 'u', ' '},
- {'a', 's', 'd', 'f', 'g', 'h', 'j', ' '},
- {'z', 'x', 'c', 'v', 'b', 'n', 'm', ' '}
- },
- {'i', 'o', 'p', ' ', 'k', 'l', '.', ' ', ' ', ' ', ' '},
- {0, 0, 0, IMG_VKBD_CUSTOM_HIDE, 0, 0, 0, IMG_VKBD_CUSTOM_BACKSPACE, IMG_VKBD_CUSTOM_CAPSLOCK,
- IMG_VKBD_CUSTOM_SPACE, IMG_VKBD_CUSTOM_SYMBPICKER},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BAKSPACE,
- GUI_VKBD_PEN_CAPSLOCK, GUI_VKBD_PEN_SPACE,
- GUI_VKBD_PEN_SYMBPICKER}
- };
- /* English uppercase */
- static const gui_keyboard_language_struct gui_keyboard_english_uppercase_string =
- {
- MMI_FALSE,
- 1,
- 11,
- {
- {'Q', 'W', 'E', 'R', 'T', 'Y', 'U', ' '},
- {'A', 'S', 'D', 'F', 'G', 'H', 'J', ' '},
- {'Z', 'X', 'C', 'V', 'B', 'N', 'M', ' '}
- },
- {'I', 'O', 'P', ' ', 'K', 'L', '.', ' ', ' ', ' ', ' '},
- {0, 0, 0, IMG_VKBD_CUSTOM_HIDE, 0, 0, 0, IMG_VKBD_CUSTOM_BACKSPACE, IMG_VKBD_CUSTOM_CAPSLOCK,
- IMG_VKBD_CUSTOM_SPACE, IMG_VKBD_CUSTOM_SYMBPICKER},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BAKSPACE,
- GUI_VKBD_PEN_CAPSLOCK, GUI_VKBD_PEN_SPACE,
- GUI_VKBD_PEN_SYMBPICKER}
- };
- // #if defined(__MMI_LANG_TR_CHINESE__) || defined(__MMI_LANG_SM_CHINESE__)
- static const gui_keyboard_language_struct gui_keyboard_chinese_symbol_string =
- {
- MMI_FALSE,
- 1,
- 11,
- {
- {0x3002, 0xFF0C, 0xFF0E, 0x3001, 0xFF1B, 0xFF1A, 0xFF1F, ' '},
- {0x3010, 0x3011, 0x300A, 0x300B, 0x3008, 0x3009, 0x300C, ' '},
- {0x2018, 0x2019, 0x201C, 0x201D, 0x2190, 0x2192, 0x2193, ' '}
- },
- {0xFF01, 0xFF08, 0xFF09, ' ', 0x300D, 0x300E, 0x300F, ' ', 0x2191, ' ', ' '},
- {0, 0, 0, IMG_VKBD_CUSTOM_HIDE, 0, 0, 0, IMG_VKBD_CUSTOM_BACKSPACE, 0,
- IMG_VKBD_CUSTOM_SPACE, IMG_VKBD_CUSTOM_SYMBPICKER},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BAKSPACE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_SPACE,
- GUI_VKBD_PEN_SYMBPICKER}
- };
- // #endif /* __MMI_LANG_TR_CHINESE__ || __MMI_LANG_SM_CHINESE__ */
- /****************************
- * Extended layout
- ****************************/
- static const gui_matrix_key_layout_struct gui_extended_matrix_layout =
- {
- MMI_VKBD_EXTENDED_MATRIX_X, MMI_VKBD_EXTENDED_MATRIX_Y,
- MMI_VKBD_EXTENDED_MATRIX_COLUMN, MMI_VKBD_EXTENDED_MATRIX_ROW,
- MMI_VKBD_EXTENDED_MATRIX_WIDTH, MMI_VKBD_EXTENDED_MATRIX_HEIGHT,
- MMI_VKBD_MATRIX_KEY_WIDTH, MMI_VKBD_MATRIX_KEY_HEIGHT,
- MMI_VKBD_MATRIX_KEY_H_GAP, MMI_VKBD_MATRIX_KEY_V_GAP
- };
- #ifdef __MMI_MAINLCD_240X320__
- static const gui_custom_key_layout_struct gui_extended_custom_key_layout[] =
- {
- {161, 2, 19, 19},
- {181, 2, 19, 19},
- {201, 2, 38, 19},
- {161, 22, 19, 19},
- {181, 22, 19, 19},
- {201, 22, 38, 19},
- {161, 42, 19, 19},
- {181, 42, 19, 19},
- {201, 42, 38, 19},
- {161, 62, 39, 19},
- {201, 62, 38, 19}
- };
- #else /* __MMI_MAINLCD_240X320__ */
- static const gui_custom_key_layout_struct gui_extended_custom_key_layout[] =
- {
- {121, 1, 14, 14},
- {136, 1, 14, 14},
- {151, 1, 24, 14},
- {121, 16, 14, 14},
- {136, 16, 14, 14},
- {151, 16, 24, 14},
- {121, 31, 14, 14},
- {136, 31, 14, 14},
- {151, 31, 24, 14},
- {121, 46, 29, 14},
- {151, 46, 24, 14}
- };
- #endif /* __MMI_MAINLCD_240X320__ */
- static const gui_keyboard_layout_struct gui_virtual_keyboard_extended_layout =
- {
- MMI_VKBD_EXTENDED_WIDTH,
- MMI_VKBD_EXTENDED_HEIGHT,
- 1,
- 11,
- &gui_extended_matrix_layout,
- gui_extended_custom_key_layout,
- IMG_VKBD_EXTENDED
- };
- /* Standard symbols */
- static const gui_keyboard_language_struct gui_keyboard_symbol_string =
- {
- MMI_FALSE,
- 1,
- 11,
- {
- {'x2e', 'x2c', '?', '!', '^', '"', '(', ')', ' '},
- {'_', ':', ';', '+', '-', '*', '/', '=', ' '},
- {'<', '>', 0xA3, 0x24, 0xA5, 0xA7, 0x20AC, 0xA4, ' '},
- {'{', '}', '~', '#', '`', ''', 0xA9, '|'} /* Note that 0xA9 is not standard GSM 7-bit character */
- },
- {'@', '\', ' ', '%', '&', ' ', '[', ']', ' ', ' ', ' '},
- {0, 0, IMG_VKBD_CUSTOM_HIDE, 0, 0, IMG_VKBD_CUSTOM_BACKSPACE,
- 0, 0, IMG_VKBD_CUSTOM_ENTER,
- IMG_VKBD_CUSTOM_SPACE, IMG_VKBD_CUSTOM_SYMBPICKER},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BAKSPACE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_NEWLINE,
- GUI_VKBD_PEN_SPACE, GUI_VKBD_PEN_SYMBPICKER}
- };
- #ifdef __MMI_LANG_SPANISH__
- static const gui_keyboard_language_struct gui_keyboard_spanish_lowercase_string =
- {
- MMI_TRUE,
- 1,
- 11,
- {
- {GRAVE_ACCENT, ACCUTE_ACCENT, CIRCUMFLEX_ACCENT, DIAERESIS, TILDE,
- '.', 0xBA, 0xA1},
- {'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', ' '},
- {'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', ' '},
- {'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', ' '},
- },
- {0xF1, 0xE7, ' ', 'o', 'p', ' ', 'l', ' ', ' ', ' ', ' '},
- {0, 0, IMG_VKBD_CUSTOM_HIDE, 0, 0, IMG_VKBD_CUSTOM_BACKSPACE,
- 0, IMG_VKBD_CUSTOM_EUROSYMB, IMG_VKBD_CUSTOM_CAPSLOCK,
- IMG_VKBD_CUSTOM_SPACE, IMG_VKBD_CUSTOM_SYMBPICKER},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BAKSPACE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_EUROSYMB, GUI_VKBD_PEN_CAPSLOCK,
- GUI_VKBD_PEN_SPACE, GUI_VKBD_PEN_SYMBPICKER}
- };
- static const gui_keyboard_language_struct gui_keyboard_spanish_uppercase_string =
- {
- MMI_TRUE,
- 1,
- 11,
- {
- {GRAVE_ACCENT, ACCUTE_ACCENT, CIRCUMFLEX_ACCENT, DIAERESIS, TILDE,
- '.', 0xAA, 0xBF},
- {'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', ' '},
- {'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', ' '},
- {'Z', 'X', 'C', 'V', 'B', 'N', 'M', ',', ' '},
- },
- {0xD1, 0xC7, ' ', 'O', 'P', ' ', 'L', ' ', ' ', ' ', ' '},
- {0, 0, IMG_VKBD_CUSTOM_HIDE, 0, 0, IMG_VKBD_CUSTOM_BACKSPACE,
- 0, IMG_VKBD_CUSTOM_EUROSYMB, IMG_VKBD_CUSTOM_CAPSLOCK,
- IMG_VKBD_CUSTOM_SPACE, IMG_VKBD_CUSTOM_SYMBPICKER},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BAKSPACE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_EUROSYMB, GUI_VKBD_PEN_CAPSLOCK,
- GUI_VKBD_PEN_SPACE, GUI_VKBD_PEN_SYMBPICKER}
- };
- #endif /* __MMI_LANG_SPANISH__ */
- //KP Jerry add on 2007-4-29 start
- #ifdef __MMI_LANG_VIETNAMESE__
- #endif /* __MMI_LANG_VIETNAMESE__ */
- //KP Jerry add on 2007-4-29 end
- #ifdef __MMI_LANG_FRENCH__
- static const gui_keyboard_language_struct gui_keyboard_french_lowercase_string =
- {
- MMI_TRUE,
- 1,
- 11,
- {
- {CIRCUMFLEX_ACCENT, DIAERESIS, TILDE, GRAVE_ACCENT,
- '.', 0xE0, 0xE7, 0xE9},
- {'a', 'z', 'e', 'r', 't', 'y', 'u', 'i', ' '},
- {'q', 's', 'd', 'f', 'g', 'h', 'j', 'k', ' '},
- {'w', 'x', 'c', 'v', 'b', 'n', 0xF9, ',', ' '},
- },
- {0xE8, 'm', ' ', 'o', 'p', ' ', 'l', ' ', ' ', ' ', ' '},
- {0, 0, IMG_VKBD_CUSTOM_HIDE, 0, 0, IMG_VKBD_CUSTOM_BACKSPACE,
- 0, IMG_VKBD_CUSTOM_EUROSYMB, IMG_VKBD_CUSTOM_CAPSLOCK,
- IMG_VKBD_CUSTOM_SPACE, IMG_VKBD_CUSTOM_SYMBPICKER},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BAKSPACE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_EUROSYMB, GUI_VKBD_PEN_CAPSLOCK,
- GUI_VKBD_PEN_SPACE, GUI_VKBD_PEN_SYMBPICKER}
- };
- static const gui_keyboard_language_struct gui_keyboard_french_uppercase_string =
- {
- MMI_TRUE,
- 1,
- 11,
- {
- {CIRCUMFLEX_ACCENT, DIAERESIS, TILDE, GRAVE_ACCENT,
- '.', 0xB0, EURO, 0xA7},
- {'A', 'Z', 'E', 'R', 'T', 'Y', 'U', 'I', ' '},
- {'Q', 'S', 'D', 'F', 'G', 'H', 'J', 'K', ' '},
- {'W', 'X', 'C', 'V', 'B', 'N', 0xB5, ',', ' '},
- },
- {0xA3, 'M', ' ', 'O', 'P', ' ', 'L', ' ', ' ', ' ', ' '},
- {0, 0, IMG_VKBD_CUSTOM_HIDE, 0, 0, IMG_VKBD_CUSTOM_BACKSPACE,
- 0, IMG_VKBD_CUSTOM_EUROSYMB, IMG_VKBD_CUSTOM_CAPSLOCK,
- IMG_VKBD_CUSTOM_SPACE, IMG_VKBD_CUSTOM_SYMBPICKER},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BAKSPACE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_EUROSYMB, GUI_VKBD_PEN_CAPSLOCK,
- GUI_VKBD_PEN_SPACE, GUI_VKBD_PEN_SYMBPICKER}
- };
- #endif /* __MMI_LANG_FRENCH__ */
- #ifdef __MMI_LANG_PORTUGUESE__
- static const gui_keyboard_language_struct gui_keyboard_portuguese_lowercase_string =
- {
- MMI_TRUE,
- 1,
- 11,
- {
- {CIRCUMFLEX_ACCENT, DIAERESIS, TILDE, GRAVE_ACCENT, ACCUTE_ACCENT,
- '.', 0xBA, 0xA3},
- {'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', ' '},
- {'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', ' '},
- {'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', ' '},
- },
- {0xA7, 0xE7, ' ', 'o', 'p', ' ', 'l', ' ', ' ', ' ', ' '},
- {0, 0, IMG_VKBD_CUSTOM_HIDE, 0, 0, IMG_VKBD_CUSTOM_BACKSPACE,
- 0, IMG_VKBD_CUSTOM_EUROSYMB, IMG_VKBD_CUSTOM_CAPSLOCK,
- IMG_VKBD_CUSTOM_SPACE, IMG_VKBD_CUSTOM_SYMBPICKER},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BAKSPACE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_EUROSYMB, GUI_VKBD_PEN_CAPSLOCK,
- GUI_VKBD_PEN_SPACE, GUI_VKBD_PEN_SYMBPICKER}
- };
- static const gui_keyboard_language_struct gui_keyboard_portuguese_uppercase_string =
- {
- MMI_TRUE,
- 1,
- 11,
- {
- {CIRCUMFLEX_ACCENT, DIAERESIS, TILDE, GRAVE_ACCENT, ACCUTE_ACCENT,
- 0xBA, 0xAA, 0xAB},
- {'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', ' '},
- {'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', ' '},
- {'Z', 'X', 'C', 'V', 'B', 'N', 'M', ',', ' '},
- },
- {0xBB, 0xC7, ' ', 'O', 'P', ' ', 'L', ' ', ' ', ' ', ' '},
- {0, 0, IMG_VKBD_CUSTOM_HIDE, 0, 0, IMG_VKBD_CUSTOM_BACKSPACE,
- 0, IMG_VKBD_CUSTOM_EUROSYMB, IMG_VKBD_CUSTOM_CAPSLOCK,
- IMG_VKBD_CUSTOM_SPACE, IMG_VKBD_CUSTOM_SYMBPICKER},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BAKSPACE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_EUROSYMB, GUI_VKBD_PEN_CAPSLOCK,
- GUI_VKBD_PEN_SPACE, GUI_VKBD_PEN_SYMBPICKER}
- };
- #endif /* __MMI_LANG_PORTUGUESE__ */
- #ifdef __MMI_LANG_GERMAN__
- static const gui_keyboard_language_struct gui_keyboard_german_lowercase_string =
- {
- MMI_TRUE,
- 1,
- 11,
- {
- {CIRCUMFLEX_ACCENT, ACCUTE_ACCENT, GRAVE_ACCENT, '.', 0xB0, 0xB5, 0xDF, 0xE4},
- {'q', 'w', 'e', 'r', 't', 'z', 'u', 'i', ' '},
- {'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', ' '},
- {'y', 'x', 'c', 'v', 'b', 'n', 'm', ',', ' '},
- },
- {0xFC, 0xF6, ' ', 'o', 'p', ' ', 'l', ' ', ' ', ' ', ' '},
- {0, 0, IMG_VKBD_CUSTOM_HIDE, 0, 0, IMG_VKBD_CUSTOM_BACKSPACE,
- 0, IMG_VKBD_CUSTOM_EUROSYMB, IMG_VKBD_CUSTOM_CAPSLOCK,
- IMG_VKBD_CUSTOM_SPACE, IMG_VKBD_CUSTOM_SYMBPICKER},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BAKSPACE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_EUROSYMB, GUI_VKBD_PEN_CAPSLOCK,
- GUI_VKBD_PEN_SPACE, GUI_VKBD_PEN_SYMBPICKER}
- };
- static const gui_keyboard_language_struct gui_keyboard_german_uppercase_string =
- {
- MMI_TRUE,
- 1,
- 11,
- {
- {CIRCUMFLEX_ACCENT, ACCUTE_ACCENT, GRAVE_ACCENT, '.', 0xA7, 0xB2, 0xB3, 0xC4},
- {'Q', 'W', 'E', 'R', 'T', 'Z', 'U', 'I', ' '},
- {'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', ' '},
- {'Y', 'X', 'C', 'V', 'B', 'N', 'M', ',', ' '},
- },
- {0xDC, 0xD6, ' ', 'O', 'P', ' ', 'L', ' ', ' ', ' ', ' '},
- {0, 0, IMG_VKBD_CUSTOM_HIDE, 0, 0, IMG_VKBD_CUSTOM_BACKSPACE,
- 0, IMG_VKBD_CUSTOM_EUROSYMB, IMG_VKBD_CUSTOM_CAPSLOCK,
- IMG_VKBD_CUSTOM_SPACE, IMG_VKBD_CUSTOM_SYMBPICKER},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BAKSPACE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_EUROSYMB, GUI_VKBD_PEN_CAPSLOCK,
- GUI_VKBD_PEN_SPACE, GUI_VKBD_PEN_SYMBPICKER}
- };
- #endif /* __MMI_LANG_GERMAN__ */
- #ifdef __MMI_LANG_ITALIAN__
- static const gui_keyboard_language_struct gui_keyboard_italian_lowercase_string =
- {
- MMI_FALSE,
- 1,
- 11,
- {
- {'.', CIRCUMFLEX_ACCENT, 0xA3, 0xE9, 0xE8, 0xE0, 0xF9, 0xEC},
- {'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', ' '},
- {'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', ' '},
- {'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', ' '},
- },
- {0xF2, 0xE7, ' ', 'o', 'p', ' ', 'l', ' ', ' ', ' ', ' '},
- {0, 0, IMG_VKBD_CUSTOM_HIDE, 0, 0, IMG_VKBD_CUSTOM_BACKSPACE,
- 0, IMG_VKBD_CUSTOM_EUROSYMB, IMG_VKBD_CUSTOM_CAPSLOCK,
- IMG_VKBD_CUSTOM_SPACE, IMG_VKBD_CUSTOM_SYMBPICKER},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BAKSPACE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_EUROSYMB, GUI_VKBD_PEN_CAPSLOCK,
- GUI_VKBD_PEN_SPACE, GUI_VKBD_PEN_SYMBPICKER}
- };
- static const gui_keyboard_language_struct gui_keyboard_italian_uppercase_string =
- {
- MMI_FALSE,
- 1,
- 11,
- {
- {'.', 0xA7, 0xA3, 0xE9, 0xE8, 0xE0, 0xF9, 0xEC},
- {'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', ' '},
- {'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', ' '},
- {'Z', 'X', 'C', 'V', 'B', 'N', 'M', ',', ' '},
- },
- {0xF2, 0xE7, ' ', 'O', 'P', ' ', 'L', ' ', ' ', ' ', ' '},
- {0, 0, IMG_VKBD_CUSTOM_HIDE, 0, 0, IMG_VKBD_CUSTOM_BACKSPACE,
- 0, IMG_VKBD_CUSTOM_EUROSYMB, IMG_VKBD_CUSTOM_CAPSLOCK,
- IMG_VKBD_CUSTOM_SPACE, IMG_VKBD_CUSTOM_SYMBPICKER},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BAKSPACE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_EUROSYMB, GUI_VKBD_PEN_CAPSLOCK,
- GUI_VKBD_PEN_SPACE, GUI_VKBD_PEN_SYMBPICKER}
- };
- #endif /* __MMI_LANG_ITALIAN__ */
- #ifdef __MMI_LANG_RUSSIAN__
- static const gui_keyboard_language_struct gui_keyboard_russian_lowercase_string =
- {
- MMI_FALSE,
- 1,
- 11,
- {
- {0x451, '.', DIAERESIS, '!', 0x445, 0x44A, 0x44D, 0x431},
- {0x439, 0x446, 0x443, 0x43A, 0x435, 0x43D, 0x433, 0x448, ' '},
- {0x444, 0x44B, 0x432, 0x430, 0x43F, 0x440, 0x43E, 0x43B, ' '},
- {0x44F, 0x447, 0x441, 0x43C, 0x438, 0x442, 0x44C, ',', ' '},
- },
- {0x44E, '@'/*0x2116*/, ' ', 0x449, 0x437, ' ', 0x434, 0x436, ' ', ' ', ' '}, //KP Jerry modify 0x2116 to '@' for avoid font display error on 2007-4-29
- {0, 0, IMG_VKBD_CUSTOM_HIDE, 0, 0, IMG_VKBD_CUSTOM_BACKSPACE,
- 0, 0, IMG_VKBD_CUSTOM_CAPSLOCK,
- IMG_VKBD_CUSTOM_SPACE, IMG_VKBD_CUSTOM_SYMBPICKER},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BAKSPACE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CAPSLOCK,
- GUI_VKBD_PEN_SPACE, GUI_VKBD_PEN_SYMBPICKER}
- };
- static const gui_keyboard_language_struct gui_keyboard_russian_uppercase_string =
- {
- MMI_FALSE,
- 1,
- 11,
- {
- {0x401, '.', DIAERESIS, '!', 0x425, 0x42A, 0x42D, 0x411},
- {0x419, 0x426, 0x423, 0x41A, 0x415, 0x41D, 0x413, 0x428, ' '},
- {0x424, 0x42B, 0x412, 0x410, 0x41F, 0x420, 0x41E, 0x41B, ' '},
- {0x42F, 0x427, 0x421, 0x41C, 0x418, 0x422, 0x42C, ',', ' '},
- },
- {0x42E, '@'/*0x2116*/, ' ', 0x429, 0x417, ' ', 0x414, 0x416, ' ', ' ', ' '}, //KP Jerry modify 0x2116 to '@' for avoid font display error on 2007-4-29
- {0, 0, IMG_VKBD_CUSTOM_HIDE, 0, 0, IMG_VKBD_CUSTOM_BACKSPACE,
- 0, 0, IMG_VKBD_CUSTOM_CAPSLOCK,
- IMG_VKBD_CUSTOM_SPACE, IMG_VKBD_CUSTOM_SYMBPICKER},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BAKSPACE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CAPSLOCK,
- GUI_VKBD_PEN_SPACE, GUI_VKBD_PEN_SYMBPICKER}
- };
- #endif /* __MMI_LANG_RUSSIAN__ */
- #ifdef __MMI_LANG_TURKISH__
- static const gui_keyboard_language_struct gui_keyboard_turkish_lowercase_string =
- {
- MMI_TRUE,
- 1,
- 11,
- {
- {CIRCUMFLEX_ACCENT, ACCUTE_ACCENT, GRAVE_ACCENT, DIAERESIS, TILDE, 0x15F, 0x62, 0x78},
- {0x66, 0x67, 0x11F, 0x131, 0x6F, 0x64, 0x72, 0x6E, ' '},
- {0x75, 0x69, 0x65, 0x61, 0x74, 0x6B, 0x6D, 0x6C, ' '},
- {0x6A, 0xF6, 0x76, 0x63, 0xE7, 0x7A, 0x73, ',', ' '},
- },
- {0x71, 0x77, ' ', 0x68, 0x70, ' ', 0x79, ' ', ' ', ' ', ' '},
- {0, 0, IMG_VKBD_CUSTOM_HIDE, 0, 0, IMG_VKBD_CUSTOM_BACKSPACE,
- 0, IMG_VKBD_CUSTOM_EUROSYMB, IMG_VKBD_CUSTOM_CAPSLOCK,
- IMG_VKBD_CUSTOM_SPACE, IMG_VKBD_CUSTOM_SYMBPICKER},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BAKSPACE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_EUROSYMB, GUI_VKBD_PEN_CAPSLOCK,
- GUI_VKBD_PEN_SPACE, GUI_VKBD_PEN_SYMBPICKER}
- };
- static const gui_keyboard_language_struct gui_keyboard_turkish_uppercase_string =
- {
- MMI_TRUE,
- 1,
- 11,
- {
- {CIRCUMFLEX_ACCENT, ACCUTE_ACCENT, GRAVE_ACCENT, DIAERESIS, TILDE, 0x15E, 0x42, 0x58},
- {0x46, 0x47, 0x11E, 0x49, 0x4F, 0x44, 0x52, 0x4E, ' '},
- {0x55, 0x130, 0x45, 0x41, 0x54, 0x4B, 0x4D, 0x4C, ' '},
- {0x4A, 0xD6, 0x56, 0x43, 0xC7, 0x5A, 0x53, ',', ' '},
- },
- {0x51, 0x57, ' ', 0x48, 0x50, ' ', 0x59, ' ', ' ', ' ', ' '},
- {0, 0, IMG_VKBD_CUSTOM_HIDE, 0, 0, IMG_VKBD_CUSTOM_BACKSPACE,
- 0, IMG_VKBD_CUSTOM_EUROSYMB, IMG_VKBD_CUSTOM_CAPSLOCK,
- IMG_VKBD_CUSTOM_SPACE, IMG_VKBD_CUSTOM_SYMBPICKER},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BAKSPACE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_EUROSYMB, GUI_VKBD_PEN_CAPSLOCK,
- GUI_VKBD_PEN_SPACE, GUI_VKBD_PEN_SYMBPICKER}
- };
- #endif /* __MMI_LANG_TURKISH__ */
- #ifdef __MMI_VKBD_EUROPEAN_SUPPORT__
- static const gui_keyboard_language_struct gui_keyboard_european_symbols_string =
- {
- MMI_TRUE,
- 1,
- 11,
- {
- {0x40, 0xA1, 0xA2, 0xA3, 0xA4, 0xA7, 0xA9, 0xAA, ' '},
- {0xAE, 0xB0, 0xB9, 0xBA, 0xB2, 0xB3, 0xB5, 0xB6, ' '},
- {0xBD, 0xBE, 0xBF, 0xC6, 0xC7, 0xD8, 0xDF, 0xE6, ' '},
- {0x11E, 0x11F, 0x130, 0x131, 0x15E, 0x15F, 0x20AC, ',', ' '},
- },
- {0xAB, 0xAC, ' ', 0xBB, 0xBC, ' ', 0xE7, 0xF8, ' ', ' ', ' '},
- {0, 0, IMG_VKBD_CUSTOM_HIDE, 0, 0, IMG_VKBD_CUSTOM_BACKSPACE,
- 0, 0, IMG_VKBD_CUSTOM_ENTER,
- IMG_VKBD_CUSTOM_SPACE, IMG_VKBD_CUSTOM_SYMBPICKER},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BAKSPACE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_NEWLINE,
- GUI_VKBD_PEN_SPACE, GUI_VKBD_PEN_SYMBPICKER}
- };
- #endif /* __MMI_VKBD_EUROPEAN_SUPPORT__ */
- /****************************
- * Number layout
- ****************************/
- static const gui_matrix_key_layout_struct gui_number_matrix_layout =
- {
- MMI_VKBD_NUMBER_MATRIX_X, MMI_VKBD_NUMBER_MATRIX_Y,
- MMI_VKBD_NUMBER_MATRIX_COLUMN, MMI_VKBD_NUMBER_MATRIX_ROW,
- MMI_VKBD_NUMBER_MATRIX_WIDTH, MMI_VKBD_NUMBER_MATRIX_HEIGHT,
- MMI_VKBD_MATRIX_KEY_WIDTH, MMI_VKBD_MATRIX_KEY_HEIGHT,
- MMI_VKBD_MATRIX_KEY_H_GAP, MMI_VKBD_MATRIX_KEY_V_GAP
- };
- #ifdef __MMI_MAINLCD_240X320__
- static const gui_custom_key_layout_struct gui_number_custom_key_layout[] =
- {
- {161, 2, 19, 19},
- {181, 2, 19, 19},
- {201, 2, 38, 19},
- {161, 22, 39, 19},
- {201, 22, 38, 19}
- };
- #else /* __MMI_MAINLCD_240X320__ */
- static const gui_custom_key_layout_struct gui_number_custom_key_layout[] =
- {
- {121, 1, 14, 14},
- {136, 1, 14, 14},
- {151, 1, 24, 14},
- {121, 16, 29, 14},
- {151, 16, 24, 14}
- };
- #endif /* __MMI_MAINLCD_240X320__ */
- static const gui_keyboard_layout_struct gui_virtual_keyboard_number_layout =
- {
- MMI_VKBD_NUMBER_WIDTH,
- MMI_VKBD_NUMBER_HEIGHT,
- 1,
- 5,
- &gui_number_matrix_layout,
- gui_number_custom_key_layout,
- IMG_VKBD_NUMBER
- };
- static const gui_keyboard_language_struct gui_keyboard_number_string =
- {
- MMI_FALSE,
- 1,
- 5,
- {
- {'0', '1', '2', '3', '4', '5', '6', '7', ' '},
- {'*', '/', '+', '-', '.', '%', '$', '=', ' '}
- },
- {'8', '9', ' ', ' ', ' '},
- {0, 0, IMG_VKBD_CUSTOM_HIDE, IMG_VKBD_CUSTOM_SPACE, IMG_VKBD_CUSTOM_BACKSPACE},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_SPACE, GUI_VKBD_PEN_BAKSPACE}
- };
- static const gui_keyboard_language_struct gui_keyboard_phone_number_string =
- {
- MMI_FALSE,
- 1,
- 5,
- {
- {'0', '1', '2', '3', '4', '5', '6', '7', ' '},
- {'*', '#', '+', '-', 'p', 'w', '(', ')', ' '}
- },
- {'8', '9', ' ', ' ', ' '},
- {0, 0, IMG_VKBD_CUSTOM_HIDE, IMG_VKBD_CUSTOM_SPACE, IMG_VKBD_CUSTOM_BACKSPACE},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_SPACE, GUI_VKBD_PEN_BAKSPACE}
- };
- /****************************
- * Tray layout
- ****************************/
- static const gui_matrix_key_layout_struct gui_tray_matrix_layout =
- {
- MMI_VKBD_TRAY_MATRIX_X, MMI_VKBD_TRAY_MATRIX_Y,
- MMI_VKBD_TRAY_MATRIX_COLUMN, MMI_VKBD_TRAY_MATRIX_ROW,
- MMI_VKBD_TRAY_MATRIX_WIDTH, MMI_VKBD_TRAY_MATRIX_HEIGHT,
- MMI_VKBD_MATRIX_KEY_WIDTH, MMI_VKBD_MATRIX_KEY_HEIGHT,
- MMI_VKBD_MATRIX_KEY_H_GAP, MMI_VKBD_MATRIX_KEY_V_GAP
- };
- #ifdef __MMI_MAINLCD_240X320__
- static const gui_custom_key_layout_struct gui_tray_custom_key_layout[] =
- {
- {101, 2, 19, 19},
- {121, 2, 19, 19},
- {141, 2, 19, 19},
- {161, 2, 19, 19},
- {181, 2, 19, 19},
- {201, 2, 38, 19}
- };
- #else /* __MMI_MAINLCD_240X320__ */
- static const gui_custom_key_layout_struct gui_tray_custom_key_layout[] =
- {
- {76, 1, 14, 14},
- {91, 1, 14, 14},
- {106, 1, 14, 14},
- {121, 1, 14, 14},
- {136, 1, 14, 14},
- {151, 1, 24, 14}
- };
- #endif /* __MMI_MAINLCD_240X320__ */
- static const gui_keyboard_layout_struct gui_virtual_keyboard_tray_layout =
- {
- MMI_VKBD_TRAY_WIDTH,
- MMI_VKBD_TRAY_HEIGHT,
- 1,
- 6,
- &gui_tray_matrix_layout,
- gui_tray_custom_key_layout,
- IMG_VKBD_TRAY
- };
- static const gui_keyboard_language_struct gui_keyboard_tray_string =
- {
- MMI_FALSE,
- 1,
- 6,
- {'?', ',', ':', '.', ';'},
- {' ', ' ', ' ', ' ', ' ', ' '},
- {IMG_VKBD_CUSTOM_BRACKET, IMG_VKBD_CUSTOM_ENTER, IMG_VKBD_CUSTOM_SPACE,
- IMG_VKBD_CUSTOM_BACKSPACE, IMG_VKBD_CUSTOM_SYMBPICKER, IMG_VKBD_CUSTOM_SHOW},
- {GUI_VKBD_PEN_BRACKET, GUI_VKBD_PEN_NEWLINE, GUI_VKBD_PEN_SPACE,
- GUI_VKBD_PEN_BAKSPACE, GUI_VKBD_PEN_SYMBPICKER, GUI_VKBD_PEN_SHOW}
- };
- /* Used in inline editor */
- static const gui_keyboard_language_struct gui_keyboard_empty_tray_string =
- {
- MMI_FALSE,
- 1,
- 6,
- {' ', ' ', ' ', ' ', ' '},
- {' ', ' ', ' ', ' ', ' ', ' '},
- {0, 0, 0, 0, 0, 0},
- {GUI_VKBD_PEN_NONE, GUI_VKBD_PEN_NONE, GUI_VKBD_PEN_NONE,
- GUI_VKBD_PEN_NONE, GUI_VKBD_PEN_NONE, GUI_VKBD_PEN_NONE}
- };
- /* Used in inline editor */
- static const gui_keyboard_language_struct gui_keyboard_number_tray_string =
- {
- MMI_FALSE,
- 1,
- 6,
- {'0', '1', '2', '3', '4'},
- {'5', '6', '7', '8', '9', ' '},
- {0, 0, 0, 0, 0, IMG_VKBD_CUSTOM_BACKSPACE},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BAKSPACE}
- };
- /* Used in inline editor for 0~9 and dot(.) */
- static const gui_keyboard_language_struct gui_keyboard_number_dot_tray_string =
- {
- MMI_FALSE,
- 1,
- 6,
- {'0', '1', '2', '3', '4'},
- {'5', '6', '7', '8', '9', '.'},
- {0, 0, 0, 0, 0, 0},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I}
- };
- /****************************
- * Pinyin layout
- ****************************/
- // #ifdef __MMI_LANG_SM_CHINESE__
- static const gui_matrix_key_layout_struct gui_pinyin_matrix_layout =
- {
- MMI_VKBD_PINYIN_MATRIX_X, MMI_VKBD_PINYIN_MATRIX_Y,
- MMI_VKBD_PINYIN_MATRIX_COLUMN, MMI_VKBD_PINYIN_MATRIX_ROW,
- MMI_VKBD_PINYIN_MATRIX_WIDTH, MMI_VKBD_PINYIN_MATRIX_HEIGHT,
- MMI_VKBD_MATRIX_KEY_WIDTH, MMI_VKBD_MATRIX_KEY_HEIGHT,
- MMI_VKBD_MATRIX_KEY_H_GAP, MMI_VKBD_MATRIX_KEY_V_GAP
- };
- #ifdef __MMI_MAINLCD_240X320__
- static const gui_custom_key_layout_struct gui_pinyin_custom_key_layout[] =
- {
- {1, 2, 19, 19},
- {21, 2, 19, 19},
- {41, 2, 159, 19},
- {201, 2, 38, 19},
- {181, 22, 19, 19},
- {201, 22, 38, 19},
- {181, 42, 19, 19},
- {201, 42, 38, 19},
- {181, 62, 58, 19}
- };
- #else /* __MMI_MAINLCD_240X320__ */
- static const gui_custom_key_layout_struct gui_pinyin_custom_key_layout[] =
- {
- {1, 1, 14, 14},
- {16, 1, 14, 14},
- {31, 1, 119, 14},
- {151, 1, 24, 14},
- {136, 16, 14, 14},
- {151, 16, 24, 14},
- {136, 31, 14, 14},
- {151, 31, 24, 14},
- {136, 46, 39, 14}
- };
- #endif /* __MMI_MAINLCD_240X320__ */
- static const gui_keyboard_layout_struct gui_virtual_keyboard_pinyin_layout =
- {
- MMI_VKBD_PINYIN_WIDTH,
- MMI_VKBD_PINYIN_HEIGHT,
- 1,
- 9,
- &gui_pinyin_matrix_layout,
- gui_pinyin_custom_key_layout,
- IMG_VKBD_PINYIN
- };
- static const gui_keyboard_language_struct gui_keyboard_pinyin_string =
- {
- MMI_FALSE,
- 1,
- 9,
- {
- {'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', ' '},
- {'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ' '},
- {'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', ' '}
- },
- {':', ' ', ' ', ' ', 'p', ' ', '?', ' ', ' '},
- {0, IMG_VKBD_CUSTOM_BRACKET, IMG_VKBD_PINYIN_DISPAREA, IMG_VKBD_CUSTOM_HIDE,
- 0, IMG_VKBD_CUSTOM_BACKSPACE, 0, IMG_VKBD_CUSTOM_SYMBPICKER, IMG_VKBD_CUSTOM_SPACE},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BRACKET, GUI_VKBD_PEN_DISPLAY_AREA, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_BAKSPACE, GUI_VKBD_PEN_CHAR_I,
- GUI_VKBD_PEN_SYMBPICKER, GUI_VKBD_PEN_SPACE}
- };
- // #endif /* __MMI_LANG_SM_CHINESE__ */
- /****************************
- * Bopomo layout
- ****************************/
- // #ifdef __MMI_LANG_TR_CHINESE__
- static const gui_matrix_key_layout_struct gui_bopomo_matrix_layout =
- {
- MMI_VKBD_BOPOMO_MATRIX_X, MMI_VKBD_BOPOMO_MATRIX_Y,
- MMI_VKBD_BOPOMO_MATRIX_COLUMN, MMI_VKBD_BOPOMO_MATRIX_ROW,
- MMI_VKBD_BOPOMO_MATRIX_WIDTH, MMI_VKBD_BOPOMO_MATRIX_HEIGHT,
- MMI_VKBD_MATRIX_KEY_WIDTH, MMI_VKBD_MATRIX_KEY_HEIGHT,
- MMI_VKBD_MATRIX_KEY_H_GAP, MMI_VKBD_MATRIX_KEY_V_GAP
- };
- #ifdef __MMI_MAINLCD_240X320__
- static const gui_custom_key_layout_struct gui_bopomo_custom_key_layout[] =
- {
- {1, 2, 19, 19},
- {21, 2, 19, 19},
- {41, 2, 19, 19},
- {61, 2, 59, 19},
- {121, 2, 19, 19},
- {141, 2, 19, 19},
- {161, 2, 19, 19},
- {181, 2, 19, 19},
- {201, 2, 38, 19},
- {201, 22, 38, 19},
- {201, 42, 38, 19},
- {201, 62, 38, 19}
- };
- #else /* __MMI_MAINLCD_240X320__ */
- static const gui_custom_key_layout_struct gui_bopomo_custom_key_layout[] =
- {
- {1, 1, 14, 14},
- {16, 1, 14, 14},
- {31, 1, 14, 14},
- {46, 1, 44, 14},
- {91, 1, 14, 14},
- {106, 1, 14, 14},
- {121, 1, 14, 14},
- {136, 1, 14, 14},
- {151, 1, 24, 14},
- {151, 16, 24, 14},
- {151, 31, 24, 14},
- {151, 46, 24, 14}
- };
- #endif /* __MMI_MAINLCD_240X320__ */
- static const gui_keyboard_layout_struct gui_virtual_keyboard_bopomo_layout =
- {
- MMI_VKBD_BOPOMO_WIDTH,
- MMI_VKBD_BOPOMO_HEIGHT,
- 1,
- 12,
- &gui_bopomo_matrix_layout,
- gui_bopomo_custom_key_layout,
- IMG_VKBD_BOPOMO
- };
- static const gui_keyboard_language_struct gui_keyboard_bopomo_string =
- {
- MMI_FALSE,
- 1,
- 12,
- {
- {0x3106, 0x310a, 0x3114, 0x310d, 0x3110, 0x3117, 0x3127, 0x311b, 0x311f, 0x3123},
- {0x3107, 0x310b, 0x3115, 0x310e, 0x3111, 0x3118, 0x3128, 0x311c, 0x3120, 0x3124},
- {0x3108, 0x310c, 0x3116, 0x310f, 0x3112, 0x3119, 0x3129, 0x311d, 0x3121, 0x3125},
- },
- {0x3105, 0x3109, 0x3113, ' ', 0x3126, 0x311a, 0x311e, 0x3122, ' ', ' ', ' ', ' '},
- {0, 0, 0, IMG_VKBD_BOPOMO_DISPAREA, 0, 0, 0, 0, IMG_VKBD_CUSTOM_HIDE, IMG_VKBD_CUSTOM_BACKSPACE,
- IMG_VKBD_CUSTOM_SYMBPICKER, IMG_VKBD_CUSTOM_SPACE},
- {GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I,
- GUI_VKBD_PEN_DISPLAY_AREA, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I,
- GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_CHAR_I, GUI_VKBD_PEN_HIDE,
- GUI_VKBD_PEN_BAKSPACE, GUI_VKBD_PEN_SYMBPICKER, GUI_VKBD_PEN_SPACE}
- };
- // #endif /* __MMI_LANG_TR_CHINESE__ */
- /****************************
- * Language table
- ****************************/
- /* The order should be the same as gui_virtual_keyboard_language_enum */
- const gui_keyboard_lang_map_struct MMI_virtual_keyboard_language_map[GUI_VIRTUAL_KEYBOARD_MAX_LANG] =
- {
- {&gui_virtual_keyboard_standard_layout, &gui_keyboard_english_lowercase_string},
- {&gui_virtual_keyboard_standard_layout, &gui_keyboard_english_uppercase_string},
- {&gui_virtual_keyboard_extended_layout, &gui_keyboard_symbol_string},
- {&gui_virtual_keyboard_tray_layout, &gui_keyboard_tray_string},
- {&gui_virtual_keyboard_number_layout, &gui_keyboard_number_string},
- {&gui_virtual_keyboard_number_layout, &gui_keyboard_phone_number_string},
- {&gui_virtual_keyboard_tray_layout, &gui_keyboard_empty_tray_string},
- {&gui_virtual_keyboard_tray_layout, &gui_keyboard_number_tray_string},
- {&gui_virtual_keyboard_tray_layout, &gui_keyboard_number_dot_tray_string}
- /* MTK Terry Temp Solution for Custom Release */
- // #ifdef __MMI_LANG_SM_CHINESE__
- , {&gui_virtual_keyboard_pinyin_layout, &gui_keyboard_pinyin_string}
- //#endif
- //#ifdef __MMI_LANG_TR_CHINESE__
- , {&gui_virtual_keyboard_bopomo_layout, &gui_keyboard_bopomo_string}
- //#endif
- //#if defined(__MMI_LANG_TR_CHINESE__) || defined(__MMI_LANG_SM_CHINESE__)
- , {&gui_virtual_keyboard_standard_layout, &gui_keyboard_chinese_symbol_string}
- // #endif
- /* Asia-pacific */
- #ifdef __MMI_LANG_THAI__
- #endif
- #ifdef __MMI_LANG_INDONESIAN__
- #endif
- #ifdef __MMI_LANG_MALAY__
- #endif
- #ifdef __MMI_LANG_VIETNAMESE__
- #endif
- /* Hindi */
- #ifdef __MMI_LANG_HINDI__
- #endif
- /* Arabic */
- #ifdef __MMI_LANG_ARABIC__
- #endif
- /* Europe */
- #ifdef __MMI_LANG_SPANISH__
- , {&gui_virtual_keyboard_extended_layout, &gui_keyboard_spanish_lowercase_string}
- , {&gui_virtual_keyboard_extended_layout, &gui_keyboard_spanish_uppercase_string}
- #endif /* __MMI_LANG_SPANISH__ */
- #ifdef __MMI_LANG_FRENCH__
- , {&gui_virtual_keyboard_extended_layout, &gui_keyboard_french_lowercase_string}
- , {&gui_virtual_keyboard_extended_layout, &gui_keyboard_french_uppercase_string}
- #endif /* __MMI_LANG_FRENCH__ */
- #ifdef __MMI_LANG_GERMAN__
- , {&gui_virtual_keyboard_extended_layout, &gui_keyboard_german_lowercase_string}
- , {&gui_virtual_keyboard_extended_layout, &gui_keyboard_german_uppercase_string}
- #endif /* __MMI_LANG_GERMAN__ */
- #ifdef __MMI_LANG_ITALIAN__
- , {&gui_virtual_keyboard_extended_layout, &gui_keyboard_italian_lowercase_string}
- , {&gui_virtual_keyboard_extended_layout, &gui_keyboard_italian_uppercase_string}
- #endif /* __MMI_LANG_ITALIAN__ */
- #ifdef __MMI_LANG_RUSSIAN__
- , {&gui_virtual_keyboard_extended_layout, &gui_keyboard_russian_lowercase_string}
- , {&gui_virtual_keyboard_extended_layout, &gui_keyboard_russian_uppercase_string}
- #endif /* __MMI_LANG_RUSSIAN__ */
- #ifdef __MMI_LANG_TURKISH__
- , {&gui_virtual_keyboard_extended_layout, &gui_keyboard_turkish_lowercase_string}
- , {&gui_virtual_keyboard_extended_layout, &gui_keyboard_turkish_uppercase_string}
- #endif /* __MMI_LANG_TURKISH__ */
- #ifdef __MMI_LANG_PORTUGUESE__
- , {&gui_virtual_keyboard_extended_layout, &gui_keyboard_portuguese_lowercase_string}
- , {&gui_virtual_keyboard_extended_layout, &gui_keyboard_portuguese_uppercase_string}
- #endif /* __MMI_LANG_PORTUGUESE__ */
- #ifdef __MMI_VKBD_EUROPEAN_SUPPORT__
- , {&gui_virtual_keyboard_extended_layout, &gui_keyboard_european_symbols_string}
- #endif
- };
- #ifdef __MMI_VKBD_EUROPEAN_SUPPORT__
- static const gui_dead_key_symbol_struct gui_european_symbols[] =
- {
- /****Grave Accent***/
- {2, {0x60, 0x61}, 0xE0},
- {2, {0x60, 0x65}, 0xE8},
- {2, {0x60, 0x69}, 0xEC},
- {2, {0x60, 0x6F}, 0xF2},
- {2, {0x60, 0x75}, 0xF9},
- {2, {0x60, 0x41}, 0xC0},
- {2, {0x60, 0x45}, 0xC8},
- {2, {0x60, 0x49}, 0xCC},
- {2, {0x60, 0x4F}, 0xD2},
- {2, {0x60, 0x55}, 0xD9},
- /***Acute Accent***/
- {2, {0xB4, 0x61}, 0xE1},
- {2, {0xB4, 0x65}, 0xE9},
- {2, {0xB4, 0x69}, 0xED},
- {2, {0xB4, 0x6F}, 0xF3},
- {2, {0xB4, 0x75}, 0xFA},
- {2, {0xB4, 0x79}, 0xFD},
- {2, {0xB4, 0x41}, 0xC1},
- {2, {0xB4, 0x45}, 0xC9},
- {2, {0xB4, 0x49}, 0xCD},
- {2, {0xB4, 0x4F}, 0xD3},
- {2, {0xB4, 0x55}, 0xDA},
- {2, {0xB4, 0x59}, 0xDD},
- /***circumflex accent***/
- {2, {0x5E, 0x61}, 0xE2},
- {2, {0x5E, 0x65}, 0xEA},
- {2, {0x5E, 0x69}, 0xEE},
- {2, {0x5E, 0x6F}, 0xF4},
- {2, {0x5E, 0x75}, 0xFB},
- {2, {0x5E, 0x41}, 0xC2},
- {2, {0x5E, 0x45}, 0xCA},
- {2, {0x5E, 0x49}, 0xCE},
- {2, {0x5E, 0x4F}, 0xD4},
- {2, {0x5E, 0x55}, 0xDB},
- /***Diaeresis***/
- {2, {0xA8, 0x61}, 0xE4},
- {2, {0xA8, 0x65}, 0xEB},
- {2, {0xA8, 0x69}, 0xEF},
- {2, {0xA8, 0x6F}, 0xF6},
- {2, {0xA8, 0x75}, 0xFC},
- {2, {0xA8, 0x79}, 0xFF},
- {2, {0xA8, 0x41}, 0xC4},
- {2, {0xA8, 0x45}, 0xCB},
- {2, {0xA8, 0x49}, 0xCF},
- {2, {0xA8, 0x4F}, 0xD6},
- {2, {0xA8, 0x55}, 0xDC},
- /***Tilde***/
- {2, {0x7E, 0x61}, 0xE3},
- {2, {0x7E, 0x6F}, 0xF5},
- {2, {0x7E, 0x6E}, 0xF1},
- {2, {0x7E, 0x41}, 0xC3},
- {2, {0x7E, 0x4F}, 0xD5},
- {2, {0x7E, 0x4E}, 0xD1}
- };
- static const gui_dead_key_symbol_struct gui_turkish_symbols[] =
- {
- /****Grave Accent***/
- {2, {0x60, 0x61}, 0xE0},
- {2, {0x60, 0x65}, 0xE8},
- {2, {0x60, 0x69}, 0xEC},
- {2, {0x60, 0x131}, 0xEC},
- {2, {0x60, 0x6F}, 0xF2},
- {2, {0x60, 0x75}, 0xF9},
- {2, {0x60, 0x41}, 0xC0},
- {2, {0x60, 0x45}, 0xC8},
- {2, {0x60, 0x49}, 0xCC},
- {2, {0x60, 0x130}, 0xCC},
- {2, {0x60, 0x4F}, 0xD2},
- {2, {0x60, 0x55}, 0xD9},
- /***Acute Accent***/
- {2, {0xB4, 0x61}, 0xE1},
- {2, {0xB4, 0x65}, 0xE9},
- {2, {0xB4, 0x69}, 0xED},
- {2, {0xB4, 0x131}, 0xED},
- {2, {0xB4, 0x6F}, 0xF3},
- {2, {0xB4, 0x75}, 0xFA},
- {2, {0xB4, 0x41}, 0xC1},
- {2, {0xB4, 0x45}, 0xC9},
- {2, {0xB4, 0x49}, 0xCD},
- {2, {0xB4, 0x130}, 0xCD},
- {2, {0xB4, 0x4F}, 0xD3},
- {2, {0xB4, 0x55}, 0xDA},
- /***circumflex accent***/
- {2, {0x5E, 0x61}, 0xE2},
- {2, {0x5E, 0x65}, 0xEA},
- {2, {0x5E, 0x69}, 0xEE},
- {2, {0x5E, 0x131}, 0xEE},
- {2, {0x5E, 0x6F}, 0xF4},
- {2, {0x5E, 0x75}, 0xFB},
- {2, {0x5E, 0x41}, 0xC2},
- {2, {0x5E, 0x45}, 0xCA},
- {2, {0x5E, 0x49}, 0xCE},
- {2, {0x5E, 0x130}, 0xCE},
- {2, {0x5E, 0x4F}, 0xD4},
- {2, {0x5E, 0x55}, 0xDB},
- /***Diaeresis***/
- {2, {0xA8, 0x61}, 0xE4},
- {2, {0xA8, 0x65}, 0xEB},
- {2, {0xA8, 0x69}, 0xEF},
- {2, {0xA8, 0x131}, 0xEF},
- {2, {0xA8, 0x6F}, 0xF6},
- {2, {0xA8, 0x75}, 0xFC},
- {2, {0xA8, 0x79}, 0xFF},
- {2, {0xA8, 0x41}, 0xC4},
- {2, {0xA8, 0x45}, 0xCB},
- {2, {0xA8, 0x49}, 0xCF},
- {2, {0xA8, 0x130}, 0xCF},
- {2, {0xA8, 0x4F}, 0xD6},
- {2, {0xA8, 0x55}, 0xDC},
- /***Tilde***/
- {2, {0x7E, 0x61}, 0xE3},
- {2, {0x7E, 0x6F}, 0xF5},
- {2, {0x7E, 0x6E}, 0xF1},
- {2, {0x7E, 0x41}, 0xC3},
- {2, {0x7E, 0x4F}, 0xD5},
- {2, {0x7E, 0x4E}, 0xD1}
- };
- #endif /* __MMI_VKBD_EUROPEAN_SUPPORT__ */
- /* The order should be the same as gui_virtual_keyboard_language_enum */
- const gui_dead_key_map_struct gui_dead_key_symbol_table[] =
- {
- /* English */
- {NULL, 0},
- {NULL, 0},
- /* Symbol */
- {NULL, 0},
- /* Tray */
- {NULL, 0},
- /* Number */
- {NULL, 0},
- /* Phone Number */
- {NULL, 0},
- /* Empty Tray */
- {NULL, 0},
- /* Number Tray */
- {NULL, 0},
- /* Number Dot Tray */
- {NULL, 0}
- /* MTK Terry Temp Solution for Custom Release */
- // #ifdef __MMI_LANG_SM_CHINESE__
- , {NULL, 0}
- //#endif
- //#ifdef __MMI_LANG_TR_CHINESE__
- , {NULL, 0}
- //#endif
- //#if defined(__MMI_LANG_TR_CHINESE__) || defined(__MMI_LANG_SM_CHINESE__)
- , {NULL, 0}
- // #endif
- /* Asia-pacific */
- #ifdef __MMI_LANG_THAI__
- #endif
- #ifdef __MMI_LANG_INDONESIAN__
- #endif
- #ifdef __MMI_LANG_MALAY__
- #endif
- #ifdef __MMI_LANG_VIETNAMESE__
- #endif
- /* Hindi */
- #ifdef __MMI_LANG_HINDI__
- #endif
- /* Arabic */
- #ifdef __MMI_LANG_ARABIC__
- #endif
- /* Europe */
- #ifdef __MMI_LANG_SPANISH__
- , {gui_european_symbols, sizeof(gui_european_symbols) / sizeof(gui_european_symbols[0])}
- , {gui_european_symbols, sizeof(gui_european_symbols) / sizeof(gui_european_symbols[0])}
- #endif /* __MMI_LANG_SPANISH__ */
- #ifdef __MMI_LANG_FRENCH__
- , {gui_european_symbols, sizeof(gui_european_symbols) / sizeof(gui_european_symbols[0])}
- , {gui_european_symbols, sizeof(gui_european_symbols) / sizeof(gui_european_symbols[0])}
- #endif /* __MMI_LANG_FRENCH__ */
- #ifdef __MMI_LANG_GERMAN__
- , {gui_european_symbols, sizeof(gui_european_symbols) / sizeof(gui_european_symbols[0])}
- , {gui_european_symbols, sizeof(gui_european_symbols) / sizeof(gui_european_symbols[0])}
- #endif /* __MMI_LANG_GERMAN__ */
- #ifdef __MMI_LANG_ITALIAN__
- , {gui_european_symbols, sizeof(gui_european_symbols) / sizeof(gui_european_symbols[0])}
- , {gui_european_symbols, sizeof(gui_european_symbols) / sizeof(gui_european_symbols[0])}
- #endif /* __MMI_LANG_ITALIAN__ */
- #ifdef __MMI_LANG_RUSSIAN__
- , {NULL, 0}
- , {NULL, 0}
- #endif /* __MMI_LANG_RUSSIAN__ */
- #ifdef __MMI_LANG_TURKISH__
- , {gui_turkish_symbols, sizeof(gui_turkish_symbols) / sizeof(gui_turkish_symbols[0])}
- , {gui_turkish_symbols, sizeof(gui_turkish_symbols) / sizeof(gui_turkish_symbols[0])}
- #endif /* __MMI_LANG_TURKISH__ */
- #ifdef __MMI_LANG_PORTUGUESE__
- , {gui_european_symbols, sizeof(gui_european_symbols) / sizeof(gui_european_symbols[0])}
- , {gui_european_symbols, sizeof(gui_european_symbols) / sizeof(gui_european_symbols[0])}
- #endif /* __MMI_LANG_PORTUGUESE__ */
- #ifdef __MMI_VKBD_EUROPEAN_SUPPORT__
- , {NULL, 0}
- #endif
- };
- /*****************************************************************************
- * Local variable
- *****************************************************************************/
- static MMI_BOOL g_wgui_virtual_keyboard_multi_block_mode = MMI_FALSE;
- /*****************************************************************************
- * Global Function
- *****************************************************************************/
- /*****************************************************************************
- * FUNCTION
- * create_virtual_keyboard
- * DESCRIPTION
- * Create virtual keyboard object
- * PARAMETERS
- * void
- * RETURNS
- * void
- * REMARKS
- * The function is dummy because the keyboard object is statically allocated.
- *****************************************************************************/
- void create_virtual_keyboard(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 map_index, key_index;
- S32 max_value = 0, tmp;
- const gui_keyboard_layout_struct *layout;
- const gui_keyboard_language_struct *lang;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_DBG_ASSERT(sizeof(MMI_virtual_keyboard_language_map) / sizeof(gui_keyboard_lang_map_struct) ==
- GUI_VIRTUAL_KEYBOARD_MAX_LANG);
- MMI_DBG_ASSERT(sizeof(gui_dead_key_symbol_table) / sizeof(gui_dead_key_map_struct) ==
- GUI_VIRTUAL_KEYBOARD_MAX_LANG);
- /* Compute the cache size of key */
- for (map_index = 0; map_index < GUI_VIRTUAL_KEYBOARD_MAX_LANG; map_index++)
- {
- layout = MMI_virtual_keyboard_language_map[map_index].virtual_keyboard_layout;
- lang = MMI_virtual_keyboard_language_map[map_index].virtual_keyboard_language;
- for (key_index = 0; key_index < layout->n_custom_keys; key_index++)
- {
- if (lang->custom_key_type[key_index] == GUI_VKBD_PEN_DISPLAY_AREA)
- {
- /* Display area is not cached due to its size */
- continue;
- }
- tmp = layout->custom_keys[key_index].key_height * layout->custom_keys[key_index].key_width;
- if (tmp > max_value)
- {
- max_value = tmp;
- }
- }
- }
- MMI_virtual_keyboard_bitmap_cache_size = ((max_value * gdi_layer_get_bit_per_pixel()) + 7) >> 3;
- /* GUI_VIRTUAL_KEYBOARD_EMPTY_TRAY is the default value */
- gui_create_virtual_keyboard(
- &MMI_virtual_keyboard,
- (S16) MMI_content_x,
- (S16) MMI_content_y,
- GUI_VIRTUAL_KEYBOARD_EMPTY_TRAY);
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_virtual_keyboard_set_global_multi_block_mode
- * DESCRIPTION
- * Set global flag of multi-block handwriting mode
- *
- * In multi-block handwriting mode, some keyboard icons are displayed differently.
- * PARAMETERS
- * enabled [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_virtual_keyboard_set_global_multi_block_mode(MMI_BOOL enabled)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_wgui_virtual_keyboard_multi_block_mode = enabled;
- gui_set_virtual_keyboard_multi_block_mode(&MMI_virtual_keyboard, enabled);
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_setup_virtual_keyboard
- * DESCRIPTION
- * Setup the language of virtual keyboard object
- * PARAMETERS
- * lang_type [IN] Language
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_setup_virtual_keyboard(gui_virtual_keyboard_language_enum lang_type)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 vkbd_height = MMI_virtual_keyboard_language_map[lang_type].virtual_keyboard_layout->height;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_create_virtual_keyboard(
- &MMI_virtual_keyboard,
- (S16) MMI_content_x,
- (S16) (MMI_content_y + MMI_content_height - vkbd_height),
- lang_type);
- gui_set_virtual_keyboard_multi_block_mode(&MMI_virtual_keyboard, g_wgui_virtual_keyboard_multi_block_mode);
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_close_virtual_keyboard
- * DESCRIPTION
- * Release the resource used by virtual keyboard object
- * PARAMETERS
- * void
- * lang_type(?) [IN] Language
- * RETURNS
- * void
- * REMARKS
- * Used in exit function or exit category function
- *****************************************************************************/
- void wgui_close_virtual_keyboard(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* DUMMY */
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_set_virtual_keyboard_display_area
- * DESCRIPTION
- * Update text displayed on display area
- * PARAMETERS
- * string [IN] String to be displayed in display area
- * redraw [IN] Whether to redraw the keyboard
- * RETURNS
- * void
- * REMARKS
- *
- *****************************************************************************/
- void wgui_set_virtual_keyboard_display_area(const U8 *string, BOOL redraw)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_set_virtual_keyboard_display_area(&MMI_virtual_keyboard, string, redraw);
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_get_virtual_keyboard_size
- * DESCRIPTION
- * Get the current size of virtual keyboard
- * PARAMETERS
- * width [OUT]
- * height [OUT]
- * RETURNS
- * void
- * REMARKS
- * Keyboards of different languages have different size
- *****************************************************************************/
- void wgui_get_virtual_keyboard_size(S32 *width, S32 *height)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *width = MMI_virtual_keyboard.width;
- *height = MMI_virtual_keyboard.height;
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_set_virtual_keyboard_allowed_characters
- * DESCRIPTION
- * Only the allowd characters can be input on keyboard.
- * This function and wgui_set_virtual_keyboard_disabled_list() are mutually-exclusive.
- *
- * Control keys such as GUI_VKBD_PEN_HIDE, GUI_VKBD_PEN_SHOW... are enabled because
- * they are not related to character insertion.
- *
- * `allowed_characters' may contain '-' for consecutive characters
- * (Ex. 'a-z' for characters from a to z.)
- * If we want to accept "-", please write it as '-'.
- * For example, '-0-9.' represents "-0123456789."
- *
- * Example of valid characters in email addresss:
- * wgui_set_virtual_keyboard_allowed_characters((const UI_character_type *) L"+_\-.@A-Za-z0-9");
- * (it is not a complete list of all characters allowed in RFC, but it satisfies almost all cases)
- * PARAMETERS
- * allowed_chars [IN] Allowed characters
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_set_virtual_keyboard_allowed_characters(const UI_character_type *allowed_chars)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_set_virtual_keyboard_allowed_characters(&MMI_virtual_keyboard, allowed_chars);
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_set_virtual_keyboard_disabled_list
- * DESCRIPTION
- * Set disabled characters in virtual keyboard
- * PARAMETERS
- * disabled_chars [IN] Ended by ' '
- * disabled_symbols [IN] Ended by GUI_VKBD_PEN_NONE
- * RETURNS
- * void
- * REMARKS
- *
- *****************************************************************************/
- void wgui_set_virtual_keyboard_disabled_list(
- const UI_character_type *disabled_chars,
- const gui_virtual_keyboard_pen_enum *disabled_symbols)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_set_virtual_board_disable_list(&MMI_virtual_keyboard, disabled_chars, disabled_symbols);
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_move_virtual_keyboard
- * DESCRIPTION
- * Move the position of virtual keyboard
- * PARAMETERS
- * x [IN]
- * y [IN]
- * RETURNS
- * void
- * REMARKS
- *
- *****************************************************************************/
- void wgui_move_virtual_keyboard(S32 x, S32 y)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_move_virtual_keyboard(&MMI_virtual_keyboard, (S16) x, (S16) y);
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_show_virtual_keyboard
- * DESCRIPTION
- * Display virtual keyboard
- * PARAMETERS
- * void
- * RETURNS
- * void
- * REMARKS
- *
- *****************************************************************************/
- void wgui_show_virtual_keyboard(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_lock_double_buffer();
- gui_show_virtual_keyboard(&MMI_virtual_keyboard);
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(
- MMI_virtual_keyboard.x,
- MMI_virtual_keyboard.y,
- MMI_virtual_keyboard.x + MMI_virtual_keyboard.width - 1,
- MMI_virtual_keyboard.y + MMI_virtual_keyboard.height - 1);
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_greyscale_virtual_keyboard
- * DESCRIPTION
- * Make the 'displayed' virtual keyboard as greyed (disabled)
- * PARAMETERS
- * void
- * RETURNS
- * void
- * REMARKS
- *
- *****************************************************************************/
- void wgui_greyscale_virtual_keyboard(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_lock_double_buffer();
- gui_greyscale_rectangle(MMI_virtual_keyboard.x, MMI_virtual_keyboard.y, MMI_virtual_keyboard.x + MMI_virtual_keyboard.width - 1, MMI_virtual_keyboard.y + MMI_virtual_keyboard.height - 1, MMI_VKBD_GRAYSCALE_VALUE, MMI_BG_GREYSCALE_BLACK_VALUE); /* 102605 greyscale Calvin modified */
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(
- MMI_virtual_keyboard.x,
- MMI_virtual_keyboard.y,
- MMI_virtual_keyboard.x + MMI_virtual_keyboard.width - 1,
- MMI_virtual_keyboard.y + MMI_virtual_keyboard.height - 1);
- }