Add devel api to create valid handle for Gesture classes 41/243841/1 accepted/tizen/unified/20200911.043234 submit/tizen/20200910.200255
authorRichard Huang <r.huang@samsung.com>
Tue, 8 Sep 2020 10:16:18 +0000 (11:16 +0100)
committerDongsug Song <dongsug.song@samsung.com>
Thu, 10 Sep 2020 09:24:12 +0000 (18:24 +0900)
Change-Id: I63f180b330ad0da44f09ad0e323d89ec78101ae0

14 files changed:
automated-tests/src/dali-internal/utc-Dali-Internal-LongPressGesture.cpp
automated-tests/src/dali-internal/utc-Dali-Internal-PinchGesture.cpp
automated-tests/src/dali-internal/utc-Dali-Internal-RotationGesture.cpp
automated-tests/src/dali-internal/utc-Dali-Internal-TapGesture.cpp
dali/devel-api/events/key-event-devel.h
dali/devel-api/events/long-press-gesture-devel.cpp [new file with mode: 0644]
dali/devel-api/events/long-press-gesture-devel.h [new file with mode: 0644]
dali/devel-api/events/pinch-gesture-devel.cpp [new file with mode: 0644]
dali/devel-api/events/pinch-gesture-devel.h [new file with mode: 0644]
dali/devel-api/events/rotation-gesture-devel.cpp [new file with mode: 0644]
dali/devel-api/events/rotation-gesture-devel.h [new file with mode: 0644]
dali/devel-api/events/tap-gesture-devel.cpp [new file with mode: 0644]
dali/devel-api/events/tap-gesture-devel.h [new file with mode: 0644]
dali/devel-api/file.list

index b3c9bf3..59a0391 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -20,6 +20,7 @@
 #include <stdlib.h>
 #include <dali/public-api/dali-core.h>
 #include <dali-test-suite-utils.h>
+#include <dali/devel-api/events/long-press-gesture-devel.h>
 #include <dali/internal/event/events/long-press-gesture/long-press-gesture-impl.h>
 
 using namespace Dali;
