|
1 /* |
|
2 * Copyright (c) 2009 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: THIS FILE IS NOT INCLUDED INTO ECLIPSE CVS DELIVERY |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef SWTPHYSICS_H |
|
20 #define SWTPHYSICS_H |
|
21 |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <aknphysicsobserveriface.h> |
|
25 #include "mswtphysics.h" |
|
26 |
|
27 |
|
28 class CAknPhysics; |
|
29 |
|
30 |
|
31 NONSHARABLE_CLASS(CSwtPhysics) |
|
32 : public CBase |
|
33 , public MSwtPhysics |
|
34 , public MAknPhysicsObserver |
|
35 { |
|
36 // Own methods |
|
37 public: |
|
38 static CSwtPhysics* NewL(MSwtPhysicsObserver& aObserver, CCoeControl& aControl); |
|
39 virtual ~CSwtPhysics(); |
|
40 |
|
41 // From MSwtPhysics |
|
42 public: |
|
43 void InitPhysicsL(const TSize& aWorldSize, const TSize& aViewSize, |
|
44 TBool aLandscape); |
|
45 TBool StartPhysics(TPoint& aDrag, const TTime& aStartTime); |
|
46 void StopPhysics(); |
|
47 TInt OngoingPhysicsAction() const; |
|
48 void RegisterPanningPosition(const TPoint& aDelta); |
|
49 TInt HighlightTimeout() const; |
|
50 TInt DragThreshold() const; |
|
51 TBool FeatureEnabled(); |
|
52 |
|
53 // From MAknPhysicsObserver |
|
54 public: |
|
55 void ViewPositionChanged(const TPoint& aNewPosition, TBool aDrawNow, |
|
56 TUint aFlags); |
|
57 void ViewPositionChanged(const TPoint& aNewPosition); |
|
58 void PhysicEmulationEnded(); |
|
59 TPoint ViewPosition() const; |
|
60 |
|
61 // Own methods |
|
62 private: |
|
63 CSwtPhysics(MSwtPhysicsObserver& aObserver, CCoeControl& aControl); |
|
64 void ConstructL(); |
|
65 |
|
66 // Data |
|
67 private: |
|
68 CAknPhysics* iPhysics; // Own |
|
69 CCoeControl& iControl; |
|
70 MSwtPhysicsObserver& iObserver; |
|
71 }; |
|
72 |
|
73 /** |
|
74 * Factory |
|
75 */ |
|
76 IMPORT_C MSwtPhysics* SwtPhysicsLibEntryL(MSwtPhysicsObserver&, CCoeControl&); |
|
77 |
|
78 |
|
79 #endif // SWTPHYSICS_H |