Add SetTapMaximumAllowedTime 70/261670/7
authorjoogab.yun <joogab.yun@samsung.com>
Thu, 22 Jul 2021 08:34:19 +0000 (17:34 +0900)
committerjoogab.yun <joogab.yun@samsung.com>
Thu, 5 Aug 2021 10:39:48 +0000 (19:39 +0900)
Sets the MaximumAllowedTime of the tap gesture as an environment variable.

Change-Id: I465a41c39cce8ec5e67b85bc014f5b1063e20710

dali/internal/adaptor/common/adaptor-impl.cpp
dali/internal/system/common/environment-options.cpp
dali/internal/system/common/environment-options.h
dali/internal/system/common/environment-variables.h

index 6338359af669c505ce4c3d926a5f4fe1f3d53c1c..fabadaf0015ed3618c750afe777d7a317c579a24 100644 (file)
@@ -290,6 +290,11 @@ void Adaptor::Initialize(GraphicsFactory& graphicsFactory)
   {
     Integration::SetLongPressMinimumHoldingTime(mEnvironmentOptions->GetLongPressMinimumHoldingTime());
   }
+  if(mEnvironmentOptions->GetTapMaximumAllowedTime() > 0)
+  {
+    Integration::SetTapMaximumAllowedTime(mEnvironmentOptions->GetTapMaximumAllowedTime());
+  }
+
 
   std::string systemCachePath = GetSystemCachePath();
   if(!systemCachePath.empty())
index 8fec77f032cfd98c76afb854ddc16885ab97edf9..6de61e0124748b7e4184faf5b7bd55d06dc87441 100644 (file)
@@ -238,6 +238,7 @@ EnvironmentOptions::EnvironmentOptions()
   mRotationMinimumTouchEvents(-1),
   mRotationMinimumTouchEventsAfterStart(-1),
   mLongPressMinimumHoldingTime(-1),
+  mTapMaximumAllowedTime(-1),
   mGlesCallTime(0),
   mMultiSamplingLevel(DEFAULT_MULTI_SAMPLING_LEVEL),
   mThreadingMode(ThreadingMode::COMBINED_UPDATE_RENDER),
@@ -433,6 +434,11 @@ int EnvironmentOptions::GetLongPressMinimumHoldingTime() const
   return mLongPressMinimumHoldingTime;
 }
 
+int EnvironmentOptions::GetTapMaximumAllowedTime() const
+{
+  return mTapMaximumAllowedTime;
+}
+
 unsigned int EnvironmentOptions::GetWindowWidth() const
 {
   return mWindowWidth;
@@ -556,6 +562,7 @@ void EnvironmentOptions::ParseEnvironmentOptions()
   SetFromEnvironmentVariable(DALI_ENV_ROTATION_MINIMUM_TOUCH_EVENTS_AFTER_START, mRotationMinimumTouchEventsAfterStart);
 
   SetFromEnvironmentVariable(DALI_ENV_LONG_PRESS_MINIMUM_HOLDING_TIME, mLongPressMinimumHoldingTime);
+  SetFromEnvironmentVariable(DALI_ENV_TAP_MAXIMUM_ALLOWED_TIME, mTapMaximumAllowedTime);
 
   SetFromEnvironmentVariable(DALI_GLES_CALL_TIME, mGlesCallTime);
   SetFromEnvironmentVariable<int>(DALI_GLES_CALL_ACCUMULATE, [&](int glesCallAccumulate) { mGlesCallAccumulate = glesCallAccumulate != 0; });
index 0b4e44c5e0e416c2987bc75cbcdf29a0a7d35e50..4ba290c7a69c03c4adb0171843cdf2786a0105dd 100644 (file)
@@ -243,6 +243,11 @@ public:
    */
   int GetLongPressMinimumHoldingTime() const;
 
+  /**
+   * @return The maximum allowed time required to be recognized as a multi tap gesture (millisecond)
+   */
+  int GetTapMaximumAllowedTime() const;
+
   /**
    * @return The width of the window
    */
@@ -382,6 +387,7 @@ private: // Data
   int   mRotationMinimumTouchEvents;            ///< minimum events required before a rotation starts
   int   mRotationMinimumTouchEventsAfterStart;  ///< minimum events required after a rotation started
   int   mLongPressMinimumHoldingTime;           ///< minimum holding time required to be recognized as a long press gesture (millisecond)
+  int   mTapMaximumAllowedTime;                 ///< maximum allowed time required to be recognized as a multi tap gesture (millisecond)
   int   mGlesCallTime;                          ///< time in seconds between status updates
   int   mMultiSamplingLevel;                    ///< The number of samples required in multisample buffers
 
index ab3f1b984bd27d4d5e26957734f81b9986533ebf..f4b661a4577d386cb2222c2db47e85d535fb0a58 100644 (file)
@@ -95,6 +95,9 @@ namespace Adaptor
  */
 #define DALI_ENV_LONG_PRESS_MINIMUM_HOLDING_TIME "DALI_LONG_PRESS_MINIMUM_HOLDING_TIME"
 
+// Tap-Gesture maximum allowed time required to be recognized as a multi tap gesture (millisecond)
+#define DALI_ENV_TAP_MAXIMUM_ALLOWED_TIME "DALI_TAP_MAXIMUM_ALLOWED_TIME"
+
 #define DALI_GLES_CALL_TIME "DALI_GLES_CALL_TIME"
 
 #define DALI_GLES_CALL_ACCUMULATE "DALI_GLES_CALL_ACCUMULATE"