From: Eunki, Hong Date: Thu, 8 Sep 2022 13:14:00 +0000 (+0900) Subject: [NUI.Scene3D] Add private property ChildrenSensitive X-Git-Tag: submit/tizen/20221004.113029~1^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=96091c708ec7f8b03d1a0055784616a377ece1f3;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI.Scene3D] Add private property ChildrenSensitive NUI.Scene3D.Model don't have any method to access it's children nodes. So, it will be always false now. Signed-off-by: Eunki, Hong --- diff --git a/src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.Model.cs b/src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.Model.cs index fbb27d70e..5226175b0 100755 --- a/src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.Model.cs +++ b/src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.Model.cs @@ -42,6 +42,13 @@ namespace Tizen.NUI.Scene3D [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_Model_GetModelRoot")] public static extern global::System.IntPtr GetModelRoot(global::System.Runtime.InteropServices.HandleRef model); + [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_Model_SetChildrenSensitive")] + public static extern void SetChildrenSensitive(global::System.Runtime.InteropServices.HandleRef model, bool enable); + + [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_Model_GetChildrenSensitive")] + [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)] + public static extern bool GetChildrenSensitive(global::System.Runtime.InteropServices.HandleRef model); + [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_Model_SetImageBasedLightSource")] public static extern global::System.IntPtr SetImageBasedLightSource(global::System.Runtime.InteropServices.HandleRef model, string diffuse, string specular, float scaleFactor); diff --git a/src/Tizen.NUI.Scene3D/src/public/Controls/Model.cs b/src/Tizen.NUI.Scene3D/src/public/Controls/Model.cs index 2ff3a0ba9..413a05fcb 100755 --- a/src/Tizen.NUI.Scene3D/src/public/Controls/Model.cs +++ b/src/Tizen.NUI.Scene3D/src/public/Controls/Model.cs @@ -78,6 +78,9 @@ namespace Tizen.NUI.Scene3D { internal Model(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn) { + // Currenly, Model don't have API to access it's child. So, we make it false. + this.ChildrenSensitive = false; + this.FocusableChildren = false; } /// @@ -121,6 +124,30 @@ namespace Tizen.NUI.Scene3D } /// + /// Set/Get whether allow this model's children allow to use touch events. + /// This property doesn't change Model itself's Sensitive info. + /// If this property is true, event can traversal this models children. + /// If this property is false, event traversal blocked. + /// Default is false. + /// + /// + /// If ChildrenSensitive is true, it could decrease performance but we can connect events into it's children. + /// If ChildrenSensitive is false, the performance becomes better but we cannot connect events into it's children. + /// + /// Currenly, Model don't have API to access it's child. So, we make it as private. + /// + private bool ChildrenSensitive + { + set + { + SetChildrenSensitive(value); + } + get + { + return GetChildrenSensitive(); + } + } + /// Set/Get the ImageBasedLight ScaleFactor. /// Scale factor controls light source intensity in [0.0f, 1.0f] /// @@ -213,6 +240,19 @@ namespace Tizen.NUI.Scene3D return ret; } + internal void SetChildrenSensitive(bool enable) + { + Interop.Model.SetChildrenSensitive(SwigCPtr, enable); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal bool GetChildrenSensitive() + { + bool result = Interop.Model.GetChildrenSensitive(SwigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return result; + } + /// /// Set the ImageBasedLight ScaleFactor. ///