|
1 /* |
|
2 * Copyright (c) 2002-2004 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: External rendering plugin wrapper header |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef XNEXTRENDERINGPLUGINWRAPPER_H |
|
19 #define XNEXTRENDERINGPLUGINWRAPPER_H |
|
20 |
|
21 // System includes |
|
22 #include <e32base.h> |
|
23 #include <xnextrenderingpluginadapter.h> |
|
24 #include <xnexteventhandler.h> |
|
25 |
|
26 // User includes |
|
27 #include "xncontroladapter.h" |
|
28 #include "xnproperty.h" |
|
29 #include "xncomponent.h" |
|
30 #include "xnnodepluginif.h" |
|
31 |
|
32 /** |
|
33 * CXnExtRenderingPluginWrapper class |
|
34 * |
|
35 * |
|
36 * @code |
|
37 * |
|
38 * @endcode |
|
39 * |
|
40 * @lib extrenderingplugin.lib |
|
41 * @since S60 v5.0 |
|
42 */ |
|
43 NONSHARABLE_CLASS( CXnExtRenderingPluginWrapper ) : public CXnControlAdapter, public MXnExtEventHandler |
|
44 { |
|
45 public: // Constructor and destructor |
|
46 /** |
|
47 * Two-phased constructor. |
|
48 */ |
|
49 static CXnExtRenderingPluginWrapper* NewL( |
|
50 CXnNodePluginIf& aNode, CXnExtRenderingPluginAdapter& aAdapter ); |
|
51 |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 virtual ~CXnExtRenderingPluginWrapper(); |
|
56 |
|
57 private: // Constructors |
|
58 /** |
|
59 * Constructor |
|
60 */ |
|
61 CXnExtRenderingPluginWrapper( CXnExtRenderingPluginAdapter& aAdapter ); |
|
62 |
|
63 /** |
|
64 * Second phase constructor |
|
65 */ |
|
66 void ConstructL( CXnNodePluginIf& aNode ); |
|
67 |
|
68 private: |
|
69 TInt CountComponentControls() const; |
|
70 |
|
71 CCoeControl* ComponentControl(TInt aIndex) const; |
|
72 |
|
73 void HandleScreenDeviceChangedL(); |
|
74 |
|
75 void MakeVisible(TBool aVisible); |
|
76 |
|
77 void FocusChanged(TDrawNow aDrawNow); |
|
78 |
|
79 void SetContainerWindowL(const CCoeControl& aContainer); |
|
80 |
|
81 void SkinChanged(); |
|
82 |
|
83 void SizeChanged(); |
|
84 |
|
85 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); |
|
86 |
|
87 /** |
|
88 * Routes the data stream for the external rendering plugin. |
|
89 * |
|
90 * @since Series 60 5.2 |
|
91 * @param aData Data stream. |
|
92 * @param aType Type of the stream. |
|
93 * @param aIndex Index of the data. |
|
94 */ |
|
95 void SetDataL( const TDesC8& aData, const TDesC& aType, TInt aIndex ); |
|
96 |
|
97 public: // New functions |
|
98 |
|
99 /** |
|
100 * @see CXnControlAdapter |
|
101 */ |
|
102 void DoEnterPowerSaveModeL( TModeEvent aEvent ); |
|
103 |
|
104 /** |
|
105 * @see CXnControlAdapter |
|
106 */ |
|
107 void DoExitPowerSaveModeL( TModeEvent aEvent ); |
|
108 |
|
109 /** |
|
110 * Routes the events from the external rendering plug-ins to content plug-ins |
|
111 * @since Series 60 5.2 |
|
112 * @param aEvent Event string |
|
113 * @param aDestination Destination content plug-in. |
|
114 */ |
|
115 void HandleEventL( const TDesC& aEvent, const TDesC8& aDestination ); |
|
116 |
|
117 private: // Data |
|
118 |
|
119 /** |
|
120 * Rendering plugin adapter. Own. |
|
121 */ |
|
122 CXnExtRenderingPluginAdapter* iAdapter; |
|
123 |
|
124 /** |
|
125 * Node. Not own. |
|
126 */ |
|
127 CXnNodePluginIf* iNode; |
|
128 }; |
|
129 |
|
130 #endif // XNEXTRENDERINGPLUGINFACTORY_H |
|
131 |
|
132 // End of file |