[NUI] CanvasView: Change parameter and return type of binder function
authorJunsuChoi <jsuya.choi@samsung.com>
Thu, 2 Sep 2021 07:19:06 +0000 (16:19 +0900)
committerhuiyu <35286162+huiyueun@users.noreply.github.com>
Tue, 7 Sep 2021 09:05:39 +0000 (18:05 +0900)
int -> uint(unsigned int)
dali-csharp-binder patch : https://review.tizen.org/gerrit/#/c/platform/core/uifw/dali-csharp-binder/+/262968/

src/Tizen.NUI/src/internal/Interop/Interop.Gradient.cs
src/Tizen.NUI/src/internal/Interop/Interop.Shape.cs
src/Tizen.NUI/src/public/BaseComponents/VectorGraphics/Gradient.cs
src/Tizen.NUI/src/public/BaseComponents/VectorGraphics/Shape.cs

index f2e7948..147a53c 100755 (executable)
@@ -22,16 +22,16 @@ namespace Tizen.NUI
         internal static partial class Gradient
         {
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Gradient_SetColorStops")]
-            public static extern void SetColorStops(global::System.Runtime.InteropServices.HandleRef gradient, [global::System.Runtime.InteropServices.In, global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPArray)] float[] stops, int stopsLength);
+            public static extern void SetColorStops(global::System.Runtime.InteropServices.HandleRef gradient, [global::System.Runtime.InteropServices.In, global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPArray)] float[] stops, uint stopsLength);
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Gradient_GetColorStopsCount")]
-            public static extern int GetColorStopsCount(global::System.Runtime.InteropServices.HandleRef gradient);
+            public static extern uint GetColorStopsCount(global::System.Runtime.InteropServices.HandleRef gradient);
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Gradient_GetColorStopsOffsetIndexOf")]
-            public static extern float GetColorStopsOffsetIndexOf(global::System.Runtime.InteropServices.HandleRef gradient, int index);
+            public static extern float GetColorStopsOffsetIndexOf(global::System.Runtime.InteropServices.HandleRef gradient, uint index);
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Gradient_GetColorStopsColorIndexOf")]
-            public static extern global::System.IntPtr GetColorStopsColorIndexOf(global::System.Runtime.InteropServices.HandleRef gradient, int index);
+            public static extern global::System.IntPtr GetColorStopsColorIndexOf(global::System.Runtime.InteropServices.HandleRef gradient, uint index);
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Gradient_SetSpread")]
             public static extern void SetSpread(global::System.Runtime.InteropServices.HandleRef gradient, int index);
index 0abff18..35b3270 100755 (executable)
@@ -85,13 +85,13 @@ namespace Tizen.NUI
             public static extern global::System.IntPtr GetStrokeColor(global::System.Runtime.InteropServices.HandleRef jarg1);
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Shape_SetStrokeDash")]
-            public static extern void SetStrokeDash(global::System.Runtime.InteropServices.HandleRef jarg1, [global::System.Runtime.InteropServices.In, global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPArray)] float[] jarg2, int jarg3);
+            public static extern void SetStrokeDash(global::System.Runtime.InteropServices.HandleRef jarg1, [global::System.Runtime.InteropServices.In, global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.LPArray)] float[] jarg2, uint jarg3);
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Shape_GetStrokeDashIndexOf")]
-            public static extern float GetStrokeDashIndexOf(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
+            public static extern float GetStrokeDashIndexOf(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2);
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Shape_GetStrokeDashCount")]
-            public static extern int GetStrokeDashCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+            public static extern uint GetStrokeDashCount(global::System.Runtime.InteropServices.HandleRef jarg1);
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Shape_SetStrokeCap")]
             public static extern void SetStrokeCap(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
index f5e87b7..a6fad01 100755 (executable)
@@ -69,8 +69,8 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
             get
             {
                 List<ColorStop> retList = new List<ColorStop>();
-                int colorStopsCount = Interop.Gradient.GetColorStopsCount(BaseHandle.getCPtr(this));
-                for (int i = 0; i < colorStopsCount; i++)
+                uint colorStopsCount = Interop.Gradient.GetColorStopsCount(BaseHandle.getCPtr(this));
+                for (uint i = 0; i < colorStopsCount; i++)
                 {
                     retList.Add(new ColorStop(Interop.Gradient.GetColorStopsOffsetIndexOf(BaseHandle.getCPtr(this), i),
                                               Vector4.GetVector4FromPtr(Interop.Gradient.GetColorStopsColorIndexOf(BaseHandle.getCPtr(this), i))));
@@ -95,7 +95,7 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
                     rawColorStops[i * 5 + 4] = value[i].Color.A;
                 }
 
-                Interop.Gradient.SetColorStops(BaseHandle.getCPtr(this), rawColorStops, value.Count);
+                Interop.Gradient.SetColorStops(BaseHandle.getCPtr(this), rawColorStops, (uint)value.Count);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
         }
index 5f7cbe4..249b89e 100755 (executable)
@@ -264,8 +264,8 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
             get
             {
                 List<float> retList = new List<float>();
-                int patternCount = Interop.Shape.GetStrokeDashCount(BaseHandle.getCPtr(this));
-                for (int i = 0; i < patternCount; i++)
+                uint patternCount = Interop.Shape.GetStrokeDashCount(BaseHandle.getCPtr(this));
+                for (uint i = 0; i < patternCount; i++)
                 {
                     retList.Add(Interop.Shape.GetStrokeDashIndexOf(BaseHandle.getCPtr(this), i));
                 }
@@ -284,7 +284,7 @@ namespace Tizen.NUI.BaseComponents.VectorGraphics
                 {
                     pattern[i] = value[i];
                 }
-                Interop.Shape.SetStrokeDash(BaseHandle.getCPtr(this), pattern, value.Count);
+                Interop.Shape.SetStrokeDash(BaseHandle.getCPtr(this), pattern, (uint)value.Count);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
         }