[Tizen] Change GetMouseButton to devel-api 36/195136/4
authorhuiyu.eun <huiyu.eun@samsung.com>
Tue, 11 Dec 2018 05:21:00 +0000 (14:21 +0900)
committerhuiyu eun <huiyu.eun@samsung.com>
Wed, 19 Dec 2018 00:19:39 +0000 (00:19 +0000)
Change-Id: I486a58bf12b2b267d274a41e20d95468c3cd498f
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
12 files changed:
automated-tests/src/dali/utc-Dali-TouchDataProcessing.cpp
dali/devel-api/CMakeLists.txt
dali/devel-api/events/mouse-button.h [moved from dali/public-api/events/mouse-button.h with 100% similarity]
dali/devel-api/events/touch-data-devel.cpp [new file with mode: 0644]
dali/devel-api/events/touch-data-devel.h [new file with mode: 0644]
dali/devel-api/file.list
dali/integration-api/events/point.cpp
dali/integration-api/events/point.h
dali/public-api/CMakeLists.txt
dali/public-api/events/touch-data.cpp
dali/public-api/events/touch-data.h
dali/public-api/file.list

index 2d016be..74764f2 100755 (executable)
@@ -2041,7 +2041,7 @@ int UtcDaliTouchDataGetMouseButtonPositive(void)
   application.ProcessEvent( touchEvent );
 
   TouchData data = handleData.touchData;
-  DALI_TEST_EQUALS( data.GetMouseButton( 0 ), MouseButton::SECONDARY, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelTouchData::GetMouseButton( data, 0 ), MouseButton::SECONDARY, TEST_LOCATION );
 
   END_TEST;
 }
@@ -2070,8 +2070,8 @@ int UtcDaliTouchDataGetMouseButtonNagative(void)
   application.ProcessEvent( touchEvent );
 
   TouchData data = handleData.touchData;
-  DALI_TEST_EQUALS( data.GetMouseButton( 0 ), MouseButton::TERTIARY, TEST_LOCATION );
-  DALI_TEST_EQUALS( data.GetMouseButton( 3 ), MouseButton::INVALID, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelTouchData::GetMouseButton( data, 0 ), MouseButton::TERTIARY, TEST_LOCATION );
+  DALI_TEST_EQUALS( DevelTouchData::GetMouseButton( data, 3 ), MouseButton::INVALID, TEST_LOCATION );
 
   END_TEST;
 }
index 5572eeb..3823731 100644 (file)
@@ -8,6 +8,7 @@ SET( SOURCES ${SOURCES}
   ${CMAKE_CURRENT_SOURCE_DIR}/common/hash.cpp
   ${CMAKE_CURRENT_SOURCE_DIR}/common/stage-devel.cpp
   ${CMAKE_CURRENT_SOURCE_DIR}/events/hit-test-algorithm.cpp
+  ${CMAKE_CURRENT_SOURCE_DIR}/events/touch-data-devel.cpp
   ${CMAKE_CURRENT_SOURCE_DIR}/images/distance-field.cpp
   ${CMAKE_CURRENT_SOURCE_DIR}/images/texture-set-image.cpp
   ${CMAKE_CURRENT_SOURCE_DIR}/images/nine-patch-image.cpp
@@ -42,6 +43,8 @@ SET( DEVEL_API_HEADERS
   ${CMAKE_CURRENT_SOURCE_DIR}/common/stage-devel.h
 
   ${CMAKE_CURRENT_SOURCE_DIR}/events/hit-test-algorithm.h
+  ${CMAKE_CURRENT_SOURCE_DIR}/events/touch-data-devel.h
+  ${CMAKE_CURRENT_SOURCE_DIR}/events/mouse-button.h
 
   ${CMAKE_CURRENT_SOURCE_DIR}/images/distance-field.h
   ${CMAKE_CURRENT_SOURCE_DIR}/images/native-image-interface-extension.h
diff --git a/dali/devel-api/events/touch-data-devel.cpp b/dali/devel-api/events/touch-data-devel.cpp
new file mode 100644 (file)
index 0000000..a5c1b48
--- /dev/null
@@ -0,0 +1,36 @@
+/*\r
+ * Copyright (c) 2018 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/touch-data-devel.h>\r
+#include <dali/internal/event/events/touch-data-impl.h>\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace DevelTouchData\r
+{\r
+\r
+MouseButton::Type GetMouseButton( TouchData touchData, std::size_t point )\r
+{\r
+  return GetImplementation( touchData ).GetMouseButton( point );\r
+}\r
+\r
+} // namespace DevelTouchData\r
+\r
+} // namespace Dali\r
+\r
diff --git a/dali/devel-api/events/touch-data-devel.h b/dali/devel-api/events/touch-data-devel.h
new file mode 100644 (file)
index 0000000..1651611
--- /dev/null
@@ -0,0 +1,43 @@
+#ifndef DALI_TOUCH_DATA_DEVEL_H\r
+#define DALI_TOUCH_DATA_DEVEL_H\r
+\r
+/*\r
+ * Copyright (c) 2018 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/touch-data.h>\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace DevelTouchData\r
+{\r
+\r
+/**\r
+ * @brief Get mouse's button value (ex: right/left button)\r
+ *\r
+ * @param[in] touchData The instance of TouchData.\r
+ * @param[in] point The point required\r
+ * @return The mouse button value\r
+ */\r
+MouseButton::Type GetMouseButton( TouchData touchData, std::size_t point );\r
+\r
+} // namespace DevelTouchData\r
+\r
+} // namespace Dali\r
+\r
+#endif // DALI_INTERNAL_TOUCH_DATA_DEVEL_H\r
index 7a953c8..fb9fd42 100644 (file)
@@ -8,6 +8,7 @@ devel_api_src_files = \
   $(devel_api_src_dir)/common/hash.cpp \
   $(devel_api_src_dir)/common/stage-devel.cpp \
   $(devel_api_src_dir)/events/hit-test-algorithm.cpp \
