webengine/webkitutils/stmgesturefw/inc/hoveringgesturerecogniser.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:Hover Gesture Recognizer
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef HOVERINGGESTURERECOGNISER_H_
       
    19 #define HOVERINGGESTURERECOGNISER_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  * Recognise hovering gesture.
       
    31  * If the EMove distance from previous is short enough, then
       
    32  * we assume hovering gesture.  If the previous UI event is ETouch, EHold or EMove
       
    33  * and the distance is short enough the gesture takes control.
       
    34  */
       
    35 NONSHARABLE_CLASS( CHoveringGestureRecogniser ): public CGestureRecogniser
       
    36 {
       
    37 public:
       
    38     static const TGestureUid KUid = EGestureUidHover;
       
    39 
       
    40     static CHoveringGestureRecogniser* NewL(MGestureListener* aListener);
       
    41 
       
    42     virtual ~CHoveringGestureRecogniser();
       
    43     /*!
       
    44      * MGestureRecogniserIf methods
       
    45      */
       
    46     virtual TGestureRecognitionState recognise(int numOfActiveStreams, MGestureEngineIf* ge) ;
       
    47     virtual void release(MGestureEngineIf* ge) ;
       
    48 
       
    49     virtual TGestureUid gestureUid() const
       
    50         {
       
    51         return KUid;
       
    52         }
       
    53 
       
    54     void setHoveringSpeed(float aSpeed) __SOFTFP ;
       
    55 
       
    56 private:
       
    57     CHoveringGestureRecogniser(MGestureListener* aListener) ;
       
    58     bool m_hovering ;
       
    59     float m_hoveringspeed ;
       
    60 };
       
    61 
       
    62 }
       
    63 
       
    64 #endif /* HOVERINGGESTURERECOGNISER_H_ */