From 744cbbaa07be8dceb654ab2e219417b10b9f8b1e Mon Sep 17 00:00:00 2001 From: "huayong.xu" Date: Fri, 2 Feb 2024 14:51:49 +0800 Subject: [PATCH] [Tizen] Add a WebView API for notifying orientation change. Change-Id: I20ee245fb1f82beb5259a7fb3ec8c51d2ffab098 --- dali/devel-api/adaptor-framework/web-engine/web-engine-plugin.h | 7 ++++++- dali/devel-api/adaptor-framework/web-engine/web-engine.cpp | 7 ++++++- dali/devel-api/adaptor-framework/web-engine/web-engine.h | 7 ++++++- dali/internal/web-engine/common/web-engine-impl.cpp | 7 ++++++- dali/internal/web-engine/common/web-engine-impl.h | 7 ++++++- 5 files changed, 30 insertions(+), 5 deletions(-) diff --git a/dali/devel-api/adaptor-framework/web-engine/web-engine-plugin.h b/dali/devel-api/adaptor-framework/web-engine/web-engine-plugin.h index 6d900cb..7b34419 100755 --- a/dali/devel-api/adaptor-framework/web-engine/web-engine-plugin.h +++ b/dali/devel-api/adaptor-framework/web-engine/web-engine-plugin.h @@ -2,7 +2,7 @@ #define DALI_WEB_ENGINE_PLUGIN_H /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -299,6 +299,11 @@ public: virtual NativeImageSourcePtr GetNativeImageSource() = 0; /** + * @brief Change orientation. + */ + virtual void ChangeOrientation(int orientation) = 0; + + /** * @brief Return the URL of the Web. * * @return Url of string type diff --git a/dali/devel-api/adaptor-framework/web-engine/web-engine.cpp b/dali/devel-api/adaptor-framework/web-engine/web-engine.cpp index 7f07ca0..4d8fb89 100755 --- a/dali/devel-api/adaptor-framework/web-engine/web-engine.cpp +++ b/dali/devel-api/adaptor-framework/web-engine/web-engine.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -105,6 +105,11 @@ NativeImageSourcePtr WebEngine::GetNativeImageSource() return GetImplementation(*this).GetNativeImageSource(); } +void WebEngine::ChangeOrientation(int orientation) +{ + return GetImplementation(*this).ChangeOrientation(orientation); +} + Dali::WebEngineSettings& WebEngine::GetSettings() const { return GetImplementation(*this).GetSettings(); diff --git a/dali/devel-api/adaptor-framework/web-engine/web-engine.h b/dali/devel-api/adaptor-framework/web-engine/web-engine.h index f8e3298..bb62795 100755 --- a/dali/devel-api/adaptor-framework/web-engine/web-engine.h +++ b/dali/devel-api/adaptor-framework/web-engine/web-engine.h @@ -2,7 +2,7 @@ #define DALI_WEB_ENGINE_H /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -151,6 +151,11 @@ public: NativeImageSourcePtr GetNativeImageSource(); /** + * @brief Change orientation. + */ + void ChangeOrientation(int orientation); + + /** * @brief Get settings of WebEngine. */ Dali::WebEngineSettings& GetSettings() const; diff --git a/dali/internal/web-engine/common/web-engine-impl.cpp b/dali/internal/web-engine/common/web-engine-impl.cpp index 71b69ea..2b557f1 100644 --- a/dali/internal/web-engine/common/web-engine-impl.cpp +++ b/dali/internal/web-engine/common/web-engine-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -315,6 +315,11 @@ Dali::NativeImageSourcePtr WebEngine::GetNativeImageSource() return mPlugin->GetNativeImageSource(); } +void WebEngine::ChangeOrientation(int orientation) +{ + return mPlugin->ChangeOrientation(orientation); +} + Dali::WebEngineSettings& WebEngine::GetSettings() const { return mPlugin->GetSettings(); diff --git a/dali/internal/web-engine/common/web-engine-impl.h b/dali/internal/web-engine/common/web-engine-impl.h index b3ef060..e356133 100755 --- a/dali/internal/web-engine/common/web-engine-impl.h +++ b/dali/internal/web-engine/common/web-engine-impl.h @@ -2,7 +2,7 @@ #define DALI_WEB_ENGINE_IMPL_H /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2024 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. @@ -93,6 +93,11 @@ public: Dali::NativeImageSourcePtr GetNativeImageSource(); /** + * @copydoc Dali::WebEngine::ChangeOrientation() + */ + void ChangeOrientation(int orientation); + + /** * @copydoc Dali::WebEngine::GetSettings() */ Dali::WebEngineSettings& GetSettings() const; -- 2.7.4