2 * Copyright (c) 2020 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/long-press-gesture-detector-impl.h>
26 LongPressGestureDetector::LongPressGestureDetector(Internal::LongPressGestureDetector* internal)
27 : GestureDetector(internal)
31 LongPressGestureDetector::LongPressGestureDetector()
35 LongPressGestureDetector LongPressGestureDetector::New()
37 Internal::LongPressGestureDetectorPtr internal = Internal::LongPressGestureDetector::New();
39 return LongPressGestureDetector(internal.Get());
42 LongPressGestureDetector LongPressGestureDetector::New(uint32_t touchesRequired)
44 Internal::LongPressGestureDetectorPtr internal = Internal::LongPressGestureDetector::New(touchesRequired);
46 return LongPressGestureDetector(internal.Get());
49 LongPressGestureDetector LongPressGestureDetector::New(uint32_t minTouches, uint32_t maxTouches)
51 Internal::LongPressGestureDetectorPtr internal = Internal::LongPressGestureDetector::New(minTouches, maxTouches);
53 return LongPressGestureDetector(internal.Get());
56 LongPressGestureDetector LongPressGestureDetector::DownCast(BaseHandle handle)
58 return LongPressGestureDetector(dynamic_cast<Dali::Internal::LongPressGestureDetector*>(handle.GetObjectPtr()));
61 LongPressGestureDetector::~LongPressGestureDetector()
65 LongPressGestureDetector::LongPressGestureDetector(const LongPressGestureDetector& handle)
66 : GestureDetector(handle)
70 LongPressGestureDetector& LongPressGestureDetector::operator=(const LongPressGestureDetector& rhs)
72 BaseHandle::operator=(rhs);
76 void LongPressGestureDetector::SetTouchesRequired(uint32_t touches)
78 GetImplementation(*this).SetTouchesRequired(touches);
81 void LongPressGestureDetector::SetTouchesRequired(uint32_t minTouches, uint32_t maxTouches)
83 GetImplementation(*this).SetTouchesRequired(minTouches, maxTouches);
86 uint32_t LongPressGestureDetector::GetMinimumTouchesRequired() const
88 return GetImplementation(*this).GetMinimumTouchesRequired();
91 uint32_t LongPressGestureDetector::GetMaximumTouchesRequired() const
93 return GetImplementation(*this).GetMaximumTouchesRequired();
96 LongPressGestureDetector::DetectedSignalType& LongPressGestureDetector::DetectedSignal()
98 return GetImplementation(*this).DetectedSignal();