taskswitcher/taskswitcherui/taskswitcherapp/src/tsphysicsengine.cpp
branchv5backport
changeset 14 1abc632eb502
parent 13 6205fd287e8a
child 20 636d517f67e6
--- a/taskswitcher/taskswitcherui/taskswitcherapp/src/tsphysicsengine.cpp	Thu Mar 18 14:45:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Taskswitcher physics
- *
-*/
-
-#include <aknphysics.h>
-
-#include "tsphysicsengine.h"
-#include "tsphysics.h"
-
-// -----------------------------------------------------------------------------
-// CTsPhysicsHandler::CTsPhysicsHandler
-// -----------------------------------------------------------------------------
-//
-CTsPhysicsEngine::CTsPhysicsEngine()
-    {
-    // No implementation required
-    }
-
-// -----------------------------------------------------------------------------
-// CTsPhysicsEngine::~CTsPhysicsEngine
-// -----------------------------------------------------------------------------
-//
-CTsPhysicsEngine::~CTsPhysicsEngine()
-    {
-    delete iTaskswitcherPhysics;
-    delete iPhysics;
-    }
-
-// -----------------------------------------------------------------------------
-// CTsPhysicsEngine::NewLC
-// -----------------------------------------------------------------------------
-//
-CTsPhysicsEngine* CTsPhysicsEngine::NewLC(
-        MAknPhysicsObserver& aPhysicObserver, CCoeControl& aViewControl)
-    {
-    CTsPhysicsEngine* self = new (ELeave) CTsPhysicsEngine();
-    CleanupStack::PushL(self);
-    self->ConstructL(aPhysicObserver, aViewControl);
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CTsPhysicsEngine::NewL
-// -----------------------------------------------------------------------------
-//
-CTsPhysicsEngine* CTsPhysicsEngine::NewL(
-        MAknPhysicsObserver& aPhysicObserver, CCoeControl& aViewControl)
-    {
-    CTsPhysicsEngine* self = CTsPhysicsEngine::NewLC(
-            aPhysicObserver, aViewControl);
-    CleanupStack::Pop(); // self;
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-// CTsPhysicsEngine::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CTsPhysicsEngine::ConstructL(MAknPhysicsObserver& aPhysicObserver,
-        CCoeControl& aViewControl)
-    {
-    iPhysics = CAknPhysics::NewL(aPhysicObserver, &aViewControl);//TODO:
-    iTaskswitcherPhysics = CTsPhysics::NewL(aPhysicObserver);
-    }
-
-
-// -----------------------------------------------------------------------------
-// CTsPhysicsEngine::IsRunning
-// -----------------------------------------------------------------------------
-//
-TBool CTsPhysicsEngine::IsRunning() const
-    {
-    return iPhysics->OngoingPhysicsAction() != CAknPhysics::EAknPhysicsActionNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CTsPhysicsEngine::HandleDragEvent
-// -----------------------------------------------------------------------------
-//
-void CTsPhysicsEngine::HandleDragEvent(
-        AknTouchGestureFw::MAknTouchGestureFwDragEvent& aEvent)
-    {
-    if (AknTouchGestureFw::EAknTouchGestureFwStart == aEvent.State())
-        {
-        iPhysics->StopPhysics();
-        iStartTime.HomeTime();
-        }
-    else if (AknTouchGestureFw::EAknTouchGestureFwOn == aEvent.State())
-        {
-        TPoint deltaPoint(aEvent.PreviousPosition() - aEvent.CurrentPosition());
-        iPhysics->RegisterPanningPosition(deltaPoint);
-        }
-    else //AknTouchGestureFw::EAknTouchGestureFwStop
-        {
-        TPoint drag(aEvent.PreviousPosition() - aEvent.CurrentPosition());
-        iPhysics->StartPhysics(drag, iStartTime);
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CTsPhysicsEngine::Stop
-// -----------------------------------------------------------------------------
-//
-void CTsPhysicsEngine::Stop()
-    {
-    iPhysics->StopPhysics();
-    iTaskswitcherPhysics->StopPhysics();
-    }
-
-// -----------------------------------------------------------------------------
-// CTsPhysicsEngine::AnimateToTargetL
-// -----------------------------------------------------------------------------
-//
-void CTsPhysicsEngine::AnimateToTarget(const TPoint& aPoint)
-    {
-    iTaskswitcherPhysics->StartPhysics(aPoint);
-    }
-
-// -----------------------------------------------------------------------------
-// CTsPhysicsEngine::ReInitPhysicsL
-// -----------------------------------------------------------------------------
-//
-void CTsPhysicsEngine::ReInitPhysicsL(const TSize& aWorldSize,
-        const TSize& aViewSize, TBool aLandscape)
-    {
-    iPhysics->InitPhysicsL(aWorldSize, aViewSize, aLandscape);
-    }
-
-//End file