Use internal constraints tags for internal case 37/321937/5
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 1 Apr 2025 05:31:56 +0000 (14:31 +0900)
committerEunki Hong <eunkiki.hong@samsung.com>
Tue, 8 Apr 2025 01:59:09 +0000 (01:59 +0000)
Let we define the tag rangs for toolkit/scene3d what
we will used only for internal cases.

Change-Id: Idbe646685c48b2f5efaab466ea067b052e60a698
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali-scene3d/internal/controls/panel/panel-impl.cpp
dali-scene3d/internal/controls/scene-view/scene-view-impl.cpp
dali-scene3d/internal/model-components/model-node-impl.cpp
dali-scene3d/public-api/common/scene3d-constraint-tag-ranges.h [new file with mode: 0644]
dali-scene3d/public-api/loader/shader-manager.cpp
dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl-constraints.cpp
dali-toolkit/public-api/file.list
dali-toolkit/public-api/toolkit-constraint-tag-ranges.h [new file with mode: 0644]

index 7e653e2f34bf86ca14dfd8275b86714ebab57ac8..bf3acfbcc599bbf500c90ed916afc88451884f0f 100644 (file)
@@ -24,6 +24,7 @@
 #include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali/devel-api/actors/actor-devel.h>
 #include <dali/integration-api/adaptor-framework/adaptor.h>
+#include <dali/integration-api/constraint-integ.h>
 #include <dali/public-api/math/math-utils.h>
 #include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/object/type-registry.h>
@@ -36,6 +37,7 @@
 #include <dali-scene3d/internal/light/light-impl.h>
 #include <dali-scene3d/internal/model-components/model-node-impl.h>
 #include <dali-scene3d/internal/model-components/model-node-tree-utility.h>
+#include <dali-scene3d/public-api/common/scene3d-constraint-tag-ranges.h>
 #include <dali-scene3d/public-api/controls/panel/panel.h>
 #include <dali-scene3d/public-api/loader/light-parameters.h>
 #include <dali-scene3d/public-api/loader/shader-manager.h>
@@ -68,7 +70,9 @@ DALI_TYPE_REGISTRATION_END()
 
 static constexpr Vector3 Y_DIRECTION(1.0f, -1.0f, 1.0f);
 
-constexpr int32_t PANEL_ORDER_INDEX = 90; // It should be lower value than SceneView's first RenderTask's value.
+static constexpr int32_t PANEL_ORDER_INDEX = 90; // It should be lower value than SceneView's first RenderTask's value.
+
+static constexpr uint32_t PANEL_CONSTRAINT_TAG = Dali::Scene3D::ConstraintTagRanges::SCENE3D_CONSTRAINT_TAG_START + 300;
 
 Dali::Geometry CreatePlaneGeometry(bool flip = false)
 {
@@ -395,6 +399,7 @@ void Panel::OnInitialize()
     output = output * Y_DIRECTION; });
   scaleConstraint.AddSource(Source{self, Dali::Actor::Property::SIZE});
   scaleConstraint.AddSource(Source{mPanelNode, mResolutionPropertyIndex});
+  Dali::Integration::ConstraintSetInternalTag(scaleConstraint, PANEL_CONSTRAINT_TAG);
   scaleConstraint.Apply();
 
   UpdateProperties();
index 141b3b3c8f18f020718e2d6a188e8b88a6a8e11a..ba316933ba5841487950651ef8584133cd11769e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -32,6 +32,7 @@
 #include <dali/devel-api/common/stage.h>
 #include <dali/devel-api/rendering/frame-buffer-devel.h>
 #include <dali/integration-api/adaptor-framework/adaptor.h>
+#include <dali/integration-api/constraint-integ.h>
 #include <dali/integration-api/debug.h>
 #include <dali/public-api/math/math-utils.h>
 #include <dali/public-api/object/type-registry-helper.h>
@@ -43,6 +44,7 @@
 #include <dali-scene3d/internal/controls/model/model-impl.h>
 #include <dali-scene3d/internal/graphics/builtin-shader-extern-gen.h>
 #include <dali-scene3d/internal/light/light-impl.h>
