Merge remote-tracking branch 'origin/API11' into tizen_8.0
authorTizenAPI-Bot <tizenapi@samsung.com>
Tue, 5 Dec 2023 06:46:09 +0000 (06:46 +0000)
committerTizenAPI-Bot <tizenapi@samsung.com>
Tue, 5 Dec 2023 06:46:09 +0000 (06:46 +0000)
17 files changed:
src/Tizen.NUI.Components/Controls/RecyclerView/ItemSource/MarshalingObservableCollection.cs
src/Tizen.NUI.Components/Controls/RecyclerView/ItemSource/ObservableGroupedSource.cs
src/Tizen.NUI.Components/Controls/RecyclerView/ItemSource/ObservableItemSource.cs
src/Tizen.NUI.Physics2D/src/internal/chipmunk/NativeInterop.cs
src/Tizen.NUI.Physics2D/src/internal/chipmunk/cpSpaceDebugDrawOptions.cs
src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.Model.cs
src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.ModelNode.cs
src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.MotionData.cs
src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.SceneView.cs
src/Tizen.NUI.Scene3D/src/public/Controls/Model.cs
src/Tizen.NUI.Scene3D/src/public/Controls/SceneView.cs
src/Tizen.NUI.Scene3D/src/public/ModelComponents/ModelNode.cs
src/Tizen.NUI.Scene3D/src/public/ModelMotion/MotionData.cs
src/Tizen.NUI/src/public/BaseComponents/DirectRenderingGLView.cs
src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs
src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothDevice.cs
src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothStructs.cs

