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: UI Event |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef UIEVENT_H_ |
|
19 #define UIEVENT_H_ |
|
20 #include "rt_uievent.h" |
|
21 |
|
22 namespace stmUiEventEngine |
|
23 { |
|
24 |
|
25 NONSHARABLE_CLASS( CUiEvent ): public MUiEvent |
|
26 { |
|
27 public: |
|
28 virtual const TPoint& StartPos() const ; |
|
29 virtual const TPoint& CurrentXY() const ; // current yx-coordinate |
|
30 virtual const TPoint& PreviousXY() const ; // Past yx coordinate |
|
31 virtual TTimeIntervalMicroSeconds StateTransition() const ; // Time taken for state transition |
|
32 virtual bool TimerExpired() const; // if timer expired |
|
33 virtual TUiEventCode Code()const ; |
|
34 virtual void* Target() const ; |
|
35 virtual int Index() const ; |
|
36 MUiEvent* previousEvent() const ; |
|
37 virtual int countOfEvents() const ; |
|
38 virtual TInt64 timestamp() const ; |
|
39 virtual float speedX() const __SOFTFP; // pixels / millisecond |
|
40 virtual float speedY() const __SOFTFP; // pixels / millisecond |
|
41 |
|
42 static CUiEvent* NewL(TUiEventCode aCode, const TPoint& aStart, const TPoint& aXY, |
|
43 const TPoint& aPreviousXY, bool aTimerExpired, void* aTarget, |
|
44 TTimeIntervalMicroSeconds aInterval, int aIndex, TInt64 aTimestamp) ; |
|
45 ~CUiEvent() ; |
|
46 /*! |
|
47 * Chain the UI events ; the whole chain is deleted after release has been handled |
|
48 * in UI sender |
|
49 */ |
|
50 virtual void setPrevious(CUiEvent* aEvent) ; |
|
51 private: |
|
52 CUiEvent( |
|
53 TUiEventCode aCode, |
|
54 const TPoint& aStart, const TPoint& aXY, const TPoint& aPreviousXY, |
|
55 bool aTimerExpired, void* aTarget, TTimeIntervalMicroSeconds aInterval, |
|
56 int aIndex, TInt64 aTimestamp) ; |
|
57 |
|
58 TUiEventCode m_code ; |
|
59 TPoint m_start ; |
|
60 TPoint m_XY ; |
|
61 TPoint m_previousXY ; |
|
62 TTimeIntervalMicroSeconds m_statetransition ; |
|
63 void* m_target ; |
|
64 bool m_timerExpired ; |
|
65 int m_index ; |
|
66 CUiEvent* m_previousEvent ; |
|
67 TInt64 m_timestamp ; |
|
68 }; |
|
69 } |
|
70 #endif /* UIEVENT_H_ */ |
|