+#include <dali-scene3d/public-api/common/scene3d-constraint-tag-ranges.h>
 
 using namespace Dali;
 
@@ -81,6 +83,8 @@ static constexpr uint32_t MAXIMUM_SIZE_SHADOW_MAP = 2048;
 static constexpr int32_t SCENE_ORDER_INDEX  = 100;
 static constexpr int32_t SHADOW_ORDER_INDEX = 99;
 
+static constexpr uint32_t SCENE_VIEW_CONSTRAINT_TAG = Dali::Scene3D::ConstraintTagRanges::SCENE3D_CONSTRAINT_TAG_START + 200;
+
 static constexpr std::string_view SKYBOX_INTENSITY_STRING = "uIntensity";
 static constexpr std::string_view Y_FLIP_MASK_TEXTURE     = "uYFlipMaskTexture";
 static constexpr float            FLIP_MASK_TEXTURE       = 1.0f;
@@ -300,6 +304,7 @@ void SetShadowLightConstraint(Dali::CameraActor selectedCamera, Dali::CameraActo
   projectionMatrixConstraint.AddSource(Source{selectedCamera, Dali::CameraActor::Property::FAR_PLANE_DISTANCE});
   projectionMatrixConstraint.AddSource(Source{selectedCamera, Dali::CameraActor::Property::ASPECT_RATIO});
   projectionMatrixConstraint.AddSource(Source{shadowLightCamera, Dali::Actor::Property::WORLD_MATRIX});
+  Dali::Integration::ConstraintSetInternalTag(projectionMatrixConstraint, SCENE_VIEW_CONSTRAINT_TAG);
   projectionMatrixConstraint.ApplyPost();
 }
 
index 2d0bfbd8787483ded3f97595e05ce29f6c769324..20a2c0206ebb532defef013dde215fbf9ded4678 100644 (file)
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali-toolkit/devel-api/controls/control-devel.h>
+#include <dali/integration-api/constraint-integ.h>
 #include <dali/integration-api/debug.h>
 #include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/object/type-registry.h>
@@ -28,6 +29,7 @@
 #include <dali-scene3d/internal/controls/model/model-impl.h>
 #include <dali-scene3d/internal/light/light-impl.h>
 #include <dali-scene3d/internal/model-components/model-primitive-impl.h>
+#include <dali-scene3d/public-api/common/scene3d-constraint-tag-ranges.h>
 
 namespace Dali
 {
@@ -48,6 +50,8 @@ BaseHandle Create()
 // Setup properties, signals and actions using the type-registry.
 DALI_TYPE_REGISTRATION_BEGIN(Scene3D::ModelNode, Dali::CustomActor, Create);
 DALI_TYPE_REGISTRATION_END()
+
+static constexpr uint32_t BONE_MATRIX_CONSTRAINT_TAG = Dali::Scene3D::ConstraintTagRanges::SCENE3D_CONSTRAINT_TAG_START + 110;
 } // unnamed namespace
 
 Dali::Scene3D::ModelNode ModelNode::New()
@@ -444,6 +448,7 @@ void ModelNode::UpdateBoneMatrix(Scene3D::ModelPrimitive primitive)
 
     Actor joint = Self();
     boneData.constraint.AddSource(Source{joint, Actor::Property::WORLD_MATRIX});
+    Dali::Integration::ConstraintSetInternalTag(boneData.constraint, BONE_MATRIX_CONSTRAINT_TAG);
     boneData.constraint.ApplyPost();
     break;
   }
