textinput/peninputsplititut/inc/peninputsplititutdata.h
changeset 0 eb1f2e154e89
child 3 f5a1e66df979
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0""
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 #ifndef T_PENINPUTSPLITCHNITUTDATA_H
       
    18 #define T_PENINPUTSPLITCHNITUTDATA_H
       
    19 
       
    20 #include <peninputlayoutbasecontrol.h>
       
    21 #include <aknfeppeninputenums.h>
       
    22 #include <ptidefs.h>
       
    23 #include <e32keys.h>
       
    24 #include <AknLayout2Def.h>
       
    25 
       
    26 
       
    27 //#include "peninputsplititutcustomization.h"
       
    28 
       
    29 const TInt KInvalidScanCode = -1;
       
    30 const TInt KInvalidCtrlId = -1;
       
    31 
       
    32 enum TItutDataType
       
    33     {
       
    34     EScreenSize,
       
    35     ELayoutOffset,
       
    36     ELayoutRect,
       
    37     EBackgroundRect,
       
    38     EBackspaceRect,
       
    39     EArrowLeftRect,
       
    40     EArrowRightRect,
       
    41     EArrowUpRect,
       
    42     EArrowDownRect,
       
    43     EOptionsRect,
       
    44     ECloseRect,
       
    45     EKeypadRect,
       
    46     EKeypadCellRects,
       
    47     EKeypadLeftTextLine,
       
    48     EKeypadRightTextLine1,
       
    49     EKeypadRightTextLine2,
       
    50     EKeypadRightTextLine3,
       
    51     EDropdownlistUnitWidth,
       
    52     EDropdownlistUnitHeight,
       
    53     EDropdownlistHorizontalMargin,
       
    54     EDropdownlistVerticalMargin,
       
    55     EDropdownListNaviWidth,
       
    56     EDropdownListSpinBtnHeight,
       
    57     EDropdownListSpellLTPos,
       
    58     EDropdownListCandsLTPos,
       
    59     EDropdownListPuncLTPos,
       
    60     EDropdownListFont,
       
    61     EDropdownListTextMargin,
       
    62     EDropdownListTextColor,
       
    63     ESpellRect,    // used to indicate stroke and zhuyin spelling
       
    64     ESpellFont,
       
    65     ESpellTextColor,
       
    66     ELanguage,
       
    67     EInputMode,
       
    68     ECase,
       
    69     EChnCandidates,
       
    70     EChnPuncCandidates,
       
    71     ELeftInnerRect,
       
    72     ERightInnerRect,
       
    73     EBackspaceInnerRect,
       
    74     EUpInnerRect,
       
    75     EDownInnerRect,
       
    76     ECloseInnerRect,
       
    77     EOptionInnerRect,
       
    78     ELatinOnly,
       
    79     EPreviewBubbleRect,
       
    80     EPreviewBubbleInnerRect,
       
    81     EPreviewBubbleFont,
       
    82     EPreviewBubbleTextlayout,
       
    83     };
       
    84 
       
    85 enum TControlId
       
    86     {
       
    87     ECtrlIdBackspace = 1000,
       
    88     ECtrlIdArrowLeft,
       
    89     ECtrlIdArrowRight,
       
    90     ECtrlIdArrowUp,
       
    91     ECtrlIdArrowDown,
       
    92     ECtrlIdOptions,
       
    93     ECtrlIdClose,
       
    94     ECtrlIdStdItut,
       
    95     ECtrlIdSpellICF,    // used to display spelling of stroke and zhuyin
       
    96     ECtrlIdSpellCandsList,
       
    97     ECtrlIdStdCandsList,
       
    98     ECtrlIdPuncCandsList,
       
    99     ECtrlIdBackground,  // used to display background
       
   100     ECtrlIdCancelWindow,
       
   101     ECtrlIdLastStdCtrl = ECtrlIdBackground + 1
       
   102     };
       
   103 
       
   104 enum TItutCommand
       
   105     {
       
   106     EItutCmdCandidateSelected = ECmdPenInputImeCmdBase + 1,
       
   107     EItutCmdGetNextCandidatePage,
       
   108     EItutCmdGetPreviousCandidatePage,
       
   109     EItutCmdCandidateExisted,
       
   110     EItutCmdPredictItemSelected,
       
   111     EItutCmdArrowUp,
       
   112     EItutCmdArrowDown,
       
   113     EItutCmdCheckIcfEmpty
       
   114     };
       
   115     
       
   116 enum TItutCandidatesIdx
       
   117     {
       
   118     EItutCandidates,
       
   119     EItutPuncCandidates
       
   120     };
       
   121 
       
   122 enum TItutConfigurableKeys
       
   123     {
       
   124     EItutKeyArrowLeft,
       
   125     EItutKeyArrowRight,
       
   126     EItutKeyArrowUp,
       
   127     EItutKeyArrowDown,
       
   128     EItutKeyClear,
       
   129     EItutKeySwitchLayout,
       
   130     EItutKey1,
       
   131     EItutKey2,
       
   132     EItutKey3,
       
   133     EItutKey4,
       
   134     EItutKey5,
       
   135     EItutKey6,
       
   136     EItutKey7,
       
   137     EItutKey8,
       
   138     EItutKey9,
       
   139     EItutKeyStar,
       
   140     EItutKey0,
       
   141     EItutKeyHash
       
   142     };
       
   143 
       
   144 
       
   145 
       
   146 class TItutKeyMapping
       
   147     {
       
   148 public:
       
   149     TInt iKeyIdx;
       
   150     TInt iCtrlId;     // only valid when key is a button
       
   151     TInt iScanCode;   // only valid when key is a virtual key in keyboard
       
   152     };
       
   153 
       
   154 const TItutKeyMapping ItutKeymap[] = 
       
   155     {
       
   156     {EItutKeyArrowLeft, ECtrlIdArrowLeft, KInvalidScanCode},
       
   157     {EItutKeyArrowRight, ECtrlIdArrowRight, KInvalidScanCode},
       
   158     {EItutKeyArrowUp, ECtrlIdArrowUp, KInvalidScanCode},
       
   159     {EItutKeyArrowDown, ECtrlIdArrowDown, KInvalidScanCode},
       
   160     {EItutKeyClear, ECtrlIdBackspace, KInvalidScanCode},
       
   161     {EItutKey1, KInvalidCtrlId, EPtiKey1},
       
   162     {EItutKey2, KInvalidCtrlId, EPtiKey2},
       
   163     {EItutKey3, KInvalidCtrlId, EPtiKey3},
       
   164     {EItutKey4, KInvalidCtrlId, EPtiKey4},
       
   165     {EItutKey5, KInvalidCtrlId, EPtiKey5},
       
   166     {EItutKey6, KInvalidCtrlId, EPtiKey6},
       
   167     {EItutKey7, KInvalidCtrlId, EPtiKey7},
       
   168     {EItutKey8, KInvalidCtrlId, EPtiKey8},
       
   169     {EItutKey9, KInvalidCtrlId, EPtiKey9},
       
   170     {EItutKeyStar, KInvalidCtrlId, EStdKeyNkpAsterisk},
       
   171     {EItutKey0, KInvalidCtrlId, EPtiKey0},
       
   172     {EItutKeyHash, KInvalidCtrlId, EStdKeyHash},
       
   173     };
       
   174 
       
   175 const TInt LangsArr[] = 
       
   176     {
       
   177     1,   2,   3,   4,   5,   6,   7,   8,   9,   10, 
       
   178     11,  12,  13,  14,  15,  17,  18,  20,  21,  22,  
       
   179     23,  24,  25,  26,  27,  28,  39,  44,  45,  46,  
       
   180     47,  48,  49,  51,  59,  67,  68,  70,  76,  78,  
       
   181     79,  82,  83,  85,  91,  96,  102, 103, 401, 402,
       
   182     16,  42,  93,  54,  55,  57,  37,  50,  94,  33, 
       
   183     29,  30,  31,  58,  72,
       
   184     };
       
   185 
       
   186 _LIT(KLatinExt, "latin");
       
   187 _LIT(KCyrillicExt, "cyrillic");
       
   188 _LIT(KGreekExt, "greek");
       
   189 _LIT(KHebrewExt, "hebrew");
       
   190 _LIT(KArabicExt, "arabic");
       
   191 _LIT(KFarsiExt, "farsi");
       
   192 _LIT(KUrduExt, "urdu");
       
   193 _LIT(KThaiExt, "thai");
       
   194 _LIT(KChnExt, "chinese");
       
   195 _LIT(KDevanagiriExt, "devanagari");
       
   196 
       
   197 enum TScriptExtIndex
       
   198     {
       
   199     ELatinExt,
       
   200     ECyrillicExt,
       
   201     EGreekExt,
       
   202     EHebrewExt,
       
   203     EArabicExt,
       
   204     EFarsiExt,
       
   205     EUrduExt,
       
   206     EThaiExt,
       
   207     EChnExt,
       
   208     EDevanagiriExt
       
   209     };
       
   210 
       
   211 struct TScriptInfo
       
   212     {
       
   213     TBool iCaseSensitive;
       
   214     TInt iStartIdx;   // lang start index in langs
       
   215     TInt iEndIdx;     // lang end index in langs
       
   216     TScriptExtIndex iScriptExt;
       
   217     };
       
   218     
       
   219 const TScriptInfo TScriptMapping[] = 
       
   220     {
       
   221     {ETrue,  0,  49, ELatinExt},
       
   222     {ETrue,  50, 52, ECyrillicExt},
       
   223     {ETrue,  53, 54, EGreekExt},
       
   224     {EFalse, 55, 55, EHebrewExt},
       
   225     {EFalse, 56, 56, EArabicExt},
       
   226     {EFalse, 57, 57, EFarsiExt},
       
   227     {EFalse, 58, 58, EUrduExt},
       
   228     {EFalse, 59, 59, EThaiExt},
       
   229     {ETrue, 60, 62, EChnExt}, // chinese also include abc
       
   230     {ETrue, 63, 64, EDevanagiriExt},
       
   231     };
       
   232 
       
   233 #endif  // T_PENINPUTSPLITCHNITUTDATA_H
       
   234 
       
   235 //End Of File