X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FTizen.NUI%2Fsrc%2Finternal%2FModel3dView.cs;h=c82144ff32932ce7b5a77ab2005afb688bdea29c;hb=3ba7d16f8a9a032cbaab592204a019fed2062d6b;hp=a81e291125d2ba032321b9d069e6573f3038f533;hpb=d7dd311eeaed1973fa3672c2046b9faeb14b9cf3;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git diff --git a/src/Tizen.NUI/src/internal/Model3dView.cs b/src/Tizen.NUI/src/internal/Model3dView.cs index a81e291..c82144f 100755 --- a/src/Tizen.NUI/src/internal/Model3dView.cs +++ b/src/Tizen.NUI/src/internal/Model3dView.cs @@ -19,12 +19,11 @@ using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - internal class Model3dView : View { private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal Model3dView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Model3dView_SWIGUpcast(cPtr), cMemoryOwn) + internal Model3dView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.Model3DView.Model3dView_SWIGUpcast(cPtr), cMemoryOwn) { swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } @@ -41,14 +40,6 @@ namespace Tizen.NUI 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. @@ -58,7 +49,7 @@ namespace Tizen.NUI if (swigCMemOwn) { swigCMemOwn = false; - NDalicPINVOKE.delete_Model3dView(swigCPtr); + Interop.Model3DView.delete_Model3dView(swigCPtr); } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } @@ -66,133 +57,48 @@ namespace Tizen.NUI base.Dispose(type); } - public new class Property : global::System.IDisposable + internal new class Property { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Property(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(Property 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. - protected bool disposed = false; - - - ~Property() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - 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); - } - } - - 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; - NDalicPINVOKE.delete_Model3dView_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - public Property() : this(NDalicPINVOKE.new_Model3dView_Property(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int GEOMETRY_URL = NDalicPINVOKE.Model3dView_Property_GEOMETRY_URL_get(); - public static readonly int MATERIAL_URL = NDalicPINVOKE.Model3dView_Property_MATERIAL_URL_get(); - public static readonly int IMAGES_URL = NDalicPINVOKE.Model3dView_Property_IMAGES_URL_get(); - public static readonly int ILLUMINATION_TYPE = NDalicPINVOKE.Model3dView_Property_ILLUMINATION_TYPE_get(); - public static readonly int TEXTURE0_URL = NDalicPINVOKE.Model3dView_Property_TEXTURE0_URL_get(); - public static readonly int TEXTURE1_URL = NDalicPINVOKE.Model3dView_Property_TEXTURE1_URL_get(); - public static readonly int TEXTURE2_URL = NDalicPINVOKE.Model3dView_Property_TEXTURE2_URL_get(); - public static readonly int LIGHT_POSITION = NDalicPINVOKE.Model3dView_Property_LIGHT_POSITION_get(); - + internal static readonly int GEOMETRY_URL = Interop.Model3DView.Model3dView_Property_GEOMETRY_URL_get(); + internal static readonly int MATERIAL_URL = Interop.Model3DView.Model3dView_Property_MATERIAL_URL_get(); + internal static readonly int IMAGES_URL = Interop.Model3DView.Model3dView_Property_IMAGES_URL_get(); + internal static readonly int ILLUMINATION_TYPE = Interop.Model3DView.Model3dView_Property_ILLUMINATION_TYPE_get(); + internal static readonly int TEXTURE0_URL = Interop.Model3DView.Model3dView_Property_TEXTURE0_URL_get(); + internal static readonly int TEXTURE1_URL = Interop.Model3DView.Model3dView_Property_TEXTURE1_URL_get(); + internal static readonly int TEXTURE2_URL = Interop.Model3DView.Model3dView_Property_TEXTURE2_URL_get(); + internal static readonly int LIGHT_POSITION = Interop.Model3DView.Model3dView_Property_LIGHT_POSITION_get(); } - public Model3dView() : this(NDalicPINVOKE.Model3dView_New__SWIG_0(), true) + public Model3dView() : this(Interop.Model3DView.Model3dView_New__SWIG_0(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - public Model3dView(string objUrl, string mtlUrl, string imagesUrl) : this(NDalicPINVOKE.Model3dView_New__SWIG_1(objUrl, mtlUrl, imagesUrl), true) + public Model3dView(string objUrl, string mtlUrl, string imagesUrl) : this(Interop.Model3DView.Model3dView_New__SWIG_1(objUrl, mtlUrl, imagesUrl), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - public Model3dView(Model3dView model3dView) : this(NDalicPINVOKE.new_Model3dView__SWIG_1(Model3dView.getCPtr(model3dView)), true) + public Model3dView(Model3dView model3dView) : this(Interop.Model3DView.new_Model3dView__SWIG_1(Model3dView.getCPtr(model3dView)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public Model3dView Assign(Model3dView model3dView) { - Model3dView ret = new Model3dView(NDalicPINVOKE.Model3dView_Assign(swigCPtr, Model3dView.getCPtr(model3dView)), false); + Model3dView ret = new Model3dView(Interop.Model3DView.Model3dView_Assign(swigCPtr, Model3dView.getCPtr(model3dView)), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - public new static Model3dView DownCast(BaseHandle handle) + public static Model3dView DownCast(BaseHandle handle) { Model3dView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Model3dView; if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } + /// 3 public enum IluminationTypeEnum { DIFFUSE, @@ -304,7 +210,5 @@ namespace Tizen.NUI SetProperty(Model3dView.Property.LIGHT_POSITION, new Tizen.NUI.PropertyValue(value)); } } - } - }