diff --git a/dali-scene3d/public-api/common/scene3d-constraint-tag-ranges.h b/dali-scene3d/public-api/common/scene3d-constraint-tag-ranges.h
new file mode 100644 (file)
index 0000000..3170854
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef DALI_SCENE3D_SCENE_CONSTRAINT_TAG_RANGES_H
+#define DALI_SCENE3D_SCENE_CONSTRAINT_TAG_RANGES_H
+
+/*
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <dali/public-api/animation/constraint-tag-ranges.h>
+
+namespace Dali::Scene3D
+{
+/**
+ * @brief Enumeration for the start and end property ranges.
+ * @SINCE_2_4.13
+ */
+enum ConstraintTagRanges
+{
+  SCENE3D_CONSTRAINT_TAG_START = Dali::ConstraintTagRanges::CORE_CONSTRAINT_TAG_MAX + 1u + (Dali::ConstraintTagRanges::INTERNAL_TAG_MAX_COUNT_PER_DERIVATION)*2,
+  SCENE3D_CONSTRAINT_TAG_END   = SCENE3D_CONSTRAINT_TAG_START + Dali::ConstraintTagRanges::INTERNAL_TAG_MAX_COUNT_PER_DERIVATION,
+};
+} // namespace Dali::Scene3D
+
+#endif // DALI_SCENE3D_SCENE_CONSTRAINT_TAG_RANGES_H
index 57d112a851b4a3f79edc7934908eaa3b9d782a53..9f0dabb0108c26a4b6e21ea5a3163c7bf6f9d0d9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 // EXTERNAL INCLUDES
 #include <dali/devel-api/common/map-wrapper.h>
+#include <dali/integration-api/constraint-integ.h>
 #include <dali/public-api/animation/constraint.h>
 #include <cstring>
 
 // INTERNAL INCLUDES
 #include <dali-scene3d/internal/light/light-impl.h>
 #include <dali-scene3d/internal/loader/hash.h>
+#include <dali-scene3d/public-api/common/scene3d-constraint-tag-ranges.h>
 #include <dali-scene3d/public-api/loader/blend-shape-details.h>
 #include <dali-scene3d/public-api/loader/node-definition.h>
 
