X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FTizen.NUI%2Fsrc%2Finternal%2FModel3dView.cs;h=c82144ff32932ce7b5a77ab2005afb688bdea29c;hb=3ba7d16f8a9a032cbaab592204a019fed2062d6b;hp=7c66870b6f53f8af1b2e5af09d04d0f1e444f081;hpb=11fda04144c80cd2feb696aeb1320ab04c978a25;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 7c66870..c82144f 100755 --- a/src/Tizen.NUI/src/internal/Model3dView.cs +++ b/src/Tizen.NUI/src/internal/Model3dView.cs @@ -1,43 +1,31 @@ -/** 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. -* -*/ -// This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 3.0.9 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ +/* + * 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 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); - // By default, we do not want the position to use the anchor point - PositionUsesAnchorPoint = false; } internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Model3dView obj) @@ -52,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. @@ -69,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); } @@ -77,133 +57,48 @@ namespace Tizen.NUI base.Dispose(type); } - public 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 = new Model3dView(NDalicPINVOKE.Model3dView_DownCast(BaseHandle.getCPtr(handle)), true); + Model3dView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Model3dView; if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } + /// 3 public enum IluminationTypeEnum { DIFFUSE, @@ -315,7 +210,5 @@ namespace Tizen.NUI SetProperty(Model3dView.Property.LIGHT_POSITION, new Tizen.NUI.PropertyValue(value)); } } - } - }