|
1 /* |
|
2 * Copyright (c) 2005,2006 Choe Hwanjin |
|
3 * All rights reserved. |
|
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". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef OSSHANGULINPUTCONTEXT_H |
|
20 #define OSSHANGULINPUTCONTEXT_H |
|
21 |
|
22 #include <e32std.h> |
|
23 #include <e32base.h> |
|
24 |
|
25 #include <MOssHangulInputEventObserver.h> |
|
26 |
|
27 typedef struct _HangulInputContext HangulInputContext; |
|
28 |
|
29 class COssKeyboard; |
|
30 class COssCombination; |
|
31 |
|
32 class COssHangulInputContext : public CBase |
|
33 { |
|
34 public: |
|
35 |
|
36 IMPORT_C static COssHangulInputContext* NewLC(const TDesC8& aKeyboardType); |
|
37 |
|
38 IMPORT_C static COssHangulInputContext* NewL(const TDesC8& aKeyboardType); |
|
39 |
|
40 IMPORT_C virtual ~COssHangulInputContext(); |
|
41 |
|
42 private: |
|
43 |
|
44 COssHangulInputContext(); |
|
45 |
|
46 void ConstructL(const TDesC8& aKeyboardType); |
|
47 |
|
48 public: |
|
49 |
|
50 IMPORT_C TBool Process(const TChar& aAscII); |
|
51 |
|
52 IMPORT_C void Reset(); |
|
53 |
|
54 IMPORT_C TBool BackSpace(); |
|
55 |
|
56 IMPORT_C TBool IsEmpty(); |
|
57 |
|
58 IMPORT_C TBool HasChoseong(); |
|
59 |
|
60 IMPORT_C TBool HasJungseong(); |
|
61 |
|
62 IMPORT_C TBool HasJongseong(); |
|
63 |
|
64 IMPORT_C void SetOutputMode(const TInt& aMode); |
|
65 |
|
66 IMPORT_C void SetKeyboard(const COssKeyboard& aOssKeyboard); |
|
67 |
|
68 IMPORT_C void SelectKeyboard(const TDesC8& aId); |
|
69 |
|
70 IMPORT_C void SetCombinationL(COssCombination& aOssCombination); |
|
71 |
|
72 IMPORT_C void AddEventObserver(MOssHangulInputEventObserver* aObserver); |
|
73 |
|
74 IMPORT_C void RemoveEventObserver(MOssHangulInputEventObserver* aObserver); |
|
75 |
|
76 IMPORT_C TPtrC GetPreeditString(); |
|
77 |
|
78 IMPORT_C TPtrC GetCommitString(); |
|
79 |
|
80 IMPORT_C TPtrC Flush(); |
|
81 |
|
82 public: |
|
83 |
|
84 TBool OnTranslate(const TChar& aAscII,const TDesC& aUcsStr); |
|
85 |
|
86 TBool OnTransition(const TChar& aChar,const TDesC& aPreEdit); |
|
87 |
|
88 private: |
|
89 |
|
90 HBufC8* iKeyboardType; |
|
91 |
|
92 HangulInputContext* iHic; |
|
93 |
|
94 RPointerArray<MOssHangulInputEventObserver> iObservers; |
|
95 |
|
96 }; |
|
97 |
|
98 #endif // OSSHANGULINPUTCONTEXT_H |