42 // for setting key decoder in tls |
42 // for setting key decoder in tls |
43 #include "CMIDKeyDecoder.h" |
43 #include "CMIDKeyDecoder.h" |
44 #include "lcdui.h" |
44 #include "lcdui.h" |
45 #include <j2me/jdebug.h> |
45 #include <j2me/jdebug.h> |
46 #include "CMIDUIManager.h" |
46 #include "CMIDUIManager.h" |
|
47 #include "coreuiavkonlcdui.h" |
|
48 #include "coreuiappui.h" |
47 |
49 |
48 |
50 |
49 const TInt KResolutionStringLength = 4; |
51 const TInt KResolutionStringLength = 4; |
50 |
52 |
51 // ============================ MEMBER FUNCTIONS =============================== |
53 // ============================ MEMBER FUNCTIONS =============================== |
199 // |
201 // |
200 // ----------------------------------------------------------------------------- |
202 // ----------------------------------------------------------------------------- |
201 // |
203 // |
202 void CMIDMenuHandler::SendMultipleKeyPressedEvent() |
204 void CMIDMenuHandler::SendMultipleKeyPressedEvent() |
203 { |
205 { |
204 ASSERT(iDisplayable); |
206 ASSERT(iDisplayable); |
205 |
207 java::ui::CoreUiAvkonAppUi* appUi = |
206 RWsSession wsSession = CCoeEnv::Static()->WsSession(); |
208 java::ui::CoreUiAvkonLcdui::getInstance().getJavaUiAppUi(); |
207 TWsEvent event; |
209 if (appUi) |
208 |
210 { |
209 // Check the current Display type if it is canvas enable the |
211 MMIDComponent* component = iDisplayable->Component(); |
210 // multiple key events, other wise disable it. |
212 if (component) |
211 MMIDComponent* component = iDisplayable->Component(); |
213 { |
212 MMIDComponent::TType type = component->Type(); |
214 if (component->Type() == MMIDComponent::ECanvas) |
213 |
215 { |
214 if (type == MMIDComponent::ECanvas) |
216 appUi->glueSetKeyBlockMode(ENoKeyBlock); |
215 event.SetType(EEnableMultipleKeyPressedEvent); // set event type enable multiple key pressed event |
217 } |
216 else |
218 else |
217 event.SetType(EDisableMultipleKeyPressedEvent); // set event type disable multiple key pressed event |
219 { |
218 event.SetTimeNow(); // set the event time |
220 appUi->glueSetKeyBlockMode(EDefaultBlockMode); |
219 event.SetHandle(wsSession.WsHandle()); // set window server handle |
221 } |
220 wsSession.SendEventToAllWindowGroups(event); |
222 } |
|
223 } |
221 } |
224 } |
222 |
225 |
223 |
226 |
224 // ----------------------------------------------------------------------------- |
227 // ----------------------------------------------------------------------------- |
225 // CMIDMenuHandler::ProcessCommandL |
228 // CMIDMenuHandler::ProcessCommandL |