1 /* |
|
2 * =========================================================================== |
|
3 * Name : hgfswappui.cpp |
|
4 * Part of : Huriganes / Fast Swap Server |
|
5 * Description : appui implementation |
|
6 * Version : %version: sa1spcx1#6 % |
|
7 * |
|
8 * Copyright © 2008 Nokia Corporation. |
|
9 * This material, including documentation and any related |
|
10 * computer programs, is protected by copyright controlled by |
|
11 * Nokia Corporation. All rights are reserved. Copying, |
|
12 * including reproducing, storing, adapting or translating, any |
|
13 * or all of this material requires the prior written consent of |
|
14 * Nokia Corporation. This material also contains confidential |
|
15 * information which may not be disclosed to others without the |
|
16 * prior written consent of Nokia Corporation. |
|
17 * =========================================================================== |
|
18 */ |
|
19 |
|
20 #include "hgfswappui.h" |
|
21 #include "hgfswobservers.h" |
|
22 |
|
23 // -------------------------------------------------------------------------- |
|
24 // CHgFswAppUi::~CHgFswAppUi |
|
25 // -------------------------------------------------------------------------- |
|
26 // |
|
27 CHgFswAppUi::~CHgFswAppUi() |
|
28 { |
|
29 // empty |
|
30 } |
|
31 |
|
32 // -------------------------------------------------------------------------- |
|
33 // CHgFswAppUi::ConstructL |
|
34 // -------------------------------------------------------------------------- |
|
35 // |
|
36 void CHgFswAppUi::ConstructL() |
|
37 { |
|
38 CAknAppUi::BaseConstructL( ENoAppResourceFile | EAknEnableSkin ); |
|
39 RWindowGroup& windowGroup = CCoeEnv::Static()->RootWin(); |
|
40 windowGroup.EnableFocusChangeEvents(); |
|
41 windowGroup.EnableGroupListChangeEvents(); |
|
42 } |
|
43 |
|
44 // -------------------------------------------------------------------------- |
|
45 // CHgFswAppUi::SetTaskListObserver |
|
46 // -------------------------------------------------------------------------- |
|
47 // |
|
48 void CHgFswAppUi::SetTaskListObserver( MHgFswTaskListObserver& aTaskListObserver ) |
|
49 { |
|
50 iTaskListObserver = &aTaskListObserver; |
|
51 } |
|
52 |
|
53 // -------------------------------------------------------------------------- |
|
54 // CHgFswAppUi::SetResourceObserver |
|
55 // -------------------------------------------------------------------------- |
|
56 // |
|
57 void CHgFswAppUi::SetResourceObserver( MHgFswResourceObserver& aResourceObserver ) |
|
58 { |
|
59 iResourceObserver = &aResourceObserver; |
|
60 } |
|
61 |
|
62 // -------------------------------------------------------------------------- |
|
63 // CHgFswAppUi::HandleWsEventL |
|
64 // -------------------------------------------------------------------------- |
|
65 // |
|
66 void CHgFswAppUi::HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination ) |
|
67 { |
|
68 TInt eventType = aEvent.Type(); |
|
69 |
|
70 if ( eventType == EEventFocusGroupChanged |
|
71 || eventType == EEventWindowGroupListChanged ) |
|
72 { |
|
73 if ( iTaskListObserver ) |
|
74 { |
|
75 iTaskListObserver->UpdateTaskList(); |
|
76 } |
|
77 } |
|
78 |
|
79 CAknAppUi::HandleWsEventL( aEvent, aDestination ); |
|
80 } |
|
81 |
|
82 // -------------------------------------------------------------------------- |
|
83 // CHgFswAppUi::HandleResourceChangeL |
|
84 // -------------------------------------------------------------------------- |
|
85 // |
|
86 void CHgFswAppUi::HandleResourceChangeL( TInt aType ) // codescanner::LFunctionCantLeave (virtual) |
|
87 { |
|
88 if ( iResourceObserver ) |
|
89 { |
|
90 iResourceObserver->HandleResourceChange( aType ); |
|
91 } |
|
92 } |
|
93 |
|
94 |
|
95 // end of file |
|