Supports the key event repeat and delay for each way. 01/296501/4
authorWonsik Jung <sidein@samsung.com>
Sun, 30 Jul 2023 06:50:13 +0000 (15:50 +0900)
committerWonsik Jung <sidein@samsung.com>
Sun, 30 Jul 2023 13:27:06 +0000 (22:27 +0900)
Supports the key event repeat and delay for each way.
The ways have both horizental and vertical way.
This patch is only for tizen platform.

Change-Id: Ie03bef1a321b3d85c051b25101c18212439353fc

dali/devel-api/adaptor-framework/keyboard.h
dali/internal/input/common/keyboard.cpp
dali/internal/window-system/android/window-system-android.cpp
dali/internal/window-system/common/window-system.h
dali/internal/window-system/macos/window-system-mac.mm
dali/internal/window-system/tizen-wayland/ecore-wl/window-system-ecore-wl.cpp
dali/internal/window-system/tizen-wayland/ecore-wl2/window-system-ecore-wl2.cpp
dali/internal/window-system/ubuntu-x11/window-system-ecore-x.cpp
dali/internal/window-system/windows/window-system-win.cpp
dali/internal/window-system/x11/window-system-x.cpp

index b62f9e5..b4a06df 100644 (file)
@@ -51,6 +51,42 @@ DALI_ADAPTOR_API bool SetRepeatInfo(float rate, float delay);
  */
 DALI_ADAPTOR_API bool GetRepeatInfo(float& rate, float& delay);
 
+/**
+ * @brief Sets keyboard repeat information of horizontal way.
+ *
+ * @param[in] rate The key repeat rate value in seconds
+ * @param[in] delay The key repeat delay value in seconds
+ * @return true if setting the keyboard repeat succeeds
+ */
+DALI_ADAPTOR_API bool SetHorizontalRepeatInfo(float rate, float delay);
+
+/**
+ * @brief Gets keyboard repeat information of horizontal way.
+ *
+ * @param[in] rate The key repeat rate value in seconds
+ * @param[in] delay The key repeat delay value in seconds
+ * @return true if getting the keyboard repeat succeeds, false otherwise
+ */
+DALI_ADAPTOR_API bool GetHorizontalRepeatInfo(float& rate, float& delay);
+
+/**
+ * @brief Sets keyboard repeat information of vertical way.
+ *
+ * @param[in] rate The key repeat rate value in seconds
+ * @param[in] delay The key repeat delay value in seconds
+ * @return true if setting the keyboard repeat succeeds
+ */
+DALI_ADAPTOR_API bool SetVerticalRepeatInfo(float rate, float delay);
+
+/**
+ * @brief Gets keyboard repeat information of vertical way.
+ *
+ * @param[in] rate The key repeat rate value in seconds
+ * @param[in] delay The key repeat delay value in seconds
+ * @return true if getting the keyboard repeat succeeds, false otherwise
+ */
+DALI_ADAPTOR_API bool GetVerticalRepeatInfo(float& rate, float& delay);
+
 } // namespace Keyboard
 
 /**
index 6167de5..5ad6569 100644 (file)
@@ -35,6 +35,26 @@ bool GetRepeatInfo(float& rate, float& delay)
   return Dali::Internal::Adaptor::WindowSystem::GetKeyboardRepeatInfo(rate, delay);
 }
 
+bool SetHorizontalRepeatInfo(float rate, float delay)
+{
+  return Dali::Internal::Adaptor::WindowSystem::SetKeyboardHorizontalRepeatInfo(rate, delay);
+}
+
+bool GetHorizontalRepeatInfo(float& rate, float& delay)
+{
+  return Dali::Internal::Adaptor::WindowSystem::GetKeyboardHorizontalRepeatInfo(rate, delay);
+}
+
+bool SetVerticalRepeatInfo(float rate, float delay)
+{
+  return Dali::Internal::Adaptor::WindowSystem::SetKeyboardVerticalRepeatInfo(rate, delay);
+}
+
+bool GetVerticalRepeatInfo(float& rate, float& delay)
+{
+  return Dali::Internal::Adaptor::WindowSystem::GetKeyboardVerticalRepeatInfo(rate, delay);
+}
+
 } // namespace Keyboard
 
 } // namespace Dali
index 1f6b120..77721c1 100644 (file)
@@ -61,6 +61,26 @@ bool GetKeyboardRepeatInfo(float& rate, float& delay)
   return false;
 }
 
+bool SetKeyboardHorizontalRepeatInfo(float rate, float delay)
+{
+  return false;
+}
+
+bool GetKeyboardHorizontalRepeatInfo(float& rate, float& delay)
+{
+  return false;
+}
+
+bool SetKeyboardVerticalRepeatInfo(float rate, float delay)
+{
+  return false;
+}
+
+bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
+{
+  return false;
+}
+
 } // namespace WindowSystem
 
 } // namespace Adaptor
index 6a1ffce..0c05922 100644 (file)
@@ -79,6 +79,26 @@ bool SetKeyboardRepeatInfo(float rate, float delay);
  */
 bool GetKeyboardRepeatInfo(float& rate, float& delay);
 