index 92dc48f..44074d8 100755 (executable)
@@ -110,7 +110,7 @@ namespace Tizen.NUI.Components
 
         void Move(NotifyCollectionChangedEventArgs args)
         {
-            var count = args.OldItems.Count;
+            int count = args.OldItems?.Count ?? 0;
 
             for (int n = 0; n < count; n++)
             {
@@ -124,7 +124,8 @@ namespace Tizen.NUI.Components
 
         void Remove(NotifyCollectionChangedEventArgs args)
         {
-            var startIndex = args.OldStartingIndex + args.OldItems.Count - 1;
+            int count=args.OldItems?.Count ?? 0;
+            int startIndex = args.OldStartingIndex + count - 1;
             for (int n = startIndex; n >= args.OldStartingIndex; n--)
             {
                 RemoveAt(n);
index a0247d5..9357843 100755 (executable)
@@ -337,7 +337,7 @@ namespace Tizen.NUI.Components
             }
 
             // If we have a start index, we can be more clever about removing the group(s) (and get the nifty animations)
-            var groupCount = args.OldItems.Count;
+            int groupCount = args.OldItems?.Count ?? 0;
 
             var absolutePosition = GetAbsolutePosition(groups[groupIndex], 0);
 
@@ -360,9 +360,15 @@ namespace Tizen.NUI.Components
 
         void Replace(NotifyCollectionChangedEventArgs args)
         {
-            var groupCount = args.NewItems.Count;
-
-            if (groupCount != args.OldItems.Count)
+            var newItems = args.NewItems;
+            var oldItems = args.OldItems;
+            if(newItems == null || oldItems == null)
+            {
+                return;
+            }       
+            int groupCount = newItems.Count;
+            int oldCount = oldItems.Count;
+            if (groupCount != oldCount)
             {
                 // The original and replacement sets are of unequal size; this means that most everything currently in 
                 // view will have to be updated. So just reload the whole thing.
@@ -370,8 +376,8 @@ namespace Tizen.NUI.Components
                 return;
             }
 
-            var newStartIndex = args.NewStartingIndex > -1 ? args.NewStartingIndex : groupSource.IndexOf(args.NewItems[0]);
-            var oldStartIndex = args.OldStartingIndex > -1 ? args.OldStartingIndex : groupSource.IndexOf(args.OldItems[0]);
+            var newStartIndex = args.NewStartingIndex > -1 ? args.NewStartingIndex : groupSource.IndexOf(newItems[0]);
+            var oldStartIndex = args.OldStartingIndex > -1 ? args.OldStartingIndex : groupSource.IndexOf(oldItems[0]);
 
             var newItemCount = CountItemsInGroups(newStartIndex, groupCount);
             var oldItemCount = CountItemsInGroups(oldStartIndex, groupCount);
@@ -402,7 +408,7 @@ namespace Tizen.NUI.Components
 
         void Move(NotifyCollectionChangedEventArgs args)
         {
-            var itemCount = CountItemsInGroups(args.OldStartingIndex, args.OldItems.Count);
+            var itemCount = CountItemsInGroups(args.OldStartingIndex, args.OldItems?.Count ?? 0);
             var start = Math.Min(args.OldStartingIndex, args.NewStartingIndex);
             var end = Math.Max(args.OldStartingIndex, args.NewStartingIndex) + itemCount;
 
index 616485d..a70b4ca 100755 (executable)
@@ -187,7 +187,7 @@ namespace Tizen.NUI.Components
             startIndex = AdjustPositionForHeader(startIndex);
 
             // If we have a start index, we can be more clever about removing the item(s) (and get the nifty animations)
-            var count = args.OldItems.Count;
+            int count = args.OldItems?.Count ?? 0;
 
             if (count == 1)
             {
@@ -200,11 +200,18 @@ namespace Tizen.NUI.Components
 
         void Replace(NotifyCollectionChangedEventArgs args)
         {
+            var newItems = args.NewItems;
+            var oldItems = args.OldItems;
+            if (newItems == null || oldItems == null)
+            {
+                return;
+            }
             var startIndex = args.NewStartingIndex > -1 ? args.NewStartingIndex : IndexOf(args.NewItems[0]);
             startIndex = AdjustPositionForHeader(startIndex);
-            var newCount = args.NewItems.Count;
-
-            if (newCount == args.OldItems.Count)
+            
+            int newCount = newItems.Count;
+            int oldCount = oldItems.Count;
+            if (newCount == oldCount)
             {
                 // We are replacing one set of items with a set of equal size; we can do a simple item or range 
                 // notification to the adapter
index a86f6bf..063968c 100644 (file)
@@ -81,6 +81,9 @@ namespace Tizen.NUI.Physics2D.Chipmunk
         public static IntPtr AllocStructure<T>()
         {
             int size = SizeOf<T>();
+
+            Debug.Assert(size>0, "The memory size to be allocated should be greater than 0");
+
             return Marshal.AllocHGlobal(size);
         }
 
index 7b9afef..6e3366f 100644 (file)
@@ -104,10 +104,6 @@ namespace Tizen.NUI.Physics2D.Chipmunk
         private IntPtr ToPointer()
         {
             IntPtr drawOptionsPtr = NativeInterop.AllocStructure<cpSpaceDebugDrawOptions>();
-            if (Marshal.SizeOf(typeof(cpSpaceDebugDrawOptions)) == 0)
-            {
-                throw new ArgumentNullException("The size of type cpSpaceDebugDrawOptions should not be 0.");
-            }
 
             Marshal.StructureToPtr<cpSpaceDebugDrawOptions>(this, drawOptionsPtr, false);
 
index adf1bde..610c542 100755 (executable)
  * limitations under the License.
  *
  */
-
+using System;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
 namespace Tizen.NUI.Scene3D
 {
     internal static partial class Interop
     {
         internal static partial class Model
-        {
+        {            
             [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_Model_New_SWIG_0")]
             public static extern global::System.IntPtr ModelNew(string modelUrl, string resourcePasth);
 
@@ -106,6 +108,13 @@ namespace Tizen.NUI.Scene3D
 
             [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_Model_LoadFacialAnimation_2")]
             public static extern global::System.IntPtr LoadBlendShapeAnimationFromBuffer(global::System.Runtime.InteropServices.HandleRef model, string jsonBuffer, int jsonBufferLength);
+            
+            // Signals
+            [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_Model_MeshHitSignal_Connect")]
+            public static extern void MeshHitSignalConnect(global::System.Runtime.InteropServices.HandleRef model, global::System.Runtime.InteropServices.HandleRef handler);
+
+            [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_MotionData_MeshHitSignal_Disconnect")]
+            public static extern void MeshHitSignalDisconnect(global::System.Runtime.InteropServices.HandleRef model, global::System.Runtime.InteropServices.HandleRef handler);
         }
     }
 }
index ae5af29..c2acf46 100755 (executable)
  *
  */
 
+using System;
+using System.Runtime.InteropServices;
+
 namespace Tizen.NUI.Scene3D
 {
     internal static partial class Interop
     {
         internal static partial class ModelNode
         {
+            [StructLayout(LayoutKind.Sequential)]
+            internal struct Vec3
+            {
+                internal float x, y, z;
+            }
+        
+            [StructLayout(LayoutKind.Sequential)]
+            internal struct ElementIndex
+            {
+                internal Int32 index;
+            }
+            
             [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_Model_Node_New_SWIG_0")]
             public static extern global::System.IntPtr ModelNodeNew();
 
@@ -62,6 +77,11 @@ namespace Tizen.NUI.Scene3D
 
             [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_Model_Node_GetChildModelNodeAt")]
             public static extern global::System.IntPtr GetChildModelNodeAt(global::System.Runtime.InteropServices.HandleRef model, uint index);
+
+            [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_ModelNode_SetColliderMesh")]
+            public static extern global::System.IntPtr SetColliderMesh(global::System.Runtime.InteropServices.HandleRef modelNode,
+                Vec3[] vPtr,
+                Vec3[] nPtr, int vLength, int[] iPtr, int iLength);            
         }
     }
 }
index 6f8845b..d7bdcb3 100755 (executable)
@@ -64,16 +64,16 @@ namespace Tizen.NUI.Scene3D
             public static extern float GetDuration(global::System.Runtime.InteropServices.HandleRef motionData);
 
             [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_MotionData_LoadBvh")]
-            public static extern float LoadMotionCaptureAnimation(global::System.Runtime.InteropServices.HandleRef motionData, string motionCaptureFilename, global::System.Runtime.InteropServices.HandleRef scale, bool synchronousLoad);
+            public static extern void LoadMotionCaptureAnimation(global::System.Runtime.InteropServices.HandleRef motionData, string motionCaptureFilename, bool useRootTranslationOnly, global::System.Runtime.InteropServices.HandleRef scale, bool synchronousLoad);
 
             [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_MotionData_LoadBvhFromBuffer")]
-            public static extern float LoadMotionCaptureAnimationFromBuffer(global::System.Runtime.InteropServices.HandleRef motionData, string motionCaptureBuffer, int motionCaptureBufferLength, global::System.Runtime.InteropServices.HandleRef scale, bool synchronousLoad);
+            public static extern void LoadMotionCaptureAnimationFromBuffer(global::System.Runtime.InteropServices.HandleRef motionData, string motionCaptureBuffer, int motionCaptureBufferLength, bool useRootTranslationOnly, global::System.Runtime.InteropServices.HandleRef scale, bool synchronousLoad);
 
             [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_MotionData_LoadFacialAnimation")]
-            public static extern float LoadBlendShapeAnimation(global::System.Runtime.InteropServices.HandleRef motionData, string blendShapeFilename, bool synchronousLoad);
+            public static extern void LoadBlendShapeAnimation(global::System.Runtime.InteropServices.HandleRef motionData, string blendShapeFilename, bool synchronousLoad);
 
             [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_MotionData_LoadFacialAnimationFromBuffer")]
-            public static extern float LoadBlendShapeAnimationFromBuffer(global::System.Runtime.InteropServices.HandleRef motionData, string blendShapeBuffer, int blendShapeBufferLength, bool synchronousLoad);
+            public static extern void LoadBlendShapeAnimationFromBuffer(global::System.Runtime.InteropServices.HandleRef motionData, string blendShapeBuffer, int blendShapeBufferLength, bool synchronousLoad);
 
             // Signals
 
index 3eeba19..59e4f86 100755 (executable)
@@ -79,6 +79,18 @@ namespace Tizen.NUI.Scene3D
             [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
             public static extern bool IsUsingFramebuffer(global::System.Runtime.InteropServices.HandleRef sceneView);
 
+            [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_SceneView_SetResolution")]
+            public static extern void SetResolution(global::System.Runtime.InteropServices.HandleRef sceneView, uint width, uint height);
+
+            [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_SceneView_GetResolutionWidth")]
+            public static extern uint GetResolutionWidth(global::System.Runtime.InteropServices.HandleRef sceneView);
+
+            [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_SceneView_GetResolutionHeight")]
+            public static extern uint GetResolutionHeight(global::System.Runtime.InteropServices.HandleRef sceneView);
+
+            [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_SceneView_ResetResolution")]
+            public static extern void ResetResolution(global::System.Runtime.InteropServices.HandleRef sceneView);
+
             [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_SceneView_SetFramebufferMultiSamplingLevel")]
             public static extern void SetFramebufferMultiSamplingLevel(global::System.Runtime.InteropServices.HandleRef sceneView, uint multiSamplingLevel);
 
index 18de468..ab7544d 100755 (executable)
@@ -16,6 +16,7 @@
  */
 
 using System;
+using System.Collections.Generic;
 using System.Runtime.InteropServices;
 using System.ComponentModel;
 using Tizen.NUI;
@@ -683,5 +684,76 @@ namespace Tizen.NUI.Scene3D
         {
             Interop.Model.DeleteModel(swigCPtr);
         }
+        
+        
+        private EventHandler<MeshHitEventArgs> meshHitEventHandler;
+        private MeshHitCallbackType meshHitCallback;
+        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+        private delegate void MeshHitCallbackType(IntPtr motionData);
+
+        /// <summary>
+        /// MeshHitEventArgs
+        /// Contains arguments when MeshHitSignal called
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public class MeshHitEventArgs : EventArgs
+        {
+            private ModelNode modelNode;
+            
+            /// <summary>
+            /// ModelNode that's been hit
+            /// </summary>
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            public ModelNode ModelNode
+            {
+                get
+                {
+                    return modelNode;
+                }
+                set
+                {
+                    modelNode = value;
+                }
+            }
+        }
+        
+        /// <summary>
+        /// EventHandler event.
+        /// It will be invoked when collider mesh is hit.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public event EventHandler<MeshHitEventArgs> ColliderMeshHitted
+        {
+            add
+            {
+                if (meshHitEventHandler == null)
+                {
+                    meshHitCallback = MeshHitCollision;
+                    Interop.Model.MeshHitSignalConnect(SwigCPtr, meshHitCallback.ToHandleRef(this));
+                    NDalicPINVOKE.ThrowExceptionIfExists();
+                }
+                meshHitEventHandler += value;
+            }
+            remove
+            {
+                meshHitEventHandler -= value;
+                if (meshHitEventHandler == null && meshHitCallback != null)
+                {
+                    Interop.Model.MeshHitSignalDisconnect(SwigCPtr, meshHitCallback.ToHandleRef(this));
+                    NDalicPINVOKE.ThrowExceptionIfExists();
+                    meshHitCallback = null;
+                }
+            }
+        }
+
+        private void MeshHitCollision(IntPtr modelNode)
+        {
+            if (meshHitEventHandler != null)
+            {
+                var args = new MeshHitEventArgs();
+                args.ModelNode = new ModelNode(modelNode, false);
+                meshHitEventHandler(this, args);
+            }
+        }
     }
 }
index 82fa71b..217a7a1 100755 (executable)
@@ -473,6 +473,66 @@ namespace Tizen.NUI.Scene3D
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
+        /// <summary>
+        /// Sets SceneView's resolution manually.
+        /// </summary>
+        /// <param name="width">The input width.</param>
+        /// <param name="height">The input height.</param>
+        /// <remarks>
+        /// This manual resolution is only available when the SceneView uses FBO for rendering by using FBO (UseFrameBuffer is true).
+        /// If the aspect ratio of input width/height is different with SceneView's aspect ratio, the rendered result is stretched to fill SceneView's area.
+        /// </remarks>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void SetResolution(uint width, uint height)
+        {
+            Interop.SceneView.SetResolution(SwigCPtr, width, height);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Retrieves width of resolution of the SceneView.
+        /// </summary>
+        /// <remarks>
+        ///  If the SceneView not uses FBO, this method returns SceneView's width.
+        /// </remarks>
+        /// <returns> Camera currently used in SceneView as a selected Camera.</returns>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public uint GetResolutionWidth()
+        {
+            uint result = Interop.SceneView.GetResolutionWidth(SwigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return result;
+        }
+
+        /// <summary>
+        /// Retrieves height of resolution of the SceneView.
+        /// </summary>
+        /// <remarks>
+        ///  If the SceneView not uses FBO, this method returns SceneView's height.
+        /// </remarks>
+        /// <returns> Camera currently used in SceneView as a selected Camera.</returns>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public uint GetResolutionHeight()
+        {
+            uint result = Interop.SceneView.GetResolutionHeight(SwigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return result;
+        }
+
+        /// <summary>
+        /// Resets SceneView's resolution to the current size of SceneView.
+        /// </summary>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void ResetResolution()
+        {
+            Interop.SceneView.ResetResolution(SwigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
         internal void SetUseFramebuffer(bool useFramebuffer)
         {
             Interop.SceneView.UseFramebuffer(SwigCPtr, useFramebuffer);
index 64f15bb..2247436 100755 (executable)
@@ -16,6 +16,7 @@
  */
 
 using System;
+using System.Collections.Generic;
 using System.Runtime.InteropServices;
 using System.ComponentModel;
 using System.Collections.Generic;
@@ -202,6 +203,40 @@ namespace Tizen.NUI.Scene3D
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
+        
+        /// <summary>
+        /// Sets collider mesh on current node
+        /// </summary>
+        /// <param name="vertexList">List of vertices</param>
+        /// <param name="normalList">List of vertex normals</param>
+        /// <param name="indexList">List of mesh indices</param>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void SetColliderMesh(List<Vector3> vertexList, List<Vector3> normalList, List<int> indexList)
+        {
+            var vertices = new Interop.ModelNode.Vec3[vertexList.Count];
+            var idx = 0;
+            foreach (var vertex in vertexList)
+            {
+                vertices[idx].x = vertex.X;
+                vertices[idx].y = vertex.Y;
+                vertices[idx].z = vertex.Z;
+                ++idx;
+            }
+            
+            var normals = new Interop.ModelNode.Vec3[normalList.Count];
+            idx = 0;
+            foreach (var normal in normalList)
+            {
+                normals[idx].x = normal.X;
+                normals[idx].y = normal.Y;
+                normals[idx].z = normal.Z;
+                ++idx;
+            }
+            
+            Interop.ModelNode.SetColliderMesh(SwigCPtr,vertices, normals, vertexList.Count, indexList.ToArray(), indexList.Count);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
 
         /// <summary>
         /// Gets the number of ModelPrimitive objects in the ModelNode object.
index 7307ca9..19ffcab 100644 (file)
@@ -262,7 +262,28 @@ namespace Tizen.NUI.Scene3D
         /// <since_tizen> 11 </since_tizen>
         public void LoadMotionCaptureAnimation(string motionCaptureFilename, Vector3 scale = null, bool synchronousLoad = false)
         {
-            Interop.MotionData.LoadMotionCaptureAnimation(SwigCPtr, motionCaptureFilename, Vector3.getCPtr(scale), synchronousLoad);
+            Interop.MotionData.LoadMotionCaptureAnimation(SwigCPtr, motionCaptureFilename, false, Vector3.getCPtr(scale), synchronousLoad);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Load motion capture animation.
+        /// We support bvh format.
+        /// After load completes, <see cref="LoadCompleted"/> event will be invoked.
+        /// </summary>
+        /// <remarks>
+        /// Scale is additional scale factor of motion capture animation. It is possible that
+        /// Model's scale may not match with motion capture animation scale.
+        /// If scale is null, default value will be used: <cref name="Vector3.ONE"/>
+        /// </remarks>
+        /// <param name="motionCaptureFilename">Name of motion capture format file.</param>
+        /// <param name="useRootTranslationOnly">True to use only root translation with rotation animation.</param>
+        /// <param name="scale">Scale value of motion capture animation match with model.</param>
+        /// <param name="synchronousLoad">Load synchronously or not. Default is async load.</param>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void LoadMotionCaptureAnimation(string motionCaptureFilename, bool useRootTranslationOnly, Vector3 scale = null, bool synchronousLoad = false)
+        {
+            Interop.MotionData.LoadMotionCaptureAnimation(SwigCPtr, motionCaptureFilename, useRootTranslationOnly, Vector3.getCPtr(scale), synchronousLoad);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
@@ -282,7 +303,28 @@ namespace Tizen.NUI.Scene3D
         /// <since_tizen> 11 </since_tizen>
         public void LoadMotionCaptureAnimationFromBuffer(string motionCaptureBuffer, Vector3 scale = null, bool synchronousLoad = false)
         {
-            Interop.MotionData.LoadMotionCaptureAnimationFromBuffer(SwigCPtr, motionCaptureBuffer, motionCaptureBuffer.Length, Vector3.getCPtr(scale), synchronousLoad);
+            Interop.MotionData.LoadMotionCaptureAnimationFromBuffer(SwigCPtr, motionCaptureBuffer, motionCaptureBuffer.Length, false, Vector3.getCPtr(scale), synchronousLoad);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Load motion capture animation from string.
+        /// We support bvh format.
+        /// After load completes, <see cref="LoadCompleted"/> event will be invoked.
+        /// </summary>
+        /// <remarks>
+        /// Scale is additional scale factor of motion capture animation. It is possible that
+        /// Model's scale may not match with motion capture animation scale.
+        /// If scale is null, default value will be used: <cref name="Vector3.ONE"/>
+        /// </remarks>
+        /// <param name="motionCaptureBuffer">Contents of motion capture format string.</param>
+        /// <param name="useRootTranslationOnly">True to use only root translation with rotation animation.</param>
+        /// <param name="scale">Scale value of motion capture animation match with model.</param>
+        /// <param name="synchronousLoad">Load synchronously or not. Default is async load.</param>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void LoadMotionCaptureAnimationFromBuffer(string motionCaptureBuffer, bool useRootTranslationOnly, Vector3 scale = null, bool synchronousLoad = false)
+        {
+            Interop.MotionData.LoadMotionCaptureAnimationFromBuffer(SwigCPtr, motionCaptureBuffer, motionCaptureBuffer.Length, useRootTranslationOnly, Vector3.getCPtr(scale), synchronousLoad);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
index 2946cb4..63dbda6 100644 (file)
@@ -186,18 +186,19 @@ namespace Tizen.NUI.BaseComponents
                 
                 if (textures != null)
                 {
-                    int intptrBytes = checked(sizeof(IntPtr) * textures.Count);
+                    int count = textures.Count;
+                    int intptrBytes = checked(sizeof(IntPtr) * count);
                     if (intptrBytes>0)
                     {
                         IntPtr unmanagedPointer = Marshal.AllocHGlobal(intptrBytes);
-                        IntPtr[] texturesArray = new IntPtr[textures.Count];
-                        for (int i = 0; i < textures.Count; i++)
+                        IntPtr[] texturesArray = new IntPtr[count];
+                        for (int i = 0; i < count; i++)
                         {
                             texturesArray[i] = HandleRef.ToIntPtr(Texture.getCPtr(textures[i]));
                         }
-                        System.Runtime.InteropServices.Marshal.Copy(texturesArray, 0, unmanagedPointer, textures.Count);
+                        Marshal.Copy(texturesArray, 0, unmanagedPointer, count);
 
-                        Interop.GLView.GlViewBindTextureResources(SwigCPtr, unmanagedPointer, textures.Count);
+                        Interop.GLView.GlViewBindTextureResources(SwigCPtr, unmanagedPointer, count);
                         Marshal.FreeHGlobal(unmanagedPointer);
                     }
                 }
index 47b4dec..32867f5 100755 (executable)
@@ -1146,6 +1146,7 @@ namespace Tizen.NUI.BaseComponents
             // If the view had focus, it clears focus.
             if (child == FocusManager.Instance.GetCurrentFocusView())
             {
+                Tizen.Log.Debug("NUI", $"ClearFocus due to View id:({child.ID}) removed from scene\n");
                 FocusManager.Instance.ClearFocus();
             }
             // Do actual child removal
@@ -1468,7 +1469,7 @@ namespace Tizen.NUI.BaseComponents
             NUILog.Debug($"=============================");
 
             base.Dispose(type);
-            
+
             aliveCount--;
         }
 
index 6f3586f..b7a83ae 100644 (file)
@@ -636,7 +636,7 @@ namespace Tizen.Network.Bluetooth
                 {
                     if (!profile.Equals(null))
                     {
-                        profileList.Add((BluetoothProfileType)profile);
+                        profileList.Add(BluetoothUtils.ConvertBtProfileToProfileType(profile));
                     }
                     return true;
                 };
@@ -670,7 +670,7 @@ namespace Tizen.Network.Bluetooth
             if (BluetoothAdapter.IsBluetoothEnabled)
             {
                 bool isConnected;
-                int ret = Interop.Bluetooth.IsProfileConnected(RemoteDeviceAddress, (int)profileType, out isConnected);
+                int ret = Interop.Bluetooth.IsProfileConnected(RemoteDeviceAddress, BluetoothUtils.ConvertProfileTypeToBtProfile(profileType), out isConnected);
                 if (ret != (int)BluetoothError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to get profile connected state, Error - " + (BluetoothError)ret);
index 60e63fd..b56a3ac 100644 (file)
@@ -465,6 +465,39 @@ namespace Tizen.Network.Bluetooth
 
             return connectionInfo;
         }
+
+        internal static int ConvertProfileTypeToBtProfile(BluetoothProfileType profileType)
+        {
+            return profileType switch
+            {
+                BluetoothProfileType.Rfcomm => 0x01,
+                BluetoothProfileType.AdvancedAudioDistribution => 0x02,
+                BluetoothProfileType.Headset => 0x04,
+                BluetoothProfileType.HumanInterfaceDevice => 0x08,
+                BluetoothProfileType.NetworkAccessPoint => 0x10,
+                BluetoothProfileType.AudioGateway => 0x20,
+                BluetoothProfileType.GenericAttribute => 0x40,
+                BluetoothProfileType.NapServer => 0x80,
+                BluetoothProfileType.AdvancedAudioDistributionSink => 0x100,
+                _ => -1,
+            };
+        }
+
+        internal static BluetoothProfileType ConvertBtProfileToProfileType(int btProfile)
+        {
+            return btProfile switch
+            {
+                0x01 => BluetoothProfileType.Rfcomm,
+                0x02 => BluetoothProfileType.AdvancedAudioDistribution,
+                0x04 => BluetoothProfileType.Headset,
+                0x08 => BluetoothProfileType.HumanInterfaceDevice,
+                0x10 => BluetoothProfileType.NetworkAccessPoint,
+                0x20 => BluetoothProfileType.AudioGateway,
+                0x40 => BluetoothProfileType.GenericAttribute,
+                0x80 => BluetoothProfileType.NapServer,
+                0x100 => BluetoothProfileType.AdvancedAudioDistributionSink,
+            };
+        }
     }
 }