|
1 /* |
|
2 * Copyright (c) 2002-2006 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: View control adapter |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef _XNVIEWCONTROLADAPTER_H |
|
19 #define _XNVIEWCONTROLADAPTER_H |
|
20 |
|
21 // System includes |
|
22 #include <e32base.h> |
|
23 |
|
24 // User includes |
|
25 #include "xncontroladapter.h" |
|
26 #include "xnuistatelistener.h" |
|
27 |
|
28 // Forward declarations |
|
29 class CXnNodePluginIf; |
|
30 class CXnAppUiAdapter; |
|
31 |
|
32 // Class declaration |
|
33 /** |
|
34 * @ingroup group_xnlayoutengine |
|
35 * @lib xn3layoutengine.lib |
|
36 * @since S60 5.2 |
|
37 */ |
|
38 NONSHARABLE_CLASS( CXnViewControlAdapter ) : public CXnControlAdapter, |
|
39 public MXnUiStateObserver |
|
40 { |
|
41 public: |
|
42 // Constructors and destructor |
|
43 |
|
44 /** |
|
45 * 2 phase construction. |
|
46 */ |
|
47 static CXnViewControlAdapter* NewL( CXnNodePluginIf& aNode ); |
|
48 |
|
49 /** |
|
50 * Destructor. |
|
51 */ |
|
52 ~CXnViewControlAdapter(); |
|
53 |
|
54 public: |
|
55 // From base classes |
|
56 |
|
57 /** |
|
58 * @see CCoeControl documentation |
|
59 */ |
|
60 void MakeVisible( TBool aVisible ); |
|
61 |
|
62 /** |
|
63 * @see CCoeControl |
|
64 */ |
|
65 void Draw( const TRect& aRect ) const; |
|
66 |
|
67 /** |
|
68 * @see CCoeControl |
|
69 */ |
|
70 void HandlePointerEventL( const TPointerEvent& aPointerEvent ); |
|
71 |
|
72 public: |
|
73 // new functions |
|
74 |
|
75 /** |
|
76 * Resets pointer grabbing |
|
77 * |
|
78 * @since S60 5.2 |
|
79 */ |
|
80 void ResetGrabbing(); |
|
81 |
|
82 private: |
|
83 // from MXnUiStateObserver |
|
84 |
|
85 /** |
|
86 * @see MXnUiStateObserver |
|
87 */ |
|
88 void NotifyForegroundChanged( TForegroundStatus aStatus ); |
|
89 |
|
90 /** |
|
91 * @see MXnUiStateObserver |
|
92 */ |
|
93 void NotifyLightStatusChanged( TBool aLightsOn ); |
|
94 |
|
95 /** |
|
96 * @see MXnUiStateObserver |
|
97 */ |
|
98 void NotifyInCallStateChaged( TBool aInCall ); |
|
99 |
|
100 private: |
|
101 // constructors |
|
102 |
|
103 /** |
|
104 * C++ default constructor |
|
105 */ |
|
106 CXnViewControlAdapter( CXnNodePluginIf& aNode ); |
|
107 |
|
108 /** |
|
109 * 2nd phase constructor |
|
110 */ |
|
111 void ConstructL( CXnNodePluginIf& aNode ); |
|
112 |
|
113 private: |
|
114 // data |
|
115 |
|
116 /** Node */ |
|
117 CXnNodePluginIf& iNode; |
|
118 /** AppUi */ |
|
119 CXnAppUiAdapter& iAppUi; |
|
120 /** HS foreground status*/ |
|
121 MXnUiStateObserver::TForegroundStatus iForegroundStatus; |
|
122 }; |
|
123 |
|
124 #endif // _XNVIEWCONTROLADAPTER_H |
|
125 |
|
126 // End of File |