Dali 3D User Interface Engine
pinch-gesture-detector.h
Go to the documentation of this file.
1 #ifndef __DALI_INTERNAL_PINCH_GESTURE_DETECTOR_H__
2 #define __DALI_INTERNAL_PINCH_GESTURE_DETECTOR_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 // EXTERNAL INCLUDES
23 
24 // INTERNAL INCLUDES
25 #include <events/gesture-detector.h>
26 
27 namespace Dali
28 {
29 
30 namespace Integration
31 {
32 struct TouchEvent;
33 }
34 
35 namespace Internal
36 {
37 
38 namespace Adaptor
39 {
40 
41 class CoreEventInterface;
42 
47 {
48 public:
49 
55  PinchGestureDetector(CoreEventInterface& coreEventInterface, Vector2 screenSize, float minimumPinchDistance);
56 
60  virtual ~PinchGestureDetector();
61 
68  void SetMinimumPinchDistance(float distance);
69 
70 public:
71 
75  virtual void SendEvent(const Integration::TouchEvent& event);
76 
80  virtual void Update(const Integration::GestureRequest& request);
81 
82 private:
83 
89  void SendPinch(Gesture::State state, const Integration::TouchEvent& currentEvent);
90 
91 private:
92 
96  enum State
97  {
101  };
102 
105  std::vector<Integration::TouchEvent> mTouchEvents;
106 
108 
110 };
111 
112 } // namespace Adaptor
113 
114 } // namespace Internal
115 
116 } // namespace Dali
117 
118 #endif // __DALI_INTERNAL_PINCH_GESTURE_DETECTOR_H__
Dali Docs Home
Read more about Dali