}
}
+
+ public void Connect(System.IntPtr callback)
+ {
+ NDalicPINVOKE.AnimationSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, callback));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ public void Disconnect(System.IntPtr callback)
+ {
+ NDalicPINVOKE.AnimationSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, callback));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+
public void Disconnect(System.Delegate func)
{
System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
internal Animation(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Animation_SWIGUpcast(cPtr), cMemoryOwn)
{
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+
+ _animationFinishedEventCallback = OnFinished;
+ _finishedCallbackOfNative = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(_animationFinishedEventCallback);
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Animation obj)
/// <since_tizen> 3 </since_tizen>
protected override void Dispose(DisposeTypes type)
{
+ if (_animationFinishedEventCallback != null)
+ {
+ FinishedSignal().Disconnect(_finishedCallbackOfNative);
+ }
+
+ if (_animationProgressReachedEventCallback != null)
+ {
+
+ ProgressReachedSignal().Disconnect(_animationProgressReachedEventCallback);
+ }
+
if(disposed)
{
return;
}
- if (_animationFinishedEventCallback != null)
- {
- FinishedSignal().Disconnect(_animationFinishedEventCallback);
- }
-
- if (_animationProgressReachedEventCallback != null)
- {
-
- ProgressReachedSignal().Disconnect(_animationProgressReachedEventCallback);
- }
-
- if(this)
+ if (this)
{
this.Clear();
this.Reset();
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
private delegate void AnimationFinishedEventCallbackType(IntPtr data);
private event EventHandler _animationFinishedEventHandler;
+
+ private System.IntPtr _finishedCallbackOfNative;
+
/**
* @brief Event for the finished signal which can be used to subscribe or unsubscribe the event handler.
* The finished signal is emitted when an animation's animations have finished.
{
add
{
- if (_animationFinishedEventHandler == null)
+ if (_animationFinishedEventHandler == null && disposed == false)
{
- NUILog.Debug("[add before]FinishedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
- _animationFinishedEventCallback = OnFinished;
- FinishedSignal().Connect(_animationFinishedEventCallback);
- NUILog.Debug("[add after]FinishedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
+ FinishedSignal().Connect(_finishedCallbackOfNative);
}
_animationFinishedEventHandler += value;
}
if (_animationFinishedEventHandler == null && FinishedSignal().Empty() == false)
{
- NUILog.Debug("[remove before]FinishedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
- FinishedSignal().Disconnect(_animationFinishedEventCallback);
- NUILog.Debug("[remove after]FinishedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
+ FinishedSignal().Disconnect(_finishedCallbackOfNative);
}
}
}
{
if (_animationProgressReachedEventHandler == null)
{
- NUILog.Debug("[add before]ProgressReachedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
_animationProgressReachedEventCallback = OnProgressReached;
ProgressReachedSignal().Connect(_animationProgressReachedEventCallback);
- NUILog.Debug("[add after]ProgressReachedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
}
_animationProgressReachedEventHandler += value;
if (_animationProgressReachedEventHandler == null && ProgressReachedSignal().Empty() == false)
{
- NUILog.Debug("[remove before]ProgressReachedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
ProgressReachedSignal().Disconnect(_animationProgressReachedEventCallback);
- NUILog.Debug("[remove after]ProgressReachedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
}
}
}