|
1 /* |
|
2 * Copyright (c) 2008 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: appui implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "tsfswappui.h" |
|
20 #include "tsfswobservers.h" |
|
21 |
|
22 // -------------------------------------------------------------------------- |
|
23 // CTsFswAppUi::~CTsFswAppUi |
|
24 // -------------------------------------------------------------------------- |
|
25 // |
|
26 CTsFswAppUi::~CTsFswAppUi() |
|
27 { |
|
28 // empty |
|
29 } |
|
30 |
|
31 // -------------------------------------------------------------------------- |
|
32 // CTsFswAppUi::ConstructL |
|
33 // -------------------------------------------------------------------------- |
|
34 // |
|
35 void CTsFswAppUi::ConstructL() |
|
36 { |
|
37 CAknAppUi::BaseConstructL( ENoAppResourceFile | EAknEnableSkin ); |
|
38 RWindowGroup& windowGroup = CCoeEnv::Static()->RootWin(); |
|
39 windowGroup.EnableFocusChangeEvents(); |
|
40 windowGroup.EnableGroupListChangeEvents(); |
|
41 } |
|
42 |
|
43 // -------------------------------------------------------------------------- |
|
44 // CTsFswAppUi::SetTaskListObserver |
|
45 // -------------------------------------------------------------------------- |
|
46 // |
|
47 void CTsFswAppUi::SetTaskListObserver( MTsFswTaskListObserver& aTaskListObserver ) |
|
48 { |
|
49 iTaskListObserver = &aTaskListObserver; |
|
50 } |
|
51 |
|
52 // -------------------------------------------------------------------------- |
|
53 // CTsFswAppUi::SetResourceObserver |
|
54 // -------------------------------------------------------------------------- |
|
55 // |
|
56 void CTsFswAppUi::SetResourceObserver( MTsFswResourceObserver& aResourceObserver ) |
|
57 { |
|
58 iResourceObserver = &aResourceObserver; |
|
59 } |
|
60 |
|
61 // -------------------------------------------------------------------------- |
|
62 // CTsFswAppUi::HandleWsEventL |
|
63 // -------------------------------------------------------------------------- |
|
64 // |
|
65 void CTsFswAppUi::HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination ) |
|
66 { |
|
67 TInt eventType = aEvent.Type(); |
|
68 |
|
69 if ( eventType == EEventFocusGroupChanged |
|
70 || eventType == EEventWindowGroupListChanged ) |
|
71 { |
|
72 if ( iTaskListObserver ) |
|
73 { |
|
74 iTaskListObserver->UpdateTaskList(); |
|
75 } |
|
76 } |
|
77 |
|
78 CAknAppUi::HandleWsEventL( aEvent, aDestination ); |
|
79 } |
|
80 |
|
81 // -------------------------------------------------------------------------- |
|
82 // CTsFswAppUi::HandleResourceChangeL |
|
83 // -------------------------------------------------------------------------- |
|
84 // |
|
85 void CTsFswAppUi::HandleResourceChangeL( TInt aType ) // codescanner::LFunctionCantLeave (virtual) |
|
86 { |
|
87 if ( iResourceObserver ) |
|
88 { |
|
89 iResourceObserver->HandleResourceChange( aType ); |
|
90 } |
|
91 } |
|
92 |
|
93 |
|
94 // end of file |