1.1 --- a/epoc32/include/mw/ptidefs.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/mw/ptidefs.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,901 @@
1.4 -ptidefs.h
1.5 +/*
1.6 +* Copyright (c) 2003-2006 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: Global PtiEngine definitions
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +
1.24 +
1.25 +
1.26 +
1.27 +
1.28 +
1.29 +
1.30 +
1.31 +
1.32 +
1.33 +
1.34 +
1.35 +#ifndef _PTI_DEFS_H
1.36 +#define _PTI_DEFS_H
1.37 +
1.38 +#include <e32keys.h>
1.39 +
1.40 +#ifdef RD_HINDI_PHONETIC_INPUT
1.41 +/* Indic Phonetic input */
1.42 +
1.43 +/*
1.44 +* Defines the state of the syllable. This is used by FEP for either committing
1.45 +* the inline text or updating the inline text.
1.46 +*/
1.47 +
1.48 +enum TSyllableState
1.49 +{
1.50 + EIndicSyllableStateFirst,
1.51 + EIndicSyllableStateInsideSyllable,
1.52 + EIndicSyllableStateSyllableBroken,
1.53 + EIndicSyllableStateLast
1.54 +};
1.55 +
1.56 +
1.57 +/*
1.58 +* This is a structure that abstracts the phonetic argument and the response
1.59 +* from the Indic phonetic core in a structure.
1.60 +*/
1.61 +
1.62 +typedef struct
1.63 +{
1.64 + TChar iChar;
1.65 + TDes *iDest;
1.66 + TSyllableState iState;
1.67 +}TPhoneticArg;
1.68 +
1.69 +#endif
1.70 +const TInt KMaxLanguageNameLength = 50;
1.71 +const TInt KMaxAutoSubstStringLength = 32;
1.72 +
1.73 +const TInt KErrPtiEngineBase = (-1000); //based on the value of leave in PtiEngine
1.74 +
1.75 +
1.76 +enum TPtiError
1.77 + {
1.78 + KErrNoActiveLanguage = KErrPtiEngineBase-1,
1.79 + KErrLanguageNotFound = KErrPtiEngineBase-2,
1.80 + KErrNoSuitableCore = KErrPtiEngineBase-3,
1.81 + KErrNotAllowed = KErrPtiEngineBase-4,
1.82 + KErrTooLongWord = KErrPtiEngineBase-5,
1.83 + KErrInvalidWord = KErrPtiEngineBase-6,
1.84 + KErrTooLongReading = KErrPtiEngineBase-7,
1.85 + KErrInvalidReading = KErrPtiEngineBase-8,
1.86 + KErrUserDic = KErrPtiEngineBase-9,
1.87 + KErrInternalCoreError = KErrPtiEngineBase-10,
1.88 + KErrLengthMismatch = KErrPtiEngineBase-11
1.89 + };
1.90 +
1.91 +
1.92 +/**
1.93 +* Enumerations for all the possible input modes supported by PtiEngine.
1.94 +* The modes actually available in the device depend on core object, resource
1.95 +* and keyboard configuration.
1.96 +* Here are short descriptions:
1.97 +*
1.98 +* EPtiEngineMultitapping
1.99 +* Traditional text input method for latin-like languages, where
1.100 +* a list of characters is associated to each keypad keys
1.101 +* and user cycles through associated characters by consecutive key presses.
1.102 +*
1.103 +* EPtiEnginePredictive
1.104 +* Predictive text input mode, where user presses only one key press per
1.105 +* character and the prediction engine provides a list of candidate words
1.106 +* associated top that key sequence.
1.107 +*
1.108 +* EPtiEngineWordCompletion
1.109 +* This is same as EPtiEnginePredictive, except that prediction engine
1.110 +* will include also complete words containing more characters than
1.111 +* the number of key presses in current key sequence.
1.112 +*
1.113 +* EPtiEngineNumeric
1.114 +* This is numeric input mode. All the languages suppor it, since it uses
1.115 +* static keymappings built directly into PtiEngine. It works in same way
1.116 +* as EPtiEngineMultitapping, except that keymapping data contains
1.117 +* only number mode characters.
1.118 +*
1.119 +* EPtiEngineQwerty
1.120 +* Standard qwerty-keyboard input mode for latin-like languages.
1.121 +*
1.122 +* EPtiEnginePinyin
1.123 +* Chinese PinYin input mode for ITU-T keypad.
1.124 +*
1.125 +* EPtiEngineStroke
1.126 +* Chinese Strokes input mode for ITU-T keypad.
1.127 +*
1.128 +* EPtiEngineStroke
1.129 +* Chinese ZhuYin input mode for ITU-T keypad.
1.130 +*
1.131 +* EPtiEngineHirakanaKanji
1.132 +* Japanese Hiragana/Kanji input mode.
1.133 +*
1.134 +* EPtiEngineHirakanaKanjiPredictive
1.135 +* Predictive Japanese Hiragana/Kanji input mode.
1.136 +*
1.137 +* EPtiEngineKatakana
1.138 +* Japanese Katakana input mode.
1.139 +*
1.140 +* EPtiEngineFullWitdthKatakana
1.141 +* Japanese full width Katakana input mode.
1.142 +*
1.143 +* EPtiEngineFullWitdthKatakana
1.144 +* Japanese full width numeric input mode.
1.145 +*
1.146 +* EPtiEngineFullWitdthAlphabet
1.147 +* Japanese full width alphabet input mode.
1.148 +*
1.149 +* EPtiEngineHiragana
1.150 +* Japanese Hiragana input mode.
1.151 +*
1.152 +* EPtiEnginePinyinByPhrase
1.153 +* Chinese Pinyin phrase input. This is same as EPtiEnginePinyin, execpt that
1.154 +* input string may contain pinyin words for several chinese characters.
1.155 +*
1.156 +* EPtiEngineZhuyinByPhrase
1.157 +* Chinese Zinyin phrase input. This is same as EPtiEngineZhuyin, execpt that
1.158 +* input string may contain zhuyin sequences for several chinese characters.
1.159 +*
1.160 +* EPtiEngineZhuyinQwerty
1.161 +* Chinese Zhuyin input for qwerty keyboard.
1.162 +*
1.163 +* EPtiEngineZhuyinPhraseQwerty
1.164 +* Chinese Zinyin phrase input for qwerty keyboard. This is same as EPtiEngineZhuyinQwerty,
1.165 +* execpt that input string may contain zhuyin sequences for several chinese characters.
1.166 +*
1.167 +* EPtiEnginePinyinQwerty
1.168 +* Chinese Pinyin input for qwerty keyboard.
1.169 +*
1.170 +* PtiEnginePinyinPhraseQwerty
1.171 +* Same as EPtiEnginePinyinByPhrase but for qwerty keyboard
1.172 +*
1.173 +* EPtiEngineStrokeQwerty
1.174 +* Same as EPtiEngineStroke but for qwerty keyboard
1.175 +*
1.176 +* EPtiEngineNormalCangjieQwerty
1.177 +* Normal Chinese CangJie input for qwerty keyboard
1.178 +* (CangJie is available only for qwerty).
1.179 +*
1.180 +* EPtiEngineEasyCangjieQwerty
1.181 +* Easy Chinese CangJie input for qwerty keyboard
1.182 +* (CangJie is available only for qwerty).
1.183 +*
1.184 +* EPtiEngineAdvCangjieQwerty
1.185 +* Advanced Chinese CangJie input for qwerty keyboard
1.186 +* (CangJie is available only for qwerty).
1.187 +*
1.188 +* EPtiEngineHiraganaKanjiQwerty
1.189 +* Japanese Hiragana/Kanji input for qwerty keyboard.
1.190 +*
1.191 +* EPtiEngineHiraganaKanjiPredictiveQwerty
1.192 +* Japanese predictive Hiragana/Kanji input for qwerty keyboard
1.193 +*
1.194 +* EPtiEngineKatakanaQwerty
1.195 +* Japanese Half-width Katakana input for qwerty keyboard.
1.196 +*
1.197 +* EPtiEngineFullWidthKatakanaQwerty
1.198 +* Japanese Full-width Katakana input for qwerty keyboard.
1.199 +*
1.200 +* EPtiEngineFullWidthNumericQwerty
1.201 +* Japanese Full-width Alphabet input for qwerty keyboard.
1.202 +*
1.203 +* EPtiEngineFullWidthAlphabetQwerty
1.204 +* Japanese Full-width Alphabet input for qwerty keyboard.
1.205 +*
1.206 +* EPtiEngineHiraganaQwerty
1.207 +* Japanese Hiragana input for qwerty keyboard.
1.208 +*
1.209 +* EPtiEngineStrokeByPhrase, // Stroke phrase input.
1.210 +* Chinese Stroke input for ITU-T keypad. Phrasal version.
1.211 +*
1.212 +* EPtiEngineStrokePhraseQwerty
1.213 +* Chinese Stroke input for qwerty keyboard. Phrasal version.
1.214 +*
1.215 +* EPtiEngineQwertyPredictive, // "Sloppy type" input for qwerty keyboard.
1.216 +* Intelligent qwerty input. Used for word completion and spell
1.217 +* correction features for qwerty keyboard.
1.218 +*
1.219 +* EPtiEngineHalfQwerty
1.220 +* Basic multitaping style text input for half-qwerty keyboard. The functionality
1.221 +* of half-qwerty keyboard is same as conventional itu-t phone keypad, except that
1.222 +* each key is associated with two basic characters (instead of three or four
1.223 +* as in itu-t keypad). Character mapping is also organized to follow qwerty
1.224 +* layout (instead of alphabetical order as in itu-t keypad).
1.225 +*
1.226 +* EPtiEngineHalfQwertyPredictive,
1.227 +* Predictive text input for half-qwerty keyboard. The functionality
1.228 +* of half-qwerty keyboard is same as conventional itu-t phone keypad, except that
1.229 +* each key is associated with two basic characters(instead of three or four
1.230 +* as in itu-t keypad). . Character mapping is also organized to follow qwerty
1.231 +* layout (instead of alphabetical order as in itu-t keypad). This input mode
1.232 +* is essentially same as EPtiEngineWordCompletion but uses half-qwerty keyboard.
1.233 +*
1.234 +* EPtiEngineInputModeIndicPhoneticMultitap
1.235 +* Hindi phonetic input for itu-t keypad.
1.236 +*
1.237 +* EPtiEngineInputModeIndicPhoneticQwerty
1.238 +* Hindi phonetic input for qwerty keyboard.
1.239 +*
1.240 +* EPtiEngineInputModeZhuyinMiniQwertyFind
1.241 +* Zhuyin multitap input method for mini qwerty symbol find.
1.242 +*
1.243 +*/
1.244 +enum TPtiEngineInputMode
1.245 + {
1.246 + EPtiEngineInputModeNone = 0,
1.247 + EPtiEngineMultitapping, // Basic multitapping input for latin languages.
1.248 + EPtiEnginePredictive, // Predictive input for latin languages.
1.249 + EPtiEngineWordCompletion, // Predictive input with word completion for latin languages.
1.250 + EPtiEngineNumeric, // Latin numeric input mode.
1.251 + EPtiEngineQwerty, // Basic qwerty input mode.
1.252 + EPtiEnginePinyin, // Chinese pinyin mode.
1.253 + EPtiEngineStroke, // Chinese stroke mode.
1.254 + EPtiEngineZhuyin, // Chinese zhuyin mode.
1.255 + EPtiEngineHiraganaKanji, // Hiragana/Kanji mode.
1.256 + EPtiEngineHiraganaKanjiPredictive, // Predictive Hiragana/Kanji mode.
1.257 + EPtiEngineKatakana, // Half-width Katakana mode.
1.258 + EPtiEngineFullWidthKatakana, // Full-width Katakana mode.
1.259 + EPtiEngineFullWidthNumeric, // Full-width Alphabet mode (for Japanese input).
1.260 + EPtiEngineFullWidthAlphabet, // Full-width Alphabet mode (for Japanese input).
1.261 + EPtiEngineHiragana, // Hiragana only mode.
1.262 + EPtiEnginePinyinByPhrase, // Pinyin phrase input.
1.263 + EPtiEngineZhuyinByPhrase, // Zhuyin phrase input.
1.264 + EPtiEngineZhuyinQwerty, // Zhuyin qwerty input.
1.265 + EPtiEngineZhuyinPhraseQwerty, // Zhuyin phrase qwerty input.
1.266 + EPtiEnginePinyinQwerty, // Pinyin qwerty input.
1.267 + EPtiEnginePinyinPhraseQwerty, // Pinyin phrase qwerty input.
1.268 + EPtiEngineStrokeQwerty, // Stroke qwerty input.
1.269 + EPtiEngineNormalCangjieQwerty, // Normal Cangjie qwerty input
1.270 + EPtiEngineEasyCangjieQwerty, // Easy Cangjie qwerty input
1.271 + EPtiEngineAdvCangjieQwerty, // Advanced Cangjie qwerty input
1.272 + EPtiEngineHiraganaKanjiQwerty, // Hiragana/Kanji qwerty input mode.
1.273 + EPtiEngineHiraganaKanjiPredictiveQwerty, // Predictive Hiragana/Kanji qwerty input mode.
1.274 + EPtiEngineKatakanaQwerty, // Half-width Katakana qwerty input mode.
1.275 + EPtiEngineFullWidthKatakanaQwerty, // Full-width Katakana qwerty input mode.
1.276 + EPtiEngineFullWidthNumericQwerty, // Full-width Alphabet qwerty input mode (for Japanese input).
1.277 + EPtiEngineFullWidthAlphabetQwerty, // Full-width Alphabet qwerty input mode (for Japanese input).
1.278 + EPtiEngineHiraganaQwerty, // Hiragana only qwerty input mode.
1.279 + EPtiEnginePinyinVkb, // Chinese pinyin mode.
1.280 + EPtiEngineStrokeVkb, // Chinese stroke mode.
1.281 + EPtiEngineZhuyinVkb, // Chinese zhuyin mode.
1.282 + EPtiEngineStrokeByPhrase, // Stroke phrase input.
1.283 + EPtiEngineStrokePhraseQwerty, // Stroke phrase qwerty input.
1.284 + EPtiEngineHiraganaKanjiVkb, // Hiragana/Kanji mode for VKB.
1.285 + EPtiEngineHiraganaKanjiPredictiveVkb, // Predictive Hiragana/Kanji mode for VKB.
1.286 + EPtiEngineHiraganaKanjiHwr, // Hiragana/Kanji mode for HWR.
1.287 + EPtiEngineHiraganaKanjiPredictiveHwr, // Predictive Hiragana/Kanji mode for HWR.
1.288 + EPtiEngineKatakanaVkb, // Half-width Katakana mode for VKB.
1.289 + EPtiEngineFullWidthKatakanaVkb, // Full-width Katakana mode for VKB.
1.290 + EPtiEngineHiraganaVkb, // Hiragana only qwerty input mode for VKB.
1.291 + EPtiEngineNormalCangjieVkb,
1.292 + EPtiEngineEasyCangjieVkb,
1.293 + EPtiEngineAdvCangjieVkb,
1.294 + EPtiEngineInputModeIndicPhoneticMultitap,
1.295 + EPtiEngineInputModeIndicPhoneticQwerty,
1.296 + EPtiEngineHiraganaKanjiVkbRomaji, // Hiragana/Kanji mode for VKB/FSQ Romaji input.
1.297 + EPtiEngineHiraganaKanjiPredictiveVkbRomaji, // Predictive Hiragana/Kanji mode for VKB/FSQ Romaji input.
1.298 + EPtiEngineQwertyPredictive, // "Sloppy type" input for qwerty keyboard.
1.299 + EPtiEngineHalfQwerty,
1.300 + EPtiEngineHalfQwertyPredictive,
1.301 + EPtiEngineInputModeQwertyPredictive ,
1.302 + EPtiEngineInputModeZhuyinMiniQwertyFind,
1.303 + EPtiEnginePinyinPhraseHalfQwerty,
1.304 + EPtiEngineStrokePhraseHalfQwerty,
1.305 + EPtiEngineZhuyinPhraseHalfQwerty,
1.306 + EPtiEngineMultitappingKorean, // Basic multitapping input for korean language.
1.307 + EPtiEngineMaxInputModes = EPtiEngineMultitappingKorean
1.308 + };
1.309 +
1.310 +
1.311 +/*
1.312 +* Predictive qwerty error correction levels.
1.313 +*/
1.314 +enum TPtiErrorCorrectionLevel
1.315 + {
1.316 + EPtiErrorCorrectionLevelOff = 0,
1.317 + EPtiErrorCorrectionLevelLow = 1,
1.318 + EPtiErrorCorrectionLevelHigh = 2
1.319 + };
1.320 +
1.321 +
1.322 +/**
1.323 +* Key enumerations for conventional (ITU-T) and qwerty keyboards.
1.324 +* Constant names for qwerty keypad keys are named after scan code
1.325 +* values of a device using English language keymappings. The
1.326 +* actual character that will be inserted into editor buffer depends on
1.327 +* keymappings of currently selected input language and may be something else
1.328 +* than what enum name suggests. For example
1.329 +* non-shifted EPtiKeyQwertyHash produces '#'-character if input language is
1.330 +* English, but will produce '+'-character if
1.331 +* input language is Danish, Norwegian, Swedish or Finnish.
1.332 +* The key coordinates on standard 4x12 qwerty keypad are given in
1.333 +* comments.
1.334 +*/
1.335 +enum TPtiKey
1.336 + {
1.337 + EPtiKeyNone = 0,
1.338 +
1.339 + EPtiKey1 = '1',
1.340 + EPtiKey2 = '2',
1.341 + EPtiKey3 = '3',
1.342 + EPtiKey4 = '4',
1.343 + EPtiKey5 = '5',
1.344 + EPtiKey6 = '6',
1.345 + EPtiKey7 = '7',
1.346 + EPtiKey8 = '8',
1.347 + EPtiKey9 = '9',
1.348 + EPtiKeyStar = '*',
1.349 + EPtiKey0 = '0',
1.350 + EPtiKeyHash = '#',
1.351 +
1.352 + // alternate names
1.353 + EPtiKeyPunct = EPtiKey1,
1.354 + EPtiKeyABC = EPtiKey2,
1.355 + EPtiKeyDEF = EPtiKey3,
1.356 + EPtiKeyGHI = EPtiKey4,
1.357 + EPtiKeyJKL = EPtiKey5,
1.358 + EPtiKeyMNO = EPtiKey6,
1.359 + EPtiKeyPQRS = EPtiKey7,
1.360 + EPtiKeyTUV = EPtiKey8,
1.361 + EPtiKeyWXYZ = EPtiKey9,
1.362 +
1.363 + // qwerty keys
1.364 + EPtiKeyQwerty1 = 0x31,
1.365 + EPtiKeyQwerty2 = 0x32,
1.366 + EPtiKeyQwerty3 = 0x33,
1.367 + EPtiKeyQwerty4 = 0x34,
1.368 + EPtiKeyQwerty5 = 0x35,
1.369 + EPtiKeyQwerty6 = 0x36,
1.370 + EPtiKeyQwerty7 = 0x37,
1.371 + EPtiKeyQwerty8 = 0x38,
1.372 + EPtiKeyQwerty9 = 0x39,
1.373 + EPtiKeyQwerty0 = 0x30,
1.374 +
1.375 + EPtiKeyQwertyPlus = 0x2b,
1.376 + EPtiKeyQwertyMinus = EStdKeyMinus,
1.377 + EPtiKeyQwertyComma = EStdKeyComma,
1.378 + EPtiKeyQwertySemicolon = EStdKeySemiColon,
1.379 + EPtiKeyQwertyFullstop = EStdKeyFullStop,
1.380 + EPtiKeyQwertyHash = EStdKeyHash,
1.381 + EPtiKeyQwertySlash = EStdKeyForwardSlash,
1.382 + EPtiKeyQwertyApostrophe = EStdKeySingleQuote,
1.383 + EPtiKeyQwertySpace = EStdKeySpace,
1.384 + EPtiKeyQwertyAtCharacter = EStdKeySquareBracketRight,
1.385 + EPtiKeyQwertyLeftShift = EStdKeyLeftShift, // Needed only for special cases.
1.386 +
1.387 + EPtiKeyQwertyA = 0x41,
1.388 + EPtiKeyQwertyB = 0x42,
1.389 + EPtiKeyQwertyC = 0x43,
1.390 + EPtiKeyQwertyD = 0x44,
1.391 + EPtiKeyQwertyE = 0x45,
1.392 + EPtiKeyQwertyF = 0x46,
1.393 + EPtiKeyQwertyG = 0x47,
1.394 + EPtiKeyQwertyH = 0x48,
1.395 + EPtiKeyQwertyI = 0x49,
1.396 + EPtiKeyQwertyJ = 0x4a,
1.397 + EPtiKeyQwertyK = 0x4b,
1.398 + EPtiKeyQwertyL = 0x4c,
1.399 + EPtiKeyQwertyM = 0x4d,
1.400 + EPtiKeyQwertyN = 0x4e,
1.401 + EPtiKeyQwertyO = 0x4f,
1.402 + EPtiKeyQwertyP = 0x50,
1.403 + EPtiKeyQwertyQ = 0x51,
1.404 + EPtiKeyQwertyR = 0x52,
1.405 + EPtiKeyQwertyS = 0x53,
1.406 + EPtiKeyQwertyT = 0x54,
1.407 + EPtiKeyQwertyU = 0x55,
1.408 + EPtiKeyQwertyV = 0x56,
1.409 + EPtiKeyQwertyW = 0x57,
1.410 + EPtiKeyQwertyX = 0x58,
1.411 + EPtiKeyQwertyY = 0x59,
1.412 + EPtiKeyQwertyZ = 0x5a
1.413 +
1.414 + // ----> Half Qwerty
1.415 + , EPtiKeyQwertyChr = EStdKeyLeftFunc // key (4, 4)
1.416 + // Half Qwerty <----
1.417 + };
1.418 +
1.419 +
1.420 +
1.421 +/**
1.422 +* Enumerations for PtiCore capabilities. These can be queries through
1.423 +* MPtiCoreInfo::CapsBits().
1.424 +* Here are descriptions:
1.425 +*
1.426 +* EWordCompletion
1.427 +* The core object supports word completion -feature.
1.428 +*
1.429 +* EReordering
1.430 +* The core object supports user dictionary reordering. This feature means that
1.431 +* most commonly used words are moved up in prediction candidate
1.432 +* list.
1.433 +*
1.434 +* ENextWordPrediction
1.435 +* The core supports next word prediction feature. When this feature is
1.436 +* enabled, prediction engine tries to guess next word based on previous word(s).
1.437 +*
1.438 +* ESupportUserDictionaries
1.439 +* The core supports supports user dictionaries.
1.440 +*
1.441 +* ESupportSCTToneMarks
1.442 +*
1.443 +* ESupportCangjieInput
1.444 +* The core object supports Chinese CangJie input.
1.445 +*
1.446 +* ESupportDualLanguage
1.447 +* The core object supports dual language preditcion.
1.448 +*
1.449 +* ESupportAutoSubstitution
1.450 +* The core object supports auto-substitution feature. This feature
1.451 +* automatically expands predefined string to longer string.
1.452 +* ie. "l8r" -> "later"
1.453 +*/
1.454 +enum TPtiEngineCapsBits
1.455 + {
1.456 + EWordCompletion = 0x01,
1.457 + EReordering = 0x02,
1.458 + ENextWordPrediction = 0x04,
1.459 + ESupportUserDictionaries = 0x08,
1.460 + ESupportSCTToneMarks = 0x10,
1.461 + ESupportCangjieInput = 0x20,
1.462 + EPreferedSpelling = 0x40,
1.463 + ESupportDualLanguage = 0x80,
1.464 + ESupportAutoSubstitution = 0x100
1.465 + };
1.466 +
1.467 +
1.468 +/**
1.469 +* Text case defintions.
1.470 +*/
1.471 +enum TPtiTextCase
1.472 + {
1.473 + EPtiCaseLower = 0, // Normal lower case input
1.474 + EPtiCaseUpper, // Normal upper case input.
1.475 + EPtiCaseChrLower, // Qwerty chr-key lower case input.
1.476 + EPtiCaseChrUpper, // Qwerty chr-key upper case input.
1.477 + EPtiCaseFnLower, // Qwerty fn-key lower case input.
1.478 + EPtiCaseFnUpper, // Qwerty fn-key upper case input.
1.479 + EPtiCaseMax
1.480 + };
1.481 +
1.482 +
1.483 +enum TPtiCharConversion
1.484 + {
1.485 + EPtiSimplifiedToComplex = 0x01, // Chinese simplified to Chinese complex
1.486 + EPtiUcs2ToUtf8 = 0x02, // Unicode to utf8
1.487 + EPtiUcs2ToBig5 = 0x04, // Unicode to big5
1.488 + EPtiUcs2ToGB = 0x08, // Unicode to Guo-Biao
1.489 + EPtiUtf8ToUcs2 = 0x10, // Utf8 to Unicode
1.490 + EPtiKo2ToWc = 0x20, // KSC5601 to Hangul Syllable
1.491 + EPtiWcToKo2 = 0x30, // Hangul Syllable to KSC5601
1.492 + EPtiBig5ToUcs2 = 0x40, // Big5 to Unicode
1.493 + EPtiComplexToSimplified = 0x80 // Chinese complex to Chinese simplified
1.494 + };
1.495 +
1.496 +/**
1.497 +* Enumerates supported spelling types for CPtiEngine::GetSpelling method.
1.498 +*/
1.499 +enum TPtiSpelling
1.500 + {
1.501 + EPtiStrokes = 0x01,
1.502 + EPtiPinyin = 0x02,
1.503 + EPtiBopomofo = 0x04,
1.504 + EPtiZhuyin = 0x08,
1.505 + EPtiCangJie = 0x10,
1.506 + EPtiEasyCangjie = 0x20,
1.507 + EPtiAdvCangjie = 0x40
1.508 + };
1.509 +
1.510 +/**
1.511 +* Enumerates different Chinese variants.
1.512 +*/
1.513 +enum TPtiChineseVariant
1.514 + {
1.515 + EPtiChineseVariantPrc = 0,
1.516 + EPtiChineseVariantHk,
1.517 + EPtiChineseVariantTw
1.518 + };
1.519 +
1.520 +/**
1.521 +* Command definitions for CPtiEngine::HandleCommandL api methods. Many of these
1.522 +* are for internal communication between PtiEngine framework and a specific
1.523 +* core object and there for not documented.
1.524 +*/
1.525 +enum TPtiEngineCommand
1.526 + {
1.527 + EPtiCommandNone,
1.528 + EPtiCommandUserActionLeft,
1.529 + EPtiCommandUserActionRight,
1.530 + EPtiCommandUserActionConvert,
1.531 + EPtiCommandUserActionPrevious,
1.532 + EPtiCommandUserActionLengthen,
1.533 + EPtiCommandUserActionShorten,
1.534 + EPtiCommandUserActionCancel,
1.535 + EPtiCommandUserActionComplete,
1.536 + EPtiCommandUserActionAllComplete,
1.537 + EPtiCommandUserActionGetCurrentIndexOfCandidates,
1.538 + EPtiCommandUserActionCompleteCandidate,
1.539 + EPtiCommandUserActionCompleteFull0,
1.540 + EPtiCommandUserActionCompleteFull1,
1.541 + EPtiCommandUserActionCompleteFull2,
1.542 + EPtiCommandUserActionCompleteFull3,
1.543 + EPtiCommandUserActionCompleteFull4,
1.544 + EPtiCommandUserActionCompleteFull5,
1.545 + EPtiCommandUserActionCompleteFull6,
1.546 + EPtiCommandUserActionCompleteFull7,
1.547 + EPtiCommandUserActionCompleteFull8,
1.548 + EPtiCommandUserActionCompleteFull9,
1.549 + EPtiCommandUserActionCompleteHalf0,
1.550 + EPtiCommandUserActionCompleteHalf1,
1.551 + EPtiCommandUserActionCompleteHalf2,
1.552 + EPtiCommandUserActionCompleteHalf3,
1.553 + EPtiCommandUserActionCompleteHalf4,
1.554 + EPtiCommandUserActionCompleteHalf5,
1.555 + EPtiCommandUserActionCompleteHalf6,
1.556 + EPtiCommandUserActionCompleteHalf7,
1.557 + EPtiCommandUserActionCompleteHalf8,
1.558 + EPtiCommandUserActionCompleteHalf9,
1.559 + EPtiCommandEnableToneMarks,
1.560 + EPtiCommandDisableToneMarks,
1.561 + EPtiCommandResetToneMark,
1.562 + EPtiCommandIncrementToneMark,
1.563 + EPtiCommandIncrementToneMarkOverrideInvalid,
1.564 + EPtiCommandReloadLearningInfo,
1.565 + EPtiCommandUserDictionaryDelaySaving,
1.566 + EPtiCommandUserDictionarySaveNow,
1.567 + EPtiCommandUserActionSetCurrentIndexOfCandidates,
1.568 + EPtiCommandUseLatinDefaultKeyMap,
1.569 + EPtiCommandUseLatinCaseUpperOnlyKeyMap,
1.570 + EPtiCommandUseLatinCaseLowerOnlyKeyMap,
1.571 + EPtiCommandResetLearningInfo,
1.572 + EPtiCommandPollQwertyDeadKeyRootFlag, // Indicates that dead key root char was added to buffer.
1.573 + EPtiCommandGetAndClearDeadKeyRootChar,
1.574 + EPtiCommandDeadKeyWaiting,
1.575 + EPtiCommandQueryAndClearGetAllFlag,
1.576 + EPtiCommandGetAndClearVowelSequence,
1.577 + EPtiCommandSetMultitapTimer, // Set multitap timer for japanese varint only
1.578 + EPtiCommandVowelSeqFlag,
1.579 + EPtiCommandClearVowelSeq,
1.580 + EPtiCommandSetJapaneseQwertyFlags, // Set Japanese Qwerty flags for japanese varint only
1.581 + EPtiCommandGetAndClearLastVietnameseChar,
1.582 + EPtiCommandSetVietnameseLastChar,
1.583 + EPtiCommandQueryReplacePrevious,
1.584 + EPtiCommandSetLastKeyForVietnamese,
1.585 + EPtiCommandResetVietnameseVowelSeqAndToneMark,
1.586 + EPtiCommandGetVietnameseLastKey,
1.587 + EPtiCommandDoubleWideEntry,
1.588 + EPtiCommandSetClearFunction, // Set the behavior of clear key for japanese varint only
1.589 + EPtiCommandUserActionRetroActiveCandidateHalf,
1.590 + EPtiCommandUserActionRetroActiveCandidateFull,
1.591 + EPtiCommandUserActionRetroActiveClear,
1.592 + EPtiCommandUserActionRetroActiveCommit,
1.593 + EPtiCommandAppendCharacter, // Append a character for Japanese varint only
1.594 + EPtiCommandBackSpaceByForce, // BackSpace by force for Japanese varint only
1.595 + EPtiCommandGetPhoneticText,
1.596 + EPtiCommandClearPhoneticBuffer,
1.597 + EPtiCommandBreakSyllable,
1.598 + EPtiCommandAllowPictographCandidate, // Allow the candidates with pictograph cahracter for Japanese variant only
1.599 + EPtiCommandLoopback, // Loop back input character (Loop back: c->b->a)
1.600 + EPtiCommandSetAutoSubstitution,
1.601 + EPtiCommandAddAutoSubstEntry, // TPtiAutoSubstBinding passed in aParams.
1.602 + EPtiCommandDeleteAutoSubstEntry, // TPtiAutoSubstBinding passed in aParams.
1.603 + EPtiCommandNumberOfAutoSubstEntries,
1.604 + EPtiCommandGetAutoSubstEntry, // TPtiAutoSubstBinding passed in aParams.
1.605 + EPtiCommandFindAutoSubstEntry, // TPtiAutoSubstBinding* passed in aParams.
1.606 + EPtiCommandUncommitWord,
1.607 + EPtiCommandEnableAutoCompletion,
1.608 + EPtiCommandDisableAutoCompletion,
1.609 + EPtiCommandSetCorrectionLevel, // TErrorCorrectionLevel* passed in aParams.
1.610 + EPtiCommandGetAutoCompletionTailLength, // TInt* passed in aParams for output.
1.611 + EPtiCommandLockCurrentCandidate,
1.612 + EPtiCommandSetProactiveCorrection, // TBool passed in aParams
1.613 + EPtiCommandIsExactKnownWord,
1.614 + EPtiCommandSetAutoCompletion,
1.615 + EPtiCommandSetNumberCandidateStatus, //
1.616 + EPtiCommandSetAutoCompletionMaxLength, // Param is integer. Sets maximum lenght of ato completed word. Zero == no limit.
1.617 + EPtiCommandMarkAutoCapitalized, // No parameters.
1.618 + EPtiCommandUserActionGetIndexOfSecondaryCandidate, // index of secondary candidate, TInt* passed in param
1.619 + EPtiCommandAddPhrase, // Add new phrase for next word prediction. const TDesC* passed in param.
1.620 + EPtiCommandSetSecondaryInputLanguage,
1.621 + EPtiCommandSetFlagToUpdateCandidates,
1.622 + EPtiCommandSetCursorCrossedMaxLength, // sets when cursor crosses max words length in editor
1.623 + EPtiCommandResetCursorCrossedMaxLength,
1.624 + EPtiCommandUserActionSetIndexOfActiveCandidate,
1.625 + EPtiCommandAddWordToUDBWithoutPunctMark
1.626 + };
1.627 +
1.628 +/**
1.629 +* A convinience class for auto substitution related EPtiCommands. Needed
1.630 +* only in core object and framework code.
1.631 +*/
1.632 +class TPtiAutoSubstBinding
1.633 + {
1.634 + public:
1.635 + TInt iIndex;
1.636 + TBuf<KMaxAutoSubstStringLength> iShortcut;
1.637 + TBuf<KMaxAutoSubstStringLength> iSubstitution;
1.638 + };
1.639 +
1.640 +
1.641 +/**
1.642 +* A structure for binding language name and language code.
1.643 +* only in core object and framework code.
1.644 +*/
1.645 +class TPtiLangName
1.646 + {
1.647 + public:
1.648 + TInt iLanguageCode;
1.649 + TBuf<KMaxLanguageNameLength> iName;
1.650 + };
1.651 +
1.652 +
1.653 +/**
1.654 +* This is language code for 'numeric' language.
1.655 +* It is langugae object which is always available and
1.656 +* has only numeric input mode.
1.657 +*/
1.658 +#define ELangNumeric 0x5000
1.659 +
1.660 +/**
1.661 +* An interface class for accessing core info attributes.
1.662 +*/
1.663 +class MPtiCoreInfo
1.664 + {
1.665 + public:
1.666 + /**
1.667 + * Returns a boolean value indicating whether the word completion
1.668 + * feature is supported by the core object in question
1.669 + *
1.670 + * @since S60 V2.6
1.671 + * @return ETrue if core object supports word completion feature.
1.672 + * EFalse otherwise.
1.673 + */
1.674 + virtual TBool WordCompletion() const = 0;
1.675 +
1.676 + /**
1.677 + * Returns a boolean value indicating whether the user dictionary
1.678 + * re-ordering feature is supported by the core object in question.
1.679 + *
1.680 + * @since S60 V2.6
1.681 + * @return ETrue if core object supports re-ordering feature.
1.682 + * EFalse otherwise.
1.683 + */
1.684 + virtual TBool Reordering() const = 0;
1.685 +
1.686 + /**
1.687 + * Returns maximum length of single word this core object is able to produce.
1.688 + *
1.689 + * @since S60 V2.6
1.690 + * @return The maximum word length.
1.691 + */
1.692 + virtual TInt MaximumWordLength() const = 0;
1.693 +
1.694 + /**
1.695 + * Returns the maximum number of prediction candidates the core object
1.696 + * is able to produce for any input sequence. Doesn't apply for
1.697 + * Chinese and Japanese modes.
1.698 + *
1.699 + * @since S60 V2.6
1.700 + * @return The maximum number of candidates.
1.701 + */
1.702 + virtual TInt MaximumNumberOfCandidates() const = 0;
1.703 +
1.704 + /**
1.705 + * Returns a boolean value indicating whether the next word prediction feature
1.706 + * supported by the core object in question.
1.707 + *
1.708 + * @since S60 V2.6
1.709 + * @return ETrue if next wrod prediction is supported.
1.710 + * EFalse otherwise.
1.711 + */
1.712 + virtual TBool NextWordPrediction() const = 0;
1.713 +
1.714 + /**
1.715 + * Returns core object vendor specific id string.
1.716 + *
1.717 + * @since S60 V2.6
1.718 + * @return Vendor specific id string.
1.719 + */
1.720 + virtual TPtrC VendorString() const = 0;
1.721 +
1.722 + /**
1.723 + * Returns a bit vector containing flags for various core object features.
1.724 + * See TPtiEngineCapsBits for list of specified bits.
1.725 + *
1.726 + * @since S60 V2.6
1.727 + * @return A bit vector containing flags for various core object features.
1.728 + */
1.729 + virtual TUint32 CapsBits() const = 0;
1.730 +
1.731 + /**
1.732 + * Returns uid value for core object.
1.733 + *
1.734 + * @since S60 V2.6
1.735 + * @return Core object uid as an integer value.
1.736 + */
1.737 + virtual TInt32 Uid() const = 0;
1.738 +
1.739 + /**
1.740 + * Returns a bitvector containing flags for available character conversion
1.741 + * methods. See TPtiCharConversion for list of specified bits.
1.742 + *
1.743 + * @since S60 V2.6
1.744 + * @return A bit vector containing flags for available character conversions.
1.745 + */
1.746 + virtual TUint32 CharConversions() const = 0;
1.747 +
1.748 + /**
1.749 + * Returns a bitvector containing flags for available spelling conversion
1.750 + * methods. See TPtiSpelling for list of specified bits.
1.751 + *
1.752 + * @since S60 V2.6
1.753 + * @return A bit vector containing flags for available spelling conversions.
1.754 + */
1.755 + virtual TUint32 Spellings() const = 0;
1.756 + };
1.757 +
1.758 +
1.759 +class TPtiCoreInfo : public MPtiCoreInfo
1.760 + {
1.761 + public:
1.762 + inline TBool WordCompletion() const;
1.763 + inline TBool Reordering() const;
1.764 + inline TInt MaximumWordLength() const;
1.765 + inline TInt MaximumNumberOfCandidates() const;
1.766 + inline TBool NextWordPrediction() const;
1.767 + inline TPtrC VendorString() const;
1.768 + inline TInt32 Uid() const;
1.769 + inline TUint32 CharConversions() const;
1.770 + inline TUint32 Spellings() const;
1.771 +
1.772 + inline TUint32 CapsBits() const;
1.773 + inline void SetCapsBits(TUint32 aBits);
1.774 + inline void SetVendorString(const TDesC& aStr);
1.775 + inline void SetMaxWordLength(TInt aMaxLen);
1.776 + inline void SetUid(TInt32 aUid);
1.777 + inline void SetSpellings(TUint32 aSpellings);
1.778 + inline void SetMaxNumberOfCandidates(TInt aMax);
1.779 + inline void SetCharConversions(TUint32 aConvs);
1.780 +
1.781 + private:
1.782 + TUint32 iCapsBits;
1.783 + TPtrC iVendorIdStr;
1.784 + TInt iMaxWordLength;
1.785 + TInt iMaxNumberOfCandidates;
1.786 + TInt32 iUid;
1.787 + TUint32 iCharConversions;
1.788 + TUint32 iSpellings;
1.789 + };
1.790 +
1.791 +
1.792 +#define KPtiEngineChineseSeparator 0x0027
1.793 +
1.794 +// Tone marks for pinyin input
1.795 +enum
1.796 + {
1.797 + KPtiPinyinTone0 = 0x02C9,
1.798 + KPtiPinyinTone1 = 0x02CA,
1.799 + KPtiPinyinTone2 = 0x02C7,
1.800 + KPtiPinyinTone3 = 0x02CB,
1.801 + KPtiPinyinTone4 = 0x02D9
1.802 + };
1.803 +
1.804 +// Tone marks for zhuyin input
1.805 +enum
1.806 + {
1.807 + KPtiZhuyinTone0 = 0x0020,
1.808 + KPtiZhuyinTone1 = 0x02CA,
1.809 + KPtiZhuyinTone2 = 0x02C7,
1.810 + KPtiZhuyinTone3 = 0x02CB,
1.811 + KPtiZhuyinTone4 = 0x02D9
1.812 + };
1.813 +
1.814 +
1.815 +class TPtiNumericKeyBinding
1.816 + {
1.817 + public:
1.818 + TUint16 iChar;
1.819 + TPtiKey iKey;
1.820 + TPtiTextCase iCase;
1.821 + };
1.822 +
1.823 +
1.824 +// type definition for HWR
1.825 +typedef struct TRecognitionRangeTag
1.826 + {
1.827 + TLanguage iLanguage;
1.828 + TUint iSubRange;
1.829 + } TRecognitionRange;
1.830 +
1.831 +
1.832 +enum TRecognitionSubRanges
1.833 + {
1.834 + EPtiRangePRCChinese,
1.835 + EPtiRangeHKChinese,
1.836 + EPtiRangeTWChinese,
1.837 + EPtiRangeLatin,
1.838 + EPtiRangeSymbol,
1.839 + EPtiRangeNumber,
1.840 + EPtiRangeNative, // native text of a language, EPtiRangeLatin also belong to it
1.841 + EPtiRangeHiraganaKanji,
1.842 + EPtiRangeKatakana,
1.843 + EPtiRangeFullWidthKatakana,
1.844 + EPtiRangeFullWidthEnglish,
1.845 + EPtiRangeFullWidthNumeric,
1.846 + EPtiRangeHiraganaOnly,
1.847 + EPtiRangeNativeNumber,
1.848 + EPtiRangeNone
1.849 + };
1.850 +
1.851 +
1.852 +enum TLatinLetterOrder
1.853 + {
1.854 + EUpperFirst,
1.855 + ELowerFirst
1.856 + };
1.857 +
1.858 +/*
1.859 +* List of supported keyboard types. Each of these keyboard types
1.860 +* may have own data block in keyboard data file.
1.861 +*/
1.862 +enum TPtiKeyboardType
1.863 + {
1.864 + EPtiKeyboardNone,
1.865 +
1.866 + /**
1.867 + * Conventional 12 phone keypad
1.868 + */
1.869 + EPtiKeyboard12Key,
1.870 +
1.871 + /**
1.872 + * 4x12 Qwerty keyboard.
1.873 + */
1.874 + EPtiKeyboardQwerty4x12,
1.875 +
1.876 + /**
1.877 + * 4x10 Qwerty keyboard.
1.878 + */
1.879 + EPtiKeyboardQwerty4x10,
1.880 +
1.881 + /**
1.882 + * 3x11 Qwerty keyboard.
1.883 + */
1.884 + EPtiKeyboardQwerty3x11,
1.885 +
1.886 + /**
1.887 + * Half qwerty.
1.888 + */
1.889 + EPtiKeyboardHalfQwerty,
1.890 +
1.891 + /**
1.892 + * Custom qwerty keyboard.
1.893 + * Bound to [KEYBOARD BLOCK QWERTY CUSTOM] in keymapping
1.894 + * definition files.
1.895 + */
1.896 + EPtiKeyboardCustomQwerty,
1.897 +
1.898 + EPtiKeyboardMaxLayout
1.899 + };
1.900 +
1.901 +#include "PtiDefs.inl"
1.902 +
1.903 +#endif // _PTI_DEFS_H
1.904 +
1.905 +// End od file