Add C# binding for Margin and PaddingEX property in View.
Change-Id: I88e40e58a152a57ae1a8e9c704cd8118aeceb7de
Signed-off-by: Feng Jin <feng16.jin@samsung.com>
public static extern global::System.IntPtr new_Property_Value__SWIG_15(global::System.Runtime.InteropServices.HandleRef jarg1);
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_Property_Value__SWIG_16")]
- public static extern global::System.IntPtr new_Property_Value__SWIG_16(int jarg1);
+ public static extern global::System.IntPtr new_Property_Value__SWIG_16(global::System.Runtime.InteropServices.HandleRef jarg1);
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_Property_Value__SWIG_17")]
- public static extern global::System.IntPtr new_Property_Value__SWIG_17(global::System.Runtime.InteropServices.HandleRef jarg1);
+ public static extern global::System.IntPtr new_Property_Value__SWIG_17(int jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_Property_Value__SWIG_18")]
+ public static extern global::System.IntPtr new_Property_Value__SWIG_18(global::System.Runtime.InteropServices.HandleRef jarg1);
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Property_Value_Assign")]
public static extern global::System.IntPtr Property_Value_Assign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Property_Value_Get__SWIG_14")]
public static extern bool Property_Value_Get__SWIG_14(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Property_Value_Get__SWIG_15")]
+ public static extern bool Property_Value_Get__SWIG_15(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Property_Value_GetArray")]
public static extern global::System.IntPtr Property_Value_GetArray(global::System.Runtime.InteropServices.HandleRef jarg1);
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_View_Property_BACKGROUND_get")]
public static extern int View_Property_BACKGROUND_get();
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_View_Property_MARGIN_get")]
+ public static extern int View_Property_MARGIN_get();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_View_Property_PADDING_get")]
+ public static extern int View_Property_PADDING_get();
+
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_View_Property")]
public static extern global::System.IntPtr new_View_Property();
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WebViewLite_SWIGUpcast")]
public static extern global::System.IntPtr WebViewLite_SWIGUpcast(global::System.IntPtr jarg1);
-}
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_Extents__SWIG_0")]
+ public static extern global::System.IntPtr new_Extents__SWIG_0();
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_Extents__SWIG_1")]
+ public static extern global::System.IntPtr new_Extents__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_new_Extents__SWIG_2")]
+ public static extern global::System.IntPtr new_Extents__SWIG_2(ushort jarg1, ushort jarg2, ushort jarg3, ushort jarg4);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Extents_Assign__SWIG_0")]
+ public static extern global::System.IntPtr Extents_Assign__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Extents_Assign__SWIG_1")]
+ public static extern global::System.IntPtr Extents_Assign__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Extents_EqualTo")]
+ public static extern bool Extents_EqualTo(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Extents_NotEqualTo")]
+ public static extern bool Extents_NotEqualTo(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Extents_start_set")]
+ public static extern void Extents_start_set(global::System.Runtime.InteropServices.HandleRef jarg1, ushort jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Extents_start_get")]
+ public static extern ushort Extents_start_get(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Extents_end_set")]
+ public static extern void Extents_end_set(global::System.Runtime.InteropServices.HandleRef jarg1, ushort jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Extents_end_get")]
+ public static extern ushort Extents_end_get(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Extents_top_set")]
+ public static extern void Extents_top_set(global::System.Runtime.InteropServices.HandleRef jarg1, ushort jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Extents_top_get")]
+ public static extern ushort Extents_top_get(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Extents_bottom_set")]
+ public static extern void Extents_bottom_set(global::System.Runtime.InteropServices.HandleRef jarg1, ushort jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_Extents_bottom_get")]
+ public static extern ushort Extents_bottom_get(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_delete_Extents")]
+ public static extern void delete_Extents(global::System.Runtime.InteropServices.HandleRef jarg1);
+ }
}
--- /dev/null
+/*
+* 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.
+*
+*/
+
+namespace Tizen.NUI
+{
+ internal class SWIGTYPE_p_uint16_t
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+ internal SWIGTYPE_p_uint16_t(global::System.IntPtr cPtr, bool futureUse)
+ {
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ }
+
+ protected SWIGTYPE_p_uint16_t()
+ {
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_uint16_t obj)
+ {
+ return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+ }
+ }
+
+}
internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
+ internal static readonly int MARGIN = NDalicPINVOKE.View_Property_MARGIN_get();
+ internal static readonly int PADDINGEX = NDalicPINVOKE.View_Property_PADDING_get();
}
/// <summary>
SetProperty(View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)value));
}
}
+
+ /// <summary>
+ /// Gets or sets the Margin for use in layout.
+ /// </summary>
+ public Extents Margin
+ {
+ get
+ {
+ Extents temp = new Extents(0, 0, 0, 0);
+ GetProperty(View.Property.MARGIN).Get(temp);
+ return temp;
+ }
+ set
+ {
+ SetProperty(View.Property.MARGIN, new Tizen.NUI.PropertyValue(value));
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets the Padding for use in layout.
+ /// </summary>
+ public Extents PaddingEX
+ {
+ get
+ {
+ Extents temp = new Extents(0, 0, 0, 0);
+ GetProperty(View.Property.PADDINGEX).Get(temp);
+ return temp;
+ }
+ set
+ {
+ SetProperty(View.Property.PADDINGEX, new Tizen.NUI.PropertyValue(value));
+ }
+ }
}
/// <summary>
--- /dev/null
+/*
+* 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.
+*
+*/
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// Extents class describing the a collection of uint16_t.
+ /// </summary>
+ public class Extents : global::System.IDisposable
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+ protected bool swigCMemOwn;
+
+ internal Extents(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(Extents 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;
+
+ /// <summary>
+ /// Destructor.
+ /// </summary>
+ /// <since_tizen> 4 </since_tizen>
+ ~Extents()
+ {
+ if (!isDisposeQueued)
+ {
+ isDisposeQueued = true;
+ DisposeQueue.Instance.Add(this);
+ }
+ }
+
+ /// <summary>
+ /// To make a Extents instance be disposed.
+ /// </summary>
+ /// <since_tizen> 4 </since_tizen>
+ 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_Extents(swigCPtr);
+ }
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+ disposed = true;
+ }
+
+ /// <summary>
+ /// Constructor.
+ /// </summary>
+ /// <since_tizen> 4 </since_tizen>
+ public Extents() : this(NDalicPINVOKE.new_Extents__SWIG_0(), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Constructor.
+ /// </summary>
+ /// <param name="copy">A reference to the copied Extents.</param>
+ /// <since_tizen> 4 </since_tizen>
+ public Extents(Extents copy) : this(NDalicPINVOKE.new_Extents__SWIG_1(Extents.getCPtr(copy)), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Constructor.
+ /// <param name="start">Start extent.</param>
+ /// <param name="end">End extent.</param>
+ /// <param name="top">Top extent.</param>
+ /// <param name="bottom">Bottom extent.</param>
+ /// </summary>
+ /// <since_tizen> 4 </since_tizen>
+ public Extents(ushort start, ushort end, ushort top, ushort bottom) : this(NDalicPINVOKE.new_Extents__SWIG_2(start, end, top, bottom), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ internal Extents Assign(SWIGTYPE_p_uint16_t array)
+ {
+ Extents ret = new Extents(NDalicPINVOKE.Extents_Assign__SWIG_1(swigCPtr, SWIGTYPE_p_uint16_t.getCPtr(array)), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ internal Extents Assign(Extents copy)
+ {
+ Extents ret = new Extents(NDalicPINVOKE.Extents_Assign__SWIG_0(swigCPtr, Extents.getCPtr(copy)), false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Equality operator.
+ /// </summary>
+ /// <param name="rhs">The Extents to test against.</param>
+ /// <returns>True if the extents are not equal.</returns>
+ /// <since_tizen> 4 </since_tizen>
+ public bool EqualTo(Extents rhs)
+ {
+ bool ret = NDalicPINVOKE.Extents_EqualTo(swigCPtr, Extents.getCPtr(rhs));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Inequality operator.
+ /// </summary>
+ /// <param name="rhs">The Extents to test against.</param>
+ /// <returns>True if the extents are not equal.</returns>
+ /// <since_tizen> 4 </since_tizen>
+ public bool NotEqualTo(Extents rhs)
+ {
+ bool ret = NDalicPINVOKE.Extents_NotEqualTo(swigCPtr, Extents.getCPtr(rhs));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// The Start extent.
+ /// </summary>
+ /// <since_tizen> 4 </since_tizen>
+ public ushort Start
+ {
+ set
+ {
+ NDalicPINVOKE.Extents_start_set(swigCPtr, value);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ get
+ {
+ ushort ret = NDalicPINVOKE.Extents_start_get(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+ }
+
+ /// <summary>
+ /// The End extend.
+ /// </summary>
+ /// <since_tizen> 4 </since_tizen>
+ public ushort End
+ {
+ set
+ {
+ NDalicPINVOKE.Extents_end_set(swigCPtr, value);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ get
+ {
+ ushort ret = NDalicPINVOKE.Extents_end_get(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+ }
+
+ /// <summary>
+ /// The Top extend.
+ /// </summary>
+ /// <since_tizen> 4 </since_tizen>
+ public ushort Top
+ {
+ set
+ {
+ NDalicPINVOKE.Extents_top_set(swigCPtr, value);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ get
+ {
+ ushort ret = NDalicPINVOKE.Extents_top_get(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+ }
+
+ /// <summary>
+ /// The Bottom Extend.
+ /// </summary>
+ /// <since_tizen> 4 </since_tizen>
+ public ushort Bottom
+ {
+ set
+ {
+ NDalicPINVOKE.Extents_bottom_set(swigCPtr, value);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ get
+ {
+ ushort ret = NDalicPINVOKE.Extents_bottom_get(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+ }
+
+ }
+
+}
/// <summary>
/// A string key to PropertyValue mapping.
/// </summary>
- Map
+ Map,
+ /// <summary>
+ /// An extents type.
+ /// </summary>
+ Extents
}
/// <summary>
{
value = new PropertyValue((RelativeVector4)obj);
}
+ else if(type.Equals(typeof(Extents)))
+ {
+ value = new PropertyValue((Extents)obj);
+ }
else
{
throw new global::System.InvalidOperationException("Unimplemented type for Property Value :" + type.Name);
}
/// <summary>
+ /// Creates a Extents value.
+ /// </summary>
+ /// <param name="extentsValue">A Extents value.</param>
+ /// <since_tizen> 4 </since_tizen>
+ public PropertyValue(Extents extentsValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_16(Extents.getCPtr(extentsValue)), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
/// Creates a PropertyType value.
/// </summary>
/// <param name="type">A PropertyType value.</param>
/// <since_tizen> 3 </since_tizen>
- public PropertyValue(PropertyType type) : this(NDalicPINVOKE.new_Property_Value__SWIG_16((int)type), true)
+ public PropertyValue(PropertyType type) : this(NDalicPINVOKE.new_Property_Value__SWIG_17((int)type), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// </summary>
/// <param name="value">A PropertyValue value.</param>
/// <since_tizen> 3 </since_tizen>
- public PropertyValue(PropertyValue value) : this(NDalicPINVOKE.new_Property_Value__SWIG_17(PropertyValue.getCPtr(value)), true)
+ public PropertyValue(PropertyValue value) : this(NDalicPINVOKE.new_Property_Value__SWIG_18(PropertyValue.getCPtr(value)), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
+
+ /// <summary>
+ /// Retrieves a Extents value.
+ /// </summary>
+ /// <param name="extentsValue">On return, a extents.</param>
+ /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
+ /// <since_tizen> 4 </since_tizen>
+ public bool Get(Extents extentsValue)
+ {
+ bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_15(swigCPtr, Extents.getCPtr(extentsValue));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
}
}
\ No newline at end of file