+  ${devel_api_src_dir}/events/touch-data-devel.cpp \
   $(devel_api_src_dir)/images/distance-field.cpp \
   $(devel_api_src_dir)/images/texture-set-image.cpp \
   $(devel_api_src_dir)/images/nine-patch-image.cpp \
@@ -45,7 +46,9 @@ devel_api_core_common_header_files = \
   $(devel_api_src_dir)/common/stage-devel.h
 
 devel_api_core_events_header_files = \
-  $(devel_api_src_dir)/events/hit-test-algorithm.h
+  $(devel_api_src_dir)/events/hit-test-algorithm.h \
+  ${devel_api_src_dir}/events/touch-data-devel.h \
+  ${devel_api_src_dir}/events/mouse-button.h
 
 devel_api_core_images_header_files = \
   $(devel_api_src_dir)/images/distance-field.h \
index 2349f02..4f7ae31 100755 (executable)
@@ -17,7 +17,6 @@
 
 // CLASS HEADER
 #include <dali/integration-api/events/point.h>
-#include <dali/public-api/events/mouse-button.h>
 
 namespace Dali
 {
index 543e86e..067d5ba 100755 (executable)
@@ -24,7 +24,7 @@
 #include <dali/public-api/math/vector2.h>
 #include <dali/public-api/events/touch-point.h>
 #include <dali/public-api/events/device.h>
-#include <dali/public-api/events/mouse-button.h>
+#include <dali/devel-api/events/mouse-button.h>
 
 namespace Dali
 {
index ebd2cbe..59b2839 100644 (file)
@@ -147,7 +147,6 @@ SET(PUBLIC_API_HEADERS
   ${CMAKE_CURRENT_SOURCE_DIR}/events/touch-point.h
   ${CMAKE_CURRENT_SOURCE_DIR}/events/touch-event.h
   ${CMAKE_CURRENT_SOURCE_DIR}/events/touch-data.h
-  ${CMAKE_CURRENT_SOURCE_DIR}/events/mouse-button.h
 
   ${CMAKE_CURRENT_SOURCE_DIR}/images/buffer-image.h
   ${CMAKE_CURRENT_SOURCE_DIR}/images/encoded-buffer-image.h
index 54d9a5e..a18a927 100755 (executable)
@@ -112,11 +112,6 @@ Device::Subclass::Type TouchData::GetDeviceSubclass( std::size_t point ) const
   return GetImplementation( *this ).GetDeviceSubclass( point );
 }
 
-MouseButton::Type TouchData::GetMouseButton( std::size_t point ) const
-{
-  return GetImplementation( *this ).GetMouseButton( point );
-}
-
 TouchData::TouchData( Internal::TouchData* internal )
 : BaseHandle( internal )
 {
index 89d00ea..8c13647 100755 (executable)
@@ -27,7 +27,7 @@
 #include <dali/public-api/events/point-state.h>
 #include <dali/public-api/object/base-handle.h>
 #include <dali/public-api/math/degree.h>
-#include <dali/public-api/events/mouse-button.h>
+#include <dali/devel-api/events/mouse-button.h>
 
 namespace Dali
 {
@@ -243,16 +243,6 @@ public:
   Device::Subclass::Type GetDeviceSubclass( std::size_t point ) const;
 
 
-  /**
-   * @brief Get mouse device's button value (ex: right/left button)
-   *
-   * @SINCE_1_3.31
-   * @param[in] point The point required
-   * @return The mouse button value
-   */
-  MouseButton::Type GetMouseButton( std::size_t point ) const;
-
-
 public: // Not intended for application developers
 
   /// @cond internal
index 1e0e443..ba9f26b 100644 (file)
@@ -151,8 +151,7 @@ public_api_core_events_header_files = \
   $(public_api_src_dir)/events/tap-gesture-detector.h \
   $(public_api_src_dir)/events/touch-point.h \
   $(public_api_src_dir)/events/touch-event.h \
-  $(public_api_src_dir)/events/touch-data.h \
-  $(public_api_src_dir)/events/mouse-button.h
+  $(public_api_src_dir)/events/touch-data.h
 
 public_api_core_images_header_files = \
   $(public_api_src_dir)/images/buffer-image.h \