|
1 /* |
|
2 * Copyright (c) 2007 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: Compa-mode ecom interface implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <../ecom/implementationproxy.h> |
|
21 |
|
22 #include "akncompaifimpl.h" |
|
23 #include "akncompaif.hrh" |
|
24 #include "akncompautils.h" |
|
25 #include "akncompakb.h" |
|
26 #include "akncompaclearer.h" |
|
27 |
|
28 // -------------------------------------------------------------------------- |
|
29 // |
|
30 // -------------------------------------------------------------------------- |
|
31 CAknCompaIfImpl* CAknCompaIfImpl::NewL() |
|
32 { |
|
33 return new (ELeave) CAknCompaIfImpl; |
|
34 } |
|
35 |
|
36 // -------------------------------------------------------------------------- |
|
37 // |
|
38 // -------------------------------------------------------------------------- |
|
39 CAknCompaIfImpl::~CAknCompaIfImpl() |
|
40 { |
|
41 delete iCompaKb; |
|
42 delete iClearer; |
|
43 } |
|
44 |
|
45 // -------------------------------------------------------------------------- |
|
46 // Check if application requires compa-mode. Set screen mode to compa-mode |
|
47 // if compa-mode is enabled and application requires it. Returns KErrNotFound |
|
48 // if compa-mode is not needed. |
|
49 // -------------------------------------------------------------------------- |
|
50 TInt CAknCompaIfImpl::SetCompaAppScreenModeL(TBool& aScrModeChanged, |
|
51 TBool& aIsConsoleApp, TInt aAppUiFlags, CAknAppUiBase& aAppUi, |
|
52 const CCoeEnv& aCoeEnv, CRepository& aRepository) |
|
53 { |
|
54 return AknCompaUtils::SetCompaAppScreenModeL(aScrModeChanged, |
|
55 aIsConsoleApp, iClearer, aAppUiFlags, aAppUi, aCoeEnv, aRepository); |
|
56 } |
|
57 |
|
58 // -------------------------------------------------------------------------- |
|
59 // Create instance of compa keyboard |
|
60 // -------------------------------------------------------------------------- |
|
61 void CAknCompaIfImpl::CreateKbL(TInt aCompaScreenMode, TBool aMakeVisible) |
|
62 { |
|
63 iCompaKb = CAknCompaKb::NewL(aCompaScreenMode, aMakeVisible); |
|
64 delete iClearer; iClearer = NULL; |
|
65 } |
|
66 |
|
67 // -------------------------------------------------------------------------- |
|
68 // Check if compa-mode application is on foreground |
|
69 // -------------------------------------------------------------------------- |
|
70 TBool CAknCompaIfImpl::IsForeground() |
|
71 { |
|
72 return iCompaKb->IsForeground(); |
|
73 } |
|
74 |
|
75 // -------------------------------------------------------------------------- |
|
76 // Find compatibility screen mode |
|
77 // -------------------------------------------------------------------------- |
|
78 TInt CAknCompaIfImpl::FindCompaScreenMode() |
|
79 { |
|
80 return AknCompaUtils::FindCompaScreenMode(); |
|
81 } |
|
82 |
|
83 // -------------------------------------------------------------------------- |
|
84 // Disable transition effects |
|
85 // -------------------------------------------------------------------------- |
|
86 void CAknCompaIfImpl::DisableTransEffects(TBool aDisable) |
|
87 { |
|
88 iCompaKb->DisaTransEffects(aDisable); |
|
89 } |
|
90 |
|
91 // -------------------------------------------------------------------------- |
|
92 // Return factory functions for ECOM interface implementations |
|
93 // -------------------------------------------------------------------------- |
|
94 EXPORT_C const TImplementationProxy* ImplementationGroupProxy( |
|
95 TInt& aTableCount) |
|
96 { |
|
97 static const TImplementationProxy ImplementationTable[] = |
|
98 { |
|
99 IMPLEMENTATION_PROXY_ENTRY( |
|
100 AKNCOMPAIF_ECOM_IMPL_UID, CAknCompaIfImpl::NewL) |
|
101 }; |
|
102 aTableCount = |
|
103 sizeof(ImplementationTable) / sizeof(ImplementationTable[0]); |
|
104 |
|
105 return ImplementationTable; |
|
106 } |