From: xb.teng Date: Mon, 27 Mar 2017 07:54:28 +0000 (+0800) Subject: nui 0.2.32 manual merge, mapping to dali 1.2.32 X-Git-Tag: submit/trunk/20170823.075128~91^2~242 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5cf07c13c7a7fc2b6ea9900ef270602615ee0cef;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git nui 0.2.32 manual merge, mapping to dali 1.2.32 Change-Id: I86bb8e8261736bb6bcfb948a55dfc44ab9133f9d --- diff --git a/packaging/csapi-nui.spec b/packaging/csapi-nui.spec index d961572..0c2a580 100755 --- a/packaging/csapi-nui.spec +++ b/packaging/csapi-nui.spec @@ -1,7 +1,7 @@ Name: csapi-nui Summary: dali-NUI -Version: 0.2.31 -Release: pre2 +Version: 0.2.32 +Release: 1 Group: Development/Libraries License: Apache-2.0 URL: https://www.tizen.org diff --git a/src/Tizen.NUI/Tizen.NUI.csproj b/src/Tizen.NUI/Tizen.NUI.csproj index a4c0e50..f9d47be 100755 --- a/src/Tizen.NUI/Tizen.NUI.csproj +++ b/src/Tizen.NUI/Tizen.NUI.csproj @@ -49,7 +49,6 @@ - @@ -85,6 +84,7 @@ + @@ -97,8 +97,8 @@ - + @@ -112,6 +112,7 @@ + @@ -165,10 +166,6 @@ - - - - @@ -203,8 +200,6 @@ - - @@ -252,6 +247,7 @@ + @@ -293,6 +289,7 @@ + @@ -305,7 +302,8 @@ - + + @@ -316,11 +314,13 @@ + + @@ -331,6 +331,7 @@ + @@ -348,6 +349,7 @@ + diff --git a/src/Tizen.NUI/Tizen.NUI.project.json b/src/Tizen.NUI/Tizen.NUI.project.json index d798450..f44b2c7 100755 --- a/src/Tizen.NUI/Tizen.NUI.project.json +++ b/src/Tizen.NUI/Tizen.NUI.project.json @@ -1,10 +1,9 @@ { "dependencies": { - "Microsoft.CSharp": "4.3.0", + "Microsoft.CSharp": "4.0.1", "NETStandard.Library": "1.6.0", - "System.Reflection": "4.3.0", - "System.Reflection.TypeExtensions": "4.3.0", - "Tizen": "1.0.2", + "System.Reflection": "4.1.0", + "System.Reflection.TypeExtensions": "4.1.0", "Tizen.Applications": "1.0.3" }, "frameworks": { diff --git a/src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs b/src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs new file mode 100755 index 0000000..defb96b --- /dev/null +++ b/src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs @@ -0,0 +1,90 @@ +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 3.0.12 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ +#define DOT_NET_CORE + +#if (DOT_NET_CORE) +using System.Reflection; +#endif + +namespace Tizen.NUI { + +internal class CustomAlgorithmInterface : global::System.IDisposable { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal CustomAlgorithmInterface(global::System.IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CustomAlgorithmInterface obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~CustomAlgorithmInterface() { + Dispose(); + } + + public virtual void Dispose() { + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_CustomAlgorithmInterface(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } + + public virtual Actor GetNextFocusableActor(Actor current, Actor proposed, View.FocusDirection direction) { + Actor ret = new Actor(NDalicPINVOKE.CustomAlgorithmInterface_GetNextFocusableActor(swigCPtr, Actor.getCPtr(current), Actor.getCPtr(proposed), (int)direction), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public CustomAlgorithmInterface() : this(NDalicPINVOKE.new_CustomAlgorithmInterface(), true) { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + SwigDirectorConnect(); + } + + private void SwigDirectorConnect() { + if (SwigDerivedClassHasMethod("GetNextFocusableActor", swigMethodTypes0)) + swigDelegate0 = new SwigDelegateCustomAlgorithmInterface_0(SwigDirectorGetNextFocusableActor); + NDalicPINVOKE.CustomAlgorithmInterface_director_connect(swigCPtr, swigDelegate0); + } + +#if (DOT_NET_CORE) + private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) { + global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, methodTypes); + bool hasDerivedMethod = methodInfo.GetType().GetTypeInfo().IsSubclassOf(typeof(CustomAlgorithmInterface)); + return hasDerivedMethod; + } +#else + private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) { + global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, methodTypes, null); + bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(CustomAlgorithmInterface)); + return hasDerivedMethod; + } +#endif + + private global::System.IntPtr SwigDirectorGetNextFocusableActor(global::System.IntPtr current, global::System.IntPtr proposed, int direction) { + return Actor.getCPtr(GetNextFocusableActor(new Actor(current, true), new Actor(proposed, true), (View.FocusDirection)direction)).Handle; + } + + public delegate global::System.IntPtr SwigDelegateCustomAlgorithmInterface_0(global::System.IntPtr current, global::System.IntPtr proposed, int direction); + + private SwigDelegateCustomAlgorithmInterface_0 swigDelegate0; + + private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { typeof(Actor), typeof(Actor), typeof(View.FocusDirection) }; +} + +} diff --git a/src/Tizen.NUI/src/internal/FriendAssembly.cs b/src/Tizen.NUI/src/internal/FriendAssembly.cs index 015fcf8..b580beb 100755 --- a/src/Tizen.NUI/src/internal/FriendAssembly.cs +++ b/src/Tizen.NUI/src/internal/FriendAssembly.cs @@ -20,7 +20,8 @@ // compile with: /target:Tizen.NUI.ExtTEST /keyfile:FriendAssemblies.snk using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Tizen.NUI.ExtTEST, PublicKey=00240000048000009400000006020000002400005253413100040000010001004d7c7c03a196ecb8e7cc5056750e1f40ee2bbe99f0e53a07f2538f2b0f450bd731b9dca3706503a0378baca74a09cf3af6261b330c031f44817ab6ed64189460765a402279d3e0c1fa7295ae1dccb2e3ff329705fd85b58d66ae7cb7e95ba06e0d847c3e3ba918798f579e5caeb1c6149955e6baf24236eec46227a623e494b1")] +[assembly: InternalsVisibleTo("Tizen.NUI.Extension.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001004d7c7c03a196ecb8e7cc5056750e1f40ee2bbe99f0e53a07f2538f2b0f450bd731b9dca3706503a0378baca74a09cf3af6261b330c031f44817ab6ed64189460765a402279d3e0c1fa7295ae1dccb2e3ff329705fd85b58d66ae7cb7e95ba06e0d847c3e3ba918798f579e5caeb1c6149955e6baf24236eec46227a623e494b1")] +[assembly: InternalsVisibleTo("Tizen.MM.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001004d7c7c03a196ecb8e7cc5056750e1f40ee2bbe99f0e53a07f2538f2b0f450bd731b9dca3706503a0378baca74a09cf3af6261b330c031f44817ab6ed64189460765a402279d3e0c1fa7295ae1dccb2e3ff329705fd85b58d66ae7cb7e95ba06e0d847c3e3ba918798f579e5caeb1c6149955e6baf24236eec46227a623e494b1")] namespace Tizen.NUI { } \ No newline at end of file diff --git a/src/Tizen.NUI/src/internal/NDalic.cs b/src/Tizen.NUI/src/internal/NDalic.cs index 10c135e..8168d23 100755 --- a/src/Tizen.NUI/src/internal/NDalic.cs +++ b/src/Tizen.NUI/src/internal/NDalic.cs @@ -1013,6 +1013,39 @@ System.IntPtr ip2 = System.Runtime.InteropServices.Marshal.GetFunctionPointerFor } } + public static SWIGTYPE_p_Dali__SignalT_void_fboolF_t FocusChangedSignal(Window window) { + SWIGTYPE_p_Dali__SignalT_void_fboolF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fboolF_t(NDalicPINVOKE.FocusChangedSignal(Window.getCPtr(window)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static void SetAcceptFocus(Window window, bool accept) { + NDalicPINVOKE.SetAcceptFocus(Window.getCPtr(window), accept); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static bool IsFocusAcceptable(Window window) { + bool ret = NDalicPINVOKE.IsFocusAcceptable(Window.getCPtr(window)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public static void Show(Window window) { + NDalicPINVOKE.Show(Window.getCPtr(window)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static void Hide(Window window) { + NDalicPINVOKE.Hide(Window.getCPtr(window)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static bool IsVisible(Window window) { + bool ret = NDalicPINVOKE.IsVisible(Window.getCPtr(window)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + public static ViewImpl GetImplementation(View handle) { ViewImpl ret = new ViewImpl(NDalicPINVOKE.GetImplementation__SWIG_0(View.getCPtr(handle)), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -1073,6 +1106,11 @@ System.IntPtr ip2 = System.Runtime.InteropServices.Marshal.GetFunctionPointerFor return ret; } + public static void SetCustomAlgorithm(SWIGTYPE_p_KeyboardFocusManager keyboardFocusManager, CustomAlgorithmInterface arg1) { + NDalicPINVOKE.SetCustomAlgorithm(SWIGTYPE_p_KeyboardFocusManager.getCPtr(keyboardFocusManager), CustomAlgorithmInterface.getCPtr(arg1)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + public static readonly int VISUAL_PROPERTY_TYPE = NDalicPINVOKE.VISUAL_PROPERTY_TYPE_get(); public static readonly int VISUAL_PROPERTY_SHADER = NDalicPINVOKE.VISUAL_PROPERTY_SHADER_get(); diff --git a/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs b/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs index 4775b9f..ba9dc18 100755 --- a/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs +++ b/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs @@ -6158,6 +6158,24 @@ class NDalicPINVOKE { [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Window_IndicatorVisibilityChangedSignal")] public static extern global::System.IntPtr Window_IndicatorVisibilityChangedSignal(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_FocusChangedSignal")] + public static extern global::System.IntPtr FocusChangedSignal(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_SetAcceptFocus")] + public static extern void SetAcceptFocus(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2); + + [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_IsFocusAcceptable")] + public static extern bool IsFocusAcceptable(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_Show")] + public static extern void Show(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_Hide")] + public static extern void Hide(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_IsVisible")] + public static extern bool IsVisible(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_New__SWIG_0")] public static extern global::System.IntPtr Application_New__SWIG_0(); @@ -9986,6 +10004,21 @@ class NDalicPINVOKE { [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_LoadImageSynchronously__SWIG_2")] public static extern global::System.IntPtr LoadImageSynchronously__SWIG_2(string jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3, int jarg4, bool jarg5); + [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_delete_CustomAlgorithmInterface")] + public static extern void delete_CustomAlgorithmInterface(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_CustomAlgorithmInterface_GetNextFocusableActor")] + public static extern global::System.IntPtr CustomAlgorithmInterface_GetNextFocusableActor(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, int jarg4); + + [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_new_CustomAlgorithmInterface")] + public static extern global::System.IntPtr new_CustomAlgorithmInterface(); + + [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_CustomAlgorithmInterface_director_connect")] + public static extern void CustomAlgorithmInterface_director_connect(global::System.Runtime.InteropServices.HandleRef jarg1, CustomAlgorithmInterface.SwigDelegateCustomAlgorithmInterface_0 delegate0); + + [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_SetCustomAlgorithm")] + public static extern void SetCustomAlgorithm(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_ItemIdContainer_Clear")] public static extern void ItemIdContainer_Clear(global::System.Runtime.InteropServices.HandleRef jarg1); diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_KeyboardFocusManager.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_KeyboardFocusManager.cs new file mode 100755 index 0000000..5df75c1 --- /dev/null +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_KeyboardFocusManager.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 3.0.12 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace Tizen.NUI { + +internal class SWIGTYPE_p_KeyboardFocusManager { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal SWIGTYPE_p_KeyboardFocusManager(global::System.IntPtr cPtr, bool futureUse) { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + protected SWIGTYPE_p_KeyboardFocusManager() { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_KeyboardFocusManager obj) { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } +} + +} diff --git a/src/Tizen.NUI/src/public/Actor.cs b/src/Tizen.NUI/src/public/Actor.cs index 1771594..c894a4d 100755 --- a/src/Tizen.NUI/src/public/Actor.cs +++ b/src/Tizen.NUI/src/public/Actor.cs @@ -1567,11 +1567,7 @@ namespace Tizen.NUI */ } - /// - /// Gets/Sets the actor's mix color; this is an RGBA value. - /// The final color of the actor depends on its color mode. - /// Note : This is an asynchronous method. - /// + /* public Color MixColor { get @@ -1585,6 +1581,7 @@ namespace Tizen.NUI SetProperty(Actor.Property.COLOR, new Tizen.NUI.PropertyValue(value)); } } + */ /// /// Gets/Sets the actor's mix color red. diff --git a/src/Tizen.NUI/src/public/FocusManager.cs b/src/Tizen.NUI/src/public/FocusManager.cs index 4913dc8..2d4e4aa 100755 --- a/src/Tizen.NUI/src/public/FocusManager.cs +++ b/src/Tizen.NUI/src/public/FocusManager.cs @@ -31,6 +31,7 @@ namespace Tizen.NUI public class FocusManager : BaseHandle { private global::System.Runtime.InteropServices.HandleRef swigCPtr; + private CustomAlgorithmInterfaceWrapper _customAlgorithmInterfaceWrapper; internal FocusManager(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.FocusManager_SWIGUpcast(cPtr), cMemoryOwn) { @@ -531,6 +532,14 @@ namespace Tizen.NUI return ret; } + public void SetCustomAlgorithm(ICustomFocusAlgorithm arg0) { + _customAlgorithmInterfaceWrapper = new CustomAlgorithmInterfaceWrapper(); + _customAlgorithmInterfaceWrapper.SetFocusAlgorithm(arg0); + + NDalicPINVOKE.SetCustomAlgorithm(swigCPtr, CustomAlgorithmInterface.getCPtr(_customAlgorithmInterfaceWrapper)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + internal PreFocusChangeSignal PreFocusChangeSignal() { PreFocusChangeSignal ret = new PreFocusChangeSignal(NDalicManualPINVOKE.FocusManager_PreFocusChangeSignal(swigCPtr), false); @@ -571,5 +580,31 @@ namespace Tizen.NUI return instance; } } + + public interface ICustomFocusAlgorithm + { + View GetNextFocusableActor(View current, View proposed, View.FocusDirection direction); + } + + private class CustomAlgorithmInterfaceWrapper : CustomAlgorithmInterface + { + private FocusManager.ICustomFocusAlgorithm _customFocusAlgorithm; + + public CustomAlgorithmInterfaceWrapper() + { + } + + public void SetFocusAlgorithm(FocusManager.ICustomFocusAlgorithm customFocusAlgorithm) + { + _customFocusAlgorithm = customFocusAlgorithm; + } + + public override Actor GetNextFocusableActor(Actor current, Actor proposed, View.FocusDirection direction) + { + View currentView = View.DownCast(current); + View proposedView = View.DownCast(proposed); + return _customFocusAlgorithm.GetNextFocusableActor(currentView, proposedView, direction); + } + } } } diff --git a/src/Tizen.NUI/src/public/Window.cs b/src/Tizen.NUI/src/public/Window.cs index 623ebe6..fac98d1 100755 --- a/src/Tizen.NUI/src/public/Window.cs +++ b/src/Tizen.NUI/src/public/Window.cs @@ -73,6 +73,24 @@ namespace Tizen.NUI } } + public void Show() + { + NDalicPINVOKE.Show(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Hide() + { + NDalicPINVOKE.Hide(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void IsVisible() + { + NDalicPINVOKE.IsVisible(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + /// /// Creates an initialized handle to a new Window. ///