@@ -42,8 +44,8 @@ namespace Dali::Scene3D::Loader
 {
 namespace
 {
-static constexpr uint32_t INDEX_FOR_LIGHT_CONSTRAINT_TAG  = 10;
-static constexpr uint32_t INDEX_FOR_SHADOW_CONSTRAINT_TAG = 100;
+static constexpr uint32_t INDEX_FOR_LIGHT_CONSTRAINT_TAG  = Dali::Scene3D::ConstraintTagRanges::SCENE3D_CONSTRAINT_TAG_START + 10;
+static constexpr uint32_t INDEX_FOR_SHADOW_CONSTRAINT_TAG = Dali::Scene3D::ConstraintTagRanges::SCENE3D_CONSTRAINT_TAG_START + 100;
 
 constexpr uint32_t MINIMUM_SHADER_VERSION_SUPPORT_TEXTURE_TEXEL_AND_SIZE = 300;
 
@@ -359,7 +361,7 @@ void ShaderManager::RemoveShadow()
   {
     std::string shadowEnabledPropertyName(Scene3D::Internal::Light::GetShadowEnabledUniformName());
     shader.RegisterProperty(shadowEnabledPropertyName, static_cast<int32_t>(false));
-    shader.RemoveConstraints(INDEX_FOR_SHADOW_CONSTRAINT_TAG);
+    Dali::Integration::HandleRemoveConstraints(shader, INDEX_FOR_SHADOW_CONSTRAINT_TAG);
   }
   mImpl->mShadowLight.Reset();
 }
@@ -392,23 +394,23 @@ void ShaderManager::SetLightConstraintToShader(uint32_t lightIndex, Dali::Shader
   auto             lightDirectionPropertyIndex = shader.RegisterProperty(lightDirectionPropertyName, Vector3::ZAXIS);
   Dali::Constraint lightDirectionConstraint    = Dali::Constraint::New<Vector3>(shader, lightDirectionPropertyIndex, [](Vector3& output, const PropertyInputContainer& inputs) { output = inputs[0]->GetQuaternion().Rotate(Vector3::ZAXIS); });
   lightDirectionConstraint.AddSource(Source{mImpl->mLights[lightIndex], Dali::Actor::Property::WORLD_ORIENTATION});
+  Dali::Integration::ConstraintSetInternalTag(lightDirectionConstraint, INDEX_FOR_LIGHT_CONSTRAINT_TAG + lightIndex);
   lightDirectionConstraint.ApplyPost();
-  lightDirectionConstraint.SetTag(INDEX_FOR_LIGHT_CONSTRAINT_TAG + lightIndex);
 
   std::string lightColorPropertyName(Scene3D::Internal::Light::GetLightColorUniformName());
   lightColorPropertyName += "[" + std::to_string(lightIndex) + "]";
   auto             lightColorPropertyIndex = shader.RegisterProperty(lightColorPropertyName, Vector3(Color::WHITE));
   Dali::Constraint lightColorConstraint    = Dali::Constraint::New<Vector3>(shader, lightColorPropertyIndex, [](Vector3& output, const PropertyInputContainer& inputs) { output = Vector3(inputs[0]->GetVector4()); });
   lightColorConstraint.AddSource(Source{mImpl->mLights[lightIndex], Dali::Actor::Property::COLOR});
+  Dali::Integration::ConstraintSetInternalTag(lightColorConstraint, INDEX_FOR_LIGHT_CONSTRAINT_TAG + lightIndex);
   lightColorConstraint.ApplyPost();
-  lightColorConstraint.SetTag(INDEX_FOR_LIGHT_CONSTRAINT_TAG + lightIndex);
 }
 
 void ShaderManager::RemoveLightConstraint(uint32_t lightIndex)
 {
   for(auto&& shader : mImpl->mShaders)
   {
-    shader.RemoveConstraints(INDEX_FOR_LIGHT_CONSTRAINT_TAG + lightIndex);
+    Dali::Integration::HandleRemoveConstraints(shader, INDEX_FOR_LIGHT_CONSTRAINT_TAG + lightIndex);
   }
 }
 
@@ -455,8 +457,8 @@ void ShaderManager::SetShadowConstraintToShader(Dali::Shader shader)
   }
   Dali::Constraint shadowViewProjectionConstraint = Dali::Constraint::New<Matrix>(shader, shadowViewProjectionPropertyIndex, [](Matrix& output, const PropertyInputContainer& inputs) { output = inputs[0]->GetMatrix(); });
   shadowViewProjectionConstraint.AddSource(Source{shadowLightCamera, tempViewProjectionMatrixIndex});
+  Dali::Integration::ConstraintSetInternalTag(shadowViewProjectionConstraint, INDEX_FOR_SHADOW_CONSTRAINT_TAG);
   shadowViewProjectionConstraint.ApplyPost();
-  shadowViewProjectionConstraint.SetTag(INDEX_FOR_SHADOW_CONSTRAINT_TAG);
 }
 
 } // namespace Dali::Scene3D::Loader
index dc0f6ff7a65def2690911115b3d65b7c50807a52..9c407be997923f728c8a08a060ef677f63568c09 100644 (file)
@@ -22,6 +22,7 @@
 #include <dali/devel-api/actors/actor-devel.h>
 #include <dali/devel-api/common/stage.h>
 #include <dali/devel-api/object/property-helper-devel.h>
+#include <dali/integration-api/constraint-integ.h>
 #include <dali/public-api/actors/layer.h>
 #include <dali/public-api/animation/constraint.h>
 #include <dali/public-api/animation/constraints.h>
@@ -41,6 +42,7 @@
 #include <dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout-property.h>
 #include <dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout.h>
 #include <dali-toolkit/public-api/controls/scrollable/item-view/item-factory.h>
+#include <dali-toolkit/public-api/toolkit-constraint-tag-ranges.h>
 
 using std::string;
 using namespace Dali;
@@ -65,7 +67,8 @@ const float   OVERSHOOT_BOUNCE_ACTOR_RESIZE_THRESHOLD = 180.0f;
 const Vector4 OVERSHOOT_OVERLAY_NINE_PATCH_BORDER(0.0f, 0.0f, 1.0f, 12.0f);
 const float   DEFAULT_KEYBOARD_FOCUS_SCROLL_DURATION = 0.2f;
 
