/// <since_tizen> 10 </since_tizen>
public Animation GetAnimation(uint index)
{
- Animation ret = new Animation(Interop.Model.GetAnimation(SwigCPtr, index), false);
+ global::System.IntPtr cPtr = Interop.Model.GetAnimation(SwigCPtr, index);
+ Animation ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Animation;
+ if(ret == null)
+ {
+ // Register new animation into Registry.
+ ret = new Animation(cPtr, true);
+ }
+ else
+ {
+ // We found matched NUI animation. Reduce cPtr reference count.
+ HandleRef handle = new HandleRef(this, cPtr);
+ Tizen.NUI.Interop.Animation.DeleteAnimation(handle);
+ handle = new HandleRef(null, IntPtr.Zero);
+ }
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 10 </since_tizen>
public Animation GetAnimation(string name)
{
- Animation ret = new Animation(Interop.Model.GetAnimation(SwigCPtr, name), false);
+ global::System.IntPtr cPtr = Interop.Model.GetAnimation(SwigCPtr, name);
+ Animation ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Animation;
+ if(ret == null)
+ {
+ // Register new animation into Registry.
+ ret = new Animation(cPtr, true);
+ }
+ else
+ {
+ // We found matched NUI animation. Reduce cPtr reference count.
+ HandleRef handle = new HandleRef(this, cPtr);
+ Tizen.NUI.Interop.Animation.DeleteAnimation(handle);
+ handle = new HandleRef(null, IntPtr.Zero);
+ }
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
[EditorBrowsable(EditorBrowsableState.Never)]
public Animation LoadBvhAnimation(string bvhFilename, Vector3 scale = null)
{
- Animation ret = new Animation(Interop.Model.LoadBvhAnimation(SwigCPtr, bvhFilename, Vector3.getCPtr(scale)), false);
+ global::System.IntPtr cPtr = Interop.Model.LoadBvhAnimation(SwigCPtr, bvhFilename, Vector3.getCPtr(scale));
+ Animation ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Animation;
+ if(ret == null)
+ {
+ // Register new animation into Registry.
+ ret = new Animation(cPtr, true);
+ }
+ else
+ {
+ // We found matched NUI animation. Reduce cPtr reference count.
+ HandleRef handle = new HandleRef(this, cPtr);
+ Tizen.NUI.Interop.Animation.DeleteAnimation(handle);
+ handle = new HandleRef(null, IntPtr.Zero);
+ }
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <returns>Root View of the model.</returns>
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
- private View GetModelRoot()
+ private Animatable GetModelRoot()
{
- View ret = new View(Interop.Model.GetModelRoot(SwigCPtr), false);
+ global::System.IntPtr cPtr = Interop.Model.GetModelRoot(SwigCPtr);
+ Animatable ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Animatable;
+ if (ret == null)
+ {
+ // Register new animatable into Registry.
+ ret = new Animatable(cPtr, true);
+ }
+ else
+ {
+ // We found matched NUI animatable. Reduce cPtr reference count.
+ HandleRef handle = new HandleRef(this, cPtr);
+ Tizen.NUI.Interop.BaseHandle.DeleteBaseHandle(handle);
+ handle = new HandleRef(null, IntPtr.Zero);
+ }
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}