Change API names
authorWonsik Jung <sidein@samsung.com>
Fri, 27 Aug 2021 04:23:50 +0000 (13:23 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Fri, 27 Aug 2021 05:29:50 +0000 (14:29 +0900)
src/Tizen.NUI/src/internal/Interop/Interop.Window.cs
src/Tizen.NUI/src/public/Window/Window.cs
test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/WindowTest.cs
test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSWindow.cs

index e5da91d..e670c46 100755 (executable)
@@ -260,11 +260,11 @@ namespace Tizen.NUI
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_GetWindow")]
             public static extern global::System.IntPtr Get(global::System.Runtime.InteropServices.HandleRef jarg1);
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_AddInputRegion")]
-            public static extern void AddInputRegion(global::System.Runtime.InteropServices.HandleRef window, global::System.Runtime.InteropServices.HandleRef inputRegion);
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_IncludeInputRegion")]
+            public static extern void IncludeInputRegion(global::System.Runtime.InteropServices.HandleRef window, global::System.Runtime.InteropServices.HandleRef inputRegion);
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_SubtractInputRegion")]
-            public static extern void SubtractInputRegion(global::System.Runtime.InteropServices.HandleRef window, global::System.Runtime.InteropServices.HandleRef inputRegion);
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_ExcludeInputRegion")]
+            public static extern void ExcludeInputRegion(global::System.Runtime.InteropServices.HandleRef window, global::System.Runtime.InteropServices.HandleRef inputRegion);
         }
     }
 }
index 160aaf9..29253d3 100644 (file)
@@ -726,7 +726,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public void SetInputRegion(Rectangle inputRegion)
         {
-            Interop.Window.SetInputRegion(SwigCPtr, Rectangle.getCPtr(inputRegion));
+            Interop.Window.IncludeInputRegion(SwigCPtr, Rectangle.getCPtr(inputRegion));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
@@ -1506,24 +1506,36 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Adds input region.
+        /// Includes input region.
+        /// This function inlcudes input regions.
+        /// It can be used multiple times and supports multiple regions.
+        /// It means input region will be extended.
+        /// This input is related to mouse and touch event.
+        /// If device has touch screen, this function is useful.
+        /// Otherwise device does not have that, we can use it after connecting mouse to the device.
         /// </summary>
-        /// <param name="inputRegion">The added region to accept input events.</param>
+        /// <param name="inputRegion">The included region to accept input events.</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public void AddInputRegion(Rectangle inputRegion)
+        public void IncludeInputRegion(Rectangle inputRegion)
         {
-            Interop.Window.AddInputRegion(SwigCPtr, Rectangle.getCPtr(inputRegion));
+            Interop.Window.IncludeInputRegion(SwigCPtr, Rectangle.getCPtr(inputRegion));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
         /// <summary>
-        /// Subtracts input region.
+        /// This function excludes input regions.
+        /// It can be used multiple times and supports multiple regions.
+        /// It means input region will be reduced.
+        /// Nofice, should be set input area by IncludeInputRegion() before this function is used.
+        /// This input is related to mouse and touch event.
+        /// If device has touch screen, this function is useful.
+        /// Otherwise device does not have that, we can use it after connecting mouse to the device.
         /// </summary>
-        /// <param name="inputRegion">The subtracted region to except input events.</param>
+        /// <param name="inputRegion">The excluded region to except input events.</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public void SubtractInputRegion(Rectangle inputRegion)
+        public void ExcludeInputRegion(Rectangle inputRegion)
         {
-            Interop.Window.SubtractInputRegion(SwigCPtr, Rectangle.getCPtr(inputRegion));
+            Interop.Window.ExcludeInputRegion(SwigCPtr, Rectangle.getCPtr(inputRegion));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
index d567d79..f7f2fbf 100644 (file)
@@ -28,7 +28,7 @@ namespace Tizen.NUI.Samples
             Information.TryGetValue<int>("http://tizen.org/feature/screen.height", out screenHeight);
             log.Fatal(tag, $"Initialize= screenWidth {screenWidth}, screenHeight {screenHeight} ");
             Rectangle inputRegion = new Rectangle(0,0,screenWidth,screenHeight/2);
-            mainWin.AddInputRegion(inputRegion);
+            mainWin.IncludeInputRegion(inputRegion);
 
             addingInput = 0;
 
@@ -61,8 +61,8 @@ namespace Tizen.NUI.Samples
                     {
                         int yPostion = screenHeight/2 + 1;
                         int height = screenHeight/2;
-                        log.Fatal(tag, $"WinTouchEvent= Add {xPosition},{yPostion} {screenWidth}x{height} ");
-                        mainWin.AddInputRegion(new Rectangle(xPosition,yPostion,screenWidth,height));
+                        log.Fatal(tag, $"WinTouchEvent= Include {xPosition},{yPostion} {screenWidth}x{height} ");
+                        mainWin.IncludeInputRegion(new Rectangle(xPosition,yPostion,screenWidth,height));
                         addingInput = 1;
                     }
                 }
@@ -72,8 +72,8 @@ namespace Tizen.NUI.Samples
                     {
                         int yPostion = screenHeight/2 + 1;
                         int height = screenHeight/2;
-                        log.Fatal(tag, $"WinTouchEvent= Subtract {xPosition},{yPostion} {screenWidth}x{height} ");
-                        mainWin.SubtractInputRegion(new Rectangle(xPosition, yPostion, screenWidth, height));
+                        log.Fatal(tag, $"WinTouchEvent= Exclude {xPosition},{yPostion} {screenWidth}x{height} ");
+                        mainWin.ExcludeInputRegion(new Rectangle(xPosition, yPostion, screenWidth, height));
                         addingInput = 0;
                     }
                 }
index 3c43270..b593cec 100755 (executable)
@@ -576,15 +576,14 @@ namespace Tizen.NUI.Devel.Tests
             try
             {
                 Window.Instance.EnableFloatingMode(true);
-
             }
             catch (Exception e)
             {
                 tlog.Debug(tag, e.Message.ToString());
                 Assert.Fail("Caught Exception : Failed!");
             }
-            tlog.Debug(tag, $"AddInputRegionTest END (OK)");
-            }
+            
+            tlog.Debug(tag, $"WindowEnableFloatingMode END (OK)");
         }
 
         [Test]
