00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _PTI_DEFS_H
00020 #define _PTI_DEFS_H
00021
00022 #include <e32keys.h>
00023
00024 #ifdef RD_HINDI_PHONETIC_INPUT
00025
00026
00027
00028
00029
00030
00031
00032 enum TSyllableState
00033 {
00034 EIndicSyllableStateFirst,
00035 EIndicSyllableStateInsideSyllable,
00036 EIndicSyllableStateSyllableBroken,
00037 EIndicSyllableStateLast
00038 };
00039
00040
00041
00042
00043
00044
00045
00046 typedef struct
00047 {
00048 TChar iChar;
00049 TDes *iDest;
00050 TSyllableState iState;
00051 }TPhoneticArg;
00052
00053 #endif
00054 const TInt KMaxLanguageNameLength = 50;
00055 const TInt KMaxAutoSubstStringLength = 32;
00056
00057 const TInt KErrPtiEngineBase = (-1000);
00058
00059
00060 enum TPtiError
00061 {
00062 KErrNoActiveLanguage = KErrPtiEngineBase-1,
00063 KErrLanguageNotFound = KErrPtiEngineBase-2,
00064 KErrNoSuitableCore = KErrPtiEngineBase-3,
00065 KErrNotAllowed = KErrPtiEngineBase-4,
00066 KErrTooLongWord = KErrPtiEngineBase-5,
00067 KErrInvalidWord = KErrPtiEngineBase-6,
00068 KErrTooLongReading = KErrPtiEngineBase-7,
00069 KErrInvalidReading = KErrPtiEngineBase-8,
00070 KErrUserDic = KErrPtiEngineBase-9,
00071 KErrInternalCoreError = KErrPtiEngineBase-10,
00072 KErrLengthMismatch = KErrPtiEngineBase-11
00073 };
00074
00075
00228 enum TPtiEngineInputMode
00229 {
00230 EPtiEngineInputModeNone = 0,
00231 EPtiEngineMultitapping,
00232 EPtiEnginePredictive,
00233 EPtiEngineWordCompletion,
00234 EPtiEngineNumeric,
00235 EPtiEngineQwerty,
00236 EPtiEnginePinyin,
00237 EPtiEngineStroke,
00238 EPtiEngineZhuyin,
00239 EPtiEngineHiraganaKanji,
00240 EPtiEngineHiraganaKanjiPredictive,
00241 EPtiEngineKatakana,
00242 EPtiEngineFullWidthKatakana,
00243 EPtiEngineFullWidthNumeric,
00244 EPtiEngineFullWidthAlphabet,
00245 EPtiEngineHiragana,
00246 EPtiEnginePinyinByPhrase,
00247 EPtiEngineZhuyinByPhrase,
00248 EPtiEngineZhuyinQwerty,
00249 EPtiEngineZhuyinPhraseQwerty,
00250 EPtiEnginePinyinQwerty,
00251 EPtiEnginePinyinPhraseQwerty,
00252 EPtiEngineStrokeQwerty,
00253 EPtiEngineNormalCangjieQwerty,
00254 EPtiEngineEasyCangjieQwerty,
00255 EPtiEngineAdvCangjieQwerty,
00256 EPtiEngineHiraganaKanjiQwerty,
00257 EPtiEngineHiraganaKanjiPredictiveQwerty,
00258 EPtiEngineKatakanaQwerty,
00259 EPtiEngineFullWidthKatakanaQwerty,
00260 EPtiEngineFullWidthNumericQwerty,
00261 EPtiEngineFullWidthAlphabetQwerty,
00262 EPtiEngineHiraganaQwerty,
00263 EPtiEnginePinyinVkb,
00264 EPtiEngineStrokeVkb,
00265 EPtiEngineZhuyinVkb,
00266 EPtiEngineStrokeByPhrase,
00267 EPtiEngineStrokePhraseQwerty,
00268 EPtiEngineHiraganaKanjiVkb,
00269 EPtiEngineHiraganaKanjiPredictiveVkb,
00270 EPtiEngineHiraganaKanjiHwr,
00271 EPtiEngineHiraganaKanjiPredictiveHwr,
00272 EPtiEngineKatakanaVkb,
00273 EPtiEngineFullWidthKatakanaVkb,
00274 EPtiEngineHiraganaVkb,
00275 EPtiEngineNormalCangjieVkb,
00276 EPtiEngineEasyCangjieVkb,
00277 EPtiEngineAdvCangjieVkb,
00278 EPtiEngineInputModeIndicPhoneticMultitap,
00279 EPtiEngineInputModeIndicPhoneticQwerty,
00280 EPtiEngineHiraganaKanjiVkbRomaji,
00281 EPtiEngineHiraganaKanjiPredictiveVkbRomaji,
00282 EPtiEngineQwertyPredictive,
00283 EPtiEngineHalfQwerty,
00284 EPtiEngineHalfQwertyPredictive,
00285 EPtiEngineInputModeQwertyPredictive ,
00286 EPtiEngineInputModeZhuyinMiniQwertyFind,
00287 EPtiEnginePinyinPhraseHalfQwerty,
00288 EPtiEngineStrokePhraseHalfQwerty,
00289 EPtiEngineZhuyinPhraseHalfQwerty,
00290 EPtiEngineMaxInputModes = EPtiEngineZhuyinPhraseHalfQwerty
00291 };
00292
00293
00294
00295
00296
00297 enum TPtiErrorCorrectionLevel
00298 {
00299 EPtiErrorCorrectionLevelOff = 0,
00300 EPtiErrorCorrectionLevelLow = 1,
00301 EPtiErrorCorrectionLevelHigh = 2
00302 };
00303
00304
00318 enum TPtiKey
00319 {
00320 EPtiKeyNone = 0,
00321
00322 EPtiKey1 = '1',
00323 EPtiKey2 = '2',
00324 EPtiKey3 = '3',
00325 EPtiKey4 = '4',
00326 EPtiKey5 = '5',
00327 EPtiKey6 = '6',
00328 EPtiKey7 = '7',
00329 EPtiKey8 = '8',
00330 EPtiKey9 = '9',
00331 EPtiKeyStar = '*',
00332 EPtiKey0 = '0',
00333 EPtiKeyHash = '#',
00334
00335
00336 EPtiKeyPunct = EPtiKey1,
00337 EPtiKeyABC = EPtiKey2,
00338 EPtiKeyDEF = EPtiKey3,
00339 EPtiKeyGHI = EPtiKey4,
00340 EPtiKeyJKL = EPtiKey5,
00341 EPtiKeyMNO = EPtiKey6,
00342 EPtiKeyPQRS = EPtiKey7,
00343 EPtiKeyTUV = EPtiKey8,
00344 EPtiKeyWXYZ = EPtiKey9,
00345
00346
00347 EPtiKeyQwerty1 = 0x31,
00348 EPtiKeyQwerty2 = 0x32,
00349 EPtiKeyQwerty3 = 0x33,
00350 EPtiKeyQwerty4 = 0x34,
00351 EPtiKeyQwerty5 = 0x35,
00352 EPtiKeyQwerty6 = 0x36,
00353 EPtiKeyQwerty7 = 0x37,
00354 EPtiKeyQwerty8 = 0x38,
00355 EPtiKeyQwerty9 = 0x39,
00356 EPtiKeyQwerty0 = 0x30,
00357
00358 EPtiKeyQwertyPlus = 0x2b,
00359 EPtiKeyQwertyMinus = EStdKeyMinus,
00360 EPtiKeyQwertyComma = EStdKeyComma,
00361 EPtiKeyQwertySemicolon = EStdKeySemiColon,
00362 EPtiKeyQwertyFullstop = EStdKeyFullStop,
00363 EPtiKeyQwertyHash = EStdKeyHash,
00364 EPtiKeyQwertySlash = EStdKeyForwardSlash,
00365 EPtiKeyQwertyApostrophe = EStdKeySingleQuote,
00366 EPtiKeyQwertySpace = EStdKeySpace,
00367 EPtiKeyQwertyAtCharacter = EStdKeySquareBracketRight,
00368 EPtiKeyQwertyLeftShift = EStdKeyLeftShift,
00369
00370 EPtiKeyQwertyA = 0x41,
00371 EPtiKeyQwertyB = 0x42,
00372 EPtiKeyQwertyC = 0x43,
00373 EPtiKeyQwertyD = 0x44,
00374 EPtiKeyQwertyE = 0x45,
00375 EPtiKeyQwertyF = 0x46,
00376 EPtiKeyQwertyG = 0x47,
00377 EPtiKeyQwertyH = 0x48,
00378 EPtiKeyQwertyI = 0x49,
00379 EPtiKeyQwertyJ = 0x4a,
00380 EPtiKeyQwertyK = 0x4b,
00381 EPtiKeyQwertyL = 0x4c,
00382 EPtiKeyQwertyM = 0x4d,
00383 EPtiKeyQwertyN = 0x4e,
00384 EPtiKeyQwertyO = 0x4f,
00385 EPtiKeyQwertyP = 0x50,
00386 EPtiKeyQwertyQ = 0x51,
00387 EPtiKeyQwertyR = 0x52,
00388 EPtiKeyQwertyS = 0x53,
00389 EPtiKeyQwertyT = 0x54,
00390 EPtiKeyQwertyU = 0x55,
00391 EPtiKeyQwertyV = 0x56,
00392 EPtiKeyQwertyW = 0x57,
00393 EPtiKeyQwertyX = 0x58,
00394 EPtiKeyQwertyY = 0x59,
00395 EPtiKeyQwertyZ = 0x5a
00396
00397
00398 , EPtiKeyQwertyChr = EStdKeyLeftFunc
00399
00400 };
00401
00402
00403
00437 enum TPtiEngineCapsBits
00438 {
00439 EWordCompletion = 0x01,
00440 EReordering = 0x02,
00441 ENextWordPrediction = 0x04,
00442 ESupportUserDictionaries = 0x08,
00443 ESupportSCTToneMarks = 0x10,
00444 ESupportCangjieInput = 0x20,
00445 EPreferedSpelling = 0x40,
00446 ESupportDualLanguage = 0x80,
00447 ESupportAutoSubstitution = 0x100
00448 };
00449
00450
00454 enum TPtiTextCase
00455 {
00456 EPtiCaseLower = 0,
00457 EPtiCaseUpper,
00458 EPtiCaseChrLower,
00459 EPtiCaseChrUpper,
00460 EPtiCaseFnLower,
00461 EPtiCaseFnUpper
00462 };
00463
00464
00465 enum TPtiCharConversion
00466 {
00467 EPtiSimplifiedToComplex = 0x01,
00468 EPtiUcs2ToUtf8 = 0x02,
00469 EPtiUcs2ToBig5 = 0x04,
00470 EPtiUcs2ToGB = 0x08,
00471 EPtiUtf8ToUcs2 = 0x10,
00472 EPtiKo2ToWc = 0x20,
00473 EPtiWcToKo2 = 0x30,
00474 EPtiBig5ToUcs2 = 0x40,
00475 EPtiComplexToSimplified = 0x80
00476 };
00477
00481 enum TPtiSpelling
00482 {
00483 EPtiStrokes = 0x01,
00484 EPtiPinyin = 0x02,
00485 EPtiBopomofo = 0x04,
00486 EPtiZhuyin = 0x08,
00487 EPtiCangJie = 0x10,
00488 EPtiEasyCangjie = 0x20,
00489 EPtiAdvCangjie = 0x40
00490 };
00491
00495 enum TPtiChineseVariant
00496 {
00497 EPtiChineseVariantPrc = 0,
00498 EPtiChineseVariantHk,
00499 EPtiChineseVariantTw
00500 };
00501
00507 enum TPtiEngineCommand
00508 {
00509 EPtiCommandNone,
00510 EPtiCommandUserActionLeft,
00511 EPtiCommandUserActionRight,
00512 EPtiCommandUserActionConvert,
00513 EPtiCommandUserActionPrevious,
00514 EPtiCommandUserActionLengthen,
00515 EPtiCommandUserActionShorten,
00516 EPtiCommandUserActionCancel,
00517 EPtiCommandUserActionComplete,
00518 EPtiCommandUserActionAllComplete,
00519 EPtiCommandUserActionGetCurrentIndexOfCandidates,
00520 EPtiCommandUserActionCompleteCandidate,
00521 EPtiCommandUserActionCompleteFull0,
00522 EPtiCommandUserActionCompleteFull1,
00523 EPtiCommandUserActionCompleteFull2,
00524 EPtiCommandUserActionCompleteFull3,
00525 EPtiCommandUserActionCompleteFull4,
00526 EPtiCommandUserActionCompleteFull5,
00527 EPtiCommandUserActionCompleteFull6,
00528 EPtiCommandUserActionCompleteFull7,
00529 EPtiCommandUserActionCompleteFull8,
00530 EPtiCommandUserActionCompleteFull9,
00531 EPtiCommandUserActionCompleteHalf0,
00532 EPtiCommandUserActionCompleteHalf1,
00533 EPtiCommandUserActionCompleteHalf2,
00534 EPtiCommandUserActionCompleteHalf3,
00535 EPtiCommandUserActionCompleteHalf4,
00536 EPtiCommandUserActionCompleteHalf5,
00537 EPtiCommandUserActionCompleteHalf6,
00538 EPtiCommandUserActionCompleteHalf7,
00539 EPtiCommandUserActionCompleteHalf8,
00540 EPtiCommandUserActionCompleteHalf9,
00541 EPtiCommandEnableToneMarks,
00542 EPtiCommandDisableToneMarks,
00543 EPtiCommandResetToneMark,
00544 EPtiCommandIncrementToneMark,
00545 EPtiCommandIncrementToneMarkOverrideInvalid,
00546 EPtiCommandReloadLearningInfo,
00547 EPtiCommandUserDictionaryDelaySaving,
00548 EPtiCommandUserDictionarySaveNow,
00549 EPtiCommandUserActionSetCurrentIndexOfCandidates,
00550 EPtiCommandUseLatinDefaultKeyMap,
00551 EPtiCommandUseLatinCaseUpperOnlyKeyMap,
00552 EPtiCommandUseLatinCaseLowerOnlyKeyMap,
00553 EPtiCommandResetLearningInfo,
00554 EPtiCommandPollQwertyDeadKeyRootFlag,
00555 EPtiCommandGetAndClearDeadKeyRootChar,
00556 EPtiCommandDeadKeyWaiting,
00557 EPtiCommandQueryAndClearGetAllFlag,
00558 EPtiCommandGetAndClearVowelSequence,
00559 EPtiCommandSetMultitapTimer,
00560 EPtiCommandVowelSeqFlag,
00561 EPtiCommandClearVowelSeq,
00562 EPtiCommandSetJapaneseQwertyFlags,
00563 EPtiCommandGetAndClearLastVietnameseChar,
00564 EPtiCommandSetVietnameseLastChar,
00565 EPtiCommandQueryReplacePrevious,
00566 EPtiCommandSetLastKeyForVietnamese,
00567 EPtiCommandResetVietnameseVowelSeqAndToneMark,
00568 EPtiCommandGetVietnameseLastKey,
00569 EPtiCommandDoubleWideEntry,
00570 EPtiCommandSetClearFunction,
00571 EPtiCommandUserActionRetroActiveCandidateHalf,
00572 EPtiCommandUserActionRetroActiveCandidateFull,
00573 EPtiCommandUserActionRetroActiveClear,
00574 EPtiCommandUserActionRetroActiveCommit,
00575 EPtiCommandAppendCharacter,
00576 EPtiCommandBackSpaceByForce,
00577 EPtiCommandGetPhoneticText,
00578 EPtiCommandClearPhoneticBuffer,
00579 EPtiCommandBreakSyllable,
00580 EPtiCommandAllowPictographCandidate,
00581 EPtiCommandLoopback,
00582 EPtiCommandSetAutoSubstitution,
00583 EPtiCommandAddAutoSubstEntry,
00584 EPtiCommandDeleteAutoSubstEntry,
00585 EPtiCommandNumberOfAutoSubstEntries,
00586 EPtiCommandGetAutoSubstEntry,
00587 EPtiCommandFindAutoSubstEntry,
00588 EPtiCommandUncommitWord,
00589 EPtiCommandEnableAutoCompletion,
00590 EPtiCommandDisableAutoCompletion,
00591 EPtiCommandSetCorrectionLevel,
00592 EPtiCommandGetAutoCompletionTailLength,
00593 EPtiCommandLockCurrentCandidate,
00594 EPtiCommandSetProactiveCorrection,
00595 EPtiCommandIsExactKnownWord,
00596 EPtiCommandSetAutoCompletion,
00597 EPtiCommandSetNumberCandidateStatus,
00598 EPtiCommandSetAutoCompletionMaxLength,
00599 EPtiCommandMarkAutoCapitalized,
00600 EPtiCommandUserActionGetIndexOfSecondaryCandidate,
00601 EPtiCommandAddPhrase,
00602 EPtiCommandSetSecondaryInputLanguage,
00603 EPtiCommandSetFlagToUpdateCandidates,
00604 EPtiCommandSetCursorCrossedMaxLength,
00605 EPtiCommandResetCursorCrossedMaxLength,
00606 EPtiCommandUserActionSetIndexOfActiveCandidate
00607 };
00608
00613 class TPtiAutoSubstBinding
00614 {
00615 public:
00616 TInt iIndex;
00617 TBuf<KMaxAutoSubstStringLength> iShortcut;
00618 TBuf<KMaxAutoSubstStringLength> iSubstitution;
00619 };
00620
00621
00626 class TPtiLangName
00627 {
00628 public:
00629 TInt iLanguageCode;
00630 TBuf<KMaxLanguageNameLength> iName;
00631 };
00632
00633
00639 #define ELangNumeric 0x5000
00640
00644 class MPtiCoreInfo
00645 {
00646 public:
00655 virtual TBool WordCompletion() const = 0;
00656
00665 virtual TBool Reordering() const = 0;
00666
00673 virtual TInt MaximumWordLength() const = 0;
00674
00683 virtual TInt MaximumNumberOfCandidates() const = 0;
00684
00693 virtual TBool NextWordPrediction() const = 0;
00694
00701 virtual TPtrC VendorString() const = 0;
00702
00710 virtual TUint32 CapsBits() const = 0;
00711
00718 virtual TInt32 Uid() const = 0;
00719
00727 virtual TUint32 CharConversions() const = 0;
00728
00736 virtual TUint32 Spellings() const = 0;
00737 };
00738
00739
00740 class TPtiCoreInfo : public MPtiCoreInfo
00741 {
00742 public:
00743 inline TBool WordCompletion() const;
00744 inline TBool Reordering() const;
00745 inline TInt MaximumWordLength() const;
00746 inline TInt MaximumNumberOfCandidates() const;
00747 inline TBool NextWordPrediction() const;
00748 inline TPtrC VendorString() const;
00749 inline TInt32 Uid() const;
00750 inline TUint32 CharConversions() const;
00751 inline TUint32 Spellings() const;
00752
00753 inline TUint32 CapsBits() const;
00754 inline void SetCapsBits(TUint32 aBits);
00755 inline void SetVendorString(const TDesC& aStr);
00756 inline void SetMaxWordLength(TInt aMaxLen);
00757 inline void SetUid(TInt32 aUid);
00758 inline void SetSpellings(TUint32 aSpellings);
00759 inline void SetMaxNumberOfCandidates(TInt aMax);
00760 inline void SetCharConversions(TUint32 aConvs);
00761
00762 private:
00763 TUint32 iCapsBits;
00764 TPtrC iVendorIdStr;
00765 TInt iMaxWordLength;
00766 TInt iMaxNumberOfCandidates;
00767 TInt32 iUid;
00768 TUint32 iCharConversions;
00769 TUint32 iSpellings;
00770 };
00771
00772
00773 #define KPtiEngineChineseSeparator 0x0027
00774
00775
00776 enum
00777 {
00778 KPtiPinyinTone0 = 0x02C9,
00779 KPtiPinyinTone1 = 0x02CA,
00780 KPtiPinyinTone2 = 0x02C7,
00781 KPtiPinyinTone3 = 0x02CB,
00782 KPtiPinyinTone4 = 0x02D9
00783 };
00784
00785
00786 enum
00787 {
00788 KPtiZhuyinTone0 = 0x0020,
00789 KPtiZhuyinTone1 = 0x02CA,
00790 KPtiZhuyinTone2 = 0x02C7,
00791 KPtiZhuyinTone3 = 0x02CB,
00792 KPtiZhuyinTone4 = 0x02D9
00793 };
00794
00795
00796 class TPtiNumericKeyBinding
00797 {
00798 public:
00799 TUint16 iChar;
00800 TPtiKey iKey;
00801 TPtiTextCase iCase;
00802 };
00803
00804
00805
00806 typedef struct TRecognitionRangeTag
00807 {
00808 TLanguage iLanguage;
00809 TUint iSubRange;
00810 } TRecognitionRange;
00811
00812
00813 enum TRecognitionSubRanges
00814 {
00815 EPtiRangePRCChinese,
00816 EPtiRangeHKChinese,
00817 EPtiRangeTWChinese,
00818 EPtiRangeLatin,
00819 EPtiRangeSymbol,
00820 EPtiRangeNumber,
00821 EPtiRangeNative,
00822 EPtiRangeHiraganaKanji,
00823 EPtiRangeKatakana,
00824 EPtiRangeFullWidthKatakana,
00825 EPtiRangeFullWidthEnglish,
00826 EPtiRangeFullWidthNumeric,
00827 EPtiRangeHiraganaOnly,
00828 EPtiRangeNativeNumber,
00829 EPtiRangeNone
00830 };
00831
00832
00833 enum TLatinLetterOrder
00834 {
00835 EUpperFirst,
00836 ELowerFirst
00837 };
00838
00839
00840
00841
00842
00843 enum TPtiKeyboardType
00844 {
00845 EPtiKeyboardNone,
00846
00850 EPtiKeyboard12Key,
00851
00855 EPtiKeyboardQwerty4x12,
00856
00860 EPtiKeyboardQwerty4x10,
00861
00865 EPtiKeyboardQwerty3x11,
00866
00870 EPtiKeyboardHalfQwerty,
00871
00877 EPtiKeyboardCustomQwerty,
00878
00879 EPtiKeyboardMaxLayout
00880 };
00881
00882 #include "PtiDefs.inl"
00883
00884 #endif // _PTI_DEFS_H
00885
00886