From: huayong.xu Date: Fri, 2 Feb 2024 06:51:49 +0000 (+0800) Subject: [Tizen] Add a WebView API for notifying orientation change. X-Git-Tag: accepted/tizen/8.0/unified/20240208.163209~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F15%2F305515%2F1;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git [Tizen] Add a WebView API for notifying orientation change. Change-Id: I20ee245fb1f82beb5259a7fb3ec8c51d2ffab098 --- 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 4c631bf..76be6a4 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. @@ -279,6 +279,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 97b70c1..dd7f96b 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 1515c76..1832247 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 d09b8fb..0a050ef 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 1a35dc9..77d4e06 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;