[NUI] Add RelativeMotionGrab and RelativeMotionUnGrab
authorjoogab.yun <joogab.yun@samsung.com>
Thu, 22 Aug 2024 02:16:22 +0000 (11:16 +0900)
committerJaehyun Cho <jaehyun0cho@gmail.com>
Tue, 27 Aug 2024 07:35:19 +0000 (16:35 +0900)
src/Tizen.NUI/src/internal/Interop/Interop.Window.cs
src/Tizen.NUI/src/public/Window/Window.cs

index af549db0302b9fcb5ead4f02c631c9fb28e550ac..ffd7ce6f88f91b283e142cbc2389ae0c3b7e8e8e 100755 (executable)
@@ -384,6 +384,14 @@ namespace Tizen.NUI
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_IsAlwaysOnTop")]
             [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
             public static extern bool IsAlwaysOnTop(global::System.Runtime.InteropServices.HandleRef window);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_RelativeMotionGrab")]
+            [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
+            public static extern bool RelativeMotionGrab(global::System.Runtime.InteropServices.HandleRef window, uint boundary);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_RelativeMotionUnGrab")]
+            [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
+            public static extern bool RelativeMotionUnGrab(global::System.Runtime.InteropServices.HandleRef window);
         }
     }
 }
index 4dce26fc6001a0b112bdd43f82fa1b06a5ab9441..1567a5ccc7472009e63986e22f066329a4a998a3 100755 (executable)
@@ -416,6 +416,44 @@ namespace Tizen.NUI
             BottomRight = 8,
         }
 
+        /// <summary>
+        /// The Pointer edge boundary for grab.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public enum PointerBoundary
+        {
+            /// <summary>
+            /// Default value
+            /// </summary>
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            None = 0,
+
+            /// <summary>
+            /// Top
+            /// </summary>
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            Top = 1,
+
+            /// <summary>
+            /// Right
+            /// </summary>
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            Right = 2,
+
+            /// <summary>
+            /// Bottom
+            /// </summary>
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            Bottom = 3,
+
+            /// <summary>
+            /// Left
+            /// </summary>
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            Left = 4,
+
+        }
+
         /// <summary>
         /// The stage instance property (read-only).<br />
         /// Gets the current window.<br />
@@ -2549,6 +2587,30 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Requests relative motion grab
+        /// </summary>
+        /// <returns>True if RelativeMotionGrab succeeds.</returns>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool RelativeMotionGrab(PointerBoundary boundary)
+        {
+            bool ret = Interop.Window.RelativeMotionGrab(SwigCPtr, (uint)boundary);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Requests relative motion ungrab
+        /// </summary>
+        /// <returns>True if RelativeMotionGrab succeeds.</returns>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool RelativeMotionUnGrab()
+        {
+            bool ret = Interop.Window.RelativeMotionUnGrab(SwigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
         IntPtr IWindowProvider.WindowHandle => GetNativeWindowHandler();
         float IWindowProvider.X => WindowPosition.X;
         float IWindowProvider.Y => WindowPosition.Y;