return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
- ~Animation()
- {
- if (_animationFinishedEventCallback != null)
- {
- _finishedSignal?.Disconnect(_finishedCallbackOfNative);
- }
- }
-
/// <summary>
/// To make animation instance be disposed.
/// </summary>
{
if (_animationFinishedEventCallback != null)
{
- _finishedSignal?.Disconnect(_finishedCallbackOfNative);
+ FinishedSignal().Disconnect(_finishedCallbackOfNative);
}
if (_animationProgressReachedEventCallback != null)
{
+
ProgressReachedSignal().Disconnect(_animationProgressReachedEventCallback);
}
{
return;
}
-
if(type == DisposeTypes.Explicit)
{
//Called by User
{
this.Clear();
this.Reset();
- NUILog.Error("Animation().Clear & Reset here!");
+ NUILog.Error("Now Animation is playing! Clear and Reset here!");
//throw new System.InvalidOperationException("Animation Instance should not be disposed until getting Finished event. Should be a global variable");
}
private event EventHandler _animationFinishedEventHandler;
private System.IntPtr _finishedCallbackOfNative;
- private AnimationSignal _finishedSignal;
/**
* @brief Event for the finished signal which can be used to subscribe or unsubscribe the event handler.
{
if (_animationFinishedEventHandler == null && disposed == false)
{
- _finishedSignal = FinishedSignal();
- _finishedSignal?.Connect(_finishedCallbackOfNative);
+ FinishedSignal().Connect(_finishedCallbackOfNative);
}
_animationFinishedEventHandler += value;
}
{
_animationFinishedEventHandler -= value;
- if (_animationFinishedEventHandler == null && _finishedSignal?.Empty() == false)
+ if (_animationFinishedEventHandler == null && FinishedSignal().Empty() == false)
{
- _finishedSignal?.Disconnect(_finishedCallbackOfNative);
+ FinishedSignal().Disconnect(_finishedCallbackOfNative);
}
}
}
_timerTickCallbackDelegate = OnTick;
_timerTickCallbackOfNative = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(_timerTickCallbackDelegate);
+
+ NUILog.Debug($"(0x{swigCPtr.Handle:X})Timer() contructor!");
}
~Timer()
{
- if (_timerTickCallbackDelegate != null)
- {
- _timerSignal?.Disconnect(_timerTickCallbackOfNative);
- }
+ NUILog.Debug($"(0x{swigCPtr.Handle:X})Timer() distructor!, disposed={disposed}");
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Timer obj)
/// <since_tizen> 3 </since_tizen>
protected override void Dispose(DisposeTypes type)
{
+ NUILog.Debug($"(0x{swigCPtr.Handle:X}) Timer.Dispose(type={type}, disposed={disposed})");
+
if (_timerTickCallbackDelegate != null)
{
- _timerSignal?.Disconnect(_timerTickCallbackOfNative);
+ TickSignal().Disconnect(_timerTickCallbackOfNative);
}
if (disposed)
private TickCallbackDelegate _timerTickCallbackDelegate;
private System.IntPtr _timerTickCallbackOfNative;
- private TimerSignalType _timerSignal;
/// <summary>
/// @brief Event for the ticked signal, which can be used to subscribe or unsubscribe the event handler
{
if (_timerTickEventHandler == null && disposed == false)
{
- _timerSignal = TickSignal();
- _timerSignal?.Connect(_timerTickCallbackOfNative);
+ TickSignal().Connect(_timerTickCallbackOfNative);
}
_timerTickEventHandler += value;
}
remove
{
_timerTickEventHandler -= value;
- if (_timerTickEventHandler == null && _timerSignal?.Empty() == false)
+ if (_timerTickEventHandler == null && TickSignal().Empty() == false)
{
- _timerSignal?.Disconnect(_timerTickCallbackOfNative);
+ TickSignal().Disconnect(_timerTickCallbackOfNative);
}
}
}
if (played == false)
{
- Tizen.Log.Fatal("NUI", $"OnTick() is called even played is false!");
+ Tizen.Log.Fatal("NUI", $"(0x{swigCPtr.Handle:X}) OnTick() is called even played is false!");
//throw new System.InvalidOperationException($"OnTick() excpetion!");
}
public Timer(uint milliSec) : this(NDalicPINVOKE.Timer_New(milliSec), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+ NUILog.Debug($"(0x{swigCPtr.Handle:X}) Timer({milliSec}) Constructor!");
}
internal Timer(Timer timer) : this(NDalicPINVOKE.new_Timer__SWIG_1(Timer.getCPtr(timer)), true)
{
/// <param name="milliSec">MilliSec interval in milliseconds.</param>
internal void SetInterval(uint milliSec)
{
+ NUILog.Debug($"(0x{swigCPtr.Handle:X})SetInterval({milliSec})");
+
played = true;
NDalicPINVOKE.Timer_SetInterval(swigCPtr, milliSec);