From 4b70ad0d25d4dcdd87e2b04f1c61e0f42735f137 Mon Sep 17 00:00:00 2001 From: "joogab.yun" Date: Fri, 11 Feb 2022 11:16:54 +0900 Subject: [PATCH] [NUI] Add FeedTouch and FeedWheel --- .../src/internal/Interop/Interop.Window.cs | 6 ++++++ src/Tizen.NUI/src/public/Window/Window.cs | 23 ++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs b/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs index e2b9124..3b30f7e 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs @@ -182,6 +182,12 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_FeedKeyEvent")] public static extern void FeedKeyEvent(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_FeedTouchPoint")] + public static extern void FeedTouchPoint(global::System.Runtime.InteropServices.HandleRef touchPoint, int timeStamp); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_FeedWheelEvent")] + public static extern void FeedWheelEvent(global::System.Runtime.InteropServices.HandleRef wheelEvent); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Adaptor_RenderOnce")] public static extern void RenderOnce(global::System.Runtime.InteropServices.HandleRef jarg1); diff --git a/src/Tizen.NUI/src/public/Window/Window.cs b/src/Tizen.NUI/src/public/Window/Window.cs index c5ca31c..398910a 100644 --- a/src/Tizen.NUI/src/public/Window/Window.cs +++ b/src/Tizen.NUI/src/public/Window/Window.cs @@ -1081,6 +1081,29 @@ namespace Tizen.NUI } /// + /// Feeds a touch point into the window. + /// + /// The touch point to feed. + /// The timeStamp. + [EditorBrowsable(EditorBrowsableState.Never)] + internal void FeedTouch(TouchPoint touchPoint, int timeStamp) + { + Interop.Window.FeedTouchPoint(TouchPoint.getCPtr(touchPoint), timeStamp); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Feeds a wheel event into the window. + /// + /// The wheel event to feed. + [EditorBrowsable(EditorBrowsableState.Never)] + internal void FeedWheel(Wheel wheelEvent) + { + Interop.Window.FeedWheelEvent(Wheel.getCPtr(wheelEvent)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// /// Allows at least one more render, even when paused. /// The window should be shown, not minimised. /// -- 2.7.4