2 * Copyright (c) 2003-2006 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Global PtiEngine definitions
36 #ifdef RD_HINDI_PHONETIC_INPUT
37 /* Indic Phonetic input */
40 * Defines the state of the syllable. This is used by FEP for either committing
41 * the inline text or updating the inline text.
46 EIndicSyllableStateFirst,
47 EIndicSyllableStateInsideSyllable,
48 EIndicSyllableStateSyllableBroken,
49 EIndicSyllableStateLast
54 * This is a structure that abstracts the phonetic argument and the response
55 * from the Indic phonetic core in a structure.
62 TSyllableState iState;
66 const TInt KMaxLanguageNameLength = 50;
67 const TInt KMaxAutoSubstStringLength = 32;
69 const TInt KErrPtiEngineBase = (-1000); //based on the value of leave in PtiEngine
74 KErrNoActiveLanguage = KErrPtiEngineBase-1,
75 KErrLanguageNotFound = KErrPtiEngineBase-2,
76 KErrNoSuitableCore = KErrPtiEngineBase-3,
77 KErrNotAllowed = KErrPtiEngineBase-4,
78 KErrTooLongWord = KErrPtiEngineBase-5,
79 KErrInvalidWord = KErrPtiEngineBase-6,
80 KErrTooLongReading = KErrPtiEngineBase-7,
81 KErrInvalidReading = KErrPtiEngineBase-8,
82 KErrUserDic = KErrPtiEngineBase-9,
83 KErrInternalCoreError = KErrPtiEngineBase-10,
84 KErrLengthMismatch = KErrPtiEngineBase-11
89 * Enumerations for all the possible input modes supported by PtiEngine.
90 * The modes actually available in the device depend on core object, resource
91 * and keyboard configuration.
92 * Here are short descriptions:
94 * EPtiEngineMultitapping
95 * Traditional text input method for latin-like languages, where
96 * a list of characters is associated to each keypad keys
97 * and user cycles through associated characters by consecutive key presses.
99 * EPtiEnginePredictive
100 * Predictive text input mode, where user presses only one key press per
101 * character and the prediction engine provides a list of candidate words
102 * associated top that key sequence.
104 * EPtiEngineWordCompletion
105 * This is same as EPtiEnginePredictive, except that prediction engine
106 * will include also complete words containing more characters than
107 * the number of key presses in current key sequence.
110 * This is numeric input mode. All the languages suppor it, since it uses
111 * static keymappings built directly into PtiEngine. It works in same way
112 * as EPtiEngineMultitapping, except that keymapping data contains
113 * only number mode characters.
116 * Standard qwerty-keyboard input mode for latin-like languages.
119 * Chinese PinYin input mode for ITU-T keypad.
122 * Chinese Strokes input mode for ITU-T keypad.
125 * Chinese ZhuYin input mode for ITU-T keypad.
127 * EPtiEngineHirakanaKanji
128 * Japanese Hiragana/Kanji input mode.
130 * EPtiEngineHirakanaKanjiPredictive
131 * Predictive Japanese Hiragana/Kanji input mode.
134 * Japanese Katakana input mode.
136 * EPtiEngineFullWitdthKatakana
137 * Japanese full width Katakana input mode.
139 * EPtiEngineFullWitdthKatakana
140 * Japanese full width numeric input mode.
142 * EPtiEngineFullWitdthAlphabet
143 * Japanese full width alphabet input mode.
146 * Japanese Hiragana input mode.
148 * EPtiEnginePinyinByPhrase
149 * Chinese Pinyin phrase input. This is same as EPtiEnginePinyin, execpt that
150 * input string may contain pinyin words for several chinese characters.
152 * EPtiEngineZhuyinByPhrase
153 * Chinese Zinyin phrase input. This is same as EPtiEngineZhuyin, execpt that
154 * input string may contain zhuyin sequences for several chinese characters.
156 * EPtiEngineZhuyinQwerty
157 * Chinese Zhuyin input for qwerty keyboard.
159 * EPtiEngineZhuyinPhraseQwerty
160 * Chinese Zinyin phrase input for qwerty keyboard. This is same as EPtiEngineZhuyinQwerty,
161 * execpt that input string may contain zhuyin sequences for several chinese characters.
163 * EPtiEnginePinyinQwerty
164 * Chinese Pinyin input for qwerty keyboard.
166 * PtiEnginePinyinPhraseQwerty
167 * Same as EPtiEnginePinyinByPhrase but for qwerty keyboard
169 * EPtiEngineStrokeQwerty
170 * Same as EPtiEngineStroke but for qwerty keyboard
172 * EPtiEngineNormalCangjieQwerty
173 * Normal Chinese CangJie input for qwerty keyboard
174 * (CangJie is available only for qwerty).
176 * EPtiEngineEasyCangjieQwerty
177 * Easy Chinese CangJie input for qwerty keyboard
178 * (CangJie is available only for qwerty).
180 * EPtiEngineAdvCangjieQwerty
181 * Advanced Chinese CangJie input for qwerty keyboard
182 * (CangJie is available only for qwerty).
184 * EPtiEngineHiraganaKanjiQwerty
185 * Japanese Hiragana/Kanji input for qwerty keyboard.
187 * EPtiEngineHiraganaKanjiPredictiveQwerty
188 * Japanese predictive Hiragana/Kanji input for qwerty keyboard
190 * EPtiEngineKatakanaQwerty
191 * Japanese Half-width Katakana input for qwerty keyboard.
193 * EPtiEngineFullWidthKatakanaQwerty
194 * Japanese Full-width Katakana input for qwerty keyboard.
196 * EPtiEngineFullWidthNumericQwerty
197 * Japanese Full-width Alphabet input for qwerty keyboard.
199 * EPtiEngineFullWidthAlphabetQwerty
200 * Japanese Full-width Alphabet input for qwerty keyboard.
202 * EPtiEngineHiraganaQwerty
203 * Japanese Hiragana input for qwerty keyboard.
205 * EPtiEngineStrokeByPhrase, // Stroke phrase input.
206 * Chinese Stroke input for ITU-T keypad. Phrasal version.
208 * EPtiEngineStrokePhraseQwerty
209 * Chinese Stroke input for qwerty keyboard. Phrasal version.
211 * EPtiEngineQwertyPredictive, // "Sloppy type" input for qwerty keyboard.
212 * Intelligent qwerty input. Used for word completion and spell
213 * correction features for qwerty keyboard.
215 * EPtiEngineHalfQwerty
216 * Basic multitaping style text input for half-qwerty keyboard. The functionality
217 * of half-qwerty keyboard is same as conventional itu-t phone keypad, except that
218 * each key is associated with two basic characters (instead of three or four
219 * as in itu-t keypad). Character mapping is also organized to follow qwerty
220 * layout (instead of alphabetical order as in itu-t keypad).
222 * EPtiEngineHalfQwertyPredictive,
223 * Predictive text input for half-qwerty keyboard. The functionality
224 * of half-qwerty keyboard is same as conventional itu-t phone keypad, except that
225 * each key is associated with two basic characters(instead of three or four
226 * as in itu-t keypad). . Character mapping is also organized to follow qwerty
227 * layout (instead of alphabetical order as in itu-t keypad). This input mode
228 * is essentially same as EPtiEngineWordCompletion but uses half-qwerty keyboard.
230 * EPtiEngineInputModeIndicPhoneticMultitap
231 * Hindi phonetic input for itu-t keypad.
233 * EPtiEngineInputModeIndicPhoneticQwerty
234 * Hindi phonetic input for qwerty keyboard.
236 * EPtiEngineInputModeZhuyinMiniQwertyFind
237 * Zhuyin multitap input method for mini qwerty symbol find.
240 enum TPtiEngineInputMode
242 EPtiEngineInputModeNone = 0,
243 EPtiEngineMultitapping, // Basic multitapping input for latin languages.
244 EPtiEnginePredictive, // Predictive input for latin languages.
245 EPtiEngineWordCompletion, // Predictive input with word completion for latin languages.
246 EPtiEngineNumeric, // Latin numeric input mode.
247 EPtiEngineQwerty, // Basic qwerty input mode.
248 EPtiEnginePinyin, // Chinese pinyin mode.
249 EPtiEngineStroke, // Chinese stroke mode.
250 EPtiEngineZhuyin, // Chinese zhuyin mode.
251 EPtiEngineHiraganaKanji, // Hiragana/Kanji mode.
252 EPtiEngineHiraganaKanjiPredictive, // Predictive Hiragana/Kanji mode.
253 EPtiEngineKatakana, // Half-width Katakana mode.
254 EPtiEngineFullWidthKatakana, // Full-width Katakana mode.
255 EPtiEngineFullWidthNumeric, // Full-width Alphabet mode (for Japanese input).
256 EPtiEngineFullWidthAlphabet, // Full-width Alphabet mode (for Japanese input).
257 EPtiEngineHiragana, // Hiragana only mode.
258 EPtiEnginePinyinByPhrase, // Pinyin phrase input.
259 EPtiEngineZhuyinByPhrase, // Zhuyin phrase input.
260 EPtiEngineZhuyinQwerty, // Zhuyin qwerty input.
261 EPtiEngineZhuyinPhraseQwerty, // Zhuyin phrase qwerty input.
262 EPtiEnginePinyinQwerty, // Pinyin qwerty input.
263 EPtiEnginePinyinPhraseQwerty, // Pinyin phrase qwerty input.
264 EPtiEngineStrokeQwerty, // Stroke qwerty input.
265 EPtiEngineNormalCangjieQwerty, // Normal Cangjie qwerty input
266 EPtiEngineEasyCangjieQwerty, // Easy Cangjie qwerty input
267 EPtiEngineAdvCangjieQwerty, // Advanced Cangjie qwerty input
268 EPtiEngineHiraganaKanjiQwerty, // Hiragana/Kanji qwerty input mode.
269 EPtiEngineHiraganaKanjiPredictiveQwerty, // Predictive Hiragana/Kanji qwerty input mode.
270 EPtiEngineKatakanaQwerty, // Half-width Katakana qwerty input mode.
271 EPtiEngineFullWidthKatakanaQwerty, // Full-width Katakana qwerty input mode.
272 EPtiEngineFullWidthNumericQwerty, // Full-width Alphabet qwerty input mode (for Japanese input).
273 EPtiEngineFullWidthAlphabetQwerty, // Full-width Alphabet qwerty input mode (for Japanese input).
274 EPtiEngineHiraganaQwerty, // Hiragana only qwerty input mode.
275 EPtiEnginePinyinVkb, // Chinese pinyin mode.
276 EPtiEngineStrokeVkb, // Chinese stroke mode.
277 EPtiEngineZhuyinVkb, // Chinese zhuyin mode.
278 EPtiEngineStrokeByPhrase, // Stroke phrase input.
279 EPtiEngineStrokePhraseQwerty, // Stroke phrase qwerty input.
280 EPtiEngineHiraganaKanjiVkb, // Hiragana/Kanji mode for VKB.
281 EPtiEngineHiraganaKanjiPredictiveVkb, // Predictive Hiragana/Kanji mode for VKB.
282 EPtiEngineHiraganaKanjiHwr, // Hiragana/Kanji mode for HWR.
283 EPtiEngineHiraganaKanjiPredictiveHwr, // Predictive Hiragana/Kanji mode for HWR.
284 EPtiEngineKatakanaVkb, // Half-width Katakana mode for VKB.
285 EPtiEngineFullWidthKatakanaVkb, // Full-width Katakana mode for VKB.
286 EPtiEngineHiraganaVkb, // Hiragana only qwerty input mode for VKB.
287 EPtiEngineNormalCangjieVkb,
288 EPtiEngineEasyCangjieVkb,
289 EPtiEngineAdvCangjieVkb,
290 EPtiEngineInputModeIndicPhoneticMultitap,
291 EPtiEngineInputModeIndicPhoneticQwerty,
292 EPtiEngineHiraganaKanjiVkbRomaji, // Hiragana/Kanji mode for VKB/FSQ Romaji input.
293 EPtiEngineHiraganaKanjiPredictiveVkbRomaji, // Predictive Hiragana/Kanji mode for VKB/FSQ Romaji input.
294 EPtiEngineQwertyPredictive, // "Sloppy type" input for qwerty keyboard.
295 EPtiEngineHalfQwerty,
296 EPtiEngineHalfQwertyPredictive,
297 EPtiEngineInputModeQwertyPredictive ,
298 EPtiEngineInputModeZhuyinMiniQwertyFind,
299 EPtiEnginePinyinPhraseHalfQwerty,
300 EPtiEngineStrokePhraseHalfQwerty,
301 EPtiEngineZhuyinPhraseHalfQwerty,
302 EPtiEngineMultitappingKorean, // Basic multitapping input for korean language.
303 EPtiEngineQwertyKorean,
304 EPtiEngineMaxInputModes = EPtiEngineQwertyKorean
309 * Predictive qwerty error correction levels.
311 enum TPtiErrorCorrectionLevel
313 EPtiErrorCorrectionLevelOff = 0,
314 EPtiErrorCorrectionLevelLow = 1,
315 EPtiErrorCorrectionLevelHigh = 2
320 * Key enumerations for conventional (ITU-T) and qwerty keyboards.
321 * Constant names for qwerty keypad keys are named after scan code
322 * values of a device using English language keymappings. The
323 * actual character that will be inserted into editor buffer depends on
324 * keymappings of currently selected input language and may be something else
325 * than what enum name suggests. For example
326 * non-shifted EPtiKeyQwertyHash produces '#'-character if input language is
327 * English, but will produce '+'-character if
328 * input language is Danish, Norwegian, Swedish or Finnish.
329 * The key coordinates on standard 4x12 qwerty keypad are given in
350 EPtiKeyPunct = EPtiKey1,
351 EPtiKeyABC = EPtiKey2,
352 EPtiKeyDEF = EPtiKey3,
353 EPtiKeyGHI = EPtiKey4,
354 EPtiKeyJKL = EPtiKey5,
355 EPtiKeyMNO = EPtiKey6,
356 EPtiKeyPQRS = EPtiKey7,
357 EPtiKeyTUV = EPtiKey8,
358 EPtiKeyWXYZ = EPtiKey9,
361 EPtiKeyQwerty1 = 0x31,
362 EPtiKeyQwerty2 = 0x32,
363 EPtiKeyQwerty3 = 0x33,
364 EPtiKeyQwerty4 = 0x34,
365 EPtiKeyQwerty5 = 0x35,
366 EPtiKeyQwerty6 = 0x36,
367 EPtiKeyQwerty7 = 0x37,
368 EPtiKeyQwerty8 = 0x38,
369 EPtiKeyQwerty9 = 0x39,
370 EPtiKeyQwerty0 = 0x30,
372 EPtiKeyQwertyPlus = 0x2b,
373 EPtiKeyQwertyMinus = EStdKeyMinus,
374 EPtiKeyQwertyComma = EStdKeyComma,
375 EPtiKeyQwertySemicolon = EStdKeySemiColon,
376 EPtiKeyQwertyFullstop = EStdKeyFullStop,
377 EPtiKeyQwertyHash = EStdKeyHash,
378 EPtiKeyQwertySlash = EStdKeyForwardSlash,
379 EPtiKeyQwertyApostrophe = EStdKeySingleQuote,
380 EPtiKeyQwertySpace = EStdKeySpace,
381 EPtiKeyQwertyAtCharacter = EStdKeySquareBracketRight,
382 EPtiKeyQwertyLeftShift = EStdKeyLeftShift, // Needed only for special cases.
384 EPtiKeyQwertyA = 0x41,
385 EPtiKeyQwertyB = 0x42,
386 EPtiKeyQwertyC = 0x43,
387 EPtiKeyQwertyD = 0x44,
388 EPtiKeyQwertyE = 0x45,
389 EPtiKeyQwertyF = 0x46,
390 EPtiKeyQwertyG = 0x47,
391 EPtiKeyQwertyH = 0x48,
392 EPtiKeyQwertyI = 0x49,
393 EPtiKeyQwertyJ = 0x4a,
394 EPtiKeyQwertyK = 0x4b,
395 EPtiKeyQwertyL = 0x4c,
396 EPtiKeyQwertyM = 0x4d,
397 EPtiKeyQwertyN = 0x4e,
398 EPtiKeyQwertyO = 0x4f,
399 EPtiKeyQwertyP = 0x50,
400 EPtiKeyQwertyQ = 0x51,
401 EPtiKeyQwertyR = 0x52,
402 EPtiKeyQwertyS = 0x53,
403 EPtiKeyQwertyT = 0x54,
404 EPtiKeyQwertyU = 0x55,
405 EPtiKeyQwertyV = 0x56,
406 EPtiKeyQwertyW = 0x57,
407 EPtiKeyQwertyX = 0x58,
408 EPtiKeyQwertyY = 0x59,
409 EPtiKeyQwertyZ = 0x5a
412 , EPtiKeyQwertyChr = EStdKeyLeftFunc // key (4, 4)
419 * Enumerations for PtiCore capabilities. These can be queries through
420 * MPtiCoreInfo::CapsBits().
421 * Here are descriptions:
424 * The core object supports word completion -feature.
427 * The core object supports user dictionary reordering. This feature means that
428 * most commonly used words are moved up in prediction candidate
431 * ENextWordPrediction
432 * The core supports next word prediction feature. When this feature is
433 * enabled, prediction engine tries to guess next word based on previous word(s).
435 * ESupportUserDictionaries
436 * The core supports supports user dictionaries.
438 * ESupportSCTToneMarks
440 * ESupportCangjieInput
441 * The core object supports Chinese CangJie input.
443 * ESupportDualLanguage
444 * The core object supports dual language preditcion.
446 * ESupportAutoSubstitution
447 * The core object supports auto-substitution feature. This feature
448 * automatically expands predefined string to longer string.
449 * ie. "l8r" -> "later"
451 enum TPtiEngineCapsBits
453 EWordCompletion = 0x01,
455 ENextWordPrediction = 0x04,
456 ESupportUserDictionaries = 0x08,
457 ESupportSCTToneMarks = 0x10,
458 ESupportCangjieInput = 0x20,
459 EPreferedSpelling = 0x40,
460 ESupportDualLanguage = 0x80,
461 ESupportAutoSubstitution = 0x100
466 * Text case defintions.
470 EPtiCaseLower = 0, // Normal lower case input
471 EPtiCaseUpper, // Normal upper case input.
472 EPtiCaseChrLower, // Qwerty chr-key lower case input.
473 EPtiCaseChrUpper, // Qwerty chr-key upper case input.
474 EPtiCaseFnLower, // Qwerty fn-key lower case input.
475 EPtiCaseFnUpper, // Qwerty fn-key upper case input.
480 enum TPtiCharConversion
482 EPtiSimplifiedToComplex = 0x01, // Chinese simplified to Chinese complex
483 EPtiUcs2ToUtf8 = 0x02, // Unicode to utf8
484 EPtiUcs2ToBig5 = 0x04, // Unicode to big5
485 EPtiUcs2ToGB = 0x08, // Unicode to Guo-Biao
486 EPtiUtf8ToUcs2 = 0x10, // Utf8 to Unicode
487 EPtiKo2ToWc = 0x20, // KSC5601 to Hangul Syllable
488 EPtiWcToKo2 = 0x30, // Hangul Syllable to KSC5601
489 EPtiBig5ToUcs2 = 0x40, // Big5 to Unicode
490 EPtiComplexToSimplified = 0x80 // Chinese complex to Chinese simplified
494 * Enumerates supported spelling types for CPtiEngine::GetSpelling method.
503 EPtiEasyCangjie = 0x20,
504 EPtiAdvCangjie = 0x40
508 * Enumerates different Chinese variants.
510 enum TPtiChineseVariant
512 EPtiChineseVariantPrc = 0,
513 EPtiChineseVariantHk,
518 * Command definitions for CPtiEngine::HandleCommandL api methods. Many of these
519 * are for internal communication between PtiEngine framework and a specific
520 * core object and there for not documented.
522 enum TPtiEngineCommand
525 EPtiCommandUserActionLeft,
526 EPtiCommandUserActionRight,
527 EPtiCommandUserActionConvert,
528 EPtiCommandUserActionPrevious,
529 EPtiCommandUserActionLengthen,
530 EPtiCommandUserActionShorten,
531 EPtiCommandUserActionCancel,
532 EPtiCommandUserActionComplete,
533 EPtiCommandUserActionAllComplete,
534 EPtiCommandUserActionGetCurrentIndexOfCandidates,
535 EPtiCommandUserActionCompleteCandidate,
536 EPtiCommandUserActionCompleteFull0,
537 EPtiCommandUserActionCompleteFull1,
538 EPtiCommandUserActionCompleteFull2,
539 EPtiCommandUserActionCompleteFull3,
540 EPtiCommandUserActionCompleteFull4,
541 EPtiCommandUserActionCompleteFull5,
542 EPtiCommandUserActionCompleteFull6,
543 EPtiCommandUserActionCompleteFull7,
544 EPtiCommandUserActionCompleteFull8,
545 EPtiCommandUserActionCompleteFull9,
546 EPtiCommandUserActionCompleteHalf0,
547 EPtiCommandUserActionCompleteHalf1,
548 EPtiCommandUserActionCompleteHalf2,
549 EPtiCommandUserActionCompleteHalf3,
550 EPtiCommandUserActionCompleteHalf4,
551 EPtiCommandUserActionCompleteHalf5,
552 EPtiCommandUserActionCompleteHalf6,
553 EPtiCommandUserActionCompleteHalf7,
554 EPtiCommandUserActionCompleteHalf8,
555 EPtiCommandUserActionCompleteHalf9,
556 EPtiCommandEnableToneMarks,
557 EPtiCommandDisableToneMarks,
558 EPtiCommandResetToneMark,
559 EPtiCommandIncrementToneMark,
560 EPtiCommandIncrementToneMarkOverrideInvalid,
561 EPtiCommandReloadLearningInfo,
562 EPtiCommandUserDictionaryDelaySaving,
563 EPtiCommandUserDictionarySaveNow,
564 EPtiCommandUserActionSetCurrentIndexOfCandidates,
565 EPtiCommandUseLatinDefaultKeyMap,
566 EPtiCommandUseLatinCaseUpperOnlyKeyMap,
567 EPtiCommandUseLatinCaseLowerOnlyKeyMap,
568 EPtiCommandResetLearningInfo,
569 EPtiCommandPollQwertyDeadKeyRootFlag, // Indicates that dead key root char was added to buffer.
570 EPtiCommandGetAndClearDeadKeyRootChar,
571 EPtiCommandDeadKeyWaiting,
572 EPtiCommandQueryAndClearGetAllFlag,
573 EPtiCommandGetAndClearVowelSequence,
574 EPtiCommandSetMultitapTimer, // Set multitap timer for japanese varint only
575 EPtiCommandVowelSeqFlag,
576 EPtiCommandClearVowelSeq,
577 EPtiCommandSetJapaneseQwertyFlags, // Set Japanese Qwerty flags for japanese varint only
578 EPtiCommandGetAndClearLastVietnameseChar,
579 EPtiCommandSetVietnameseLastChar,
580 EPtiCommandQueryReplacePrevious,
581 EPtiCommandSetLastKeyForVietnamese,
582 EPtiCommandResetVietnameseVowelSeqAndToneMark,
583 EPtiCommandGetVietnameseLastKey,
584 EPtiCommandDoubleWideEntry,
585 EPtiCommandSetClearFunction, // Set the behavior of clear key for japanese varint only
586 EPtiCommandUserActionRetroActiveCandidateHalf,
587 EPtiCommandUserActionRetroActiveCandidateFull,
588 EPtiCommandUserActionRetroActiveClear,
589 EPtiCommandUserActionRetroActiveCommit,
590 EPtiCommandAppendCharacter, // Append a character for Japanese varint only
591 EPtiCommandBackSpaceByForce, // BackSpace by force for Japanese varint only
592 EPtiCommandGetPhoneticText,
593 EPtiCommandClearPhoneticBuffer,
594 EPtiCommandBreakSyllable,
595 EPtiCommandAllowPictographCandidate, // Allow the candidates with pictograph cahracter for Japanese variant only
596 EPtiCommandLoopback, // Loop back input character (Loop back: c->b->a)
597 EPtiCommandSetAutoSubstitution,
598 EPtiCommandAddAutoSubstEntry, // TPtiAutoSubstBinding passed in aParams.
599 EPtiCommandDeleteAutoSubstEntry, // TPtiAutoSubstBinding passed in aParams.
600 EPtiCommandNumberOfAutoSubstEntries,
601 EPtiCommandGetAutoSubstEntry, // TPtiAutoSubstBinding passed in aParams.
602 EPtiCommandFindAutoSubstEntry, // TPtiAutoSubstBinding* passed in aParams.
603 EPtiCommandUncommitWord,
604 EPtiCommandEnableAutoCompletion,
605 EPtiCommandDisableAutoCompletion,
606 EPtiCommandSetCorrectionLevel, // TErrorCorrectionLevel* passed in aParams.
607 EPtiCommandGetAutoCompletionTailLength, // TInt* passed in aParams for output.
608 EPtiCommandLockCurrentCandidate,
609 EPtiCommandSetProactiveCorrection, // TBool passed in aParams
610 EPtiCommandIsExactKnownWord,
611 EPtiCommandSetAutoCompletion,
612 EPtiCommandSetNumberCandidateStatus, //
613 EPtiCommandSetAutoCompletionMaxLength, // Param is integer. Sets maximum lenght of ato completed word. Zero == no limit.
614 EPtiCommandMarkAutoCapitalized, // No parameters.
615 EPtiCommandUserActionGetIndexOfSecondaryCandidate, // index of secondary candidate, TInt* passed in param
616 EPtiCommandAddPhrase, // Add new phrase for next word prediction. const TDesC* passed in param.
617 EPtiCommandSetSecondaryInputLanguage,
618 EPtiCommandSetFlagToUpdateCandidates,
619 EPtiCommandSetCursorCrossedMaxLength, // sets when cursor crosses max words length in editor
620 EPtiCommandResetCursorCrossedMaxLength,
621 EPtiCommandUserActionSetIndexOfActiveCandidate,
622 EPtiCommandAddWordToUDBWithoutPunctMark,
623 EPtiCommandGetSecondaryCandidate,
624 EPtiCommandAutoCompletionOnToOff //to signify that autocompletion is set from on to off in between typing
628 * A convinience class for auto substitution related EPtiCommands. Needed
629 * only in core object and framework code.
631 class TPtiAutoSubstBinding
635 TBuf<KMaxAutoSubstStringLength> iShortcut;
636 TBuf<KMaxAutoSubstStringLength> iSubstitution;
641 * A structure for binding language name and language code.
642 * only in core object and framework code.
648 TBuf<KMaxLanguageNameLength> iName;
653 * This is language code for 'numeric' language.
654 * It is langugae object which is always available and
655 * has only numeric input mode.
657 #define ELangNumeric 0x5000
660 * An interface class for accessing core info attributes.
666 * Returns a boolean value indicating whether the word completion
667 * feature is supported by the core object in question
670 * @return ETrue if core object supports word completion feature.
673 virtual TBool WordCompletion() const = 0;
676 * Returns a boolean value indicating whether the user dictionary
677 * re-ordering feature is supported by the core object in question.
680 * @return ETrue if core object supports re-ordering feature.
683 virtual TBool Reordering() const = 0;
686 * Returns maximum length of single word this core object is able to produce.
689 * @return The maximum word length.
691 virtual TInt MaximumWordLength() const = 0;
694 * Returns the maximum number of prediction candidates the core object
695 * is able to produce for any input sequence. Doesn't apply for
696 * Chinese and Japanese modes.
699 * @return The maximum number of candidates.
701 virtual TInt MaximumNumberOfCandidates() const = 0;
704 * Returns a boolean value indicating whether the next word prediction feature
705 * supported by the core object in question.
708 * @return ETrue if next wrod prediction is supported.
711 virtual TBool NextWordPrediction() const = 0;
714 * Returns core object vendor specific id string.
717 * @return Vendor specific id string.
719 virtual TPtrC VendorString() const = 0;
722 * Returns a bit vector containing flags for various core object features.
723 * See TPtiEngineCapsBits for list of specified bits.
726 * @return A bit vector containing flags for various core object features.
728 virtual TUint32 CapsBits() const = 0;
731 * Returns uid value for core object.
734 * @return Core object uid as an integer value.
736 virtual TInt32 Uid() const = 0;
739 * Returns a bitvector containing flags for available character conversion
740 * methods. See TPtiCharConversion for list of specified bits.
743 * @return A bit vector containing flags for available character conversions.
745 virtual TUint32 CharConversions() const = 0;
748 * Returns a bitvector containing flags for available spelling conversion
749 * methods. See TPtiSpelling for list of specified bits.
752 * @return A bit vector containing flags for available spelling conversions.
754 virtual TUint32 Spellings() const = 0;
758 class TPtiCoreInfo : public MPtiCoreInfo
761 inline TBool WordCompletion() const;
762 inline TBool Reordering() const;
763 inline TInt MaximumWordLength() const;
764 inline TInt MaximumNumberOfCandidates() const;
765 inline TBool NextWordPrediction() const;
766 inline TPtrC VendorString() const;
767 inline TInt32 Uid() const;
768 inline TUint32 CharConversions() const;
769 inline TUint32 Spellings() const;
771 inline TUint32 CapsBits() const;
772 inline void SetCapsBits(TUint32 aBits);
773 inline void SetVendorString(const TDesC& aStr);
774 inline void SetMaxWordLength(TInt aMaxLen);
775 inline void SetUid(TInt32 aUid);
776 inline void SetSpellings(TUint32 aSpellings);
777 inline void SetMaxNumberOfCandidates(TInt aMax);
778 inline void SetCharConversions(TUint32 aConvs);
784 TInt iMaxNumberOfCandidates;
786 TUint32 iCharConversions;
791 #define KPtiEngineChineseSeparator 0x0027
793 // Tone marks for pinyin input
796 KPtiPinyinTone0 = 0x02C9,
797 KPtiPinyinTone1 = 0x02CA,
798 KPtiPinyinTone2 = 0x02C7,
799 KPtiPinyinTone3 = 0x02CB,
800 KPtiPinyinTone4 = 0x02D9
803 // Tone marks for zhuyin input
806 KPtiZhuyinTone0 = 0x0020,
807 KPtiZhuyinTone1 = 0x02CA,
808 KPtiZhuyinTone2 = 0x02C7,
809 KPtiZhuyinTone3 = 0x02CB,
810 KPtiZhuyinTone4 = 0x02D9
814 class TPtiNumericKeyBinding
823 // type definition for HWR
824 typedef struct TRecognitionRangeTag
831 enum TRecognitionSubRanges
839 EPtiRangeNative, // native text of a language, EPtiRangeLatin also belong to it
840 EPtiRangeHiraganaKanji,
842 EPtiRangeFullWidthKatakana,
843 EPtiRangeFullWidthEnglish,
844 EPtiRangeFullWidthNumeric,
845 EPtiRangeHiraganaOnly,
846 EPtiRangeNativeNumber,
851 enum TLatinLetterOrder
858 * List of supported keyboard types. Each of these keyboard types
859 * may have own data block in keyboard data file.
861 enum TPtiKeyboardType
866 * Conventional 12 phone keypad
871 * 4x12 Qwerty keyboard.
873 EPtiKeyboardQwerty4x12,
876 * 4x10 Qwerty keyboard.
878 EPtiKeyboardQwerty4x10,
881 * 3x11 Qwerty keyboard.
883 EPtiKeyboardQwerty3x11,
888 EPtiKeyboardHalfQwerty,
891 * Custom qwerty keyboard.
892 * Bound to [KEYBOARD BLOCK QWERTY CUSTOM] in keymapping
895 EPtiKeyboardCustomQwerty,
897 EPtiKeyboardMaxLayout
900 #include "PtiDefs.inl"
902 #endif // _PTI_DEFS_H