1 #ifndef DALI_TOOLKIT_DEVEL_CONTROL_DEPTH_INDEX_RANGES_H
2 #define DALI_TOOLKIT_DEVEL_CONTROL_DEPTH_INDEX_RANGES_H
5 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/devel-api/actors/layer-devel.h>
30 // The negative value for background effect and background has been
31 // chosen so that newer controls can have content without setting
32 // depth index, and go in front of native controls with a background.
33 // This backround negative value means that the highest possible value
34 // is SIBLING_ORDER_MULTIPLIER-BACKGROUND_EFFECT-1. The divisor of
35 // 100 ensures the range fits within the sibling order range, and has
36 // enough gaps to allow Control Authors to use other intermediate depths.
40 BACKGROUND_EFFECT = -2 * DevelLayer::SIBLING_ORDER_MULTIPLIER / 100,
41 BACKGROUND = -1 * DevelLayer::SIBLING_ORDER_MULTIPLIER / 100,
43 DECORATION = 1 * DevelLayer::SIBLING_ORDER_MULTIPLIER / 100,
44 FOREGROUND_EFFECT = 2 * DevelLayer::SIBLING_ORDER_MULTIPLIER / 100
47 static_assert((unsigned int)DevelLayer::ACTOR_DEPTH_MULTIPLIER > (unsigned int)DevelLayer::SIBLING_ORDER_MULTIPLIER);
48 static_assert(BACKGROUND_EFFECT < BACKGROUND);
49 static_assert(BACKGROUND < CONTENT);
50 static_assert(CONTENT < DECORATION);
51 static_assert(DECORATION < FOREGROUND_EFFECT);
53 } // namespace DepthIndex
55 } // namespace Toolkit
59 #endif // DALI_TOOLKIT_DEVEL_CONTROL_DEPTH_INDEX_RANGES_H