htiui/HtiServicePlugins/HtiKeyEventServicePlugin/inc/PointerEventHandler.h
branchRCL_3
changeset 11 454d022d514b
parent 3 2703485a934c
equal deleted inserted replaced
9:404ad6c9bc20 11:454d022d514b
    19 #define CPOINTEREVENTHANDLER_H
    19 #define CPOINTEREVENTHANDLER_H
    20 
    20 
    21 // INCLUDES
    21 // INCLUDES
    22 #include <HtiServicePluginInterface.h>
    22 #include <HtiServicePluginInterface.h>
    23 #include <w32std.h>
    23 #include <w32std.h>
    24 
    24 #include "MultiTouchPointerEventHandler.h"
    25 // CONSTANTS
    25 // CONSTANTS
    26 
    26 
    27 // MACROS
    27 // MACROS
    28 
    28 
    29 // DATA TYPES
    29 // DATA TYPES
    36 
    36 
    37 
    37 
    38 /**
    38 /**
    39 *  Functional implentation of pointer event service.
    39 *  Functional implentation of pointer event service.
    40 */
    40 */
    41 class CPointerEventHandler : public CActive
    41 class CPointerEventHandler : 
       
    42 	public CActive,
       
    43 	public MHtiMultiTouchObserver
    42     {
    44     {
    43     public:
    45     public:
    44 
    46 
    45         enum TError
    47         enum TError
    46             {
    48             {
    55             ETapScreen = 0x10,
    57             ETapScreen = 0x10,
    56             ETapAndDrag = 0x11,
    58             ETapAndDrag = 0x11,
    57             ETapAndDragMultipoint = 0x12,
    59             ETapAndDragMultipoint = 0x12,
    58             EPressPointerDown = 0x13,
    60             EPressPointerDown = 0x13,
    59             ELiftPointerUp = 0x14,
    61             ELiftPointerUp = 0x14,
    60 			EAdvancedTapScreen = 0x15, //for advanced
    62 			EAdvancedTapScreen = 0x15, //for advanced pointer
    61 			EPinchZoom = 0x16, //for advanced
    63 			EPinchZoom = 0x16, //for advanced pointer
       
    64 			EMultiTouch = 0x17, //for advanced pointer
    62             EResultOk = 0xFF // only for response message
    65             EResultOk = 0xFF // only for response message
    63             };
    66             };
    64 
    67 
    65         enum TPointerState
    68         enum TPointerState
    66             {
    69             {
   109 
   112 
   110         // From CActive
   113         // From CActive
   111         void RunL();
   114         void RunL();
   112         TInt RunError(TInt aError);
   115         TInt RunError(TInt aError);
   113         void DoCancel();
   116         void DoCancel();
       
   117         
       
   118         // From MHtiMultiTouchObserver
       
   119         void NotifyMultiTouchComplete();
   114 
   120 
   115     private:
   121     private:
   116 
   122 
   117         /**
   123         /**
   118         * C++ default constructor.
   124         * C++ default constructor.
   127         // Helper methods
   133         // Helper methods
   128         void HandleTapScreenL( const TDesC8& aData );
   134         void HandleTapScreenL( const TDesC8& aData );
   129         void HandleTapAndDragL( const TDesC8& aData );
   135         void HandleTapAndDragL( const TDesC8& aData );
   130         void HandleTapAndDragMultipointL( const TDesC8& aData );
   136         void HandleTapAndDragMultipointL( const TDesC8& aData );
   131         void HandlePointerDownOrUpL( const TDesC8& aData );
   137         void HandlePointerDownOrUpL( const TDesC8& aData );
   132 		void HandleAdvancedTapScreenL( const TDesC8& aData ); //for advanced
   138         
   133         void HandlePinchZoomL( const TDesC8& aData ); //for advanced
   139         //for advanced pointer
       
   140 		void HandleAdvancedTapScreenL( const TDesC8& aData ); 
       
   141         void HandlePinchZoomL( const TDesC8& aData ); 
       
   142         void HandleMultiTouchL( const TDesC8& aData );
   134 
   143 
   135         void SendOkMsgL();
   144         void SendOkMsgL();
   136         void SendErrorMessageL( TInt aError, const TDesC8& aDescription );
   145         void SendErrorMessageL( TInt aError, const TDesC8& aDescription );
   137 
   146 
   138         void ChangePointerStateL();
   147         void ChangePointerStateL();
   164         RArray<TInt>* iCoords;
   173         RArray<TInt>* iCoords;
   165 		RPointerArray<TAdvancedPointer> iAdvancedPointers;
   174 		RPointerArray<TAdvancedPointer> iAdvancedPointers;
   166 		
   175 		
   167 		RPointerArray<TAdvancedPointer> iAdvPointerMoveArray;
   176 		RPointerArray<TAdvancedPointer> iAdvPointerMoveArray;
   168 		RPointerArray<TTimeIntervalMicroSeconds32> iDelayArray;
   177 		RPointerArray<TTimeIntervalMicroSeconds32> iDelayArray;
       
   178 		
       
   179 		CMultiTouchPointerEventHandler* iMultiTouchHandler;
   169 		};
   180 		};
   170 
   181 
   171 #endif // CKEYEVENTHANDLER_H
   182 #endif // CKEYEVENTHANDLER_H