[Tizen] Add APIs for setting IME position, cursor theme name.
authorWoochan Lee <wc0917.lee@samsung.com>
Tue, 7 Jan 2025 06:56:10 +0000 (15:56 +0900)
committerWoochan Lee <wc0917.lee@samsung.com>
Tue, 7 Jan 2025 06:56:10 +0000 (15:56 +0900)
This reverts commit b14367a60418d064e24a7f3f37a18a6c0bcef3db.

dali/devel-api/adaptor-framework/web-engine/web-engine-plugin.h
dali/devel-api/adaptor-framework/web-engine/web-engine-settings.h
dali/devel-api/adaptor-framework/web-engine/web-engine.cpp
dali/devel-api/adaptor-framework/web-engine/web-engine.h
dali/internal/web-engine/common/web-engine-impl.cpp
dali/internal/web-engine/common/web-engine-impl.h

index f06bb569c49d7cd540a9a6c967607a47e7d56a85..252514cf95c00c0a4de935419443fcab2e3a8e4c 100755 (executable)
@@ -669,6 +669,21 @@ public:
    */
   virtual void SetFocus(bool focused) = 0;
 
+  /**
+   * @brief Set the style of IME.
+   * @param[in] position Position of IME.
+   * @param[in] alignment Alignment of IME.
+   *
+   * @return true if succeeded, false otherwise
+   */
+  virtual bool SetImePositionAndAlignment(Dali::Vector2 position, int alignment) = 0;
+
+  /**
+   * @brief Set the theme name of cursor.
+   * @param[in] themeName The name of theme of cursor.
+   */
+  virtual void SetCursorThemeName(const std::string themeName) = 0;
+
   /**
    * @brief Set zoom factor of the current page.
    * @param[in] zoomFactor a new factor to be set.
index faee431aa098951087db8f27d3d3762e2f723def..1fbbc205c9139afb8740c413a79c6c3593296c73 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_WEB_ENGINE_SETTINGS_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.
@@ -403,6 +403,25 @@ public:
    * @return @c true on enable or @c false on disable
    */
   virtual bool IsExtraFeatureEnabled(const std::string& feature) const = 0;
+
+  /**
+   * @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
+   *
+   */
+  virtual void SetImeStyle(int style) = 0;
+
+  /**
+   * @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
+   */
+  virtual int GetImeStyle() const = 0;
 };
 
 } // namespace Dali
index 045fbb7789fead5626f64191c16915fe1691d548..2d60f26c12966c7edb2ea27f338cc8c1d167086d 100755 (executable)
@@ -402,6 +402,16 @@ void WebEngine::SetFocus(bool focused)
   GetImplementation(*this).SetFocus(focused);
 }
 
+bool WebEngine::SetImePositionAndAlignment(Dali::Vector2 position, int alignment)
+{
+  return GetImplementation(*this).SetImePositionAndAlignment(position, alignment);
+}
+
+void WebEngine::SetCursorThemeName(const std::string themeName)
+{
+  GetImplementation(*this).SetCursorThemeName(themeName);
+}
+
 void WebEngine::SetPageZoomFactor(float zoomFactor)
 {
   GetImplementation(*this).SetPageZoomFactor(zoomFactor);
index b5ee7a8c0c6b3059ecf59a0cde2db5074c0c49bd..1be4a775f81dea289407a01628b6a7be35963689 100755 (executable)
@@ -525,6 +525,21 @@ public:
    */
   void SetFocus(bool focused);
 
+  /**
+   * @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 Enable/disable mouse events. The default is enabled.
    *
index 9bc6533f5d3e5d6d3b90d50832ca526c2d104e37..f81098876da1afef419fd31576f35f33d4e5cd48 100644 (file)
@@ -596,6 +596,16 @@ void WebEngine::SetFocus(bool focused)
   mPlugin->SetFocus(focused);
 }
 
+bool WebEngine::SetImePositionAndAlignment(Dali::Vector2 position, int alignment)
+{
+  return mPlugin->SetImePositionAndAlignment(position, alignment);
+}
+
+void WebEngine::SetCursorThemeName(const std::string themeName)
+{
+  mPlugin->SetCursorThemeName(themeName);
+}
+
 void WebEngine::SetDocumentBackgroundColor(Dali::Vector4 color)
 {
   mPlugin->SetDocumentBackgroundColor(color);
index e557e69cbab4260749343458430fffa6929688e8..6328460c660bee49729b579966e795f5487f0f08 100755 (executable)
@@ -377,6 +377,16 @@ public:
    */
   void SetFocus(bool focused);
 
+  /**
+   * @copydoc Dali::WebEngine::SetImePositionAndAlignment()
+   */
+  bool SetImePositionAndAlignment(Dali::Vector2 position, int alignment);
+
+  /**
+   * @copydoc Dali::WebEngine::SetCursorThemeName()
+   */
+  void SetCursorThemeName(const std::string themeName);
+
   /**
    * @copydoc Dali::WebEngine::SetPageZoomFactor()
    */