Dali 3D User Interface Engine
touch-event-combiner.h
Go to the documentation of this file.
1 #ifndef __DALI_INTEGRATION_TOUCH_EVENT_COMBINER_H__
2 #define __DALI_INTEGRATION_TOUCH_EVENT_COMBINER_H__
3 
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20 
21 // INTERNAL INCLUDES
25 
26 namespace Dali DALI_IMPORT_API
27 {
28 
29 namespace Integration
30 {
31 
32 struct TouchEvent;
33 struct HoverEvent;
34 
50 {
51 public:
52 
53  // Enumerations
54 
56  {
60  DispatchNone
61  };
62 
69 
77  TouchEventCombiner( unsigned long minMotionTime, float minMotionXDistance, float minMotionYDistance );
78 
85  TouchEventCombiner( unsigned long minMotionTime, Vector2 minMotionDistance );
86 
91 
92 public:
93 
108  EventDispatchType GetNextTouchEvent( const TouchPoint& point, unsigned long time, TouchEvent& touchEvent, HoverEvent& hoverEvent );
109 
114  void SetMinimumMotionTimeThreshold( unsigned long minTime );
115 
121  void SetMinimumMotionDistanceThreshold( float minDistance );
122 
130  void SetMinimumMotionDistanceThreshold( float minXDistance, float minYDistance );
131 
138  void SetMinimumMotionDistanceThreshold( Vector2 minDistance );
139 
144  unsigned long GetMinimumMotionTimeThreshold() const;
145 
150  Vector2 GetMinimumMotionDistanceThreshold() const;
151 
157  void Reset();
158 
159 private:
160 
161  struct PointInfo;
162  typedef std::vector< PointInfo > PointInfoContainer;
165 
166  unsigned long mMinMotionTime;
168 };
169 
170 } // namespace Integration
171 
172 } // namespace Dali
173 
174 #endif // __DALI_INTEGRATION_TOUCH_EVENT_COMBINER_H__
Dali Docs Home
Read more about Dali