|
1 /* |
|
2 * Copyright (c) 2010 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 #include <eikenv.h> |
|
18 #include "application.h" |
|
19 #include "enginewrapper.h" |
|
20 |
|
21 #define KEY_CAPTURE_PRIORITY 100 |
|
22 |
|
23 SGApplication::SGApplication(int argc, char *argv[]) |
|
24 : HbApplication(argc, argv) |
|
25 { |
|
26 |
|
27 |
|
28 } |
|
29 |
|
30 |
|
31 SGApplication::~SGApplication() |
|
32 { |
|
33 |
|
34 } |
|
35 |
|
36 // --------------------------------------------------------------------------- |
|
37 |
|
38 #if defined(Q_WS_S60) |
|
39 #if defined(HB_QT_S60_EVENT_FILTER) |
|
40 bool SGApplication::s60EventFilter(TWsEvent *aEvent) |
|
41 #else |
|
42 bool SGApplication::symbianEventFilter(const QSymbianEvent *aEvent) |
|
43 #endif // (HB_QT_S60_EVENT_FILTER) |
|
44 { |
|
45 // pass event to engine, if engine returns true(event was not handled), |
|
46 // forward it. |
|
47 if(!iEngine->handleCaptureCommands(aEvent)) |
|
48 { |
|
49 return false; |
|
50 } |
|
51 else |
|
52 { |
|
53 #if defined(HB_QT_S60_EVENT_FILTER) |
|
54 return HbApplication::s60EventFilter(aEvent); |
|
55 #else |
|
56 return HbApplication::symbianEventFilter(aEvent); |
|
57 #endif |
|
58 } |
|
59 |
|
60 } |
|
61 #endif |
|
62 |
|
63 // --------------------------------------------------------------------------- |