2 * Copyright (c) 2024 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali/devel-api/actors/actor-devel.h>
20 #include <dali/internal/event/actors/actor-coords.h>
21 #include <dali/internal/event/actors/actor-impl.h>
27 Vector2 CalculateScreenPosition(Actor actor)
29 return GetImplementation(actor).CalculateScreenPosition();
32 Rect<> CalculateScreenExtents(Actor actor)
34 return GetImplementation(actor).CalculateScreenExtents();
37 Rect<> CalculateCurrentScreenExtents(Actor actor)
39 return GetImplementation(actor).CalculateCurrentScreenExtents();
42 VisibilityChangedSignalType& VisibilityChangedSignal(Actor actor)
44 return GetImplementation(actor).VisibilityChangedSignal();
47 Actor GetVisiblityChangedActor()
49 return Dali::Actor(Internal::Actor::GetVisiblityChangedActor().Get());
52 ChildChangedSignalType& ChildAddedSignal(Actor actor)
54 return GetImplementation(actor).ChildAddedSignal();
57 ChildChangedSignalType& ChildRemovedSignal(Actor actor)
59 return GetImplementation(actor).ChildRemovedSignal();
62 ChildOrderChangedSignalType& ChildOrderChangedSignal(Actor actor)
64 return GetImplementation(actor).ChildOrderChangedSignal();
67 Actor::TouchEventSignalType& InterceptTouchedSignal(Actor actor)
69 return GetImplementation(actor).InterceptTouchedSignal();
72 Actor::WheelEventSignalType& InterceptWheelSignal(Actor actor)
74 return GetImplementation(actor).InterceptWheelSignal();
77 void SetNeedGesturePropagation(Actor actor, bool propagation)
79 return GetImplementation(actor).SetNeedGesturePropagation(propagation);
82 void SwitchParent(Actor actor, Actor newParent)
84 return GetImplementation(actor).SwitchParent(GetImplementation(newParent));
87 Actor::TouchEventSignalType& HitTestResultSignal(Actor actor)
89 return GetImplementation(actor).HitTestResultSignal();
92 Matrix GetWorldTransform(Actor actor)
94 return CalculateActorWorldTransform(GetImplementation(actor));
97 Vector4 GetWorldColor(Actor actor)
99 return CalculateActorWorldColor(GetImplementation(actor));
102 void LookAt(Actor actor, Vector3 target, Vector3 up, Vector3 localForward, Vector3 localUp)
104 auto orientation = CalculateActorLookAtOrientation(GetImplementation(actor), target, up, localForward, localUp);
105 GetImplementation(actor).SetOrientation(orientation);
108 bool IsHittable(Actor actor)
110 return GetImplementation(actor).IsHittable();
113 bool GetTouchRequired(Actor actor)
115 return GetImplementation(actor).GetTouchRequired();
118 } // namespace DevelActor