Merge branch 'devel/master' into tizen
[platform/core/uifw/dali-core.git] / dali / internal / event / actors / actor-property-handler.h
1 #ifndef DALI_INTERNAL_ACTOR_PROPERTY_HANDLER_H
2 #define DALI_INTERNAL_ACTOR_PROPERTY_HANDLER_H
3
4 /*
5  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // INTERNAL INCLUDES
22 #include <dali/internal/event/actors/actor-impl.h>
23
24 namespace Dali
25 {
26 namespace Internal
27 {
28 /**
29  * Extracts out the property related methods from Actor
30  */
31 struct Actor::PropertyHandler
32 {
33   using PropertyBase = Dali::Internal::SceneGraph::PropertyBase;
34
35   /// @copydoc Actor::SetDefaultProperty
36   static void SetDefaultProperty(
37     Internal::Actor&       actor,
38     Property::Index        index,
39     const Property::Value& property);
40
41   /// @copydoc Actor::SetSceneGraphProperty
42   static void SetSceneGraphProperty(
43     Property::Index         index,
44     const PropertyMetadata& entry,
45     const Property::Value&  value,
46     EventThreadServices&    eventThreadServices,
47     const SceneGraph::Node& node);
48
49   /// @copydoc Actor::OnNotifyDefaultPropertyAnimation
50   static void OnNotifyDefaultPropertyAnimation(
51     Internal::Actor&       actor,
52     Animation&             animation,
53     Property::Index        index,
54     const Property::Value& value,
55     Animation::Type        animationType);
56
57   /// @copydoc Actor::GetSceneObjectAnimatableProperty
58   static const PropertyBase* GetSceneObjectAnimatableProperty(
59     Property::Index         index,
60     const SceneGraph::Node& node);
61
62   /// @copydoc Actor::GetSceneObjectInputProperty
63   static const PropertyInputImpl* GetSceneObjectInputProperty(
64     Property::Index         index,
65     const SceneGraph::Node& node);
66
67   /// @copydoc Actor::GetPropertyComponentIndex
68   static int32_t GetPropertyComponentIndex(Property::Index index);
69
70   /// @copydoc Actor::GetCachedPropertyValue
71   static bool GetCachedPropertyValue(
72     const Internal::Actor& actor,
73     Property::Index        index,
74     Property::Value&       value);
75
76   /// @copydoc Actor::GetCurrentPropertyValue
77   static bool GetCurrentPropertyValue(
78     const Internal::Actor& actor,
79     Property::Index        index,
80     Property::Value&       value);
81 };
82
83 } // namespace Internal
84
85 } // namespace Dali
86
87 #endif // DALI_INTERNAL_ACTOR_PROPERTY_HANDLER_H