From: Kangho Hur Date: Wed, 27 Dec 2017 01:24:43 +0000 (+0000) Subject: Merge "[ElmSharp] Fixed the crash issue of Calendar" X-Git-Tag: 5.0.0-preview1-00423^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb397cb96316aa5fe0dfc14af9662eedda9c2528;hp=5e5815d2971632f27c17f08d75a570b1c1bfcfcb;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Merge "[ElmSharp] Fixed the crash issue of Calendar" --- diff --git a/src/Tizen.Messaging.Push/Tizen.Messaging.Push/PushImpl.cs b/src/Tizen.Messaging.Push/Tizen.Messaging.Push/PushImpl.cs index 35a5b37..8342b7a 100644 --- a/src/Tizen.Messaging.Push/Tizen.Messaging.Push/PushImpl.cs +++ b/src/Tizen.Messaging.Push/Tizen.Messaging.Push/PushImpl.cs @@ -26,8 +26,8 @@ namespace Tizen.Messaging.Push { private static readonly object _lock = new object(); private static PushImpl _instance; - private Interop.PushClient.VoidResultCallback registerResult; - private Interop.PushClient.VoidResultCallback unregisterResult; + private static Interop.PushClient.VoidResultCallback registerResult = null; + private static Interop.PushClient.VoidResultCallback unregisterResult = null; internal static PushImpl Instance { @@ -157,6 +157,12 @@ namespace Tizen.Messaging.Push { Log.Info(Interop.PushClient.LogTag, "Register Called"); var task = new TaskCompletionSource(); + if (registerResult != null) + { + Log.Error(Interop.PushClient.LogTag, "Register callback was already registered with same callback"); + return await task.Task; + } + registerResult = (Interop.PushClient.Result regResult, IntPtr msgPtr, IntPtr userData) => { Log.Info(Interop.PushClient.LogTag, "Register Callback Called with " + regResult); @@ -172,6 +178,11 @@ namespace Tizen.Messaging.Push { Log.Error(Interop.PushClient.LogTag, "Unable to set the Result for register"); } + lock (_lock) + { + Log.Error(Interop.PushClient.LogTag, "resigterResult is unset"); + registerResult = null; + } }; Interop.PushClient.ServiceError result = Interop.PushClient.ServiceRegister(_connection, registerResult, IntPtr.Zero); Log.Info(Interop.PushClient.LogTag, "Interop.PushClient.ServiceRegister Completed"); @@ -179,6 +190,11 @@ namespace Tizen.Messaging.Push { Log.Error(Interop.PushClient.LogTag, "Register failed with " + result); task.SetException(PushExceptionFactory.CreateResponseException(result)); + lock (_lock) + { + Log.Error(Interop.PushClient.LogTag, "resigterResult is unset (failed)"); + registerResult = null; + } } return await task.Task; } diff --git a/src/Tizen.NUI/src/internal/ActivatedSignalType.cs b/src/Tizen.NUI/src/internal/ActivatedSignalType.cs index e15df28..d7191c1 100755 --- a/src/Tizen.NUI/src/internal/ActivatedSignalType.cs +++ b/src/Tizen.NUI/src/internal/ActivatedSignalType.cs @@ -20,13 +20,7 @@ using System.ComponentModel; namespace Tizen.NUI { - /// - /// Please do not use! this will be deprecated - /// - /// 3 - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public class ActivatedSignalType : global::System.IDisposable + internal class ActivatedSignalType : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// diff --git a/src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs b/src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs index 9f601ae..a321300 100755 --- a/src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs +++ b/src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs @@ -20,13 +20,7 @@ using System.ComponentModel; namespace Tizen.NUI { - /// - /// Please do not use! this will be deprecated - /// - /// 4 - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public class ConnectionTrackerInterface : SignalObserver + internal class ConnectionTrackerInterface : SignalObserver { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/ImfEventSignalType.cs b/src/Tizen.NUI/src/internal/ImfEventSignalType.cs index 8726e02..a8702e2 100755 --- a/src/Tizen.NUI/src/internal/ImfEventSignalType.cs +++ b/src/Tizen.NUI/src/internal/ImfEventSignalType.cs @@ -20,13 +20,7 @@ using System.ComponentModel; namespace Tizen.NUI { - /// - /// Please do not use! this will be deprecated - /// - /// 3 - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public class ImfEventSignalType : global::System.IDisposable + internal class ImfEventSignalType : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// diff --git a/src/Tizen.NUI/src/internal/ImfVoidSignalType.cs b/src/Tizen.NUI/src/internal/ImfVoidSignalType.cs deleted file mode 100755 index 97bf8c9..0000000 --- a/src/Tizen.NUI/src/internal/ImfVoidSignalType.cs +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -using System; -using System.Runtime.InteropServices; -using System.ComponentModel; - -namespace Tizen.NUI -{ - /// - /// Please do not use! this will be deprecated - /// - /// 3 - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public class ImfVoidSignalType : global::System.IDisposable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - /// - /// swigCMemOwn - /// - /// 3 - protected bool swigCMemOwn; - - internal ImfVoidSignalType(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(ImfVoidSignalType obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - /// - /// A Flat to check if it is already disposed. - /// - /// 3 - protected bool disposed = false; - - /// - /// Dispose - /// - /// 3 - ~ImfVoidSignalType() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - /// - /// Dispose - /// - /// 3 - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - /// - /// Dispose - /// - /// 3 - protected virtual void Dispose(DisposeTypes type) - { - if (disposed) - { - return; - } - - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - - //Release your own unmanaged resources here. - //You should not access any managed member here except static instance. - //because the execution order of Finalizes is non-deterministic. - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicManualPINVOKE.delete_ImfVoidSignalType(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - /// - /// The contructor. - /// - /// 3 - public ImfVoidSignalType() : this(NDalicManualPINVOKE.new_ImfVoidSignalType(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Queries whether there are any connected slots. - /// - /// True if there are any slots connected to the signal - /// 3 - public bool Empty() - { - bool ret = NDalicManualPINVOKE.ImfVoidSignalType_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Queries the number of slots. - /// - /// The number of slots connected to this signal - /// 3 - public uint GetConnectionCount() - { - uint ret = NDalicManualPINVOKE.ImfVoidSignalType_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Connects a function. - /// - /// The function to connect - /// 3 - public void Connect(System.Delegate func) - { - System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicManualPINVOKE.ImfVoidSignalType_Connect__SWIG_0(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } - - /// - /// Disconnects a function. - /// - /// The function to disconnect - /// 3 - public void Disconnect(System.Delegate func) - { - System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicManualPINVOKE.ImfVoidSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } - /// - /// Connects a member function. - /// - /// An object which must implement the ConnectionTrackerInterface - /// The member function to connect - /// 4 - public void Connect(ConnectionTrackerInterface connectionTracker, SWIGTYPE_p_Dali__FunctorDelegate arg1) - { - NDalicManualPINVOKE.ImfVoidSignalType_Connect__SWIG_4(swigCPtr, ConnectionTrackerInterface.getCPtr(connectionTracker), SWIGTYPE_p_Dali__FunctorDelegate.getCPtr(arg1)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Emits the signal. - /// - /// 3 - public void Emit() - { - NDalicManualPINVOKE.ImfVoidSignalType_Emit(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - } - -} diff --git a/src/Tizen.NUI/src/internal/KeyboardResizedSignalType.cs b/src/Tizen.NUI/src/internal/KeyboardResizedSignalType.cs index 41b4c18..b43d6cc 100755 --- a/src/Tizen.NUI/src/internal/KeyboardResizedSignalType.cs +++ b/src/Tizen.NUI/src/internal/KeyboardResizedSignalType.cs @@ -20,13 +20,7 @@ using System.ComponentModel; namespace Tizen.NUI { - /// - /// Please do not use! this will be deprecated - /// - /// 4 - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public class KeyboardResizedSignalType : global::System.IDisposable + internal class KeyboardResizedSignalType : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// diff --git a/src/Tizen.NUI/src/internal/LanguageChangedSignalType.cs b/src/Tizen.NUI/src/internal/LanguageChangedSignalType.cs index aca37ea..b2dc323 100755 --- a/src/Tizen.NUI/src/internal/LanguageChangedSignalType.cs +++ b/src/Tizen.NUI/src/internal/LanguageChangedSignalType.cs @@ -20,13 +20,7 @@ using System.ComponentModel; namespace Tizen.NUI { - /// - /// Please do not use! this will be deprecated - /// - /// 4 - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public class LanguageChangedSignalType : global::System.IDisposable + internal class LanguageChangedSignalType : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs index 6fe4a73..ff1c2a8 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs @@ -13,13 +13,7 @@ using System.ComponentModel; namespace Tizen.NUI { - /// - /// This should be internal, please do not use. - /// - /// 4 - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public class SWIGTYPE_p_CallbackBase + internal class SWIGTYPE_p_CallbackBase { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs index 9896aa3..4909b41 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs @@ -13,13 +13,7 @@ using System.ComponentModel; namespace Tizen.NUI { - /// - /// This should be internal, please do not use. - /// - /// 4 - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public class SWIGTYPE_p_Dali__CallbackBase + internal class SWIGTYPE_p_Dali__CallbackBase { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs index 3dcd4cf..a820f4a 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs @@ -13,13 +13,7 @@ using System.ComponentModel; namespace Tizen.NUI { - /// - /// This should be internal, please do not use. - /// - /// 4 - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public class SWIGTYPE_p_Dali__FunctorDelegate + internal class SWIGTYPE_p_Dali__FunctorDelegate { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/SignalObserver.cs b/src/Tizen.NUI/src/internal/SignalObserver.cs index dce29d4..c8b27ce 100755 --- a/src/Tizen.NUI/src/internal/SignalObserver.cs +++ b/src/Tizen.NUI/src/internal/SignalObserver.cs @@ -21,13 +21,7 @@ using System.ComponentModel; namespace Tizen.NUI { - /// - /// Please do not use! this will be deprecated - /// - /// 4 - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public class SignalObserver : global::System.IDisposable + internal class SignalObserver : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// diff --git a/src/Tizen.NUI/src/internal/SlotObserver.cs b/src/Tizen.NUI/src/internal/SlotObserver.cs index 5435c05..b765924 100755 --- a/src/Tizen.NUI/src/internal/SlotObserver.cs +++ b/src/Tizen.NUI/src/internal/SlotObserver.cs @@ -20,15 +20,7 @@ using System.ComponentModel; namespace Tizen.NUI { - //Please do not use! this will be internal - /// - /// Abstract Interface used by a slot to inform a signal it is disconnecting.
- /// This is used by the slot if wants to disconnect or is deleted.
- ///
- /// 4 - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public class SlotObserver : global::System.IDisposable + internal class SlotObserver : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// swigCMemOwn. diff --git a/src/Tizen.NUI/src/internal/StatusSignalType.cs b/src/Tizen.NUI/src/internal/StatusSignalType.cs index 91302d1..90864d5 100755 --- a/src/Tizen.NUI/src/internal/StatusSignalType.cs +++ b/src/Tizen.NUI/src/internal/StatusSignalType.cs @@ -20,13 +20,7 @@ using System.ComponentModel; namespace Tizen.NUI { - /// - /// Please do not use! this will be deprecated - /// - /// 3 - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public class StatusSignalType : global::System.IDisposable + internal class StatusSignalType : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; /// diff --git a/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs b/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs index 3641ddb..84f4b62 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs @@ -193,24 +193,6 @@ namespace Tizen.NUI.BaseComponents } /// - /// Downcasts a handle to imageView handle. - /// - /// Please do not use! this will be deprecated! - /// Instead please use as keyword. - /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use as keyword instead! " + - "Like: " + - "BaseHandle handle = new ImageView(imagePath); " + - "ImageView image = handle as ImageView")] - [EditorBrowsable(EditorBrowsableState.Never)] - public new static ImageView DownCast(BaseHandle handle) - { - ImageView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as ImageView; - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// /// Sets this ImageView from the given URL.
/// If the URL is empty, ImageView will not display anything.
///
diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs index 14ab512..2cc141b 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs @@ -139,27 +139,6 @@ namespace Tizen.NUI.BaseComponents } /// - /// Downcasts a handle to textLabel handle - /// - /// - /// - /// 3 - /// Please do not use! this will be deprecated! - /// Instead please use as keyword. - [Obsolete("Please do not use! This will be deprecated! Please use as keyword instead! " + - "Like: " + - "BaseHandle handle = new TextLabel(\"Hello World!\"); " + - "TextLabel label = handle as TextLabel")] - [EditorBrowsable(EditorBrowsableState.Never)] - public new static TextLabel DownCast(BaseHandle handle) - { - TextLabel ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TextLabel; - - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// /// The TranslatableText property.
/// The text can set the SID value.
///
diff --git a/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs index c8ebfd4..37d437e 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs @@ -1154,39 +1154,6 @@ namespace Tizen.NUI.BaseComponents if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - /// - /// Downcasts a handle to view handle.
- /// If handle points to a view, the downcast produces a valid handle.
- /// If not, the returned handle is left uninitialized.
- ///
- /// A handle to an object. - /// A handle to a view or an uninitialized handle. - /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use as keyword instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public static View DownCast(BaseHandle handle) - { - View ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as View; - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// [Obsolete("Please do not use! this will be deprecated, instead please use as keyword.")] - /// - /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use as keyword instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public static T DownCast(View view) where T : View - { - T ret = Registry.GetManagedBaseHandleFromNativePtr(view) as T; - if (ret != null) - { - return ret; - } - return null; - } - private View ConvertIdToView(uint id) { View view = null; @@ -4233,103 +4200,6 @@ namespace Tizen.NUI.BaseComponents } /// - /// [Obsolete("Please do not use! this will be deprecated")] - /// - /// 3 - /// Please do not use! this will be deprecated! - /// Instead please use AddedToWindow. - [Obsolete("Please do not use! This will be deprecated! Please use AddedToWindow instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public event EventHandler OnWindowEvent - { - add - { - if (_onWindowEventHandler == null) - { - _onWindowEventCallback = OnWindow; - this.OnWindowSignal().Connect(_onWindowEventCallback); - } - - _onWindowEventHandler += value; - } - - remove - { - _onWindowEventHandler -= value; - - if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false) - { - this.OnWindowSignal().Disconnect(_onWindowEventCallback); - } - } - } - - /// - /// [Obsolete("Please do not use! this will be deprecated")] - /// - /// 3 - /// Please do not use! this will be deprecated! - /// Instead please use RemovedFromWindow. - [Obsolete("Please do not use! This will be deprecated! Please use RemovedFromWindow instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public event EventHandler OffWindowEvent - { - add - { - if (_offWindowEventHandler == null) - { - _offWindowEventCallback = OffWindow; - this.OffWindowSignal().Connect(_offWindowEventCallback); - } - - _offWindowEventHandler += value; - } - - remove - { - _offWindowEventHandler -= value; - - if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false) - { - this.OffWindowSignal().Disconnect(_offWindowEventCallback); - } - } - } - - /// - /// [Obsolete("Please do not use! this will be deprecated")] - /// - /// 3 - /// Please do not use! this will be deprecated! - /// Instead please use Relayout. - [Obsolete("Please do not use! This will be deprecated! Please use Relayout instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public event EventHandler OnRelayoutEvent - { - add - { - if (_onRelayoutEventHandler == null) - { - _onRelayoutEventCallback = OnRelayout; - this.OnRelayoutSignal().Connect(_onRelayoutEventCallback); - } - - _onRelayoutEventHandler += value; - } - - remove - { - _onRelayoutEventHandler -= value; - - if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false) - { - this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback); - } - - } - } - - /// /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!" /// /// 3 diff --git a/src/Tizen.NUI/src/public/ImfManager.cs b/src/Tizen.NUI/src/public/ImfManager.cs index 41c33c9..226577c 100755 --- a/src/Tizen.NUI/src/public/ImfManager.cs +++ b/src/Tizen.NUI/src/public/ImfManager.cs @@ -87,31 +87,6 @@ namespace Tizen.NUI KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback); } - if (_imfManagerLanguageChangedEventCallback != null) - { - LanguageChangedSignal().Disconnect(_imfManagerLanguageChangedEventCallback); - } - - if (_imfManagerResizedEventCallback != null) - { - ResizedSignal().Disconnect(_imfManagerResizedEventCallback); - } - - if (_imfManagerStatusChangedEventCallback != null) - { - StatusChangedSignal().Disconnect(_imfManagerStatusChangedEventCallback); - } - - if (_imfManagerEventReceivedEventCallback != null) - { - EventReceivedSignal().Disconnect(_imfManagerEventReceivedEventCallback); - } - - if (_imfManagerActivatedEventCallback != null) - { - ActivatedSignal().Disconnect(_imfManagerActivatedEventCallback); - } - if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) @@ -261,27 +236,6 @@ namespace Tizen.NUI /// /// The pre-edit or the commit string. /// - /// /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use PredictiveString instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public string predictiveString - { - set - { - NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - string ret = NDalicManualPINVOKE.ImfManager_ImfEventData_predictiveString_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - /// - /// The pre-edit or the commit string. - /// /// 4 public string PredictiveString { @@ -301,28 +255,6 @@ namespace Tizen.NUI /// /// The name of the event from the IMF. /// - /// Please do not use! this will be deprecated - /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use EventName instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public ImfManager.ImfEvent eventName - { - set - { - NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_set(swigCPtr, (int)value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - ImfManager.ImfEvent ret = (ImfManager.ImfEvent)NDalicManualPINVOKE.ImfManager_ImfEventData_eventName_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - /// - /// The name of the event from the IMF. - /// /// 4 public ImfManager.ImfEvent EventName { @@ -342,28 +274,6 @@ namespace Tizen.NUI /// /// The start position from the current cursor position to start deleting characters. /// - /// Please do not use! this will be deprecated - /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use CursorOffset instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public int cursorOffset - { - set - { - NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_cursorOffset_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - /// - /// The start position from the current cursor position to start deleting characters. - /// /// 4 public int CursorOffset { @@ -383,28 +293,6 @@ namespace Tizen.NUI /// /// The number of characters to delete from the cursorOffset. /// - /// Please do not use! this will be deprecated - /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use NumberOfChars instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public int numberOfChars - { - set - { - NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - int ret = NDalicManualPINVOKE.ImfManager_ImfEventData_numberOfChars_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - /// - /// The number of characters to delete from the cursorOffset. - /// /// 4 public int NumberOfChars { @@ -565,28 +453,6 @@ namespace Tizen.NUI /// /// The current text string. /// - /// Please do not use! this will be deprecated - /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use CurrentText instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public string currentText - { - set - { - NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - string ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_currentText_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - /// - /// The current text string. - /// /// 4 public string CurrentText { @@ -606,28 +472,6 @@ namespace Tizen.NUI /// /// The current text string. /// - /// Please do not use! this will be deprecated - /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use CursorPosition instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public int cursorPosition - { - set - { - NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - int ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_cursorPosition_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - /// - /// The current text string. - /// /// 4 public int CursorPosition { @@ -647,28 +491,6 @@ namespace Tizen.NUI /// /// If the cursor position needs to be updated. /// - /// Please do not use! this will be deprecated - /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use Update instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool update - { - set - { - NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_update_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - /// - /// If the cursor position needs to be updated. - /// /// 4 public bool Update { @@ -688,28 +510,6 @@ namespace Tizen.NUI /// /// Flags if preedit reset is required. /// - /// Please do not use! this will be deprecated - /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use PreeditResetRequired instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public bool preeditResetRequired - { - set - { - NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - bool ret = NDalicManualPINVOKE.ImfManager_ImfCallbackData_preeditResetRequired_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - /// - /// Flags if preedit reset is required. - /// /// 4 public bool PreeditResetRequired { @@ -1035,76 +835,6 @@ namespace Tizen.NUI /// /// ImfManager activated event arguments. /// - /// Please do not use! this will be deprecated - /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use ActivatedEventArgs instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public class ImfManagerActivatedEventArgs : EventArgs - { - /// - /// ImfManager - /// - /// 3 - public ImfManager ImfManager - { - get; - set; - } - } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void ImfManagerActivatedEventCallbackType(global::System.IntPtr data); - private ImfManagerActivatedEventCallbackType _imfManagerActivatedEventCallback; - private event EventHandler _imfManagerActivatedEventHandler; - - /// - /// ImfManager activated event. - /// - ///Please do not use! this will be deprecated - /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use Activated instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public event EventHandler ImfManagerActivated - { - add - { - if (_imfManagerActivatedEventHandler == null) - { - _imfManagerActivatedEventCallback = OnImfManagerActivated; - ActivatedSignal().Connect(_imfManagerActivatedEventCallback); - } - - _imfManagerActivatedEventHandler += value; - } - remove - { - _imfManagerActivatedEventHandler -= value; - - if (_imfManagerActivatedEventHandler == null && _imfManagerActivatedEventCallback != null) - { - ActivatedSignal().Disconnect(_imfManagerActivatedEventCallback); - } - } - } - - private void OnImfManagerActivated(global::System.IntPtr data) - { - ImfManagerActivatedEventArgs e = new ImfManagerActivatedEventArgs(); - - if (data != null) - { - e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager; - } - - if (_imfManagerActivatedEventHandler != null) - { - _imfManagerActivatedEventHandler(this, e); - } - } - - /// - /// ImfManager activated event arguments. - /// /// 4 public class ActivatedEventArgs : EventArgs { @@ -1166,14 +896,7 @@ namespace Tizen.NUI } } - /// - /// ImfManager activated signal. - /// - /// Please do not use! this will be internal - /// 3 - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public ActivatedSignalType ActivatedSignal() + internal ActivatedSignalType ActivatedSignal() { ActivatedSignalType ret = new ActivatedSignalType(NDalicManualPINVOKE.ImfManager_ActivatedSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -1183,75 +906,6 @@ namespace Tizen.NUI /// /// ImfManager event received event arguments. /// - /// Please do not use! this will be deprecated - /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use EventReceivedEventArgs instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public class ImfManagerEventReceivedEventArgs : EventArgs - { - /// - /// ImfManager - /// - /// 3 - public ImfManager ImfManager - { - get; - set; - } - } - - private delegate void ImfManagerEventReceivedEventCallbackType(global::System.IntPtr data); - private ImfManagerEventReceivedEventCallbackType _imfManagerEventReceivedEventCallback; - private event EventHandler _imfManagerEventReceivedEventHandler; - - /// - /// ImfManager event received. - /// - ///Please do not use! this will be deprecated - /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use EventReceived instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public event EventHandler ImfManagerEventReceived - { - add - { - if (_imfManagerEventReceivedEventHandler == null) - { - _imfManagerEventReceivedEventCallback = OnImfManagerEventReceived; - EventReceivedSignal().Connect(_imfManagerEventReceivedEventCallback); - } - - _imfManagerEventReceivedEventHandler += value; - } - remove - { - _imfManagerEventReceivedEventHandler -= value; - - if (_imfManagerEventReceivedEventHandler == null && _imfManagerEventReceivedEventCallback != null) - { - EventReceivedSignal().Disconnect(_imfManagerEventReceivedEventCallback); - } - } - } - - private void OnImfManagerEventReceived(global::System.IntPtr data) - { - ImfManagerEventReceivedEventArgs e = new ImfManagerEventReceivedEventArgs(); - - if (data != null) - { - e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager; - } - - if (_imfManagerEventReceivedEventHandler != null) - { - _imfManagerEventReceivedEventHandler(this, e); - } - } - - /// - /// ImfManager event received event arguments. - /// /// 4 public class EventReceivedEventArgs : EventArgs { @@ -1336,14 +990,7 @@ namespace Tizen.NUI } } - /// - /// ImfManager event received signal. - /// - /// Please do not use! this will be internal - /// 3 - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public ImfEventSignalType EventReceivedSignal() + internal ImfEventSignalType EventReceivedSignal() { ImfEventSignalType ret = new ImfEventSignalType(NDalicManualPINVOKE.ImfManager_EventReceivedSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -1353,75 +1000,6 @@ namespace Tizen.NUI /// /// ImfManager status changed event arguments. /// - ///Please do not use! this will be deprecated - /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use StatusChangedEventArgs instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public class ImfManagerStatusChangedEventArgs : EventArgs - { - /// - /// ImfManager - /// - /// 3 - public ImfManager ImfManager - { - get; - set; - } - } - - private delegate void ImfManagerStatusChangedEventCallbackType(global::System.IntPtr data); - private ImfManagerStatusChangedEventCallbackType _imfManagerStatusChangedEventCallback; - private event EventHandler _imfManagerStatusChangedEventHandler; - - /// - /// ImfManager status changed. - /// - /// Please do not use! this will be deprecated - /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use StatusChanged instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public event EventHandler ImfManagerStatusChanged - { - add - { - if (_imfManagerStatusChangedEventHandler == null) - { - _imfManagerStatusChangedEventCallback = OnImfManagerStatusChanged; - StatusChangedSignal().Connect(_imfManagerStatusChangedEventCallback); - } - - _imfManagerStatusChangedEventHandler += value; - } - remove - { - _imfManagerStatusChangedEventHandler -= value; - - if (_imfManagerStatusChangedEventHandler == null && _imfManagerStatusChangedEventCallback != null) - { - StatusChangedSignal().Disconnect(_imfManagerStatusChangedEventCallback); - } - } - } - - private void OnImfManagerStatusChanged(global::System.IntPtr data) - { - ImfManagerStatusChangedEventArgs e = new ImfManagerStatusChangedEventArgs(); - - if (data != null) - { - e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager; - } - - if (_imfManagerStatusChangedEventHandler != null) - { - _imfManagerStatusChangedEventHandler(this, e); - } - } - - /// - /// ImfManager status changed event arguments. - /// /// 4 public class StatusChangedEventArgs : EventArgs { @@ -1479,14 +1057,7 @@ namespace Tizen.NUI } } - /// - /// ImfManager status changed signal. - /// - ///Please do not use! this will be internal - /// 3 - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public StatusSignalType StatusChangedSignal() + internal StatusSignalType StatusChangedSignal() { StatusSignalType ret = new StatusSignalType(NDalicManualPINVOKE.ImfManager_StatusChangedSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -1494,75 +1065,6 @@ namespace Tizen.NUI } /// - /// ImfManager resized event arguments. - /// - ///Please do not use! this will be deprecated - /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use ResizedEventArgs instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public class ImfManagerResizedEventArgs : EventArgs - { - /// - /// ImfManager - /// - /// 3 - public ImfManager ImfManager - { - get; - set; - } - } - - private delegate void ImfManagerResizedEventCallbackType(IntPtr data); - private ImfManagerResizedEventCallbackType _imfManagerResizedEventCallback; - private event EventHandler _imfManagerResizedEventHandler; - - /// - /// ImfManager resized event. - /// - ///Please do not use! this will be deprecated - /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use Resized instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public event EventHandler ImfManagerResized - { - add - { - if (_imfManagerResizedEventHandler == null) - { - _imfManagerResizedEventCallback = OnImfManagerResized; - ResizedSignal().Connect(_imfManagerResizedEventCallback); - } - - _imfManagerResizedEventHandler += value; - } - remove - { - _imfManagerResizedEventHandler -= value; - - if (_imfManagerResizedEventHandler == null && _imfManagerResizedEventCallback != null) - { - ResizedSignal().Disconnect(_imfManagerResizedEventCallback); - } - } - } - - private void OnImfManagerResized(IntPtr data) - { - ImfManagerResizedEventArgs e = new ImfManagerResizedEventArgs(); - - if (data != null) - { - e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager; - } - - if (_imfManagerResizedEventHandler != null) - { - _imfManagerResizedEventHandler(this, e); - } - } - - /// /// ImfManager resized event. /// /// 4 @@ -1621,14 +1123,7 @@ namespace Tizen.NUI } } - /// - /// ImfManager resized signal. - /// - ///Please do not use! this will be internal - /// 3 - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public KeyboardResizedSignalType ResizedSignal() + internal KeyboardResizedSignalType ResizedSignal() { KeyboardResizedSignalType ret = new KeyboardResizedSignalType(NDalicManualPINVOKE.ImfManager_ResizedSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -1636,75 +1131,6 @@ namespace Tizen.NUI } /// - /// ImfManager language changed event arguments. - /// - ///Please do not use! this will be deprecated - /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use LanguageChangedEventArgs instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public class ImfManagerLanguageChangedEventArgs : EventArgs - { - /// - /// ImfManager - /// - /// 3 - public ImfManager ImfManager - { - get; - set; - } - } - - private delegate void ImfManagerLanguageChangedEventCallbackType(IntPtr data); - private ImfManagerLanguageChangedEventCallbackType _imfManagerLanguageChangedEventCallback; - private event EventHandler _imfManagerLanguageChangedEventHandler; - - /// - /// ImfManager language changed event. - /// - ///Please do not use! this will be deprecated - /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use LanguageChanged instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public event EventHandler ImfManagerLanguageChanged - { - add - { - if (_imfManagerLanguageChangedEventHandler == null) - { - _imfManagerLanguageChangedEventCallback = OnImfManagerLanguageChanged; - LanguageChangedSignal().Connect(_imfManagerLanguageChangedEventCallback); - } - - _imfManagerLanguageChangedEventHandler += value; - } - remove - { - _imfManagerLanguageChangedEventHandler -= value; - - if (_imfManagerLanguageChangedEventHandler == null && _imfManagerLanguageChangedEventCallback != null) - { - LanguageChangedSignal().Disconnect(_imfManagerLanguageChangedEventCallback); - } - } - } - - private void OnImfManagerLanguageChanged(IntPtr data) - { - ImfManagerLanguageChangedEventArgs e = new ImfManagerLanguageChangedEventArgs(); - - if (data != null) - { - e.ImfManager = Registry.GetManagedBaseHandleFromNativePtr(data) as ImfManager; - } - - if (_imfManagerLanguageChangedEventHandler != null) - { - _imfManagerLanguageChangedEventHandler(this, e); - } - } - - /// /// ImfManager language changed event args. /// /// 4 @@ -1763,14 +1189,7 @@ namespace Tizen.NUI } } - /// - /// ImfManager language changed signal. - /// - ///Please do not use! this will be internal - /// 3 - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public LanguageChangedSignalType LanguageChangedSignal() + internal LanguageChangedSignalType LanguageChangedSignal() { LanguageChangedSignalType ret = new LanguageChangedSignalType(NDalicManualPINVOKE.ImfManager_LanguageChangedSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); diff --git a/src/Tizen.NUI/src/public/NUIApplication.cs b/src/Tizen.NUI/src/public/NUIApplication.cs index 3b70b65..000cc7a 100755 --- a/src/Tizen.NUI/src/public/NUIApplication.cs +++ b/src/Tizen.NUI/src/public/NUIApplication.cs @@ -176,7 +176,7 @@ namespace Tizen.NUI // Dali's default layer is default center origin. need to change as top left. // NUI's Layer is like a transparent film which covers entire window. (Layer is not an actor of Dali) // otherwise, this makes ScreenPosition as wrong value. - Layer defaultLayer = Window.GetDefaultLayer(); + Layer defaultLayer = Window.Instance.GetDefaultLayer(); defaultLayer.SetParentOrigin(Tizen.NUI.ParentOrigin.TopLeft); defaultLayer.SetAnchorPoint(Tizen.NUI.PivotPoint.TopLeft); } @@ -256,19 +256,5 @@ namespace Tizen.NUI resourceManager = value; } } - - /// - /// Gets the window instance. - /// - /// 3 - [Obsolete("Please do not use! This will be deprecated!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public Window Window - { - get - { - return Window.Instance; - } - } } } diff --git a/src/Tizen.NUI/src/public/Position.cs b/src/Tizen.NUI/src/public/Position.cs index e8b1dd5..38d5382 100755 --- a/src/Tizen.NUI/src/public/Position.cs +++ b/src/Tizen.NUI/src/public/Position.cs @@ -927,62 +927,5 @@ namespace Tizen.NUI return new Position(vec.X, vec.Y, vec.Z); } - /// - /// [Obsolete("Please do not use! this will be deprecated")] - /// - /// 3 - /// Please do not use! this will be deprecated! - /// Instead please use PivotPointTopRight. - [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint.TopRight instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public static Position AnchorPointTopRight - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopRight_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - /// - /// [Obsolete("Please do not use! this will be deprecated")] - /// - /// 3 - /// Please do not use! this will be deprecated! - /// Instead please use PivotPointCenterLeft. - [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint.CenterLeft instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public static Position AnchorPointCenterLeft - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterLeft_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - /// - /// [Obsolete("Please do not use! this will be deprecated")] - /// - /// 3 - /// Please do not use! this will be deprecated! - /// Instead please use PivotPointBottomRight. - [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint.BottomRight instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public static Position AnchorPointBottomRight - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomRight_get(); - Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - } } \ No newline at end of file diff --git a/src/Tizen.Security.TEEC/Interop/Interop.Libteec.cs b/src/Tizen.Security.TEEC/Interop/Interop.Libteec.cs index 3700b90..d01fa05 100644 --- a/src/Tizen.Security.TEEC/Interop/Interop.Libteec.cs +++ b/src/Tizen.Security.TEEC/Interop/Interop.Libteec.cs @@ -93,6 +93,9 @@ internal static partial class Interop [DllImport(Libraries.Libteec, EntryPoint = "TEEC_OpenSession", CallingConvention = CallingConvention.Cdecl)] static public extern int OpenSession(ref TEEC_Context context, ref TEEC_Session session, ref TEEC_UUID destination, uint connectionMethod, byte[] connectionData, ref TEEC_Operation operation, out uint returnOrigin); + [DllImport(Libraries.Libteec, EntryPoint = "TEEC_OpenSession", CallingConvention = CallingConvention.Cdecl)] + static public extern int OpenSession(ref TEEC_Context context, ref TEEC_Session session, ref TEEC_UUID destination, uint connectionMethod, byte[] connectionData, IntPtr operation, out uint returnOrigin); + /// /// This function closes a session which has been opened with a trusted application. /// All commands within the session must have completed before this function can be called. @@ -115,6 +118,9 @@ internal static partial class Interop [DllImport(Libraries.Libteec, EntryPoint = "TEEC_InvokeCommand", CallingConvention = CallingConvention.Cdecl)] static public extern int InvokeCommand(ref TEEC_Session session, uint commandID, ref TEEC_Operation operation, out uint returnOrigin); + [DllImport(Libraries.Libteec, EntryPoint = "TEEC_InvokeCommand", CallingConvention = CallingConvention.Cdecl)] + static public extern int InvokeCommand(ref TEEC_Session session, uint commandID, IntPtr operation, out uint returnOrigin); + /// /// This function requests the cancelation of a pending open session operation or a command invocation /// operation. As this is a synchronous API, this function must be called from a thread other than the one diff --git a/src/Tizen.Security.TEEC/Interop/Interop.Types.cs b/src/Tizen.Security.TEEC/Interop/Interop.Types.cs index ece1f6d..bd0ab94 100644 --- a/src/Tizen.Security.TEEC/Interop/Interop.Types.cs +++ b/src/Tizen.Security.TEEC/Interop/Interop.Types.cs @@ -56,38 +56,38 @@ internal static partial class Interop } } - [StructLayout(LayoutKind.Sequential)] - internal class TEEC_SharedMemory + [StructLayout(LayoutKind.Sequential,Pack=8)] + internal struct TEEC_SharedMemory { public IntPtr buffer; - public UInt32 size; + public UIntPtr size; public UInt32 flags; public IntPtr imp; } - [StructLayout(LayoutKind.Sequential)] + [StructLayout(LayoutKind.Sequential,Pack=8)] internal struct TEEC_Value { public UInt32 a; public UInt32 b; } - [StructLayout(LayoutKind.Sequential)] + [StructLayout(LayoutKind.Sequential, Pack=8)] internal struct TEEC_TempMemoryReference { public IntPtr buffer; - public UInt32 size; + public UIntPtr size; } - [StructLayout(LayoutKind.Sequential)] + [StructLayout(LayoutKind.Sequential, Pack=8)] internal struct TEEC_RegisteredMemoryReference { - public TEEC_SharedMemory parent; - public UInt32 size; - public UInt32 offset; + public IntPtr parent; + public UIntPtr size; + public UIntPtr offset; } - [StructLayout(LayoutKind.Explicit)] + [StructLayout(LayoutKind.Explicit, Pack=8)] internal struct TEEC_Parameter { [FieldOffset(0)] @@ -98,7 +98,7 @@ internal static partial class Interop public TEEC_Value value; } - [StructLayout(LayoutKind.Sequential)] + [StructLayout(LayoutKind.Sequential, Pack=8)] internal struct TEEC_Operation { public UInt32 started; diff --git a/src/Tizen.Security.TEEC/Tizen.Security.TEEC/Libteec.cs b/src/Tizen.Security.TEEC/Tizen.Security.TEEC/Libteec.cs index a9e7290..b5c875e 100644 --- a/src/Tizen.Security.TEEC/Tizen.Security.TEEC/Libteec.cs +++ b/src/Tizen.Security.TEEC/Tizen.Security.TEEC/Libteec.cs @@ -110,9 +110,16 @@ namespace Tizen.Security.TEEC public sealed class SharedMemory { internal Interop.TEEC_SharedMemory shm; - internal SharedMemory(Interop.TEEC_SharedMemory shm) + internal IntPtr shmptr; + internal SharedMemory(ref Interop.TEEC_SharedMemory shm) { this.shm=shm; + shmptr = Marshal.AllocHGlobal(Marshal.SizeOf(shm)); + Marshal.StructureToPtr(shm, shmptr, false); + } + ~SharedMemory() + { + Marshal.FreeHGlobal(shmptr); } /// /// This property represents the shared memory size in bytes. @@ -122,7 +129,7 @@ namespace Tizen.Security.TEEC /// partner public UInt32 Size { - get { return shm.size; } + get { return shm.size.ToUInt32(); } } /// /// This property represents the start address of the shared memory block. @@ -251,9 +258,16 @@ namespace Tizen.Security.TEEC base(type) { this.Parent = parent; - this.Size = size; - this.Offset = offset; + if (type == TEFRegisteredMemoryType.Whole) { + this.Size = parent.Size; + this.Offset = 0; + } + else { + this.Size = size; + this.Offset = offset; + } } + /// /// This property represents the shared memory that is referred to. /// @@ -332,82 +346,95 @@ namespace Tizen.Security.TEEC Close(); } - internal UInt32 InitParam(ref Interop.TEEC_Parameter dst, Parameter src) + static internal UInt32 InitParam(ref Interop.TEEC_Parameter[] dst, int i, Parameter src) { switch (src.NativeType) { - case (int)TEFValueType.Input: - case (int)TEFValueType.Output: - case (int)TEFValueType.InOut: - dst.value.a = ((Value)src).A; - dst.value.b = ((Value)src).B; - break; - - case (int)TEFTempMemoryType.Input: - case (int)TEFTempMemoryType.Output: - case (int)TEFTempMemoryType.InOut: - dst.tmpref.buffer = ((TempMemoryReference)src).Buffer; - dst.tmpref.size = ((TempMemoryReference)src).Size; - break; - - case (int)TEFRegisteredMemoryType.Whole: - case (int)TEFRegisteredMemoryType.PartialInput: - case (int)TEFRegisteredMemoryType.PartialOutput: - case (int)TEFRegisteredMemoryType.PartialInOut: - dst.memref.parent = ((RegisteredMemoryReference)src).Parent.shm; - dst.memref.size = ((RegisteredMemoryReference)src).Size; - dst.memref.offset = ((RegisteredMemoryReference)src).Offset; - break; - - default: return 0; + case (int)TEFValueType.Input: + case (int)TEFValueType.Output: + case (int)TEFValueType.InOut: + dst[i].value.a = ((Value)src).A; + dst[i].value.b = ((Value)src).B; + break; + + case (int)TEFTempMemoryType.Input: + case (int)TEFTempMemoryType.Output: + case (int)TEFTempMemoryType.InOut: + dst[i].tmpref.buffer = ((TempMemoryReference)src).Buffer; + dst[i].tmpref.size = new UIntPtr(((TempMemoryReference)src).Size); + break; + + case (int)TEFRegisteredMemoryType.Whole: + case (int)TEFRegisteredMemoryType.PartialInput: + case (int)TEFRegisteredMemoryType.PartialOutput: + case (int)TEFRegisteredMemoryType.PartialInOut: + RegisteredMemoryReference rmr = (RegisteredMemoryReference)src; + dst[i].memref.parent = rmr.Parent.shmptr; + dst[i].memref.size = new UIntPtr(rmr.Size); + dst[i].memref.offset = new UIntPtr(rmr.Offset); + break; + + default: return 0; } return src.NativeType; } - internal void UpdateParam(Interop.TEEC_Parameter src, ref Parameter dst) + static internal void UpdateParam(Interop.TEEC_Parameter src, ref Parameter[] dst, int i) { - switch (dst.NativeType) { + switch (dst[i].NativeType) { case (int)TEFValueType.Input: case (int)TEFValueType.Output: case (int)TEFValueType.InOut: - ((Value)dst).A = src.value.a; - ((Value)dst).B = src.value.b; + ((Value)dst[i]).A = src.value.a; + ((Value)dst[i]).B = src.value.b; break; case (int)TEFTempMemoryType.Input: case (int)TEFTempMemoryType.Output: case (int)TEFTempMemoryType.InOut: - ((TempMemoryReference)dst).Size = src.tmpref.size; + ((TempMemoryReference)dst[i]).Size = src.tmpref.size.ToUInt32(); break; case (int)TEFRegisteredMemoryType.Whole: case (int)TEFRegisteredMemoryType.PartialInput: case (int)TEFRegisteredMemoryType.PartialOutput: case (int)TEFRegisteredMemoryType.PartialInOut: - ((RegisteredMemoryReference)dst).Size = src.memref.size; + ((RegisteredMemoryReference)dst[i]).Size = src.memref.size.ToUInt32(); break; default: break; } } + static internal Interop.TEEC_Operation Create_TEEC_Operation() { + Interop.TEEC_Operation op = new Interop.TEEC_Operation(); + op.started=0; + op.paramTypes=0; + op.paramlist = new Interop.TEEC_Parameter[4]; + return op; + } + internal void Open(Guid destination, uint loginMethod, byte[] connectionData, Parameter[] paramlist) { Interop.TEEC_UUID uuid = Interop.TEEC_UUID.ToTeecUuid(destination); - Interop.TEEC_Operation op = new Interop.TEEC_Operation(); - op.started=0; - op.paramTypes=0; - for (int i=0; i < 4 && i < paramlist.Length; ++i) { - op.paramTypes |= InitParam(ref op.paramlist[i], paramlist[i]) << (4*i); + int ret; + uint ro; + if (paramlist != null) { + Interop.TEEC_Operation op = Create_TEEC_Operation(); + for (int i=0; i < 4 && i < paramlist.Length; ++i) { + op.paramTypes |= InitParam(ref op.paramlist, i, paramlist[i]) << (4*i); + } + ret = Interop.Libteec.OpenSession(ref context, ref session, ref uuid, loginMethod, connectionData, ref op, out ro); + for (int i=0; i < 4 && i < paramlist.Length; ++i) { + UpdateParam(op.paramlist[i], ref paramlist, i); + } + } + else { + ret = Interop.Libteec.OpenSession(ref context, ref session, ref uuid, loginMethod, connectionData, IntPtr.Zero, out ro); } - uint ro; - int ret = Interop.Libteec.OpenSession(ref context, ref session, ref uuid, loginMethod, connectionData, ref op, out ro); //MAYBE map origin of return code to specyfic Exception Interop.CheckNThrowException(ret, string.Format("OpenSession('{0}')", destination)); - for (int i=0; i < 4 && i < paramlist.Length; ++i) { - UpdateParam(op.paramlist[i], ref paramlist[i]); - } } /// @@ -423,7 +450,6 @@ namespace Tizen.Security.TEEC /// The operation is invalid. public void Close() { Interop.Libteec.CloseSession(ref session); - //session = null; } /// @@ -445,20 +471,24 @@ namespace Tizen.Security.TEEC /// The argument is wrong. public void InvokeCommand(uint commandID, Parameter[] paramlist) { - Interop.TEEC_Operation op = new Interop.TEEC_Operation(); - op.started=0; - op.paramTypes=0; - for (int i=0; i < 4 && i < paramlist.Length; ++i) { - op.paramTypes |= InitParam(ref op.paramlist[i], paramlist[i]) << (4*i); + int ret; + uint ro; + if (paramlist != null) { + Interop.TEEC_Operation op = Create_TEEC_Operation(); + for (int i=0; i < 4 && i < paramlist.Length; ++i) { + op.paramTypes |= InitParam(ref op.paramlist, i, paramlist[i]) << (4*i); + } + ret = Interop.Libteec.InvokeCommand(ref session, commandID, ref op, out ro); + for (int i=0; i < 4 && i < paramlist.Length; ++i) { + UpdateParam(op.paramlist[i], ref paramlist, i); + } + } + else { + ret = Interop.Libteec.InvokeCommand(ref session, commandID, IntPtr.Zero, out ro); } - uint ro; - int ret = Interop.Libteec.InvokeCommand(ref session, commandID, ref op, out ro); //MAYBE map origin of return code to specific Exception Interop.CheckNThrowException(ret, string.Format("InvokeCommand({0})", commandID)); - for (int i=0; i < 4 && i < paramlist.Length; ++i) { - UpdateParam(op.paramlist[i], ref paramlist[i]); - } } /// @@ -655,11 +685,11 @@ namespace Tizen.Security.TEEC { Interop.TEEC_SharedMemory shm = new Interop.TEEC_SharedMemory(); shm.buffer = memaddr; - shm.size = size; + shm.size = new UIntPtr(size); shm.flags = (UInt32)flags; int ret = Interop.Libteec.RegisterSharedMemory(ref context, ref shm); Interop.CheckNThrowException(ret, "RegisterSharedMemory"); - return new SharedMemory(shm); + return new SharedMemory(ref shm); } /// @@ -679,11 +709,11 @@ namespace Tizen.Security.TEEC public SharedMemory AllocateSharedMemory(UInt32 size, SharedMemoryFlags flags) { Interop.TEEC_SharedMemory shm = new Interop.TEEC_SharedMemory(); - shm.size = size; + shm.size = new UIntPtr(size); shm.flags = (UInt32)flags; int ret = Interop.Libteec.AllocateSharedMemory(ref context, ref shm); Interop.CheckNThrowException(ret, "AllocateSharedMemory"); - return new SharedMemory(shm); + return new SharedMemory(ref shm); } /// diff --git a/src/Tizen.System.Usb/Usb/UsbConfiguration.cs b/src/Tizen.System.Usb/Usb/UsbConfiguration.cs index d04c123..dd4fc66 100755 --- a/src/Tizen.System.Usb/Usb/UsbConfiguration.cs +++ b/src/Tizen.System.Usb/Usb/UsbConfiguration.cs @@ -159,7 +159,7 @@ namespace Tizen.System.Usb /// Releases all resources used by the ConnectionProfile. /// It should be called after finished using of the object. /// 5 - protected virtual void Dispose(bool disposing) + internal virtual void Dispose(bool disposing) { if (!disposedValue) { diff --git a/src/Tizen.System.Usb/Usb/UsbDevice.cs b/src/Tizen.System.Usb/Usb/UsbDevice.cs index 323d39b..7092d89 100755 --- a/src/Tizen.System.Usb/Usb/UsbDevice.cs +++ b/src/Tizen.System.Usb/Usb/UsbDevice.cs @@ -231,7 +231,7 @@ namespace Tizen.System.Usb /// Releases all resources used by the ConnectionProfile. /// It should be called after finished using of the object. /// 5 - protected virtual void Dispose(bool disposing) + internal virtual void Dispose(bool disposing) { if (!disposedValue) { diff --git a/src/Tizen.Uix.InputMethod/Interop/Interop.InputMethod.cs b/src/Tizen.Uix.InputMethod/Interop/Interop.InputMethod.cs index 1ec40cf..79eaee8 100755 --- a/src/Tizen.Uix.InputMethod/Interop/Interop.InputMethod.cs +++ b/src/Tizen.Uix.InputMethod/Interop/Interop.InputMethod.cs @@ -197,6 +197,9 @@ internal static partial class Interop [DllImport(Libraries.InputMethod, EntryPoint = "ime_finalize")] internal static extern ErrorCode ImeFinalize(); + [DllImport(Libraries.InputMethod, EntryPoint = "ime_set_dotnet_flag")] + internal static extern ErrorCode ImeSetDotnetFlag(bool set); + [DllImport(Libraries.InputMethod, EntryPoint = "ime_set_size")] internal static extern ErrorCode ImeSetSize(int portraitWidth, int portraitHeight, int landscapeWidth, int landscapeHeight); diff --git a/src/Tizen.Uix.InputMethod/Tizen.Uix.InputMethod/InputMethodEditor.cs b/src/Tizen.Uix.InputMethod/Tizen.Uix.InputMethod/InputMethodEditor.cs index 0e23e98..e59afb3 100755 --- a/src/Tizen.Uix.InputMethod/Tizen.Uix.InputMethod/InputMethodEditor.cs +++ b/src/Tizen.Uix.InputMethod/Tizen.Uix.InputMethod/InputMethodEditor.cs @@ -1704,6 +1704,7 @@ namespace Tizen.Uix.InputMethod _imeCallbackStructGCHandle._imeCallbackStruct.hide = _hide; _imeCallbackStructGCHandle._imeCallbackStruct.show = _show; + ImeSetDotnetFlag(true); ErrorCode error = ImeRun(ref _imeCallbackStructGCHandle._imeCallbackStruct, IntPtr.Zero); if (error != ErrorCode.None) {