mulwidgets/gesturehelper/src/gesturehelper.cpp
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:23:18 +0100
branchRCL_3
changeset 26 0e9bb658ef58
parent 0 e83bab7cf002
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035

/*
* Copyright (c) 2007 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:  Gesture helper interface
*
*/

// class include
#include "gesturehelper.h"

// local includes
#include "gesturehelperimpl.h"

using namespace GestureHelper;

// ----------------------------------------------------------------------------
// Two-phase constructor
// ----------------------------------------------------------------------------
//
EXPORT_C CGestureHelper* CGestureHelper::NewL( MGestureObserver& aObserver )
    {
    CGestureHelper* self = new ( ELeave ) CGestureHelper;
    CleanupStack::PushL( self );
    self->iImpl = CGestureHelperImpl::NewL( aObserver );    
    CleanupStack::Pop( self );
    return self;
    }

// ----------------------------------------------------------------------------
// Destructor
// ----------------------------------------------------------------------------
//
EXPORT_C CGestureHelper::~CGestureHelper()
    {
    delete iImpl;
    }

// ----------------------------------------------------------------------------
// SetHoldingEnabled
// ----------------------------------------------------------------------------
//
EXPORT_C void CGestureHelper::SetHoldingEnabled( TBool aEnabled )
    {
    iImpl->SetHoldingEnabled( aEnabled );
    }

// ----------------------------------------------------------------------------
// IsHoldingEnabled
// ----------------------------------------------------------------------------
//
EXPORT_C TBool CGestureHelper::IsHoldingEnabled() const
    {
    return iImpl->IsHoldingEnabled();
    }

// ----------------------------------------------------------------------------
// SetDoubleTapEnabled
// ----------------------------------------------------------------------------
//
EXPORT_C void CGestureHelper::SetDoubleTapEnabled( TBool aEnabled )
    {
    iImpl->SetDoubleTapEnabled( aEnabled );
    }

// ----------------------------------------------------------------------------
// IsDoubleTapEnabled
// ----------------------------------------------------------------------------
//
EXPORT_C TBool CGestureHelper::IsDoubleTapEnabled() const
    {
    return iImpl->IsDoubleTapEnabled();
    }
    
// ----------------------------------------------------------------------------
// InitAlfredPointerEventCaptureL
// ----------------------------------------------------------------------------
//
EXPORT_C void CGestureHelper::InitAlfredPointerCaptureL( CAlfEnv& aEnv, 
        CAlfDisplay& aDisplay, TInt aFreeControlGroupId )
    {
    iImpl->InitAlfredPointerCaptureL( aEnv, aDisplay, aFreeControlGroupId );
    }

// ----------------------------------------------------------------------------
// HandlePointerEventL
// ----------------------------------------------------------------------------
//
EXPORT_C TBool CGestureHelper::HandlePointerEventL( const TPointerEvent& aEvent )
    {
    return iImpl->HandlePointerEventL( aEvent );
    }

// ----------------------------------------------------------------------------
// OfferEventL
// ----------------------------------------------------------------------------
//
EXPORT_C TBool CGestureHelper::OfferEventL( const TAlfEvent& aEvent )
    {
    return iImpl->OfferEventL( aEvent );
    }

// ----------------------------------------------------------------------------
// Cancel
// ----------------------------------------------------------------------------
//
EXPORT_C void CGestureHelper::Cancel()
    {
    iImpl->Reset();
    }

// ----------------------------------------------------------------------------
// AddObserver
// ----------------------------------------------------------------------------
//
EXPORT_C void CGestureHelper::AddObserver(MGestureObserver* aObserver)
    {
    iImpl->AddObserver(aObserver);
    }
	
// end of file