From: joogab.yun Date: Thu, 22 Aug 2024 02:16:22 +0000 (+0900) Subject: [NUI] Add RelativeMotionGrab and RelativeMotionUnGrab X-Git-Tag: submit/tizen/20240827.074151~1^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6f4c2c10d5e3c2264a85a06afcdb2c3123ca6f69;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Add RelativeMotionGrab and RelativeMotionUnGrab --- diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs b/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs index af549db03..ffd7ce6f8 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs @@ -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); } } } diff --git a/src/Tizen.NUI/src/public/Window/Window.cs b/src/Tizen.NUI/src/public/Window/Window.cs index 4dce26fc6..1567a5ccc 100755 --- a/src/Tizen.NUI/src/public/Window/Window.cs +++ b/src/Tizen.NUI/src/public/Window/Window.cs @@ -416,6 +416,44 @@ namespace Tizen.NUI BottomRight = 8, } + /// + /// The Pointer edge boundary for grab. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public enum PointerBoundary + { + /// + /// Default value + /// + [EditorBrowsable(EditorBrowsableState.Never)] + None = 0, + + /// + /// Top + /// + [EditorBrowsable(EditorBrowsableState.Never)] + Top = 1, + + /// + /// Right + /// + [EditorBrowsable(EditorBrowsableState.Never)] + Right = 2, + + /// + /// Bottom + /// + [EditorBrowsable(EditorBrowsableState.Never)] + Bottom = 3, + + /// + /// Left + /// + [EditorBrowsable(EditorBrowsableState.Never)] + Left = 4, + + } + /// /// The stage instance property (read-only).
/// Gets the current window.
@@ -2549,6 +2587,30 @@ namespace Tizen.NUI } } + /// + /// Requests relative motion grab + /// + /// True if RelativeMotionGrab succeeds. + [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; + } + + /// + /// Requests relative motion ungrab + /// + /// True if RelativeMotionGrab succeeds. + [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;