2 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali/public-api/events/long-press-gesture-detector.h>
22 #include <dali/internal/event/events/long-press-gesture-detector-impl.h>
27 LongPressGestureDetector::LongPressGestureDetector(Internal::LongPressGestureDetector* internal)
28 : GestureDetector(internal)
32 LongPressGestureDetector::LongPressGestureDetector()
36 LongPressGestureDetector LongPressGestureDetector::New()
38 Internal::LongPressGestureDetectorPtr internal = Internal::LongPressGestureDetector::New();
40 return LongPressGestureDetector(internal.Get());
43 LongPressGestureDetector LongPressGestureDetector::New(uint32_t touchesRequired)
45 Internal::LongPressGestureDetectorPtr internal = Internal::LongPressGestureDetector::New(touchesRequired);
47 return LongPressGestureDetector(internal.Get());
50 LongPressGestureDetector LongPressGestureDetector::New(uint32_t minTouches, uint32_t maxTouches)
52 Internal::LongPressGestureDetectorPtr internal = Internal::LongPressGestureDetector::New(minTouches, maxTouches);
54 return LongPressGestureDetector(internal.Get());
57 LongPressGestureDetector LongPressGestureDetector::DownCast( BaseHandle handle )
59 return LongPressGestureDetector( dynamic_cast<Dali::Internal::LongPressGestureDetector*>(handle.GetObjectPtr()) );
62 LongPressGestureDetector::~LongPressGestureDetector()
66 LongPressGestureDetector::LongPressGestureDetector(const LongPressGestureDetector& handle)
67 : GestureDetector(handle)
71 LongPressGestureDetector& LongPressGestureDetector::operator=(const LongPressGestureDetector& rhs)
73 BaseHandle::operator=(rhs);
77 void LongPressGestureDetector::SetTouchesRequired(uint32_t touches)
79 GetImplementation(*this).SetTouchesRequired(touches);
82 void LongPressGestureDetector::SetTouchesRequired(uint32_t minTouches, uint32_t maxTouches)
84 GetImplementation(*this).SetTouchesRequired(minTouches, maxTouches);
87 uint32_t LongPressGestureDetector::GetMinimumTouchesRequired() const
89 return GetImplementation(*this).GetMinimumTouchesRequired();
92 uint32_t LongPressGestureDetector::GetMaximumTouchesRequired() const
94 return GetImplementation(*this).GetMaximumTouchesRequired();
97 LongPressGestureDetector::DetectedSignalType& LongPressGestureDetector::DetectedSignal()
99 return GetImplementation(*this).DetectedSignal();