textinput/peninputsplititut/inc/peninputsplititutdata.h
branchRCL_3
changeset 21 ecbabf52600f
equal deleted inserted replaced
20:ebd48d2de13c 21:ecbabf52600f
       
     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     ESpellICFRect,
       
    84     EBtnTextLine,
       
    85     EItutPosOk,
       
    86     EItutPosCancel,
       
    87     EIcfFont,
       
    88     ESpellEditIndicatorRect,   
       
    89     EImIndicatorRect,
       
    90     ESpellBackSpcae,
       
    91     ESpellBackSpcaeInner,    
       
    92     EIndiPaneWithoutTextRect, 
       
    93     EIndiIconWithoutTextRect,
       
    94     EIndiTextLine
       
    95     };
       
    96 
       
    97 enum TControlId
       
    98     {
       
    99     ECtrlIdBackspace = 1000,
       
   100     ECtrlIdArrowLeft,
       
   101     ECtrlIdArrowRight,
       
   102     ECtrlIdArrowUp,
       
   103     ECtrlIdArrowDown,
       
   104     ECtrlIdOptions,
       
   105     ECtrlIdClose,
       
   106     ECtrlIdStdItut,
       
   107     ECtrlIdSpellICF,    // used to display spelling of stroke and zhuyin
       
   108     ECtrlIdSpellCandsList,
       
   109     ECtrlIdStdCandsList,
       
   110     ECtrlIdPuncCandsList,
       
   111     ECtrlIdBackground,  // used to display background
       
   112     ECtrlIdCancelWindow,
       
   113     ECtrlIdICF,
       
   114     ECtrlIdOkBtn,
       
   115     ECtrlIdCancelBtn,
       
   116     ECtrlIdLastStdCtrl = ECtrlIdCancelBtn+ 1
       
   117     };
       
   118 
       
   119 enum TItutCommand
       
   120     {
       
   121     EItutCmdCandidateSelected = ECmdPenInputImeCmdBase + 1,
       
   122     EItutCmdGetNextCandidatePage,
       
   123     EItutCmdGetPreviousCandidatePage,
       
   124     EItutCmdCandidateExisted,
       
   125     EItutCmdPredictItemSelected,
       
   126     EItutCmdArrowUp,
       
   127     EItutCmdArrowDown,
       
   128     EItutExtCmdSizeChanged,
       
   129     EItutCmdCheckIcfEmpty
       
   130     };
       
   131     
       
   132 enum TItutCandidatesIdx
       
   133     {
       
   134     EItutCandidates,
       
   135     EItutPuncCandidates
       
   136     };
       
   137 
       
   138 enum TItutConfigurableKeys
       
   139     {
       
   140     EItutKeyArrowLeft,
       
   141     EItutKeyArrowRight,
       
   142     EItutKeyArrowUp,
       
   143     EItutKeyArrowDown,
       
   144     EItutKeyClear,
       
   145     EItutKeySwitchLayout,
       
   146     EItutKey1,
       
   147     EItutKey2,
       
   148     EItutKey3,
       
   149     EItutKey4,
       
   150     EItutKey5,
       
   151     EItutKey6,
       
   152     EItutKey7,
       
   153     EItutKey8,
       
   154     EItutKey9,
       
   155     EItutKeyStar,
       
   156     EItutKey0,
       
   157     EItutKeyHash
       
   158     };
       
   159 
       
   160 
       
   161 
       
   162 class TItutKeyMapping
       
   163     {
       
   164 public:
       
   165     TInt iKeyIdx;
       
   166     TInt iCtrlId;     // only valid when key is a button
       
   167     TInt iScanCode;   // only valid when key is a virtual key in keyboard
       
   168     };
       
   169 
       
   170 const TItutKeyMapping ItutKeymap[] = 
       
   171     {
       
   172     {EItutKeyArrowLeft, ECtrlIdArrowLeft, KInvalidScanCode},
       
   173     {EItutKeyArrowRight, ECtrlIdArrowRight, KInvalidScanCode},
       
   174     {EItutKeyArrowUp, ECtrlIdArrowUp, KInvalidScanCode},
       
   175     {EItutKeyArrowDown, ECtrlIdArrowDown, KInvalidScanCode},
       
   176     {EItutKeyClear, ECtrlIdBackspace, KInvalidScanCode},
       
   177     {EItutKey1, KInvalidCtrlId, EPtiKey1},
       
   178     {EItutKey2, KInvalidCtrlId, EPtiKey2},
       
   179     {EItutKey3, KInvalidCtrlId, EPtiKey3},
       
   180     {EItutKey4, KInvalidCtrlId, EPtiKey4},
       
   181     {EItutKey5, KInvalidCtrlId, EPtiKey5},
       
   182     {EItutKey6, KInvalidCtrlId, EPtiKey6},
       
   183     {EItutKey7, KInvalidCtrlId, EPtiKey7},
       
   184     {EItutKey8, KInvalidCtrlId, EPtiKey8},
       
   185     {EItutKey9, KInvalidCtrlId, EPtiKey9},
       
   186     {EItutKeyStar, KInvalidCtrlId, EStdKeyNkpAsterisk},
       
   187     {EItutKey0, KInvalidCtrlId, EPtiKey0},
       
   188     {EItutKeyHash, KInvalidCtrlId, EStdKeyHash},
       
   189     };
       
   190 
       
   191 const TInt LangsArr[] = 
       
   192     {
       
   193     1,   2,   3,   4,   5,   6,   7,   8,   9,   10, 
       
   194     11,  12,  13,  14,  15,  17,  18,  20,  21,  22,  
       
   195     23,  24,  25,  26,  27,  28,  39,  44,  45,  46,  
       
   196     47,  48,  49,  51,  59,  67,  68,  70,  76,  78,  
       
   197     79,  82,  83,  85,  91,  96,  102, 103, 401, 402,
       
   198     16,  42,  93,  54,  55,  57,  37,  50,  94,  33, 
       
   199     29,  30,  31,  58,  72,
       
   200     };
       
   201 
       
   202 _LIT(KLatinExt, "latin");
       
   203 _LIT(KCyrillicExt, "cyrillic");
       
   204 _LIT(KGreekExt, "greek");
       
   205 _LIT(KHebrewExt, "hebrew");
       
   206 _LIT(KArabicExt, "arabic");
       
   207 _LIT(KFarsiExt, "farsi");
       
   208 _LIT(KUrduExt, "urdu");
       
   209 _LIT(KThaiExt, "thai");
       
   210 _LIT(KChnExt, "chinese");
       
   211 _LIT(KDevanagiriExt, "devanagari");
       
   212 
       
   213 enum TScriptExtIndex
       
   214     {
       
   215     ELatinExt,
       
   216     ECyrillicExt,
       
   217     EGreekExt,
       
   218     EHebrewExt,
       
   219     EArabicExt,
       
   220     EFarsiExt,
       
   221     EUrduExt,
       
   222     EThaiExt,
       
   223     EChnExt,
       
   224     EDevanagiriExt
       
   225     };
       
   226 
       
   227 struct TScriptInfo
       
   228     {
       
   229     TBool iCaseSensitive;
       
   230     TInt iStartIdx;   // lang start index in langs
       
   231     TInt iEndIdx;     // lang end index in langs
       
   232     TScriptExtIndex iScriptExt;
       
   233     };
       
   234     
       
   235 const TScriptInfo TScriptMapping[] = 
       
   236     {
       
   237     {ETrue,  0,  49, ELatinExt},
       
   238     {ETrue,  50, 52, ECyrillicExt},
       
   239     {ETrue,  53, 54, EGreekExt},
       
   240     {EFalse, 55, 55, EHebrewExt},
       
   241     {EFalse, 56, 56, EArabicExt},
       
   242     {EFalse, 57, 57, EFarsiExt},
       
   243     {EFalse, 58, 58, EUrduExt},
       
   244     {EFalse, 59, 59, EThaiExt},
       
   245     {ETrue, 60, 62, EChnExt}, // chinese also include abc
       
   246     {ETrue, 63, 64, EDevanagiriExt},
       
   247     };
       
   248 
       
   249 #endif  // T_PENINPUTSPLITCHNITUTDATA_H
       
   250 
       
   251 //End Of File