[NUI] Revert "Sync with dalihub & API5 branch (#631)" (#635)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / VisualBase.cs
index f4a5a68..ef701cc 100755 (executable)
@@ -32,6 +32,52 @@ namespace Tizen.NUI
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
 
+        internal VisualBase(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.VisualBase_SWIGUpcast(cPtr), cMemoryOwn)
+        {
+            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+        }
+
+        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VisualBase obj)
+        {
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+        }
+
+        /// <summary>
+        /// Dispose.
+        /// </summary>
+        /// <param name="type">The dispose type</param>
+        /// <since_tizen> 3 </since_tizen>
+        protected override 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_VisualBase(swigCPtr);
+                }
+                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+            }
+
+            base.Dispose(type);
+        }
+
         /// <summary>
         /// Creates an empty visual handle.
         /// </summary>
@@ -45,10 +91,6 @@ namespace Tizen.NUI
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
-        internal VisualBase(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.VisualBase_SWIGUpcast(cPtr), cMemoryOwn)
-        {
-            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-        }
 
         /// <summary>
         /// The name of the visual.
@@ -66,34 +108,17 @@ namespace Tizen.NUI
             }
         }
 
-        /// <summary>
-        /// The depth index of this visual.
-        /// </summary>
-        /// <since_tizen> 3 </since_tizen>
-        public int DepthIndex
+        internal void SetName(string name)
         {
-            set
-            {
-                SetDepthIndex(value);
-            }
-            get
-            {
-                return GetDepthIndex();
-            }
+            NDalicPINVOKE.VisualBase_SetName(swigCPtr, name);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        /// <summary>
-        /// Creates the property map representing this visual.
-        /// </summary>
-        /// <since_tizen> 3 </since_tizen>
-        public PropertyMap Creation
+        internal string GetName()
         {
-            get
-            {
-                PropertyMap map = new PropertyMap();
-                CreatePropertyMap(map);
-                return map;
-            }
+            string ret = NDalicPINVOKE.VisualBase_GetName(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
         }
 
         /// <summary>
@@ -147,24 +172,21 @@ namespace Tizen.NUI
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VisualBase obj)
-        {
-            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
-        }
-
-        internal void SetName(string name)
-        {
-            NDalicPINVOKE.VisualBase_SetName(swigCPtr, name);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-        internal string GetName()
+        /// <summary>
+        /// The depth index of this visual.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public int DepthIndex
         {
-            string ret = NDalicPINVOKE.VisualBase_GetName(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
+            set
+            {
+                SetDepthIndex(value);
+            }
+            get
+            {
+                return GetDepthIndex();
+            }
         }
-
         internal void SetDepthIndex(int index)
         {
             NDalicPINVOKE.VisualBase_SetDepthIndex(swigCPtr, index);
@@ -178,46 +200,24 @@ namespace Tizen.NUI
             return ret;
         }
 
-        internal void CreatePropertyMap(PropertyMap map)
-        {
-            NDalicPINVOKE.VisualBase_CreatePropertyMap(swigCPtr, PropertyMap.getCPtr(map));
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
         /// <summary>
-        /// Dispose.
+        /// Creates the property map representing this visual.
         /// </summary>
-        /// <param name="type">The dispose type</param>
         /// <since_tizen> 3 </since_tizen>
-        protected override void Dispose(DisposeTypes type)
+        public PropertyMap Creation
         {
-            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)
+            get
             {
-                if (swigCMemOwn)
-                {
-                    swigCMemOwn = false;
-                    NDalicPINVOKE.delete_VisualBase(swigCPtr);
-                }
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+                PropertyMap map = new PropertyMap();
+                CreatePropertyMap(map);
+                return map;
             }
+        }
 
-            base.Dispose(type);
+        internal void CreatePropertyMap(PropertyMap map)
+        {
+            NDalicPINVOKE.VisualBase_CreatePropertyMap(swigCPtr, PropertyMap.getCPtr(map));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
     }