@@ -633,17 +632,17 @@ namespace Tizen.NUI.Devel.Tests
 
         [Test]
         [Category("P1")]
-        [Description("Window AddInputRegion Test")]
-        [Property("SPEC", "Tizen.NUI.Window.AddInputRegion M")]
+        [Description("Window IncludeInputRegion Test")]
+        [Property("SPEC", "Tizen.NUI.Window.IncludeInputRegion M")]
         [Property("SPEC_URL", "-")]
         [Property("CRITERIA", "MR")]
-        public void AddInputRegionTest()
+        public void IncludeInputRegionTest()
         {
             try
             {
                 var window = Window.Instance;
                 Rectangle inputRegion = new Rectangle(0, 0, 720, 640);
-                window.AddInputRegion(inputRegion);
+                window.IncludeInputRegion(inputRegion);
             }
             catch (Exception e)
             {
@@ -651,30 +650,27 @@ namespace Tizen.NUI.Devel.Tests
             }
         }
 
-
         [Test]
         [Category("P1")]
-        [Description("Window SubtractInputRegion Test")]
-        [Property("SPEC", "Tizen.NUI.Window.SubtractInputRegion M")]
+        [Description("Window ExcludeInputRegion Test")]
+        [Property("SPEC", "Tizen.NUI.Window.ExcludeInputRegion M")]
         [Property("SPEC_URL", "-")]
         [Property("CRITERIA", "MR")]
-        public void SubtractInputRegionTest()
+        public void ExcludeInputRegionTest()
         {
             try
             {
                 var window = Window.Instance;
-                Rectangle addInputRegion = new Rectangle(0, 0, 720, 1280);
-                window.AddInputRegion(addInputRegion);
+                Rectangle includeInputRegion = new Rectangle(0, 0, 720, 1280);
+                window.IncludeInputRegion(includeInputRegion);
 
-                Rectangle subtractInputRegion = new Rectangle(0, 641, 720, 640);
-                window.SubtractInputRegion(subtractInputRegion);
+                Rectangle excludeInputRegion = new Rectangle(0, 641, 720, 640);
+                window.ExcludeInputRegion(excludeInputRegion);
             }
             catch (Exception e)
             {
                 Assert.Fail("Caught Exception : Failed!");
             }
-
-            tlog.Debug(tag, $"SubtractInputRegionTest END (OK)");
         }
     }
 }