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