webengine/webkitutils/rt_gesturehelper/src/gesture.h
changeset 1 7c90e6132015
parent 0 dd21522fd290
child 26 cb62a4f66ebe
equal deleted inserted replaced
0:dd21522fd290 1:7c90e6132015
    72      * @return error code
    72      * @return error code
    73      */
    73      */
    74     TInt AddPoint( const TPoint& aPoint, const TTime& eventtime);
    74     TInt AddPoint( const TPoint& aPoint, const TTime& eventtime);
    75     
    75     
    76     /** Set the visual of this gesture. Should be called when gesture starts */
    76     /** Set the visual of this gesture. Should be called when gesture starts */
    77     void SetVisual( CAlfVisual* aVisual );
       
    78     
    77     
    79     /** @return ETrue if the point is very near the holding point */
    78     /** @return ETrue if the point is very near the holding point */
    80     TBool IsNearHoldingPoint( const TPoint& aPoint ) const;
    79     TBool IsNearHoldingPoint( const TPoint& aPoint ) const;
    81     /** Set the latest point as the holding point */
    80     /** Set the latest point as the holding point */
    82     void SetHoldingPoint();
    81     void SetHoldingPoint();
   113     void SetLongTap(TBool aLongTap);
   112     void SetLongTap(TBool aLongTap);
   114     
   113     
   115 // From MGestureEvent
   114 // From MGestureEvent
   116     TTime TimeOfLastEntry() const;
   115     TTime TimeOfLastEntry() const;
   117     inline TGestureCode PreviousGestureCode() { return iPrevGestureCode; };
   116     inline TGestureCode PreviousGestureCode() { return iPrevGestureCode; };
   118     TGestureCode Code( MGestureEvent::TAxis aRelevantAxis );
   117     TGestureCode Code( TAxis aRelevantAxis );
   119     TBool IsHolding() const;
   118     TBool IsHolding() const;
   120     TPoint StartPos() const;
   119     TPoint StartPos() const;
   121     TPoint CurrentPos() const; 
   120     TPoint CurrentPos() const; 
   122     TRealPoint Speed() const;
   121     TRealPoint Speed() const;
   123     TRealPoint SpeedPercent( const TRect& aEdges ) const;
   122     TRealPoint SpeedPercent( const TRect& aEdges ) const;
   124     TPoint Distance() const; 
   123     TPoint Distance() const; 
   125     CAlfVisual* Visual() const;
       
   126     
   124     
   127     
   125     
   128     
   126     
   129     
   127     
   130 private:
   128 private:
   184 
   182 
   185     /// time when the stylus was lifted.
   183     /// time when the stylus was lifted.
   186     TTime iCompletionTime;
   184     TTime iCompletionTime;
   187     
   185     
   188     /// visual relevant to this gesture. null if not known.
   186     /// visual relevant to this gesture. null if not known.
   189     CAlfVisual* iVisual;
       
   190     
   187     
   191     TGestureCode iPrevGestureCode;
   188     TGestureCode iPrevGestureCode;
   192     
   189     
   193     TBool iIsLongTap;
   190     TBool iIsLongTap;
   194     TBool iIsStopFlick;
   191     TBool iIsStopFlick;