+/**
+ * @copydoc Dali::Keyboard::SetHorizontalRepeatInfo()
+ */
+bool SetKeyboardHorizontalRepeatInfo(float rate, float delay);
+
+/**
+ * @copydoc Dali::Keyboard::GetHorizontalRepeatInfo()
+ */
+bool GetKeyboardHorizontalRepeatInfo(float& rate, float& delay);
+
+/**
+ * @copydoc Dali::Keyboard::SetVerticalRepeatInfo()
+ */
+bool SetKeyboardVerticalRepeatInfo(float rate, float delay);
+
+/**
+ * @copydoc Dali::Keyboard::GetVerticalRepeatInfo()
+ */
+bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay);
+
 } // namespace WindowSystem
 
 /**
index 1f67d12..545f58c 100644 (file)
@@ -52,5 +52,25 @@ bool GetKeyboardRepeatInfo( float& rate, float& delay )
   return false;
 }
 
+bool SetKeyboardHorizontalRepeatInfo(float rate, float delay)
+{
+  return false;
+}
+
+bool GetKeyboardHorizontalRepeatInfo(float& rate, float& delay)
+{
+  return false;
+}
+
+bool SetKeyboardVerticalRepeatInfo(float rate, float delay)
+{
+  return false;
+}
+
+bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
+{
+  return false;
+}
+
 } // namespace Dali::Internal::Adaptor::WindowSystem
 
index 4f57a10..8a341b0 100644 (file)
@@ -63,6 +63,26 @@ bool GetKeyboardRepeatInfo(float& rate, float& delay)
   return ret;
 }
 
+bool SetKeyboardHorizontalRepeatInfo(float rate, float delay)
+{
+  return false;
+}
+
+bool GetKeyboardHorizontalRepeatInfo(float& rate, float& delay)
+{
+  return false;
+}
+
+bool SetKeyboardVerticalRepeatInfo(float rate, float delay)
+{
+  return false;
+}
+
+bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
+{
+  return false;
+}
+
 } // namespace WindowSystem
 
 } // namespace Adaptor
index 8e9a5e7..ff6105b 100644 (file)
@@ -135,6 +135,61 @@ bool GetKeyboardRepeatInfo(float& rate, float& delay)
   return false;
 }
 
+
+bool SetKeyboardHorizontalRepeatInfo(float rate, float delay)
+{
+  auto frameworkFactory = Dali::Internal::Adaptor::GetFrameworkFactory();
+  if(frameworkFactory == nullptr || (frameworkFactory && frameworkFactory->GetFrameworkBackend() == FrameworkBackend::DEFAULT))
+  {
+    Ecore_Wl2_Input* input = ecore_wl2_input_default_input_get(ecore_wl2_connected_display_get(NULL));
+    return ecore_wl2_input_keyboard_horizontal_way_repeat_set(input, static_cast<double>(rate), static_cast<double>(delay));
+  }
+  return false;
+}
+
+bool GetKeyboardHorizontalRepeatInfo(float& rate, float& delay)
+{
+  auto frameworkFactory = Dali::Internal::Adaptor::GetFrameworkFactory();
+  if(frameworkFactory == nullptr || (frameworkFactory && frameworkFactory->GetFrameworkBackend() == FrameworkBackend::DEFAULT))
+  {
+    Ecore_Wl2_Input* input = ecore_wl2_input_default_input_get(ecore_wl2_connected_display_get(NULL));
+    double           rateVal, delayVal;
+    bool             ret = ecore_wl2_input_keyboard_horizontal_way_repeat_get(input, &rateVal, &delayVal);
+    rate                 = static_cast<float>(rateVal);
+    delay                = static_cast<float>(delayVal);
+
+    return ret;
+  }
+  return false;
+}
+
+bool SetKeyboardVerticalRepeatInfo(float rate, float delay)
+{
+  auto frameworkFactory = Dali::Internal::Adaptor::GetFrameworkFactory();
+  if(frameworkFactory == nullptr || (frameworkFactory && frameworkFactory->GetFrameworkBackend() == FrameworkBackend::DEFAULT))
+  {
+    Ecore_Wl2_Input* input = ecore_wl2_input_default_input_get(ecore_wl2_connected_display_get(NULL));
+    return ecore_wl2_input_keyboard_vertical_way_repeat_set(input, static_cast<double>(rate), static_cast<double>(delay));
+  }
+  return false;
+}
+
+bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
+{
+  auto frameworkFactory = Dali::Internal::Adaptor::GetFrameworkFactory();
+  if(frameworkFactory == nullptr || (frameworkFactory && frameworkFactory->GetFrameworkBackend() == FrameworkBackend::DEFAULT))
+  {
+    Ecore_Wl2_Input* input = ecore_wl2_input_default_input_get(ecore_wl2_connected_display_get(NULL));
+    double           rateVal, delayVal;
+    bool             ret = ecore_wl2_input_keyboard_vertical_way_repeat_get(input, &rateVal, &delayVal);
+    rate                 = static_cast<float>(rateVal);
+    delay                = static_cast<float>(delayVal);
+
+    return ret;
+  }
+  return false;
+}
+
 } // namespace WindowSystem
 
 } // namespace Adaptor
index 71f840e..09f222f 100644 (file)
@@ -59,6 +59,26 @@ bool GetKeyboardRepeatInfo(float& rate, float& delay)
   return false;
 }
 
+bool SetKeyboardHorizontalRepeatInfo(float rate, float delay)
+{
+  return false;
+}
+
+bool GetKeyboardHorizontalRepeatInfo(float& rate, float& delay)
+{
+  return false;
+}
+
+bool SetKeyboardVerticalRepeatInfo(float rate, float delay)
+{
+  return false;
+}
+
+bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
+{
+  return false;
+}
+
 } // namespace WindowSystem
 
 } // namespace Adaptor
index 7740edd..8571216 100644 (file)
@@ -53,6 +53,26 @@ bool GetKeyboardRepeatInfo(float& rate, float& delay)
   return false;
 }
 
+bool SetKeyboardHorizontalRepeatInfo(float rate, float delay)
+{
+  return false;
+}
+
+bool GetKeyboardHorizontalRepeatInfo(float& rate, float& delay)
+{
+  return false;
+}
+
+bool SetKeyboardVerticalRepeatInfo(float rate, float delay)
+{
+  return false;
+}
+
+bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
+{
+  return false;
+}
+
 } // namespace WindowSystem
 
 } // namespace Adaptor
index 406ca2b..b48a7ef 100644 (file)
@@ -1074,6 +1074,26 @@ bool GetKeyboardRepeatInfo(float& rate, float& delay)
   return false;
 }
 
+bool SetKeyboardHorizontalRepeatInfo(float rate, float delay)
+{
+  return false;
+}
+
+bool GetKeyboardHorizontalRepeatInfo(float& rate, float& delay)
+{
+  return false;
+}
+
+bool SetKeyboardVerticalRepeatInfo(float rate, float delay)
+{
+  return false;
+}
+
+bool GetKeyboardVerticalRepeatInfo(float& rate, float& delay)
+{
+  return false;
+}
+
 } // namespace WindowSystem
 
 } // namespace Adaptor