|
1 /* |
|
2 * Copyright (c) 2002-2006 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 * |
|
16 */ |
|
17 |
|
18 #ifndef __PENINPUTPLUGINKR_H__ |
|
19 #define __PENINPUTPLUGINKR_H__ |
|
20 |
|
21 #include <e32base.h> // CBase |
|
22 #include <e32std.h> // TBuf |
|
23 #include <AknFepPenInputImePlugin.h> |
|
24 #include <centralrepository.h> |
|
25 |
|
26 class RPeninputServer; |
|
27 class CPtiEngine; |
|
28 class CPluginKrFepManagerBase; |
|
29 |
|
30 class CPeninputPluginKr : public CAknFepPenInputImePlugin |
|
31 { |
|
32 public: |
|
33 |
|
34 static CPeninputPluginKr* NewLC(TAny* aInitParams); |
|
35 |
|
36 static CPeninputPluginKr* NewL(TAny* aInitParams); |
|
37 |
|
38 virtual ~CPeninputPluginKr(); |
|
39 |
|
40 private: |
|
41 |
|
42 CPeninputPluginKr(RPeninputServer* aServer); |
|
43 |
|
44 void ConstructL(); |
|
45 |
|
46 private: // from CAknFepPenInputImePlugin |
|
47 |
|
48 /** |
|
49 * Get layout UI interface |
|
50 * |
|
51 * @since S60 v3.2 |
|
52 * @param aFepManager Fep manager interface pointer |
|
53 * @param aLanguage Language that layout UI need to support |
|
54 * @param aMode Speicifed layout UI mode to create |
|
55 * @param aData Initialization data. |
|
56 * |
|
57 * @return The layout UI interface.. |
|
58 */ |
|
59 virtual MAknFepManagerInterface* GetInputMethodUiL( |
|
60 MAknFepManagerUIInterface* aFepManager, |
|
61 TLanguage aLanguage, |
|
62 TInt aMode, |
|
63 const TDesC8& aData, |
|
64 const TBool aIsSplitView = EFalse); |
|
65 |
|
66 /** |
|
67 * Get layout UI interface |
|
68 * |
|
69 * @since S60 v3.2 |
|
70 * @param aFepManager Fep manager interface pointer |
|
71 * @param aLayoutId Speicifed layout UI id to create |
|
72 * @param aData Initialization data. |
|
73 * |
|
74 * @return The layout UI interface.. |
|
75 */ |
|
76 virtual MAknFepManagerInterface* GetInputMethodUiL( |
|
77 MAknFepManagerUIInterface* aFepManager, |
|
78 TInt aLayoutId, |
|
79 const TDesC8& aData); |
|
80 |
|
81 /** |
|
82 * Activate current IME plugin. |
|
83 * |
|
84 * @since S60 v3.2 |
|
85 * |
|
86 * @return None. |
|
87 */ |
|
88 virtual void Activate(); |
|
89 |
|
90 /** |
|
91 * Deactivate current IME plugin. |
|
92 * |
|
93 * @since S60 v3.2 |
|
94 * |
|
95 * @return None. |
|
96 */ |
|
97 virtual void DeActivate(); |
|
98 |
|
99 /** |
|
100 * Get current IME plugin implementation ID. |
|
101 * |
|
102 * @since S60 v3.2 |
|
103 * |
|
104 * @return IME plugin implementation id. |
|
105 */ |
|
106 virtual TInt ImeImplId(); |
|
107 |
|
108 /** |
|
109 * Get current layout UI implementation id. |
|
110 * |
|
111 * @since S60 v3.2 |
|
112 * |
|
113 * @return None. |
|
114 */ |
|
115 virtual TInt LayoutUiImplId(); |
|
116 |
|
117 /** |
|
118 * Handle pen input server event. |
|
119 * |
|
120 * @param aEventId The event id, defined in <peninputcmd.h> |
|
121 * @param aData The event related data. |
|
122 * @since S60 v3.2 |
|
123 * |
|
124 * @return None. |
|
125 */ |
|
126 virtual TBool HandleServerEventL( |
|
127 TInt aEventId, |
|
128 const TDesC& aData); |
|
129 |
|
130 /** |
|
131 * Get suppored layout UI modes(VKB/HWR). |
|
132 * |
|
133 * @since S60 v3.2 |
|
134 * |
|
135 * @return Supported modes. |
|
136 */ |
|
137 virtual TInt SupportModes( |
|
138 CPtiEngine* aPtiEngine, |
|
139 RArray<TImePlguinImplDetail>& aSupportList) const; |
|
140 |
|
141 /** |
|
142 * Get current layout UI mode. |
|
143 * |
|
144 * @since S60 v3.2 |
|
145 * |
|
146 * @return Current layout UI mode. |
|
147 */ |
|
148 virtual TInt CurrentMode() const; |
|
149 |
|
150 /** |
|
151 * Handle the menu command.The menu is launched by FEP |
|
152 * The menu command is first passed to IME plugin, if |
|
153 * this function return EFalse, FEP handles it defaultly. |
|
154 * |
|
155 * @param aCommandId The menu command id |
|
156 * @return ETrue if IME plugin handled the command; |
|
157 * EFalse otherwise. |
|
158 */ |
|
159 virtual TBool HandleMenuCommandL(TInt aCommandId); |
|
160 |
|
161 /** |
|
162 * Dynamiclly update menu items during it displays. |
|
163 * |
|
164 * aMenuPane The menu pane pointer. |
|
165 * @return None. |
|
166 */ |
|
167 virtual void DynInitMenuPaneL( |
|
168 CAknFepUiInterfaceMenuPane* aMenuPane); |
|
169 |
|
170 |
|
171 private: |
|
172 |
|
173 void FindUiLayoutImplementationL(); |
|
174 |
|
175 CPluginKrFepManagerBase* GetPluginUiL( TInt aMode ); |
|
176 |
|
177 TInt SupportModesL( |
|
178 CPtiEngine* /*aPtiEngine*/, |
|
179 RArray<TImePlguinImplDetail>& aSupportList) const; |
|
180 |
|
181 CPluginKrFepManagerBase* CPeninputPluginKr::GetCurrentUi(); |
|
182 |
|
183 /** |
|
184 * Get VKB UI interface |
|
185 * |
|
186 * @return VKB UI pointer |
|
187 */ |
|
188 CPluginKrFepManagerBase* GetVkbUiL(); |
|
189 |
|
190 /** |
|
191 * Get Itut UI interface |
|
192 * |
|
193 * @return Itut UI pointer |
|
194 */ |
|
195 CPluginKrFepManagerBase* GetItutUiL(); |
|
196 |
|
197 /** |
|
198 * Get FSQ UI interface |
|
199 * |
|
200 * @return FSQ UI pointer |
|
201 */ |
|
202 CPluginKrFepManagerBase* GetFSQUiL(TInt aLang); |
|
203 |
|
204 void ShowListQueryL( const TInt aResourceId ); |
|
205 |
|
206 private: |
|
207 |
|
208 RPeninputServer& iPeninputServer; |
|
209 |
|
210 RArray<TInt> iUiLayoutImpIdList; |
|
211 |
|
212 TInt iPenInputMode; |
|
213 |
|
214 /** |
|
215 * Pen input server pointer. Not own. |
|
216 */ |
|
217 RPointerArray<CPluginKrFepManagerBase> iAllUiManagers; |
|
218 |
|
219 CPluginKrFepManagerBase* iPluginKrFepManager; |
|
220 |
|
221 CRepository* iRepository; |
|
222 |
|
223 TInt iResId; |
|
224 |
|
225 }; |
|
226 |
|
227 #endif // __PENINPUTPLUGINKR_H__ |
|
228 |