Making DALi public API typesafe using guaranteed types; uint8_t, uint32_t
[platform/core/uifw/dali-core.git] / dali / public-api / events / long-press-gesture-detector.cpp
index 1c0013b..98c7ed3 100644 (file)
@@ -1,18 +1,19 @@
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 
 // CLASS HEADER
 #include <dali/public-api/events/long-press-gesture-detector.h>
@@ -23,8 +24,6 @@
 namespace Dali
 {
 
-const char* const LongPressGestureDetector::SIGNAL_LONG_PRESS_DETECTED = "long-press-detected";
-
 LongPressGestureDetector::LongPressGestureDetector(Internal::LongPressGestureDetector* internal)
 : GestureDetector(internal)
 {
@@ -41,14 +40,14 @@ LongPressGestureDetector LongPressGestureDetector::New()
   return LongPressGestureDetector(internal.Get());
 }
 
-LongPressGestureDetector LongPressGestureDetector::New(unsigned int touchesRequired)
+LongPressGestureDetector LongPressGestureDetector::New(uint32_t touchesRequired)
 {
   Internal::LongPressGestureDetectorPtr internal = Internal::LongPressGestureDetector::New(touchesRequired);
 
   return LongPressGestureDetector(internal.Get());
 }
 
-LongPressGestureDetector LongPressGestureDetector::New(unsigned int minTouches, unsigned int maxTouches)
+LongPressGestureDetector LongPressGestureDetector::New(uint32_t minTouches, uint32_t maxTouches)
 {
   Internal::LongPressGestureDetectorPtr internal = Internal::LongPressGestureDetector::New(minTouches, maxTouches);
 
@@ -64,27 +63,38 @@ LongPressGestureDetector::~LongPressGestureDetector()
 {
 }
 
-void LongPressGestureDetector::SetTouchesRequired(unsigned int touches)
+LongPressGestureDetector::LongPressGestureDetector(const LongPressGestureDetector& handle)
+: GestureDetector(handle)
+{
+}
+
+LongPressGestureDetector& LongPressGestureDetector::operator=(const LongPressGestureDetector& rhs)
+{
+  BaseHandle::operator=(rhs);
+  return *this;
+}
+
+void LongPressGestureDetector::SetTouchesRequired(uint32_t touches)
 {
   GetImplementation(*this).SetTouchesRequired(touches);
 }
 
-void LongPressGestureDetector::SetTouchesRequired(unsigned int minTouches, unsigned int maxTouches)
+void LongPressGestureDetector::SetTouchesRequired(uint32_t minTouches, uint32_t maxTouches)
 {
   GetImplementation(*this).SetTouchesRequired(minTouches, maxTouches);
 }
 
-unsigned int LongPressGestureDetector::GetMinimumTouchesRequired() const
+uint32_t LongPressGestureDetector::GetMinimumTouchesRequired() const
 {
   return GetImplementation(*this).GetMinimumTouchesRequired();
 }
 
-unsigned int LongPressGestureDetector::GetMaximumTouchesRequired() const
+uint32_t LongPressGestureDetector::GetMaximumTouchesRequired() const
 {
   return GetImplementation(*this).GetMaximumTouchesRequired();
 }
 
-LongPressGestureDetector::DetectedSignalV2& LongPressGestureDetector::DetectedSignal()
+LongPressGestureDetector::DetectedSignalType& LongPressGestureDetector::DetectedSignal()
 {
   return GetImplementation(*this).DetectedSignal();
 }