Merge "Add UserInteractionEnabled property on actor for controlling user interaction...
[platform/core/uifw/dali-core.git] / dali / internal / event / actors / actor-impl.h
index b1050a7..3392d0d 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_ACTOR_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -33,6 +33,8 @@
 #include <dali/devel-api/actors/actor-devel.h>
 #include <dali/devel-api/rendering/renderer-devel.h>
 
+#include <dali/integration-api/events/touch-event-integ.h>
+
 #include <dali/internal/common/const-string.h>
 #include <dali/internal/common/internal-constants.h>
 #include <dali/internal/common/memory-pool-object-allocator.h>
@@ -1240,6 +1242,15 @@ public:
   }
 
   /**
+   * Query whether the application or derived actor type requires hit-test result events.
+   * @return True if hit-test result events are required.
+   */
+  bool IsHitTestResultRequired() const
+  {
+    return !mHitTestResultSignal.Empty();
+  }
+
+  /**
    * Query whether the application or derived actor type requires intercept touch events.
    * @return True if intercept touch events are required.
    */
@@ -1375,6 +1386,23 @@ public:
   void EmitLayoutDirectionChangedSignal(LayoutDirection::Type type);
 
   /**
+   * Used by the EventProcessor to emit hit-test result touch event signals.
+   * @param[in] point The point of event touched.
+   * @param[in] hitPointLocal The hit point in the Actor's local reference system.
+   * @param[in] timeStamp The time the event occurred.
+   * @return True if the event was consumed.
+   */
+  bool EmitHitTestResultSignal(Integration::Point point, Vector2 hitPointLocal, uint32_t timeStamp);
+
+  /**
+   * @copydoc DevelActor::HitTestResultSignal()
+   */
+  Dali::Actor::TouchEventSignalType& HitTestResultSignal()
+  {
+    return mHitTestResultSignal;
+  }
+
+  /**
    * @copydoc DevelActor::InterceptTouchedSignal()
    */
   Dali::Actor::TouchEventSignalType& InterceptTouchedSignal()
@@ -1865,6 +1893,7 @@ protected:
   Dali::Actor::OnRelayoutSignalType             mOnRelayoutSignal;
   DevelActor::VisibilityChangedSignalType       mVisibilityChangedSignal;
   Dali::Actor::LayoutDirectionChangedSignalType mLayoutDirectionChangedSignal;
+  Dali::Actor::TouchEventSignalType             mHitTestResultSignal;
 
   Quaternion mTargetOrientation; ///< Event-side storage for orientation
   Vector4    mTargetColor;       ///< Event-side storage for color