2 * Copyright (c) 2005,2006 Choe Hwanjin
4 * This component and the accompanying materials are made available
5 * under the terms of the License "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.
19 #ifndef OSSHANGULINPUTCONTEXT_H
20 #define OSSHANGULINPUTCONTEXT_H
25 #include <MOssHangulInputEventObserver.h>
27 typedef struct _HangulInputContext HangulInputContext;
30 class COssCombination;
32 class COssHangulInputContext : public CBase
36 IMPORT_C static COssHangulInputContext* NewLC(const TDesC8& aKeyboardType);
38 IMPORT_C static COssHangulInputContext* NewL(const TDesC8& aKeyboardType);
40 IMPORT_C virtual ~COssHangulInputContext();
44 COssHangulInputContext();
46 void ConstructL(const TDesC8& aKeyboardType);
50 IMPORT_C TBool Process(const TChar& aAscII);
52 IMPORT_C void Reset();
54 IMPORT_C TBool BackSpace();
56 IMPORT_C TBool IsEmpty();
58 IMPORT_C TBool HasChoseong();
60 IMPORT_C TBool HasJungseong();
62 IMPORT_C TBool HasJongseong();
64 IMPORT_C void SetOutputMode(const TInt& aMode);
66 IMPORT_C void SetKeyboard(const COssKeyboard& aOssKeyboard);
68 IMPORT_C void SelectKeyboard(const TDesC8& aId);
70 IMPORT_C void SetCombinationL(COssCombination& aOssCombination);
72 IMPORT_C void AddEventObserver(MOssHangulInputEventObserver* aObserver);
74 IMPORT_C void RemoveEventObserver(MOssHangulInputEventObserver* aObserver);
76 IMPORT_C TPtrC GetPreeditString();
78 IMPORT_C TPtrC GetCommitString();
80 IMPORT_C TPtrC Flush();
84 TBool OnTranslate(const TChar& aAscII,const TDesC& aUcsStr);
86 TBool OnTransition(const TChar& aChar,const TDesC& aPreEdit);
90 HBufC8* iKeyboardType;
92 HangulInputContext* iHic;
94 RPointerArray<MOssHangulInputEventObserver> iObservers;
98 #endif // OSSHANGULINPUTCONTEXT_H