-const unsigned int OVERSHOOT_SIZE_CONSTRAINT_TAG(42);
+static constexpr uint32_t ITEM_VIEW_CONSTRAINT_TAG(Dali::Toolkit::ConstraintTagRanges::TOOLKIT_CONSTRAINT_TAG_START + 41);
+static constexpr uint32_t OVERSHOOT_SIZE_CONSTRAINT_TAG(Dali::Toolkit::ConstraintTagRanges::TOOLKIT_CONSTRAINT_TAG_START + 42);
 
 /**
  * Local helper to convert pan distance (in actor coordinates) to the layout-specific scrolling direction
@@ -298,7 +301,7 @@ void ApplyOvershootSizeConstraint(Actor overshootOverlay, float height)
   constraint.AddSource(ParentSource(Dali::Toolkit::ItemView::Property::SCROLL_DIRECTION));
   constraint.AddSource(ParentSource(Dali::Toolkit::ItemView::Property::LAYOUT_ORIENTATION));
   constraint.AddSource(ParentSource(Dali::Actor::Property::SIZE));
-  constraint.SetTag(OVERSHOOT_SIZE_CONSTRAINT_TAG);
+  Dali::Integration::ConstraintSetInternalTag(constraint, OVERSHOOT_SIZE_CONSTRAINT_TAG);
   constraint.Apply();
 }
 
@@ -1555,7 +1558,8 @@ void ItemView::SetOvershootSize(const Vector2& size)
   if(mOvershootOverlay)
   {
     // Remove old & add new size constraint
-    mOvershootOverlay.RemoveConstraints(OVERSHOOT_SIZE_CONSTRAINT_TAG);
+    Dali::Integration::HandleRemoveConstraints(mOvershootOverlay, OVERSHOOT_SIZE_CONSTRAINT_TAG);
+
     ApplyOvershootSizeConstraint(mOvershootOverlay, mOvershootSize.height);
   }
 }
@@ -1590,6 +1594,7 @@ void ItemView::EnableScrollOvershoot(bool enable)
       constraint.AddSource(ParentSource(Toolkit::ItemView::Property::SCROLL_DIRECTION));
       constraint.AddSource(ParentSource(Toolkit::ItemView::Property::LAYOUT_ORIENTATION));
       constraint.AddSource(ParentSource(Toolkit::ItemView::Property::OVERSHOOT));
+      Dali::Integration::ConstraintSetInternalTag(constraint, ITEM_VIEW_CONSTRAINT_TAG);
       constraint.Apply();
 
       constraint = Constraint::New<Vector3>(mOvershootOverlay, Actor::Property::POSITION, OvershootOverlayPositionConstraint);
@@ -1597,14 +1602,17 @@ void ItemView::EnableScrollOvershoot(bool enable)
       constraint.AddSource(ParentSource(Toolkit::ItemView::Property::SCROLL_DIRECTION));
       constraint.AddSource(ParentSource(Toolkit::ItemView::Property::LAYOUT_ORIENTATION));
       constraint.AddSource(ParentSource(Toolkit::ItemView::Property::OVERSHOOT));
+      Dali::Integration::ConstraintSetInternalTag(constraint, ITEM_VIEW_CONSTRAINT_TAG);
       constraint.Apply();
 
       constraint = Constraint::New<bool>(mOvershootOverlay, Actor::Property::VISIBLE, OvershootOverlayVisibilityConstraint);
       constraint.AddSource(ParentSource(Toolkit::Scrollable::Property::CAN_SCROLL_VERTICAL));
+      Dali::Integration::ConstraintSetInternalTag(constraint, ITEM_VIEW_CONSTRAINT_TAG);
       constraint.Apply();
 
       constraint = Constraint::New<float>(mOvershootOverlay, effectOvershootPropertyIndex, EqualToConstraint());
       constraint.AddSource(ParentSource(Toolkit::ItemView::Property::OVERSHOOT));
+      Dali::Integration::ConstraintSetInternalTag(constraint, ITEM_VIEW_CONSTRAINT_TAG);
       constraint.Apply();
     }
   }
index 24827dd3e9687f068522ed82b77871df6665b8ea..2181604083c575170765539ca468f8c0772257cb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 // CLASS HEADER
 #include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl-constraints.h>
 
+// EXTERNAL INCLUDES
+#include <dali/integration-api/constraint-integ.h>
+
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-constraints.h>
 #include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h>
+#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-constraints.h>
+#include <dali-toolkit/public-api/toolkit-constraint-tag-ranges.h>
 
 namespace Dali
 {
@@ -30,6 +34,7 @@ namespace Internal
 {
 namespace
 {
+static constexpr uint32_t SCROLL_VIEW_CONSTRAINT_TAG(Dali::Toolkit::ConstraintTagRanges::TOOLKIT_CONSTRAINT_TAG_START + 40);
 
 float FinalDefaultAlphaFunction(float offset)
 {
@@ -433,6 +438,7 @@ void ScrollViewConstraints::UpdateMainInternalConstraint(ScrollView& scrollView)
     mScrollMainInternalPrePositionConstraint.AddSource(Source(detector, PanGestureDetector::Property::LOCAL_POSITION));
     mScrollMainInternalPrePositionConstraint.AddSource(Source(detector, PanGestureDetector::Property::PANNING));
     mScrollMainInternalPrePositionConstraint.AddSource(Source(scrollViewActor, Actor::Property::SIZE));
+    Dali::Integration::ConstraintSetInternalTag(mScrollMainInternalPrePositionConstraint, SCROLL_VIEW_CONSTRAINT_TAG);
     mScrollMainInternalPrePositionConstraint.Apply();
   }
 
@@ -446,17 +452,20 @@ void ScrollViewConstraints::UpdateMainInternalConstraint(ScrollView& scrollView)
   mScrollMainInternalPositionConstraint.AddSource(LocalSource(Toolkit::Scrollable::Property::SCROLL_POSITION_MIN));
   mScrollMainInternalPositionConstraint.AddSource(LocalSource(Toolkit::Scrollable::Property::SCROLL_POSITION_MAX));
   mScrollMainInternalPositionConstraint.AddSource(Source(scrollViewActor, Actor::Property::SIZE));
+  Dali::Integration::ConstraintSetInternalTag(mScrollMainInternalPositionConstraint, SCROLL_VIEW_CONSTRAINT_TAG);
   mScrollMainInternalPositionConstraint.Apply();
 
   mScrollMainInternalDeltaConstraint = Constraint::New<Vector2>(scrollViewActor, Toolkit::ScrollView::Property::SCROLL_POSITION_DELTA, InternalPositionDeltaConstraint);
   mScrollMainInternalDeltaConstraint.AddSource(LocalSource(Toolkit::ScrollView::Property::SCROLL_POSITION));
   mScrollMainInternalDeltaConstraint.AddSource(LocalSource(Toolkit::ScrollView::Property::SCROLL_DOMAIN_OFFSET));
+  Dali::Integration::ConstraintSetInternalTag(mScrollMainInternalDeltaConstraint, SCROLL_VIEW_CONSTRAINT_TAG);
   mScrollMainInternalDeltaConstraint.Apply();
 
   mScrollMainInternalFinalConstraint = Constraint::New<Vector2>(scrollViewActor, Toolkit::ScrollView::Property::SCROLL_FINAL, InternalFinalConstraint(FinalDefaultAlphaFunction, FinalDefaultAlphaFunction));
   mScrollMainInternalFinalConstraint.AddSource(LocalSource(Toolkit::ScrollView::Property::SCROLL_POSITION));
   mScrollMainInternalFinalConstraint.AddSource(LocalSource(Toolkit::ScrollView::Property::OVERSHOOT_X));
   mScrollMainInternalFinalConstraint.AddSource(LocalSource(Toolkit::ScrollView::Property::OVERSHOOT_Y));
+  Dali::Integration::ConstraintSetInternalTag(mScrollMainInternalFinalConstraint, SCROLL_VIEW_CONSTRAINT_TAG);
   mScrollMainInternalFinalConstraint.Apply();
 
   mScrollMainInternalRelativeConstraint = Constraint::New<Vector2>(scrollViewActor, Toolkit::Scrollable::Property::SCROLL_RELATIVE_POSITION, InternalRelativePositionConstraint);
@@ -464,17 +473,20 @@ void ScrollViewConstraints::UpdateMainInternalConstraint(ScrollView& scrollView)
   mScrollMainInternalRelativeConstraint.AddSource(LocalSource(Toolkit::Scrollable::Property::SCROLL_POSITION_MIN));
   mScrollMainInternalRelativeConstraint.AddSource(LocalSource(Toolkit::Scrollable::Property::SCROLL_POSITION_MAX));
   mScrollMainInternalRelativeConstraint.AddSource(LocalSource(Actor::Property::SIZE));
+  Dali::Integration::ConstraintSetInternalTag(mScrollMainInternalRelativeConstraint, SCROLL_VIEW_CONSTRAINT_TAG);
   mScrollMainInternalRelativeConstraint.Apply();
 
   mScrollMainInternalDomainConstraint = Constraint::New<Vector2>(scrollViewActor, Toolkit::ScrollView::Property::SCROLL_DOMAIN_SIZE, InternalScrollDomainConstraint);
   mScrollMainInternalDomainConstraint.AddSource(LocalSource(Toolkit::Scrollable::Property::SCROLL_POSITION_MIN));
   mScrollMainInternalDomainConstraint.AddSource(LocalSource(Toolkit::Scrollable::Property::SCROLL_POSITION_MAX));
   mScrollMainInternalDomainConstraint.AddSource(LocalSource(Actor::Property::SIZE));
+  Dali::Integration::ConstraintSetInternalTag(mScrollMainInternalDomainConstraint, SCROLL_VIEW_CONSTRAINT_TAG);
   mScrollMainInternalDomainConstraint.Apply();
 
   mScrollMainInternalPrePositionMaxConstraint = Constraint::New<Vector2>(scrollViewActor, Toolkit::ScrollView::Property::SCROLL_PRE_POSITION_MAX, InternalPrePositionMaxConstraint);
   mScrollMainInternalPrePositionMaxConstraint.AddSource(LocalSource(Toolkit::Scrollable::Property::SCROLL_POSITION_MAX));
   mScrollMainInternalPrePositionMaxConstraint.AddSource(LocalSource(Actor::Property::SIZE));
+  Dali::Integration::ConstraintSetInternalTag(mScrollMainInternalPrePositionMaxConstraint, SCROLL_VIEW_CONSTRAINT_TAG);
   mScrollMainInternalPrePositionMaxConstraint.Apply();
 
   // When panning we want to make sure overshoot values are affected by pre position and post position
@@ -498,12 +510,14 @@ void ScrollViewConstraints::SetOvershootConstraintsEnabled(ScrollView& scrollVie
     mScrollMainInternalOvershootXConstraint.AddSource(LocalSource(Toolkit::ScrollView::Property::SCROLL_PRE_POSITION));
     mScrollMainInternalOvershootXConstraint.AddSource(LocalSource(Toolkit::ScrollView::Property::SCROLL_POSITION));
     mScrollMainInternalOvershootXConstraint.AddSource(LocalSource(Toolkit::Scrollable::Property::CAN_SCROLL_HORIZONTAL));
+    Dali::Integration::ConstraintSetInternalTag(mScrollMainInternalOvershootXConstraint, SCROLL_VIEW_CONSTRAINT_TAG);
     mScrollMainInternalOvershootXConstraint.Apply();
 
     mScrollMainInternalOvershootYConstraint = Constraint::New<float>(scrollViewActor, Toolkit::ScrollView::Property::OVERSHOOT_Y, OvershootYConstraint(scrollView.mMaxOvershoot.y));
     mScrollMainInternalOvershootYConstraint.AddSource(LocalSource(Toolkit::ScrollView::Property::SCROLL_PRE_POSITION));
     mScrollMainInternalOvershootYConstraint.AddSource(LocalSource(Toolkit::ScrollView::Property::SCROLL_POSITION));
     mScrollMainInternalOvershootYConstraint.AddSource(LocalSource(Toolkit::Scrollable::Property::CAN_SCROLL_VERTICAL));
+    Dali::Integration::ConstraintSetInternalTag(mScrollMainInternalOvershootYConstraint, SCROLL_VIEW_CONSTRAINT_TAG);
     mScrollMainInternalOvershootYConstraint.Apply();
   }
   else
@@ -530,6 +544,7 @@ void ScrollViewConstraints::SetInternalConstraints(ScrollView& scrollView)
   constraint = Constraint::New<Vector3>(scrollViewActor, Actor::Property::POSITION, MoveActorConstraint);
   constraint.AddSource(Source(scrollViewActor, Toolkit::ScrollView::Property::SCROLL_POSITION));
   constraint.SetRemoveAction(Constraint::DISCARD);
+  Dali::Integration::ConstraintSetInternalTag(constraint, SCROLL_VIEW_CONSTRAINT_TAG);
   scrollView.ApplyConstraintToBoundActors(constraint);
 
   // WrapActor (wrap functionality)
@@ -541,10 +556,10 @@ void ScrollViewConstraints::SetInternalConstraints(ScrollView& scrollView)
   constraint.AddSource(Source(scrollViewActor, Toolkit::Scrollable::Property::SCROLL_POSITION_MAX));
   constraint.AddSource(Source(scrollViewActor, Toolkit::ScrollView::Property::WRAP));
   constraint.SetRemoveAction(Constraint::DISCARD);
+  Dali::Integration::ConstraintSetInternalTag(constraint, SCROLL_VIEW_CONSTRAINT_TAG);
   scrollView.ApplyConstraintToBoundActors(constraint);
 }
 
-
 } // namespace Internal
 
 } // namespace Toolkit
index 951ad525f5cc2f45dcb06ad162a8539912f967b2..9665ce99026f22c93efd9048014ef252b935f84b 100644 (file)
@@ -59,6 +59,7 @@ SET( public_api_header_files
   ${public_api_src_dir}/dali-toolkit-common.h
   ${public_api_src_dir}/enums.h
   ${public_api_src_dir}/align-enumerations.h
+  ${public_api_src_dir}/toolkit-constraint-tag-ranges.h
   ${public_api_src_dir}/toolkit-property-index-ranges.h
 )
 
diff --git a/dali-toolkit/public-api/toolkit-constraint-tag-ranges.h b/dali-toolkit/public-api/toolkit-constraint-tag-ranges.h
new file mode 100644 (file)
index 0000000..ac558a6
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef DALI_DEVEL_TOOLKIT_PROPERTY_INDEX_RANGES_H
+#define DALI_DEVEL_TOOLKIT_PROPERTY_INDEX_RANGES_H
+
+/*
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <dali/public-api/animation/constraint-tag-ranges.h>
+
+namespace Dali::Toolkit
+{
+/**
+ * @brief Enumeration for the start and end property ranges.
+ * @SINCE_2_4.13
+ */
+enum ConstraintTagRanges
+{
+  TOOLKIT_CONSTRAINT_TAG_START = Dali::ConstraintTagRanges::CORE_CONSTRAINT_TAG_MAX + 1u + Dali::ConstraintTagRanges::INTERNAL_TAG_MAX_COUNT_PER_DERIVATION,
+  TOOLKIT_CONSTRAINT_TAG_END   = TOOLKIT_CONSTRAINT_TAG_START + Dali::ConstraintTagRanges::INTERNAL_TAG_MAX_COUNT_PER_DERIVATION,
+};
+
+} // namespace Dali::Toolkit
+
+#endif // DALI_DEVEL_TOOLKIT_PROPERTY_INDEX_RANGES_H