From aadae423a5bfffe09983d4257c23257c48eec9c8 Mon Sep 17 00:00:00 2001 From: "joogab.yun" Date: Thu, 4 May 2023 18:37:45 +0900 Subject: [PATCH] [NUI] Binding GetDeviceClass and GetDeviceSubclass of touch event refer : https://review.tizen.org/gerrit/#/c/platform/core/uifw/dali-csharp-binder/+/292340/ --- .../src/internal/Interop/Interop.Touch.cs | 6 ++++++ src/Tizen.NUI/src/public/Events/Touch.cs | 25 ++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.Touch.cs b/src/Tizen.NUI/src/internal/Interop/Interop.Touch.cs index d5f221c..8a4771f 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.Touch.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.Touch.cs @@ -66,6 +66,12 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Touch_GetAngle")] public static extern global::System.IntPtr GetAngle(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Touch_GetDeviceClass")] + public static extern int GetDeviceClass(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Touch_GetDeviceSubclass")] + public static extern int GetDeviceSubClass(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Touch_SWIGUpcast")] public static extern global::System.IntPtr Upcast(global::System.IntPtr jarg1); diff --git a/src/Tizen.NUI/src/public/Events/Touch.cs b/src/Tizen.NUI/src/public/Events/Touch.cs index 4f39757..27955ba 100755 --- a/src/Tizen.NUI/src/public/Events/Touch.cs +++ b/src/Tizen.NUI/src/public/Events/Touch.cs @@ -212,6 +212,31 @@ namespace Tizen.NUI return (MouseButton)ret; } + /// + /// Gets the device class type from which the mouse/touch event is originated. + /// + /// The index of a touch point. + [EditorBrowsable(EditorBrowsableState.Never)] + public DeviceClassType GetDeviceClass(uint point) + { + int ret = Interop.Touch.GetDeviceClass(SwigCPtr, point); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return (DeviceClassType)ret; + } + + /// + /// Gets the subclass type of the device from which the mouse/touch event is originated. + /// + /// The index of a touch point. + [EditorBrowsable(EditorBrowsableState.Never)] + public DeviceSubClassType GetDeviceSubClass(uint point) + { + int ret = Interop.Touch.GetDeviceSubClass(SwigCPtr, point); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return (DeviceSubClassType)ret; + } + + internal static Touch GetTouchFromPtr(global::System.IntPtr cPtr) { Touch ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Touch; -- 2.7.4