[Tizen] Add APIs for setting IME position, cursor theme name. accepted/tizen/unified/20250115.005102 accepted/tizen/unified/x/20250115.014933
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 14 Jan 2025 07:53:44 +0000 (16:53 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Tue, 14 Jan 2025 07:53:47 +0000 (16:53 +0900)
This reverts commit 1edda016cdb73a915dbc8de5e80315f544f1febb.

Change-Id: Ic1a4af4cd45638d17bb710cdd111b1362176c35f

dali-toolkit/devel-api/controls/web-view/web-settings.cpp
dali-toolkit/devel-api/controls/web-view/web-settings.h
dali-toolkit/devel-api/controls/web-view/web-view.cpp
dali-toolkit/devel-api/controls/web-view/web-view.h
dali-toolkit/internal/controls/web-view/web-view-impl.cpp
dali-toolkit/internal/controls/web-view/web-view-impl.h

index 385ecc6210d7f2464553edc3d6792f05554f9618..a4178e72fa56f60211f5bc3a9e53855936e6cc9d 100755 (executable)
@@ -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
 
index de428338c6f7212148aab45bd7f06226e1e07665..1708a8ad0acbdb6ca41a07a16568d83ffc8155e8 100755 (executable)
@@ -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;
 };
index 05d5a7be7e3f511bb3881456ab6fb347ff37df33..9446d65de52a395bfde302d96423954fc13ba2d3 100755 (executable)
@@ -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);
index cacec2467177a10ff001e7c19050d59076c0a740..d216539aad214f8799ed7d441ebb208ab8beea51 100755 (executable)
@@ -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
index a4f99a9c99d47731662afc2631304244df99c064..9bef72c5acf8114aeb15a0adb7770c66fecb2466 100644 (file)
@@ -503,6 +503,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)
index 21a4c766605ef02467430f2d7849b5fe68dcda9a..fce9dd2d44ae7fb2cd6e89c7f50f6d9ed4f996b0 100644 (file)
@@ -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()
    */