webengine/webkitutils/stmgesturefw/inc/gestureframework.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:   
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef GESTUREFRAMEWORK_H
       
    19 #define GESTUREFRAMEWORK_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32std.h>
       
    23 #include <e32base.h>
       
    24 #include "rt_gestureengineif.h"
       
    25 #include <rt_gestureif.h>
       
    26 #include <rt_gesturelistener.h>
       
    27 
       
    28 // external classes
       
    29 namespace stmUiEventEngine
       
    30 {
       
    31     class CStateMachine ;
       
    32 }
       
    33 
       
    34 // CLASS DECLARATION
       
    35 namespace stmGesture
       
    36 {
       
    37 // Forward declarations
       
    38 class CGestureFrameworkImpl ;
       
    39 
       
    40 /*!
       
    41   *  Gesture framework contains the following elements
       
    42  *  \li UI State Machine.  This is the lower level driver handling the events and generating UI events.
       
    43  *  Gesture framework creates an instance of the UI state machine and adds itself to be the UI event listener.
       
    44  *  \li Gesture Engine.  The gesture engine processes the UI events received via MUiEventObserver
       
    45  *  and calls gesture recogniser interface MGestureRecogniserIf of all the gestures in the list.
       
    46   *  \li Gesture Recognisers.  Gesture recognisers scan the list of UI events and if they recognise
       
    47  *  a gesture, they call the MGestureListener.
       
    48  */
       
    49 NONSHARABLE_CLASS( CGestureFramework ): public CBase
       
    50 {
       
    51 public:
       
    52     // Constructors and destructor
       
    53 
       
    54     /**
       
    55      * Destructor.
       
    56      */
       
    57     virtual ~CGestureFramework();
       
    58 
       
    59     /**
       
    60      * Two-phased constructor.
       
    61      */
       
    62     static CGestureFramework* NewL();
       
    63 
       
    64     /**
       
    65      * Two-phased constructor.
       
    66      */
       
    67     static CGestureFramework* NewLC();
       
    68 public:
       
    69     // new functions,
       
    70     static TVersion Version();
       
    71     /*!
       
    72      * Get the gesture engine interface
       
    73      */
       
    74     MGestureEngineIf* getGestureEngine() ;
       
    75     /*!
       
    76      * Get the underlying low level UI event interface
       
    77      */
       
    78     stmUiEventEngine::CStateMachine* getUiStateMachine() ;
       
    79     /*!
       
    80      * logging on or off
       
    81      */
       
    82     void enableLogging(bool loggingEnabled);
       
    83 
       
    84 private:
       
    85 
       
    86     /*!
       
    87      * Constructor for performing 1st stage construction
       
    88      */
       
    89     CGestureFramework();
       
    90 
       
    91     /*!
       
    92      * EPOC default constructor for performing 2nd stage construction
       
    93      */
       
    94     void ConstructL();
       
    95 
       
    96 private:
       
    97     CGestureFrameworkImpl* m_impl ;
       
    98 
       
    99     bool m_loggingenabled ;
       
   100 
       
   101 };
       
   102 
       
   103 } // namespace
       
   104 #endif // GESTUREFRAMEWORK_H