webengine/webkitutils/stmgesturefw/inc/releasegesturerecogniser.h
changeset 65 5bfc169077b2
parent 42 d39add9822e2
child 66 cacf6ee57968
equal deleted inserted replaced
42:d39add9822e2 65:5bfc169077b2
     1 /*
       
     2 * Copyright (c) 2008 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 the License "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: release Gesture Recognizer
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef RELEASEGESTURERECOGNISER_H_
       
    19 #define RELEASEGESTURERECOGNISER_H_
       
    20 
       
    21 #include "rt_gestureengineif.h"
       
    22 #include <rt_gestureif.h>
       
    23 #include <rt_gesturelistener.h>
       
    24 
       
    25 class CCoeControl ;
       
    26 
       
    27 namespace stmGesture
       
    28 {
       
    29 
       
    30 /*!
       
    31  * CReleaseGestureRecogniser handles release "gesture"
       
    32  * This is countarpart to touch gesture recogniser, just
       
    33  * informing the app that ERelease has been seen.
       
    34  * This should be placed towards the end of the list of gesture
       
    35  * recognisers, all other recognisers which handle ERelease with
       
    36  * some other events preceding the ERelease must be before this one.
       
    37  *
       
    38  */
       
    39 NONSHARABLE_CLASS( CReleaseGestureRecogniser ): public CGestureRecogniser
       
    40 {
       
    41 public:
       
    42     static const TGestureUid KUid = EGestureUidRelease;
       
    43 
       
    44     /** Two-phase constructor */
       
    45     static CReleaseGestureRecogniser* NewL(MGestureListener* aListener);
       
    46     virtual ~CReleaseGestureRecogniser();
       
    47 
       
    48     /*!
       
    49      * MGestureRecogniserIf methods
       
    50      */
       
    51     virtual TGestureRecognitionState recognise(int numOfActiveStreams, MGestureEngineIf* ge) ;
       
    52     virtual void release(MGestureEngineIf* ge) ;
       
    53 
       
    54     virtual TGestureUid gestureUid() const
       
    55         {
       
    56         return KUid;
       
    57         }
       
    58 
       
    59     /*!
       
    60      * Additional methods to set up edge scroll gesture recogniser:
       
    61      * define the rectangle where the touch is watched
       
    62      * \param theArea
       
    63      */
       
    64     void setArea(const TRect& theArea) ;
       
    65 
       
    66 private:
       
    67     CReleaseGestureRecogniser(MGestureListener* aListener) ;
       
    68 
       
    69 private:
       
    70     TRect m_area ;
       
    71 };
       
    72 
       
    73 } // namespace
       
    74 
       
    75 #endif /* RELEASEGESTURERECOGNISER_H_ */