X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fcontrols%2Fcontrol-depth-index-ranges.h;h=088fb7a67e836ba05ea2ecbfbb4cffbafa4f5523;hp=d010c114620b4cb83c3dd6cb4aa1abeb1fa9d7c3;hb=5827f9a9d195d4fba8da4d2adb2f0d386260f38c;hpb=a5fd3c7972dade609f0a66a3c4fca27d33ee7454 diff --git a/dali-toolkit/devel-api/controls/control-depth-index-ranges.h b/dali-toolkit/devel-api/controls/control-depth-index-ranges.h index d010c11..088fb7a 100644 --- a/dali-toolkit/devel-api/controls/control-depth-index-ranges.h +++ b/dali-toolkit/devel-api/controls/control-depth-index-ranges.h @@ -19,7 +19,8 @@ */ // EXTERNAL INCLUDES -#include +#include +#include namespace Dali { @@ -30,14 +31,29 @@ namespace Toolkit namespace DepthIndex { +// The negative value for background effect and background has been +// chosen so that newer controls can have content without setting +// depth index, and go in front of native controls with a background. +// This backround negative value means that the highest possible value +// is SIBLING_ORDER_MULTIPLIER-BACKGROUND_EFFECT-1. The divisor of +// 100 ensures the range fits within the sibling order range, and has +// enough gaps to allow Control Authors to use other intermediate depths. + enum Ranges { - BACKGROUND = -Dali::Layer::TREE_DEPTH_MULTIPLIER / 10, - CONTENT = 0, - TEXT = Dali::Layer::TREE_DEPTH_MULTIPLIER / 100, - DECORATION = Dali::Layer::TREE_DEPTH_MULTIPLIER / 10 + BACKGROUND_EFFECT = -2 * DevelLayer::SIBLING_ORDER_MULTIPLIER/100, + BACKGROUND = -1 * DevelLayer::SIBLING_ORDER_MULTIPLIER/100, + CONTENT = 0, + DECORATION = 1 * DevelLayer::SIBLING_ORDER_MULTIPLIER/100, + FOREGROUND_EFFECT = 2 * DevelLayer::SIBLING_ORDER_MULTIPLIER/100 }; +DALI_COMPILE_TIME_ASSERT( (unsigned int)DevelLayer::ACTOR_DEPTH_MULTIPLIER > (unsigned int)DevelLayer::SIBLING_ORDER_MULTIPLIER ); +DALI_COMPILE_TIME_ASSERT( BACKGROUND_EFFECT < BACKGROUND ); +DALI_COMPILE_TIME_ASSERT( BACKGROUND < CONTENT ); +DALI_COMPILE_TIME_ASSERT( CONTENT < DECORATION ); +DALI_COMPILE_TIME_ASSERT( DECORATION < FOREGROUND_EFFECT ); + } // namespace DepthIndex } // namespace Toolkit