From e354600decf4e2e8aafeca6f9d6f8e8575471351 Mon Sep 17 00:00:00 2001 From: Seoyeon Kim Date: Thu, 7 Sep 2017 13:25:39 +0900 Subject: [PATCH] [Tizen] Add start and end property in PaddingType - Deprecated Left and Right property in PaddingType - Added Start and End property in PaddingType for multilingual UI framework - Removed x, y, width, and height in PaddingType class Change-Id: I95ff07f9d11b8c57d3a8d486d4678058cefb6ed2 Signed-off-by: Seoyeon Kim --- Tizen.NUI/src/internal/NDalicPINVOKE.cs | 28 ++----- Tizen.NUI/src/public/PaddingType.cs | 130 ++++++++++++++++++++------------ 2 files changed, 88 insertions(+), 70 deletions(-) mode change 100755 => 100644 Tizen.NUI/src/public/PaddingType.cs diff --git a/Tizen.NUI/src/internal/NDalicPINVOKE.cs b/Tizen.NUI/src/internal/NDalicPINVOKE.cs index ada713d..c757702 100755 --- a/Tizen.NUI/src/internal/NDalicPINVOKE.cs +++ b/Tizen.NUI/src/internal/NDalicPINVOKE.cs @@ -5319,23 +5319,17 @@ class NDalicPINVOKE { [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_Set")] public static extern void PaddingType_Set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2, float jarg3, float jarg4, float jarg5); - [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_x_set")] - public static extern void PaddingType_x_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2); - - [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_x_get")] - public static extern float PaddingType_x_get(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_left_set")] public static extern void PaddingType_left_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2); [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_left_get")] public static extern float PaddingType_left_get(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_y_set")] - public static extern void PaddingType_y_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_start_set")] + public static extern void PaddingType_start_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2); - [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_y_get")] - public static extern float PaddingType_y_get(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_start_get")] + public static extern float PaddingType_start_get(global::System.Runtime.InteropServices.HandleRef jarg1); [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_right_set")] public static extern void PaddingType_right_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2); @@ -5343,11 +5337,11 @@ class NDalicPINVOKE { [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_right_get")] public static extern float PaddingType_right_get(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_width_set")] - public static extern void PaddingType_width_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_end_set")] + public static extern void PaddingType_end_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2); - [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_width_get")] - public static extern float PaddingType_width_get(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_end_get")] + public static extern float PaddingType_end_get(global::System.Runtime.InteropServices.HandleRef jarg1); [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_bottom_set")] public static extern void PaddingType_bottom_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2); @@ -5355,12 +5349,6 @@ class NDalicPINVOKE { [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_bottom_get")] public static extern float PaddingType_bottom_get(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_height_set")] - public static extern void PaddingType_height_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2); - - [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_height_get")] - public static extern float PaddingType_height_get(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PaddingType_top_set")] public static extern void PaddingType_top_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2); diff --git a/Tizen.NUI/src/public/PaddingType.cs b/Tizen.NUI/src/public/PaddingType.cs old mode 100755 new mode 100644 index b0e3019..f014859 --- a/Tizen.NUI/src/public/PaddingType.cs +++ b/Tizen.NUI/src/public/PaddingType.cs @@ -17,6 +17,8 @@ namespace Tizen.NUI { + using System; + public class PaddingType : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -48,6 +50,9 @@ namespace Tizen.NUI } } + /// + /// Dispose. + /// public void Dispose() { //Throw excpetion if Dispose() is called in separate thread. @@ -99,6 +104,12 @@ namespace Tizen.NUI disposed = true; } + /// + /// Equality operator. + /// + /// First operand + /// Second operand + /// True if the values are identical public static bool operator ==(PaddingType a, PaddingType b) { // If both are null, or both are same instance, return true. @@ -120,12 +131,19 @@ namespace Tizen.NUI (System.Math.Abs(a.Top - b.Top) < NDalic.GetRangedEpsilon(a.Top, b.Top)); } + /// + /// Inequality operator. + /// + /// First operand + /// Second operand + /// True if the values are not identical public static bool operator !=(PaddingType a, PaddingType b) { return !(a == b); } ///< The Left value + [Obsolete("Please do not use! this will be removed. please use Start instead")] public float Left { set @@ -138,7 +156,21 @@ namespace Tizen.NUI } } + ///< The Start value + public float Start + { + set + { + start = value; + } + get + { + return start; + } + } + ///< The Right value + [Obsolete("Please do not use! this will be removed. please use End instead")] public float Right { set @@ -151,16 +183,16 @@ namespace Tizen.NUI } } - ///< The Bottom value - public float Bottom + ///< The end value + public float End { set { - bottom = value; + end = value; } get { - return bottom; + return end; } } @@ -177,36 +209,50 @@ namespace Tizen.NUI } } - - public PaddingType() : this(NDalicPINVOKE.new_PaddingType__SWIG_0(), true) + ///< The Bottom value + public float Bottom { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + set + { + bottom = value; + } + get + { + return bottom; + } } - public PaddingType(float x, float y, float width, float height) : this(NDalicPINVOKE.new_PaddingType__SWIG_1(x, y, width, height), true) + /// + /// Creates an uninitialized PaddingType. + /// + public PaddingType() : this(NDalicPINVOKE.new_PaddingType__SWIG_0(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - public void Set(float newX, float newY, float newWidth, float newHeight) + /// + /// PaddingType Constructor. + /// + /// Start padding or X coordinate + /// End padding or Y coordinate + /// Top padding or Height + /// Bottom padding or Width + public PaddingType(float start, float end, float top, float bottom) : this(NDalicPINVOKE.new_PaddingType__SWIG_1(start, end, bottom, top), true) { - NDalicPINVOKE.PaddingType_Set(swigCPtr, newX, newY, newWidth, newHeight); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - private float x + /// + /// Assignment from individual values. + /// + /// Start padding or X coordinate + /// End padding or Y coordinate + /// Top padding or Height + /// Bottom padding or Width + public void Set(float newStart, float newEnd, float newTop, float newBottom) { - set - { - NDalicPINVOKE.PaddingType_x_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - float ret = NDalicPINVOKE.PaddingType_x_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + NDalicPINVOKE.PaddingType_Set(swigCPtr, newStart, newEnd, newBottom, newTop); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } private float left @@ -224,16 +270,16 @@ namespace Tizen.NUI } } - private float y + private float start { set { - NDalicPINVOKE.PaddingType_y_set(swigCPtr, value); + NDalicPINVOKE.PaddingType_start_set(swigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } get { - float ret = NDalicPINVOKE.PaddingType_y_get(swigCPtr); + float ret = NDalicPINVOKE.PaddingType_start_get(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } @@ -254,66 +300,50 @@ namespace Tizen.NUI } } - private float width + private float end { set { - NDalicPINVOKE.PaddingType_width_set(swigCPtr, value); + NDalicPINVOKE.PaddingType_end_set(swigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } get { - float ret = NDalicPINVOKE.PaddingType_width_get(swigCPtr); + float ret = NDalicPINVOKE.PaddingType_end_get(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } - private float bottom - { - set - { - NDalicPINVOKE.PaddingType_bottom_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - float ret = NDalicPINVOKE.PaddingType_bottom_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - private float height + private float top { set { - NDalicPINVOKE.PaddingType_height_set(swigCPtr, value); + NDalicPINVOKE.PaddingType_top_set(swigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } get { - float ret = NDalicPINVOKE.PaddingType_height_get(swigCPtr); + float ret = NDalicPINVOKE.PaddingType_top_get(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } - private float top + private float bottom { set { - NDalicPINVOKE.PaddingType_top_set(swigCPtr, value); + NDalicPINVOKE.PaddingType_bottom_set(swigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } get { - float ret = NDalicPINVOKE.PaddingType_top_get(swigCPtr); + float ret = NDalicPINVOKE.PaddingType_bottom_get(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } - } } -- 2.7.4