wgui_categories_inputs.c
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:1705k
源码类别:

MTK

开发平台:

C/C++

  1. /*****************************************************************************
  2. *  Copyright Statement:
  3. *  --------------------
  4. *  This software is protected by Copyright and the information contained
  5. *  herein is confidential. The software may not be copied and the information
  6. *  contained herein may not be used or disclosed except with the written
  7. *  permission of MediaTek Inc. (C) 2005
  8. *
  9. *  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
  10. *  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
  11. *  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
  12. *  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
  13. *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
  14. *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
  15. *  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
  16. *  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
  17. *  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
  18. *  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
  19. *  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
  20. *  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
  21. *
  22. *  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
  23. *  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
  24. *  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
  25. *  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
  26. *  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. 
  27. *
  28. *  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
  29. *  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
  30. *  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
  31. *  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
  32. *  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
  33. *
  34. *****************************************************************************/
  35. /*****************************************************************************
  36.  *
  37.  * Filename:
  38.  * ---------
  39.  *   wgui_categories_inputs.c
  40.  *
  41.  * Project:
  42.  * --------
  43.  *   Maui_Software
  44.  *
  45.  * Description:
  46.  * ------------
  47.  * Input/Editor related categoreis.
  48.  *
  49.  * Author:
  50.  * -------
  51.  * -------
  52.  *
  53.  *============================================================================
  54.  *             HISTORY
  55.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  56.  *------------------------------------------------------------------------------
  57.  * removed!
  58.  *
  59.  * removed!
  60.  * removed!
  61.  * removed!
  62.  *
  63.  * removed!
  64.  * removed!
  65.  * removed!
  66.  *
  67.  * removed!
  68.  * removed!
  69.  * removed!
  70.  *
  71.  * removed!
  72.  * removed!
  73.  * removed!
  74.  *
  75.  * removed!
  76.  * removed!
  77.  * removed!
  78.  *
  79.  * removed!
  80.  * removed!
  81.  * removed!
  82.  * removed!
  83.  *
  84.  * removed!
  85.  * removed!
  86.  * removed!
  87.  *
  88.  * removed!
  89.  * removed!
  90.  * removed!
  91.  *
  92.  * removed!
  93.  * removed!
  94.  * removed!
  95.  *
  96.  * removed!
  97.  * removed!
  98.  * removed!
  99.  *
  100.  * removed!
  101.  * removed!
  102.  * removed!
  103.  *
  104.  * removed!
  105.  * removed!
  106.  * removed!
  107.  *
  108.  * removed!
  109.  * removed!
  110.  * removed!
  111.  *
  112.  * removed!
  113.  * removed!
  114.  * removed!
  115.  *
  116.  * removed!
  117.  * removed!
  118.  * removed!
  119.  *
  120.  * removed!
  121.  * removed!
  122.  * removed!
  123.  *
  124.  * removed!
  125.  * removed!
  126.  * removed!
  127.  *
  128.  * removed!
  129.  * removed!
  130.  * removed!
  131.  *
  132.  * removed!
  133.  * removed!
  134.  * removed!
  135.  *
  136.  * removed!
  137.  * removed!
  138.  * removed!
  139.  *
  140.  * removed!
  141.  * removed!
  142.  * removed!
  143.  *
  144.  * removed!
  145.  * removed!
  146.  * removed!
  147.  *
  148.  * removed!
  149.  * removed!
  150.  * removed!
  151.  *
  152.  * removed!
  153.  * removed!
  154.  * removed!
  155.  *
  156.  * removed!
  157.  * removed!
  158.  * removed!
  159.  *
  160.  * removed!
  161.  * removed!
  162.  * removed!
  163.  *
  164.  * removed!
  165.  * removed!
  166.  * removed!
  167.  *
  168.  * removed!
  169.  * removed!
  170.  * removed!
  171.  *
  172.  * removed!
  173.  * removed!
  174.  * removed!
  175.  *
  176.  * removed!
  177.  * removed!
  178.  * removed!
  179.  *
  180.  * removed!
  181.  * removed!
  182.  * removed!
  183.  *
  184.  * removed!
  185.  * removed!
  186.  * removed!
  187.  *
  188.  * removed!
  189.  * removed!
  190.  * removed!
  191.  *
  192.  * removed!
  193.  * removed!
  194.  * removed!
  195.  *
  196.  * removed!
  197.  * removed!
  198.  * removed!
  199.  *
  200.  * removed!
  201.  * removed!
  202.  * removed!
  203.  *
  204.  * removed!
  205.  * removed!
  206.  * removed!
  207.  *
  208.  * removed!
  209.  * removed!
  210.  * removed!
  211.  *
  212.  * removed!
  213.  * removed!
  214.  * removed!
  215.  *
  216.  * removed!
  217.  * removed!
  218.  * removed!
  219.  *
  220.  * removed!
  221.  * removed!
  222.  * removed!
  223.  *
  224.  * removed!
  225.  * removed!
  226.  * removed!
  227.  *
  228.  * removed!
  229.  * removed!
  230.  * removed!
  231.  *
  232.  * removed!
  233.  * removed!
  234.  * removed!
  235.  *
  236.  * removed!
  237.  * removed!
  238.  * removed!
  239.  *
  240.  * removed!
  241.  * removed!
  242.  * removed!
  243.  *
  244.  * removed!
  245.  * removed!
  246.  * removed!
  247.  *
  248.  * removed!
  249.  * removed!
  250.  * removed!
  251.  *
  252.  * removed!
  253.  * removed!
  254.  * removed!
  255.  *
  256.  * removed!
  257.  * removed!
  258.  * removed!
  259.  *
  260.  * removed!
  261.  * removed!
  262.  * removed!
  263.  *
  264.  * removed!
  265.  * removed!
  266.  * removed!
  267.  *
  268.  * removed!
  269.  * removed!
  270.  * removed!
  271.  *
  272.  * removed!
  273.  * removed!
  274.  * removed!
  275.  *
  276.  * removed!
  277.  * removed!
  278.  * removed!
  279.  *
  280.  * removed!
  281.  * removed!
  282.  * removed!
  283.  *
  284.  * removed!
  285.  * removed!
  286.  * removed!
  287.  *
  288.  * removed!
  289.  * removed!
  290.  * removed!
  291.  *
  292.  * removed!
  293.  * removed!
  294.  * removed!
  295.  *
  296.  * removed!
  297.  * removed!
  298.  * removed!
  299.  *
  300.  * removed!
  301.  * removed!
  302.  * removed!
  303.  *
  304.  * removed!
  305.  * removed!
  306.  * removed!
  307.  *
  308.  * removed!
  309.  * removed!
  310.  * removed!
  311.  *
  312.  * removed!
  313.  * removed!
  314.  * removed!
  315.  *
  316.  * removed!
  317.  * removed!
  318.  * removed!
  319.  *
  320.  * removed!
  321.  * removed!
  322.  * removed!
  323.  *
  324.  * removed!
  325.  * removed!
  326.  * removed!
  327.  *
  328.  * removed!
  329.  * removed!
  330.  * removed!
  331.  *
  332.  * removed!
  333.  * removed!
  334.  * removed!
  335.  *
  336.  * removed!
  337.  * removed!
  338.  * removed!
  339.  *
  340.  * removed!
  341.  * removed!
  342.  * removed!
  343.  *
  344.  * removed!
  345.  * removed!
  346.  * removed!
  347.  *
  348.  * removed!
  349.  * removed!
  350.  * removed!
  351.  *
  352.  * removed!
  353.  * removed!
  354.  * removed!
  355.  *
  356.  * removed!
  357.  * removed!
  358.  * removed!
  359.  *
  360.  * removed!
  361.  * removed!
  362.  * removed!
  363.  *
  364.  * removed!
  365.  * removed!
  366.  * removed!
  367.  *
  368.  * removed!
  369.  * removed!
  370.  * removed!
  371.  *
  372.  * removed!
  373.  * removed!
  374.  * removed!
  375.  *
  376.  * removed!
  377.  * removed!
  378.  * removed!
  379.  *
  380.  * removed!
  381.  * removed!
  382.  * removed!
  383.  *
  384.  * removed!
  385.  * removed!
  386.  * removed!
  387.  *
  388.  * removed!
  389.  * removed!
  390.  * removed!
  391.  *
  392.  * removed!
  393.  * removed!
  394.  * removed!
  395.  *
  396.  * removed!
  397.  * removed!
  398.  * removed!
  399.  *
  400.  * removed!
  401.  * removed!
  402.  * removed!
  403.  *
  404.  * removed!
  405.  * removed!
  406.  * removed!
  407.  *
  408.  * removed!
  409.  * removed!
  410.  * removed!
  411.  *
  412.  * removed!
  413.  * removed!
  414.  * removed!
  415.  *
  416.  * removed!
  417.  * removed!
  418.  * removed!
  419.  *
  420.  * removed!
  421.  * removed!
  422.  * removed!
  423.  *
  424.  * removed!
  425.  * removed!
  426.  * removed!
  427.  *
  428.  * removed!
  429.  * removed!
  430.  * removed!
  431.  *
  432.  * removed!
  433.  * removed!
  434.  * removed!
  435.  *
  436.  * removed!
  437.  * removed!
  438.  * removed!
  439.  *
  440.  * removed!
  441.  * removed!
  442.  * removed!
  443.  *
  444.  * removed!
  445.  * removed!
  446.  * removed!
  447.  *
  448.  * removed!
  449.  * removed!
  450.  * removed!
  451.  *
  452.  * removed!
  453.  * removed!
  454.  * removed!
  455.  *
  456.  * removed!
  457.  * removed!
  458.  * removed!
  459.  *
  460.  * removed!
  461.  * removed!
  462.  * removed!
  463.  *
  464.  * removed!
  465.  * removed!
  466.  * removed!
  467.  *
  468.  * removed!
  469.  * removed!
  470.  * removed!
  471.  *
  472.  * removed!
  473.  * removed!
  474.  * removed!
  475.  *
  476.  * removed!
  477.  * removed!
  478.  * removed!
  479.  *
  480.  * removed!
  481.  * removed!
  482.  * removed!
  483.  *
  484.  * removed!
  485.  * removed!
  486.  * removed!
  487.  *
  488.  * removed!
  489.  * removed!
  490.  * removed!
  491.  *
  492.  * removed!
  493.  * removed!
  494.  * removed!
  495.  *
  496.  * removed!
  497.  * removed!
  498.  * removed!
  499.  *
  500.  *------------------------------------------------------------------------------
  501.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  502.  *============================================================================
  503.  ****************************************************************************/
  504. #include "MMI_features.h"
  505. #if defined(__MMI_TOUCH_SCREEN__) || defined(__MMI_HANDWRITING_PAD__)
  506. #include "EditorPen.h"
  507. #endif 
  508. #include "stdC.h"
  509. #include "L4Dr1.h"
  510. #include "PixtelDataTypes.h"
  511. #include "DebugInitDef.h"
  512. #include "GlobalDefs.h"
  513. #ifdef __MMI_UI_SMALL_SCREEN_SUPPORT__
  514. #include "HistoryGprot.h"
  515. #endif 
  516. #include "FrameworkStruct.h"
  517. #include "EventsDef.h"
  518. #include "wgui_inputs.h"
  519. #include "wgui_categories_defs.h"
  520. #include "gui_themes.h"
  521. #include "wgui_categories.h"
  522. #include "wgui_categories_inputs.h"
  523. #include "wgui_status_icons.h"
  524. #include "ScrMemMgrGprot.h"
  525. #include "t9def.h"
  526. #include "TimerEvents.h"
  527. #include "bididef.h"
  528. #include "IMERes.h"
  529. #include "gui_setting.h"
  530. #ifdef __MMI_HINDI_ALG__
  531. #include "hf_rules.h"
  532. #endif 
  533. #if defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__)
  534. #include "SmsGuiInterfaceType.h"
  535. #include "MessagesResourceData.h"
  536. #endif /* defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__) */ 
  537. #include "ChatGtype.h"
  538. #include "wgui_draw_manager.h"
  539. #include "IMERes.h"
  540. #include "wgui_ems.h"
  541. S32 redraw_on_input_method_change = 0;
  542. #if defined(__MMI_TOUCH_SCREEN__)
  543. S32 wgui_information_bar_input_mode_display_width = 0;
  544. S32 wgui_information_bar_input_mode_display_height = 0;
  545. #endif
  546. #ifdef __UI_PAGING_IN_MULTILINE_EDITOR__
  547. static U8 shared_data[GUI_SHARED_BYTES];
  548. #endif
  549. #ifdef UI_SMALL_CATEGORY_EDITOR
  550. BOOL g_small_editor_category_present = FALSE;
  551. #endif 
  552. #include "BIDIDEF.h"
  553. #include "BIDIProt.h"
  554. /* MTK Terry for removing compile warnings */
  555. extern void draw_scrolling_title(void);
  556. extern void setup_scrolling_title(void);
  557. extern void close_scrolling_title(void);
  558. /* MTK steven for removing compile warnings */
  559. extern void resize_singleline_inputbox(S32 width, S32 height);
  560. extern void EntrySymbolPickerScreen(void);
  561. #ifdef __MMI_T9__
  562. extern void InuptMethodEnterInlineMultilineScreen(void);
  563. extern void T9SynT9WithInputBoxMultilineInputBox(void);
  564. #ifdef UI_SMALL_CATEGORY_EDITOR
  565. extern void T9TrResizeSelectionArea(void);
  566. #endif 
  567. #endif /* __MMI_T9__ */ 
  568. /* MTK end */
  569. extern U16 StopMyTimer(U16 nTimerId);
  570. extern void mmi_idle_star_key_disable_long_press(void);
  571. //to customize input methods
  572. // __CUSTPACK_MULTIBIN     Terry   BEGIN
  573. U8 MMI_english_input_mode_set[INPUT_MODE_MAX_NUM];
  574. U8 MMI_qsearch_input_mode_set[INPUT_MODE_MAX_NUM];
  575. U8 MMI_all_input_mode_set[INPUT_MODE_MAX_NUM];
  576. /* Begin AP input mode set */
  577. U8 MMI_AP_set_input_mode_set = 0;
  578. S16 MMI_AP_required_input_mode_set[INPUT_MODE_MAX_NUM];
  579. /* End AP input mode set */
  580. const U8 MMI_implement_input_mode_set[] = 
  581. {
  582.     INPUT_MODE_MULTITAP_UPPERCASE_ABC,
  583.     INPUT_MODE_MULTITAP_LOWERCASE_ABC,
  584.     INPUT_MODE_123,
  585. #if defined (__MMI_MULTITAP_THAI__)
  586.     INPUT_MODE_MULTITAP_THAI,
  587. #endif 
  588. #if defined(__MMI_MULTITAP_SPANISH__)
  589.     INPUT_MODE_MULTITAP_UPPERCASE_SPANISH,
  590.     INPUT_MODE_MULTITAP_LOWERCASE_SPANISH,
  591. #endif /* defined(__MMI_MULTITAP_SPANISH__) */ 
  592. #if defined(__MMI_MULTITAP_DANISH__)
  593.     INPUT_MODE_MULTITAP_UPPERCASE_DANISH,
  594.     INPUT_MODE_MULTITAP_LOWERCASE_DANISH,
  595. #endif /* defined(__MMI_MULTITAP_DANISH__) */ 
  596. #if defined(__MMI_MULTITAP_POLISH__)
  597.     INPUT_MODE_MULTITAP_UPPERCASE_POLISH,
  598.     INPUT_MODE_MULTITAP_LOWERCASE_POLISH,
  599. #endif /* defined(__MMI_MULTITAP_POLISH__) */ 
  600. #if defined(__MMI_MULTITAP_FRENCH__)
  601.     INPUT_MODE_MULTITAP_UPPERCASE_FRENCH,
  602.     INPUT_MODE_MULTITAP_LOWERCASE_FRENCH,
  603. #endif /* defined(__MMI_MULTITAP_FRENCH__) */ 
  604. #if defined(__MMI_MULTITAP_GERMAN__)
  605.     INPUT_MODE_MULTITAP_UPPERCASE_GERMAN,
  606.     INPUT_MODE_MULTITAP_LOWERCASE_GERMAN,
  607. #endif /* defined(__MMI_MULTITAP_GERMAN__) */ 
  608. #if defined(__MMI_MULTITAP_ITALIAN__)
  609.     INPUT_MODE_MULTITAP_UPPERCASE_ITALIAN,
  610.     INPUT_MODE_MULTITAP_LOWERCASE_ITALIAN,
  611. #endif /* defined(__MMI_MULTITAP_ITALIAN__) */ 
  612. #if defined(__MMI_MULTITAP_RUSSIAN__)
  613.     INPUT_MODE_MULTITAP_UPPERCASE_RUSSIAN,
  614.     INPUT_MODE_MULTITAP_LOWERCASE_RUSSIAN,
  615. #endif /* defined(__MMI_MULTITAP_RUSSIAN__) */ 
  616. #if defined(__MMI_MULTITAP_BULGARIAN__)
  617.     INPUT_MODE_MULTITAP_UPPERCASE_BULGARIAN,
  618.     INPUT_MODE_MULTITAP_LOWERCASE_BULGARIAN,
  619. #endif /* defined(__MMI_MULTITAP_BULGARIAN__) */ 
  620. #if defined(__MMI_MULTITAP_TURKISH__)
  621.     INPUT_MODE_MULTITAP_UPPERCASE_TURKISH,
  622.     INPUT_MODE_MULTITAP_LOWERCASE_TURKISH,
  623. #endif /* defined(__MMI_MULTITAP_TURKISH__) */ 
  624. #if defined(__MMI_MULTITAP_PORTUGUESE__)
  625.     INPUT_MODE_MULTITAP_UPPERCASE_PORTUGUESE,
  626.     INPUT_MODE_MULTITAP_LOWERCASE_PORTUGUESE,
  627. #endif /* defined(__MMI_MULTITAP_PORTUGUESE__) */ 
  628. #if defined(__MMI_MULTITAP_INDONESIAN__)
  629.     INPUT_MODE_MULTITAP_UPPERCASE_INDONESIAN,
  630.     INPUT_MODE_MULTITAP_LOWERCASE_INDONESIAN,
  631. #endif /* defined(__MMI_MULTITAP_INDONESIAN__) */ 
  632. #if defined(__MMI_MULTITAP_CZECH__)
  633.     INPUT_MODE_MULTITAP_UPPERCASE_CZECH,
  634.     INPUT_MODE_MULTITAP_LOWERCASE_CZECH,
  635. #endif /* defined(__MMI_MULTITAP_CZECH__) */ 
  636. #if defined(__MMI_MULTITAP_MALAY__)
  637.     INPUT_MODE_MULTITAP_UPPERCASE_MALAY,
  638.     INPUT_MODE_MULTITAP_LOWERCASE_MALAY,
  639. #endif /* defined(__MMI_MULTITAP_MALAY__) */ 
  640. #if defined(__MMI_MULTITAP_VIETNAMESE__)
  641.     INPUT_MODE_MULTITAP_UPPERCASE_VIETNAMESE,
  642.     INPUT_MODE_MULTITAP_LOWERCASE_VIETNAMESE,
  643. #endif /* defined(__MMI_MULTITAP_VIETNAMESE__) */ 
  644. #if defined(__MMI_MULTITAP_FINNISH__)
  645.     INPUT_MODE_MULTITAP_UPPERCASE_FINNISH,
  646.     INPUT_MODE_MULTITAP_LOWERCASE_FINNISH,
  647. #endif /* defined(__MMI_MULTITAP_FINNISH__) */ 
  648. #if defined(__MMI_MULTITAP_HUNGARIAN__)
  649.     INPUT_MODE_MULTITAP_UPPERCASE_HUNGARIAN,
  650.     INPUT_MODE_MULTITAP_LOWERCASE_HUNGARIAN,
  651. #endif /* defined(__MMI_MULTITAP_HUNGARIAN__) */ 
  652. #if defined(__MMI_MULTITAP_SWEDISH__)
  653.     INPUT_MODE_MULTITAP_UPPERCASE_SWEDISH,
  654.     INPUT_MODE_MULTITAP_LOWERCASE_SWEDISH,
  655. #endif /* defined(__MMI_MULTITAP_SWEDISH__) */ 
  656. #if defined(__MMI_MULTITAP_HEBREW__)
  657.     INPUT_MODE_MULTITAP_HEBREW,
  658. #endif 
  659. #if defined(__MMI_MULTITAP_SLOVAK__)
  660.     INPUT_MODE_MULTITAP_UPPERCASE_SLOVAK,
  661.     INPUT_MODE_MULTITAP_LOWERCASE_SLOVAK,
  662. #endif /* defined(__MMI_MULTITAP_SLOVAK__) */ 
  663. #if defined(__MMI_MULTITAP_DUTCH__)
  664.     INPUT_MODE_MULTITAP_UPPERCASE_DUTCH,
  665.     INPUT_MODE_MULTITAP_LOWERCASE_DUTCH,
  666. #endif /* defined(__MMI_MULTITAP_DUTCH__) */ 
  667. #if defined(__MMI_MULTITAP_NORWEGIAN__)
  668.     INPUT_MODE_MULTITAP_UPPERCASE_NORWEGIAN,
  669.     INPUT_MODE_MULTITAP_LOWERCASE_NORWEGIAN,
  670. #endif /* defined(__MMI_MULTITAP_NORWEGIAN__) */ 
  671.     /* Norwegian end */
  672. #if defined(__MMI_MULTITAP_ARABIC__)
  673.     INPUT_MODE_MULTITAP_ARABIC,
  674. #endif 
  675. //PMT START PERSIAN
  676. #if defined(__MMI_MULTITAP_PERSIAN__)
  677.     INPUT_MODE_MULTITAP_PERSIAN,
  678. #endif
  679. //PMT END PERSIAN
  680. #if defined(__MMI_MULTITAP_CROATIAN__)
  681.     INPUT_MODE_MULTITAP_UPPERCASE_CROATIAN,
  682.     INPUT_MODE_MULTITAP_LOWERCASE_CROATIAN,
  683. #endif /* defined(__MMI_MULTITAP_CROATIAN__) */ 
  684. #if defined(__MMI_MULTITAP_ROMANIAN__)
  685.     INPUT_MODE_MULTITAP_UPPERCASE_ROMANIAN,
  686.     INPUT_MODE_MULTITAP_LOWERCASE_ROMANIAN,
  687. #endif /* defined(__MMI_MULTITAP_ROMANIAN__) */ 
  688. #if defined(__MMI_MULTITAP_SLOVENIAN__)
  689.     INPUT_MODE_MULTITAP_UPPERCASE_SLOVENIAN,
  690.     INPUT_MODE_MULTITAP_LOWERCASE_SLOVENIAN,
  691. #endif /* defined(__MMI_MULTITAP_SLOVENIAN__) */ 
  692. #if defined(__MMI_MULTITAP_GREEK__)
  693.     INPUT_MODE_MULTITAP_UPPERCASE_GREEK,
  694.     INPUT_MODE_MULTITAP_LOWERCASE_GREEK,
  695. #endif /* defined(__MMI_MULTITAP_GREEK__) */ 
  696. #if defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__)
  697.     INPUT_MODE_MULTITAP_UPPERCASE_ABC_NO_NUMERIC,
  698.     INPUT_MODE_MULTITAP_LOWERCASE_ABC_NO_NUMERIC,
  699.     INPUT_MODE_123_SYMBOLS,
  700. #endif /* defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__) */ 
  701. #if defined(__MMI_T9__)
  702. #if defined(__MMI_T9_TR_CHINESE__) && defined(__MMI_T9_MULTITAP_PHONETIC_INPUT__)
  703.     INPUT_MODE_TR_MULTITAP_BOPOMO,
  704. #endif 
  705. #if defined(__MMI_T9_SM_CHINESE__) && defined(__MMI_T9_MULTITAP_PHONETIC_INPUT__)
  706.     INPUT_MODE_SM_MULTITAP_PINYIN,
  707. #endif 
  708. #if defined(__MMI_T9_TR_CHINESE__)
  709.     INPUT_MODE_TR_STROKE,
  710. #endif 
  711. #if defined(__MMI_T9_SM_CHINESE__)
  712.     INPUT_MODE_SM_STROKE,
  713. #endif 
  714. #if defined(__MMI_T9_TR_CHINESE__) && defined(__MMI_T9_SMART_PHONETIC_INPUT__) && defined(__MMI_T9_AMB_BPMF_INPUT__)
  715.     INPUT_MODE_TR_BOPOMO,
  716. #endif 
  717. #if defined(__MMI_T9_SM_CHINESE__) && defined(__MMI_T9_SMART_PHONETIC_INPUT__)
  718.     INPUT_MODE_SM_PINYIN,
  719. #endif 
  720. #if defined(__MMI_T9_ENGLISH__)
  721.     INPUT_MODE_SMART_UPPERCASE_ABC,
  722.     INPUT_MODE_SMART_LOWERCASE_ABC,
  723. #endif /* defined(__MMI_T9_ENGLISH__) */ 
  724. #if defined(__MMI_T9_SPANISH__)
  725.     INPUT_MODE_SMART_UPPERCASE_SPANISH,
  726.     INPUT_MODE_SMART_LOWERCASE_SPANISH,
  727. #endif /* defined(__MMI_T9_SPANISH__) */ 
  728. #if defined(__MMI_T9_DANISH__)
  729.     INPUT_MODE_SMART_UPPERCASE_DANISH,
  730.     INPUT_MODE_SMART_LOWERCASE_DANISH,
  731. #endif /* defined(__MMI_T9_DANISH__) */ 
  732. #if defined(__MMI_T9_POLISH__)
  733.     INPUT_MODE_SMART_UPPERCASE_POLISH,
  734.     INPUT_MODE_SMART_LOWERCASE_POLISH,
  735. #endif /* defined(__MMI_T9_POLISH__) */ 
  736. #if defined(__MMI_T9_FRENCH__)
  737.     INPUT_MODE_SMART_UPPERCASE_FRENCH,
  738.     INPUT_MODE_SMART_LOWERCASE_FRENCH,
  739. #endif /* defined(__MMI_T9_FRENCH__) */ 
  740. #if defined(__MMI_T9_GERMAN__)
  741.     INPUT_MODE_SMART_UPPERCASE_GERMAN,
  742.     INPUT_MODE_SMART_LOWERCASE_GERMAN,
  743. #endif /* defined(__MMI_T9_GERMAN__) */ 
  744. #if defined(__MMI_T9_ITALIAN__)
  745.     INPUT_MODE_SMART_UPPERCASE_ITALIAN,
  746.     INPUT_MODE_SMART_LOWERCASE_ITALIAN,
  747. #endif /* defined(__MMI_T9_ITALIAN__) */ 
  748. #if defined(__MMI_T9_RUSSIAN__)
  749.     INPUT_MODE_SMART_UPPERCASE_RUSSIAN,
  750.     INPUT_MODE_SMART_LOWERCASE_RUSSIAN,
  751. #endif /* defined(__MMI_T9_RUSSIAN__) */ 
  752.     /* PMT BULGARIAN START 20051201 */
  753. #if defined(__MMI_T9_BULGARIAN__)
  754.     INPUT_MODE_SMART_UPPERCASE_BULGARIAN,
  755.     INPUT_MODE_SMART_LOWERCASE_BULGARIAN,
  756. #endif /* defined(__MMI_T9_BULGARIAN__) */ 
  757. #if defined(__MMI_T9_THAI__)
  758.     INPUT_MODE_SMART_THAI,
  759. #endif 
  760. #if defined(__MMI_T9_CZECH__)
  761.     INPUT_MODE_SMART_UPPERCASE_CZECH,
  762.     INPUT_MODE_SMART_LOWERCASE_CZECH,
  763. #endif /* defined(__MMI_T9_CZECH__) */ 
  764. #if defined(__MMI_T9_INDONESIAN__)
  765.     INPUT_MODE_SMART_UPPERCASE_INDONESIAN,
  766.     INPUT_MODE_SMART_LOWERCASE_INDONESIAN,
  767. #endif /* defined(__MMI_T9_INDONESIAN__) */ 
  768. #if defined(__MMI_T9_TURKISH__)
  769.     INPUT_MODE_SMART_UPPERCASE_TURKISH,
  770.     INPUT_MODE_SMART_LOWERCASE_TURKISH,
  771. #endif /* defined(__MMI_T9_TURKISH__) */ 
  772. #if defined(__MMI_T9_PORTUGUESE__)
  773.     INPUT_MODE_SMART_UPPERCASE_PORTUGUESE,
  774.     INPUT_MODE_SMART_LOWERCASE_PORTUGUESE,
  775. #endif /* defined(__MMI_T9_PORTUGUESE__) */ 
  776. #if defined(__MMI_T9_VIETNAMESE__)
  777.     INPUT_MODE_SMART_UPPERCASE_VIETNAMESE,
  778.     INPUT_MODE_SMART_LOWERCASE_VIETNAMESE,
  779. #endif /* defined(__MMI_T9_VIETNAMESE__) */ 
  780. #if defined(__MMI_T9_FINNISH__)
  781.     INPUT_MODE_SMART_UPPERCASE_FINNISH,
  782.     INPUT_MODE_SMART_LOWERCASE_FINNISH,
  783. #endif /* defined(__MMI_T9_FINNISH__) */ 
  784. #if defined(__MMI_T9_HUNGARIAN__)
  785.     INPUT_MODE_SMART_UPPERCASE_HUNGARIAN,
  786.     INPUT_MODE_SMART_LOWERCASE_HUNGARIAN,
  787. #endif /* defined(__MMI_T9_HUNGARIAN__) */ 
  788. #if defined(__MMI_T9_ARABIC__)
  789.     INPUT_MODE_SMART_ARABIC,
  790. #endif 
  791. #if defined(__MMI_T9_GREEK__)
  792.     INPUT_MODE_SMART_UPPERCASE_GREEK,
  793.     INPUT_MODE_SMART_LOWERCASE_GREEK,
  794. #endif /* defined(__MMI_T9_GREEK__) */ 
  795. #if defined(__MMI_T9_HEBREW__)
  796.     INPUT_MODE_SMART_HEBREW,
  797. #endif 
  798. #if defined(__MMI_T9_HINDI__)
  799.     INPUT_MODE_SMART_HINDI,
  800. #endif 
  801. #if defined(__MMI_T9_NORWEGIAN__)
  802.     INPUT_MODE_SMART_UPPERCASE_NORWEGIAN,
  803.     INPUT_MODE_SMART_LOWERCASE_NORWEGIAN,
  804. #endif /* defined(__MMI_T9_NORWEGIAN__) */ 
  805. #if defined(__MMI_T9_DUTCH__)
  806.     INPUT_MODE_SMART_UPPERCASE_DUTCH,
  807.     INPUT_MODE_SMART_LOWERCASE_DUTCH,
  808. #endif /* defined(__MMI_T9_DUTCH__) */ 
  809. #if defined(__MMI_T9_SLOVENIAN__)
  810.     INPUT_MODE_SMART_UPPERCASE_SLOVENIAN,
  811.     INPUT_MODE_SMART_LOWERCASE_SLOVENIAN,
  812. #endif /* defined(__MMI_T9_SLOVENIAN__) */ 
  813. #if defined(__MMI_T9_SWEDISH__)
  814.     INPUT_MODE_SMART_UPPERCASE_SWEDISH,
  815.     INPUT_MODE_SMART_LOWERCASE_SWEDISH,
  816. #endif /* defined(__MMI_T9_SWEDISH__) */ 
  817. #if defined(__MMI_T9_MALAY__)
  818.     INPUT_MODE_SMART_UPPERCASE_MALAY,
  819.     INPUT_MODE_SMART_LOWERCASE_MALAY,
  820. #endif /* defined(__MMI_T9_MALAY__) */ 
  821. #if defined(__MMI_T9_CROATIAN__)
  822.     INPUT_MODE_SMART_UPPERCASE_CROATIAN,
  823.     INPUT_MODE_SMART_LOWERCASE_CROATIAN,
  824. #endif /* defined(__MMI_T9_CROATIAN__) */ 
  825. #if defined(__MMI_T9_SLOVAK__)
  826.     INPUT_MODE_SMART_UPPERCASE_SLOVAK,
  827.     INPUT_MODE_SMART_LOWERCASE_SLOVAK,
  828. #endif /* defined(__MMI_T9_SLOVAK__) */ 
  829. #if defined(__MMI_T9_ROMANIAN__)
  830.     INPUT_MODE_SMART_UPPERCASE_ROMANIAN,
  831.     INPUT_MODE_SMART_LOWERCASE_ROMANIAN,
  832. #endif /* defined(__MMI_T9_ROMANIAN__) */ 
  833. #elif defined(__MMI_ZI__)
  834.     /* MTK Elvis multitap phonetic input mode */
  835. #if defined(__MMI_ZI_TR_CHINESE__) && defined(__MMI_ZI_MULTITAP_PHONETIC_INPUT__)
  836.     INPUT_MODE_TR_MULTITAP_BOPOMO,
  837. #endif 
  838. #if defined(__MMI_ZI_SM_CHINESE__) && defined(__MMI_ZI_MULTITAP_PHONETIC_INPUT__)
  839.     INPUT_MODE_SM_MULTITAP_PINYIN,
  840. #endif 
  841. #if defined(__MMI_ZI_TR_CHINESE__)
  842.     INPUT_MODE_TR_STROKE,
  843. #endif 
  844. #if defined(__MMI_ZI_SM_CHINESE__)
  845.     INPUT_MODE_SM_STROKE,
  846. #endif 
  847.     /* MTK end */
  848. #if defined(__MMI_ZI_TR_CHINESE__) && defined(__MMI_ZI_SMART_PHONETIC_INPUT__)
  849.     INPUT_MODE_TR_BOPOMO,
  850. #endif 
  851. #if defined(__MMI_ZI_SM_CHINESE__) && defined(__MMI_ZI_SMART_PHONETIC_INPUT__)
  852.     INPUT_MODE_SM_PINYIN,
  853. #endif 
  854. #if defined(__MMI_ZI_PRC_ENGLISH__) || defined(__MMI_ZI_UK_ENGLISH__)
  855.     INPUT_MODE_SMART_UPPERCASE_ABC,
  856.     INPUT_MODE_SMART_LOWERCASE_ABC,
  857. #endif /* defined(__MMI_ZI_PRC_ENGLISH__) || defined(__MMI_ZI_UK_ENGLISH__) */ 
  858.     /* MTK Elvis modify for stacked character---thai */
  859. #if defined(__MMI_ZI_THAI__)
  860.     INPUT_MODE_SMART_THAI,
  861. #endif 
  862.     /* MTK Elvis for R2L characters */
  863. #if defined(__MMI_ZI_ARABIC__)
  864.     INPUT_MODE_SMART_ARABIC,
  865. #endif 
  866. //PMT START PERSIAN
  867. #if defined(__MMI_ZI_PERSIAN__)
  868.     INPUT_MODE_SMART_PERSIAN,
  869. #endif
  870. //PMT END PERSIAN
  871. #if defined(__MMI_ZI_HINDI__)
  872.     INPUT_MODE_SMART_HINDI,
  873. #endif 
  874. #if defined(__MMI_ZI_HEBREW__)
  875.     INPUT_MODE_SMART_HEBREW,
  876. #endif 
  877.     //MTK end
  878. #if defined(__MMI_ZI_EU_SPANISH__) || defined(__MMI_ZI_SA_SPANISH__)
  879.     INPUT_MODE_SMART_UPPERCASE_SPANISH,
  880.     INPUT_MODE_SMART_LOWERCASE_SPANISH,
  881. #endif /* defined(__MMI_ZI_EU_SPANISH__) || defined(__MMI_ZI_SA_SPANISH__) */ 
  882. #if defined(__MMI_ZI_DANISH__)
  883.     INPUT_MODE_SMART_UPPERCASE_DANISH,
  884.     INPUT_MODE_SMART_LOWERCASE_DANISH,
  885. #endif /* defined(__MMI_ZI_DANISH__) */ 
  886. #if defined(__MMI_ZI_POLISH__)
  887.     INPUT_MODE_SMART_UPPERCASE_POLISH,
  888.     INPUT_MODE_SMART_LOWERCASE_POLISH,
  889. #endif /* defined(__MMI_ZI_POLISH__) */ 
  890. #if defined(__MMI_ZI_NORWEGIAN__)
  891.     INPUT_MODE_SMART_UPPERCASE_NORWEGIAN,
  892.     INPUT_MODE_SMART_LOWERCASE_NORWEGIAN,
  893. #endif /* defined(__MMI_ZI_NORWEGIAN__) */ 
  894. #if defined(__MMI_ZI_CA_FRENCH__) || defined(__MMI_ZI_EU_FRENCH__)
  895.     INPUT_MODE_SMART_UPPERCASE_FRENCH,
  896.     INPUT_MODE_SMART_LOWERCASE_FRENCH,
  897. #endif /* defined(__MMI_ZI_CA_FRENCH__) || defined(__MMI_ZI_EU_FRENCH__) */ 
  898. #if defined(__MMI_ZI_GERMAN__)
  899.     INPUT_MODE_SMART_UPPERCASE_GERMAN,
  900.     INPUT_MODE_SMART_LOWERCASE_GERMAN,
  901. #endif /* defined(__MMI_ZI_GERMAN__) */ 
  902. #if defined(__MMI_ZI_ITALIAN__)
  903.     INPUT_MODE_SMART_UPPERCASE_ITALIAN,
  904.     INPUT_MODE_SMART_LOWERCASE_ITALIAN,
  905. #endif /* defined(__MMI_ZI_ITALIAN__) */ 
  906. #if defined(__MMI_ZI_RUSSIAN__) || defined(__MMI_ZI_RECOMMENDED_SIZE_RUSSIAN__)
  907.     INPUT_MODE_SMART_UPPERCASE_RUSSIAN,
  908.     INPUT_MODE_SMART_LOWERCASE_RUSSIAN,
  909. #endif /* defined(__MMI_ZI_RUSSIAN__) || defined(__MMI_ZI_RECOMMENDED_SIZE_RUSSIAN__) */ 
  910. #if defined(__MMI_ZI_BULGARIAN__)
  911.     INPUT_MODE_SMART_UPPERCASE_BULGARIAN,
  912.     INPUT_MODE_SMART_LOWERCASE_BULGARIAN,
  913. #endif /* defined(__MMI_ZI_BULGARIAN__) */ 
  914. #if defined(__MMI_ZI_TURKISH__)
  915.     INPUT_MODE_SMART_UPPERCASE_TURKISH,
  916.     INPUT_MODE_SMART_LOWERCASE_TURKISH,
  917. #endif /* defined(__MMI_ZI_TURKISH__) */ 
  918. #if defined(__MMI_ZI_EU_PORTUGUESE__) || defined(__MMI_ZI_SA_PORTUGUESE__) || defined(__MMI_ZI_BZ_PORTUGUESE__)
  919.     INPUT_MODE_SMART_UPPERCASE_PORTUGUESE,
  920.     INPUT_MODE_SMART_LOWERCASE_PORTUGUESE,
  921. #endif /* defined(__MMI_ZI_EU_PORTUGUESE__) || defined(__MMI_ZI_SA_PORTUGUESE__) || defined(__MMI_ZI_BZ_PORTUGUESE__) */ 
  922. #if defined(__MMI_ZI_INDONESIAN__)
  923.     INPUT_MODE_SMART_UPPERCASE_INDONESIAN,
  924.     INPUT_MODE_SMART_LOWERCASE_INDONESIAN,
  925. #endif /* defined(__MMI_ZI_INDONESIAN__) */ 
  926. #if defined(__MMI_ZI_CZECH__)
  927.     INPUT_MODE_SMART_UPPERCASE_CZECH,
  928.     INPUT_MODE_SMART_LOWERCASE_CZECH,
  929. #endif /* defined(__MMI_ZI_CZECH__) */ 
  930. #if defined(__MMI_ZI_MALAY__)
  931.     INPUT_MODE_SMART_UPPERCASE_MALAY,
  932.     INPUT_MODE_SMART_LOWERCASE_MALAY,
  933. #endif /* defined(__MMI_ZI_MALAY__) */ 
  934. #if defined(__MMI_ZI_VIETNAMESE__)
  935.     INPUT_MODE_SMART_UPPERCASE_VIETNAMESE,
  936.     INPUT_MODE_SMART_LOWERCASE_VIETNAMESE,
  937. #endif /* defined(__MMI_ZI_VIETNAMESE__) */ 
  938. #if defined(__MMI_ZI_SLOVAK__)
  939.     INPUT_MODE_SMART_UPPERCASE_SLOVAK,
  940.     INPUT_MODE_SMART_LOWERCASE_SLOVAK,
  941. #endif /* defined(__MMI_ZI_SLOVAK__) */ 
  942. #if defined(__MMI_ZI_DUTCH__)
  943.     INPUT_MODE_SMART_UPPERCASE_DUTCH,
  944.     INPUT_MODE_SMART_LOWERCASE_DUTCH,
  945. #endif /* defined(__MMI_ZI_DUTCH__) */ 
  946. #if defined(__MMI_ZI_SWEDISH__)
  947.     INPUT_MODE_SMART_UPPERCASE_SWEDISH,
  948.     INPUT_MODE_SMART_LOWERCASE_SWEDISH,
  949. #endif /* defined(__MMI_ZI_SWEDISH__) */ 
  950. #if defined(__MMI_ZI_CROATIAN__)
  951.     INPUT_MODE_SMART_UPPERCASE_CROATIAN,
  952.     INPUT_MODE_SMART_LOWERCASE_CROATIAN,
  953. #endif /* defined(__MMI_ZI_CROATIAN__) */ 
  954. #if defined(__MMI_ZI_ROMANIAN__)
  955.     INPUT_MODE_SMART_UPPERCASE_ROMANIAN,
  956.     INPUT_MODE_SMART_LOWERCASE_ROMANIAN,
  957. #endif /* defined(__MMI_ZI_ROMANIAN__) */ 
  958. #if defined(__MMI_ZI_SLOVENIAN__)
  959.     INPUT_MODE_SMART_UPPERCASE_SLOVENIAN,
  960.     INPUT_MODE_SMART_LOWERCASE_SLOVENIAN,
  961. #endif /* defined(__MMI_ZI_SLOVENIAN__) */ 
  962. #if defined(__MMI_ZI_GREEK__)
  963.     INPUT_MODE_SMART_UPPERCASE_GREEK,
  964.     INPUT_MODE_SMART_LOWERCASE_GREEK,
  965. #endif /* defined(__MMI_ZI_GREEK__) */ 
  966. #if defined(__MMI_ZI_FINNISH__)
  967.     INPUT_MODE_SMART_UPPERCASE_FINNISH,
  968.     INPUT_MODE_SMART_LOWERCASE_FINNISH,
  969. #endif /* defined(__MMI_ZI_FINNISH__) */ 
  970. #if defined(__MMI_ZI_HUNGARIAN__)
  971.     INPUT_MODE_SMART_UPPERCASE_HUNGARIAN,
  972.     INPUT_MODE_SMART_LOWERCASE_HUNGARIAN,
  973. #endif /* defined(__MMI_ZI_HUNGARIAN__) */ 
  974. //KP Jerry add on 2007-3-8 start
  975. #elif defined(__MMI_CSTAR__)
  976. #if defined(__MMI_CSTAR_TR_CHINESE__)
  977. #if defined(__MMI_CSTAR_MULTITAP_PHONETIC_INPUT__)
  978.     INPUT_MODE_TR_MULTITAP_BOPOMO,
  979. #endif 
  980. #if defined(__MMI_CSTAR_SMART_PHONETIC_INPUT__)
  981.     INPUT_MODE_TR_BOPOMO,
  982. #endif 
  983.     INPUT_MODE_TR_STROKE,
  984. #endif 
  985. #if defined(__MMI_CSTAR_SM_CHINESE__)
  986. #if defined(__MMI_CSTAR_MULTITAP_PHONETIC_INPUT__)
  987.     INPUT_MODE_SM_MULTITAP_PINYIN,
  988. #endif 
  989. #if defined(__MMI_CSTAR_SMART_PHONETIC_INPUT__)
  990.     INPUT_MODE_SM_PINYIN,
  991. #endif 
  992.     INPUT_MODE_SM_STROKE,
  993. #endif 
  994. #if defined(__MMI_CSTAR_ENGLISH__)
  995.     INPUT_MODE_SMART_UPPERCASE_ABC,
  996.     INPUT_MODE_SMART_LOWERCASE_ABC,
  997. #endif
  998. #if defined(__MMI_CSTAR_THAI__)
  999.     INPUT_MODE_SMART_THAI,
  1000. #endif
  1001. #if defined(__MMI_CSTAR_SPANISH__)
  1002.     INPUT_MODE_SMART_UPPERCASE_SPANISH,
  1003.     INPUT_MODE_SMART_LOWERCASE_SPANISH,
  1004. #endif
  1005. #if defined(__MMI_CSTAR_HEBREW__)
  1006.     INPUT_MODE_SMART_HEBREW,
  1007. #endif
  1008. #if defined(__MMI_CSTAR_DANISH__)
  1009.     INPUT_MODE_SMART_UPPERCASE_DANISH,
  1010.     INPUT_MODE_SMART_LOWERCASE_DANISH,
  1011. #endif
  1012. #if defined(__MMI_CSTAR_POLISH__)
  1013.     INPUT_MODE_SMART_UPPERCASE_POLISH,
  1014.     INPUT_MODE_SMART_LOWERCASE_POLISH,
  1015. #endif
  1016. #if defined(__MMI_CSTAR_FRENCH__)
  1017.     INPUT_MODE_SMART_UPPERCASE_FRENCH,
  1018.     INPUT_MODE_SMART_LOWERCASE_FRENCH,
  1019. #endif
  1020. #if defined(__MMI_CSTAR_GERMAN__)
  1021.     INPUT_MODE_SMART_UPPERCASE_GERMAN,
  1022.     INPUT_MODE_SMART_LOWERCASE_GERMAN,
  1023. #endif
  1024. #if defined(__MMI_CSTAR_ITALIAN__)
  1025.     INPUT_MODE_SMART_UPPERCASE_ITALIAN,
  1026.     INPUT_MODE_SMART_LOWERCASE_ITALIAN,
  1027. #endif
  1028. #if defined(__MMI_CSTAR_VIETNAMESE__)
  1029.     INPUT_MODE_SMART_UPPERCASE_VIETNAMESE,
  1030.     INPUT_MODE_SMART_LOWERCASE_VIETNAMESE,
  1031. #endif 
  1032. #if defined(__MMI_CSTAR_INDONESIAN__)
  1033.     INPUT_MODE_SMART_UPPERCASE_INDONESIAN,
  1034.     INPUT_MODE_SMART_LOWERCASE_INDONESIAN,
  1035. #endif 
  1036. #if defined(__MMI_CSTAR_TURKISH__)
  1037.     INPUT_MODE_SMART_UPPERCASE_TURKISH,
  1038.     INPUT_MODE_SMART_LOWERCASE_TURKISH,
  1039. #endif 
  1040. #if defined(__MMI_CSTAR_CZECH__)
  1041.     INPUT_MODE_SMART_UPPERCASE_CZECH,
  1042.     INPUT_MODE_SMART_LOWERCASE_CZECH,
  1043. #endif 
  1044. #if defined(__MMI_CSTAR_RUSSIAN__)
  1045.     INPUT_MODE_SMART_UPPERCASE_RUSSIAN,
  1046.     INPUT_MODE_SMART_LOWERCASE_RUSSIAN,
  1047. #endif 
  1048. #if defined(__MMI_CSTAR_BULGARIAN__)
  1049.     INPUT_MODE_SMART_UPPERCASE_BULGARIAN,
  1050.     INPUT_MODE_SMART_LOWERCASE_BULGARIAN,
  1051. #endif 
  1052. #if defined(__MMI_CSTAR_PORTUGUESE__)
  1053.     INPUT_MODE_SMART_UPPERCASE_PORTUGUESE,
  1054.     INPUT_MODE_SMART_LOWERCASE_PORTUGUESE,
  1055. #endif 
  1056. #if defined(__MMI_CSTAR_FINNISH__)
  1057.     INPUT_MODE_SMART_UPPERCASE_FINNISH,
  1058.     INPUT_MODE_SMART_LOWERCASE_FINNISH,
  1059. #endif 
  1060. #if defined(__MMI_CSTAR_HUNGARIAN__)
  1061.     INPUT_MODE_SMART_UPPERCASE_HUNGARIAN,
  1062.     INPUT_MODE_SMART_LOWERCASE_HUNGARIAN,
  1063. #endif 
  1064. #if defined(__MMI_CSTAR_ARABIC__)
  1065.     INPUT_MODE_SMART_ARABIC,
  1066. #endif 
  1067. #if defined(__MMI_CSTAR_HINDI__)
  1068.     INPUT_MODE_SMART_HINDI,
  1069. #endif 
  1070. #if defined(__MMI_CSTAR_NORWEGIAN__)
  1071.     INPUT_MODE_SMART_UPPERCASE_NORWEGIAN,
  1072.     INPUT_MODE_SMART_LOWERCASE_NORWEGIAN,
  1073. #endif 
  1074. #if defined(__MMI_CSTAR_DUTCH__)
  1075.     INPUT_MODE_SMART_UPPERCASE_DUTCH,
  1076.     INPUT_MODE_SMART_LOWERCASE_DUTCH,
  1077. #endif 
  1078. #if defined(__MMI_CSTAR_SLOVENIAN__)
  1079.     INPUT_MODE_SMART_UPPERCASE_SLOVENIAN,
  1080.     INPUT_MODE_SMART_LOWERCASE_SLOVENIAN,
  1081. #endif 
  1082. #if defined(__MMI_CSTAR_SWEDISH__)
  1083.     INPUT_MODE_SMART_UPPERCASE_SWEDISH,
  1084.     INPUT_MODE_SMART_LOWERCASE_SWEDISH,
  1085. #endif 
  1086. #if defined(__MMI_CSTAR_GREEK__)
  1087.     INPUT_MODE_SMART_UPPERCASE_GREEK,
  1088.     INPUT_MODE_SMART_LOWERCASE_GREEK,
  1089. #endif 
  1090. #if defined(__MMI_CSTAR_MALAY__)
  1091.     INPUT_MODE_SMART_UPPERCASE_MALAY,
  1092.     INPUT_MODE_SMART_LOWERCASE_MALAY,
  1093. #endif 
  1094. #if defined(__MMI_CSTAR_CROATIAN__)
  1095.     INPUT_MODE_SMART_UPPERCASE_CROATIAN,
  1096.     INPUT_MODE_SMART_LOWERCASE_CROATIAN,
  1097. #endif 
  1098. #if defined(__MMI_CSTAR_SLOVAK__)
  1099.     INPUT_MODE_SMART_UPPERCASE_SLOVAK,
  1100.     INPUT_MODE_SMART_LOWERCASE_SLOVAK,
  1101. #endif 
  1102. #if defined(__MMI_CSTAR_ROMANIAN__)
  1103.     INPUT_MODE_SMART_UPPERCASE_ROMANIAN,
  1104.     INPUT_MODE_SMART_LOWERCASE_ROMANIAN,
  1105. #endif 
  1106. //KP Jerry add on 2007-3-8 end
  1107.     
  1108. #elif defined(__MMI_KA__)
  1109.     INPUT_MODE_SM_PINYIN,
  1110.     INPUT_MODE_SM_STROKE,
  1111. #elif defined(__MMI_ITAP__)
  1112. #if defined(__MMI_ITAP_TR_CHINESE__) && defined(__MMI_ITAP_MULTITAP_PHONETIC_INPUT__)
  1113. /* under construction !*/
  1114. #endif 
  1115. #if defined(__MMI_ITAP_SM_CHINESE__) && defined(__MMI_ITAP_MULTITAP_PHONETIC_INPUT__)
  1116. /* under construction !*/
  1117. #endif 
  1118. #if defined(__MMI_ITAP_TR_CHINESE__)
  1119. /* under construction !*/
  1120. #endif 
  1121. #if defined(__MMI_ITAP_SM_CHINESE__)
  1122. /* under construction !*/
  1123. #endif 
  1124. #if defined(__MMI_ITAP_TR_CHINESE__) && defined(__MMI_ITAP_SMART_PHONETIC_INPUT__)
  1125. /* under construction !*/
  1126. #endif 
  1127. #if defined(__MMI_ITAP_SM_CHINESE__) && defined(__MMI_ITAP_SMART_PHONETIC_INPUT__)
  1128. /* under construction !*/
  1129. #endif 
  1130. #if defined(__MMI_ITAP_ENGLISH__)
  1131. /* under construction !*/
  1132. /* under construction !*/
  1133. #endif /* defined(__MMI_ITAP_ENGLISH__) */ 
  1134. #endif 
  1135. #ifdef __MMI_MULTITAP_HINDI__
  1136.     INPUT_MODE_MULTITAP_HINDI,
  1137. #endif 
  1138.     /* PMT RAKESH START 20061006 */
  1139. #ifdef __MMI_MULTITAP_MARATHI__
  1140.     INPUT_MODE_MULTITAP_MARATHI,
  1141. #endif 
  1142.     /* PMT RAKESH END 20061006 */
  1143.     0xff,
  1144. };
  1145. //MTK end
  1146. // __CUSTPACK_MULTIBIN     Terry   END
  1147. #if defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__)
  1148. MMI_BOOL is_fisrt_entry_WCSS_editor = TRUE;
  1149. #endif 
  1150. /* MTK Elvis to store the zero key hander for idleScreenDigitHandler */
  1151. FuncPtr storeZeroKeyFuncPtrs[1][4];
  1152. extern FuncPtr currKeyFuncPtrs[MAX_KEYS][MAX_KEY_TYPE];
  1153. extern FuncPtr wgui_key_handlers[MAX_KEYS][MAX_KEY_TYPE];
  1154. /* MTK end */
  1155. /* W05.36 Fix Vietnamese Tone Input Issue */
  1156. extern void set_current_input_box_type(mmi_editor_inoutbox_enum input_box_type);
  1157. /* MTK Elvis for R2L characters */
  1158. extern BOOL r2lMMIFlag;
  1159. /* Ailsa for removing smart abc ABC from INPUT_TYPE_ALPHANUMERIC_PASSWORD */
  1160. MMI_BOOL mmi_is_alphanum_pass = MMI_FALSE;
  1161. #ifdef __MMI_BIDI_ALG__
  1162. extern U8 MMI_bidi_input_type;
  1163. #endif 
  1164. /* MTK end */
  1165. extern S32 MMI_title_height;
  1166. #ifdef __MMI_T9__
  1167. #include "t9definition.h"
  1168. #include "t9api.h"
  1169. extern void T9SetInputboxLSKFunction(FuncPtr f);
  1170. extern void InuptMethodEnterCategory5(void);
  1171. extern void InuptMethodExitCategory5(void);
  1172. extern void T9InputMethodExit(void);
  1173. #elif defined __MMI_ZI__
  1174. extern void ZiSetInputboxLSKFunction(FuncPtr f);
  1175. extern void ZiInuptMethodEnterSinglelineInputBox(void);
  1176. extern void ZiInuptMethodExitSinglelineInputBox(void);
  1177. extern void ZiInuptMethodEnterCategory5(void);
  1178. extern void ZiInuptMethodExitCategory5(void);
  1179. extern void ZiInputMethodExit(void);
  1180. extern void ZiInuptMethodEnterInline_Multiline_InputBox(void);
  1181. //KP Jerry add on 2007-3-8 start
  1182. #elif defined __MMI_CSTAR__
  1183. #include "cstarime.h"
  1184. //KP Jerry add on 2007-3-8 end
  1185. #elif defined __MMI_KA__
  1186. extern void KonKaSetInputboxLSKFunction(FuncPtr f);
  1187. extern void KonkaInuptMethodEnterSinglelineInputBox(void);
  1188. extern void KonkaInuptMethodExitSinglelineInputBox(void);
  1189. extern void KonkaInuptMethodEnterCategory5(void);
  1190. extern void KonkaInuptMethodExitCategory5(void);
  1191. extern void KonkaInputMethodExit(void);
  1192. #elif defined __MMI_ITAP__
  1193. /* under construction !*/
  1194. /* under construction !*/
  1195. /* under construction !*/
  1196. /* under construction !*/
  1197. /* under construction !*/
  1198. /* under construction !*/
  1199. /* under construction !*/
  1200. #endif 
  1201. extern U8 mmi_phb_convert_to_0x81(S8 *input_name, BOOL is_convert);
  1202. /* MTK end */
  1203. extern U8 MMI_current_input_mode;
  1204. extern void (*inputbox_change_mode) (void);
  1205. /* extern byte MMI_allow_only_english_input_modes; */
  1206. U8 MMI_allow_only_english_input_modes = 0;
  1207. U8(*test_change_input_mode) (void) = NULL;
  1208. /* Store the message of current multibox dispaly on sub lcd */
  1209. extern UI_string_type SUBLCD_MMI_message_string;
  1210. /** Store the address of icon display on content area of current sub lcd scrren */
  1211. extern PU8 SUBLCD_MMI_message_icon;
  1212. #if defined (__MMI_WALLPAPER_ON_BOTTOM__)
  1213. static MMI_ID_TYPE editor_scr_bg_ID;
  1214. static S8 *editor_scr_bg_filename;
  1215. static S32 editor_scr_bg_x, editor_scr_bg_y;
  1216. static U8 editor_scr_bg_opacity;    /* 070505 Calvin added */
  1217. #endif /* defined (__MMI_WALLPAPER_ON_BOTTOM__) */ 
  1218. void wgui_show_input_mode(U8 input_mode, PU8 inputbox_information_icon);
  1219. void wgui_input_information_background(S32 x1, S32 y1, S32 x2, S32 y2);
  1220. void wgui_inputbox_phone_number_input_complete_multitap_star_key(void);
  1221. void wgui_inputbox_phone_number_input_complete_multitap_zero_key(void);
  1222. MMI_BOOL mmi_ime_ui_screen_state_query(void);
  1223. /*****************************************************************************
  1224.  * FUNCTION
  1225.  *  wgui_is_r2l_display
  1226.  * DESCRIPTION
  1227.  *  query r2lMMIFlag
  1228.  *  Input Parameter      void
  1229.  * PARAMETERS
  1230.  *  void
  1231.  * RETURNS
  1232.  *  MMI_BOOL
  1233.  *****************************************************************************/
  1234. MMI_BOOL wgui_is_r2l_display(void)
  1235. {
  1236.     /*----------------------------------------------------------------*/
  1237.     /* Local Variables                                                */
  1238.     /*----------------------------------------------------------------*/
  1239.     /*----------------------------------------------------------------*/
  1240.     /* Code Body                                                      */
  1241.     /*----------------------------------------------------------------*/
  1242.     if (r2lMMIFlag)
  1243.     {
  1244.         return MMI_TRUE;
  1245.     }
  1246.     else
  1247.     {
  1248.         return MMI_FALSE;
  1249.     }
  1250. }
  1251. /* Validation callbacks for input boxes   */
  1252. /*----------------------------------------------------------------------------
  1253. Function:         wgui_inputbox_not_empty_callback
  1254. Description:      Function pointer store the address of function which is called when
  1255.                input box is not empty
  1256. Input Parameters: void
  1257. Output Parameters:   none
  1258. Returns:       none
  1259. ----------------------------------------------------------------------------*/
  1260. void (*wgui_inputbox_not_empty_callback) (void) = NULL;
  1261. /*----------------------------------------------------------------------------
  1262. Function:         wgui_inputbox_empty_callback
  1263. Description:      Function pointer store the address of function which is called when
  1264.                input box is empty
  1265. Input Parameters: void
  1266. Output Parameters:   none
  1267. Returns:       none
  1268. ----------------------------------------------------------------------------*/
  1269. void (*wgui_inputbox_empty_callback) (void) = NULL;
  1270. /*****************************************************************************
  1271.  * FUNCTION
  1272.  *  Register_pound_key_buffer_flush_test_function
  1273.  * DESCRIPTION
  1274.  *  
  1275.  * PARAMETERS
  1276.  *  FuncPtr     [IN]        
  1277.  * RETURNS
  1278.  *  void
  1279.  *****************************************************************************/
  1280. void (*wgui_inputbox_validation_callback) (U8 *text, U8 *cursor, S32 text_length) = NULL;
  1281. BOOL(*wgui_check_pound_key_buffer_flush) (void) = NULL;
  1282. void Register_pound_key_buffer_flush_test_function(BOOL(*FuncPtr) (void))
  1283. {
  1284.     /*----------------------------------------------------------------*/
  1285.     /* Local Variables                                                */
  1286.     /*----------------------------------------------------------------*/
  1287.     /*----------------------------------------------------------------*/
  1288.     /* Code Body                                                      */
  1289.     /*----------------------------------------------------------------*/
  1290.     wgui_check_pound_key_buffer_flush = FuncPtr;
  1291. }
  1292. /* Begin AP input mode set */
  1293. S16 english_only_input_mode[] = 
  1294. {
  1295.     INPUT_MODE_MULTITAP_UPPERCASE_ABC,
  1296.     INPUT_MODE_MULTITAP_LOWERCASE_ABC,
  1297.     INPUT_MODE_123,
  1298.     INPUT_MODE_SMART_UPPERCASE_ABC,
  1299.     INPUT_MODE_SMART_LOWERCASE_ABC,
  1300.     INPUT_MODE_MULTITAP_UPPERCASE_SPANISH,
  1301.     INPUT_MODE_MULTITAP_LOWERCASE_SPANISH,
  1302.     INPUT_MODE_MMI_LOWERCASE_SPANISH,
  1303.     INPUT_MODE_SMART_UPPERCASE_SPANISH,
  1304.     INPUT_MODE_SMART_LOWERCASE_SPANISH,
  1305.     INPUT_MODE_MULTITAP_UPPERCASE_DANISH,
  1306.     INPUT_MODE_MULTITAP_LOWERCASE_DANISH,
  1307.     INPUT_MODE_MMI_LOWERCASE_DANISH,
  1308.     INPUT_MODE_SMART_UPPERCASE_DANISH,
  1309.     INPUT_MODE_SMART_LOWERCASE_DANISH,
  1310.     INPUT_MODE_MULTITAP_UPPERCASE_POLISH,
  1311.     INPUT_MODE_MULTITAP_LOWERCASE_POLISH,
  1312.     INPUT_MODE_MMI_LOWERCASE_POLISH,
  1313.     INPUT_MODE_SMART_UPPERCASE_POLISH,
  1314.     INPUT_MODE_SMART_LOWERCASE_POLISH,
  1315.     INPUT_MODE_MULTITAP_UPPERCASE_FRENCH,
  1316.     INPUT_MODE_MULTITAP_LOWERCASE_FRENCH,
  1317.     INPUT_MODE_MMI_LOWERCASE_FRENCH,
  1318.     INPUT_MODE_SMART_UPPERCASE_FRENCH,
  1319.     INPUT_MODE_SMART_LOWERCASE_FRENCH,
  1320.     INPUT_MODE_MULTITAP_UPPERCASE_GERMAN,
  1321.     INPUT_MODE_MULTITAP_LOWERCASE_GERMAN,
  1322.     INPUT_MODE_MMI_LOWERCASE_GERMAN,
  1323.     INPUT_MODE_SMART_UPPERCASE_GERMAN,
  1324.     INPUT_MODE_SMART_LOWERCASE_GERMAN,
  1325.     INPUT_MODE_MULTITAP_UPPERCASE_ITALIAN,
  1326.     INPUT_MODE_MULTITAP_LOWERCASE_ITALIAN,
  1327.     INPUT_MODE_MMI_LOWERCASE_ITALIAN,
  1328.     INPUT_MODE_SMART_UPPERCASE_ITALIAN,
  1329.     INPUT_MODE_SMART_LOWERCASE_ITALIAN,
  1330.     INPUT_MODE_MULTITAP_UPPERCASE_PORTUGUESE,
  1331.     INPUT_MODE_MULTITAP_LOWERCASE_PORTUGUESE,
  1332.     INPUT_MODE_MMI_LOWERCASE_PORTUGUESE,
  1333.     INPUT_MODE_SMART_UPPERCASE_PORTUGUESE,
  1334.     INPUT_MODE_SMART_LOWERCASE_PORTUGUESE,
  1335.     INPUT_MODE_MULTITAP_UPPERCASE_INDONESIAN,
  1336.     INPUT_MODE_MULTITAP_LOWERCASE_INDONESIAN,
  1337.     INPUT_MODE_MMI_LOWERCASE_INDONESIAN,
  1338.     INPUT_MODE_SMART_UPPERCASE_INDONESIAN,
  1339.     INPUT_MODE_SMART_LOWERCASE_INDONESIAN,
  1340.     INPUT_MODE_MULTITAP_UPPERCASE_CZECH,
  1341.     INPUT_MODE_MULTITAP_LOWERCASE_CZECH,
  1342.     INPUT_MODE_MMI_LOWERCASE_CZECH,
  1343.     INPUT_MODE_SMART_UPPERCASE_CZECH,
  1344.     INPUT_MODE_SMART_LOWERCASE_CZECH,
  1345.     INPUT_MODE_MULTITAP_UPPERCASE_MALAY,
  1346.     INPUT_MODE_MULTITAP_LOWERCASE_MALAY,
  1347.     INPUT_MODE_MMI_LOWERCASE_MALAY,
  1348.     INPUT_MODE_SMART_UPPERCASE_MALAY,
  1349.     INPUT_MODE_SMART_LOWERCASE_MALAY,
  1350.     INPUT_MODE_MULTITAP_UPPERCASE_FINNISH,
  1351.     INPUT_MODE_MULTITAP_LOWERCASE_FINNISH,
  1352.     INPUT_MODE_MMI_LOWERCASE_FINNISH,
  1353.     INPUT_MODE_SMART_UPPERCASE_FINNISH,
  1354.     INPUT_MODE_SMART_LOWERCASE_FINNISH,
  1355.     INPUT_MODE_MULTITAP_UPPERCASE_HUNGARIAN,
  1356.     INPUT_MODE_MULTITAP_LOWERCASE_HUNGARIAN,
  1357.     INPUT_MODE_MMI_LOWERCASE_HUNGARIAN,
  1358.     INPUT_MODE_SMART_UPPERCASE_HUNGARIAN,
  1359.     INPUT_MODE_SMART_LOWERCASE_HUNGARIAN,
  1360.     INPUT_MODE_MULTITAP_UPPERCASE_SLOVAK,
  1361.     INPUT_MODE_MULTITAP_LOWERCASE_SLOVAK,
  1362.     INPUT_MODE_MMI_LOWERCASE_SLOVAK,
  1363.     INPUT_MODE_SMART_UPPERCASE_SLOVAK,
  1364.     INPUT_MODE_SMART_LOWERCASE_SLOVAK,
  1365.     INPUT_MODE_MULTITAP_UPPERCASE_DUTCH,
  1366.     INPUT_MODE_MULTITAP_LOWERCASE_DUTCH,
  1367.     INPUT_MODE_MMI_LOWERCASE_DUTCH,
  1368.     INPUT_MODE_SMART_UPPERCASE_DUTCH,
  1369.     INPUT_MODE_SMART_LOWERCASE_DUTCH,
  1370.     INPUT_MODE_MULTITAP_UPPERCASE_NORWEGIAN,
  1371.     INPUT_MODE_MULTITAP_LOWERCASE_NORWEGIAN,
  1372.     INPUT_MODE_MMI_LOWERCASE_NORWEGIAN,
  1373.     INPUT_MODE_SMART_UPPERCASE_NORWEGIAN,
  1374.     INPUT_MODE_SMART_LOWERCASE_NORWEGIAN,
  1375.     INPUT_MODE_MULTITAP_UPPERCASE_SWEDISH,
  1376.     INPUT_MODE_MULTITAP_LOWERCASE_SWEDISH,
  1377.     INPUT_MODE_MMI_LOWERCASE_SWEDISH,
  1378.     INPUT_MODE_SMART_UPPERCASE_SWEDISH,
  1379.     INPUT_MODE_SMART_LOWERCASE_SWEDISH,
  1380.     INPUT_MODE_MULTITAP_UPPERCASE_CROATIAN,
  1381.     INPUT_MODE_MULTITAP_LOWERCASE_CROATIAN,
  1382.     INPUT_MODE_MMI_LOWERCASE_CROATIAN,
  1383.     INPUT_MODE_SMART_UPPERCASE_CROATIAN,
  1384.     INPUT_MODE_SMART_LOWERCASE_CROATIAN,
  1385.     INPUT_MODE_MULTITAP_UPPERCASE_ROMANIAN,
  1386.     INPUT_MODE_MULTITAP_LOWERCASE_ROMANIAN,
  1387.     INPUT_MODE_MMI_LOWERCASE_ROMANIAN,
  1388.     INPUT_MODE_SMART_UPPERCASE_ROMANIAN,
  1389.     INPUT_MODE_SMART_LOWERCASE_ROMANIAN,
  1390.     INPUT_MODE_MULTITAP_UPPERCASE_SLOVENIAN,
  1391.     INPUT_MODE_MULTITAP_LOWERCASE_SLOVENIAN,
  1392.     INPUT_MODE_MMI_LOWERCASE_SLOVENIAN,
  1393.     INPUT_MODE_SMART_UPPERCASE_SLOVENIAN,
  1394.     INPUT_MODE_SMART_LOWERCASE_SLOVENIAN,
  1395.     -1
  1396. };
  1397. /*****************************************************************************
  1398.  * FUNCTION
  1399.  *  wgui_is_english_only_input_mode
  1400.  * DESCRIPTION
  1401.  *  test if this input mode is english only input mode
  1402.  * PARAMETERS
  1403.  *  input_mode      [IN]        
  1404.  * RETURNS
  1405.  *  MMI_BOOL MMI_TRUE --> english only input mode , MMI_FALSE --> else
  1406.  *****************************************************************************/
  1407. MMI_BOOL wgui_is_english_only_input_mode(S16 input_mode)
  1408. {
  1409.     /*----------------------------------------------------------------*/
  1410.     /* Local Variables                                                */
  1411.     /*----------------------------------------------------------------*/
  1412.     int i = 0;
  1413.     /*----------------------------------------------------------------*/
  1414.     /* Code Body                                                      */
  1415.     /*----------------------------------------------------------------*/
  1416.     while (english_only_input_mode[i] != (S16) - 1)
  1417.     {
  1418.         if (english_only_input_mode[i] == input_mode)
  1419.         {
  1420.             return MMI_TRUE;
  1421.         }
  1422.         i++;
  1423.     }
  1424.     return MMI_FALSE;
  1425. }
  1426. /*****************************************************************************
  1427.  * FUNCTION
  1428.  *  wgui_change_to_english_only_mode
  1429.  * DESCRIPTION
  1430.  *  Changes the current input mode to next english only input mode
  1431.  * PARAMETERS
  1432.  *  initial_mode        [IN]        Initial input mode
  1433.  * RETURNS
  1434.  *  void
  1435.  *****************************************************************************/
  1436. static void wgui_change_to_english_only_mode(int initial_mode)
  1437. {
  1438.     /*----------------------------------------------------------------*/
  1439.     /* Local Variables                                                */
  1440.     /*----------------------------------------------------------------*/
  1441.     int k = initial_mode;
  1442.     /*----------------------------------------------------------------*/
  1443.     /* Code Body                                                      */
  1444.     /*----------------------------------------------------------------*/
  1445.     while ((wgui_is_english_only_input_mode(MMI_AP_required_input_mode_set[k]) != MMI_TRUE))
  1446.     {
  1447.         k++;
  1448.     }
  1449.     MMI_current_input_mode = (U8) MMI_AP_required_input_mode_set[k];
  1450. }
  1451. /* Begin AP input mode set */
  1452. extern const sIMEModeDetails *gIMEModeArray;
  1453. /*****************************************************************************
  1454.  * FUNCTION
  1455.  *  wgui_ap_inputset_set_current_or_find_next_loaded_input_mode
  1456.  * DESCRIPTION
  1457.  *  
  1458.  * PARAMETERS
  1459.  *  current_index       [IN]        
  1460.  * RETURNS
  1461.  *  
  1462.  *****************************************************************************/
  1463. S32 wgui_ap_inputset_set_current_or_find_next_loaded_input_mode(S32 current_index)
  1464. {
  1465.     /*----------------------------------------------------------------*/
  1466.     /* Local Variables                                                */
  1467.     /*----------------------------------------------------------------*/
  1468.     S32 i = 0, j = 0;;
  1469.     /*----------------------------------------------------------------*/
  1470.     /* Code Body                                                      */
  1471.     /*----------------------------------------------------------------*/
  1472.     i = current_index;
  1473.     while (1)
  1474.     {
  1475.         if (MMI_AP_required_input_mode_set[i] == gIMEModeArray[j].IME_Mode_ID)
  1476.         {
  1477.             return i;
  1478.         }
  1479.         else
  1480.         {
  1481.             j++;
  1482.             if (j > INPUT_MODE_MAX_NUM + 1)
  1483.             {
  1484.                 if (MMI_AP_required_input_mode_set[i + 1] == -1)
  1485.                 {
  1486.                     i = 0;
  1487.                 }
  1488.                 else
  1489.                 {
  1490.                     i++;
  1491.                 }
  1492.                 j = 0;
  1493.             }
  1494.         }
  1495.     }
  1496. }
  1497. /*****************************************************************************
  1498.  * FUNCTION
  1499.  *  change_input_mode
  1500.  * DESCRIPTION
  1501.  *  Changes the current input mode (cyclic "ABC"->"abc"->"123"->"ABC")
  1502.  * PARAMETERS
  1503.  *  void
  1504.  * RETURNS
  1505.  *  void
  1506.  *****************************************************************************/
  1507. //PMT START PERSIAN
  1508. #if defined __MMI_LANG_HINDI__ && (defined __MMI_LANG_ARABIC__ || defined __MMI_LANG_PERSIAN__)
  1509. //PMT END PERSIAN
  1510. extern S32 HINDI_PRESENT;
  1511. extern S32 ARABIC_PRESENT;
  1512. #endif /* defined __MMI_LANG_HINDI__ && (defined __MMI_LANG_ARABIC__ || defined __MMI_LANG_PERSIAN__) */ 
  1513. void change_input_mode(void)
  1514. {
  1515.     /*----------------------------------------------------------------*/
  1516.     /* Local Variables                                                */
  1517.     /*----------------------------------------------------------------*/
  1518.     U8 i;
  1519.     U8 input_method_exit_flag = FALSE;
  1520.     /*----------------------------------------------------------------*/
  1521.     /* Code Body                                                      */
  1522.     /*----------------------------------------------------------------*/
  1523.     /* Begin AP input mode set */
  1524.     if (MMI_AP_set_input_mode_set)
  1525.     {
  1526.         i = 0;
  1527.         while (MMI_AP_required_input_mode_set[i] != MMI_current_input_mode && MMI_AP_required_input_mode_set[i] != -1)
  1528.         {
  1529.             i++;
  1530.         }
  1531.     #if defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__)
  1532.         do
  1533.         {
  1534.             if (MMI_AP_required_input_mode_set[i] == -1 ||  /* cannot be found */
  1535.                 MMI_AP_required_input_mode_set[i + 1] == -1)    /* cyclic to the first one */
  1536.             {
  1537.                 i = 0;
  1538.                 if (test_change_input_mode() == 0)
  1539.                 {
  1540.                     wgui_change_to_english_only_mode(i);
  1541.                 }
  1542.                 else
  1543.                 {
  1544.                     MMI_current_input_mode =
  1545.                         (U8)
  1546.                         MMI_AP_required_input_mode_set[wgui_ap_inputset_set_current_or_find_next_loaded_input_mode(0)];
  1547.                 }
  1548.                 input_method_exit_flag = TRUE;
  1549.             }
  1550.             else
  1551.             {
  1552.             #if defined (__MMI_LANG_HINDI__ ) && ( defined (__MMI_LANG_ARABIC__) || defined (__MMI_LANG_PERSIAN))
  1553.                 if ((HINDI_PRESENT) && (MMI_AP_required_input_mode_set[i + 1] == INPUT_MODE_SMART_ARABIC) || MMI_AP_required_input_mode_set[i + 1] == INPUT_MODE_SMART_PERSIAN))
  1554.                 {
  1555.                     if (test_change_input_mode() == 0)
  1556.                     {
  1557.                         wgui_change_to_english_only_mode(i + 2);
  1558.                     }
  1559.                     else
  1560.                     {
  1561.                         MMI_current_input_mode =
  1562.                             (U8)
  1563.                             MMI_AP_required_input_mode_set[wgui_ap_inputset_set_current_or_find_next_loaded_input_mode
  1564.                                                            (i + 2)];
  1565.                     }
  1566.                 }
  1567.                 else if ((ARABIC_PRESENT) && (MMI_AP_required_input_mode_set[i + 1] == INPUT_MODE_MULTITAP_HINDI))
  1568.                 {
  1569.                     if (test_change_input_mode() == 0)
  1570.                     {
  1571.                         wgui_change_to_english_only_mode(i + 2);
  1572.                     }
  1573.                     else
  1574.                     {
  1575.                         MMI_current_input_mode =
  1576.                             (U8)
  1577.                             MMI_AP_required_input_mode_set[wgui_ap_inputset_set_current_or_find_next_loaded_input_mode
  1578.                                                            (i + 2)];
  1579.                     }
  1580.                 }
  1581.                 else
  1582.             #endif /* defined (__MMI_LANG_HINDI__ ) && ( defined (__MMI_LANG_ARABIC__) || defined (__MMI_LANG_PERSIAN)) */ 
  1583.                 {
  1584.                     if (test_change_input_mode() == 0)
  1585.                     {
  1586.                         wgui_change_to_english_only_mode(i + 1);
  1587.                     }
  1588.                     else
  1589.                     {
  1590.                         MMI_current_input_mode =
  1591.                             (U8)
  1592.                             MMI_AP_required_input_mode_set[wgui_ap_inputset_set_current_or_find_next_loaded_input_mode
  1593.                                                            (i + 1)];
  1594.                     }
  1595.                 }
  1596.             }
  1597.             i++;
  1598.         }
  1599.         while (MMI_current_input_mode == INPUT_MODE_MULTITAP_UPPERCASE_ABC_NO_NUMERIC ||
  1600.                MMI_current_input_mode == INPUT_MODE_MULTITAP_LOWERCASE_ABC_NO_NUMERIC ||
  1601.                MMI_current_input_mode == INPUT_MODE_123_SYMBOLS);
  1602.     #else /* defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__) */ // #if defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__)
  1603.         if (MMI_AP_required_input_mode_set[i] == -1 ||      /* cannot be found */
  1604.             MMI_AP_required_input_mode_set[i + 1] == -1)    /* cyclic to the first one */
  1605.         {
  1606.             i = 0;
  1607.             if (test_change_input_mode() == 0)
  1608.             {
  1609.                 wgui_change_to_english_only_mode(i);
  1610.             }
  1611.             else
  1612.             {
  1613.                 MMI_current_input_mode =
  1614.                     (U8) MMI_AP_required_input_mode_set[wgui_ap_inputset_set_current_or_find_next_loaded_input_mode(0)];
  1615.             }
  1616.             input_method_exit_flag = TRUE;
  1617.         }
  1618.         else    /* next one */
  1619.         {
  1620.         #if defined (__MMI_LANG_HINDI__ ) && ( defined (__MMI_LANG_ARABIC__) || defined (__MMI_LANG_PERSIAN))
  1621.             if ((HINDI_PRESENT) && (MMI_AP_required_input_mode_set[i + 1] == INPUT_MODE_SMART_ARABIC || MMI_AP_required_input_mode_set[i + 1] == INPUT_MODE_SMART_PERSIAN))
  1622.             {
  1623.                 if (test_change_input_mode() == 0)
  1624.                 {
  1625.                     wgui_change_to_english_only_mode(i + 2);
  1626.                 }
  1627.                 else
  1628.                 {
  1629.                     MMI_current_input_mode =
  1630.                         (U8)
  1631.                         MMI_AP_required_input_mode_set[wgui_ap_inputset_set_current_or_find_next_loaded_input_mode
  1632.                                                        (i + 2)];
  1633.                 }
  1634.             }
  1635.             else if ((ARABIC_PRESENT) && (MMI_AP_required_input_mode_set[i + 1] == INPUT_MODE_MULTITAP_HINDI))
  1636.             {
  1637.                 if (test_change_input_mode() == 0)
  1638.                 {
  1639.                     wgui_change_to_english_only_mode(i + 2);
  1640.                 }
  1641.                 else
  1642.                 {
  1643.                     MMI_current_input_mode =
  1644.                         (U8)
  1645.                         MMI_AP_required_input_mode_set[wgui_ap_inputset_set_current_or_find_next_loaded_input_mode
  1646.                                                        (i + 2)];
  1647.                 }
  1648.             }
  1649.             else
  1650.         #endif /* defined (__MMI_LANG_HINDI__ ) && ( defined (__MMI_LANG_ARABIC__) || defined (__MMI_LANG_PERSIAN)) */ 
  1651.             {
  1652.                 if (test_change_input_mode() == 0)
  1653.                 {
  1654.                     wgui_change_to_english_only_mode(i + 1);
  1655.                 }
  1656.                 else
  1657.                 {
  1658.                     MMI_current_input_mode =
  1659.                         (U8)
  1660.                         MMI_AP_required_input_mode_set[wgui_ap_inputset_set_current_or_find_next_loaded_input_mode
  1661.                                                        (i + 1)];
  1662.                 }
  1663.             }
  1664.         }
  1665.     #endif /* defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__) */ 
  1666.     }
  1667.     else    /* else of if(MMI_AP_set_input_mode_set) */
  1668.     {
  1669.         /* End AP input mode set */
  1670.         if (MMI_allow_only_english_input_modes)
  1671.         {
  1672.             i = 0;
  1673.             while (MMI_english_input_mode_set[i] != MMI_current_input_mode && MMI_english_input_mode_set[i] != 0xff)
  1674.             {
  1675.                 i++;
  1676.             }
  1677.         #if defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__)
  1678.             do
  1679.             {
  1680.                 if (MMI_english_input_mode_set[i] == 0xff)  /* cannot be found */
  1681.                 {
  1682.                     i = 0;
  1683.                     MMI_current_input_mode = MMI_english_input_mode_set[0];     /* set to first one */
  1684.                 }
  1685.                 else if (MMI_english_input_mode_set[i + 1] == 0xff)
  1686.                 {
  1687.                     i = 0;
  1688.                     MMI_current_input_mode = MMI_english_input_mode_set[0];     /* cyclic to the first one */
  1689.                 #ifndef __MMI_KA__      /* because KA doesnot support smart English input modes */
  1690.                     input_method_exit_flag = TRUE;
  1691.                 #endif 
  1692.                 }
  1693.                 else
  1694.                 {
  1695.                     MMI_current_input_mode = MMI_english_input_mode_set[i + 1]; /* set to next one */
  1696.                 }
  1697.                 i++;
  1698.             } while (MMI_current_input_mode == INPUT_MODE_MULTITAP_UPPERCASE_ABC_NO_NUMERIC ||
  1699.                      MMI_current_input_mode == INPUT_MODE_MULTITAP_LOWERCASE_ABC_NO_NUMERIC ||
  1700.                      MMI_current_input_mode == INPUT_MODE_123_SYMBOLS);
  1701.         #else /* defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__) */ 
  1702.             if (MMI_english_input_mode_set[i] == 0xff)  /* cannot be found */
  1703.             {
  1704.                 MMI_current_input_mode = MMI_english_input_mode_set[0];
  1705.             }
  1706.             else if (MMI_english_input_mode_set[i + 1] == 0xff) /* cyclic to the first one */
  1707.             {
  1708.                 MMI_current_input_mode = MMI_english_input_mode_set[0];
  1709.             #ifndef __MMI_KA__      /* because KA doesnot support smart English input modes */
  1710.                 input_method_exit_flag = TRUE;
  1711.             #endif 
  1712.             }
  1713.             else
  1714.             {
  1715.                 MMI_current_input_mode = MMI_english_input_mode_set[i + 1];     /* set to next one */
  1716.             }
  1717.         #endif /* defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__) */ 
  1718.         }
  1719.         else    /* else of if(MMI_allow_only_english_input_modes) */
  1720.         {
  1721.             if (test_change_input_mode() == 1)
  1722.             {
  1723.                 i = 0;
  1724.                 while (MMI_all_input_mode_set[i] != MMI_current_input_mode && MMI_all_input_mode_set[i] != 0xff)
  1725.                 {
  1726.                     i++;
  1727.                 }
  1728.             #if defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__)
  1729.                 do
  1730.                 {
  1731.                     if (MMI_all_input_mode_set[i] == 0xff)  /* cannot be found */
  1732.                     {
  1733.                         i = 0;
  1734.                         MMI_current_input_mode = MMI_all_input_mode_set[0];
  1735.                         input_method_exit_flag = TRUE;
  1736.                     }
  1737.                     if (MMI_all_input_mode_set[i + 1] == 0xff)  /* cyclic to the first one */
  1738.                     {
  1739.                         i = 0;
  1740.                         MMI_current_input_mode = MMI_all_input_mode_set[0];
  1741.                         input_method_exit_flag = TRUE;
  1742.                     }
  1743.                     else
  1744.                     {
  1745.                     #if defined (__MMI_LANG_HINDI__ ) && (defined __MMI_LANG_ARABIC__ || defined __MMI_LANG_PERSIAN__)
  1746.                         if ((HINDI_PRESENT) &&
  1747.                             ((MMI_all_input_mode_set[i + 1] == INPUT_MODE_SMART_ARABIC) ||
  1748.                              (MMI_all_input_mode_set[i + 1] == INPUT_MODE_MULTITAP_ARABIC) ||
  1749.                              (MMI_all_input_mode_set[i + 1] == INPUT_MODE_SMART_PERSIAN) ||
  1750.                              (MMI_all_input_mode_set[i + 1] == INPUT_MODE_MULTITAP_PERSIAN) ||
  1751.                              (MMI_all_input_mode_set[i + 1] == 0xff)))
  1752.                         {
  1753.                             MMI_current_input_mode = MMI_all_input_mode_set[i + 2];
  1754.                         }
  1755.                         else if ((ARABIC_PRESENT) &&
  1756.                                  ((MMI_all_input_mode_set[i + 1] == INPUT_MODE_MULTITAP_HINDI) ||
  1757.                                   MMI_all_input_mode_set[i + 1] == INPUT_MODE_SMART_HINDI))
  1758.                         {
  1759.                             MMI_current_input_mode = MMI_all_input_mode_set[i + 2];
  1760.                             if (MMI_current_input_mode == 0xff) /* cyclic to the first one */
  1761.                             {
  1762.                                 MMI_current_input_mode = MMI_all_input_mode_set[0];
  1763.                                 input_method_exit_flag = TRUE;
  1764.                             }
  1765.                         }
  1766.                         else
  1767.                     #endif /* defined (__MMI_LANG_HINDI__ ) && defined (__MMI_LANG_ARABIC__) */ 
  1768.                             MMI_current_input_mode = MMI_all_input_mode_set[i + 1];
  1769.                     }
  1770.                     i++;
  1771.                 } while (MMI_current_input_mode == INPUT_MODE_MULTITAP_UPPERCASE_ABC_NO_NUMERIC ||
  1772.                          MMI_current_input_mode == INPUT_MODE_MULTITAP_LOWERCASE_ABC_NO_NUMERIC ||
  1773.                          MMI_current_input_mode == INPUT_MODE_123_SYMBOLS);
  1774.             #else /* defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__) */ 
  1775.                 if (MMI_all_input_mode_set[i] == 0xff)  /* cannot be found */
  1776.                 {
  1777.                     MMI_current_input_mode = MMI_all_input_mode_set[0];
  1778.                 }
  1779.                 else if (MMI_all_input_mode_set[i + 1] == 0xff) /* cyclic to the first one */
  1780.                 {
  1781.                     MMI_current_input_mode = MMI_all_input_mode_set[0];
  1782.                     input_method_exit_flag = TRUE;
  1783.                 }
  1784.                 else
  1785.                 {
  1786.                 #if defined (__MMI_LANG_HINDI__ )&& (defined __MMI_LANG_ARABIC__ || defined __MMI_LANG_PERSIAN__)
  1787.                     if ((HINDI_PRESENT) &&
  1788.                         ((MMI_all_input_mode_set[i + 1] == INPUT_MODE_SMART_ARABIC) ||
  1789.                          (MMI_all_input_mode_set[i + 1] == INPUT_MODE_MULTITAP_ARABIC) ||
  1790.                          (MMI_all_input_mode_set[i + 1] == INPUT_MODE_SMART_PERSIAN) ||
  1791.                          (MMI_all_input_mode_set[i + 1] == INPUT_MODE_MULTITAP_PERSIAN) ||
  1792.                          (MMI_all_input_mode_set[i + 1] == 0xff)))
  1793.                     {
  1794.                         MMI_current_input_mode = MMI_all_input_mode_set[i + 2];
  1795.                     }
  1796.                     else if ((ARABIC_PRESENT) &&
  1797.                              ((MMI_all_input_mode_set[i + 1] == INPUT_MODE_MULTITAP_HINDI) ||
  1798.                               MMI_all_input_mode_set[i + 1] == INPUT_MODE_SMART_HINDI))
  1799.                     {
  1800.                         MMI_current_input_mode = MMI_all_input_mode_set[i + 2];
  1801.                         if (MMI_current_input_mode == 0xff) /* cyclic to the first one */
  1802.                         {
  1803.                             MMI_current_input_mode = MMI_all_input_mode_set[0];
  1804.                             input_method_exit_flag = TRUE;
  1805.                         }
  1806.                     }
  1807.                     else
  1808.                 #endif /* defined (__MMI_LANG_HINDI__ )&& (defined __MMI_LANG_ARABIC__ || defined __MMI_LANG_PERSIAN__) */ 
  1809.                         MMI_current_input_mode = MMI_all_input_mode_set[i + 1];
  1810.                 }
  1811.             #endif /* defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__) */ 
  1812.             }
  1813.             else
  1814.             {
  1815.                 i = 0;
  1816.                 while (MMI_english_input_mode_set[i] != MMI_current_input_mode && MMI_english_input_mode_set[i] != 0xff)
  1817.                 {
  1818.                     i++;
  1819.                 }
  1820.             #if defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__)
  1821.                 do
  1822.                 {
  1823.                     if (MMI_english_input_mode_set[i] == 0xff)  /* cannot be found */
  1824.                     {
  1825.                         i = 0;
  1826.                         MMI_current_input_mode = MMI_english_input_mode_set[0];
  1827.                         input_method_exit_flag = TRUE;
  1828.                     }
  1829.                     if (MMI_english_input_mode_set[i + 1] == 0xff)
  1830.                     {
  1831.                         i = 0;
  1832.                         MMI_current_input_mode = MMI_english_input_mode_set[0];
  1833.                     #ifndef __MMI_KA__      /* because KA doesnot support smart English input modes */
  1834.                         input_method_exit_flag = TRUE;
  1835.                     #endif 
  1836.                     }
  1837.                     else
  1838.                     {
  1839.                     #if defined (__MMI_LANG_HINDI__ ) && ( defined (__MMI_LANG_ARABIC__) || defined (__MMI_LANG_PERSIAN__) )
  1840.                         if ((HINDI_PRESENT) &&
  1841.                             ((MMI_english_input_mode_set[i + 1] == INPUT_MODE_SMART_ARABIC) ||
  1842.                              (MMI_english_input_mode_set[i + 1] == INPUT_MODE_MULTITAP_ARABIC) ||
  1843.                              (MMI_all_input_mode_set[i + 1] == INPUT_MODE_SMART_PERSIAN) ||
  1844.                              (MMI_all_input_mode_set[i + 1] == INPUT_MODE_MULTITAP_PERSIAN) ||
  1845.                              (MMI_all_input_mode_set[i + 1] == 0xff)))
  1846.                         {
  1847.                             MMI_current_input_mode = MMI_english_input_mode_set[i + 2];
  1848.                         }
  1849.                         else if ((ARABIC_PRESENT) &&
  1850.                                  ((MMI_english_input_mode_set[i + 1] == INPUT_MODE_MULTITAP_HINDI) ||
  1851.                                   MMI_english_input_mode_set[i + 1] == INPUT_MODE_SMART_HINDI))
  1852.                         {
  1853.                             MMI_current_input_mode = MMI_english_input_mode_set[i + 2];
  1854.                             if (MMI_current_input_mode == 0xff) /* cyclic to the first one */
  1855.                             {
  1856.                                 MMI_current_input_mode = MMI_english_input_mode_set[0];
  1857.                                 input_method_exit_flag = TRUE;
  1858.                             }
  1859.                         }
  1860.                         else
  1861.                     #endif /* defined (__MMI_LANG_HINDI__ ) && ( defined (__MMI_LANG_ARABIC__) || defined (__MMI_LANG_PERSIAN__) ) */ 
  1862.                             MMI_current_input_mode = MMI_english_input_mode_set[i + 1];
  1863.                     }
  1864.                     i++;
  1865.                 } while (MMI_current_input_mode == INPUT_MODE_MULTITAP_UPPERCASE_ABC_NO_NUMERIC ||
  1866.                          MMI_current_input_mode == INPUT_MODE_MULTITAP_LOWERCASE_ABC_NO_NUMERIC ||
  1867.                          MMI_current_input_mode == INPUT_MODE_123_SYMBOLS);
  1868.             #else /* defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__) */ 
  1869.                 if (MMI_english_input_mode_set[i] == 0xff)  /* cannot be found */
  1870.                 {
  1871.                     MMI_current_input_mode = MMI_english_input_mode_set[0];
  1872.                     input_method_exit_flag = TRUE;
  1873.                 }
  1874.                 else if (MMI_english_input_mode_set[i + 1] == 0xff)     /* cyclic to the first one */
  1875.                 {
  1876.                     MMI_current_input_mode = MMI_english_input_mode_set[0];
  1877.                 #ifndef __MMI_KA__      /* because KA doesnot support smart English input modes */
  1878.                     input_method_exit_flag = TRUE;
  1879.                 #endif 
  1880.                 }
  1881.                 else
  1882.                 {
  1883.                 #if defined (__MMI_LANG_HINDI__ ) && ( defined (__MMI_LANG_ARABIC__) || defined (__MMI_LANG_PERSIAN__) )
  1884.                     if ((HINDI_PRESENT) &&
  1885.                         ((MMI_english_input_mode_set[i + 1] == INPUT_MODE_SMART_ARABIC) ||
  1886.                          (MMI_english_input_mode_set[i + 1] == INPUT_MODE_MULTITAP_ARABIC) ||
  1887.                          (MMI_english_input_mode_set[i + 1] == INPUT_MODE_SMART_PERSIAN) ||
  1888.                          (MMI_english_input_mode_set[i + 1] == INPUT_MODE_MULTITAP_PERSIAN) ||
  1889.                          (MMI_all_input_mode_set[i + 1] == 0xff)))
  1890.                     {
  1891.                         MMI_current_input_mode = MMI_english_input_mode_set[i + 2];
  1892.                     }
  1893.                     else if ((ARABIC_PRESENT) &&
  1894.                              ((MMI_english_input_mode_set[i + 1] == INPUT_MODE_MULTITAP_HINDI) ||
  1895.                               MMI_english_input_mode_set[i + 1] == INPUT_MODE_SMART_HINDI))
  1896.                     {
  1897.                         MMI_current_input_mode = MMI_english_input_mode_set[i + 2];
  1898.                         if (MMI_current_input_mode == 0xff) /* cyclic to the first one */
  1899.                         {
  1900.                             MMI_current_input_mode = MMI_english_input_mode_set[0];
  1901.                             input_method_exit_flag = TRUE;
  1902.                         }
  1903.                     }
  1904.                     else
  1905.                 #endif /* defined (__MMI_LANG_HINDI__ ) && ( defined (__MMI_LANG_ARABIC__) || defined (__MMI_LANG_PERSIAN__) )*/ 
  1906.                         MMI_current_input_mode = MMI_english_input_mode_set[i + 1];
  1907.                 }
  1908.             #endif /* defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__) */ 
  1909.             }
  1910.         }
  1911.         /* Begin AP input mode set */
  1912.         //Ailsa for removing smart abc, ABC from INPUT_TYPE_ALPHANUMERIC_PASSWORD
  1913.         while (mmi_is_alphanum_pass &&
  1914.                ((MMI_current_input_mode == INPUT_MODE_SMART_UPPERCASE_ABC) || 
  1915.                 (MMI_current_input_mode == INPUT_MODE_SMART_LOWERCASE_ABC)))
  1916.         {
  1917.             if(MMI_allow_only_english_input_modes)
  1918.             {
  1919.                 if (MMI_english_input_mode_set[i+1] == 0xff) /* cyclic to the first one */
  1920.                 {
  1921.                     i = 0;
  1922.                     MMI_current_input_mode = MMI_english_input_mode_set[i];
  1923.                 }
  1924.                 else
  1925.                 {
  1926.                     i++;
  1927.                     MMI_current_input_mode = MMI_english_input_mode_set[i];
  1928.                 }
  1929.             }
  1930.             else
  1931.             {
  1932.                 if (MMI_all_input_mode_set[i+1] == 0xff) /* cyclic to the first one */
  1933.                 {
  1934.                     i = 0;
  1935.                     MMI_current_input_mode = MMI_all_input_mode_set[i];
  1936.                 }
  1937.                 else
  1938.                 {
  1939.                     i++;
  1940.                     MMI_current_input_mode = MMI_all_input_mode_set[i];
  1941.                 }
  1942.             }
  1943.         }
  1944.     }
  1945.     /* End AP input mode set */
  1946.     /* W06.10 Fix RSK Display Issue */
  1947. #if !defined(__MMI_TOUCH_SCREEN__)
  1948.     /* PMT MARATHI PATCH START by Ailsa */
  1949. #if defined(__MMI_MULTITAP_HINDI__) || defined(__MMI_MULTITAP_MARATHI__) || defined(__MMI_MULTITAP_PERSIAN__)
  1950.     /* PMT START MAUI_00223197 */
  1951.     if (MMI_current_input_mode == INPUT_MODE_MULTITAP_HINDI || MMI_current_input_mode == INPUT_MODE_MULTITAP_MARATHI || MMI_current_input_mode == INPUT_MODE_MULTITAP_PERSIAN || input_method_exit_flag == TRUE)
  1952.         /* PMT END MAUI_00223197 */
  1953.     /* PMT MARATHI PATCH END by Ailsa */
  1954.     {
  1955. #else /* defined(__MMI_MULTITAP_HINDI__) */ 
  1956.     if (MMI_current_input_mode == INPUT_MODE_MULTITAP_UPPERCASE_ABC && input_method_exit_flag == TRUE)
  1957.     {
  1958. #endif /* defined(__MMI_MULTITAP_HINDI__) */ 
  1959.     #ifdef __MMI_T9__
  1960.         T9InputMethodExit();
  1961.     #elif defined(__MMI_ZI__)
  1962.         ZiInputMethodExit();
  1963. //KP Jerry add on 2007-3-8 start
  1964.     #elif defined(__MMI_CSTAR__)
  1965.         CstarInputMethodExit();
  1966. //KP Jerry add on 2007-3-8 end
  1967.     #elif defined(__MMI_KA__)
  1968.         KonkaInputMethodExit();
  1969.     #elif defined(__MMI_ITAP__)
  1970. /* under construction !*/
  1971.     #endif 
  1972.     }
  1973. #endif /* !defined(__MMI_TOUCH_SCREEN__) */ 
  1974.     /* W06.10 Fix E-Dict Null Pointer Function Issue */
  1975.     if (wgui_check_pound_key_buffer_flush)
  1976.     {
  1977.         if (wgui_check_pound_key_buffer_flush())
  1978.         {
  1979.             multiline_inputbox_delete_all_characters();
  1980.         }
  1981.     }
  1982.     inputbox_change_mode();
  1983.     set_MMI_current_input_type();
  1984. }
  1985. /*****************************************************************************
  1986.  * FUNCTION
  1987.  *  change_singleline_input_mode
  1988.  * DESCRIPTION
  1989.  *  Changes the current input mode (cyclic "ABC"->"abc"->"123"->"ABC")
  1990.  * PARAMETERS
  1991.  *  void
  1992.  * RETURNS
  1993.  *  void
  1994.  *****************************************************************************/
  1995. void change_singleline_input_mode(void)
  1996. {
  1997.     /*----------------------------------------------------------------*/
  1998.     /* Local Variables                                                */
  1999.     /*----------------------------------------------------------------*/
  2000.     U8 i;
  2001.     U8 *MMI_input_mode_set;
  2002.     /*----------------------------------------------------------------*/
  2003.     /* Code Body                                                      */
  2004.     /*----------------------------------------------------------------*/
  2005.     i = 0;
  2006.     if (MMI_allow_only_english_input_modes)
  2007.     {
  2008.         MMI_input_mode_set = MMI_english_input_mode_set;
  2009.     }
  2010.     else
  2011.     {
  2012.         MMI_input_mode_set = MMI_all_input_mode_set;
  2013.     }
  2014.     while (MMI_input_mode_set[i] != MMI_current_input_mode && MMI_input_mode_set[i] != 0xff)
  2015.     {
  2016.         i++;
  2017.     }
  2018.     do
  2019.     {
  2020.         if (MMI_input_mode_set[i] == 0xff)
  2021.         {
  2022.             i = 0;
  2023.             MMI_current_input_mode = MMI_input_mode_set[0];
  2024.         }
  2025.         if (MMI_input_mode_set[i + 1] == 0xff)
  2026.         {
  2027.             i = 0;
  2028.             MMI_current_input_mode = MMI_input_mode_set[0];
  2029.         }
  2030.         else
  2031.         {
  2032.             MMI_current_input_mode = MMI_input_mode_set[i + 1];
  2033.         }
  2034.         i++;
  2035.     } while (MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_ABC && MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_ABC && MMI_current_input_mode != INPUT_MODE_MULTITAP_THAI && MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_SPANISH && MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_SPANISH && MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_DANISH &&        /* PMT VIKASG START 20050729 */
  2036.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_DANISH &&  /* PMT VIKASG END 20050729 */
  2037.              MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_POLISH &&
  2038.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_POLISH &&
  2039.              MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_FRENCH &&
  2040.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_FRENCH &&
  2041.              MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_GERMAN &&
  2042.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_GERMAN &&
  2043.              MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_ITALIAN &&
  2044.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_ITALIAN &&
  2045.              MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_RUSSIAN &&
  2046.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_RUSSIAN &&
  2047.              MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_BULGARIAN &&
  2048.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_BULGARIAN &&
  2049.              MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_TURKISH &&
  2050.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_TURKISH &&
  2051.              MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_PORTUGUESE &&
  2052.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_PORTUGUESE &&
  2053.              MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_INDONESIAN &&
  2054.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_INDONESIAN &&
  2055.              MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_CZECH &&
  2056.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_CZECH &&
  2057.              MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_MALAY &&
  2058.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_MALAY &&
  2059.              MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_VIETNAMESE &&
  2060.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_VIETNAMESE &&
  2061.              MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_FINNISH &&
  2062.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_FINNISH &&
  2063.              MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_HUNGARIAN &&
  2064.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_HUNGARIAN &&
  2065.              MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_SLOVAK && MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_SLOVAK && MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_DUTCH &&       /* Nitesh added */
  2066.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_DUTCH &&
  2067.              MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_NORWEGIAN &&
  2068.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_NORWEGIAN &&
  2069.              MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_SWEDISH &&
  2070.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_SWEDISH &&
  2071.              MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_CROATIAN &&
  2072.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_CROATIAN &&
  2073.              MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_ROMANIAN &&
  2074.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_ROMANIAN &&
  2075.              MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_SLOVENIAN &&
  2076.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_SLOVENIAN &&
  2077.              MMI_current_input_mode != INPUT_MODE_MULTITAP_LOWERCASE_GREEK &&
  2078.              MMI_current_input_mode != INPUT_MODE_MULTITAP_UPPERCASE_GREEK &&
  2079.              MMI_current_input_mode != INPUT_MODE_123);
  2080.     inputbox_change_mode();
  2081.     set_MMI_current_input_type();
  2082. }
  2083. /*****************************************************************************
  2084.  * FUNCTION
  2085.  *  change_singleline_inputbox_input_mode
  2086.  * DESCRIPTION
  2087.  *  change the input mode of single line input box
  2088.  * PARAMETERS
  2089.  *  void
  2090.  * RETURNS
  2091.  *  void
  2092.  *****************************************************************************/
  2093. void change_singleline_inputbox_input_mode(void)
  2094. {
  2095.     /*----------------------------------------------------------------*/
  2096.     /* Local Variables                                                */
  2097.     /*----------------------------------------------------------------*/
  2098.     /*----------------------------------------------------------------*/
  2099.     /* Code Body                                                      */
  2100.     /*----------------------------------------------------------------*/
  2101.     change_singleline_inputbox_mode(MMI_current_input_mode);
  2102. }
  2103. /* MTK Elvis to add some APIs for Qsearch */
  2104. /*****************************************************************************
  2105.  * FUNCTION
  2106.  *  change_qsearch_singleline_inputbox_input_mode
  2107.  * DESCRIPTION
  2108.  *  change the input mode of single line input box
  2109.  * PARAMETERS
  2110.  *  void
  2111.  * RETURNS
  2112.  *  void
  2113.  *****************************************************************************/
  2114. void change_qsearch_singleline_inputbox_input_mode(void)
  2115. {
  2116.     /*----------------------------------------------------------------*/
  2117.     /* Local Variables                                                */
  2118.     /*----------------------------------------------------------------*/
  2119.     /*----------------------------------------------------------------*/
  2120.     /* Code Body                                                      */
  2121.     /*----------------------------------------------------------------*/
  2122.     change_qsearch_singleline_inputbox_mode(MMI_current_input_mode);
  2123. }
  2124. /* MTK end */
  2125. /*****************************************************************************
  2126.  * FUNCTION
  2127.  *  change_multiline_inputbox_input_mode
  2128.  * DESCRIPTION
  2129.  *  Changes the input mode of the multiline inputbox
  2130.  * PARAMETERS
  2131.  *  void
  2132.  * RETURNS
  2133.  *  void
  2134.  *****************************************************************************/
  2135. void change_multiline_inputbox_input_mode(void)
  2136. {
  2137.     /*----------------------------------------------------------------*/
  2138.     /* Local Variables                                                */
  2139.     /*----------------------------------------------------------------*/
  2140.     /*----------------------------------------------------------------*/
  2141.     /* Code Body                                                      */
  2142.     /*----------------------------------------------------------------*/
  2143.     change_multiline_inputbox_mode(MMI_current_input_mode);
  2144. }
  2145. /* Function Added To Display Remaining Character for Single Line Box - Gurinder 23/4/2004 */
  2146. /*****************************************************************************
  2147.  * FUNCTION
  2148.  *  wgui_redraw_singleline_input_box_remaining_characters_display
  2149.  * DESCRIPTION
  2150.  *  
  2151.  * PARAMETERS
  2152.  *  void
  2153.  * RETURNS
  2154.  *  void
  2155.  *****************************************************************************/
  2156. void wgui_redraw_singleline_input_box_remaining_characters_display(void)
  2157. {
  2158. #ifndef __MMI_HIDE_SGL_REMAINING_CHAR__
  2159.     /*----------------------------------------------------------------*/
  2160.     /* Local Variables                                                */
  2161.     /*----------------------------------------------------------------*/
  2162.     color c;
  2163.     /* MTK Elvis for R2L characters */
  2164.     S32 x1;
  2165.     S32 x2;
  2166.     S32 y1 = wgui_inputbox_information_bar_y;
  2167.     S32 y2 = wgui_inputbox_information_bar_y + wgui_inputbox_information_bar_height - 1;
  2168.     /* MTK end */
  2169. #if !defined(__MMI_TOUCH_SCREEN__)
  2170.     stFontAttribute *f = &MMI_small_font;
  2171.     S32 w, n, max_n;
  2172. #else /* !defined(__MMI_TOUCH_SCREEN__) */ 
  2173.     stFontAttribute *f = &MMI_medium_font;
  2174.     S32 w, h, n, max_n;
  2175. #endif /* !defined(__MMI_TOUCH_SCREEN__) */ 
  2176.     UI_character_type str[32];
  2177.     /*----------------------------------------------------------------*/
  2178.     /* Code Body                                                      */
  2179.     /*----------------------------------------------------------------*/
  2180.     /* MTK Elvis for R2L characters */
  2181.     if (!r2lMMIFlag)
  2182.     {
  2183.         x1 = wgui_inputbox_information_bar_x + (wgui_inputbox_information_bar_width >> 1);
  2184.         x2 = wgui_inputbox_information_bar_x + wgui_inputbox_information_bar_width - 1;
  2185.     }
  2186.     else
  2187.     {
  2188.         x1 = wgui_inputbox_information_bar_x;
  2189.         x2 = wgui_inputbox_information_bar_x + (wgui_inputbox_information_bar_width / 2) - 1;
  2190.     }
  2191.     /* MTK end */
  2192. #if(UI_DOUBLE_BUFFER_SUPPORT)
  2193.     gui_lock_double_buffer();
  2194. #endif 
  2195.     /* Warning: Temporary change only UCS2 / ASCII. This has to be done in a more formal manner  */
  2196.     n = (MMI_singleline_inputbox.text_length >> 1) - 1;
  2197.     max_n = (MMI_singleline_inputbox.available_length >> 1) - 1;
  2198.     if ((MMI_singleline_inputbox.flags & UI_SINGLE_LINE_INPUT_BOX_CHECK_GSM_EXTENDED) &&
  2199.         (MMI_singleline_inputbox.UCS2_count == 0))
  2200.     {
  2201.         n += MMI_singleline_inputbox.GSM_ext_count;
  2202.     }
  2203.     if ((MMI_singleline_inputbox.flags & UI_SINGLE_LINE_INPUT_BOX_PLUS_CHARACTER_HANDLING) &&
  2204.         (MMI_singleline_inputbox.text[0] == '+'))
  2205.     {
  2206.         n--;
  2207.         max_n--;
  2208.     }
  2209.     /* if(!(MMI_multiline_inputbox.flags & UI_MULTI_LINE_INPUT_BOX_INCLUDE_INFO_AREA)) */
  2210.     wgui_input_information_background(x1, y1, x2, y2);
  2211.     gui_reset_text_clip();
  2212.     gui_sprintf(str, "%d/%d", n, max_n);
  2213.     c = *current_MMI_theme->remaining_length_text_color;
  2214.     gui_set_font(f);
  2215.     gui_set_text_color(c);
  2216.     gui_set_text_clip(0, 0, UI_device_width - 1, UI_device_height - 1);
  2217. #if !defined(__MMI_TOUCH_SCREEN__)
  2218.     w = gui_get_string_width(str);
  2219. #else 
  2220.     gui_measure_string(str, &w, &h);
  2221. #endif 
  2222.     /* MTK Elvis for R2L characters */
  2223.     if (!r2lMMIFlag)
  2224. #if !defined(__MMI_TOUCH_SCREEN__)
  2225.         gui_move_text_cursor(x2 - 2 - w, y1 + 2);
  2226. #else 
  2227.         gui_move_text_cursor(x2 - 2 - w, y1 + (wgui_inputbox_information_bar_height - h) / 2);
  2228. #endif 
  2229.     else
  2230. #if !defined(__MMI_TOUCH_SCREEN__)
  2231.         gui_move_text_cursor(x1 + 2 + w, y1 + 2);
  2232. #else 
  2233.         gui_move_text_cursor(x1 + 2 + w, y1 + (wgui_inputbox_information_bar_height - h) / 2);
  2234. #endif 
  2235.     /* MTK end */
  2236.     gui_print_text(str);
  2237. #if(UI_DOUBLE_BUFFER_SUPPORT)
  2238.     gui_unlock_double_buffer();
  2239.     gui_BLT_double_buffer(x1, y1, x2, y2);
  2240. #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */ 
  2241. #endif /* __MMI_HIDE_SGL_REMAINING_CHAR__ */ 
  2242. }
  2243. /* Function Added To Display Information Bar For Single Line Input Box - Gurinder 23/4/2004 */
  2244. /*****************************************************************************
  2245.  * FUNCTION
  2246.  *  wgui_redraw_singleline_input_information_bar
  2247.  * DESCRIPTION
  2248.  *  redrwa input information bar
  2249.  * PARAMETERS
  2250.  *  void
  2251.  * RETURNS
  2252.  *  void
  2253.  *****************************************************************************/
  2254. void wgui_redraw_singleline_input_information_bar(void)
  2255. {
  2256.     /*----------------------------------------------------------------*/
  2257.     /* Local Variables                                                */
  2258.     /*----------------------------------------------------------------*/
  2259.     S32 x1 = wgui_inputbox_information_bar_x;
  2260.     S32 y1 = wgui_inputbox_information_bar_y;
  2261.     S32 x2 = wgui_inputbox_information_bar_x + wgui_inputbox_information_bar_width - 1;
  2262.     S32 y2 = wgui_inputbox_information_bar_y + wgui_inputbox_information_bar_height - 1;
  2263.     /*----------------------------------------------------------------*/
  2264.     /* Code Body                                                      */
  2265.     /*----------------------------------------------------------------*/
  2266. #if(UI_DOUBLE_BUFFER_SUPPORT)
  2267.     gui_lock_double_buffer();
  2268. #endif 
  2269.     wgui_input_information_background(x1, y1, x2, y2);
  2270.     wgui_show_input_mode(MMI_current_input_mode, wgui_inputbox_information_icon);
  2271.     wgui_redraw_singleline_input_box_remaining_characters_display();
  2272. #if(UI_DOUBLE_BUFFER_SUPPORT)
  2273.     gui_unlock_double_buffer();
  2274.     gui_BLT_double_buffer(x1, y1, x2, y2);
  2275. #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */ 
  2276. }
  2277. /*****************************************************************************
  2278.  * FUNCTION
  2279.  *  set_singleline_inputbox_category_history
  2280.  * DESCRIPTION
  2281.  *  Sets the history data for the singleline inputbox from the given history buffer
  2282.  * PARAMETERS
  2283.  *  history_ID          [IN]        Is the ID used by category screens
  2284.  *  history_buffer      [IN]        Is the buffer from which history data is taken
  2285.  *  input_type          [?]         
  2286.  * RETURNS
  2287.  *  Returns true if the history ID is valid
  2288.  *****************************************************************************/
  2289. U8 set_singleline_inputbox_category_history(U16 history_ID, U8 *history_buffer, S16 *input_type)
  2290. {
  2291.     /*----------------------------------------------------------------*/
  2292.     /* Local Variables                                                */
  2293.     /*----------------------------------------------------------------*/
  2294.     /*----------------------------------------------------------------*/
  2295.     /* Code Body                                                      */
  2296.     /*----------------------------------------------------------------*/
  2297.     if (history_buffer != NULL)
  2298.     {
  2299.         singleline_inputbox_category_history *h = (singleline_inputbox_category_history*) history_buffer;
  2300.         if (history_valid(h->history_ID, history_ID))
  2301.         {
  2302.             MMI_singleline_inputbox.text_length = h->text_length;
  2303.             MMI_singleline_inputbox.allocated_length = h->allocated_length;
  2304.             MMI_singleline_inputbox.available_length = h->available_length;
  2305.             MMI_singleline_inputbox.current_text_p =
  2306.                 (UI_buffer_type) (MMI_singleline_inputbox.text + h->current_position);
  2307.             MMI_singleline_inputbox.text_offset_x = h->text_offset_x;
  2308.             MMI_singleline_inputbox.UCS2_count = h->UCS2_count;
  2309.             *input_type = h->input_type;
  2310.             MMI_singleline_inputbox.flags = h->flags;
  2311.         #if defined(__MMI_TOUCH_SCREEN__)
  2312.             wgui_setup_virtual_keyboard(h->vk_lang_type);
  2313.         #endif 
  2314.             return (1);
  2315.         }
  2316.     }
  2317.     return (0);
  2318. }
  2319. /*****************************************************************************
  2320.  * FUNCTION
  2321.  *  get_singleline_inputbox_category_history
  2322.  * DESCRIPTION
  2323.  *  gets the history data for the singleline inputbox from the given history buffer
  2324.  * PARAMETERS
  2325.  *  history_ID          [IN]        Is the ID used by category screens
  2326.  *  history_buffer      [IN]        Is the buffer from which history data is taken
  2327.  *  input_type          [IN]        
  2328.  * RETURNS
  2329.  *  Returns true if the history ID is valid(?)
  2330.  *****************************************************************************/
  2331. void get_singleline_inputbox_category_history(U16 history_ID, U8 *history_buffer, S16 input_type)
  2332. {
  2333.     /*----------------------------------------------------------------*/
  2334.     /* Local Variables                                                */
  2335.     /*----------------------------------------------------------------*/
  2336.     /*----------------------------------------------------------------*/
  2337.     /* Code Body                                                      */
  2338.     /*----------------------------------------------------------------*/
  2339.     if (history_buffer != NULL)
  2340.     {
  2341.         U16 hID = (U16) (history_ID | 0x8000);
  2342.         singleline_inputbox_category_history *h = (singleline_inputbox_category_history*) history_buffer;
  2343.         h->history_ID = hID;
  2344.         h->text_length = (S16) MMI_singleline_inputbox.text_length;
  2345.         h->allocated_length = (S16) MMI_singleline_inputbox.allocated_length;
  2346.         h->available_length = (S16) MMI_singleline_inputbox.available_length;
  2347.         h->current_position = (S16) (MMI_singleline_inputbox.current_text_p - MMI_singleline_inputbox.text);
  2348.         h->text_offset_x = (S16) MMI_singleline_inputbox.text_offset_x;
  2349.         h->UCS2_count = (S16) MMI_singleline_inputbox.UCS2_count;
  2350.         h->input_type = (S16) input_type;
  2351.         h->flags = (U32) MMI_singleline_inputbox.flags;
  2352.         // W06.48 - add by Ailsa for removing multitap state when exiting category
  2353.         h->flags &= ~UI_SINGLE_LINE_INPUT_BOX_STATE_MULTITAP;
  2354.     #if defined(__MMI_TOUCH_SCREEN__)
  2355.         /* W06.04 Save Virtual Keyboard in the history of single line input box */
  2356.         if (GUI_VIRTUAL_KEYBOARD_MAX_LANG == mmi_pen_editor_history_vk_lang_type())
  2357.         {
  2358.             h->vk_lang_type = MMI_virtual_keyboard.lang_type;
  2359.         }
  2360.         else
  2361.         {
  2362.             h->vk_lang_type = mmi_pen_editor_history_vk_lang_type();
  2363.         }
  2364.     #endif /* defined(__MMI_TOUCH_SCREEN__) */ 
  2365.     }
  2366. }
  2367. /*****************************************************************************
  2368.  * FUNCTION
  2369.  *  set_multiline_inputbox_category_history
  2370.  * DESCRIPTION
  2371.  *  Sets the history data for the multiline inputbox from the given history buffer
  2372.  * PARAMETERS
  2373.  *  history_ID          [IN]        Is the ID used by category screens
  2374.  *  history_buffer      [IN]        Is the buffer from which history data is taken
  2375.  *  input_type          [?]         
  2376.  * RETURNS
  2377.  *  Returns true if the history ID is valid
  2378.  *****************************************************************************/
  2379. U8 set_multiline_inputbox_category_history(U16 history_ID, U8 *history_buffer, S16 *input_type)
  2380. {
  2381.     /*----------------------------------------------------------------*/
  2382.     /* Local Variables                                                */
  2383.     /*----------------------------------------------------------------*/
  2384.     /*----------------------------------------------------------------*/
  2385.     /* Code Body                                                      */
  2386.     /*----------------------------------------------------------------*/
  2387.     if (history_buffer != NULL)
  2388.     {
  2389.         multiline_inputbox_category_history *h = (multiline_inputbox_category_history*) history_buffer;
  2390.         if (history_valid(h->history_ID, history_ID))
  2391.         {
  2392.             MMI_multiline_inputbox.text_length = h->text_length;
  2393.             MMI_multiline_inputbox.allocated_length = h->allocated_length;
  2394.         #if defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__)
  2395.             if (GetMessagesCurrScrnID() != SCR_ID_MSG_WRITE)
  2396.             {
  2397.                 MMI_multiline_inputbox.available_length = h->available_length;
  2398.             }
  2399.         #else /* defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__) */ 
  2400.             MMI_multiline_inputbox.available_length = h->available_length;
  2401.         #endif /* defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__) */ 
  2402.             MMI_multiline_inputbox.n_lines = h->n_lines;
  2403.             MMI_multiline_inputbox.text_height = h->text_height;
  2404.             MMI_multiline_inputbox.text_offset_x = h->text_offset_x;
  2405.             MMI_multiline_inputbox.text_offset_y = h->text_offset_y;
  2406.             MMI_multiline_inputbox.cursor_x = h->cursor_x;
  2407.             MMI_multiline_inputbox.cursor_y = h->cursor_y;
  2408.             MMI_multiline_inputbox.cursor_line_position_counter = h->cursor_line_position_counter;
  2409.             MMI_multiline_inputbox.line_before_cursor_line_p =
  2410.                 (UI_buffer_type) (MMI_multiline_inputbox.text + h->line_before_cursor_line_p);
  2411.             MMI_multiline_inputbox.cursor_line_p = (UI_buffer_type) (MMI_multiline_inputbox.text + h->cursor_line_p);
  2412.             MMI_multiline_inputbox.cursor_p = (UI_buffer_type) (MMI_multiline_inputbox.text + h->cursor_p);
  2413.             MMI_multiline_inputbox.line_after_cursor_line_p =
  2414.                 (UI_buffer_type) (MMI_multiline_inputbox.text + h->line_after_cursor_line_p);
  2415.             MMI_multiline_inputbox.line_after_cursor_line_last_p =
  2416.                 (UI_buffer_type) (MMI_multiline_inputbox.text + h->line_after_cursor_line_last_p);
  2417.             MMI_multiline_inputbox.last_position_p =
  2418.                 (UI_buffer_type) (MMI_multiline_inputbox.text + h->last_position_p);
  2419.             MMI_multiline_inputbox.UCS2_count = h->UCS2_count;
  2420.             *input_type = h->input_type;
  2421.             MMI_multiline_inputbox.flags = h->flags;
  2422.             MMI_multiline_inputbox.ext_flags=h->ext_flags;
  2423.              /* barcode */
  2424.             MMI_multiline_inputbox.current_hilite_idx = h->current_hilite_idx;
  2425.             MMI_multiline_inputbox.curr_hilite_text_offset_y = h->curr_hilite_text_offset_y;
  2426.             MMI_multiline_inputbox.hilite_list = h->hilite_list;
  2427.             MMI_multiline_inputbox.hilite_cb = h->hilite_cb;
  2428.         #ifdef __UI_PAGING_IN_MULTILINE_EDITOR__
  2429.             if (h->ext_flags & GUI_MULTI_LINE_INPUT_BOX_VIEW_PAGING_MODE)
  2430.             {
  2431.                 memcpy(MMI_multiline_inputbox.text,shared_data, h->previous_shared_bytes);
  2432.                 MMI_multiline_inputbox.start_id = h->start_page_id;
  2433.                 MMI_multiline_inputbox.end_id = h->end_page_id;
  2434.                 MMI_multiline_inputbox.text_offset = h->text_offset;
  2435.                 gui_paging_multiline_input_box_get_page(
  2436.                     MMI_multiline_inputbox.start_id,
  2437.                     MMI_multiline_inputbox.end_id,
  2438.                     MMI_multiline_inputbox.text + h->previous_shared_bytes);
  2439.             }
  2440.         #endif /* __UI_PAGING_IN_MULTILINE_EDITOR__ */ 
  2441.         #if defined(__MMI_TOUCH_SCREEN__)
  2442.             wgui_setup_virtual_keyboard(h->vk_lang_type);
  2443.         #endif 
  2444.             return (1);
  2445.         }
  2446.     }
  2447.     return (0);
  2448. }
  2449. /*****************************************************************************
  2450.  * FUNCTION
  2451.  *  get_multiline_inputbox_category_history
  2452.  * DESCRIPTION
  2453.  *  Gets the history data for the multiline inputbox and stores into the given history buffer
  2454.  * PARAMETERS
  2455.  *  history_ID          [IN]        Is the ID used by category screens
  2456.  *  history_buffer      [IN]        Is the buffer from which history data is taken
  2457.  *  input_type          [IN]        
  2458.  * RETURNS
  2459.  *  void
  2460.  *****************************************************************************/
  2461. void get_multiline_inputbox_category_history(U16 history_ID, U8 *history_buffer, S16 input_type)
  2462. {
  2463.     /*----------------------------------------------------------------*/
  2464.     /* Local Variables                                                */
  2465.     /*----------------------------------------------------------------*/
  2466.     /*----------------------------------------------------------------*/
  2467.     /* Code Body                                                      */
  2468.     /*----------------------------------------------------------------*/
  2469.     if (history_buffer != NULL)
  2470.     {
  2471.         U32 tmp_flags;  
  2472.         S8 i;
  2473.         U16 hID = (U16) (history_ID | 0x8000);
  2474.         multiline_inputbox_category_history *h = (multiline_inputbox_category_history*) history_buffer;
  2475.         h->history_ID = hID;
  2476.         h->text_length = (S16) MMI_multiline_inputbox.text_length;
  2477.         h->allocated_length = (S16) MMI_multiline_inputbox.allocated_length;
  2478.         h->available_length = (S16) MMI_multiline_inputbox.available_length;
  2479.         h->n_lines = (S16) MMI_multiline_inputbox.n_lines;
  2480.         h->text_height = (S16) MMI_multiline_inputbox.text_height;
  2481.         h->text_offset_x = (S16) MMI_multiline_inputbox.text_offset_x;
  2482.         h->text_offset_y = (S16) MMI_multiline_inputbox.text_offset_y;
  2483.         h->cursor_x = (S16) MMI_multiline_inputbox.cursor_x;
  2484.         h->cursor_y = (S16) MMI_multiline_inputbox.cursor_y;
  2485.         h->cursor_line_position_counter = (S16) MMI_multiline_inputbox.cursor_line_position_counter;
  2486.         h->line_before_cursor_line_p =
  2487.             (S16) (MMI_multiline_inputbox.line_before_cursor_line_p - MMI_multiline_inputbox.text);
  2488.         h->cursor_line_p = (S16) (MMI_multiline_inputbox.cursor_line_p - MMI_multiline_inputbox.text);
  2489.         h->cursor_p = (S16) (MMI_multiline_inputbox.cursor_p - MMI_multiline_inputbox.text);
  2490.         h->line_after_cursor_line_p =
  2491.             (S16) (MMI_multiline_inputbox.line_after_cursor_line_p - MMI_multiline_inputbox.text);
  2492.         h->line_after_cursor_line_last_p =
  2493.             (S16) (MMI_multiline_inputbox.line_after_cursor_line_last_p - MMI_multiline_inputbox.text);
  2494.         h->last_position_p = (S16) (MMI_multiline_inputbox.last_position_p - MMI_multiline_inputbox.text);
  2495.         h->input_type = (S16) input_type;
  2496.         /* barcode */
  2497.         h->current_hilite_idx = MMI_multiline_inputbox.current_hilite_idx;
  2498.         h->curr_hilite_text_offset_y = MMI_multiline_inputbox.curr_hilite_text_offset_y;
  2499.         h->hilite_list = MMI_multiline_inputbox.hilite_list;
  2500.         h->hilite_cb = MMI_multiline_inputbox.hilite_cb;
  2501.         h->ext_flags = (U32)MMI_multiline_inputbox.ext_flags;
  2502.       /**** ritesh  started*****/
  2503.     #ifdef __UI_PAGING_IN_MULTILINE_EDITOR__
  2504.         if (MMI_multiline_inputbox.ext_flags & GUI_MULTI_LINE_INPUT_BOX_VIEW_PAGING_MODE)
  2505.         {
  2506.             h->start_page_id = MMI_multiline_inputbox.start_id;
  2507.             h->end_page_id = MMI_multiline_inputbox.end_id;
  2508.             h->previous_shared_bytes = MMI_multiline_inputbox.previous_shared_bytes;
  2509.             //h->ext_flags = MMI_multiline_inputbox.ext_flags;
  2510.             h->text_offset = MMI_multiline_inputbox.text_offset;
  2511.             memset(shared_data,0,sizeof(shared_data));
  2512.             memcpy((void *)shared_data, (void*)MMI_multiline_inputbox.text, h->previous_shared_bytes);
  2513.         }
  2514.     #endif /* __UI_PAGING_IN_MULTILINE_EDITOR__ */ 
  2515.       /**** ritesh ended here***/
  2516.         /* 032605 Calvin modified to ensure 4 byte alignment */
  2517.         tmp_flags = MMI_multiline_inputbox.flags;
  2518.         /* MTK Elvis 20040116 to disable multitap flag 20040712 to disable highlight flag */