From: joogab.yun Date: Tue, 10 Dec 2024 06:18:34 +0000 (+0900) Subject: [Tizen] Add APIs for setting IME position, cursor theme name. X-Git-Tag: accepted/tizen/unified/20241218.085941^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=52afb9d2a7da72e8b4a77295b4ee6142973b4ff7;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git [Tizen] Add APIs for setting IME position, cursor theme name. This reverts commit 368cf94dd22b852fda6cb2a808ebba8a9549658c. Change-Id: Ie1d44f15f0882768e7067a5f4b52a816d0c89536 --- diff --git a/dali-toolkit/devel-api/controls/web-view/web-settings.cpp b/dali-toolkit/devel-api/controls/web-view/web-settings.cpp index 385ecc6210..a4178e72fa 100755 --- a/dali-toolkit/devel-api/controls/web-view/web-settings.cpp +++ b/dali-toolkit/devel-api/controls/web-view/web-settings.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 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. @@ -269,6 +269,15 @@ bool WebSettings::IsExtraFeatureEnabled(const std::string& feature) const return mWebEngineSettings.IsExtraFeatureEnabled(feature); } +void WebSettings::SetImeStyle(int style) +{ + mWebEngineSettings.SetImeStyle(style); +} + +int WebSettings::GetImeStyle() const +{ + return mWebEngineSettings.GetImeStyle(); +} } // namespace Toolkit diff --git a/dali-toolkit/devel-api/controls/web-view/web-settings.h b/dali-toolkit/devel-api/controls/web-view/web-settings.h index de428338c6..1708a8ad0a 100755 --- a/dali-toolkit/devel-api/controls/web-view/web-settings.h +++ b/dali-toolkit/devel-api/controls/web-view/web-settings.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_WEB_SETTINGS_H /* - * Copyright (c) 2021 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. @@ -407,6 +407,25 @@ public: */ bool IsExtraFeatureEnabled(const std::string& feature) const; + /** + * @brief Sets the style of IME. + * + * @param[in] style @c IME_STYLE_FULL full IME style + * @c IME_STYLE_FLOATING floating IME style + * @c IME_STYLE_DYNAMIC dynamic IME style + * + */ + void SetImeStyle(int style); + + /** + * @brief Gets the style of IME. + * + * @return @c IME_STYLE_FULL full IME style + * @c IME_STYLE_FLOATING floating IME style + * @c IME_STYLE_DYNAMIC dynamic IME style + */ + int GetImeStyle() const; + private: Dali::WebEngineSettings& mWebEngineSettings; }; diff --git a/dali-toolkit/devel-api/controls/web-view/web-view.cpp b/dali-toolkit/devel-api/controls/web-view/web-view.cpp index 05d5a7be7e..9446d65de5 100755 --- a/dali-toolkit/devel-api/controls/web-view/web-view.cpp +++ b/dali-toolkit/devel-api/controls/web-view/web-view.cpp @@ -189,6 +189,16 @@ bool WebView::StopInspectorServer() return Dali::Toolkit::GetImpl(*this).StopInspectorServer(); } +bool WebView::SetImePositionAndAlignment(Dali::Vector2 position, int alignment) +{ + return Dali::Toolkit::GetImpl(*this).SetImePositionAndAlignment(position, alignment); +} + +void WebView::SetCursorThemeName(const std::string themeName) +{ + Dali::Toolkit::GetImpl(*this).SetCursorThemeName(themeName); +} + void WebView::ScrollBy(int32_t deltaX, int32_t deltaY) { Dali::Toolkit::GetImpl(*this).ScrollBy(deltaX, deltaY); diff --git a/dali-toolkit/devel-api/controls/web-view/web-view.h b/dali-toolkit/devel-api/controls/web-view/web-view.h index cacec24671..d216539aad 100755 --- a/dali-toolkit/devel-api/controls/web-view/web-view.h +++ b/dali-toolkit/devel-api/controls/web-view/web-view.h @@ -413,6 +413,21 @@ public: */ bool StopInspectorServer(); + /** + * @brief Set the style of IME. + * @param[in] position Position of IME. + * @param[in] alignment Alignment of IME. + * + * @return true if succeeded, false otherwise + */ + bool SetImePositionAndAlignment(Dali::Vector2 position, int alignment); + + /** + * @brief Set the theme name of cursor. + * @param[in] themeName The name of theme of cursor. + */ + void SetCursorThemeName(const std::string themeName); + /** * @brief Scroll web page of view by deltaX and deltaY. * @param[in] deltaX The delta x of scroll diff --git a/dali-toolkit/internal/controls/web-view/web-view-impl.cpp b/dali-toolkit/internal/controls/web-view/web-view-impl.cpp index 8a78caccb6..a7eda72f7a 100644 --- a/dali-toolkit/internal/controls/web-view/web-view-impl.cpp +++ b/dali-toolkit/internal/controls/web-view/web-view-impl.cpp @@ -502,6 +502,19 @@ bool WebView::StopInspectorServer() return mWebEngine ? mWebEngine.StopInspectorServer() : false; } +bool WebView::SetImePositionAndAlignment(Dali::Vector2 position, int alignment) +{ + return mWebEngine ? mWebEngine.SetImePositionAndAlignment(position, alignment) : false; +} + +void WebView::SetCursorThemeName(const std::string themeName) +{ + if(mWebEngine) + { + mWebEngine.SetCursorThemeName(themeName); + } +} + void WebView::ScrollBy(int32_t deltaX, int32_t deltaY) { if(mWebEngine) diff --git a/dali-toolkit/internal/controls/web-view/web-view-impl.h b/dali-toolkit/internal/controls/web-view/web-view-impl.h index 21a4c76660..fce9dd2d44 100644 --- a/dali-toolkit/internal/controls/web-view/web-view-impl.h +++ b/dali-toolkit/internal/controls/web-view/web-view-impl.h @@ -187,6 +187,21 @@ public: */ bool StopInspectorServer(); + /** + * @brief Set the style of IME. + * @param[in] position Position of IME. + * @param[in] alignment Alignment of IME. + * + * @return true if succeeded, false otherwise + */ + bool SetImePositionAndAlignment(Dali::Vector2 position, int alignment); + + /** + * @brief Set the theme name of cursor. + * @param[in] themeName The name of theme of cursor. + */ + void SetCursorThemeName(const std::string themeName); + /** * @copydoc Dali::Toolkit::WebView::ScrollBy() */