1 #ifndef DALI_INTERNAL_ACTOR_SIBLINGS_H
2 #define DALI_INTERNAL_ACTOR_SIBLINGS_H
4 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use actor file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 #include <dali/internal/event/actors/actor-impl.h>
27 struct Actor::SiblingHandler
30 * @brief Change the sibling order of the given actor.
32 * @param[in,out] siblings The container of siblings
33 * @param[in] actor The actor to change
34 * @param[in] order The new order for the actor
35 * @return true if order has been modified
37 static bool SetSiblingOrder( ActorContainer& siblings, Actor& actor, uint32_t order );
40 * @brief Get the sibling order of the given actor.
42 * @param[in] siblings The container of siblings
43 * @param[in] actor The actor to query
44 * @return the order in the sibling array of the actor
46 static uint32_t GetSiblingOrder(const ActorContainer& siblings, const Actor& actor);
49 * @brief Raise the actor within the siblings list by one
50 * @param[in,out] siblings The container of siblings
51 * @param[in] actor The actor to move
52 * @return true if order has been modified
54 static bool Raise(ActorContainer& siblings, Actor& actor);
57 * @brief Lower the actor within the siblings list by one
58 * @param[in,out] siblings The container of siblings
59 * @param[in] actor The actor to move
60 * @return true if order has been modified
62 static bool Lower(ActorContainer& siblings, Actor& actor);
65 * @brief Raise the actor to the top of the siblings list.
67 * @param[in,out] siblings The container of siblings
68 * @param[in] actor The actor to move
69 * @return true if order has been modified
71 static bool RaiseToTop(ActorContainer& siblings, Actor& actor);
74 * @brief Lower the actor to the bottom of the siblings list.
76 * @param[in,out] siblings The container of siblings
77 * @param[in] actor The actor to move
78 * @return true if order has been modified
80 static bool LowerToBottom(ActorContainer& siblings, Actor& actor);
83 * @brief Raise the actor above the target actor within the siblings list.
85 * @param[in,out] siblings The container of siblings
86 * @param[in] actor The actor to move
87 * @param[in] target The target actor
88 * @return true if order has been modified
90 static bool RaiseAbove(ActorContainer& siblings, Actor& actor, Actor& target);
93 * @brief Lower the actor below the target actor within the siblings list.
95 * @param[in,out] siblings The container of siblings
96 * @param[in] actor The actor to move
97 * @param[in] target The target actor
98 * @return true if order has been modified
100 static bool LowerBelow(ActorContainer& siblings, Actor& actor, Actor& target);
103 } // namespace Internal