/*
- * 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.
#include <dali/devel-api/common/capabilities.h>
#include <dali/integration-api/debug.h>
+#include <dali/integration-api/events/touch-integ.h>
#include <dali/internal/event/actors/actor-coords.h>
#include <dali/internal/event/actors/actor-parent.h>
DALI_PROPERTY("blendEquation", INTEGER, true, false, false, Dali::DevelActor::Property::BLEND_EQUATION)
DALI_PROPERTY("touchFocusable", BOOLEAN, true, false, false, Dali::DevelActor::Property::TOUCH_FOCUSABLE)
DALI_PROPERTY("keyboardFocusableChildren", BOOLEAN, true, false, false, Dali::DevelActor::Property::KEYBOARD_FOCUSABLE_CHILDREN)
+DALI_PROPERTY("userInteractionEnabled", BOOLEAN, true, false, false, Dali::DevelActor::Property::USER_INTERACTION_ENABLED)
DALI_PROPERTY_TABLE_END(DEFAULT_ACTOR_PROPERTY_START_INDEX, ActorDefaultProperties)
// Signals
EmitSignal(*this, mLayoutDirectionChangedSignal, type);
}
+bool Actor::EmitHitTestResultSignal(Integration::Point point, Vector2 hitPointLocal, uint32_t timeStamp)
+{
+ bool hit = true;
+
+ if(IsHitTestResultRequired())
+ {
+ Dali::Actor handle(this);
+ Integration::Point newPoint(point);
+ newPoint.SetHitActor(handle);
+ newPoint.SetLocalPosition(hitPointLocal);
+ Dali::TouchEvent touchEvent = Dali::Integration::NewTouchEvent(timeStamp, newPoint);
+ hit = mHitTestResultSignal.Emit(handle, touchEvent);
+ }
+ return hit;
+}
+
DevelActor::ChildChangedSignalType& Actor::ChildAddedSignal()
{
return mParentImpl.ChildAddedSignal();
mOnRelayoutSignal(),
mVisibilityChangedSignal(),
mLayoutDirectionChangedSignal(),
+ mHitTestResultSignal(),
mTargetOrientation(Quaternion::IDENTITY),
mTargetColor(Color::WHITE),
mTargetPosition(Vector3::ZERO),
mCaptureAllTouchAfterStart(false),
mIsBlendEquationSet(false),
mNeedGesturePropagation(false),
+ mUserInteractionEnabled(true),
mLayoutDirection(LayoutDirection::LEFT_TO_RIGHT),
mDrawMode(DrawMode::NORMAL),
mColorMode(Node::DEFAULT_COLOR_MODE),