[NUI] Remove [Obsolete()] attribute
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Rectangle.cs
index 95ae7ee..1036e9c 100755 (executable)
-//------------------------------------------------------------------------------
-// <auto-generated />
-//
-// 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) 2019 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 System;
+using System.ComponentModel;
+using Tizen.NUI.Binding;
 
 namespace Tizen.NUI
 {
-
     /// <summary>
-    /// Rectangle class
+    /// The Rectangle class.
     /// </summary>
-    public class Rectangle : global::System.IDisposable
+    /// <since_tizen> 3 </since_tizen>
+    [Binding.TypeConverter(typeof(RectangleTypeConverter))]
+    public class Rectangle : Disposable, ICloneable
     {
-        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
-        protected bool swigCMemOwn;
-
-        internal Rectangle(global::System.IntPtr cPtr, bool cMemoryOwn)
+        /// <summary>
+        /// The constructor.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public Rectangle() : this(Interop.Rectangle.new_Rectangle__SWIG_0(), true)
         {
-            swigCMemOwn = cMemoryOwn;
-            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Rectangle obj)
+        /// <summary>
+        /// The constructor.
+        /// </summary>
+        /// <param name="x">The x coordinate (or left).</param>
+        /// <param name="y">The y coordinate (or right).</param>
+        /// <param name="width">The width (or bottom).</param>
+        /// <param name="height">The height (or top).</param>
+        /// <since_tizen> 3 </since_tizen>
+        public Rectangle(int x, int y, int width, int height) : this(Interop.Rectangle.new_Rectangle__SWIG_1(x, y, width, height), true)
         {
-            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) 
-
-        //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;
-
-        ~Rectangle()
+        internal Rectangle(Rectangle other) : this(other.x, other.y, other.width, other.height)
         {
-            if(!isDisposeQueued)
-            {
-                isDisposeQueued = true;
-                DisposeQueue.Instance.Add(this);
-            }
         }
 
-        public void Dispose()
+        internal Rectangle(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
         {
-            //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)
+        internal Rectangle(RectangleChangedCallback cb, int x, int y, int width, int height) : this(Interop.Rectangle.new_Rectangle__SWIG_1(x, y, width, height), true)
         {
-            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_Rectangle(swigCPtr);
-                }
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-            }
-            disposed = true;
+            callback = cb;
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        /// <summary>
-        /// Equality operator.
-        /// </summary>
-        /// <param name="a">First operand</param>
-        /// <param name="b">Second operand</param>
-        /// <returns>True if boxes are exactly same</returns>
-        public static bool operator ==(Rectangle a, Rectangle b)
+        internal Rectangle(RectangleChangedCallback cb) : this()
         {
-            // If both are null, or both are same instance, return true.
-            if (System.Object.ReferenceEquals(a, b))
-            {
-                return true;
-            }
-
-            // If one is null, but not both, return false.
-            if (((object)a == null) || ((object)b == null))
-            {
-                return false;
-            }
+            callback = cb;
+        }
 
-            // Return true if the fields match:
-            return a.X == b.X && a.Y == b.Y && a.Width == b.Width && a.Height == b.Height;
+        internal Rectangle(RectangleChangedCallback cb, Rectangle other) : this(cb, other.x, other.y, other.width, other.height)
+        {
         }
 
         /// <summary>
-        /// Inequality operator.
+        /// The type cast operator, int to Rectangle.
         /// </summary>
-        /// <param name="a">The first rectangle</param>
-        /// <param name="b">The second rectangle</param>
-        /// <returns>True if rectangles are not identical</returns>
-        public static bool operator !=(Rectangle a, Rectangle b)
+        /// <param name="value">A value of int type.</param>
+        /// <returns>return a Extents instance</returns>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static implicit operator Rectangle(int value)
         {
-            return !(a == b);
+            return new Rectangle(value, value, value, value);
         }
 
+        internal delegate void RectangleChangedCallback(int x, int y, int width, int height);
+        private RectangleChangedCallback callback = null;
+
         /// <summary>
-        /// X position of the rectangle
+        /// The x position of the rectangle.
         /// </summary>
+        /// <remarks>
+        /// The setter is deprecated in API8 and will be removed in API10. Please use new Rectangle(...) constructor.
+        /// </remarks>
+        /// <code>
+        /// // DO NOT use like the followings!
+        /// Rectangle rectangle = new Rectangle();
+        /// rectangle.X = 1; 
+        /// // Please USE like this
+        /// int x = 1, y = 2, width = 3, height = 4;
+        /// Rectangle rectangle = new Rectangle(x, y, width, height);
+        /// </code>
+        /// <since_tizen> 3 </since_tizen>
         public int X
         {
             set
             {
-                x = ( value );
+                Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Rectangle(...) constructor");
+
+                x = (value);
+
+                callback?.Invoke(X, Y, Width, Height);
             }
             get
             {
                 return x;
             }
-            }
+        }
 
         /// <summary>
-        /// Y position of the rectangle
+        /// The Y position of the rectangle.
         /// </summary>
+        /// <remarks>
+        /// The setter is deprecated in API8 and will be removed in API10. Please use new Rectangle(...) constructor.
+        /// </remarks>
+        /// <code>
+        /// // DO NOT use like the followings!
+        /// Rectangle rectangle = new Rectangle();
+        /// rectangle.Y = 2; 
+        /// // Please USE like this
+        /// int x = 1, y = 2, width = 3, height = 4;
+        /// Rectangle rectangle = new Rectangle(x, y, width, height);
+        /// </code>
+        /// <since_tizen> 3 </since_tizen>
         public int Y
         {
             set
             {
-                y = ( value );
+                Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Rectangle(...) constructor");
+
+                y = (value);
+
+                callback?.Invoke(X, Y, Width, Height);
             }
             get
             {
@@ -161,13 +149,29 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Width of the rectangle
+        /// The width of the rectangle.
         /// </summary>
+        /// <remarks>
+        /// The setter is deprecated in API8 and will be removed in API10. Please use new Rectangle(...) constructor.
+        /// </remarks>
+        /// <code>
+        /// // DO NOT use like the followings!
+        /// Rectangle rectangle = new Rectangle();
+        /// rectangle.Width = 3; 
+        /// // Please USE like this
+        /// int x = 1, y = 2, width = 3, height = 4;
+        /// Rectangle rectangle = new Rectangle(x, y, width, height);
+        /// </code>
+        /// <since_tizen> 3 </since_tizen>
         public int Width
         {
             set
             {
-                width = ( value );
+                Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Rectangle(...) constructor");
+
+                width = (value);
+
+                callback?.Invoke(X, Y, Width, Height);
             }
             get
             {
@@ -176,13 +180,29 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Height of the rectangle
+        /// The height of the rectangle.
         /// </summary>
+        /// <remarks>
+        /// The setter is deprecated in API8 and will be removed in API10. Please use new Rectangle(...) constructor.
+        /// </remarks>
+        /// <code>
+        /// // DO NOT use like the followings!
+        /// Rectangle rectangle = new Rectangle();
+        /// rectangle.Height = 4; 
+        /// // Please USE like this
+        /// int x = 1, y = 2, width = 3, height = 4;
+        /// Rectangle rectangle = new Rectangle(x, y, width, height);
+        /// </code>
+        /// <since_tizen> 3 </since_tizen>
         public int Height
         {
             set
             {
-                height = ( value );
+                Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Rectangle(...) constructor");
+
+                height = (value);
+
+                callback?.Invoke(X, Y, Width, Height);
             }
             get
             {
@@ -190,139 +210,16 @@ namespace Tizen.NUI
             }
         }
 
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        public Rectangle() : this(NDalicPINVOKE.new_Rectangle__SWIG_0(), true)
-        {
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="x">X coordinate (or left)</param>
-        /// <param name="y">Y coordinate (or right)</param>
-        /// <param name="width">Width (or bottom)</param>
-        /// <param name="height">Height (or top)</param>
-        public Rectangle(int x, int y, int width, int height) : this(NDalicPINVOKE.new_Rectangle__SWIG_1(x, y, width, height), true)
-        {
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-        /// <summary>
-        /// Assignment from individual values.
-        /// </summary>
-        /// <param name="newX">X coordinate</param>
-        /// <param name="newY">Y coordinate</param>
-        /// <param name="newWidth">Width</param>
-        /// <param name="newHeight">Height</param>
-        public void Set(int newX, int newY, int newWidth, int newHeight)
-        {
-            NDalicPINVOKE.Rectangle_Set(swigCPtr, newX, newY, newWidth, newHeight);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-        /// <summary>
-        /// Determines whether or not this Rectangle is empty.
-        /// </summary>
-        /// <returns>True if width or height are zero</returns>
-        public bool IsEmpty()
-        {
-            bool ret = NDalicPINVOKE.Rectangle_IsEmpty(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        /// <summary>
-        /// Gets the left of the rectangle.
-        /// </summary>
-        /// <returns>The left edge of the rectangle</returns>
-        public int Left()
-        {
-            int ret = NDalicPINVOKE.Rectangle_Left(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        /// <summary>
-        /// Gets the right of the rectangle.
-        /// </summary>
-        /// <returns>The right edge of the rectangle</returns>
-        public int Right()
-        {
-            int ret = NDalicPINVOKE.Rectangle_Right(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        /// <summary>
-        /// Gets the top of the rectangle.
-        /// </summary>
-        /// <returns>The top of the rectangle</returns>
-        public int Top()
-        {
-            int ret = NDalicPINVOKE.Rectangle_Top(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        /// <summary>
-        /// Gets the bottom of the rectangle.
-        /// </summary>
-        /// <returns>The bottom of the rectangle</returns>
-        public int Bottom()
-        {
-            int ret = NDalicPINVOKE.Rectangle_Bottom(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        /// <summary>
-        /// Gets the area of the rectangle.
-        /// </summary>
-        /// <returns>The area of the rectangle</returns>
-        public int Area()
-        {
-            int ret = NDalicPINVOKE.Rectangle_Area(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        /// <summary>
-        /// Determines whether or not this rectangle and the specified rectangle intersect.
-        /// </summary>
-        /// <param name="other">The other rectangle to test against this rectangle</param>
-        /// <returns>True if the rectangles intersect</returns>
-        public bool Intersects(Rectangle other)
-        {
-            bool ret = NDalicPINVOKE.Rectangle_Intersects(swigCPtr, Rectangle.getCPtr(other));
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        /// <summary>
-        /// Determines whether or not this Rectangle contains the specified rectangle.
-        /// </summary>
-        /// <param name="other">The other rectangle to test against this rectangle</param>
-        /// <returns>True if the specified rectangle is contained</returns>
-        public bool Contains(Rectangle other)
-        {
-            bool ret = NDalicPINVOKE.Rectangle_Contains(swigCPtr, Rectangle.getCPtr(other));
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         private int x
         {
             set
             {
-                NDalicPINVOKE.Rectangle_x_set(swigCPtr, value);
+                Interop.Rectangle.Rectangle_x_set(swigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
             get
             {
-                int ret = NDalicPINVOKE.Rectangle_x_get(swigCPtr);
+                int ret = Interop.Rectangle.Rectangle_x_get(swigCPtr);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
                 return ret;
             }
@@ -332,12 +229,12 @@ namespace Tizen.NUI
         {
             set
             {
-                NDalicPINVOKE.Rectangle_left_set(swigCPtr, value);
+                Interop.Rectangle.Rectangle_left_set(swigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
             get
             {
-                int ret = NDalicPINVOKE.Rectangle_left_get(swigCPtr);
+                int ret = Interop.Rectangle.Rectangle_left_get(swigCPtr);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
                 return ret;
             }
@@ -347,12 +244,12 @@ namespace Tizen.NUI
         {
             set
             {
-                NDalicPINVOKE.Rectangle_y_set(swigCPtr, value);
+                Interop.Rectangle.Rectangle_y_set(swigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
             get
             {
-                int ret = NDalicPINVOKE.Rectangle_y_get(swigCPtr);
+                int ret = Interop.Rectangle.Rectangle_y_get(swigCPtr);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
                 return ret;
             }
@@ -362,12 +259,12 @@ namespace Tizen.NUI
         {
             set
             {
-                NDalicPINVOKE.Rectangle_right_set(swigCPtr, value);
+                Interop.Rectangle.Rectangle_right_set(swigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
             get
             {
-                int ret = NDalicPINVOKE.Rectangle_right_get(swigCPtr);
+                int ret = Interop.Rectangle.Rectangle_right_get(swigCPtr);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
                 return ret;
             }
@@ -377,12 +274,12 @@ namespace Tizen.NUI
         {
             set
             {
-                NDalicPINVOKE.Rectangle_width_set(swigCPtr, value);
+                Interop.Rectangle.Rectangle_width_set(swigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
             get
             {
-                int ret = NDalicPINVOKE.Rectangle_width_get(swigCPtr);
+                int ret = Interop.Rectangle.Rectangle_width_get(swigCPtr);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
                 return ret;
             }
@@ -392,12 +289,12 @@ namespace Tizen.NUI
         {
             set
             {
-                NDalicPINVOKE.Rectangle_bottom_set(swigCPtr, value);
+                Interop.Rectangle.Rectangle_bottom_set(swigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
             get
             {
-                int ret = NDalicPINVOKE.Rectangle_bottom_get(swigCPtr);
+                int ret = Interop.Rectangle.Rectangle_bottom_get(swigCPtr);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
                 return ret;
             }
@@ -407,12 +304,12 @@ namespace Tizen.NUI
         {
             set
             {
-                NDalicPINVOKE.Rectangle_height_set(swigCPtr, value);
+                Interop.Rectangle.Rectangle_height_set(swigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
             get
             {
-                int ret = NDalicPINVOKE.Rectangle_height_get(swigCPtr);
+                int ret = Interop.Rectangle.Rectangle_height_get(swigCPtr);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
                 return ret;
             }
@@ -422,17 +319,217 @@ namespace Tizen.NUI
         {
             set
             {
-                NDalicPINVOKE.Rectangle_top_set(swigCPtr, value);
+                Interop.Rectangle.Rectangle_top_set(swigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
             get
             {
-                int ret = NDalicPINVOKE.Rectangle_top_get(swigCPtr);
+                int ret = Interop.Rectangle.Rectangle_top_get(swigCPtr);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
                 return ret;
             }
         }
 
-    }
+        /// <summary>
+        /// THe Equality operator.
+        /// </summary>
+        /// <param name="a">The first operand.</param>
+        /// <param name="b">The second operand.</param>
+        /// <returns>True if the boxes are exactly the same.</returns>
+        /// <since_tizen> 3 </since_tizen>
+        public static bool operator ==(Rectangle a, Rectangle b)
+        {
+            // If both are null, or both are same instance, return true.
+            if (System.Object.ReferenceEquals(a, b))
+            {
+                return true;
+            }
 
-}
+            // If one is null, but not both, return false.
+            if (((object)a == null) || ((object)b == null))
+            {
+                return false;
+            }
+
+            // Return true if the fields match:
+            return a.X == b.X && a.Y == b.Y && a.Width == b.Width && a.Height == b.Height;
+        }
+
+        /// <summary>
+        /// Inequality operator.
+        /// </summary>
+        /// <param name="a">The first rectangle.</param>
+        /// <param name="b">The second rectangle.</param>
+        /// <returns>True if the rectangles are not identical.</returns>
+        /// <since_tizen> 3 </since_tizen>
+        public static bool operator !=(Rectangle a, Rectangle b)
+        {
+            return !(a == b);
+        }
+
+        /// <summary>
+        /// Equality operator.
+        /// </summary>
+        /// <param name="o">The object to compare with the current object.</param>
+        /// <returns>True if boxes are exactly same.</returns>
+        /// <since_tizen> 4 </since_tizen>
+        public override bool Equals(object o)
+        {
+            if (o == null)
+            {
+                return false;
+            }
+            if (!(o is Rectangle))
+            {
+                return false;
+            }
+            Rectangle r = (Rectangle)o;
+
+            // Return true if the fields match:
+            return X == r.X && Y == r.Y && Width == r.Width && Height == r.Height;
+        }
+
+        /// <summary>
+        /// Serves as the default hash function.
+        /// </summary>
+        /// <returns>A hash code for the current object.</returns>
+        /// <since_tizen> 4 </since_tizen>
+        public override int GetHashCode()
+        {
+            return base.GetHashCode();
+        }
+
+        /// <summary>
+        /// Assignment from individual values.
+        /// </summary>
+        /// <param name="newX">The x coordinate.</param>
+        /// <param name="newY">The y coordinate.</param>
+        /// <param name="newWidth">The width.</param>
+        /// <param name="newHeight">The height.</param>
+        /// <since_tizen> 3 </since_tizen>
+        public void Set(int newX, int newY, int newWidth, int newHeight)
+        {
+            Interop.Rectangle.Rectangle_Set(swigCPtr, newX, newY, newWidth, newHeight);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Determines whether or not this rectangle is empty.
+        /// </summary>
+        /// <returns>True if width or height are zero.</returns>
+        /// <since_tizen> 3 </since_tizen>
+        public bool IsEmpty()
+        {
+            bool ret = Interop.Rectangle.Rectangle_IsEmpty(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Gets the left of the rectangle.
+        /// </summary>
+        /// <returns>The left edge of the rectangle.</returns>
+        /// <since_tizen> 3 </since_tizen>
+        public int Left()
+        {
+            int ret = Interop.Rectangle.Rectangle_Left(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Gets the right of the rectangle.
+        /// </summary>
+        /// <returns>The right edge of the rectangle.</returns>
+        /// <since_tizen> 3 </since_tizen>
+        public int Right()
+        {
+            int ret = Interop.Rectangle.Rectangle_Right(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Gets the top of the rectangle.
+        /// </summary>
+        /// <returns>The top of the rectangle.</returns>
+        /// <since_tizen> 3 </since_tizen>
+        public int Top()
+        {
+            int ret = Interop.Rectangle.Rectangle_Top(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Gets the bottom of the rectangle.
+        /// </summary>
+        /// <returns>The bottom of the rectangle.</returns>
+        /// <since_tizen> 3 </since_tizen>
+        public int Bottom()
+        {
+            int ret = Interop.Rectangle.Rectangle_Bottom(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Gets the area of the rectangle.
+        /// </summary>
+        /// <returns>The area of the rectangle.</returns>
+        /// <since_tizen> 3 </since_tizen>
+        public int Area()
+        {
+            int ret = Interop.Rectangle.Rectangle_Area(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Determines whether or not this rectangle and the specified rectangle intersect.
+        /// </summary>
+        /// <param name="other">The other rectangle to test against this rectangle.</param>
+        /// <returns>True if the rectangles intersect.</returns>
+        /// <since_tizen> 3 </since_tizen>
+        public bool Intersects(Rectangle other)
+        {
+            bool ret = Interop.Rectangle.Rectangle_Intersects(swigCPtr, Rectangle.getCPtr(other));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Determines whether or not this rectangle contains the specified rectangle.
+        /// </summary>
+        /// <param name="other">The other rectangle to test against this rectangle.</param>
+        /// <returns>True if the specified rectangle is contained.</returns>
+        /// <since_tizen> 3 </since_tizen>
+        public bool Contains(Rectangle other)
+        {
+            bool ret = Interop.Rectangle.Rectangle_Contains(swigCPtr, Rectangle.getCPtr(other));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <inheritdoc/>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public object Clone() => new Rectangle(this);
+
+        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Rectangle obj)
+        {
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+        }
+
+        /// This will not be public opened.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+        {
+            Interop.Rectangle.delete_Rectangle(swigCPtr);
+        }
+
+        /// <summary>
+        /// Determines whether the reference is null or the Rectangle has all 0 properties.
+        /// </summary>
+        internal static bool IsNullOrZero(Rectangle rectangle) => (rectangle == null || (rectangle.top == 0 && rectangle.right == 0 && rectangle.bottom == 0 && rectangle.left == 0));
+    }
+}
\ No newline at end of file