@@ -38,7 +39,7 @@ int UtcDaliLongPressGestureConstructorP(void)
 {
   TestApplication application;
 
-  LongPressGesture gesture(new Internal::LongPressGesture( GestureState::STARTED ));
+  LongPressGesture gesture = DevelLongPressGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(1u, gesture.GetNumberOfTouches(), TEST_LOCATION);
   DALI_TEST_EQUALS(GestureType::LONG_PRESS, gesture.GetType(), TEST_LOCATION);
 
@@ -63,13 +64,13 @@ int UtcDaliLongPressGestureConstructorP(void)
 int UtcDaliLongPressGestureAssignmentP(void)
 {
   // Test Assignment operator
-  LongPressGesture gesture(new Internal::LongPressGesture( GestureState::STARTED ));
+  LongPressGesture gesture = DevelLongPressGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(1u, gesture.GetNumberOfTouches(), TEST_LOCATION);
   DALI_TEST_EQUALS(GestureType::LONG_PRESS, gesture.GetType(), TEST_LOCATION);
 
   GetImplementation( gesture ).SetNumberOfTouches( 5u );
 
-  LongPressGesture gesture2(new Internal::LongPressGesture( GestureState::FINISHED ));
+  LongPressGesture gesture2 = DevelLongPressGesture::New( GestureState::FINISHED );
   DALI_TEST_EQUALS(GestureState::FINISHED, gesture2.GetState(), TEST_LOCATION);
   gesture2 = gesture;
   DALI_TEST_EQUALS(5u, gesture2.GetNumberOfTouches(), TEST_LOCATION);
@@ -92,7 +93,7 @@ int UtcDaliLongPressGestureGetNumberOfTouchesP(void)
 {
   TestApplication application;
 
-  LongPressGesture gesture(new Internal::LongPressGesture(GestureState::STARTED));
+  LongPressGesture gesture = DevelLongPressGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(gesture.GetNumberOfTouches(), 1, TEST_LOCATION);
 
   GetImplementation(gesture).SetNumberOfTouches(4);
@@ -105,7 +106,7 @@ int UtcDaliLongPressGestureGetScreenPointP(void)
 {
   TestApplication application;
 
-  LongPressGesture gesture(new Internal::LongPressGesture(GestureState::STARTED));
+  LongPressGesture gesture = DevelLongPressGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(gesture.GetScreenPoint(), Vector2::ZERO , TEST_LOCATION);
   DALI_TEST_EQUALS(gesture.GetLocalPoint(), Vector2::ZERO , TEST_LOCATION);
 
@@ -120,7 +121,7 @@ int UtcDaliLongPressGestureGetLocalPointP(void)
 {
   TestApplication application;
 
-  LongPressGesture gesture(new Internal::LongPressGesture(GestureState::STARTED));
+  LongPressGesture gesture = DevelLongPressGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(gesture.GetLocalPoint(), Vector2::ZERO , TEST_LOCATION);
   DALI_TEST_EQUALS(gesture.GetScreenPoint(), Vector2::ZERO , TEST_LOCATION);
 
index 0447e34..577f67f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -20,6 +20,7 @@
 #include <stdlib.h>
 #include <dali/public-api/dali-core.h>
 #include <dali-test-suite-utils.h>
+#include <dali/devel-api/events/pinch-gesture-devel.h>
 #include <dali/internal/event/events/pinch-gesture/pinch-gesture-impl.h>
 
 using namespace Dali;
@@ -39,19 +40,19 @@ int UtcDaliPinchGestureConstructor(void)
 {
   TestApplication application; // Reset all test adapter return codes
 
-  PinchGesture gesture(new Internal::PinchGesture( GestureState::STARTED ));
+  PinchGesture gesture = DevelPinchGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(GestureState::STARTED, gesture.GetState(), TEST_LOCATION);
   DALI_TEST_EQUALS(0.0f, gesture.GetScale(), TEST_LOCATION);
   DALI_TEST_EQUALS(0.0f, gesture.GetSpeed(), TEST_LOCATION);
   DALI_TEST_EQUALS(GestureType::PINCH, gesture.GetType(), TEST_LOCATION);
 
-  PinchGesture gesture2(new Internal::PinchGesture( GestureState::CONTINUING ));
+  PinchGesture gesture2 = DevelPinchGesture::New( GestureState::CONTINUING );
   DALI_TEST_EQUALS(GestureState::CONTINUING, gesture2.GetState(), TEST_LOCATION);
   DALI_TEST_EQUALS(0.0f, gesture2.GetScale(), TEST_LOCATION);
   DALI_TEST_EQUALS(0.0f, gesture2.GetSpeed(), TEST_LOCATION);
   DALI_TEST_EQUALS(GestureType::PINCH, gesture2.GetType(), TEST_LOCATION);
 
-  PinchGesture gesture3(new Internal::PinchGesture( GestureState::FINISHED ));
+  PinchGesture gesture3 = DevelPinchGesture::New( GestureState::FINISHED );
   DALI_TEST_EQUALS(GestureState::FINISHED, gesture3.GetState(), TEST_LOCATION);
   DALI_TEST_EQUALS(0.0f, gesture3.GetScale(), TEST_LOCATION);
   DALI_TEST_EQUALS(0.0f, gesture3.GetSpeed(), TEST_LOCATION);
@@ -80,13 +81,13 @@ int UtcDaliPinchGestureConstructor(void)
 int UtcDaliPinchGestureAssignment(void)
 {
   // Test Assignment operator
-  PinchGesture gesture(new Internal::PinchGesture( GestureState::STARTED ));
+  PinchGesture gesture = DevelPinchGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(GestureState::STARTED, gesture.GetState(), TEST_LOCATION);
   DALI_TEST_EQUALS(0.0f, gesture.GetScale(), TEST_LOCATION);
   DALI_TEST_EQUALS(0.0f, gesture.GetSpeed(), TEST_LOCATION);
   DALI_TEST_EQUALS(GestureType::PINCH, gesture.GetType(), TEST_LOCATION);
 
-  PinchGesture gesture2(new Internal::PinchGesture( GestureState::CONTINUING ));
+  PinchGesture gesture2 = DevelPinchGesture::New( GestureState::CONTINUING );
   DALI_TEST_EQUALS(GestureState::CONTINUING, gesture2.GetState(), TEST_LOCATION);
   DALI_TEST_EQUALS(0.0f, gesture2.GetScale(), TEST_LOCATION);
   DALI_TEST_EQUALS(0.0f, gesture2.GetSpeed(), TEST_LOCATION);
@@ -115,7 +116,7 @@ int UtcDaliPinchGestureAssignment(void)
 
 int UtcDaliPinchGestureSetGetScaleP(void)
 {
-  PinchGesture gesture(new Internal::PinchGesture(GestureState::STARTED));
+  PinchGesture gesture = DevelPinchGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(gesture.GetScale(), 0.0f, TEST_LOCATION);
 
   GetImplementation(gesture).SetScale(123.0f);
@@ -126,7 +127,7 @@ int UtcDaliPinchGestureSetGetScaleP(void)
 
 int UtcDaliPinchGestureSetGetSpeedP(void)
 {
-  PinchGesture gesture(new Internal::PinchGesture(GestureState::STARTED));
+  PinchGesture gesture = DevelPinchGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(gesture.GetSpeed(), 0.0f, TEST_LOCATION);
 
   GetImplementation(gesture).SetSpeed(123.0f);
@@ -137,7 +138,7 @@ int UtcDaliPinchGestureSetGetSpeedP(void)
 
 int UtcDaliPinchGestureSetGetScreenCenterPointP(void)
 {
-  PinchGesture gesture(new Internal::PinchGesture(GestureState::STARTED));
+  PinchGesture gesture = DevelPinchGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(gesture.GetScreenCenterPoint(), Vector2::ZERO, TEST_LOCATION);
 
   GetImplementation(gesture).SetScreenCenterPoint(Vector2(123.0f, 321.0f));
@@ -148,7 +149,7 @@ int UtcDaliPinchGestureSetGetScreenCenterPointP(void)
 
 int UtcDaliPinchGestureSetGetLocalCenterPointP(void)
 {
-  PinchGesture gesture(new Internal::PinchGesture(GestureState::STARTED));
+  PinchGesture gesture = DevelPinchGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(gesture.GetLocalCenterPoint(), Vector2::ZERO, TEST_LOCATION);
 
   GetImplementation(gesture).SetLocalCenterPoint(Vector2(123.0f,321.0f));
index 12f0313..a580828 100644 (file)
@@ -20,6 +20,7 @@
 #include <stdlib.h>
 #include <dali/public-api/dali-core.h>
 #include <dali-test-suite-utils.h>
+#include <dali/devel-api/events/rotation-gesture-devel.h>
 #include <dali/internal/event/events/rotation-gesture/rotation-gesture-impl.h>
 
 using namespace Dali;
@@ -39,17 +40,17 @@ int UtcDaliRotationGestureConstructor(void)
 {
   TestApplication application; // Reset all test adapter return codes
 
-  RotationGesture gesture(new Internal::RotationGesture( GestureState::STARTED ));
+  RotationGesture gesture = DevelRotationGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(GestureState::STARTED, gesture.GetState(), TEST_LOCATION);
   DALI_TEST_EQUALS(0.0f, gesture.GetRotation().radian, TEST_LOCATION);
   DALI_TEST_EQUALS(GestureType::ROTATION, gesture.GetType(), TEST_LOCATION);
 
-  RotationGesture gesture2(new Internal::RotationGesture( GestureState::CONTINUING ));
+  RotationGesture gesture2 = DevelRotationGesture::New( GestureState::CONTINUING );
   DALI_TEST_EQUALS(GestureState::CONTINUING, gesture2.GetState(), TEST_LOCATION);
   DALI_TEST_EQUALS(0.0f, gesture2.GetRotation().radian, TEST_LOCATION);
   DALI_TEST_EQUALS(GestureType::ROTATION, gesture2.GetType(), TEST_LOCATION);
 
-  RotationGesture gesture3(new Internal::RotationGesture( GestureState::FINISHED ));
+  RotationGesture gesture3 = DevelRotationGesture::New( GestureState::FINISHED );
   DALI_TEST_EQUALS(GestureState::FINISHED, gesture3.GetState(), TEST_LOCATION);
   DALI_TEST_EQUALS(0.0f, gesture3.GetRotation().radian, TEST_LOCATION);
   DALI_TEST_EQUALS(GestureType::ROTATION, gesture3.GetType(), TEST_LOCATION);
@@ -75,12 +76,12 @@ int UtcDaliRotationGestureConstructor(void)
 int UtcDaliRotationGestureAssignment(void)
 {
   // Test Assignment operator
-  RotationGesture gesture(new Internal::RotationGesture( GestureState::STARTED ));
+  RotationGesture gesture = DevelRotationGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(GestureState::STARTED, gesture.GetState(), TEST_LOCATION);
   DALI_TEST_EQUALS(0.0f, gesture.GetRotation().radian, TEST_LOCATION);
   DALI_TEST_EQUALS(GestureType::ROTATION, gesture.GetType(), TEST_LOCATION);
 
-  RotationGesture gesture2(new Internal::RotationGesture( GestureState::CONTINUING ));
+  RotationGesture gesture2 = DevelRotationGesture::New( GestureState::CONTINUING );
   DALI_TEST_EQUALS(GestureState::CONTINUING, gesture2.GetState(), TEST_LOCATION);
   DALI_TEST_EQUALS(0.0f, gesture2.GetRotation().radian, TEST_LOCATION);
   DALI_TEST_EQUALS(GestureType::ROTATION, gesture2.GetType(), TEST_LOCATION);
@@ -106,7 +107,7 @@ int UtcDaliRotationGestureAssignment(void)
 
 int UtcDaliRotationGestureSetGetRotationP(void)
 {
-  RotationGesture gesture(new Internal::RotationGesture(GestureState::STARTED));
+  RotationGesture gesture = DevelRotationGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(gesture.GetRotation(), Radian(), TEST_LOCATION);
 
   GetImplementation(gesture).SetRotation(Dali::ANGLE_270);
@@ -117,7 +118,7 @@ int UtcDaliRotationGestureSetGetRotationP(void)
 
 int UtcDaliRotationGestureSetGetScreenCenterPointP(void)
 {
-  RotationGesture gesture(new Internal::RotationGesture(GestureState::STARTED));
+  RotationGesture gesture = DevelRotationGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(gesture.GetScreenCenterPoint(), Vector2::ZERO, TEST_LOCATION);
 
   GetImplementation(gesture).SetScreenCenterPoint(Vector2(123.0f,321.0f));
@@ -128,7 +129,7 @@ int UtcDaliRotationGestureSetGetScreenCenterPointP(void)
 
 int UtcDaliRotationGestureSetGetLocalCenterPointP(void)
 {
-  RotationGesture gesture(new Internal::RotationGesture(GestureState::STARTED));
+  RotationGesture gesture = DevelRotationGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(gesture.GetLocalCenterPoint(), Vector2::ZERO, TEST_LOCATION);
 
   GetImplementation(gesture).SetLocalCenterPoint(Vector2(123.0f,321.0f));
index de9a012..a22c4ad 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -20,6 +20,7 @@
 #include <stdlib.h>
 #include <dali/public-api/dali-core.h>
 #include <dali-test-suite-utils.h>
+#include <dali/devel-api/events/tap-gesture-devel.h>
 #include <dali/internal/event/events/tap-gesture/tap-gesture-impl.h>
 
 using namespace Dali;
@@ -40,7 +41,7 @@ int UtcDaliTapGestureConstructor(void)
 {
   TestApplication application; // Reset all test adapter return codes
 
-  TapGesture gesture(new Internal::TapGesture( GestureState::STARTED ));
+  TapGesture gesture = DevelTapGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(1u, gesture.GetNumberOfTouches(), TEST_LOCATION);
   DALI_TEST_EQUALS(1u, gesture.GetNumberOfTaps(), TEST_LOCATION);
   DALI_TEST_EQUALS(GestureType::TAP, gesture.GetType(), TEST_LOCATION);
@@ -67,7 +68,7 @@ int UtcDaliTapGestureConstructor(void)
 int UtcDaliTapGestureAssignment(void)
 {
   // Test Assignment operator
-  TapGesture gesture(new Internal::TapGesture( GestureState::STARTED ));
+  TapGesture gesture = DevelTapGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(1u, gesture.GetNumberOfTouches(), TEST_LOCATION);
   DALI_TEST_EQUALS(1u, gesture.GetNumberOfTaps(), TEST_LOCATION);
   DALI_TEST_EQUALS(GestureType::TAP, gesture.GetType(), TEST_LOCATION);
@@ -95,7 +96,7 @@ int UtcDaliTapGestureAssignment(void)
 
 int UtcDaliTapGestureSetGetNumberOfTapsP(void)
 {
-  TapGesture gesture(new Internal::TapGesture(GestureState::STARTED));
+  TapGesture gesture = DevelTapGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(gesture.GetNumberOfTaps(), 1u, TEST_LOCATION);
 
   GetImplementation(gesture).SetNumberOfTaps(123u);
@@ -106,7 +107,7 @@ int UtcDaliTapGestureSetGetNumberOfTapsP(void)
 
 int UtcDaliTapGestureSetGetNumberOfTouchesP(void)
 {
-  TapGesture gesture(new Internal::TapGesture(GestureState::STARTED));
+  TapGesture gesture = DevelTapGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(gesture.GetNumberOfTouches(), 1u, TEST_LOCATION);
 
   GetImplementation(gesture).SetNumberOfTouches(321u);
@@ -117,7 +118,7 @@ int UtcDaliTapGestureSetGetNumberOfTouchesP(void)
 
 int UtcDaliTapGestureSetGetScreenPointP(void)
 {
-  TapGesture gesture(new Internal::TapGesture(GestureState::STARTED));
+  TapGesture gesture = DevelTapGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(gesture.GetScreenPoint(), Vector2::ZERO, TEST_LOCATION);
 
   GetImplementation(gesture).SetScreenPoint(Vector2(123.0f,321.0f));
@@ -128,7 +129,7 @@ int UtcDaliTapGestureSetGetScreenPointP(void)
 
 int UtcDaliTapGestureSetGetLocalPointP(void)
 {
-  TapGesture gesture(new Internal::TapGesture(GestureState::STARTED));
+  TapGesture gesture = DevelTapGesture::New( GestureState::STARTED );
   DALI_TEST_EQUALS(gesture.GetLocalPoint(), Vector2::ZERO, TEST_LOCATION);
 
   GetImplementation(gesture).SetLocalPoint(Vector2(123.0f,321.0f));
index 05f2674..d19c4ee 100644 (file)
@@ -28,7 +28,7 @@ namespace DevelKeyEvent
 {\r
 \r
 /**\r
- * @brief Creates an initialized WheelEvent.\r
+ * @brief Creates an initialized KeyEvent.\r
  *\r
  * @SINCE_1_9.27\r
  * @param[in]  keyName         The name of the key pressed or command from the IMF, if later then the some following parameters will be needed.\r
diff --git a/dali/devel-api/events/long-press-gesture-devel.cpp b/dali/devel-api/events/long-press-gesture-devel.cpp
new file mode 100644 (file)
index 0000000..57bd719
--- /dev/null
@@ -0,0 +1,36 @@
+/*\r
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali/devel-api/events/long-press-gesture-devel.h>\r
+#include <dali/internal/event/events/long-press-gesture/long-press-gesture-impl.h>\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace DevelLongPressGesture\r
+{\r
+\r
+LongPressGesture New( GestureState state )\r
+{\r
+  return LongPressGesture( new Internal::LongPressGesture( state ) );\r
+}\r
+\r
+} // namespace DevelLongPressGesture\r
+\r
+} // namespace Dali\r
+\r
diff --git a/dali/devel-api/events/long-press-gesture-devel.h b/dali/devel-api/events/long-press-gesture-devel.h
new file mode 100644 (file)
index 0000000..7d0e580
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef DALI_LONG_PRESS_GESTURE_DEVEL_H\r
+#define DALI_LONG_PRESS_GESTURE_DEVEL_H\r
+\r
+/*\r
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali/public-api/events/long-press-gesture.h>\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace DevelLongPressGesture\r
+{\r
+\r
+/**\r
+ * @brief Creates an initialized LongPressGesture.\r
+ *\r
+ * @param[in] state The state of the LongPressGesture\r
+ * @return A handle to a newly allocated Dali resource\r
+ */\r
+DALI_CORE_API LongPressGesture New( GestureState state );\r
+\r
+} // namespace DevelLongPressGesture\r
+\r
+} // namespace Dali\r
+\r
+#endif // DALI_LONG_PRESS_GESTURE_DEVEL_H\r
diff --git a/dali/devel-api/events/pinch-gesture-devel.cpp b/dali/devel-api/events/pinch-gesture-devel.cpp
new file mode 100644 (file)
index 0000000..f59dfbc
--- /dev/null
@@ -0,0 +1,36 @@
+/*\r
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali/devel-api/events/pinch-gesture-devel.h>\r
+#include <dali/internal/event/events/pinch-gesture/pinch-gesture-impl.h>\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace DevelPinchGesture\r
+{\r
+\r
+PinchGesture New( GestureState state )\r
+{\r
+  return PinchGesture( new Internal::PinchGesture( state ) );\r
+}\r
+\r
+} // namespace DevelPinchGesture\r
+\r
+} // namespace Dali\r
+\r
diff --git a/dali/devel-api/events/pinch-gesture-devel.h b/dali/devel-api/events/pinch-gesture-devel.h
new file mode 100644 (file)
index 0000000..fc2a47f
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef DALI_PINCH_GESTURE_DEVEL_H\r
+#define DALI_PINCH_GESTURE_DEVEL_H\r
+\r
+/*\r
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali/public-api/events/pinch-gesture.h>\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace DevelPinchGesture\r
+{\r
+\r
+/**\r
+ * @brief Creates an initialized PinchGesture.\r
+ *\r
+ * @param[in] state The state of the PinchGesture\r
+ * @return A handle to a newly allocated Dali resource\r
+ */\r
+DALI_CORE_API PinchGesture New( GestureState state );\r
+\r
+} // namespace DevelPinchGesture\r
+\r
+} // namespace Dali\r
+\r
+#endif // DALI_PINCH_GESTURE_DEVEL_H\r
diff --git a/dali/devel-api/events/rotation-gesture-devel.cpp b/dali/devel-api/events/rotation-gesture-devel.cpp
new file mode 100644 (file)
index 0000000..a72ced6
--- /dev/null
@@ -0,0 +1,36 @@
+/*\r
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali/devel-api/events/rotation-gesture-devel.h>\r
+#include <dali/internal/event/events/rotation-gesture/rotation-gesture-impl.h>\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace DevelRotationGesture\r
+{\r
+\r
+RotationGesture New( GestureState state )\r
+{\r
+  return RotationGesture( new Internal::RotationGesture( state ) );\r
+}\r
+\r
+} // namespace DevelRotationGesture\r
+\r
+} // namespace Dali\r
+\r
diff --git a/dali/devel-api/events/rotation-gesture-devel.h b/dali/devel-api/events/rotation-gesture-devel.h
new file mode 100644 (file)
index 0000000..cb51486
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef DALI_ROTATION_GESTURE_DEVEL_H\r
+#define DALI_ROTATION_GESTURE_DEVEL_H\r
+\r
+/*\r
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali/public-api/events/rotation-gesture.h>\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace DevelRotationGesture\r
+{\r
+\r
+/**\r
+ * @brief Creates an initialized RotationGesture.\r
+ *\r
+ * @param[in] state The state of the RotationGesture\r
+ * @return A handle to a newly allocated Dali resource\r
+ */\r
+DALI_CORE_API RotationGesture New( GestureState state );\r
+\r
+} // namespace DevelRotationGesture\r
+\r
+} // namespace Dali\r
+\r
+#endif // DALI_ROTATION_GESTURE_DEVEL_H\r
diff --git a/dali/devel-api/events/tap-gesture-devel.cpp b/dali/devel-api/events/tap-gesture-devel.cpp
new file mode 100644 (file)
index 0000000..eb220a0
--- /dev/null
@@ -0,0 +1,36 @@
+/*\r
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali/devel-api/events/tap-gesture-devel.h>\r
+#include <dali/internal/event/events/tap-gesture/tap-gesture-impl.h>\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace DevelTapGesture\r
+{\r
+\r
+TapGesture New( GestureState state )\r
+{\r
+  return TapGesture( new Internal::TapGesture( state ) );\r
+}\r
+\r
+} // namespace DevelTapGesture\r
+\r
+} // namespace Dali\r
+\r
diff --git a/dali/devel-api/events/tap-gesture-devel.h b/dali/devel-api/events/tap-gesture-devel.h
new file mode 100644 (file)
index 0000000..dc63289
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef DALI_TAP_GESTURE_DEVEL_H\r
+#define DALI_TAP_GESTURE_DEVEL_H\r
+\r
+/*\r
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali/public-api/events/tap-gesture.h>\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace DevelTapGesture\r
+{\r
+\r
+/**\r
+ * @brief Creates an initialized TapGesture.\r
+ *\r
+ * @param[in] state The state of the TapGesture\r
+ * @return A handle to a newly allocated Dali resource\r
+ */\r
+DALI_CORE_API TapGesture New( GestureState state );\r
+\r
+} // namespace DevelTapGesture\r
+\r
+} // namespace Dali\r
+\r
+#endif // DALI_TAP_GESTURE_DEVEL_H\r
index 6f83f08..dc872d3 100644 (file)
@@ -16,8 +16,12 @@ SET( devel_api_src_files
   ${devel_api_src_dir}/events/hit-test-algorithm.cpp
   ${devel_api_src_dir}/events/hover-event-devel.cpp
   ${devel_api_src_dir}/events/key-event-devel.cpp
+  ${devel_api_src_dir}/events/long-press-gesture-devel.cpp
   ${devel_api_src_dir}/events/long-press-gesture-detector-devel.cpp
   ${devel_api_src_dir}/events/pan-gesture-devel.cpp
+  ${devel_api_src_dir}/events/pinch-gesture-devel.cpp
+  ${devel_api_src_dir}/events/rotation-gesture-devel.cpp
+  ${devel_api_src_dir}/events/tap-gesture-devel.cpp
   ${devel_api_src_dir}/events/touch-point.cpp
   ${devel_api_src_dir}/events/wheel-event-devel.cpp
   ${devel_api_src_dir}/images/distance-field.cpp
@@ -75,8 +79,12 @@ SET( devel_api_core_events_header_files
   ${devel_api_src_dir}/events/hit-test-algorithm.h
   ${devel_api_src_dir}/events/hover-event-devel.h
   ${devel_api_src_dir}/events/key-event-devel.h
+  ${devel_api_src_dir}/events/long-press-gesture-devel.h
   ${devel_api_src_dir}/events/long-press-gesture-detector-devel.h
   ${devel_api_src_dir}/events/pan-gesture-devel.h
+  ${devel_api_src_dir}/events/pinch-gesture-devel.h
+  ${devel_api_src_dir}/events/rotation-gesture-devel.h
+  ${devel_api_src_dir}/events/tap-gesture-devel.h
   ${devel_api_src_dir}/events/touch-point.h
   ${devel_api_src_dir}/events/wheel-event-devel.h
 )