From 405bfead3d557055bdfd64175fb232d0e5d3b87e Mon Sep 17 00:00:00 2001 From: Feng Jin Date: Tue, 18 Apr 2017 04:36:07 +0800 Subject: [PATCH] Add manual merge for Key.cs Change-Id: I6f22db32da7bf22c64b4f9d013d9339e7b93b5ba Signed-off-by: Feng Jin --- Tizen.NUI/src/internal/NDalic.cs | 22 +++++++++++++++++ Tizen.NUI/src/internal/NDalicPINVOKE.cs | 18 ++++++++++++++ Tizen.NUI/src/public/Key.cs | 42 +++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) diff --git a/Tizen.NUI/src/internal/NDalic.cs b/Tizen.NUI/src/internal/NDalic.cs index 3149f6e..177b22f 100755 --- a/Tizen.NUI/src/internal/NDalic.cs +++ b/Tizen.NUI/src/internal/NDalic.cs @@ -963,6 +963,28 @@ System.IntPtr ip2 = System.Runtime.InteropServices.Marshal.GetFunctionPointerFor } } + private static string GetDeviceName(Key keyEvent) { + string ret = NDalicPINVOKE.GetDeviceName(Key.getCPtr(keyEvent)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private static void SetDeviceName(Key keyEvent, string deviceName) { + NDalicPINVOKE.SetDeviceName(Key.getCPtr(keyEvent), deviceName); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static DeviceClassType GetDeviceClass(Key keyEvent) { + DeviceClassType ret = (DeviceClassType)NDalicPINVOKE.GetDeviceClass(Key.getCPtr(keyEvent)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static void SetDeviceClass(Key keyEvent, DeviceClassType deviceClass) { + NDalicPINVOKE.SetDeviceClass(Key.getCPtr(keyEvent), (int)deviceClass); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + public static void UnparentAndReset(Actor actor) { NDalicPINVOKE.UnparentAndReset(Actor.getCPtr(actor)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); diff --git a/Tizen.NUI/src/internal/NDalicPINVOKE.cs b/Tizen.NUI/src/internal/NDalicPINVOKE.cs index 07fdd29..84f80f5 100755 --- a/Tizen.NUI/src/internal/NDalicPINVOKE.cs +++ b/Tizen.NUI/src/internal/NDalicPINVOKE.cs @@ -3062,6 +3062,12 @@ class NDalicPINVOKE { [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_Key__SWIG_1")] public static extern global::System.IntPtr new_Key__SWIG_1(string jarg1, string jarg2, int jarg3, int jarg4, uint jarg5, int jarg6); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_Key__SWIG_2")] + public static extern global::System.IntPtr new_Key__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Key_Assign")] + public static extern global::System.IntPtr Key_Assign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_Key")] public static extern void delete_Key(global::System.Runtime.InteropServices.HandleRef jarg1); @@ -3233,6 +3239,18 @@ class NDalicPINVOKE { [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Wheel_timeStamp_get")] public static extern uint Wheel_timeStamp_get(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_GetDeviceName")] + public static extern string GetDeviceName(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_SetDeviceName")] + public static extern void SetDeviceName(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_GetDeviceClass")] + public static extern int GetDeviceClass(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_SetDeviceClass")] + public static extern void SetDeviceClass(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Actor_Property_PARENT_ORIGIN_get")] public static extern int Actor_Property_PARENT_ORIGIN_get(); diff --git a/Tizen.NUI/src/public/Key.cs b/Tizen.NUI/src/public/Key.cs index 9e71aeb..2834e53 100755 --- a/Tizen.NUI/src/public/Key.cs +++ b/Tizen.NUI/src/public/Key.cs @@ -66,6 +66,16 @@ namespace Tizen.NUI return ret; } + public string DeviceName + { + get + { + string ret = NDalicPINVOKE.GetDeviceName(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + /// /// Name given to the key pressed /// @@ -131,6 +141,17 @@ namespace Tizen.NUI } } + public DeviceClassType DeviceClass + { + get + { + int ret = NDalicPINVOKE.GetDeviceClass(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return (DeviceClassType)ret; + } + } + + /// /// Default Constructor. /// @@ -153,6 +174,15 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + public Key(Key rhs) : this(NDalicPINVOKE.new_Key__SWIG_2(Key.getCPtr(rhs)), true) { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Key Assign(Key rhs) { + Key ret = new Key(NDalicPINVOKE.Key_Assign(swigCPtr, Key.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } /// /// Checks to see if Shift key modifier has been supplied. /// @@ -288,4 +318,16 @@ namespace Tizen.NUI } + public enum DeviceClassType + { + None, + Seat, + Keyboard, + Mouse, + Touch, + Pen, + Pointer, + Gamepad + } + } -- 2.7.4