[NUI] Add ManualRendered to TextLabel
authorBowon Ryu <bowon.ryu@samsung.com>
Fri, 12 Jul 2024 05:03:31 +0000 (14:03 +0900)
committerJiyun Yang <ji.yang@samsung.com>
Wed, 21 Aug 2024 06:10:37 +0000 (15:10 +0900)
Whether the last async rendering result is a manual render.
If it's false, the render result was automatically requested by OnRelayout.

Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
src/Tizen.NUI/src/internal/Interop/Interop.TextLabel.cs
src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs

index bbb09ebdcbf0511e278126775e4e7b4871218890..6a7ec9adba9bce5762ea5acaf069eaa7d005ffce 100755 (executable)
@@ -196,6 +196,9 @@ namespace Tizen.NUI
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_Property_RENDER_MODE_get")]
             public static extern int RenderModeGet();
 
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_Property_MANUAL_RENDERED_get")]
+            public static extern int ManualRenderedGet();
+
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_RequestAsyncRenderWithFixedSize")]
             public static extern void RequestAsyncRenderWithFixedSize(global::System.Runtime.InteropServices.HandleRef textLabelRef, float width, float height);
 
index 16c0022a91496145d712f48cecd02f442f02ee2f..47c9f08861bb559a596eb25c76e5bb4f0a185099 100755 (executable)
@@ -2603,6 +2603,23 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
+        /// <summary>
+        /// Whether the last async rendering result is a manual render. <br />
+        /// If it's false, the render result was automatically requested by OnRelayout.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool ManualRendered
+        {
+            get
+            {
+                bool manualRendered = false;
+                using (var propertyValue = GetProperty(TextLabel.Property.ManualRendered))
+                {
+                    propertyValue.Get(out manualRendered);
+                }
+                return manualRendered;
+            }
+        }
 
         private TextLabelSelectorData EnsureSelectorData() => selectorData ?? (selectorData = new TextLabelSelectorData());
 
@@ -2831,6 +2848,7 @@ namespace Tizen.NUI.BaseComponents
             internal static readonly int RemoveBackInset = Interop.TextLabel.RemoveBackInsetGet();
             internal static readonly int Cutout = Interop.TextLabel.CutoutGet();
             internal static readonly int RenderMode = Interop.TextLabel.RenderModeGet();
+            internal static readonly int ManualRendered = Interop.TextLabel.ManualRenderedGet();
 
 
             internal static void Preload()