From e458466013df6d2072e274ad2f4969f9d46b28e4 Mon Sep 17 00:00:00 2001 From: "huiyu.eun" Date: Tue, 11 Dec 2018 14:21:00 +0900 Subject: [PATCH] [Tizen] Change GetMouseButton to devel-api Change-Id: I486a58bf12b2b267d274a41e20d95468c3cd498f Signed-off-by: huiyu.eun --- .../src/dali/utc-Dali-TouchDataProcessing.cpp | 6 +-- dali/devel-api/CMakeLists.txt | 3 ++ .../events/mouse-button.h | 0 dali/devel-api/events/touch-data-devel.cpp | 36 ++++++++++++++++++ dali/devel-api/events/touch-data-devel.h | 43 ++++++++++++++++++++++ dali/devel-api/file.list | 5 ++- dali/integration-api/events/point.cpp | 1 - dali/integration-api/events/point.h | 2 +- dali/public-api/CMakeLists.txt | 1 - dali/public-api/events/touch-data.cpp | 5 --- dali/public-api/events/touch-data.h | 12 +----- dali/public-api/file.list | 3 +- 12 files changed, 92 insertions(+), 25 deletions(-) rename dali/{public-api => devel-api}/events/mouse-button.h (100%) create mode 100644 dali/devel-api/events/touch-data-devel.cpp create mode 100644 dali/devel-api/events/touch-data-devel.h diff --git a/automated-tests/src/dali/utc-Dali-TouchDataProcessing.cpp b/automated-tests/src/dali/utc-Dali-TouchDataProcessing.cpp index 2d016be..74764f2 100755 --- a/automated-tests/src/dali/utc-Dali-TouchDataProcessing.cpp +++ b/automated-tests/src/dali/utc-Dali-TouchDataProcessing.cpp @@ -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; } diff --git a/dali/devel-api/CMakeLists.txt b/dali/devel-api/CMakeLists.txt index 5572eeb..3823731 100644 --- a/dali/devel-api/CMakeLists.txt +++ b/dali/devel-api/CMakeLists.txt @@ -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/public-api/events/mouse-button.h b/dali/devel-api/events/mouse-button.h similarity index 100% rename from dali/public-api/events/mouse-button.h rename to dali/devel-api/events/mouse-button.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 index 0000000..a5c1b48 --- /dev/null +++ b/dali/devel-api/events/touch-data-devel.cpp @@ -0,0 +1,36 @@ +/* + * 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. + * + */ + +// INTERNAL INCLUDES +#include +#include + +namespace Dali +{ + +namespace DevelTouchData +{ + +MouseButton::Type GetMouseButton( TouchData touchData, std::size_t point ) +{ + return GetImplementation( touchData ).GetMouseButton( point ); +} + +} // namespace DevelTouchData + +} // namespace Dali + diff --git a/dali/devel-api/events/touch-data-devel.h b/dali/devel-api/events/touch-data-devel.h new file mode 100644 index 0000000..1651611 --- /dev/null +++ b/dali/devel-api/events/touch-data-devel.h @@ -0,0 +1,43 @@ +#ifndef DALI_TOUCH_DATA_DEVEL_H +#define DALI_TOUCH_DATA_DEVEL_H + +/* + * 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. + * + */ + +// INTERNAL INCLUDES +#include + +namespace Dali +{ + +namespace DevelTouchData +{ + +/** + * @brief Get mouse's button value (ex: right/left button) + * + * @param[in] touchData The instance of TouchData. + * @param[in] point The point required + * @return The mouse button value + */ +MouseButton::Type GetMouseButton( TouchData touchData, std::size_t point ); + +} // namespace DevelTouchData + +} // namespace Dali + +#endif // DALI_INTERNAL_TOUCH_DATA_DEVEL_H diff --git a/dali/devel-api/file.list b/dali/devel-api/file.list index 7a953c8..fb9fd42 100644 --- a/dali/devel-api/file.list +++ b/dali/devel-api/file.list @@ -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 \ diff --git a/dali/integration-api/events/point.cpp b/dali/integration-api/events/point.cpp index 2349f02..4f7ae31 100755 --- a/dali/integration-api/events/point.cpp +++ b/dali/integration-api/events/point.cpp @@ -17,7 +17,6 @@ // CLASS HEADER #include -#include namespace Dali { diff --git a/dali/integration-api/events/point.h b/dali/integration-api/events/point.h index 543e86e..067d5ba 100755 --- a/dali/integration-api/events/point.h +++ b/dali/integration-api/events/point.h @@ -24,7 +24,7 @@ #include #include #include -#include +#include namespace Dali { diff --git a/dali/public-api/CMakeLists.txt b/dali/public-api/CMakeLists.txt index ebd2cbe..59b2839 100644 --- a/dali/public-api/CMakeLists.txt +++ b/dali/public-api/CMakeLists.txt @@ -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 diff --git a/dali/public-api/events/touch-data.cpp b/dali/public-api/events/touch-data.cpp index 54d9a5e..a18a927 100755 --- a/dali/public-api/events/touch-data.cpp +++ b/dali/public-api/events/touch-data.cpp @@ -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 ) { diff --git a/dali/public-api/events/touch-data.h b/dali/public-api/events/touch-data.h index 89d00ea..8c13647 100755 --- a/dali/public-api/events/touch-data.h +++ b/dali/public-api/events/touch-data.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include 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 diff --git a/dali/public-api/file.list b/dali/public-api/file.list index 1e0e443..ba9f26b 100644 --- a/dali/public-api/file.list +++ b/dali/public-api/file.list @@ -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 \ -- 2.7.4