fep/aknfep/inc/AknFepUiInputStateQwerty.h
changeset 40 2cb9bae34d17
parent 31 f1bdd6b078d1
child 49 37f5d84451bd
equal deleted inserted replaced
31:f1bdd6b078d1 40:2cb9bae34d17
     1 /*
       
     2 * Copyright (c) 2004 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 *       Provides the TAknFepInputStateQwerty definition.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 
       
    30 #ifndef __AKN_FEP_UI_INPUT_STATE_QWERTY_H__
       
    31 #define __AKN_FEP_UI_INPUT_STATE_QWERTY_H__
       
    32 
       
    33 #include <w32std.h>
       
    34 #include "AknFepUiInputStateBase.h"
       
    35 
       
    36 class TAknFepInputStateQwerty : public TAknFepInputStateBase
       
    37     {
       
    38 public:
       
    39     TAknFepInputStateQwerty(MAknFepUIManagerStateInterface* aOwner); 
       
    40 
       
    41     TBool HandleKeyL(TInt aKey, TKeyPressLength aLength);
       
    42     TBool IsNumberKey(const TInt aKey);
       
    43 
       
    44 public: // Functions from MPtiObserver interface
       
    45     void KeyTimerExpired();
       
    46 
       
    47 protected:
       
    48     TBool IsCharacterKey(const TInt aKey);
       
    49     TBool IsQwertyKey(const TInt aKey);
       
    50     
       
    51 //	TBool IsAllowedKeymappingForNumberMode(TChar aChar);    
       
    52 	void NumericCharacterForQwertyKey(TInt aInScanCode,
       
    53                                       TKeyEvent& aEvent,
       
    54                                       TBool aShifted,
       
    55                                       TChar& aResult);     
       
    56 	TBool IsExceptionChar(TUint16 aChar);
       
    57                                          
       
    58                                       
       
    59 	/**
       
    60 	* There are currently handled as a herdcoded special cases. 
       
    61 	* This method is used for collecting and handling those cases.
       
    62 	*/                                      
       
    63 	void CustomFilter(TPtrC aInput, TDes& aOutput, TInt aLanguage, 
       
    64                       TInt aCurrentCase, TBool aShiftDown);                                      
       
    65 	void HandleCaseChange(TInt aKey, TBool aIsCharacter);
       
    66 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
    67     TBool IsCharacterNumber(TChar aChar);
       
    68     TBool TryGetValidCharForKey(const TInt& aKey, TChar& aChar);
       
    69     TBool TryGetValidCharForKeyAndCase(const TInt& aKey, TChar& aChar, TPtiTextCase aCase);
       
    70 #endif
       
    71     TBool CheckForValidNumberEntryForqwerty(TInt aKey);  	  	                                        
       
    72 private:
       
    73 	//TBool iFakeDelete;  	                                        
       
    74 	//TBool iCharKeyException;	 
       
    75 #ifdef RD_INTELLIGENT_TEXT_INPUT
       
    76     
       
    77     //IsLanguageSupportsCaseChanges() should return ETrue if the current input language
       
    78     // does not support case changes. Eg - Arabic, Urdu, Farsi, Hindi, etc. 
       
    79     //It should return EFalse for other languages (eg - latin based languages)
       
    80     TBool IsLanguageWithoutCaseChanges();
       
    81     
       
    82     //IsSpecialNonLatinScript() should return ETrue if the current input language uses
       
    83     // either Greek, Cyrillic or Hebrew script. Currently supported languages with Cyrillic 
       
    84     // script are Russian, Ukrainian and Bulgarian.
       
    85     TBool IsSpecialNonLatinScript();
       
    86     
       
    87 #endif
       
    88     };
       
    89 
       
    90 #endif //__AKN_FEP_UI_INPUT_STATE_QWERTY_H__
       
    91 
       
    92 // End of file