webengine/webkitutils/rt_gesturehelper/src/gesturerecogniser.h
changeset 65 5bfc169077b2
parent 0 dd21522fd290
child 37 cb62a4f66ebe
equal deleted inserted replaced
42:d39add9822e2 65:5bfc169077b2
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Algorithm to recognise gesture from a stream of points
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef _GESTURERECOGNISER_H_
       
    20 #define _GESTURERECOGNISER_H_
       
    21 
       
    22 #include <e32std.h>
       
    23 #include "rt_gestureobserver.h"
       
    24 
       
    25 namespace RT_GestureHelper
       
    26 {
       
    27 
       
    28 class TPointArray;
       
    29 
       
    30 /**
       
    31  * Note: Not a static class or a function pointer, just to make it sligthly 
       
    32  * easier to replace it with a heavier implementation
       
    33  */
       
    34 NONSHARABLE_CLASS( TGestureRecogniser )
       
    35     {
       
    36 public:
       
    37     /** 
       
    38      * Translates points into a gesture code
       
    39      * @param aPoints Points that form the gestures. Client is not required 
       
    40      *                to pass in repeated points (sequential points that are 
       
    41      *                almost in the same place)
       
    42      * @param aIsHolding ETrue if gesture was ended at pointer being held down at same position
       
    43      *                   EFalse if gesture ended at pointer being released 
       
    44      * @return recognised gesture id or EUnknownGesture
       
    45      */
       
    46     TGestureCode GestureCode( const TPointArray& aPoints ) const;
       
    47     };
       
    48     
       
    49 } // namespace GestureHelper
       
    50 
       
    51 #endif // _GESTURERECOGNISER_H_