From: dongsug.song Date: Tue, 13 Jun 2017 07:43:22 +0000 (+0900) Subject: Revert "[Tizen] Revert "merging dali-sharp class scope with nui"" X-Git-Tag: submit/trunk/20170823.075128~91^2~160 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e7b59a3cf67d99a10ec82a5bb9aa5c64b430d151;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Revert "[Tizen] Revert "merging dali-sharp class scope with nui"" This reverts commit 23f3392a29e9f7713478ada8805ea93a6fa08600. Change-Id: I2f337e34cdf50a7bc9e58c89558efb9a06cda0fe --- diff --git a/src/Tizen.NUI/src/internal/AlignType.cs b/src/Tizen.NUI/src/internal/AlignType.cs deleted file mode 100644 index c1537eb56..000000000 --- a/src/Tizen.NUI/src/internal/AlignType.cs +++ /dev/null @@ -1,27 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// 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. -//------------------------------------------------------------------------------ - -/* moved to VisualMaps.cs -namespace Tizen.NUI -{ - public enum AlignType - { - TOP_BEGIN = 0, - TOP_CENTER, - TOP_END, - CENTER_BEGIN, - CENTER, - CENTER_END, - BOTTOM_BEGIN, - BOTTOM_CENTER, - BOTTOM_END - } -} -*/ \ No newline at end of file diff --git a/src/Tizen.NUI/src/internal/Animatable.cs b/src/Tizen.NUI/src/internal/Animatable.cs deleted file mode 100755 index 7e5ee28eb..000000000 --- a/src/Tizen.NUI/src/internal/Animatable.cs +++ /dev/null @@ -1,209 +0,0 @@ -/** 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 -{ - - public class Animatable : BaseHandle - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal Animatable(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Handle_SWIGUpcast(cPtr), cMemoryOwn) - { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Animatable obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - 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_Handle(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - base.Dispose(type); - } - - - public Animatable() : this(NDalicPINVOKE.Handle_New(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public Animatable(Animatable handle) : this(NDalicPINVOKE.new_Handle__SWIG_1(Animatable.getCPtr(handle)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool Supports(Animatable.Capability capability) - { - bool ret = NDalicPINVOKE.Handle_Supports(swigCPtr, (int)capability); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetPropertyCount() - { - uint ret = NDalicPINVOKE.Handle_GetPropertyCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string GetPropertyName(int index) - { - string ret = NDalicPINVOKE.Handle_GetPropertyName(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public int GetPropertyIndex(string name) - { - int ret = NDalicPINVOKE.Handle_GetPropertyIndex(swigCPtr, name); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool IsPropertyWritable(int index) - { - bool ret = NDalicPINVOKE.Handle_IsPropertyWritable(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool IsPropertyAnimatable(int index) - { - bool ret = NDalicPINVOKE.Handle_IsPropertyAnimatable(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool IsPropertyAConstraintInput(int index) - { - bool ret = NDalicPINVOKE.Handle_IsPropertyAConstraintInput(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public PropertyType GetPropertyType(int index) - { - PropertyType ret = (PropertyType)NDalicPINVOKE.Handle_GetPropertyType(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetProperty(int index, PropertyValue propertyValue) - { - Tizen.NUI.Object.SetProperty(swigCPtr, index, propertyValue); - } - - public int RegisterProperty(string name, PropertyValue propertyValue) - { - int ret = NDalicPINVOKE.Handle_RegisterProperty__SWIG_0(swigCPtr, name, PropertyValue.getCPtr(propertyValue)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public int RegisterProperty(string name, PropertyValue propertyValue, PropertyAccessMode accessMode) - { - int ret = NDalicPINVOKE.Handle_RegisterProperty__SWIG_1(swigCPtr, name, PropertyValue.getCPtr(propertyValue), (int)accessMode); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public PropertyValue GetProperty(int index) - { - PropertyValue ret = Tizen.NUI.Object.GetProperty(swigCPtr, index); - return ret; - } - - internal void GetPropertyIndices(VectorInteger indices) - { - NDalicPINVOKE.Handle_GetPropertyIndices(swigCPtr, VectorInteger.getCPtr(indices)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal PropertyNotification AddPropertyNotification(int index, PropertyCondition condition) - { - PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.Handle_AddPropertyNotification__SWIG_0(swigCPtr, index, PropertyCondition.getCPtr(condition)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal PropertyNotification AddPropertyNotification(int index, int componentIndex, PropertyCondition condition) - { - PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.Handle_AddPropertyNotification__SWIG_1(swigCPtr, index, componentIndex, PropertyCondition.getCPtr(condition)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal void RemovePropertyNotification(PropertyNotification propertyNotification) - { - NDalicPINVOKE.Handle_RemovePropertyNotification(swigCPtr, PropertyNotification.getCPtr(propertyNotification)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemovePropertyNotifications() - { - NDalicPINVOKE.Handle_RemovePropertyNotifications(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveConstraints() - { - NDalicPINVOKE.Handle_RemoveConstraints__SWIG_0(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveConstraints(uint tag) - { - NDalicPINVOKE.Handle_RemoveConstraints__SWIG_1(swigCPtr, tag); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public enum Capability - { - DYNAMIC_PROPERTIES = 0x01 - } - - } - -} diff --git a/src/Tizen.NUI/src/internal/BaseHandle.cs b/src/Tizen.NUI/src/internal/BaseHandle.cs deleted file mode 100755 index 75afbf162..000000000 --- a/src/Tizen.NUI/src/internal/BaseHandle.cs +++ /dev/null @@ -1,314 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// 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. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI -{ - - public class BaseHandle : global::System.IDisposable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal BaseHandle(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(BaseHandle 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; - - ~BaseHandle() - { - 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_BaseHandle(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - - - // Returns the bool value true to indicate that an operand is true and returns false otherwise. - public static bool operator true(BaseHandle handle) - { - // if the C# object is null, return false - if (BaseHandle.ReferenceEquals(handle, null)) - { - return false; - } - // returns true if the handle has a body, false otherwise - return handle.HasBody(); - } - - // Returns the bool false to indicate that an operand is false and returns true otherwise. - public static bool operator false(BaseHandle handle) - { - // if the C# object is null, return true - if (BaseHandle.ReferenceEquals(handle, null)) - { - return true; - } - return !handle.HasBody(); - } - - // Explicit conversion from Handle to bool. - public static explicit operator bool(BaseHandle handle) - { - // if the C# object is null, return false - if (BaseHandle.ReferenceEquals(handle, null)) - { - return false; - } - // returns true if the handle has a body, false otherwise - return handle.HasBody(); - } - - // Equality operator - public static bool operator ==(BaseHandle x, BaseHandle y) - { - // if the C# objects are the same return true - if (BaseHandle.ReferenceEquals(x, y)) - { - return true; - } - if (!BaseHandle.ReferenceEquals(x, null) && !BaseHandle.ReferenceEquals(y, null)) - { - // drop into native code to see if both handles point to the same body - return x.IsEqual(y); - } - - if (BaseHandle.ReferenceEquals(x, null) && !BaseHandle.ReferenceEquals(y, null)) - { - if (y.HasBody()) return false; - else return true; - } - if (!BaseHandle.ReferenceEquals(x, null) && BaseHandle.ReferenceEquals(y, null)) - { - if (x.HasBody()) return false; - else return true; - } - - return false; - } - - // Inequality operator. Returns Null if either operand is Null - public static bool operator !=(BaseHandle x, BaseHandle y) - { - return !(x == y); - } - - // Logical AND operator for && - // It's possible when doing a && this function (opBitwiseAnd) is never called due - // to short circuiting. E.g. - // If you perform x && y What actually is called is - // BaseHandle.op_False( x ) ? BaseHandle.op_True( x ) : BaseHandle.opTrue( BaseHandle.opBitwiseAnd(x,y) ) - // - public static BaseHandle operator &(BaseHandle x, BaseHandle y) - { - if (x == y) - { - return x; - } - return null; - } - - // Logical OR operator for || - // It's possible when doing a || this function (opBitwiseOr) is never called due - // to short circuiting. E.g. - // If you perform x || y What actually is called is - // BaseHandle.op_True( x ) ? BaseHandle.op_True( x ) : BaseHandle.opTrue( BaseHandle.opBitwiseOr(x,y) ) - public static BaseHandle operator |(BaseHandle x, BaseHandle y) - { - if (!BaseHandle.ReferenceEquals(x, null) || !BaseHandle.ReferenceEquals(y, null)) - { - if (x.HasBody()) - { - return x; - } - if (y.HasBody()) - { - return y; - } - return null; - } - return null; - } - - // Logical ! operator - public static bool operator !(BaseHandle x) - { - // if the C# object is null, return true - if (BaseHandle.ReferenceEquals(x, null)) - { - return true; - } - if (x.HasBody()) - { - return false; - } - return true; - } - - - internal BaseHandle(BaseObject handle) : this(NDalicPINVOKE.new_BaseHandle__SWIG_0(BaseObject.getCPtr(handle)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public BaseHandle() : this(NDalicPINVOKE.new_BaseHandle__SWIG_1(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public BaseHandle(BaseHandle handle) : this(NDalicPINVOKE.new_BaseHandle__SWIG_2(BaseHandle.getCPtr(handle)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public BaseHandle Assign(BaseHandle rhs) - { - BaseHandle ret = new BaseHandle(NDalicPINVOKE.BaseHandle_Assign(swigCPtr, BaseHandle.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool DoAction(string actionName, PropertyMap attributes) - { - bool ret = NDalicPINVOKE.BaseHandle_DoAction(swigCPtr, actionName, PropertyMap.getCPtr(attributes)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string GetTypeName() - { - string ret = NDalicPINVOKE.BaseHandle_GetTypeName(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool GetTypeInfo(TypeInfo info) - { - bool ret = NDalicPINVOKE.BaseHandle_GetTypeInfo(swigCPtr, TypeInfo.getCPtr(info)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal BaseObject GetBaseObject() - { - BaseObject ret = new BaseObject(NDalicPINVOKE.BaseHandle_GetBaseObject__SWIG_0(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reset() - { - NDalicPINVOKE.BaseHandle_Reset(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool EqualTo(BaseHandle rhs) - { - bool ret = NDalicPINVOKE.BaseHandle_EqualTo(swigCPtr, BaseHandle.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool NotEqualTo(BaseHandle rhs) - { - bool ret = NDalicPINVOKE.BaseHandle_NotEqualTo(swigCPtr, BaseHandle.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal RefObject GetObjectPtr() - { - global::System.IntPtr cPtr = NDalicPINVOKE.BaseHandle_GetObjectPtr(swigCPtr); - RefObject ret = (cPtr == global::System.IntPtr.Zero) ? null : new RefObject(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool HasBody() - { - bool ret = NDalicPINVOKE.BaseHandle_HasBody(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool IsEqual(BaseHandle rhs) - { - bool ret = NDalicPINVOKE.BaseHandle_IsEqual(swigCPtr, BaseHandle.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - } - -} - diff --git a/src/Tizen.NUI/src/internal/Builder.cs b/src/Tizen.NUI/src/internal/Builder.cs index 6e5a52104..0001b8915 100755 --- a/src/Tizen.NUI/src/internal/Builder.cs +++ b/src/Tizen.NUI/src/internal/Builder.cs @@ -32,7 +32,7 @@ namespace Tizen.NUI using Tizen.NUI.BaseComponents; - public class Builder : BaseHandle + internal class Builder : BaseHandle { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/Button.cs b/src/Tizen.NUI/src/internal/Button.cs deleted file mode 100755 index 51a416cc7..000000000 --- a/src/Tizen.NUI/src/internal/Button.cs +++ /dev/null @@ -1,973 +0,0 @@ -// 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 -// Some have been manually changed - -namespace Tizen.NUI.UIComponents -{ - - using System; - using System.Runtime.InteropServices; - using Tizen.NUI.BaseComponents; - - /// - /// Button is a base class for different kinds of buttons.
- /// This class provides the disabled property and the clicked signal.
- /// A Clicked event handler is emitted when the button is touched and the touch point doesn't leave the boundary of the button.
- /// When the disabled property is set to true, no signal is emitted.
- /// 'Visual' describes not just traditional images like png, bmp but refers to whatever is used to show the button, it could be a color, gradient or some other kind of renderer.
- /// The button's appearance can be modified by setting properties for the various visuals/images.
- /// It is not mandatory to set all visuals. A button could be defined only by setting its background visual or by setting its background and selected visuals.
- /// The button visual is shown over the background visual.
- /// When pressed the unselected visuals are replaced by the selected visual.
- /// The text label is always placed on the top of all images.
- /// When the button is disabled, background, button and selected visuals are replaced by their disabled visuals.
- ///
- public class Button : View - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal Button(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Button_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(Button obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - /// - /// To make Button instance be disposed. - /// - 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. - - //Unreference this from if a static instance refer to this. - ViewRegistry.UnregisterView(this); - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Button(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - base.Dispose(type); - } - - - private EventHandlerWithReturnType _clickedEventHandler; - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ClickedCallbackType(global::System.IntPtr data); - private ClickedCallbackType _clickedCallback; - - /// - /// Clicked will be triggered when the button is touched and the touch point doesn't leave the boundary of the button. - /// - public event EventHandlerWithReturnType Clicked - { - add - { - if (_clickedEventHandler == null) - { - _clickedCallback = OnClicked; - ClickedSignal().Connect(_clickedCallback); - } - - _clickedEventHandler += value; - } - - remove - { - _clickedEventHandler -= value; - - if (_clickedEventHandler == null && ClickedSignal().Empty() == false) - { - ClickedSignal().Disconnect(_clickedCallback); - } - } - } - - - private bool OnClicked(IntPtr data) - { - if (_clickedEventHandler != null) - { - return _clickedEventHandler(this, null); - } - return false; - } - - - - private EventHandlerWithReturnType _pressedEventHandler; - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool PressedCallbackType(global::System.IntPtr data); - private PressedCallbackType _pressedCallback; - - /// - /// Pressed will be triggered when the button is touched. - /// - public event EventHandlerWithReturnType Pressed - { - add - { - if (_pressedEventHandler == null) - { - _pressedCallback = OnPressed; - PressedSignal().Connect(_pressedCallback); - } - - _pressedEventHandler += value; - } - - remove - { - _pressedEventHandler -= value; - - if (_pressedEventHandler == null && PressedSignal().Empty() == false) - { - this.PressedSignal().Disconnect(_pressedCallback); - } - } - } - - private bool OnPressed(IntPtr data) - { - if (_pressedEventHandler != null) - { - return _pressedEventHandler(this, null); - } - return false; - } - - - - private EventHandlerWithReturnType _releasedEventHandler; - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ReleasedCallbackType(global::System.IntPtr data); - private ReleasedCallbackType _releasedCallback; - - /// - /// Released will be triggered when the button is touched and the touch point leaves the boundary of the button. - /// - public event EventHandlerWithReturnType Released - { - add - { - if (_releasedEventHandler == null) - { - _releasedCallback = OnReleased; - ReleasedSignal().Connect(_releasedCallback); - } - _releasedEventHandler += value; - } - - remove - { - _releasedEventHandler -= value; - - if (_releasedEventHandler == null && ReleasedSignal().Empty() == false) - { - ReleasedSignal().Disconnect(_releasedCallback); - } - - } - } - - private bool OnReleased(IntPtr data) - { - if (_releasedEventHandler != null) - { - return _releasedEventHandler(this, null); - } - return false; - } - - - private EventHandlerWithReturnType _stateChangedEventHandler; - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool StateChangedCallback(global::System.IntPtr data); - private StateChangedCallback _stateChangedCallback; - - /// - /// StateChanged will be triggered when the button's state is changed. - /// - public event EventHandlerWithReturnType StateChanged - { - add - { - if (_stateChangedEventHandler == null) - { - _stateChangedCallback = OnStateChanged; - StateChangedSignal().Connect(_stateChangedCallback); - } - - _stateChangedEventHandler += value; - } - - remove - { - _stateChangedEventHandler -= value; - - if (_stateChangedEventHandler == null && StateChangedSignal().Empty() == false) - { - StateChangedSignal().Disconnect(_stateChangedCallback); - } - } - } - - private bool OnStateChanged(IntPtr data) - { - if (_stateChangedEventHandler != null) - { - return _stateChangedEventHandler(this, null); - } - return false; - } - - - - internal static Button GetButtonFromPtr(global::System.IntPtr cPtr) - { - Button ret = new Button(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Gets/Sets the unselected button foreground/icon visual - /// - public Tizen.NUI.PropertyMap UnselectedVisual - { - get - { - Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); - GetProperty(Button.Property.UNSELECTED_VISUAL).Get(temp); - return temp; - } - set - { - SetProperty(Button.Property.UNSELECTED_VISUAL, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// Gets/Sets the selected button foreground/icon visual - /// - public Tizen.NUI.PropertyMap SelectedVisual - { - get - { - Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); - GetProperty(Button.Property.SELECTED_VISUAL).Get(temp); - return temp; - } - set - { - SetProperty(Button.Property.SELECTED_VISUAL, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// Gets/Sets the disabled selected state foreground/icon button visual - /// - public Tizen.NUI.PropertyMap DisabledSelectedVisual - { - get - { - Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); - GetProperty(Button.Property.DISABLED_SELECTED_VISUAL).Get(temp); - return temp; - } - set - { - SetProperty(Button.Property.DISABLED_SELECTED_VISUAL, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// Gets/Sets the disabled unselected state foreground/icon visual - /// - public Tizen.NUI.PropertyMap DisabledUnselectedVisual - { - get - { - Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); - GetProperty(Button.Property.DISABLED_UNSELECTED_VISUAL).Get(temp); - return temp; - } - set - { - SetProperty(Button.Property.DISABLED_UNSELECTED_VISUAL, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// Gets/Sets the disabled in the unselected state background, button visual - /// - public Tizen.NUI.PropertyMap UnselectedBackgroundVisual - { - get - { - Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); - GetProperty(Button.Property.UNSELECTED_BACKGROUND_VISUAL).Get(temp); - return temp; - } - set - { - SetProperty(Button.Property.UNSELECTED_BACKGROUND_VISUAL, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// Gets/Sets the selected background button visual - /// - public Tizen.NUI.PropertyMap SelectedBackgroundVisual - { - get - { - Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); - GetProperty(Button.Property.SELECTED_BACKGROUND_VISUAL).Get(temp); - return temp; - } - set - { - SetProperty(Button.Property.SELECTED_BACKGROUND_VISUAL, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// Gets/Sets the disabled while unselected background button visual - /// - public Tizen.NUI.PropertyMap DisabledUnselectedBackgroundVisual - { - get - { - Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); - GetProperty(Button.Property.DISABLED_UNSELECTED_BACKGROUND_VISUAL).Get(temp); - return temp; - } - set - { - SetProperty(Button.Property.DISABLED_UNSELECTED_BACKGROUND_VISUAL, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// Gets/Sets the disabled while selected background button visual - /// - public Tizen.NUI.PropertyMap DisabledSelectedBackgroundVisual - { - get - { - Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); - GetProperty(Button.Property.DISABLED_SELECTED_BACKGROUND_VISUAL).Get(temp); - return temp; - } - set - { - SetProperty(Button.Property.DISABLED_SELECTED_BACKGROUND_VISUAL, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// Gets/Sets the position of the the label in relation to the foreground/icon if both present - /// - public Align LabelRelativeAlignment - { - get - { - string temp; - if (GetProperty(Button.Property.LABEL_RELATIVE_ALIGNMENT).Get(out temp) == false) - { -#if DEBUG_ON - Tizen.Log.Error("NUI", "LabelRelativeAlignment get error!"); -#endif - } - switch (temp) - { - case "BEGIN": - return Align.Begin; - case "END": - return Align.End; - case "TOP": - return Align.Top; - case "BOTTOM": - return Align.Bottom; - default: - return Align.End; - } - } - set - { - string valueToString = ""; - switch (value) - { - case Align.Begin: - { - valueToString = "BEGIN"; - break; - } - case Align.End: - { - valueToString = "END"; - break; - } - case Align.Top: - { - valueToString = "TOP"; - break; - } - case Align.Bottom: - { - valueToString = "BOTTOM"; - break; - } - default: - { - valueToString = "END"; - break; - } - } - SetProperty(Button.Property.LABEL_RELATIVE_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString)); - } - } - - /// - /// Gets/Sets the padding around the text - /// - public Vector4 LabelPadding - { - get - { - Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); - GetProperty(Button.Property.LABEL_PADDING).Get(temp); - return temp; - } - set - { - SetProperty(Button.Property.LABEL_PADDING, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// Gets/Sets the padding around the foreground visual - /// - public Vector4 VisualPadding - { - get - { - Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); - GetProperty(Button.Property.VISUAL_PADDING).Get(temp); - return temp; - } - set - { - SetProperty(Button.Property.VISUAL_PADDING, new Tizen.NUI.PropertyValue(value)); - } - } - - internal class Property : global::System.IDisposable - { - 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_Button_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - internal static readonly int UNSELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_UNSELECTED_VISUAL_get(); - internal static readonly int SELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_SELECTED_VISUAL_get(); - internal static readonly int DISABLED_SELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_SELECTED_VISUAL_get(); - internal static readonly int DISABLED_UNSELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_UNSELECTED_VISUAL_get(); - internal static readonly int UNSELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_UNSELECTED_BACKGROUND_VISUAL_get(); - internal static readonly int SELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_SELECTED_BACKGROUND_VISUAL_get(); - internal static readonly int DISABLED_UNSELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_UNSELECTED_BACKGROUND_VISUAL_get(); - internal static readonly int DISABLED_SELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_SELECTED_BACKGROUND_VISUAL_get(); - internal static readonly int LABEL_RELATIVE_ALIGNMENT = NDalicManualPINVOKE.Button_Property_LABEL_RELATIVE_ALIGNMENT_get(); - internal static readonly int LABEL_PADDING = NDalicManualPINVOKE.Button_Property_LABEL_PADDING_get(); - internal static readonly int VISUAL_PADDING = NDalicManualPINVOKE.Button_Property_VISUAL_PADDING_get(); - //changed - internal Property() : this(NDalicPINVOKE.new_Button_Property(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal static readonly int DISABLED = NDalicPINVOKE.Button_Property_DISABLED_get(); - internal static readonly int AUTO_REPEATING = NDalicPINVOKE.Button_Property_AUTO_REPEATING_get(); - internal static readonly int INITIAL_AUTO_REPEATING_DELAY = NDalicPINVOKE.Button_Property_INITIAL_AUTO_REPEATING_DELAY_get(); - internal static readonly int NEXT_AUTO_REPEATING_DELAY = NDalicPINVOKE.Button_Property_NEXT_AUTO_REPEATING_DELAY_get(); - internal static readonly int TOGGLABLE = NDalicPINVOKE.Button_Property_TOGGLABLE_get(); - internal static readonly int SELECTED = NDalicPINVOKE.Button_Property_SELECTED_get(); - internal static readonly int UNSELECTED_COLOR = NDalicPINVOKE.Button_Property_UNSELECTED_COLOR_get(); - internal static readonly int SELECTED_COLOR = NDalicPINVOKE.Button_Property_SELECTED_COLOR_get(); - internal static readonly int LABEL = NDalicPINVOKE.Button_Property_LABEL_get(); - internal static readonly int LABEL_TEXT = NDalicPINVOKE.Button_Property_LABEL_TEXT_get(); - - } - - /// - /// Creates an uninitialized Button.
- /// Only derived versions can be instantiated.
- ///
- public Button() : this(NDalicPINVOKE.new_Button__SWIG_0(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal Button(Button button) : this(NDalicPINVOKE.new_Button__SWIG_1(Button.getCPtr(button)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal Button Assign(Button button) - { - Button ret = new Button(NDalicPINVOKE.Button_Assign(swigCPtr, Button.getCPtr(button)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Downcasts a handle to Button handle.
- /// If handle points to a Button, the downcast produces valid handle.
- /// If not the returned handle is left uninitialized.
- ///
- /// Handle to an object - /// A handle to a Button or an uninitialized handle - public new static Button DownCast(BaseHandle handle) - { - Button ret = new Button(NDalicPINVOKE.Button_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal bool IsDisabled() - { - bool ret = NDalicPINVOKE.Button_IsDisabled(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal bool IsAutoRepeating() - { - bool ret = NDalicPINVOKE.Button_IsAutoRepeating(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal float GetInitialAutoRepeatingDelay() - { - float ret = NDalicPINVOKE.Button_GetInitialAutoRepeatingDelay(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal float GetNextAutoRepeatingDelay() - { - float ret = NDalicPINVOKE.Button_GetNextAutoRepeatingDelay(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal bool IsTogglableButton() - { - bool ret = NDalicPINVOKE.Button_IsTogglableButton(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal bool IsSelected() - { - bool ret = NDalicPINVOKE.Button_IsSelected(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Retrieves button's animation time. - /// - /// - public float GetAnimationTime() - { - float ret = NDalicPINVOKE.Button_GetAnimationTime(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal string GetLabelText() - { - string ret = NDalicPINVOKE.Button_GetLabelText(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal void SetLabel(View label) - { - NDalicPINVOKE.Button_SetLabel(swigCPtr, View.getCPtr(label)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal void SetButtonImage(Image image) - { - NDalicPINVOKE.Button_SetButtonImage(swigCPtr, Image.getCPtr(image)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal void SetSelectedImage(Image image) - { - NDalicPINVOKE.Button_SetSelectedImage(swigCPtr, Image.getCPtr(image)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal View GetButtonImage() - { - View ret = new View(NDalicPINVOKE.Button_GetButtonImage(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal View GetSelectedImage() - { - View ret = new View(NDalicPINVOKE.Button_GetSelectedImage(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal ButtonSignal PressedSignal() - { - ButtonSignal ret = new ButtonSignal(NDalicPINVOKE.Button_PressedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal ButtonSignal ReleasedSignal() - { - ButtonSignal ret = new ButtonSignal(NDalicPINVOKE.Button_ReleasedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal ButtonSignal ClickedSignal() - { - ButtonSignal ret = new ButtonSignal(NDalicPINVOKE.Button_ClickedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal ButtonSignal StateChangedSignal() - { - ButtonSignal ret = new ButtonSignal(NDalicPINVOKE.Button_StateChangedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal enum PropertyRange - { - PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, - PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000 - } - - /// - /// Gets/Sets the button as disabled. - /// - public bool Disabled - { - get - { - bool temp = false; - GetProperty(Button.Property.DISABLED).Get(ref temp); - return temp; - } - set - { - SetProperty(Button.Property.DISABLED, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// If the autorepeating property is set to true then the togglable property is set to false. - /// - public bool AutoRepeating - { - get - { - bool temp = false; - GetProperty(Button.Property.AUTO_REPEATING).Get(ref temp); - return temp; - } - set - { - SetProperty(Button.Property.AUTO_REPEATING, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// By default this value is set to 0.15 seconds. - /// - public float InitialAutoRepeatingDelay - { - get - { - float temp = 0.0f; - GetProperty(Button.Property.INITIAL_AUTO_REPEATING_DELAY).Get(ref temp); - return temp; - } - set - { - SetProperty(Button.Property.INITIAL_AUTO_REPEATING_DELAY, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// default this value is set to 0.05 seconds. - /// - public float NextAutoRepeatingDelay - { - get - { - float temp = 0.0f; - GetProperty(Button.Property.NEXT_AUTO_REPEATING_DELAY).Get(ref temp); - return temp; - } - set - { - SetProperty(Button.Property.NEXT_AUTO_REPEATING_DELAY, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// If the togglable property is set to true, then the autorepeating property is set to false. - /// - public bool Togglable - { - get - { - bool temp = false; - GetProperty(Button.Property.TOGGLABLE).Get(ref temp); - return temp; - } - set - { - SetProperty(Button.Property.TOGGLABLE, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// /Gets/Sets the togglable button as either selected or unselected, togglable property must be set to true. - /// - public bool Selected - { - get - { - bool temp = false; - GetProperty(Button.Property.SELECTED).Get(ref temp); - return temp; - } - set - { - SetProperty(Button.Property.SELECTED, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// Gets/Sets unselected color. - /// - public Color UnselectedColor - { - get - { - Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f); - GetProperty(Button.Property.UNSELECTED_COLOR).Get(temp); - return temp; - } - set - { - SetProperty(Button.Property.UNSELECTED_COLOR, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// Gets/Sets selected color. - /// - public Color SelectedColor - { - get - { - Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f); - GetProperty(Button.Property.SELECTED_COLOR).Get(temp); - return temp; - } - set - { - SetProperty(Button.Property.SELECTED_COLOR, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// Gets/Sets label. - /// - public Tizen.NUI.PropertyMap Label - { - get - { - Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); - GetProperty(Button.Property.LABEL).Get(temp); - return temp; - } - set - { - SetProperty(Button.Property.LABEL, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// Gets/Sets text of label. - /// - public string LabelText - { - get - { - string temp; - GetProperty(Button.Property.LABEL_TEXT).Get(out temp); - return temp; - } - set - { - SetProperty(Button.Property.LABEL_TEXT, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// Enumeration for describing the position the text label can be in relation to the control(and foreground/icon). - /// - public enum Align - { - /// - /// At the start of the control before the foreground/icon - /// - Begin, - /// - /// At the end of the control after the foreground/icon - /// - End, - /// - /// At the top of the control above the foreground/icon - /// - Top, - /// - /// At the bottom of the control below the foreground/icon - /// - Bottom - } - - } - -} diff --git a/src/Tizen.NUI/src/internal/Camera.cs b/src/Tizen.NUI/src/internal/Camera.cs index 26dbf6944..b7fe34d49 100755 --- a/src/Tizen.NUI/src/internal/Camera.cs +++ b/src/Tizen.NUI/src/internal/Camera.cs @@ -27,7 +27,7 @@ namespace Tizen.NUI { - public class Camera : Animatable + internal class Camera : Animatable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/ClampState.cs b/src/Tizen.NUI/src/internal/ClampState.cs deleted file mode 100755 index bcb760aaf..000000000 --- a/src/Tizen.NUI/src/internal/ClampState.cs +++ /dev/null @@ -1,21 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// 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. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI -{ - - internal enum ClampState - { - NotClamped, - ClampedToMin, - ClampedToMax - } - -} diff --git a/src/Tizen.NUI/src/internal/ClampState2D.cs b/src/Tizen.NUI/src/internal/ClampState2D.cs deleted file mode 100755 index 1ebf1bafa..000000000 --- a/src/Tizen.NUI/src/internal/ClampState2D.cs +++ /dev/null @@ -1,139 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// 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. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI -{ - - internal class ClampState2D : global::System.IDisposable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal ClampState2D(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(ClampState2D 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; - - protected enum DisposeTypes - { - Explicit, //Called By User - Implicit, //Called by DisposeQueue - } - - ~ClampState2D() - { - 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_ClampState2D(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - - public ClampState x - { - set - { - NDalicPINVOKE.ClampState2D_x_set(swigCPtr, (int)value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - ClampState ret = (ClampState)NDalicPINVOKE.ClampState2D_x_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public ClampState y - { - set - { - NDalicPINVOKE.ClampState2D_y_set(swigCPtr, (int)value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - ClampState ret = (ClampState)NDalicPINVOKE.ClampState2D_y_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public ClampState2D() : this(NDalicPINVOKE.new_ClampState2D(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - } - -} diff --git a/src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs b/src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs index c8f952e05..20ffdf293 100755 --- a/src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs +++ b/src/Tizen.NUI/src/internal/ConnectionTrackerInterface.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class ConnectionTrackerInterface : SignalObserver + internal class ConnectionTrackerInterface : SignalObserver { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/ControlOrientationType.cs b/src/Tizen.NUI/src/internal/ControlOrientationType.cs deleted file mode 100755 index 6fac6b7c4..000000000 --- a/src/Tizen.NUI/src/internal/ControlOrientationType.cs +++ /dev/null @@ -1,22 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// 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. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI -{ - - public enum ControlOrientationType - { - Up, - Left, - Down, - Right - } - -} diff --git a/src/Tizen.NUI/src/internal/CustomActor.cs b/src/Tizen.NUI/src/internal/CustomActor.cs index 27b1ddea8..b0f8ef02d 100755 --- a/src/Tizen.NUI/src/internal/CustomActor.cs +++ b/src/Tizen.NUI/src/internal/CustomActor.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class CustomActor : Animatable + internal class CustomActor : Animatable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/CustomActorImpl.cs b/src/Tizen.NUI/src/internal/CustomActorImpl.cs index 4bdf93e70..acdf68e04 100755 --- a/src/Tizen.NUI/src/internal/CustomActorImpl.cs +++ b/src/Tizen.NUI/src/internal/CustomActorImpl.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { using Tizen.NUI.BaseComponents; - public class CustomActorImpl : RefObject + internal class CustomActorImpl : RefObject { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/DefaultItemLayoutProperty.cs b/src/Tizen.NUI/src/internal/DefaultItemLayoutProperty.cs index 1ab2697a4..9aaa72580 100755 --- a/src/Tizen.NUI/src/internal/DefaultItemLayoutProperty.cs +++ b/src/Tizen.NUI/src/internal/DefaultItemLayoutProperty.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public enum DefaultItemLayoutProperty + internal enum DefaultItemLayoutProperty { TYPE = 0, ITEM_SIZE, diff --git a/src/Tizen.NUI/src/internal/DefaultItemLayoutType.cs b/src/Tizen.NUI/src/internal/DefaultItemLayoutType.cs index 18f06dcd3..216b5b671 100755 --- a/src/Tizen.NUI/src/internal/DefaultItemLayoutType.cs +++ b/src/Tizen.NUI/src/internal/DefaultItemLayoutType.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public enum DefaultItemLayoutType + internal enum DefaultItemLayoutType { DEPTH, GRID, diff --git a/src/Tizen.NUI/src/internal/DefaultRuler.cs b/src/Tizen.NUI/src/internal/DefaultRuler.cs index dfb516349..b66e54ea6 100755 --- a/src/Tizen.NUI/src/internal/DefaultRuler.cs +++ b/src/Tizen.NUI/src/internal/DefaultRuler.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class DefaultRuler : Ruler + internal class DefaultRuler : Ruler { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/DirectionBias.cs b/src/Tizen.NUI/src/internal/DirectionBias.cs deleted file mode 100755 index da74cb219..000000000 --- a/src/Tizen.NUI/src/internal/DirectionBias.cs +++ /dev/null @@ -1,21 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// 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. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI -{ - - public enum DirectionBias - { - DirectionBiasLeft = -1, - DirectionBiasNone = 0, - DirectionBiasRight = 1 - } - -} diff --git a/src/Tizen.NUI/src/internal/EventThreadCallback.cs b/src/Tizen.NUI/src/internal/EventThreadCallback.cs index c234de896..d8c5b1a0e 100755 --- a/src/Tizen.NUI/src/internal/EventThreadCallback.cs +++ b/src/Tizen.NUI/src/internal/EventThreadCallback.cs @@ -18,7 +18,7 @@ namespace Tizen.NUI { - public class EventThreadCallback : global::System.IDisposable + internal class EventThreadCallback : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/internal/FixedRuler.cs b/src/Tizen.NUI/src/internal/FixedRuler.cs index eddb0d5aa..56f9b8dac 100755 --- a/src/Tizen.NUI/src/internal/FixedRuler.cs +++ b/src/Tizen.NUI/src/internal/FixedRuler.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class FixedRuler : Ruler + internal class FixedRuler : Ruler { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/GestureDetector.cs b/src/Tizen.NUI/src/internal/GestureDetector.cs index 28f84bf97..16e1c6f17 100755 --- a/src/Tizen.NUI/src/internal/GestureDetector.cs +++ b/src/Tizen.NUI/src/internal/GestureDetector.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { using Tizen.NUI.BaseComponents; - public class GestureDetector : BaseHandle + internal class GestureDetector : BaseHandle { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/Item.cs b/src/Tizen.NUI/src/internal/Item.cs index 32022eafb..f19261d6a 100755 --- a/src/Tizen.NUI/src/internal/Item.cs +++ b/src/Tizen.NUI/src/internal/Item.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { using Tizen.NUI.BaseComponents; - public class Item : global::System.IDisposable + internal class Item : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/internal/ItemContainer.cs b/src/Tizen.NUI/src/internal/ItemContainer.cs index e6d59f50e..b8ce824e7 100755 --- a/src/Tizen.NUI/src/internal/ItemContainer.cs +++ b/src/Tizen.NUI/src/internal/ItemContainer.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class ItemContainer : global::System.IDisposable, global::System.Collections.IEnumerable + internal class ItemContainer : global::System.IDisposable, global::System.Collections.IEnumerable , global::System.Collections.Generic.IEnumerable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/ItemFactory.cs b/src/Tizen.NUI/src/internal/ItemFactory.cs index c319f7f52..dc841dbfd 100755 --- a/src/Tizen.NUI/src/internal/ItemFactory.cs +++ b/src/Tizen.NUI/src/internal/ItemFactory.cs @@ -16,7 +16,7 @@ using System.Reflection; namespace Tizen.NUI { using Tizen.NUI.BaseComponents; - public class ItemFactory : global::System.IDisposable + internal class ItemFactory : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/internal/ItemIdContainer.cs b/src/Tizen.NUI/src/internal/ItemIdContainer.cs index d21e7128b..5e6fc7637 100755 --- a/src/Tizen.NUI/src/internal/ItemIdContainer.cs +++ b/src/Tizen.NUI/src/internal/ItemIdContainer.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class ItemIdContainer : global::System.IDisposable, global::System.Collections.IEnumerable + internal class ItemIdContainer : global::System.IDisposable, global::System.Collections.IEnumerable , global::System.Collections.Generic.IList { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/ItemLayout.cs b/src/Tizen.NUI/src/internal/ItemLayout.cs index 2bd2374f6..53af6407d 100755 --- a/src/Tizen.NUI/src/internal/ItemLayout.cs +++ b/src/Tizen.NUI/src/internal/ItemLayout.cs @@ -13,7 +13,7 @@ using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - public class ItemLayout : RefObject + internal class ItemLayout : RefObject { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -59,18 +59,6 @@ namespace Tizen.NUI base.Dispose(type); } - public void SetOrientation(ControlOrientationType orientation) - { - NDalicPINVOKE.ItemLayout_SetOrientation(swigCPtr, (int)orientation); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ControlOrientationType GetOrientation() - { - ControlOrientationType ret = (ControlOrientationType)NDalicPINVOKE.ItemLayout_GetOrientation(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } public void SetLayoutProperties(PropertyMap properties) { diff --git a/src/Tizen.NUI/src/internal/ItemRange.cs b/src/Tizen.NUI/src/internal/ItemRange.cs index 9fe58c4ac..0ccd36d3b 100755 --- a/src/Tizen.NUI/src/internal/ItemRange.cs +++ b/src/Tizen.NUI/src/internal/ItemRange.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class ItemRange : global::System.IDisposable + internal class ItemRange : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/internal/ItemView.cs b/src/Tizen.NUI/src/internal/ItemView.cs index b29dd558d..85728d1aa 100755 --- a/src/Tizen.NUI/src/internal/ItemView.cs +++ b/src/Tizen.NUI/src/internal/ItemView.cs @@ -33,7 +33,7 @@ namespace Tizen.NUI using System.Runtime.InteropServices; - public class ItemView : Scrollable + internal class ItemView : Scrollable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/KeyInputFocusManager.cs b/src/Tizen.NUI/src/internal/KeyInputFocusManager.cs deleted file mode 100755 index 03ee6cc8b..000000000 --- a/src/Tizen.NUI/src/internal/KeyInputFocusManager.cs +++ /dev/null @@ -1,102 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// 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. -//------------------------------------------------------------------------------ - -using Tizen.NUI.BaseComponents; - -namespace Tizen.NUI -{ - - public class KeyInputFocusManager : BaseHandle - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal KeyInputFocusManager(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.KeyInputFocusManager_SWIGUpcast(cPtr), cMemoryOwn) - { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyInputFocusManager obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - 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_KeyInputFocusManager(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - base.Dispose(type); - } - - public KeyInputFocusManager() : this(NDalicPINVOKE.new_KeyInputFocusManager(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static KeyInputFocusManager Get() - { - KeyInputFocusManager ret = new KeyInputFocusManager(NDalicPINVOKE.KeyInputFocusManager_Get(), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetFocus(View control) - { - NDalicPINVOKE.KeyInputFocusManager_SetFocus(swigCPtr, View.getCPtr(control)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public View GetCurrentFocusControl() - { - View ret = new View(NDalicPINVOKE.KeyInputFocusManager_GetCurrentFocusControl(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void RemoveFocus(View control) - { - NDalicPINVOKE.KeyInputFocusManager_RemoveFocus(swigCPtr, View.getCPtr(control)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t KeyInputFocusChangedSignal() - { - SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t(NDalicPINVOKE.KeyInputFocusManager_KeyInputFocusChangedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - -} diff --git a/src/Tizen.NUI/src/internal/KeyboardPreFocusChangeSignal.cs b/src/Tizen.NUI/src/internal/KeyboardPreFocusChangeSignal.cs deleted file mode 100755 index bef6ed191..000000000 --- a/src/Tizen.NUI/src/internal/KeyboardPreFocusChangeSignal.cs +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (c) 2016 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; - -using System; - -namespace Tizen.NUI -{ - - internal delegate IntPtr SwigDelegatePreFocusChangeSignal(IntPtr current, IntPtr proposed, View.FocusDirection direction); - - internal class PreFocusChangeSignal : global::System.IDisposable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal PreFocusChangeSignal(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(PreFocusChangeSignal 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; - - - ~PreFocusChangeSignal() - { - 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; - NDalicManualPINVOKE.delete_PreFocusChangeSignal(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - public bool Empty() - { - bool ret = NDalicManualPINVOKE.PreFocusChangeSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetConnectionCount() - { - uint ret = NDalicManualPINVOKE.PreFocusChangeSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Connect(FocusManager.PreFocusChangeEventCallback func) - { - NDalicManualPINVOKE.PreFocusChangeSignal_Connect(swigCPtr, func); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Disconnect(System.Delegate func) - { - System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicManualPINVOKE.PreFocusChangeSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } - - public View Emit(View arg1, View arg2, View.FocusDirection arg3) - { - View ret = new View(NDalicManualPINVOKE.PreFocusChangeSignal_Emit(swigCPtr, View.getCPtr(arg1), View.getCPtr(arg2), (int)arg3), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public PreFocusChangeSignal() : this(NDalicManualPINVOKE.new_PreFocusChangeSignal(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - } - -} diff --git a/src/Tizen.NUI/src/internal/LongPressGestureDetector.cs b/src/Tizen.NUI/src/internal/LongPressGestureDetector.cs index 1a31ed33e..4977c0362 100755 --- a/src/Tizen.NUI/src/internal/LongPressGestureDetector.cs +++ b/src/Tizen.NUI/src/internal/LongPressGestureDetector.cs @@ -31,7 +31,7 @@ namespace Tizen.NUI using System.Runtime.InteropServices; using Tizen.NUI.BaseComponents; - public class LongPressGestureDetector : GestureDetector + internal class LongPressGestureDetector : GestureDetector { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/Meta.cs b/src/Tizen.NUI/src/internal/Meta.cs deleted file mode 100755 index 6fb90b34c..000000000 --- a/src/Tizen.NUI/src/internal/Meta.cs +++ /dev/null @@ -1,19 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// 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. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI -{ - - internal enum Meta - { - DIMENSION_COUNT = 2 - } - -} diff --git a/src/Tizen.NUI/src/internal/NDalic.cs b/src/Tizen.NUI/src/internal/NDalic.cs index 132fb2d03..cb47707d8 100755 --- a/src/Tizen.NUI/src/internal/NDalic.cs +++ b/src/Tizen.NUI/src/internal/NDalic.cs @@ -502,13 +502,6 @@ namespace Tizen.NUI return ret; } - public static PropertyCondition VariableStepCondition(VectorFloat steps) - { - PropertyCondition ret = new PropertyCondition(NDalicPINVOKE.VariableStepCondition(VectorFloat.getCPtr(steps)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public static int WEIGHT { get @@ -1300,19 +1293,6 @@ namespace Tizen.NUI return ret; } - public static bool IsVertical(ControlOrientationType orientation) - { - bool ret = NDalicPINVOKE.IsVertical((int)orientation); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool IsHorizontal(ControlOrientationType orientation) - { - bool ret = NDalicPINVOKE.IsHorizontal((int)orientation); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } public static SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t NewItemLayout(DefaultItemLayoutType type) { diff --git a/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs b/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs index 626880355..46c5a6ac6 100755 --- a/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs +++ b/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs @@ -8418,6 +8418,9 @@ class NDalicPINVOKE { [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_ScrollView_Property_WHEEL_SCROLL_DISTANCE_STEP_get")] public static extern int ScrollView_Property_WHEEL_SCROLL_DISTANCE_STEP_get(); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_ScrollView_Property_SCROLL_MODE_get")] + public static extern int ScrollView_Property_SCROLL_MODE_get(); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_ScrollView_Property_SCROLL_POSITION_get")] public static extern int ScrollView_Property_SCROLL_POSITION_get(); diff --git a/src/Tizen.NUI/src/internal/Object.cs b/src/Tizen.NUI/src/internal/Object.cs index 37f15ece8..b59f3c24c 100755 --- a/src/Tizen.NUI/src/internal/Object.cs +++ b/src/Tizen.NUI/src/internal/Object.cs @@ -22,7 +22,7 @@ namespace Tizen.NUI { - public static class Object + internal static class Object { public static PropertyValue GetProperty(global::System.Runtime.InteropServices.HandleRef handle, int index) { diff --git a/src/Tizen.NUI/src/internal/PaddingType.cs b/src/Tizen.NUI/src/internal/PaddingType.cs deleted file mode 100755 index 86691f5b8..000000000 --- a/src/Tizen.NUI/src/internal/PaddingType.cs +++ /dev/null @@ -1,325 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// 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. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI -{ - - public class PaddingType : global::System.IDisposable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal PaddingType(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(PaddingType 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; - - - ~PaddingType() - { - 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_PaddingType(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - public static bool operator ==(PaddingType a, PaddingType 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 (System.Math.Abs(a.Left - b.Left) < NDalic.GetRangedEpsilon(a.Left, b.Left)) && - (System.Math.Abs(a.Right - b.Right) < NDalic.GetRangedEpsilon(a.Right, b.Right)) && - (System.Math.Abs(a.Bottom - b.Bottom) < NDalic.GetRangedEpsilon(a.Bottom, b.Bottom)) && - (System.Math.Abs(a.Top - b.Top) < NDalic.GetRangedEpsilon(a.Top, b.Top)); - } - - public static bool operator !=(PaddingType a, PaddingType b) - { - return !(a == b); - } - - ///< The Left value - public float Left - { - set - { - left = value; - } - get - { - return left; - } - } - - ///< The Right value - public float Right - { - set - { - right = value; - } - get - { - return right; - } - } - - ///< The Bottom value - public float Bottom - { - set - { - bottom = value; - } - get - { - return bottom; - } - } - - ///< The Top value - public float Top - { - set - { - top = value; - } - get - { - return top; - } - } - - - public PaddingType() : this(NDalicPINVOKE.new_PaddingType__SWIG_0(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public PaddingType(float x, float y, float width, float height) : this(NDalicPINVOKE.new_PaddingType__SWIG_1(x, y, width, height), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public PaddingType(PaddingType rhs) : this(NDalicPINVOKE.new_PaddingType__SWIG_2(PaddingType.getCPtr(rhs)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public PaddingType Assign(PaddingType rhs) - { - PaddingType ret = new PaddingType(NDalicPINVOKE.PaddingType_Assign(swigCPtr, PaddingType.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Set(float newX, float newY, float newWidth, float newHeight) - { - NDalicPINVOKE.PaddingType_Set(swigCPtr, newX, newY, newWidth, newHeight); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - private float x - { - 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; - } - } - - private float left - { - set - { - NDalicPINVOKE.PaddingType_left_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - float ret = NDalicPINVOKE.PaddingType_left_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - private float y - { - set - { - NDalicPINVOKE.PaddingType_y_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - float ret = NDalicPINVOKE.PaddingType_y_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - private float right - { - set - { - NDalicPINVOKE.PaddingType_right_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - float ret = NDalicPINVOKE.PaddingType_right_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - private float width - { - set - { - NDalicPINVOKE.PaddingType_width_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - float ret = NDalicPINVOKE.PaddingType_width_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 - { - set - { - NDalicPINVOKE.PaddingType_height_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - float ret = NDalicPINVOKE.PaddingType_height_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - private float top - { - set - { - NDalicPINVOKE.PaddingType_top_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - float ret = NDalicPINVOKE.PaddingType_top_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - } - -} diff --git a/src/Tizen.NUI/src/internal/PanGestureDetector.cs b/src/Tizen.NUI/src/internal/PanGestureDetector.cs index 7217c1709..aa8d049ba 100755 --- a/src/Tizen.NUI/src/internal/PanGestureDetector.cs +++ b/src/Tizen.NUI/src/internal/PanGestureDetector.cs @@ -32,7 +32,7 @@ namespace Tizen.NUI using Tizen.NUI.BaseComponents; - public class PanGestureDetector : GestureDetector + internal class PanGestureDetector : GestureDetector { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/PinchGestureDetector.cs b/src/Tizen.NUI/src/internal/PinchGestureDetector.cs index 566e0f9bc..fc81c725a 100755 --- a/src/Tizen.NUI/src/internal/PinchGestureDetector.cs +++ b/src/Tizen.NUI/src/internal/PinchGestureDetector.cs @@ -32,7 +32,7 @@ namespace Tizen.NUI using Tizen.NUI.BaseComponents; - public class PinchGestureDetector : GestureDetector + internal class PinchGestureDetector : GestureDetector { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/Popup.cs b/src/Tizen.NUI/src/internal/Popup.cs deleted file mode 100755 index d451c38be..000000000 --- a/src/Tizen.NUI/src/internal/Popup.cs +++ /dev/null @@ -1,1121 +0,0 @@ -/** 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. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI.UIComponents -{ - - using System; - using System.Runtime.InteropServices; - using Tizen.NUI.BaseComponents; - - /// - /// The Popup widget provides a configurable pop-up dialog with built-in layout of three main fields. - /// - public class Popup : View - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal Popup(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Popup_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(Popup obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - - 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. - - //Unreference this from if a static instance refer to this. - ViewRegistry.UnregisterView(this); - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Popup(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - base.Dispose(type); - } - - - - - /// - /// Event arguments that passed via OutsideTouchedEvent - /// - public class OutsideTouchedEventArgs : EventArgs - { - } - - /// - /// Event arguments that passed via ShowingEventArgs - /// - public class ShowingEventArgs : EventArgs - { - } - - /// - /// Event arguments that passed via ShownEventArgs - /// - public class ShownEventArgs : EventArgs - { - } - - /// - /// Event arguments that passed via HidingEventArgs - /// - public class HidingEventArgs : EventArgs - { - } - - /// - /// Event arguments that passed via HiddenEventArgs - /// - public class HiddenEventArgs : EventArgs - { - } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void OutsideTouchedEventCallbackDelegate(); - private EventHandler _popUpOutsideTouchedEventHandler; - private OutsideTouchedEventCallbackDelegate _popUpOutsideTouchedEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void ShowingEventCallbackDelegate(); - private EventHandler _popUpShowingEventHandler; - private ShowingEventCallbackDelegate _popUpShowingEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void ShownEventCallbackDelegate(); - private EventHandler _popUpShownEventHandler; - private ShownEventCallbackDelegate _popUpShownEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void HidingEventCallbackDelegate(); - private EventHandler _popUpHidingEventHandler; - private HidingEventCallbackDelegate _popUpHidingEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void HiddenEventCallbackDelegate(); - private EventHandler _popUpHiddenEventHandler; - private HiddenEventCallbackDelegate _popUpHiddenEventCallbackDelegate; - - /// - /// Event is sent when user has touched outside of the Dialog. - /// - public event EventHandler OutsideTouched - { - add - { - if (_popUpOutsideTouchedEventHandler == null) - { - _popUpOutsideTouchedEventCallbackDelegate = (OnOutsideTouched); - OutsideTouchedSignal().Connect(_popUpOutsideTouchedEventCallbackDelegate); - } - _popUpOutsideTouchedEventHandler += value; - } - remove - { - _popUpOutsideTouchedEventHandler -= value; - if (_popUpOutsideTouchedEventHandler == null && OutsideTouchedSignal().Empty() == false) - { - this.OutsideTouchedSignal().Disconnect(_popUpOutsideTouchedEventCallbackDelegate); - } - } - } - - // Callback for Popup OutsideTouchedSignal - private void OnOutsideTouched() - { - OutsideTouchedEventArgs e = new OutsideTouchedEventArgs(); - - if (_popUpOutsideTouchedEventHandler != null) - { - //here we send all data to user event handlers - _popUpOutsideTouchedEventHandler(this, e); - } - } - - /// - /// Event is sent when the Popup is starting to be shown. - /// - public event EventHandler Showing - { - add - { - if (_popUpShowingEventHandler == null) - { - _popUpShowingEventCallbackDelegate = (OnShowing); - ShowingSignal().Connect(_popUpShowingEventCallbackDelegate); - } - _popUpShowingEventHandler += value; - } - remove - { - _popUpShowingEventHandler -= value; - if (_popUpShowingEventHandler == null && ShowingSignal().Empty() == false) - { - ShowingSignal().Disconnect(_popUpShowingEventCallbackDelegate); - } - } - } - - // Callback for ShowingSignal - private void OnShowing() - { - ShowingEventArgs e = new ShowingEventArgs(); - - if (_popUpShowingEventHandler != null) - { - //here we send all data to user event handlers - _popUpShowingEventHandler(this, e); - } - } - - - /// - /// Event is sent when the Popup has been fully displayed. - /// - public event EventHandler Shown - { - add - { - if (_popUpShownEventHandler == null) - { - _popUpShownEventCallbackDelegate = (OnShown); - ShownSignal().Connect(_popUpShownEventCallbackDelegate); - } - _popUpShownEventHandler += value; - } - remove - { - _popUpShownEventHandler -= value; - if (_popUpShownEventHandler == null && ShownSignal().Empty() == false) - { - ShownSignal().Disconnect(_popUpShownEventCallbackDelegate); - } - } - } - - // Callback for ShownSignal - private void OnShown() - { - ShownEventArgs e = new ShownEventArgs(); - - if (_popUpShownEventHandler != null) - { - //here we send all data to user event handlers - _popUpShownEventHandler(this, e); - } - } - - /// - /// Event is sent when the Popup is starting to be hidden. - /// - public event EventHandler Hiding - { - add - { - if (_popUpHidingEventHandler == null) - { - _popUpHidingEventCallbackDelegate = (OnHiding); - HidingSignal().Connect(_popUpHidingEventCallbackDelegate); - } - _popUpHidingEventHandler += value; - } - remove - { - _popUpHidingEventHandler -= value; - if (_popUpHidingEventHandler == null && HidingSignal().Empty() == false) - { - HidingSignal().Disconnect(_popUpHidingEventCallbackDelegate); - } - } - } - - // Callback for HidingSignal - private void OnHiding() - { - HidingEventArgs e = new HidingEventArgs(); - - if (_popUpHidingEventHandler != null) - { - //here we send all data to user event handlers - _popUpHidingEventHandler(this, e); - } - } - - /// - /// Event is sent when the Popup has been completely hidden. - /// - public event EventHandler Hidden - { - add - { - if (_popUpHiddenEventHandler == null) - { - _popUpHiddenEventCallbackDelegate = (OnHidden); - HiddenSignal().Connect(_popUpHiddenEventCallbackDelegate); - } - _popUpHiddenEventHandler += value; - } - remove - { - _popUpHiddenEventHandler -= value; - if (_popUpHiddenEventHandler == null && HiddenSignal().Empty() == false) - { - HiddenSignal().Disconnect(_popUpHiddenEventCallbackDelegate); - } - } - } - - // Callback for HiddenSignal - private void OnHidden() - { - HiddenEventArgs e = new HiddenEventArgs(); - - if (_popUpHiddenEventHandler != null) - { - //here we send all data to user event handlers - _popUpHiddenEventHandler(this, e); - } - } - - internal class Property : global::System.IDisposable - { - 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_Popup_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - internal Property() : this(NDalicPINVOKE.new_Popup_Property(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal static readonly int TITLE = NDalicPINVOKE.Popup_Property_TITLE_get(); - internal static readonly int CONTENT = NDalicPINVOKE.Popup_Property_CONTENT_get(); - internal static readonly int FOOTER = NDalicPINVOKE.Popup_Property_FOOTER_get(); - internal static readonly int DISPLAY_STATE = NDalicPINVOKE.Popup_Property_DISPLAY_STATE_get(); - internal static readonly int TOUCH_TRANSPARENT = NDalicPINVOKE.Popup_Property_TOUCH_TRANSPARENT_get(); - internal static readonly int TAIL_VISIBILITY = NDalicPINVOKE.Popup_Property_TAIL_VISIBILITY_get(); - internal static readonly int TAIL_POSITION = NDalicPINVOKE.Popup_Property_TAIL_POSITION_get(); - internal static readonly int CONTEXTUAL_MODE = NDalicPINVOKE.Popup_Property_CONTEXTUAL_MODE_get(); - internal static readonly int ANIMATION_DURATION = NDalicPINVOKE.Popup_Property_ANIMATION_DURATION_get(); - internal static readonly int ANIMATION_MODE = NDalicPINVOKE.Popup_Property_ANIMATION_MODE_get(); - internal static readonly int ENTRY_ANIMATION = NDalicPINVOKE.Popup_Property_ENTRY_ANIMATION_get(); - internal static readonly int EXIT_ANIMATION = NDalicPINVOKE.Popup_Property_EXIT_ANIMATION_get(); - internal static readonly int AUTO_HIDE_DELAY = NDalicPINVOKE.Popup_Property_AUTO_HIDE_DELAY_get(); - internal static readonly int BACKING_ENABLED = NDalicPINVOKE.Popup_Property_BACKING_ENABLED_get(); - internal static readonly int BACKING_COLOR = NDalicPINVOKE.Popup_Property_BACKING_COLOR_get(); - internal static readonly int POPUP_BACKGROUND_IMAGE = NDalicPINVOKE.Popup_Property_POPUP_BACKGROUND_IMAGE_get(); - internal static readonly int POPUP_BACKGROUND_BORDER = NDalicPINVOKE.Popup_Property_POPUP_BACKGROUND_BORDER_get(); - internal static readonly int TAIL_UP_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_UP_IMAGE_get(); - internal static readonly int TAIL_DOWN_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_DOWN_IMAGE_get(); - internal static readonly int TAIL_LEFT_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_LEFT_IMAGE_get(); - internal static readonly int TAIL_RIGHT_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_RIGHT_IMAGE_get(); - - } - - /// - /// Create the Popup. - /// - public Popup() : this(NDalicPINVOKE.Popup_New(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - internal Popup(Popup handle) : this(NDalicPINVOKE.new_Popup__SWIG_1(Popup.getCPtr(handle)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal Popup Assign(Popup handle) - { - Popup ret = new Popup(NDalicPINVOKE.Popup_Assign(swigCPtr, Popup.getCPtr(handle)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Downcasts a handle to Popup handle.
- /// If handle points to a Popup, the downcast produces valid handle.
- /// If not the returned handle is left uninitialized.
- ///
- /// Handle to an object - /// handle to a Popup or an uninitialized handle - public new static Popup DownCast(BaseHandle handle) - { - Popup ret = new Popup(NDalicPINVOKE.Popup_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Sets a title for this Popup. - /// - /// The actor to set a title - public void SetTitle(View titleView) - { - NDalicPINVOKE.Popup_SetTitle(swigCPtr, View.getCPtr(titleView)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal View GetTitle() - { - View ret = new View(NDalicPINVOKE.Popup_GetTitle(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Sets the content actor. - /// - /// The actor to use - public void SetContent(View content) - { - NDalicPINVOKE.Popup_SetContent(swigCPtr, View.getCPtr(content)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal View GetContent() - { - View ret = new View(NDalicPINVOKE.Popup_GetContent(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Sets the actor to use for a footer in this Popup. - /// - /// The footer actor to be added to this Popup - public void SetFooter(View footer) - { - NDalicPINVOKE.Popup_SetFooter(swigCPtr, View.getCPtr(footer)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal View GetFooter() - { - View ret = new View(NDalicPINVOKE.Popup_GetFooter(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Sets the display state of Popup.
- /// There are 4 total display states.
- /// Only 2 can be set, but all four can be read for better inspection of the current popup state.
- ///
- /// The other two states are getable, but not setable and are there for consistency.
- ///
- /// | Value | Setting the state | Getting the state |
- /// |----------|--------------------------------|--------------------------------|
- /// | SHOWN | Show the popup | The popup is fully shown |
- /// | HIDDEN | Hide the popup | The popup is fully hidden |
- /// | SHOWING | | The popup is transitioning in |
- /// | HIDING | | The popup is transitioning out |
- ///
- /// All 4 state changes cause notifications via 4 respective signals that can be connected to.
- ///
- /// The desired display state to change to - public void SetDisplayState(Popup.DisplayStateType displayState) - { - NDalicPINVOKE.Popup_SetDisplayState(swigCPtr, (int)displayState); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal Popup.DisplayStateType GetDisplayState() - { - Popup.DisplayStateType ret = (Popup.DisplayStateType)NDalicPINVOKE.Popup_GetDisplayState(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal VoidSignal OutsideTouchedSignal() - { - VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_OutsideTouchedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal VoidSignal ShowingSignal() - { - VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_ShowingSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal VoidSignal ShownSignal() - { - VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_ShownSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal VoidSignal HidingSignal() - { - VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_HidingSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal VoidSignal HiddenSignal() - { - VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_HiddenSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal enum PropertyRange - { - PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, - PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000 - } - - /// - /// The display states of the Popup. - /// - public enum DisplayStateType - { - Showing, - Shown, - Hiding, - Hidden - } - - /// - /// The animation mode within popup.
- /// Choose from a predefined mode or "CUSTOM" to use the ANIMATION_IN and ANIMATION_OUT properties.
- ///
- public enum AnimationModeType - { - None, - Zoom, - Fade, - Custom - } - - /// - /// Types of contextual layout.
- /// The Popup is positioned adjacent to it's parent in the direction specified by this mode.
- /// NON_CONTEXTUAL disables any contextual positioning.
- ///
- public enum ContextualModeType - { - NonContextual, - Above, - Rright, - Below, - Left - } - - /// - /// Popup title. - /// - public PropertyMap Title - { - get - { - PropertyMap temp = new PropertyMap(); - GetProperty(Popup.Property.TITLE).Get(temp); - return temp; - } - set - { - SetProperty(Popup.Property.TITLE, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// Popup content. - /// - public PropertyMap Content - { - get - { - PropertyMap temp = new PropertyMap(); - GetProperty(Popup.Property.CONTENT).Get(temp); - return temp; - } - set - { - SetProperty(Popup.Property.CONTENT, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// Popup footer. - /// - public PropertyMap Footer - { - get - { - PropertyMap temp = new PropertyMap(); - GetProperty(Popup.Property.FOOTER).Get(temp); - return temp; - } - set - { - SetProperty(Popup.Property.FOOTER, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// Popup display state. - /// - public DisplayStateType DisplayState - { - get - { - string temp; - if (GetProperty(Popup.Property.DISPLAY_STATE).Get(out temp) == false) - { -#if DEBUG_ON - Tizen.Log.Error("NUI", "DisplayState get error!"); -#endif - } - switch (temp) - { - case "SHOWING": - return DisplayStateType.Showing; - case "SHOWN": - return DisplayStateType.Shown; - case "HIDING": - return DisplayStateType.Hiding; - case "HIDDEN": - return DisplayStateType.Hidden; - default: - return DisplayStateType.Hidden; - } - } - set - { - string valueToString = ""; - switch (value) - { - case DisplayStateType.Showing: - { - valueToString = "SHOWING"; - break; - } - case DisplayStateType.Shown: - { - valueToString = "SHOWN"; - break; - } - case DisplayStateType.Hiding: - { - valueToString = "HIDING"; - break; - } - case DisplayStateType.Hidden: - { - valueToString = "HIDDEN"; - break; - } - default: - { - valueToString = "HIDDEN"; - break; - } - } - SetProperty(Popup.Property.DISPLAY_STATE, new Tizen.NUI.PropertyValue(valueToString)); - } - } - /// - /// Touch transparent. - /// - public bool TouchTransparent - { - get - { - bool temp = false; - GetProperty(Popup.Property.TOUCH_TRANSPARENT).Get(ref temp); - return temp; - } - set - { - SetProperty(Popup.Property.TOUCH_TRANSPARENT, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// Popup tail visibility. - /// - public bool TailVisibility - { - get - { - bool temp = false; - GetProperty(Popup.Property.TAIL_VISIBILITY).Get(ref temp); - return temp; - } - set - { - SetProperty(Popup.Property.TAIL_VISIBILITY, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// Popup tail position. - /// - public Vector3 TailPosition - { - get - { - Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f); - GetProperty(Popup.Property.TAIL_POSITION).Get(temp); - return temp; - } - set - { - SetProperty(Popup.Property.TAIL_POSITION, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// Contextual mode. - /// - public ContextualModeType ContextualMode - { - get - { - string temp; - if (GetProperty(Popup.Property.CONTEXTUAL_MODE).Get(out temp) == false) - { -#if DEBUG_ON - Tizen.Log.Error("NUI", "ContextualMode get error!"); -#endif - } - switch (temp) - { - case "NON_CONTEXTUAL": - return ContextualModeType.NonContextual; - case "ABOVE": - return ContextualModeType.Above; - case "RIGHT": - return ContextualModeType.Rright; - case "BELOW": - return ContextualModeType.Below; - case "LEFT": - return ContextualModeType.Left; - default: - return ContextualModeType.Below; - } - } - set - { - string valueToString = ""; - switch (value) - { - case ContextualModeType.NonContextual: - { - valueToString = "NON_CONTEXTUAL"; - break; - } - case ContextualModeType.Above: - { - valueToString = "ABOVE"; - break; - } - case ContextualModeType.Rright: - { - valueToString = "RIGHT"; - break; - } - case ContextualModeType.Below: - { - valueToString = "BELOW"; - break; - } - case ContextualModeType.Left: - { - valueToString = "LEFT"; - break; - } - default: - { - valueToString = "BELOW"; - break; - } - } - SetProperty(Popup.Property.CONTEXTUAL_MODE, new Tizen.NUI.PropertyValue(valueToString)); - } - } - /// - /// Animation duration. - /// - public float AnimationDuration - { - get - { - float temp = 0.0f; - GetProperty(Popup.Property.ANIMATION_DURATION).Get(ref temp); - return temp; - } - set - { - SetProperty(Popup.Property.ANIMATION_DURATION, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// Animation mode. - /// - public AnimationModeType AnimationMode - { - get - { - string temp; - if (GetProperty(Popup.Property.ANIMATION_MODE).Get(out temp) == false) - { -#if DEBUG_ON - Tizen.Log.Error("NUI", "AnimationMode get error!"); -#endif - } - switch (temp) - { - case "NONE": - return AnimationModeType.None; - case "ZOOM": - return AnimationModeType.Zoom; - case "FADE": - return AnimationModeType.Fade; - case "CUSTOM": - return AnimationModeType.Custom; - default: - return AnimationModeType.Fade; - } - } - set - { - string valueToString = ""; - switch (value) - { - case AnimationModeType.None: - { - valueToString = "NONE"; - break; - } - case AnimationModeType.Zoom: - { - valueToString = "ZOOM"; - break; - } - case AnimationModeType.Fade: - { - valueToString = "FADE"; - break; - } - case AnimationModeType.Custom: - { - valueToString = "CUSTOM"; - break; - } - default: - { - valueToString = "FADE"; - break; - } - } - SetProperty(Popup.Property.ANIMATION_MODE, new Tizen.NUI.PropertyValue(valueToString)); - } - } - /// - /// Entry animation. - /// - public PropertyMap EntryAnimation - { - get - { - PropertyMap temp = new PropertyMap(); - GetProperty(Popup.Property.ENTRY_ANIMATION).Get(temp); - return temp; - } - set - { - SetProperty(Popup.Property.ENTRY_ANIMATION, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// Exit animation. - /// - public PropertyMap ExitAnimation - { - get - { - PropertyMap temp = new PropertyMap(); - GetProperty(Popup.Property.EXIT_ANIMATION).Get(temp); - return temp; - } - set - { - SetProperty(Popup.Property.EXIT_ANIMATION, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// Auto hide delay. - /// - public int AutoHideDelay - { - get - { - int temp = 0; - GetProperty(Popup.Property.AUTO_HIDE_DELAY).Get(ref temp); - return temp; - } - set - { - SetProperty(Popup.Property.AUTO_HIDE_DELAY, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// Backing enabled. - /// - public bool BackingEnabled - { - get - { - bool temp = false; - GetProperty(Popup.Property.BACKING_ENABLED).Get(ref temp); - return temp; - } - set - { - SetProperty(Popup.Property.BACKING_ENABLED, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// Backing color. - /// - public Vector4 BackingColor - { - get - { - Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); - GetProperty(Popup.Property.BACKING_COLOR).Get(temp); - return temp; - } - set - { - SetProperty(Popup.Property.BACKING_COLOR, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// Background image. - /// - public string PopupBackgroundImage - { - get - { - string temp; - GetProperty(Popup.Property.POPUP_BACKGROUND_IMAGE).Get(out temp); - return temp; - } - set - { - SetProperty(Popup.Property.POPUP_BACKGROUND_IMAGE, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// Background border. - /// - public Rectangle PopupBackgroundBorder - { - get - { - Rectangle temp = new Rectangle(0, 0, 0, 0); - GetProperty(Popup.Property.POPUP_BACKGROUND_BORDER).Get(temp); - return temp; - } - set - { - SetProperty(Popup.Property.POPUP_BACKGROUND_BORDER, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// Tail up image. - /// - public string TailUpImage - { - get - { - string temp; - GetProperty(Popup.Property.TAIL_UP_IMAGE).Get(out temp); - return temp; - } - set - { - SetProperty(Popup.Property.TAIL_UP_IMAGE, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// Tail down image. - /// - public string TailDownImage - { - get - { - string temp; - GetProperty(Popup.Property.TAIL_DOWN_IMAGE).Get(out temp); - return temp; - } - set - { - SetProperty(Popup.Property.TAIL_DOWN_IMAGE, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// Tail left image. - /// - public string TailLeftImage - { - get - { - string temp; - GetProperty(Popup.Property.TAIL_LEFT_IMAGE).Get(out temp); - return temp; - } - set - { - SetProperty(Popup.Property.TAIL_LEFT_IMAGE, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// Tail right image. - /// - public string TailRightImage - { - get - { - string temp; - GetProperty(Popup.Property.TAIL_RIGHT_IMAGE).Get(out temp); - return temp; - } - set - { - SetProperty(Popup.Property.TAIL_RIGHT_IMAGE, new Tizen.NUI.PropertyValue(value)); - } - } - - } - -} diff --git a/src/Tizen.NUI/src/internal/PositionInheritanceMode.cs b/src/Tizen.NUI/src/internal/PositionInheritanceMode.cs deleted file mode 100755 index a04a2e486..000000000 --- a/src/Tizen.NUI/src/internal/PositionInheritanceMode.cs +++ /dev/null @@ -1,22 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// 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. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI -{ - - internal enum PositionInheritanceMode - { - INHERIT_PARENT_POSITION, - USE_PARENT_POSITION, - USE_PARENT_POSITION_PLUS_LOCAL_POSITION, - DONT_INHERIT_POSITION - } - -} diff --git a/src/Tizen.NUI/src/internal/PreFocusChangeSignal.cs b/src/Tizen.NUI/src/internal/PreFocusChangeSignal.cs new file mode 100755 index 000000000..78799a731 --- /dev/null +++ b/src/Tizen.NUI/src/internal/PreFocusChangeSignal.cs @@ -0,0 +1,152 @@ +/* + * 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; + +using System; + +namespace Tizen.NUI +{ + + internal delegate IntPtr SwigDelegatePreFocusChangeSignal(IntPtr current, IntPtr proposed, View.FocusDirection direction); + + internal class PreFocusChangeSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal PreFocusChangeSignal(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(PreFocusChangeSignal 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; + + + ~PreFocusChangeSignal() + { + 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; + NDalicManualPINVOKE.delete_PreFocusChangeSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public bool Empty() + { + bool ret = NDalicManualPINVOKE.PreFocusChangeSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicManualPINVOKE.PreFocusChangeSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Connect(FocusManager.PreFocusChangeEventCallback func) + { + NDalicManualPINVOKE.PreFocusChangeSignal_Connect(swigCPtr, func); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicManualPINVOKE.PreFocusChangeSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public View Emit(View arg1, View arg2, View.FocusDirection arg3) + { + View ret = new View(NDalicManualPINVOKE.PreFocusChangeSignal_Emit(swigCPtr, View.getCPtr(arg1), View.getCPtr(arg2), (int)arg3), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public PreFocusChangeSignal() : this(NDalicManualPINVOKE.new_PreFocusChangeSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } + +} diff --git a/src/Tizen.NUI/src/internal/ProgressBar.cs b/src/Tizen.NUI/src/internal/ProgressBar.cs deleted file mode 100755 index e284c0422..000000000 --- a/src/Tizen.NUI/src/internal/ProgressBar.cs +++ /dev/null @@ -1,499 +0,0 @@ -/** 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. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI.UIComponents -{ - - using System; - using System.Runtime.InteropServices; - using Tizen.NUI.BaseComponents; - - /// - /// ProgressBar is a control to give the user an indication of the progress of an operation. - /// - public class ProgressBar : View - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal ProgressBar(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ProgressBar_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(ProgressBar obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - /// - /// To make ProgressBar instance be disposed. - /// - 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. - - //Unreference this from if a static instance refer to this. - ViewRegistry.UnregisterView(this); - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_ProgressBar(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - base.Dispose(type); - } - - - /// - /// Event arguments that passed via ValueChangedEventArgs - /// - public class ValueChangedEventArgs : EventArgs - { - private ProgressBar _progressBar; - private float _progressValue; - private float _secondaryProgressValue; - - public ProgressBar ProgressBar - { - get - { - return _progressBar; - } - set - { - _progressBar = value; - } - } - - public float ProgressValue - { - get - { - return _progressValue; - } - set - { - _progressValue = value; - } - } - - public float SecondaryProgressValue - { - get - { - return _secondaryProgressValue; - } - set - { - _secondaryProgressValue = value; - } - } - - } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void ValueChangedCallbackDelegate(IntPtr progressBar, float progressValue, float secondaryProgressValue); - private EventHandler _progressBarValueChangedEventHandler; - private ValueChangedCallbackDelegate _progressBarValueChangedCallbackDelegate; - - /// - /// Event is sent when the ProgressBar value changes. - /// - public event EventHandler ValueChanged - { - add - { - if (_progressBarValueChangedEventHandler == null) - { - _progressBarValueChangedCallbackDelegate = (OnValueChanged); - ValueChangedSignal().Connect(_progressBarValueChangedCallbackDelegate); - } - _progressBarValueChangedEventHandler += value; - } - remove - { - _progressBarValueChangedEventHandler -= value; - if (_progressBarValueChangedEventHandler == null && ValueChangedSignal().Empty() == false) - { - ValueChangedSignal().Disconnect(_progressBarValueChangedCallbackDelegate); - } - } - } - - // Callback for ProgressBar ValueChanged signal - private void OnValueChanged(IntPtr progressBar, float progressValue, float secondaryProgressValue) - { - ValueChangedEventArgs e = new ValueChangedEventArgs(); - - // Populate all members of "e" (ValueChangedEventArgs) with real page - e.ProgressBar = ProgressBar.GetProgressBarFromPtr(progressBar); - e.ProgressValue = progressValue; - e.SecondaryProgressValue = secondaryProgressValue; - - if (_progressBarValueChangedEventHandler != null) - { - _progressBarValueChangedEventHandler(this, e); - } - } - - /// - /// - internal static ProgressBar GetProgressBarFromPtr(global::System.IntPtr cPtr) - { - ProgressBar ret = new ProgressBar(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - - internal class Property : global::System.IDisposable - { - 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_ProgressBar_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - internal Property() : this(NDalicPINVOKE.new_ProgressBar_Property(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal static readonly int PROGRESS_VALUE = NDalicPINVOKE.ProgressBar_Property_PROGRESS_VALUE_get(); - internal static readonly int SECONDARY_PROGRESS_VALUE = NDalicPINVOKE.ProgressBar_Property_SECONDARY_PROGRESS_VALUE_get(); - internal static readonly int INDETERMINATE = NDalicPINVOKE.ProgressBar_Property_INDETERMINATE_get(); - internal static readonly int TRACK_VISUAL = NDalicPINVOKE.ProgressBar_Property_TRACK_VISUAL_get(); - internal static readonly int PROGRESS_VISUAL = NDalicPINVOKE.ProgressBar_Property_PROGRESS_VISUAL_get(); - internal static readonly int SECONDARY_PROGRESS_VISUAL = NDalicPINVOKE.ProgressBar_Property_SECONDARY_PROGRESS_VISUAL_get(); - internal static readonly int INDETERMINATE_VISUAL = NDalicPINVOKE.ProgressBar_Property_INDETERMINATE_VISUAL_get(); - internal static readonly int INDETERMINATE_VISUAL_ANIMATION = NDalicPINVOKE.ProgressBar_Property_INDETERMINATE_VISUAL_ANIMATION_get(); - internal static readonly int LABEL_VISUAL = NDalicPINVOKE.ProgressBar_Property_LABEL_VISUAL_get(); - - } - - /// - /// Creates the ProgressBar. - /// - public ProgressBar() : this(NDalicPINVOKE.ProgressBar_New(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - internal ProgressBar(ProgressBar handle) : this(NDalicPINVOKE.new_ProgressBar__SWIG_1(ProgressBar.getCPtr(handle)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal ProgressBar Assign(ProgressBar handle) - { - ProgressBar ret = new ProgressBar(NDalicPINVOKE.ProgressBar_Assign(swigCPtr, ProgressBar.getCPtr(handle)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Downcasts a handle to ProgressBar handle.
- /// If handle points to a ProgressBar, the downcast produces valid handle.
- /// If not the returned handle is left uninitialized.
- ///
- /// Handle to an object - /// handle to a ProgressBar or an uninitialized handle - public new static ProgressBar DownCast(BaseHandle handle) - { - ProgressBar ret = new ProgressBar(NDalicPINVOKE.ProgressBar_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal ProgressBarValueChangedSignal ValueChangedSignal() - { - ProgressBarValueChangedSignal ret = new ProgressBarValueChangedSignal(NDalicPINVOKE.ProgressBar_ValueChangedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal enum PropertyRange - { - PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, - PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000 - } - - /// - /// The progress value of progress bar, progress runs form 0 to 1.
- /// If Value is set to 0, progress bar will be set to beginning.
- /// If Value is set to 1, progress bar will be set to end.
- /// Any Value outside of the range is ignored.
- ///
- public float ProgressValue - { - get - { - float temp = 0.0f; - GetProperty(ProgressBar.Property.PROGRESS_VALUE).Get(ref temp); - return temp; - } - set - { - SetProperty(ProgressBar.Property.PROGRESS_VALUE, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// The secondary progress value of progress bar, secondary progress runs form 0 to 1.
- /// Optional. If not supplied, the default is 0.
- /// If Value is set to 0, progress bar will be set secondary progress to beginning.
- /// If Value is set to 1, progress bar will be set secondary progress to end.
- /// Any Value outside of the range is ignored.
- ///
- public float SecondaryProgressValue - { - get - { - float temp = 0.0f; - GetProperty(ProgressBar.Property.SECONDARY_PROGRESS_VALUE).Get(ref temp); - return temp; - } - set - { - SetProperty(ProgressBar.Property.SECONDARY_PROGRESS_VALUE, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// Sets the progress-bar as \e indeterminate state. - /// - public bool Indeterminate - { - get - { - bool temp = false; - GetProperty(ProgressBar.Property.INDETERMINATE).Get(ref temp); - return temp; - } - set - { - SetProperty(ProgressBar.Property.INDETERMINATE, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// The track Visual value of progress bar, it's a full progress area and it's shown behind PROGRESS_VISUAL.
- /// Optional. If not supplied, the default track visual will be shown.
- ///
- public Tizen.NUI.PropertyMap TrackVisual - { - get - { - Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); - GetProperty(ProgressBar.Property.TRACK_VISUAL).Get(temp); - return temp; - } - set - { - SetProperty(ProgressBar.Property.TRACK_VISUAL, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// The progress Visual value of progress bar, size of the progress visual is changed based on PROGRESS_VALUE.
- /// Optional. If not supplied, the default progress visual will be shown.
- ///
- public Tizen.NUI.PropertyMap ProgressVisual - { - get - { - Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); - GetProperty(ProgressBar.Property.PROGRESS_VISUAL).Get(temp); - return temp; - } - set - { - SetProperty(ProgressBar.Property.PROGRESS_VISUAL, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// The secondary progress visual of progress bar, size of the secondary progress visual is changed based on SECONDARY_PROGRESS_VALUE.
- /// Optional. If not supplied, the secondary progress visual will not be shown.
- ///
- public Tizen.NUI.PropertyMap SecondaryProgressVisual - { - get - { - Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); - GetProperty(ProgressBar.Property.SECONDARY_PROGRESS_VISUAL).Get(temp); - return temp; - } - set - { - SetProperty(ProgressBar.Property.SECONDARY_PROGRESS_VISUAL, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// The indeterminate visual of progress bar.
- /// Optional. If not supplied, the default inditerminate visual will be shown.
- ///
- public Tizen.NUI.PropertyMap IndeterminateVisual - { - get - { - Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); - GetProperty(ProgressBar.Property.INDETERMINATE_VISUAL).Get(temp); - return temp; - } - set - { - SetProperty(ProgressBar.Property.INDETERMINATE_VISUAL, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// The transition data for indeterminate visual animation.
- /// Optional. If not supplied, default animation will be played.
- ///
- public Tizen.NUI.PropertyArray IndeterminateVisualAnimation - { - get - { - Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray(); - GetProperty(ProgressBar.Property.INDETERMINATE_VISUAL_ANIMATION).Get(temp); - return temp; - } - set - { - SetProperty(ProgressBar.Property.INDETERMINATE_VISUAL_ANIMATION, new Tizen.NUI.PropertyValue(value)); - } - } - /// - /// The Label visual of progress bar. - /// - public Tizen.NUI.PropertyMap LabelVisual - { - get - { - Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); - GetProperty(ProgressBar.Property.LABEL_VISUAL).Get(temp); - return temp; - } - set - { - SetProperty(ProgressBar.Property.LABEL_VISUAL, new Tizen.NUI.PropertyValue(value)); - } - } - - } - -} diff --git a/src/Tizen.NUI/src/internal/ProgressBarValueChangedSignal.cs b/src/Tizen.NUI/src/internal/ProgressBarValueChangedSignal.cs index 1c6fc85a8..e84de677f 100755 --- a/src/Tizen.NUI/src/internal/ProgressBarValueChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/ProgressBarValueChangedSignal.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class ProgressBarValueChangedSignal : global::System.IDisposable + internal class ProgressBarValueChangedSignal : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/internal/RadioButton.cs b/src/Tizen.NUI/src/internal/RadioButton.cs deleted file mode 100755 index 150ffb20e..000000000 --- a/src/Tizen.NUI/src/internal/RadioButton.cs +++ /dev/null @@ -1,140 +0,0 @@ -/** 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. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI.UIComponents -{ - - /// - /// A RadioButton provides a radio button which two states \e selected or \e unselected.
- /// Radio buttons are designed to select one of many option at the same time.
- /// RadioButton can change its current state using Selected.
- ///
- /// RadioButtons can be grouped.
- /// Two or more RadioButtons are in one group when they have this same parent.
- /// In each groups only one RadioButton can be \e selected at a given time.
- /// So when RadioButton is set to \e selected, other RadioButtons in its group are set to \e unselected.
- /// When \e selected RadioButton is set to \e unselected no other RadioButtons in his group is set to \e selected.
- ///
- /// A StateChanged Event is emitted when the RadioButton change its state to \e selected or \e unselected.
- ///
- public class RadioButton : Button - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal RadioButton(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.RadioButton_SWIGUpcast(cPtr), cMemoryOwn) - { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RadioButton obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - /// - /// To make RadioButton instance be disposed. - /// - 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. - - //Unreference this from if a static instance refer to this. - ViewRegistry.UnregisterView(this); - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_RadioButton(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - base.Dispose(type); - } - /// - /// Creates an uninitialized RadioButton - /// - public RadioButton() : this(NDalicPINVOKE.RadioButton_New__SWIG_0(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - - /// - /// Creates an uninitialized RadioButton with Label - /// - /// Label text - public RadioButton(string label) : this(NDalicPINVOKE.RadioButton_New__SWIG_1(label), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - internal RadioButton(RadioButton radioButton) : this(NDalicPINVOKE.new_RadioButton__SWIG_1(RadioButton.getCPtr(radioButton)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal RadioButton Assign(RadioButton radioButton) - { - RadioButton ret = new RadioButton(NDalicPINVOKE.RadioButton_Assign(swigCPtr, RadioButton.getCPtr(radioButton)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Downcasts a handle to RadioButton handle. - /// If handle points to a RadioButton, the downcast produces valid handle. - /// If not, the returned handle is left uninitialized. - /// - /// Handle to an object - /// A handle to a RadioButton or an uninitialized handle - public new static RadioButton DownCast(BaseHandle handle) - { - RadioButton ret = new RadioButton(NDalicPINVOKE.RadioButton_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - } - -} diff --git a/src/Tizen.NUI/src/internal/RefObject.cs b/src/Tizen.NUI/src/internal/RefObject.cs index e46c92e39..4f5c79ab8 100755 --- a/src/Tizen.NUI/src/internal/RefObject.cs +++ b/src/Tizen.NUI/src/internal/RefObject.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class RefObject : global::System.IDisposable + internal class RefObject : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/internal/Ruler.cs b/src/Tizen.NUI/src/internal/Ruler.cs index fc1b960e8..5b871861f 100755 --- a/src/Tizen.NUI/src/internal/Ruler.cs +++ b/src/Tizen.NUI/src/internal/Ruler.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class Ruler : RefObject + internal class Ruler : RefObject { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/RulerDomain.cs b/src/Tizen.NUI/src/internal/RulerDomain.cs index cbe2b4b9a..18b8609fc 100755 --- a/src/Tizen.NUI/src/internal/RulerDomain.cs +++ b/src/Tizen.NUI/src/internal/RulerDomain.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class RulerDomain : global::System.IDisposable + internal class RulerDomain : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/internal/RulerPtr.cs b/src/Tizen.NUI/src/internal/RulerPtr.cs index 2ab91cf4f..8f660dc64 100755 --- a/src/Tizen.NUI/src/internal/RulerPtr.cs +++ b/src/Tizen.NUI/src/internal/RulerPtr.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class RulerPtr : global::System.IDisposable + internal class RulerPtr : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs index 1f7ceab62..0191095a3 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_CallbackBase.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class SWIGTYPE_p_CallbackBase + internal class SWIGTYPE_p_CallbackBase { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs index 9acac7f73..22ff2b978 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__CallbackBase.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class SWIGTYPE_p_Dali__CallbackBase + internal class SWIGTYPE_p_Dali__CallbackBase { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs index 1af922218..1e123d8db 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__FunctorDelegate.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class SWIGTYPE_p_Dali__FunctorDelegate + internal class SWIGTYPE_p_Dali__FunctorDelegate { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__Texture.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__Texture.cs index e16bc39cc..3fbcf7243 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__Texture.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Internal__Texture.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class SWIGTYPE_p_Dali__Internal__Texture + internal class SWIGTYPE_p_Dali__Internal__Texture { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t.cs index 5490134dc..b6a2520e7 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t + internal class SWIGTYPE_p_Dali__IntrusivePtrT_Dali__Toolkit__ItemLayout_t { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t.cs index 0ca2c3998..f07cda2b1 100755 --- a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t.cs +++ b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t + internal class SWIGTYPE_p_Dali__SignalT_void_fDali__Actor_bool_Dali__DevelActor__VisibilityChange__TypeF_t { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/ScrollView.cs b/src/Tizen.NUI/src/internal/ScrollView.cs deleted file mode 100755 index f97eb6018..000000000 --- a/src/Tizen.NUI/src/internal/ScrollView.cs +++ /dev/null @@ -1,1181 +0,0 @@ -/** 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. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI -{ - - using System; - using System.Runtime.InteropServices; - using Tizen.NUI.BaseComponents; - - public class ScrollView : Scrollable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal ScrollView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ScrollView_SWIGUpcast(cPtr), cMemoryOwn) - { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ScrollView obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - 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. - - //Unreference this from if a static instance refer to this. - ViewRegistry.UnregisterView(this); - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_ScrollView(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - base.Dispose(type); - } - - /** - * @brief Event arguments that passed via SnapStarted signal - * - */ - public class SnapStartedEventArgs : EventArgs - { - private Tizen.NUI.ScrollView.SnapEvent _snapEvent; - - /** - * @brief SnapEvent - is the SnapEvent information like snap or flick (it tells the target position, scale, rotation for the snap or flick). - * - */ - public Tizen.NUI.ScrollView.SnapEvent SnapEventInfo - { - get - { - return _snapEvent; - } - set - { - _snapEvent = value; - } - } - } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void SnapStartedCallbackDelegate(IntPtr data); - private DaliEventHandler _scrollViewSnapStartedEventHandler; - private SnapStartedCallbackDelegate _scrollViewSnapStartedCallbackDelegate; - - /** - * @brief Event for SnapStarted signal which can be used to subscribe/unsubscribe the event handler - * (in the type of SnapStartedEventHandler-DaliEventHandler) provided by the user. - * SnapStarted signal is emitted hen the ScrollView has started to snap or flick (it tells the target - * position, scale, rotation for the snap or flick). - * - */ - public event DaliEventHandler SnapStarted - { - add - { - lock (this) - { - // Restricted to only one listener - if (_scrollViewSnapStartedEventHandler == null) - { - _scrollViewSnapStartedEventHandler += value; - - _scrollViewSnapStartedCallbackDelegate = new SnapStartedCallbackDelegate(OnSnapStarted); - this.SnapStartedSignal().Connect(_scrollViewSnapStartedCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_scrollViewSnapStartedEventHandler != null) - { - this.SnapStartedSignal().Disconnect(_scrollViewSnapStartedCallbackDelegate); - } - - _scrollViewSnapStartedEventHandler -= value; - } - } - } - - // Callback for ScrollView SnapStarted signal - private void OnSnapStarted(IntPtr data) - { - SnapStartedEventArgs e = new SnapStartedEventArgs(); - - // Populate all members of "e" (SnapStartedEventArgs) with real data - e.SnapEventInfo = SnapEvent.GetSnapEventFromPtr(data); - - if (_scrollViewSnapStartedEventHandler != null) - { - //here we send all data to user event handlers - _scrollViewSnapStartedEventHandler(this, e); - } - } - - - public class ClampEvent : global::System.IDisposable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal ClampEvent(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(ClampEvent 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; - - - ~ClampEvent() - { - 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_ScrollView_ClampEvent(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - internal ClampState2D scale - { - set - { - NDalicPINVOKE.ScrollView_ClampEvent_scale_set(swigCPtr, ClampState2D.getCPtr(value)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.ScrollView_ClampEvent_scale_get(swigCPtr); - ClampState2D ret = (cPtr == global::System.IntPtr.Zero) ? null : new ClampState2D(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - internal ClampState2D position - { - set - { - NDalicPINVOKE.ScrollView_ClampEvent_position_set(swigCPtr, ClampState2D.getCPtr(value)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.ScrollView_ClampEvent_position_get(swigCPtr); - ClampState2D ret = (cPtr == global::System.IntPtr.Zero) ? null : new ClampState2D(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - internal ClampState rotation - { - set - { - NDalicPINVOKE.ScrollView_ClampEvent_rotation_set(swigCPtr, (int)value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - ClampState ret = (ClampState)NDalicPINVOKE.ScrollView_ClampEvent_rotation_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public ClampEvent() : this(NDalicPINVOKE.new_ScrollView_ClampEvent(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - } - - public class SnapEvent : global::System.IDisposable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal SnapEvent(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(SnapEvent 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; - - - ~SnapEvent() - { - 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_ScrollView_SnapEvent(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - public static SnapEvent GetSnapEventFromPtr(global::System.IntPtr cPtr) - { - SnapEvent ret = new SnapEvent(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal SnapType type - { - set - { - NDalicPINVOKE.ScrollView_SnapEvent_type_set(swigCPtr, (int)value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - SnapType ret = (SnapType)NDalicPINVOKE.ScrollView_SnapEvent_type_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public Vector2 position - { - set - { - NDalicPINVOKE.ScrollView_SnapEvent_position_set(swigCPtr, Vector2.getCPtr(value)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.ScrollView_SnapEvent_position_get(swigCPtr); - Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public float duration - { - set - { - NDalicPINVOKE.ScrollView_SnapEvent_duration_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - float ret = NDalicPINVOKE.ScrollView_SnapEvent_duration_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - public SnapEvent() : this(NDalicPINVOKE.new_ScrollView_SnapEvent(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - } - - public class Property : global::System.IDisposable - { - 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_ScrollView_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - public Property() : this(NDalicPINVOKE.new_ScrollView_Property(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int WRAP_ENABLED = NDalicPINVOKE.ScrollView_Property_WRAP_ENABLED_get(); - public static readonly int PANNING_ENABLED = NDalicPINVOKE.ScrollView_Property_PANNING_ENABLED_get(); - public static readonly int AXIS_AUTO_LOCK_ENABLED = NDalicPINVOKE.ScrollView_Property_AXIS_AUTO_LOCK_ENABLED_get(); - public static readonly int WHEEL_SCROLL_DISTANCE_STEP = NDalicPINVOKE.ScrollView_Property_WHEEL_SCROLL_DISTANCE_STEP_get(); - public static readonly int SCROLL_POSITION = NDalicPINVOKE.ScrollView_Property_SCROLL_POSITION_get(); - public static readonly int SCROLL_PRE_POSITION = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_get(); - public static readonly int SCROLL_PRE_POSITION_X = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_X_get(); - public static readonly int SCROLL_PRE_POSITION_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_Y_get(); - public static readonly int SCROLL_PRE_POSITION_MAX = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_MAX_get(); - public static readonly int SCROLL_PRE_POSITION_MAX_X = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_MAX_X_get(); - public static readonly int SCROLL_PRE_POSITION_MAX_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_MAX_Y_get(); - public static readonly int OVERSHOOT_X = NDalicPINVOKE.ScrollView_Property_OVERSHOOT_X_get(); - public static readonly int OVERSHOOT_Y = NDalicPINVOKE.ScrollView_Property_OVERSHOOT_Y_get(); - public static readonly int SCROLL_FINAL = NDalicPINVOKE.ScrollView_Property_SCROLL_FINAL_get(); - public static readonly int SCROLL_FINAL_X = NDalicPINVOKE.ScrollView_Property_SCROLL_FINAL_X_get(); - public static readonly int SCROLL_FINAL_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_FINAL_Y_get(); - public static readonly int WRAP = NDalicPINVOKE.ScrollView_Property_WRAP_get(); - public static readonly int PANNING = NDalicPINVOKE.ScrollView_Property_PANNING_get(); - public static readonly int SCROLLING = NDalicPINVOKE.ScrollView_Property_SCROLLING_get(); - public static readonly int SCROLL_DOMAIN_SIZE = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_SIZE_get(); - public static readonly int SCROLL_DOMAIN_SIZE_X = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_SIZE_X_get(); - public static readonly int SCROLL_DOMAIN_SIZE_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_SIZE_Y_get(); - public static readonly int SCROLL_DOMAIN_OFFSET = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_OFFSET_get(); - public static readonly int SCROLL_POSITION_DELTA = NDalicPINVOKE.ScrollView_Property_SCROLL_POSITION_DELTA_get(); - public static readonly int START_PAGE_POSITION = NDalicPINVOKE.ScrollView_Property_START_PAGE_POSITION_get(); - - } - - public ScrollView() : this(NDalicPINVOKE.ScrollView_New(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public ScrollView(ScrollView handle) : this(NDalicPINVOKE.new_ScrollView__SWIG_1(ScrollView.getCPtr(handle)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ScrollView Assign(ScrollView handle) - { - ScrollView ret = new ScrollView(NDalicPINVOKE.ScrollView_Assign(swigCPtr, ScrollView.getCPtr(handle)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public new static ScrollView DownCast(BaseHandle handle) - { - ScrollView ret = new ScrollView(NDalicPINVOKE.ScrollView_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public AlphaFunction GetScrollSnapAlphaFunction() - { - AlphaFunction ret = new AlphaFunction(NDalicPINVOKE.ScrollView_GetScrollSnapAlphaFunction(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetScrollSnapAlphaFunction(AlphaFunction alpha) - { - NDalicPINVOKE.ScrollView_SetScrollSnapAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public AlphaFunction GetScrollFlickAlphaFunction() - { - AlphaFunction ret = new AlphaFunction(NDalicPINVOKE.ScrollView_GetScrollFlickAlphaFunction(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetScrollFlickAlphaFunction(AlphaFunction alpha) - { - NDalicPINVOKE.ScrollView_SetScrollFlickAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetScrollSnapDuration() - { - float ret = NDalicPINVOKE.ScrollView_GetScrollSnapDuration(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetScrollSnapDuration(float time) - { - NDalicPINVOKE.ScrollView_SetScrollSnapDuration(swigCPtr, time); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetScrollFlickDuration() - { - float ret = NDalicPINVOKE.ScrollView_GetScrollFlickDuration(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetScrollFlickDuration(float time) - { - NDalicPINVOKE.ScrollView_SetScrollFlickDuration(swigCPtr, time); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetRulerX(RulerPtr ruler) - { - NDalicPINVOKE.ScrollView_SetRulerX(swigCPtr, RulerPtr.getCPtr(ruler)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetRulerY(RulerPtr ruler) - { - NDalicPINVOKE.ScrollView_SetRulerY(swigCPtr, RulerPtr.getCPtr(ruler)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetScrollSensitive(bool sensitive) - { - NDalicPINVOKE.ScrollView_SetScrollSensitive(swigCPtr, sensitive); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetMaxOvershoot(float overshootX, float overshootY) - { - NDalicPINVOKE.ScrollView_SetMaxOvershoot(swigCPtr, overshootX, overshootY); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetSnapOvershootAlphaFunction(AlphaFunction alpha) - { - NDalicPINVOKE.ScrollView_SetSnapOvershootAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetSnapOvershootDuration(float duration) - { - NDalicPINVOKE.ScrollView_SetSnapOvershootDuration(swigCPtr, duration); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetViewAutoSnap(bool enable) - { - NDalicPINVOKE.ScrollView_SetActorAutoSnap(swigCPtr, enable); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetWrapMode(bool enable) - { - NDalicPINVOKE.ScrollView_SetWrapMode(swigCPtr, enable); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public int GetScrollUpdateDistance() - { - int ret = NDalicPINVOKE.ScrollView_GetScrollUpdateDistance(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetScrollUpdateDistance(int distance) - { - NDalicPINVOKE.ScrollView_SetScrollUpdateDistance(swigCPtr, distance); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool GetAxisAutoLock() - { - bool ret = NDalicPINVOKE.ScrollView_GetAxisAutoLock(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetAxisAutoLock(bool enable) - { - NDalicPINVOKE.ScrollView_SetAxisAutoLock(swigCPtr, enable); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetAxisAutoLockGradient() - { - float ret = NDalicPINVOKE.ScrollView_GetAxisAutoLockGradient(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetAxisAutoLockGradient(float gradient) - { - NDalicPINVOKE.ScrollView_SetAxisAutoLockGradient(swigCPtr, gradient); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetFrictionCoefficient() - { - float ret = NDalicPINVOKE.ScrollView_GetFrictionCoefficient(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetFrictionCoefficient(float friction) - { - NDalicPINVOKE.ScrollView_SetFrictionCoefficient(swigCPtr, friction); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetFlickSpeedCoefficient() - { - float ret = NDalicPINVOKE.ScrollView_GetFlickSpeedCoefficient(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetFlickSpeedCoefficient(float speed) - { - NDalicPINVOKE.ScrollView_SetFlickSpeedCoefficient(swigCPtr, speed); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Vector2 GetMinimumDistanceForFlick() - { - Vector2 ret = new Vector2(NDalicPINVOKE.ScrollView_GetMinimumDistanceForFlick(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetMinimumDistanceForFlick(Vector2 distance) - { - NDalicPINVOKE.ScrollView_SetMinimumDistanceForFlick(swigCPtr, Vector2.getCPtr(distance)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetMinimumSpeedForFlick() - { - float ret = NDalicPINVOKE.ScrollView_GetMinimumSpeedForFlick(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetMinimumSpeedForFlick(float speed) - { - NDalicPINVOKE.ScrollView_SetMinimumSpeedForFlick(swigCPtr, speed); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetMaxFlickSpeed() - { - float ret = NDalicPINVOKE.ScrollView_GetMaxFlickSpeed(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetMaxFlickSpeed(float speed) - { - NDalicPINVOKE.ScrollView_SetMaxFlickSpeed(swigCPtr, speed); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Vector2 GetWheelScrollDistanceStep() - { - Vector2 ret = new Vector2(NDalicPINVOKE.ScrollView_GetWheelScrollDistanceStep(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetWheelScrollDistanceStep(Vector2 step) - { - NDalicPINVOKE.ScrollView_SetWheelScrollDistanceStep(swigCPtr, Vector2.getCPtr(step)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Vector2 GetCurrentScrollPosition() - { - Vector2 ret = new Vector2(NDalicPINVOKE.ScrollView_GetCurrentScrollPosition(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetCurrentPage() - { - uint ret = NDalicPINVOKE.ScrollView_GetCurrentPage(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void ScrollTo(Vector2 position) - { - NDalicPINVOKE.ScrollView_ScrollTo__SWIG_0(swigCPtr, Vector2.getCPtr(position)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ScrollTo(Vector2 position, float duration) - { - NDalicPINVOKE.ScrollView_ScrollTo__SWIG_1(swigCPtr, Vector2.getCPtr(position), duration); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ScrollTo(Vector2 position, float duration, AlphaFunction alpha) - { - NDalicPINVOKE.ScrollView_ScrollTo__SWIG_2(swigCPtr, Vector2.getCPtr(position), duration, AlphaFunction.getCPtr(alpha)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ScrollTo(Vector2 position, float duration, DirectionBias horizontalBias, DirectionBias verticalBias) - { - NDalicPINVOKE.ScrollView_ScrollTo__SWIG_3(swigCPtr, Vector2.getCPtr(position), duration, (int)horizontalBias, (int)verticalBias); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ScrollTo(Vector2 position, float duration, AlphaFunction alpha, DirectionBias horizontalBias, DirectionBias verticalBias) - { - NDalicPINVOKE.ScrollView_ScrollTo__SWIG_4(swigCPtr, Vector2.getCPtr(position), duration, AlphaFunction.getCPtr(alpha), (int)horizontalBias, (int)verticalBias); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ScrollTo(uint page) - { - NDalicPINVOKE.ScrollView_ScrollTo__SWIG_5(swigCPtr, page); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ScrollTo(uint page, float duration) - { - NDalicPINVOKE.ScrollView_ScrollTo__SWIG_6(swigCPtr, page, duration); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ScrollTo(uint page, float duration, DirectionBias bias) - { - NDalicPINVOKE.ScrollView_ScrollTo__SWIG_7(swigCPtr, page, duration, (int)bias); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ScrollTo(View view) - { - NDalicPINVOKE.ScrollView_ScrollTo__SWIG_8(swigCPtr, View.getCPtr(view)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ScrollTo(View view, float duration) - { - NDalicPINVOKE.ScrollView_ScrollTo__SWIG_9(swigCPtr, View.getCPtr(view), duration); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public bool ScrollToSnapPoint() - { - bool ret = NDalicPINVOKE.ScrollView_ScrollToSnapPoint(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal void ApplyConstraintToChildren(SWIGTYPE_p_Dali__Constraint constraint) - { - NDalicPINVOKE.ScrollView_ApplyConstraintToChildren(swigCPtr, SWIGTYPE_p_Dali__Constraint.getCPtr(constraint)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveConstraintsFromChildren() - { - NDalicPINVOKE.ScrollView_RemoveConstraintsFromChildren(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void ApplyEffect(ScrollViewEffect effect) - { - NDalicPINVOKE.ScrollView_ApplyEffect(swigCPtr, ScrollViewEffect.getCPtr(effect)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveEffect(ScrollViewEffect effect) - { - NDalicPINVOKE.ScrollView_RemoveEffect(swigCPtr, ScrollViewEffect.getCPtr(effect)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveAllEffects() - { - NDalicPINVOKE.ScrollView_RemoveAllEffects(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void BindView(View child) - { - NDalicPINVOKE.ScrollView_BindActor(swigCPtr, View.getCPtr(child)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void UnbindView(View child) - { - NDalicPINVOKE.ScrollView_UnbindActor(swigCPtr, View.getCPtr(child)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetScrollingDirection(Radian direction, Radian threshold) - { - NDalicPINVOKE.ScrollView_SetScrollingDirection__SWIG_0(swigCPtr, Radian.getCPtr(direction), Radian.getCPtr(threshold)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetScrollingDirection(Radian direction) - { - NDalicPINVOKE.ScrollView_SetScrollingDirection__SWIG_1(swigCPtr, Radian.getCPtr(direction)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveScrollingDirection(Radian direction) - { - NDalicPINVOKE.ScrollView_RemoveScrollingDirection(swigCPtr, Radian.getCPtr(direction)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal ScrollViewSnapStartedSignal SnapStartedSignal() - { - ScrollViewSnapStartedSignal ret = new ScrollViewSnapStartedSignal(NDalicPINVOKE.ScrollView_SnapStartedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public enum PropertyRange - { - PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, - PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000, - ANIMATABLE_PROPERTY_START_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, - ANIMATABLE_PROPERTY_END_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 - } - - public bool WrapEnabled - { - get - { - bool temp = false; - GetProperty(ScrollView.Property.WRAP_ENABLED).Get(ref temp); - return temp; - } - set - { - SetProperty(ScrollView.Property.WRAP_ENABLED, new Tizen.NUI.PropertyValue(value)); - } - } - public bool PanningEnabled - { - get - { - bool temp = false; - GetProperty(ScrollView.Property.PANNING_ENABLED).Get(ref temp); - return temp; - } - set - { - SetProperty(ScrollView.Property.PANNING_ENABLED, new Tizen.NUI.PropertyValue(value)); - } - } - public bool AxisAutoLockEnabled - { - get - { - bool temp = false; - GetProperty(ScrollView.Property.AXIS_AUTO_LOCK_ENABLED).Get(ref temp); - return temp; - } - set - { - SetProperty(ScrollView.Property.AXIS_AUTO_LOCK_ENABLED, new Tizen.NUI.PropertyValue(value)); - } - } - public Vector2 WheelScrollDistanceStep - { - get - { - Vector2 temp = new Vector2(0.0f, 0.0f); - GetProperty(ScrollView.Property.WHEEL_SCROLL_DISTANCE_STEP).Get(temp); - return temp; - } - set - { - SetProperty(ScrollView.Property.WHEEL_SCROLL_DISTANCE_STEP, new Tizen.NUI.PropertyValue(value)); - } - } - public Vector2 ScrollPosition - { - get - { - Vector2 temp = new Vector2(0.0f, 0.0f); - GetProperty(ScrollView.Property.SCROLL_POSITION).Get(temp); - return temp; - } - set - { - SetProperty(ScrollView.Property.SCROLL_POSITION, new Tizen.NUI.PropertyValue(value)); - } - } - public Vector2 ScrollPrePosition - { - get - { - Vector2 temp = new Vector2(0.0f, 0.0f); - GetProperty(ScrollView.Property.SCROLL_PRE_POSITION).Get(temp); - return temp; - } - set - { - SetProperty(ScrollView.Property.SCROLL_PRE_POSITION, new Tizen.NUI.PropertyValue(value)); - } - } - public Vector2 ScrollPrePositionMax - { - get - { - Vector2 temp = new Vector2(0.0f, 0.0f); - GetProperty(ScrollView.Property.SCROLL_PRE_POSITION_MAX).Get(temp); - return temp; - } - set - { - SetProperty(ScrollView.Property.SCROLL_PRE_POSITION_MAX, new Tizen.NUI.PropertyValue(value)); - } - } - public float OvershootX - { - get - { - float temp = 0.0f; - GetProperty(ScrollView.Property.OVERSHOOT_X).Get(ref temp); - return temp; - } - set - { - SetProperty(ScrollView.Property.OVERSHOOT_X, new Tizen.NUI.PropertyValue(value)); - } - } - public float OvershootY - { - get - { - float temp = 0.0f; - GetProperty(ScrollView.Property.OVERSHOOT_Y).Get(ref temp); - return temp; - } - set - { - SetProperty(ScrollView.Property.OVERSHOOT_Y, new Tizen.NUI.PropertyValue(value)); - } - } - public Vector2 ScrollFinal - { - get - { - Vector2 temp = new Vector2(0.0f, 0.0f); - GetProperty(ScrollView.Property.SCROLL_FINAL).Get(temp); - return temp; - } - set - { - SetProperty(ScrollView.Property.SCROLL_FINAL, new Tizen.NUI.PropertyValue(value)); - } - } - public bool Wrap - { - get - { - bool temp = false; - GetProperty(ScrollView.Property.WRAP).Get(ref temp); - return temp; - } - set - { - SetProperty(ScrollView.Property.WRAP, new Tizen.NUI.PropertyValue(value)); - } - } - public bool Panning - { - get - { - bool temp = false; - GetProperty(ScrollView.Property.PANNING).Get(ref temp); - return temp; - } - set - { - SetProperty(ScrollView.Property.PANNING, new Tizen.NUI.PropertyValue(value)); - } - } - public bool Scrolling - { - get - { - bool temp = false; - GetProperty(ScrollView.Property.SCROLLING).Get(ref temp); - return temp; - } - set - { - SetProperty(ScrollView.Property.SCROLLING, new Tizen.NUI.PropertyValue(value)); - } - } - public Vector2 ScrollDomainSize - { - get - { - Vector2 temp = new Vector2(0.0f, 0.0f); - GetProperty(ScrollView.Property.SCROLL_DOMAIN_SIZE).Get(temp); - return temp; - } - set - { - SetProperty(ScrollView.Property.SCROLL_DOMAIN_SIZE, new Tizen.NUI.PropertyValue(value)); - } - } - public Vector2 ScrollDomainOffset - { - get - { - Vector2 temp = new Vector2(0.0f, 0.0f); - GetProperty(ScrollView.Property.SCROLL_DOMAIN_OFFSET).Get(temp); - return temp; - } - set - { - SetProperty(ScrollView.Property.SCROLL_DOMAIN_OFFSET, new Tizen.NUI.PropertyValue(value)); - } - } - public Vector2 ScrollPositionDelta - { - get - { - Vector2 temp = new Vector2(0.0f, 0.0f); - GetProperty(ScrollView.Property.SCROLL_POSITION_DELTA).Get(temp); - return temp; - } - set - { - SetProperty(ScrollView.Property.SCROLL_POSITION_DELTA, new Tizen.NUI.PropertyValue(value)); - } - } - public Vector3 StartPagePosition - { - get - { - Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f); - GetProperty(ScrollView.Property.START_PAGE_POSITION).Get(temp); - return temp; - } - set - { - SetProperty(ScrollView.Property.START_PAGE_POSITION, new Tizen.NUI.PropertyValue(value)); - } - } - - } - -} diff --git a/src/Tizen.NUI/src/internal/ScrollViewEffect.cs b/src/Tizen.NUI/src/internal/ScrollViewEffect.cs deleted file mode 100755 index 9ddfc3561..000000000 --- a/src/Tizen.NUI/src/internal/ScrollViewEffect.cs +++ /dev/null @@ -1,69 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// 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. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI -{ - - public class ScrollViewEffect : BaseHandle - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal ScrollViewEffect(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ScrollViewEffect_SWIGUpcast(cPtr), cMemoryOwn) - { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ScrollViewEffect obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - - 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_ScrollViewEffect(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - base.Dispose(type); - } - - - public ScrollViewEffect() : this(NDalicPINVOKE.new_ScrollViewEffect(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - } - -} diff --git a/src/Tizen.NUI/src/internal/Scrollable.cs b/src/Tizen.NUI/src/internal/Scrollable.cs deleted file mode 100755 index 0a31f598f..000000000 --- a/src/Tizen.NUI/src/internal/Scrollable.cs +++ /dev/null @@ -1,603 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// 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. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI -{ - - using System; - using System.Runtime.InteropServices; - using Tizen.NUI.BaseComponents; - - public class Scrollable : View - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal Scrollable(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Scrollable_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(Scrollable obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - 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. - - //Unreference this from if a static instance refer to this. - ViewRegistry.UnregisterView(this); - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Scrollable(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - base.Dispose(type); - } - - public class StartedEventArgs : EventArgs - { - private Vector2 _vector2; - - public Vector2 Vector2 - { - get - { - return _vector2; - } - set - { - _vector2 = value; - } - } - } - - public class UpdatedEventArgs : EventArgs - { - private Vector2 _vector2; - - public Vector2 Vector2 - { - get - { - return _vector2; - } - set - { - _vector2 = value; - } - } - } - - public class CompletedEventArgs : EventArgs - { - private Vector2 _vector2; - - public Vector2 Vector2 - { - get - { - return _vector2; - } - set - { - _vector2 = value; - } - } - } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void StartedCallbackDelegate(IntPtr vector2); - private DaliEventHandler _scrollableStartedEventHandler; - private StartedCallbackDelegate _scrollableStartedCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void UpdatedCallbackDelegate(IntPtr vector2); - private DaliEventHandler _scrollableUpdatedEventHandler; - private UpdatedCallbackDelegate _scrollableUpdatedCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void CompletedCallbackDelegate(IntPtr vector2); - private DaliEventHandler _scrollableCompletedEventHandler; - private CompletedCallbackDelegate _scrollableCompletedCallbackDelegate; - - public event DaliEventHandler ScrollStarted - { - add - { - lock (this) - { - // Restricted to only one listener - if (_scrollableStartedEventHandler == null) - { - _scrollableStartedEventHandler += value; - - _scrollableStartedCallbackDelegate = new StartedCallbackDelegate(OnStarted); - this.ScrollStartedSignal().Connect(_scrollableStartedCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_scrollableStartedEventHandler != null) - { - this.ScrollStartedSignal().Disconnect(_scrollableStartedCallbackDelegate); - } - - _scrollableStartedEventHandler -= value; - } - } - } - - private void OnStarted(IntPtr vector2) - { - StartedEventArgs e = new StartedEventArgs(); - - // Populate all members of "e" (StartedEventArgs) with real data - e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2); - - if (_scrollableStartedEventHandler != null) - { - //here we send all data to user event handlers - _scrollableStartedEventHandler(this, e); - } - - } - - public event DaliEventHandler ScrollUpdated - { - add - { - lock (this) - { - // Restricted to only one listener - if (_scrollableUpdatedEventHandler == null) - { - _scrollableUpdatedEventHandler += value; - - _scrollableUpdatedCallbackDelegate = new UpdatedCallbackDelegate(OnUpdated); - this.ScrollUpdatedSignal().Connect(_scrollableUpdatedCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_scrollableUpdatedEventHandler != null) - { - this.ScrollUpdatedSignal().Disconnect(_scrollableUpdatedCallbackDelegate); - } - - _scrollableUpdatedEventHandler -= value; - } - } - } - - private void OnUpdated(IntPtr vector2) - { - UpdatedEventArgs e = new UpdatedEventArgs(); - - // Populate all members of "e" (UpdatedEventArgs) with real data - e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2); - - if (_scrollableUpdatedEventHandler != null) - { - //here we send all data to user event handlers - _scrollableUpdatedEventHandler(this, e); - } - - } - - public event DaliEventHandler ScrollCompleted - { - add - { - lock (this) - { - // Restricted to only one listener - if (_scrollableCompletedEventHandler == null) - { - _scrollableCompletedEventHandler += value; - - _scrollableCompletedCallbackDelegate = new CompletedCallbackDelegate(OnCompleted); - this.ScrollCompletedSignal().Connect(_scrollableCompletedCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_scrollableCompletedEventHandler != null) - { - this.ScrollCompletedSignal().Disconnect(_scrollableCompletedCallbackDelegate); - } - - _scrollableCompletedEventHandler -= value; - } - } - } - - private void OnCompleted(IntPtr vector2) - { - CompletedEventArgs e = new CompletedEventArgs(); - - // Populate all members of "e" (CompletedEventArgs) with real data - e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2); - - if (_scrollableCompletedEventHandler != null) - { - //here we send all data to user event handlers - _scrollableCompletedEventHandler(this, e); - } - - } - - - public class Property : global::System.IDisposable - { - 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_Scrollable_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - public Property() : this(NDalicPINVOKE.new_Scrollable_Property(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int OVERSHOOT_EFFECT_COLOR = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_EFFECT_COLOR_get(); - public static readonly int OVERSHOOT_ANIMATION_SPEED = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_ANIMATION_SPEED_get(); - public static readonly int OVERSHOOT_ENABLED = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_ENABLED_get(); - public static readonly int OVERSHOOT_SIZE = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_SIZE_get(); - public static readonly int SCROLL_TO_ALPHA_FUNCTION = NDalicPINVOKE.Scrollable_Property_SCROLL_TO_ALPHA_FUNCTION_get(); - public static readonly int SCROLL_RELATIVE_POSITION = NDalicPINVOKE.Scrollable_Property_SCROLL_RELATIVE_POSITION_get(); - public static readonly int SCROLL_POSITION_MIN = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_get(); - public static readonly int SCROLL_POSITION_MIN_X = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_X_get(); - public static readonly int SCROLL_POSITION_MIN_Y = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_Y_get(); - public static readonly int SCROLL_POSITION_MAX = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_get(); - public static readonly int SCROLL_POSITION_MAX_X = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_X_get(); - public static readonly int SCROLL_POSITION_MAX_Y = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_Y_get(); - public static readonly int CAN_SCROLL_VERTICAL = NDalicPINVOKE.Scrollable_Property_CAN_SCROLL_VERTICAL_get(); - public static readonly int CAN_SCROLL_HORIZONTAL = NDalicPINVOKE.Scrollable_Property_CAN_SCROLL_HORIZONTAL_get(); - - } - - public Scrollable() : this(NDalicPINVOKE.new_Scrollable__SWIG_0(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Scrollable(Scrollable handle) : this(NDalicPINVOKE.new_Scrollable__SWIG_1(Scrollable.getCPtr(handle)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Scrollable Assign(Scrollable handle) - { - Scrollable ret = new Scrollable(NDalicPINVOKE.Scrollable_Assign(swigCPtr, Scrollable.getCPtr(handle)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public new static Scrollable DownCast(BaseHandle handle) - { - Scrollable ret = new Scrollable(NDalicPINVOKE.Scrollable_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public bool IsOvershootEnabled() - { - bool ret = NDalicPINVOKE.Scrollable_IsOvershootEnabled(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetOvershootEnabled(bool enable) - { - NDalicPINVOKE.Scrollable_SetOvershootEnabled(swigCPtr, enable); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetOvershootEffectColor(Vector4 color) - { - NDalicPINVOKE.Scrollable_SetOvershootEffectColor(swigCPtr, Vector4.getCPtr(color)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public Vector4 GetOvershootEffectColor() - { - Vector4 ret = new Vector4(NDalicPINVOKE.Scrollable_GetOvershootEffectColor(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void SetOvershootAnimationSpeed(float pixelsPerSecond) - { - NDalicPINVOKE.Scrollable_SetOvershootAnimationSpeed(swigCPtr, pixelsPerSecond); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public float GetOvershootAnimationSpeed() - { - float ret = NDalicPINVOKE.Scrollable_GetOvershootAnimationSpeed(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal ScrollableSignal ScrollStartedSignal() - { - ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollStartedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal ScrollableSignal ScrollUpdatedSignal() - { - ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollUpdatedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal ScrollableSignal ScrollCompletedSignal() - { - ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollCompletedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public enum PropertyRange - { - PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, - PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000, - ANIMATABLE_PROPERTY_START_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, - ANIMATABLE_PROPERTY_END_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 - } - - public Vector4 OvershootEffectColor - { - get - { - Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); - GetProperty(Scrollable.Property.OVERSHOOT_EFFECT_COLOR).Get(temp); - return temp; - } - set - { - SetProperty(Scrollable.Property.OVERSHOOT_EFFECT_COLOR, new Tizen.NUI.PropertyValue(value)); - } - } - public float OvershootAnimationSpeed - { - get - { - float temp = 0.0f; - GetProperty(Scrollable.Property.OVERSHOOT_ANIMATION_SPEED).Get(ref temp); - return temp; - } - set - { - SetProperty(Scrollable.Property.OVERSHOOT_ANIMATION_SPEED, new Tizen.NUI.PropertyValue(value)); - } - } - public bool OvershootEnabled - { - get - { - bool temp = false; - GetProperty(Scrollable.Property.OVERSHOOT_ENABLED).Get(ref temp); - return temp; - } - set - { - SetProperty(Scrollable.Property.OVERSHOOT_ENABLED, new Tizen.NUI.PropertyValue(value)); - } - } - public Vector2 OvershootSize - { - get - { - Vector2 temp = new Vector2(0.0f, 0.0f); - GetProperty(Scrollable.Property.OVERSHOOT_SIZE).Get(temp); - return temp; - } - set - { - SetProperty(Scrollable.Property.OVERSHOOT_SIZE, new Tizen.NUI.PropertyValue(value)); - } - } - public int ScrollToAlphaFunction - { - get - { - int temp = 0; - GetProperty(Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION).Get(ref temp); - return temp; - } - set - { - SetProperty(Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION, new Tizen.NUI.PropertyValue(value)); - } - } - public Vector2 ScrollRelativePosition - { - get - { - Vector2 temp = new Vector2(0.0f, 0.0f); - GetProperty(Scrollable.Property.SCROLL_RELATIVE_POSITION).Get(temp); - return temp; - } - set - { - SetProperty(Scrollable.Property.SCROLL_RELATIVE_POSITION, new Tizen.NUI.PropertyValue(value)); - } - } - public Vector2 ScrollPositionMin - { - get - { - Vector2 temp = new Vector2(0.0f, 0.0f); - GetProperty(Scrollable.Property.SCROLL_POSITION_MIN).Get(temp); - return temp; - } - set - { - SetProperty(Scrollable.Property.SCROLL_POSITION_MIN, new Tizen.NUI.PropertyValue(value)); - } - } - public Vector2 ScrollPositionMax - { - get - { - Vector2 temp = new Vector2(0.0f, 0.0f); - GetProperty(Scrollable.Property.SCROLL_POSITION_MAX).Get(temp); - return temp; - } - set - { - SetProperty(Scrollable.Property.SCROLL_POSITION_MAX, new Tizen.NUI.PropertyValue(value)); - } - } - public bool CanScrollVertical - { - get - { - bool temp = false; - GetProperty(Scrollable.Property.CAN_SCROLL_VERTICAL).Get(ref temp); - return temp; - } - set - { - SetProperty(Scrollable.Property.CAN_SCROLL_VERTICAL, new Tizen.NUI.PropertyValue(value)); - } - } - public bool CanScrollHorizontal - { - get - { - bool temp = false; - GetProperty(Scrollable.Property.CAN_SCROLL_HORIZONTAL).Get(ref temp); - return temp; - } - set - { - SetProperty(Scrollable.Property.CAN_SCROLL_HORIZONTAL, new Tizen.NUI.PropertyValue(value)); - } - } - - } - -} \ No newline at end of file diff --git a/src/Tizen.NUI/src/internal/SignalObserver.cs b/src/Tizen.NUI/src/internal/SignalObserver.cs index 1eb0b2e04..3f2bbfb82 100755 --- a/src/Tizen.NUI/src/internal/SignalObserver.cs +++ b/src/Tizen.NUI/src/internal/SignalObserver.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class SignalObserver : global::System.IDisposable + internal class SignalObserver : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/internal/Size.cs b/src/Tizen.NUI/src/internal/Size.cs deleted file mode 100755 index f5a3dc7a6..000000000 --- a/src/Tizen.NUI/src/internal/Size.cs +++ /dev/null @@ -1,403 +0,0 @@ -/* - * 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 -{ - - /// - /// Three dimensional size - /// - public class Size : global::System.IDisposable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Size(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(Size 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; - - /// - /// Dispose - /// - ~Size() - { - 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_Vector3(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - /// - /// Addition operator for A+B - /// - /// Size, A - /// Size to assign, B - /// A Size containing the result of the addition - public static Size operator +(Size arg1, Size arg2) - { - return arg1.Add(arg2); - } - - /// - /// Subtraction operator for A-B - /// - /// Size, A - /// Size to subtract, B - /// A Size containing the result of the subtraction - public static Size operator -(Size arg1, Size arg2) - { - return arg1.Subtract(arg2); - } - - /// - /// Unary negation operator. - /// - /// Size for unary negation - /// A Size containg the negation - public static Size operator -(Size arg1) - { - return arg1.Subtract(); - } - - /// - /// Multiplication operator. - /// - /// Size for multiplication - /// The Size to multipl - /// A Size containing the result of the multiplication - public static Size operator *(Size arg1, Size arg2) - { - return arg1.Multiply(arg2); - } - - /// - /// Multiplication operator. - /// - /// Size for multiplication - /// The float value to scale the Size - /// A Size containing the result of the scaling - public static Size operator *(Size arg1, float arg2) - { - return arg1.Multiply(arg2); - } - - /// - /// Division operator. - /// - /// Size for division - /// The Size to divide - /// A Size containing the result of the division> - public static Size operator /(Size arg1, Size arg2) - { - return arg1.Divide(arg2); - } - - /// - /// Division operator. - /// - /// Size for division - /// The float value to scale the Size by - /// A Size containing the result of the scaling - public static Size operator /(Size arg1, float arg2) - { - return arg1.Divide(arg2); - } - - /// - /// Array subscript operator. - /// - /// Subscript index - /// The float at the given index - public float this[uint index] - { - get - { - return ValueOfIndex(index); - } - } - - internal static Size GetSizeFromPtr(global::System.IntPtr cPtr) - { - Size ret = new Size(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Constructor. - /// - public Size() : this(NDalicPINVOKE.new_Vector3__SWIG_0(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Constructor. - /// - /// x (or width) component - /// y (or height) component - /// z (or depth) component - public Size(float x, float y, float z) : this(NDalicPINVOKE.new_Vector3__SWIG_1(x, y, z), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Constructor. - /// - /// Size2D with x (width) and y (height) - public Size(Size2D size2d) : this(NDalicPINVOKE.new_Vector3__SWIG_3(Size2D.getCPtr(size2d)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Zero constant, (0.0f, 0.0f, 0.0f). - /// - public static Size Zero - { - get - { - global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_ZERO_get(); - Size ret = (cPtr == global::System.IntPtr.Zero) ? null : new Size(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - private Size Add(Size rhs) - { - Size ret = new Size(NDalicPINVOKE.Vector3_Add(swigCPtr, Size.getCPtr(rhs)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private Size Subtract(Size rhs) - { - Size ret = new Size(NDalicPINVOKE.Vector3_Subtract__SWIG_0(swigCPtr, Size.getCPtr(rhs)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private Size Multiply(Size rhs) - { - Size ret = new Size(NDalicPINVOKE.Vector3_Multiply__SWIG_0(swigCPtr, Size.getCPtr(rhs)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private Size Multiply(float rhs) - { - Size ret = new Size(NDalicPINVOKE.Vector3_Multiply__SWIG_1(swigCPtr, rhs), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private Size Divide(Size rhs) - { - Size ret = new Size(NDalicPINVOKE.Vector3_Divide__SWIG_0(swigCPtr, Size.getCPtr(rhs)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private Size Divide(float rhs) - { - Size ret = new Size(NDalicPINVOKE.Vector3_Divide__SWIG_1(swigCPtr, rhs), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private Size Subtract() - { - Size ret = new Size(NDalicPINVOKE.Vector3_Subtract__SWIG_1(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private float ValueOfIndex(uint index) - { - float ret = NDalicPINVOKE.Vector3_ValueOfIndex__SWIG_0(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Check equality.
- /// Utilizes appropriate machine epsilon values.
- ///
- /// The Size to test against - /// True if the Sizes are equal - public bool EqualTo(Size rhs) - { - bool ret = NDalicPINVOKE.Vector3_EqualTo(swigCPtr, Size.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Check inequality.
- /// Utilizes appropriate machine epsilon values.
- ///
- /// The Size to test against - /// True if the Sizes are not equal - public bool NotEqualTo(Size rhs) - { - bool ret = NDalicPINVOKE.Vector3_NotEqualTo(swigCPtr, Size.getCPtr(rhs)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Width property for width component of Siz - /// - public float Width - { - set - { - NDalicPINVOKE.Vector3_Width_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - float ret = NDalicPINVOKE.Vector3_Width_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - /// - /// Height property for height component of Size - /// - public float Height - { - set - { - NDalicPINVOKE.Vector3_Height_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - float ret = NDalicPINVOKE.Vector3_Height_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - /// - /// Depth property for depth component of Size - /// - public float Depth - { - set - { - NDalicPINVOKE.Vector3_Depth_set(swigCPtr, value); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - get - { - float ret = NDalicPINVOKE.Vector3_Depth_get(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - } - - /// - /// Type cast operator, Size to Vector3. - /// - /// Object of Size type - public static implicit operator Vector3(Size size) - { - return new Vector3(size.Width, size.Height, size.Depth); - } - - /// - /// Type cast operator, Vector3 to Size type. - /// - /// Object of Vector3 type - public static implicit operator Size(Vector3 vec) - { - return new Size(vec.Width, vec.Height, vec.Depth); - } - - } - -} - diff --git a/src/Tizen.NUI/src/internal/Slider.cs b/src/Tizen.NUI/src/internal/Slider.cs index 6f4e9303e..5ab615791 100755 --- a/src/Tizen.NUI/src/internal/Slider.cs +++ b/src/Tizen.NUI/src/internal/Slider.cs @@ -34,7 +34,7 @@ namespace Tizen.NUI.UIComponents /// /// Slider is a control to enable sliding an indicator between two values. /// - public class Slider : View + internal class Slider : View { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/SlotObserver.cs b/src/Tizen.NUI/src/internal/SlotObserver.cs index a5fdab199..a75a4ea44 100755 --- a/src/Tizen.NUI/src/internal/SlotObserver.cs +++ b/src/Tizen.NUI/src/internal/SlotObserver.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class SlotObserver : global::System.IDisposable + internal class SlotObserver : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/internal/TapGestureDetector.cs b/src/Tizen.NUI/src/internal/TapGestureDetector.cs index 0390e459f..ded1004dc 100755 --- a/src/Tizen.NUI/src/internal/TapGestureDetector.cs +++ b/src/Tizen.NUI/src/internal/TapGestureDetector.cs @@ -31,7 +31,7 @@ namespace Tizen.NUI using System.Runtime.InteropServices; using Tizen.NUI.BaseComponents; - public class TapGestureDetector : GestureDetector + internal class TapGestureDetector : GestureDetector { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/ToggleButton.cs b/src/Tizen.NUI/src/internal/ToggleButton.cs deleted file mode 100755 index 034f03e13..000000000 --- a/src/Tizen.NUI/src/internal/ToggleButton.cs +++ /dev/null @@ -1,246 +0,0 @@ -/** 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. -//------------------------------------------------------------------------------ - -using Tizen.NUI.BaseComponents; - -namespace Tizen.NUI -{ - - public class ToggleButton : Tizen.NUI.UIComponents.Button - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal ToggleButton(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ToggleButton_SWIGUpcast(cPtr), cMemoryOwn) - { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ToggleButton obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - 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. - - //Unreference this from if a static instance refer to this. - ViewRegistry.UnregisterView(this); - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_ToggleButton(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - base.Dispose(type); - } - - public class Property : global::System.IDisposable - { - 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_ToggleButton_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - public Property() : this(NDalicPINVOKE.new_ToggleButton_Property(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int STATE_VISUALS = NDalicPINVOKE.ToggleButton_Property_STATE_VISUALS_get(); - public static readonly int TOOLTIPS = NDalicPINVOKE.ToggleButton_Property_TOOLTIPS_get(); - public static readonly int CURRENT_STATE_INDEX = NDalicPINVOKE.ToggleButton_Property_CURRENT_STATE_INDEX_get(); - - } - - public ToggleButton() : this(NDalicPINVOKE.ToggleButton_New(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public ToggleButton(ToggleButton toggleButton) : this(NDalicPINVOKE.new_ToggleButton__SWIG_1(ToggleButton.getCPtr(toggleButton)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ToggleButton Assign(ToggleButton toggleButton) - { - ToggleButton ret = new ToggleButton(NDalicPINVOKE.ToggleButton_Assign(swigCPtr, ToggleButton.getCPtr(toggleButton)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public new static ToggleButton DownCast(BaseHandle handle) - { - ToggleButton ret = new ToggleButton(NDalicPINVOKE.ToggleButton_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public enum PropertyRange - { - PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, - PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000 - } - - public Tizen.NUI.PropertyArray StateVisuals - { - get - { - Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray(); - GetProperty(ToggleButton.Property.STATE_VISUALS).Get(temp); - return temp; - } - set - { - SetProperty(ToggleButton.Property.STATE_VISUALS, new Tizen.NUI.PropertyValue(value)); - } - } - public Tizen.NUI.PropertyArray Tooltips - { - get - { - Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray(); - GetProperty(ToggleButton.Property.TOOLTIPS).Get(temp); - return temp; - } - set - { - SetProperty(ToggleButton.Property.TOOLTIPS, new Tizen.NUI.PropertyValue(value)); - } - } - public int CurrentStateIndex - { - get - { - int temp = 0; - GetProperty(ToggleButton.Property.CURRENT_STATE_INDEX).Get(ref temp); - return temp; - } - set - { - SetProperty(ToggleButton.Property.CURRENT_STATE_INDEX, new Tizen.NUI.PropertyValue(value)); - } - } - - } - -} diff --git a/src/Tizen.NUI/src/internal/TransitionData.cs b/src/Tizen.NUI/src/internal/TransitionData.cs deleted file mode 100755 index 6de51d70d..000000000 --- a/src/Tizen.NUI/src/internal/TransitionData.cs +++ /dev/null @@ -1,126 +0,0 @@ -/** 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. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI -{ - - public class TransitionData : BaseHandle - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal TransitionData(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TransitionData_SWIGUpcast(cPtr), cMemoryOwn) - { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TransitionData obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - 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_TransitionData(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - base.Dispose(type); - } - - public TransitionData(PropertyMap transition) : this(NDalicPINVOKE.TransitionData_New__SWIG_0(PropertyMap.getCPtr(transition)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public TransitionData(PropertyArray transition) : this(NDalicPINVOKE.TransitionData_New__SWIG_1(PropertyArray.getCPtr(transition)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public static TransitionData DownCast(BaseHandle handle) - { - TransitionData ret = new TransitionData(NDalicPINVOKE.TransitionData_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public TransitionData(TransitionData handle) : this(NDalicPINVOKE.new_TransitionData__SWIG_1(TransitionData.getCPtr(handle)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public TransitionData Assign(TransitionData handle) - { - TransitionData ret = new TransitionData(NDalicPINVOKE.TransitionData_Assign(swigCPtr, TransitionData.getCPtr(handle)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint Count() - { - uint ret = NDalicPINVOKE.TransitionData_Count(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public PropertyMap GetAnimatorAt(uint index) - { - PropertyMap ret = new PropertyMap(NDalicPINVOKE.TransitionData_GetAnimatorAt(swigCPtr, index), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal TransitionData(SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData impl) : this(NDalicPINVOKE.new_TransitionData__SWIG_2(SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData.getCPtr(impl)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - } - -} diff --git a/src/Tizen.NUI/src/internal/TypeInfo.cs b/src/Tizen.NUI/src/internal/TypeInfo.cs index 44196e92d..2107cd30e 100755 --- a/src/Tizen.NUI/src/internal/TypeInfo.cs +++ b/src/Tizen.NUI/src/internal/TypeInfo.cs @@ -131,12 +131,6 @@ namespace Tizen.NUI return ret; } - internal void GetPropertyIndices(VectorInteger indices) - { - NDalicPINVOKE.TypeInfo_GetPropertyIndices(swigCPtr, VectorInteger.getCPtr(indices)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - public string GetPropertyName(int index) { string ret = NDalicPINVOKE.TypeInfo_GetPropertyName(swigCPtr, index); diff --git a/src/Tizen.NUI/src/internal/VectorFloat.cs b/src/Tizen.NUI/src/internal/VectorFloat.cs deleted file mode 100755 index 1b35b380a..000000000 --- a/src/Tizen.NUI/src/internal/VectorFloat.cs +++ /dev/null @@ -1,216 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// 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. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI -{ - - internal class VectorFloat : global::System.IDisposable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal VectorFloat(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(VectorFloat 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; - - - ~VectorFloat() - { - 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_VectorFloat(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - public VectorFloat() : this(NDalicPINVOKE.new_VectorFloat__SWIG_0(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public VectorFloat(VectorFloat vector) : this(NDalicPINVOKE.new_VectorFloat__SWIG_1(VectorFloat.getCPtr(vector)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public VectorFloat Assign(VectorFloat vector) - { - VectorFloat ret = new VectorFloat(NDalicPINVOKE.VectorFloat_Assign(swigCPtr, VectorFloat.getCPtr(vector)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_float Begin() - { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorFloat_Begin(swigCPtr); - SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_float End() - { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorFloat_End(swigCPtr); - SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_float ValueOfIndex(uint index) - { - SWIGTYPE_p_float ret = new SWIGTYPE_p_float(NDalicPINVOKE.VectorFloat_ValueOfIndex__SWIG_0(swigCPtr, index), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void PushBack(float element) - { - NDalicPINVOKE.VectorFloat_PushBack(swigCPtr, element); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Insert(SWIGTYPE_p_float at, float element) - { - NDalicPINVOKE.VectorFloat_Insert__SWIG_0(swigCPtr, SWIGTYPE_p_float.getCPtr(at), element); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Insert(SWIGTYPE_p_float at, SWIGTYPE_p_float from, SWIGTYPE_p_float to) - { - NDalicPINVOKE.VectorFloat_Insert__SWIG_1(swigCPtr, SWIGTYPE_p_float.getCPtr(at), SWIGTYPE_p_float.getCPtr(from), SWIGTYPE_p_float.getCPtr(to)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reserve(uint count) - { - NDalicPINVOKE.VectorFloat_Reserve(swigCPtr, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Resize(uint count) - { - NDalicPINVOKE.VectorFloat_Resize__SWIG_0(swigCPtr, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Resize(uint count, float item) - { - NDalicPINVOKE.VectorFloat_Resize__SWIG_1(swigCPtr, count, item); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public SWIGTYPE_p_float Erase(SWIGTYPE_p_float iterator) - { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorFloat_Erase__SWIG_0(swigCPtr, SWIGTYPE_p_float.getCPtr(iterator)); - SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_float Erase(SWIGTYPE_p_float first, SWIGTYPE_p_float last) - { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorFloat_Erase__SWIG_1(swigCPtr, SWIGTYPE_p_float.getCPtr(first), SWIGTYPE_p_float.getCPtr(last)); - SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Remove(SWIGTYPE_p_float iterator) - { - NDalicPINVOKE.VectorFloat_Remove(swigCPtr, SWIGTYPE_p_float.getCPtr(iterator)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Swap(VectorFloat vector) - { - NDalicPINVOKE.VectorFloat_Swap(swigCPtr, VectorFloat.getCPtr(vector)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Clear() - { - NDalicPINVOKE.VectorFloat_Clear(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Release() - { - NDalicPINVOKE.VectorFloat_Release(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int BaseType = NDalicPINVOKE.VectorFloat_BaseType_get(); - - } - -} diff --git a/src/Tizen.NUI/src/internal/VectorInteger.cs b/src/Tizen.NUI/src/internal/VectorInteger.cs deleted file mode 100755 index de342c0c7..000000000 --- a/src/Tizen.NUI/src/internal/VectorInteger.cs +++ /dev/null @@ -1,218 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// 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. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI -{ - - internal class VectorInteger : global::System.IDisposable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal VectorInteger(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(VectorInteger 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; - - - ~VectorInteger() - { - 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_VectorInteger(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - - - public VectorInteger() : this(NDalicPINVOKE.new_VectorInteger__SWIG_0(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public VectorInteger(VectorInteger vector) : this(NDalicPINVOKE.new_VectorInteger__SWIG_1(VectorInteger.getCPtr(vector)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public VectorInteger Assign(VectorInteger vector) - { - VectorInteger ret = new VectorInteger(NDalicPINVOKE.VectorInteger_Assign(swigCPtr, VectorInteger.getCPtr(vector)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_int Begin() - { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorInteger_Begin(swigCPtr); - SWIGTYPE_p_int ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_int(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_int End() - { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorInteger_End(swigCPtr); - SWIGTYPE_p_int ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_int(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_int ValueOfIndex(uint index) - { - SWIGTYPE_p_int ret = new SWIGTYPE_p_int(NDalicPINVOKE.VectorInteger_ValueOfIndex__SWIG_0(swigCPtr, index), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void PushBack(int element) - { - NDalicPINVOKE.VectorInteger_PushBack(swigCPtr, element); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Insert(SWIGTYPE_p_int at, int element) - { - NDalicPINVOKE.VectorInteger_Insert__SWIG_0(swigCPtr, SWIGTYPE_p_int.getCPtr(at), element); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Insert(SWIGTYPE_p_int at, SWIGTYPE_p_int from, SWIGTYPE_p_int to) - { - NDalicPINVOKE.VectorInteger_Insert__SWIG_1(swigCPtr, SWIGTYPE_p_int.getCPtr(at), SWIGTYPE_p_int.getCPtr(from), SWIGTYPE_p_int.getCPtr(to)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reserve(uint count) - { - NDalicPINVOKE.VectorInteger_Reserve(swigCPtr, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Resize(uint count) - { - NDalicPINVOKE.VectorInteger_Resize__SWIG_0(swigCPtr, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Resize(uint count, int item) - { - NDalicPINVOKE.VectorInteger_Resize__SWIG_1(swigCPtr, count, item); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public SWIGTYPE_p_int Erase(SWIGTYPE_p_int iterator) - { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorInteger_Erase__SWIG_0(swigCPtr, SWIGTYPE_p_int.getCPtr(iterator)); - SWIGTYPE_p_int ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_int(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public SWIGTYPE_p_int Erase(SWIGTYPE_p_int first, SWIGTYPE_p_int last) - { - global::System.IntPtr cPtr = NDalicPINVOKE.VectorInteger_Erase__SWIG_1(swigCPtr, SWIGTYPE_p_int.getCPtr(first), SWIGTYPE_p_int.getCPtr(last)); - SWIGTYPE_p_int ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_int(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Remove(SWIGTYPE_p_int iterator) - { - NDalicPINVOKE.VectorInteger_Remove(swigCPtr, SWIGTYPE_p_int.getCPtr(iterator)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Swap(VectorInteger vector) - { - NDalicPINVOKE.VectorInteger_Swap(swigCPtr, VectorInteger.getCPtr(vector)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Clear() - { - NDalicPINVOKE.VectorInteger_Clear(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Release() - { - NDalicPINVOKE.VectorInteger_Release(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int BaseType = NDalicPINVOKE.VectorInteger_BaseType_get(); - - } - -} diff --git a/src/Tizen.NUI/src/internal/ViewContainer.cs b/src/Tizen.NUI/src/internal/ViewContainer.cs deleted file mode 100755 index 8f1e23bfe..000000000 --- a/src/Tizen.NUI/src/internal/ViewContainer.cs +++ /dev/null @@ -1,422 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 3.0.10 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI -{ - using Tizen.NUI.BaseComponents; - - public class ViewContainer : global::System.IDisposable, global::System.Collections.IEnumerable - , global::System.Collections.Generic.IEnumerable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal ViewContainer(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(ViewContainer 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; - - - ~ViewContainer() - { - 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_ActorContainer(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - - - public ViewContainer(global::System.Collections.ICollection c) : this() - { - if (c == null) - throw new global::System.ArgumentNullException("c"); - foreach (View element in c) - { - this.Add(element); - } - } - - public bool IsFixedSize - { - get - { - return false; - } - } - - public bool IsReadOnly - { - get - { - return false; - } - } - - public View this[int index] - { - get - { - return getitem(index); - } - set - { - setitem(index, value); - } - } - - public int Capacity - { - get - { - return (int)capacity(); - } - set - { - if (value < size()) - throw new global::System.ArgumentOutOfRangeException("Capacity"); - reserve((uint)value); - } - } - - public int Count - { - get - { - return (int)size(); - } - } - - public bool IsSynchronized - { - get - { - return false; - } - } - - public void CopyTo(View[] array) - { - CopyTo(0, array, 0, this.Count); - } - - public void CopyTo(View[] array, int arrayIndex) - { - CopyTo(0, array, arrayIndex, this.Count); - } - - public void CopyTo(int index, View[] array, int arrayIndex, int count) - { - if (array == null) - throw new global::System.ArgumentNullException("array"); - if (index < 0) - throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero"); - if (arrayIndex < 0) - throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero"); - if (count < 0) - throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero"); - if (array.Rank > 1) - throw new global::System.ArgumentException("Multi dimensional array.", "array"); - if (index + count > this.Count || arrayIndex + count > array.Length) - throw new global::System.ArgumentException("Number of elements to copy is too large."); - for (int i = 0; i < count; i++) - array.SetValue(getitemcopy(index + i), arrayIndex + i); - } - - global::System.Collections.Generic.IEnumerator global::System.Collections.Generic.IEnumerable.GetEnumerator() - { - return new ViewContainerEnumerator(this); - } - - global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() - { - return new ViewContainerEnumerator(this); - } - - public ViewContainerEnumerator GetEnumerator() - { - return new ViewContainerEnumerator(this); - } - - // Type-safe enumerator - /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown - /// whenever the collection is modified. This has been done for changes in the size of the - /// collection but not when one of the elements of the collection is modified as it is a bit - /// tricky to detect unmanaged code that modifies the collection under our feet. - public sealed class ViewContainerEnumerator : global::System.Collections.IEnumerator - , global::System.Collections.Generic.IEnumerator - { - private ViewContainer collectionRef; - private int currentIndex; - private object currentObject; - private int currentSize; - - public ViewContainerEnumerator(ViewContainer collection) - { - collectionRef = collection; - currentIndex = -1; - currentObject = null; - currentSize = collectionRef.Count; - } - - // Type-safe iterator Current - public View Current - { - get - { - if (currentIndex == -1) - throw new global::System.InvalidOperationException("Enumeration not started."); - if (currentIndex > currentSize - 1) - throw new global::System.InvalidOperationException("Enumeration finished."); - if (currentObject == null) - throw new global::System.InvalidOperationException("Collection modified."); - return (View)currentObject; - } - } - - // Type-unsafe IEnumerator.Current - object global::System.Collections.IEnumerator.Current - { - get - { - return Current; - } - } - - public bool MoveNext() - { - int size = collectionRef.Count; - bool moveOkay = (currentIndex + 1 < size) && (size == currentSize); - if (moveOkay) - { - currentIndex++; - currentObject = collectionRef[currentIndex]; - } - else - { - currentObject = null; - } - return moveOkay; - } - - public void Reset() - { - currentIndex = -1; - currentObject = null; - if (collectionRef.Count != currentSize) - { - throw new global::System.InvalidOperationException("Collection modified."); - } - } - - public void Dispose() - { - currentIndex = -1; - currentObject = null; - } - } - - public void Clear() - { - NDalicPINVOKE.ActorContainer_Clear(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Add(View x) - { - NDalicPINVOKE.ActorContainer_Add(swigCPtr, View.getCPtr(x)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - private uint size() - { - uint ret = NDalicPINVOKE.ActorContainer_size(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private uint capacity() - { - uint ret = NDalicPINVOKE.ActorContainer_capacity(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void reserve(uint n) - { - NDalicPINVOKE.ActorContainer_reserve(swigCPtr, n); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ViewContainer() : this(NDalicPINVOKE.new_ActorContainer__SWIG_0(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ViewContainer(ViewContainer other) : this(NDalicPINVOKE.new_ActorContainer__SWIG_1(ViewContainer.getCPtr(other)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ViewContainer(int capacity) : this(NDalicPINVOKE.new_ActorContainer__SWIG_2(capacity), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - private View getitemcopy(int index) - { - View ret = new View(NDalicPINVOKE.ActorContainer_getitemcopy(swigCPtr, index), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private View getitem(int index) - { - View ret = new View(NDalicPINVOKE.ActorContainer_getitem(swigCPtr, index), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void setitem(int index, View val) - { - NDalicPINVOKE.ActorContainer_setitem(swigCPtr, index, View.getCPtr(val)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void AddRange(ViewContainer values) - { - NDalicPINVOKE.ActorContainer_AddRange(swigCPtr, ViewContainer.getCPtr(values)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ViewContainer GetRange(int index, int count) - { - global::System.IntPtr cPtr = NDalicPINVOKE.ActorContainer_GetRange(swigCPtr, index, count); - ViewContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new ViewContainer(cPtr, true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Insert(int index, View x) - { - NDalicPINVOKE.ActorContainer_Insert(swigCPtr, index, View.getCPtr(x)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void InsertRange(int index, ViewContainer values) - { - NDalicPINVOKE.ActorContainer_InsertRange(swigCPtr, index, ViewContainer.getCPtr(values)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveAt(int index) - { - NDalicPINVOKE.ActorContainer_RemoveAt(swigCPtr, index); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void RemoveRange(int index, int count) - { - NDalicPINVOKE.ActorContainer_RemoveRange(swigCPtr, index, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static ViewContainer Repeat(View value, int count) - { - global::System.IntPtr cPtr = NDalicPINVOKE.ActorContainer_Repeat(View.getCPtr(value), count); - ViewContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new ViewContainer(cPtr, true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reverse() - { - NDalicPINVOKE.ActorContainer_Reverse__SWIG_0(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void Reverse(int index, int count) - { - NDalicPINVOKE.ActorContainer_Reverse__SWIG_1(swigCPtr, index, count); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public void SetRange(int index, ViewContainer values) - { - NDalicPINVOKE.ActorContainer_SetRange(swigCPtr, index, ViewContainer.getCPtr(values)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - } - -} diff --git a/src/Tizen.NUI/src/internal/ViewImpl.cs b/src/Tizen.NUI/src/internal/ViewImpl.cs index 1cb651bc4..203704926 100755 --- a/src/Tizen.NUI/src/internal/ViewImpl.cs +++ b/src/Tizen.NUI/src/internal/ViewImpl.cs @@ -17,7 +17,7 @@ using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - public class ViewImpl : CustomActorImpl + internal class ViewImpl : CustomActorImpl { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/src/Tizen.NUI/src/internal/ViewResourceReadySignal.cs b/src/Tizen.NUI/src/internal/ViewResourceReadySignal.cs index ae5615e86..2021250d3 100755 --- a/src/Tizen.NUI/src/internal/ViewResourceReadySignal.cs +++ b/src/Tizen.NUI/src/internal/ViewResourceReadySignal.cs @@ -12,7 +12,7 @@ using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - public class ViewResourceReadySignal : global::System.IDisposable + internal class ViewResourceReadySignal : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/internal/ViewSignal.cs b/src/Tizen.NUI/src/internal/ViewSignal.cs index 5650c9f2b..05f5033b9 100755 --- a/src/Tizen.NUI/src/internal/ViewSignal.cs +++ b/src/Tizen.NUI/src/internal/ViewSignal.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { using Tizen.NUI.BaseComponents; - public class ViewSignal : global::System.IDisposable + internal class ViewSignal : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/internal/ViewVisibilityChangedSignal.cs b/src/Tizen.NUI/src/internal/ViewVisibilityChangedSignal.cs index 4c60fc998..7cb00da38 100755 --- a/src/Tizen.NUI/src/internal/ViewVisibilityChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/ViewVisibilityChangedSignal.cs @@ -11,7 +11,7 @@ using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - public class ViewVisibilityChangedSignal : global::System.IDisposable + internal class ViewVisibilityChangedSignal : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/internal/ViewWrapper.cs b/src/Tizen.NUI/src/internal/ViewWrapper.cs index a78da9b7d..8293e8764 100755 --- a/src/Tizen.NUI/src/internal/ViewWrapper.cs +++ b/src/Tizen.NUI/src/internal/ViewWrapper.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * 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. @@ -22,7 +22,7 @@ namespace Tizen.NUI public class ViewWrapper : View { private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected ViewWrapperImpl viewWrapperImpl; + internal ViewWrapperImpl viewWrapperImpl; internal ViewWrapper(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.ViewWrapper_SWIGUpcast(cPtr), cMemoryOwn) { @@ -72,7 +72,7 @@ namespace Tizen.NUI } - public ViewWrapper(string typeName, ViewWrapperImpl implementation) : this(NDalicManualPINVOKE.ViewWrapper_New(typeName, ViewWrapperImpl.getCPtr(implementation)), true) + internal ViewWrapper(string typeName, ViewWrapperImpl implementation) : this(NDalicManualPINVOKE.ViewWrapper_New(typeName, ViewWrapperImpl.getCPtr(implementation)), true) { viewWrapperImpl = implementation; if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); diff --git a/src/Tizen.NUI/src/internal/ViewWrapperImpl.cs b/src/Tizen.NUI/src/internal/ViewWrapperImpl.cs index 61ea3ca87..14ce6ec47 100755 --- a/src/Tizen.NUI/src/internal/ViewWrapperImpl.cs +++ b/src/Tizen.NUI/src/internal/ViewWrapperImpl.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * 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. @@ -17,7 +17,7 @@ using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - public sealed class ViewWrapperImpl : ViewImpl + internal sealed class ViewWrapperImpl : ViewImpl { private global::System.Runtime.InteropServices.HandleRef swigCPtr; public delegate void OnStageConnectionDelegate(int depth); diff --git a/src/Tizen.NUI/src/internal/VisibilityChangeType.cs b/src/Tizen.NUI/src/internal/VisibilityChangeType.cs deleted file mode 100755 index 6b0b0fc9b..000000000 --- a/src/Tizen.NUI/src/internal/VisibilityChangeType.cs +++ /dev/null @@ -1,20 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 3.0.12 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI -{ - - public enum VisibilityChangeType - { - SELF, - PARENT - } - -} diff --git a/src/Tizen.NUI/src/internal/VoidSignal.cs b/src/Tizen.NUI/src/internal/VoidSignal.cs index d813a251a..6cf2c0c88 100755 --- a/src/Tizen.NUI/src/internal/VoidSignal.cs +++ b/src/Tizen.NUI/src/internal/VoidSignal.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class VoidSignal : global::System.IDisposable + internal class VoidSignal : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/internal/WindowFocusSignalType.cs b/src/Tizen.NUI/src/internal/WindowFocusSignalType.cs index 6f1560df3..5190fa059 100755 --- a/src/Tizen.NUI/src/internal/WindowFocusSignalType.cs +++ b/src/Tizen.NUI/src/internal/WindowFocusSignalType.cs @@ -11,7 +11,7 @@ namespace Tizen.NUI { - public class WindowFocusSignalType : global::System.IDisposable + internal class WindowFocusSignalType : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/public/Animatable.cs b/src/Tizen.NUI/src/public/Animatable.cs new file mode 100755 index 000000000..d02e57da3 --- /dev/null +++ b/src/Tizen.NUI/src/public/Animatable.cs @@ -0,0 +1,203 @@ +/** 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 +{ + + public class Animatable : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal Animatable(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Handle_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Animatable obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + 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_Handle(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + + public Animatable() : this(NDalicPINVOKE.Handle_New(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public Animatable(Animatable handle) : this(NDalicPINVOKE.new_Handle__SWIG_1(Animatable.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool Supports(Animatable.Capability capability) + { + bool ret = NDalicPINVOKE.Handle_Supports(swigCPtr, (int)capability); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetPropertyCount() + { + uint ret = NDalicPINVOKE.Handle_GetPropertyCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string GetPropertyName(int index) + { + string ret = NDalicPINVOKE.Handle_GetPropertyName(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public int GetPropertyIndex(string name) + { + int ret = NDalicPINVOKE.Handle_GetPropertyIndex(swigCPtr, name); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool IsPropertyWritable(int index) + { + bool ret = NDalicPINVOKE.Handle_IsPropertyWritable(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool IsPropertyAnimatable(int index) + { + bool ret = NDalicPINVOKE.Handle_IsPropertyAnimatable(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool IsPropertyAConstraintInput(int index) + { + bool ret = NDalicPINVOKE.Handle_IsPropertyAConstraintInput(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public PropertyType GetPropertyType(int index) + { + PropertyType ret = (PropertyType)NDalicPINVOKE.Handle_GetPropertyType(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetProperty(int index, PropertyValue propertyValue) + { + Tizen.NUI.Object.SetProperty(swigCPtr, index, propertyValue); + } + + public int RegisterProperty(string name, PropertyValue propertyValue) + { + int ret = NDalicPINVOKE.Handle_RegisterProperty__SWIG_0(swigCPtr, name, PropertyValue.getCPtr(propertyValue)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public int RegisterProperty(string name, PropertyValue propertyValue, PropertyAccessMode accessMode) + { + int ret = NDalicPINVOKE.Handle_RegisterProperty__SWIG_1(swigCPtr, name, PropertyValue.getCPtr(propertyValue), (int)accessMode); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public PropertyValue GetProperty(int index) + { + PropertyValue ret = Tizen.NUI.Object.GetProperty(swigCPtr, index); + return ret; + } + + internal PropertyNotification AddPropertyNotification(int index, PropertyCondition condition) + { + PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.Handle_AddPropertyNotification__SWIG_0(swigCPtr, index, PropertyCondition.getCPtr(condition)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal PropertyNotification AddPropertyNotification(int index, int componentIndex, PropertyCondition condition) + { + PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.Handle_AddPropertyNotification__SWIG_1(swigCPtr, index, componentIndex, PropertyCondition.getCPtr(condition)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal void RemovePropertyNotification(PropertyNotification propertyNotification) + { + NDalicPINVOKE.Handle_RemovePropertyNotification(swigCPtr, PropertyNotification.getCPtr(propertyNotification)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemovePropertyNotifications() + { + NDalicPINVOKE.Handle_RemovePropertyNotifications(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveConstraints() + { + NDalicPINVOKE.Handle_RemoveConstraints__SWIG_0(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveConstraints(uint tag) + { + NDalicPINVOKE.Handle_RemoveConstraints__SWIG_1(swigCPtr, tag); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public enum Capability + { + DYNAMIC_PROPERTIES = 0x01 + } + + } + +} diff --git a/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs index 082a9f5d8..9ea3d8fdc 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs @@ -2293,14 +2293,6 @@ namespace Tizen.NUI.BaseComponents throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - internal PositionInheritanceMode GetPositionInheritanceMode() - { - PositionInheritanceMode ret = (PositionInheritanceMode)NDalicPINVOKE.Actor_GetPositionInheritanceMode(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) - throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - internal bool IsPositionInherited() { bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr); diff --git a/src/Tizen.NUI/src/public/BaseComponents/VisibilityChangeType.cs b/src/Tizen.NUI/src/public/BaseComponents/VisibilityChangeType.cs new file mode 100755 index 000000000..6b0b0fc9b --- /dev/null +++ b/src/Tizen.NUI/src/public/BaseComponents/VisibilityChangeType.cs @@ -0,0 +1,20 @@ +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 3.0.12 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +namespace Tizen.NUI +{ + + public enum VisibilityChangeType + { + SELF, + PARENT + } + +} diff --git a/src/Tizen.NUI/src/public/BaseHandle.cs b/src/Tizen.NUI/src/public/BaseHandle.cs new file mode 100755 index 000000000..75afbf162 --- /dev/null +++ b/src/Tizen.NUI/src/public/BaseHandle.cs @@ -0,0 +1,314 @@ +//------------------------------------------------------------------------------ +// +// +// 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. +//------------------------------------------------------------------------------ + +namespace Tizen.NUI +{ + + public class BaseHandle : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal BaseHandle(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(BaseHandle 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; + + ~BaseHandle() + { + 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_BaseHandle(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + + + // Returns the bool value true to indicate that an operand is true and returns false otherwise. + public static bool operator true(BaseHandle handle) + { + // if the C# object is null, return false + if (BaseHandle.ReferenceEquals(handle, null)) + { + return false; + } + // returns true if the handle has a body, false otherwise + return handle.HasBody(); + } + + // Returns the bool false to indicate that an operand is false and returns true otherwise. + public static bool operator false(BaseHandle handle) + { + // if the C# object is null, return true + if (BaseHandle.ReferenceEquals(handle, null)) + { + return true; + } + return !handle.HasBody(); + } + + // Explicit conversion from Handle to bool. + public static explicit operator bool(BaseHandle handle) + { + // if the C# object is null, return false + if (BaseHandle.ReferenceEquals(handle, null)) + { + return false; + } + // returns true if the handle has a body, false otherwise + return handle.HasBody(); + } + + // Equality operator + public static bool operator ==(BaseHandle x, BaseHandle y) + { + // if the C# objects are the same return true + if (BaseHandle.ReferenceEquals(x, y)) + { + return true; + } + if (!BaseHandle.ReferenceEquals(x, null) && !BaseHandle.ReferenceEquals(y, null)) + { + // drop into native code to see if both handles point to the same body + return x.IsEqual(y); + } + + if (BaseHandle.ReferenceEquals(x, null) && !BaseHandle.ReferenceEquals(y, null)) + { + if (y.HasBody()) return false; + else return true; + } + if (!BaseHandle.ReferenceEquals(x, null) && BaseHandle.ReferenceEquals(y, null)) + { + if (x.HasBody()) return false; + else return true; + } + + return false; + } + + // Inequality operator. Returns Null if either operand is Null + public static bool operator !=(BaseHandle x, BaseHandle y) + { + return !(x == y); + } + + // Logical AND operator for && + // It's possible when doing a && this function (opBitwiseAnd) is never called due + // to short circuiting. E.g. + // If you perform x && y What actually is called is + // BaseHandle.op_False( x ) ? BaseHandle.op_True( x ) : BaseHandle.opTrue( BaseHandle.opBitwiseAnd(x,y) ) + // + public static BaseHandle operator &(BaseHandle x, BaseHandle y) + { + if (x == y) + { + return x; + } + return null; + } + + // Logical OR operator for || + // It's possible when doing a || this function (opBitwiseOr) is never called due + // to short circuiting. E.g. + // If you perform x || y What actually is called is + // BaseHandle.op_True( x ) ? BaseHandle.op_True( x ) : BaseHandle.opTrue( BaseHandle.opBitwiseOr(x,y) ) + public static BaseHandle operator |(BaseHandle x, BaseHandle y) + { + if (!BaseHandle.ReferenceEquals(x, null) || !BaseHandle.ReferenceEquals(y, null)) + { + if (x.HasBody()) + { + return x; + } + if (y.HasBody()) + { + return y; + } + return null; + } + return null; + } + + // Logical ! operator + public static bool operator !(BaseHandle x) + { + // if the C# object is null, return true + if (BaseHandle.ReferenceEquals(x, null)) + { + return true; + } + if (x.HasBody()) + { + return false; + } + return true; + } + + + internal BaseHandle(BaseObject handle) : this(NDalicPINVOKE.new_BaseHandle__SWIG_0(BaseObject.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public BaseHandle() : this(NDalicPINVOKE.new_BaseHandle__SWIG_1(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public BaseHandle(BaseHandle handle) : this(NDalicPINVOKE.new_BaseHandle__SWIG_2(BaseHandle.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public BaseHandle Assign(BaseHandle rhs) + { + BaseHandle ret = new BaseHandle(NDalicPINVOKE.BaseHandle_Assign(swigCPtr, BaseHandle.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool DoAction(string actionName, PropertyMap attributes) + { + bool ret = NDalicPINVOKE.BaseHandle_DoAction(swigCPtr, actionName, PropertyMap.getCPtr(attributes)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public string GetTypeName() + { + string ret = NDalicPINVOKE.BaseHandle_GetTypeName(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool GetTypeInfo(TypeInfo info) + { + bool ret = NDalicPINVOKE.BaseHandle_GetTypeInfo(swigCPtr, TypeInfo.getCPtr(info)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal BaseObject GetBaseObject() + { + BaseObject ret = new BaseObject(NDalicPINVOKE.BaseHandle_GetBaseObject__SWIG_0(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Reset() + { + NDalicPINVOKE.BaseHandle_Reset(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool EqualTo(BaseHandle rhs) + { + bool ret = NDalicPINVOKE.BaseHandle_EqualTo(swigCPtr, BaseHandle.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool NotEqualTo(BaseHandle rhs) + { + bool ret = NDalicPINVOKE.BaseHandle_NotEqualTo(swigCPtr, BaseHandle.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal RefObject GetObjectPtr() + { + global::System.IntPtr cPtr = NDalicPINVOKE.BaseHandle_GetObjectPtr(swigCPtr); + RefObject ret = (cPtr == global::System.IntPtr.Zero) ? null : new RefObject(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool HasBody() + { + bool ret = NDalicPINVOKE.BaseHandle_HasBody(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool IsEqual(BaseHandle rhs) + { + bool ret = NDalicPINVOKE.BaseHandle_IsEqual(swigCPtr, BaseHandle.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } + +} + diff --git a/src/Tizen.NUI/src/public/DirectionBias.cs b/src/Tizen.NUI/src/public/DirectionBias.cs new file mode 100755 index 000000000..da74cb219 --- /dev/null +++ b/src/Tizen.NUI/src/public/DirectionBias.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// +// 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. +//------------------------------------------------------------------------------ + +namespace Tizen.NUI +{ + + public enum DirectionBias + { + DirectionBiasLeft = -1, + DirectionBiasNone = 0, + DirectionBiasRight = 1 + } + +} diff --git a/src/Tizen.NUI/src/public/KeyInputFocusManager.cs b/src/Tizen.NUI/src/public/KeyInputFocusManager.cs new file mode 100755 index 000000000..03ee6cc8b --- /dev/null +++ b/src/Tizen.NUI/src/public/KeyInputFocusManager.cs @@ -0,0 +1,102 @@ +//------------------------------------------------------------------------------ +// +// +// 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. +//------------------------------------------------------------------------------ + +using Tizen.NUI.BaseComponents; + +namespace Tizen.NUI +{ + + public class KeyInputFocusManager : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal KeyInputFocusManager(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.KeyInputFocusManager_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyInputFocusManager obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + 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_KeyInputFocusManager(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + public KeyInputFocusManager() : this(NDalicPINVOKE.new_KeyInputFocusManager(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static KeyInputFocusManager Get() + { + KeyInputFocusManager ret = new KeyInputFocusManager(NDalicPINVOKE.KeyInputFocusManager_Get(), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetFocus(View control) + { + NDalicPINVOKE.KeyInputFocusManager_SetFocus(swigCPtr, View.getCPtr(control)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public View GetCurrentFocusControl() + { + View ret = new View(NDalicPINVOKE.KeyInputFocusManager_GetCurrentFocusControl(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void RemoveFocus(View control) + { + NDalicPINVOKE.KeyInputFocusManager_RemoveFocus(swigCPtr, View.getCPtr(control)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t KeyInputFocusChangedSignal() + { + SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t ret = new SWIGTYPE_p_Dali__SignalT_void_fDali__Toolkit__Control_Dali__Toolkit__ControlF_t(NDalicPINVOKE.KeyInputFocusManager_KeyInputFocusChangedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + +} diff --git a/src/Tizen.NUI/src/public/NUIConstants.cs b/src/Tizen.NUI/src/public/NUIConstants.cs index a2edc24da..b586387e1 100755 --- a/src/Tizen.NUI/src/public/NUIConstants.cs +++ b/src/Tizen.NUI/src/public/NUIConstants.cs @@ -15,6 +15,16 @@ using System.ComponentModel; namespace Tizen.NUI { + public enum ScrollModeType + { + XAxisScrollEnabled, + XAxisSnapToInterval, + XAxisScrollBoundary, + YAxisScrollEnabled, + YAxisSnapToInterval, + YAxisScrollBoundary + } + /// /// This specifies whether the Actor uses its own color, or inherits. /// diff --git a/src/Tizen.NUI/src/public/PaddingType.cs b/src/Tizen.NUI/src/public/PaddingType.cs new file mode 100755 index 000000000..86691f5b8 --- /dev/null +++ b/src/Tizen.NUI/src/public/PaddingType.cs @@ -0,0 +1,325 @@ +//------------------------------------------------------------------------------ +// +// +// 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. +//------------------------------------------------------------------------------ + +namespace Tizen.NUI +{ + + public class PaddingType : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal PaddingType(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(PaddingType 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; + + + ~PaddingType() + { + 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_PaddingType(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public static bool operator ==(PaddingType a, PaddingType 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 (System.Math.Abs(a.Left - b.Left) < NDalic.GetRangedEpsilon(a.Left, b.Left)) && + (System.Math.Abs(a.Right - b.Right) < NDalic.GetRangedEpsilon(a.Right, b.Right)) && + (System.Math.Abs(a.Bottom - b.Bottom) < NDalic.GetRangedEpsilon(a.Bottom, b.Bottom)) && + (System.Math.Abs(a.Top - b.Top) < NDalic.GetRangedEpsilon(a.Top, b.Top)); + } + + public static bool operator !=(PaddingType a, PaddingType b) + { + return !(a == b); + } + + ///< The Left value + public float Left + { + set + { + left = value; + } + get + { + return left; + } + } + + ///< The Right value + public float Right + { + set + { + right = value; + } + get + { + return right; + } + } + + ///< The Bottom value + public float Bottom + { + set + { + bottom = value; + } + get + { + return bottom; + } + } + + ///< The Top value + public float Top + { + set + { + top = value; + } + get + { + return top; + } + } + + + public PaddingType() : this(NDalicPINVOKE.new_PaddingType__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public PaddingType(float x, float y, float width, float height) : this(NDalicPINVOKE.new_PaddingType__SWIG_1(x, y, width, height), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public PaddingType(PaddingType rhs) : this(NDalicPINVOKE.new_PaddingType__SWIG_2(PaddingType.getCPtr(rhs)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public PaddingType Assign(PaddingType rhs) + { + PaddingType ret = new PaddingType(NDalicPINVOKE.PaddingType_Assign(swigCPtr, PaddingType.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Set(float newX, float newY, float newWidth, float newHeight) + { + NDalicPINVOKE.PaddingType_Set(swigCPtr, newX, newY, newWidth, newHeight); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + private float x + { + 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; + } + } + + private float left + { + set + { + NDalicPINVOKE.PaddingType_left_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.PaddingType_left_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + private float y + { + set + { + NDalicPINVOKE.PaddingType_y_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.PaddingType_y_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + private float right + { + set + { + NDalicPINVOKE.PaddingType_right_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.PaddingType_right_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + private float width + { + set + { + NDalicPINVOKE.PaddingType_width_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.PaddingType_width_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 + { + set + { + NDalicPINVOKE.PaddingType_height_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.PaddingType_height_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + private float top + { + set + { + NDalicPINVOKE.PaddingType_top_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.PaddingType_top_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + } + +} diff --git a/src/Tizen.NUI/src/public/ProgressBar.cs b/src/Tizen.NUI/src/public/ProgressBar.cs new file mode 100755 index 000000000..e284c0422 --- /dev/null +++ b/src/Tizen.NUI/src/public/ProgressBar.cs @@ -0,0 +1,499 @@ +/** 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. +//------------------------------------------------------------------------------ + +namespace Tizen.NUI.UIComponents +{ + + using System; + using System.Runtime.InteropServices; + using Tizen.NUI.BaseComponents; + + /// + /// ProgressBar is a control to give the user an indication of the progress of an operation. + /// + public class ProgressBar : View + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal ProgressBar(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ProgressBar_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(ProgressBar obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + /// + /// To make ProgressBar instance be disposed. + /// + 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. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ProgressBar(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + + /// + /// Event arguments that passed via ValueChangedEventArgs + /// + public class ValueChangedEventArgs : EventArgs + { + private ProgressBar _progressBar; + private float _progressValue; + private float _secondaryProgressValue; + + public ProgressBar ProgressBar + { + get + { + return _progressBar; + } + set + { + _progressBar = value; + } + } + + public float ProgressValue + { + get + { + return _progressValue; + } + set + { + _progressValue = value; + } + } + + public float SecondaryProgressValue + { + get + { + return _secondaryProgressValue; + } + set + { + _secondaryProgressValue = value; + } + } + + } + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void ValueChangedCallbackDelegate(IntPtr progressBar, float progressValue, float secondaryProgressValue); + private EventHandler _progressBarValueChangedEventHandler; + private ValueChangedCallbackDelegate _progressBarValueChangedCallbackDelegate; + + /// + /// Event is sent when the ProgressBar value changes. + /// + public event EventHandler ValueChanged + { + add + { + if (_progressBarValueChangedEventHandler == null) + { + _progressBarValueChangedCallbackDelegate = (OnValueChanged); + ValueChangedSignal().Connect(_progressBarValueChangedCallbackDelegate); + } + _progressBarValueChangedEventHandler += value; + } + remove + { + _progressBarValueChangedEventHandler -= value; + if (_progressBarValueChangedEventHandler == null && ValueChangedSignal().Empty() == false) + { + ValueChangedSignal().Disconnect(_progressBarValueChangedCallbackDelegate); + } + } + } + + // Callback for ProgressBar ValueChanged signal + private void OnValueChanged(IntPtr progressBar, float progressValue, float secondaryProgressValue) + { + ValueChangedEventArgs e = new ValueChangedEventArgs(); + + // Populate all members of "e" (ValueChangedEventArgs) with real page + e.ProgressBar = ProgressBar.GetProgressBarFromPtr(progressBar); + e.ProgressValue = progressValue; + e.SecondaryProgressValue = secondaryProgressValue; + + if (_progressBarValueChangedEventHandler != null) + { + _progressBarValueChangedEventHandler(this, e); + } + } + + /// + /// + internal static ProgressBar GetProgressBarFromPtr(global::System.IntPtr cPtr) + { + ProgressBar ret = new ProgressBar(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + + internal class Property : global::System.IDisposable + { + 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_ProgressBar_Property(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + internal Property() : this(NDalicPINVOKE.new_ProgressBar_Property(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal static readonly int PROGRESS_VALUE = NDalicPINVOKE.ProgressBar_Property_PROGRESS_VALUE_get(); + internal static readonly int SECONDARY_PROGRESS_VALUE = NDalicPINVOKE.ProgressBar_Property_SECONDARY_PROGRESS_VALUE_get(); + internal static readonly int INDETERMINATE = NDalicPINVOKE.ProgressBar_Property_INDETERMINATE_get(); + internal static readonly int TRACK_VISUAL = NDalicPINVOKE.ProgressBar_Property_TRACK_VISUAL_get(); + internal static readonly int PROGRESS_VISUAL = NDalicPINVOKE.ProgressBar_Property_PROGRESS_VISUAL_get(); + internal static readonly int SECONDARY_PROGRESS_VISUAL = NDalicPINVOKE.ProgressBar_Property_SECONDARY_PROGRESS_VISUAL_get(); + internal static readonly int INDETERMINATE_VISUAL = NDalicPINVOKE.ProgressBar_Property_INDETERMINATE_VISUAL_get(); + internal static readonly int INDETERMINATE_VISUAL_ANIMATION = NDalicPINVOKE.ProgressBar_Property_INDETERMINATE_VISUAL_ANIMATION_get(); + internal static readonly int LABEL_VISUAL = NDalicPINVOKE.ProgressBar_Property_LABEL_VISUAL_get(); + + } + + /// + /// Creates the ProgressBar. + /// + public ProgressBar() : this(NDalicPINVOKE.ProgressBar_New(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + internal ProgressBar(ProgressBar handle) : this(NDalicPINVOKE.new_ProgressBar__SWIG_1(ProgressBar.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal ProgressBar Assign(ProgressBar handle) + { + ProgressBar ret = new ProgressBar(NDalicPINVOKE.ProgressBar_Assign(swigCPtr, ProgressBar.getCPtr(handle)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Downcasts a handle to ProgressBar handle.
+ /// If handle points to a ProgressBar, the downcast produces valid handle.
+ /// If not the returned handle is left uninitialized.
+ ///
+ /// Handle to an object + /// handle to a ProgressBar or an uninitialized handle + public new static ProgressBar DownCast(BaseHandle handle) + { + ProgressBar ret = new ProgressBar(NDalicPINVOKE.ProgressBar_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal ProgressBarValueChangedSignal ValueChangedSignal() + { + ProgressBarValueChangedSignal ret = new ProgressBarValueChangedSignal(NDalicPINVOKE.ProgressBar_ValueChangedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal enum PropertyRange + { + PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, + PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000 + } + + /// + /// The progress value of progress bar, progress runs form 0 to 1.
+ /// If Value is set to 0, progress bar will be set to beginning.
+ /// If Value is set to 1, progress bar will be set to end.
+ /// Any Value outside of the range is ignored.
+ ///
+ public float ProgressValue + { + get + { + float temp = 0.0f; + GetProperty(ProgressBar.Property.PROGRESS_VALUE).Get(ref temp); + return temp; + } + set + { + SetProperty(ProgressBar.Property.PROGRESS_VALUE, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// The secondary progress value of progress bar, secondary progress runs form 0 to 1.
+ /// Optional. If not supplied, the default is 0.
+ /// If Value is set to 0, progress bar will be set secondary progress to beginning.
+ /// If Value is set to 1, progress bar will be set secondary progress to end.
+ /// Any Value outside of the range is ignored.
+ ///
+ public float SecondaryProgressValue + { + get + { + float temp = 0.0f; + GetProperty(ProgressBar.Property.SECONDARY_PROGRESS_VALUE).Get(ref temp); + return temp; + } + set + { + SetProperty(ProgressBar.Property.SECONDARY_PROGRESS_VALUE, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// Sets the progress-bar as \e indeterminate state. + /// + public bool Indeterminate + { + get + { + bool temp = false; + GetProperty(ProgressBar.Property.INDETERMINATE).Get(ref temp); + return temp; + } + set + { + SetProperty(ProgressBar.Property.INDETERMINATE, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// The track Visual value of progress bar, it's a full progress area and it's shown behind PROGRESS_VISUAL.
+ /// Optional. If not supplied, the default track visual will be shown.
+ ///
+ public Tizen.NUI.PropertyMap TrackVisual + { + get + { + Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); + GetProperty(ProgressBar.Property.TRACK_VISUAL).Get(temp); + return temp; + } + set + { + SetProperty(ProgressBar.Property.TRACK_VISUAL, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// The progress Visual value of progress bar, size of the progress visual is changed based on PROGRESS_VALUE.
+ /// Optional. If not supplied, the default progress visual will be shown.
+ ///
+ public Tizen.NUI.PropertyMap ProgressVisual + { + get + { + Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); + GetProperty(ProgressBar.Property.PROGRESS_VISUAL).Get(temp); + return temp; + } + set + { + SetProperty(ProgressBar.Property.PROGRESS_VISUAL, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// The secondary progress visual of progress bar, size of the secondary progress visual is changed based on SECONDARY_PROGRESS_VALUE.
+ /// Optional. If not supplied, the secondary progress visual will not be shown.
+ ///
+ public Tizen.NUI.PropertyMap SecondaryProgressVisual + { + get + { + Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); + GetProperty(ProgressBar.Property.SECONDARY_PROGRESS_VISUAL).Get(temp); + return temp; + } + set + { + SetProperty(ProgressBar.Property.SECONDARY_PROGRESS_VISUAL, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// The indeterminate visual of progress bar.
+ /// Optional. If not supplied, the default inditerminate visual will be shown.
+ ///
+ public Tizen.NUI.PropertyMap IndeterminateVisual + { + get + { + Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); + GetProperty(ProgressBar.Property.INDETERMINATE_VISUAL).Get(temp); + return temp; + } + set + { + SetProperty(ProgressBar.Property.INDETERMINATE_VISUAL, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// The transition data for indeterminate visual animation.
+ /// Optional. If not supplied, default animation will be played.
+ ///
+ public Tizen.NUI.PropertyArray IndeterminateVisualAnimation + { + get + { + Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray(); + GetProperty(ProgressBar.Property.INDETERMINATE_VISUAL_ANIMATION).Get(temp); + return temp; + } + set + { + SetProperty(ProgressBar.Property.INDETERMINATE_VISUAL_ANIMATION, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// The Label visual of progress bar. + /// + public Tizen.NUI.PropertyMap LabelVisual + { + get + { + Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); + GetProperty(ProgressBar.Property.LABEL_VISUAL).Get(temp); + return temp; + } + set + { + SetProperty(ProgressBar.Property.LABEL_VISUAL, new Tizen.NUI.PropertyValue(value)); + } + } + + } + +} diff --git a/src/Tizen.NUI/src/public/ScrollViewEffect.cs b/src/Tizen.NUI/src/public/ScrollViewEffect.cs new file mode 100755 index 000000000..9ddfc3561 --- /dev/null +++ b/src/Tizen.NUI/src/public/ScrollViewEffect.cs @@ -0,0 +1,69 @@ +//------------------------------------------------------------------------------ +// +// +// 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. +//------------------------------------------------------------------------------ + +namespace Tizen.NUI +{ + + public class ScrollViewEffect : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal ScrollViewEffect(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ScrollViewEffect_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ScrollViewEffect obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + + 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_ScrollViewEffect(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + + public ScrollViewEffect() : this(NDalicPINVOKE.new_ScrollViewEffect(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } + +} diff --git a/src/Tizen.NUI/src/public/Scrollable.cs b/src/Tizen.NUI/src/public/Scrollable.cs new file mode 100755 index 000000000..0a31f598f --- /dev/null +++ b/src/Tizen.NUI/src/public/Scrollable.cs @@ -0,0 +1,603 @@ +//------------------------------------------------------------------------------ +// +// +// 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. +//------------------------------------------------------------------------------ + +namespace Tizen.NUI +{ + + using System; + using System.Runtime.InteropServices; + using Tizen.NUI.BaseComponents; + + public class Scrollable : View + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal Scrollable(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Scrollable_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(Scrollable obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + 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. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Scrollable(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + public class StartedEventArgs : EventArgs + { + private Vector2 _vector2; + + public Vector2 Vector2 + { + get + { + return _vector2; + } + set + { + _vector2 = value; + } + } + } + + public class UpdatedEventArgs : EventArgs + { + private Vector2 _vector2; + + public Vector2 Vector2 + { + get + { + return _vector2; + } + set + { + _vector2 = value; + } + } + } + + public class CompletedEventArgs : EventArgs + { + private Vector2 _vector2; + + public Vector2 Vector2 + { + get + { + return _vector2; + } + set + { + _vector2 = value; + } + } + } + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void StartedCallbackDelegate(IntPtr vector2); + private DaliEventHandler _scrollableStartedEventHandler; + private StartedCallbackDelegate _scrollableStartedCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void UpdatedCallbackDelegate(IntPtr vector2); + private DaliEventHandler _scrollableUpdatedEventHandler; + private UpdatedCallbackDelegate _scrollableUpdatedCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void CompletedCallbackDelegate(IntPtr vector2); + private DaliEventHandler _scrollableCompletedEventHandler; + private CompletedCallbackDelegate _scrollableCompletedCallbackDelegate; + + public event DaliEventHandler ScrollStarted + { + add + { + lock (this) + { + // Restricted to only one listener + if (_scrollableStartedEventHandler == null) + { + _scrollableStartedEventHandler += value; + + _scrollableStartedCallbackDelegate = new StartedCallbackDelegate(OnStarted); + this.ScrollStartedSignal().Connect(_scrollableStartedCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_scrollableStartedEventHandler != null) + { + this.ScrollStartedSignal().Disconnect(_scrollableStartedCallbackDelegate); + } + + _scrollableStartedEventHandler -= value; + } + } + } + + private void OnStarted(IntPtr vector2) + { + StartedEventArgs e = new StartedEventArgs(); + + // Populate all members of "e" (StartedEventArgs) with real data + e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2); + + if (_scrollableStartedEventHandler != null) + { + //here we send all data to user event handlers + _scrollableStartedEventHandler(this, e); + } + + } + + public event DaliEventHandler ScrollUpdated + { + add + { + lock (this) + { + // Restricted to only one listener + if (_scrollableUpdatedEventHandler == null) + { + _scrollableUpdatedEventHandler += value; + + _scrollableUpdatedCallbackDelegate = new UpdatedCallbackDelegate(OnUpdated); + this.ScrollUpdatedSignal().Connect(_scrollableUpdatedCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_scrollableUpdatedEventHandler != null) + { + this.ScrollUpdatedSignal().Disconnect(_scrollableUpdatedCallbackDelegate); + } + + _scrollableUpdatedEventHandler -= value; + } + } + } + + private void OnUpdated(IntPtr vector2) + { + UpdatedEventArgs e = new UpdatedEventArgs(); + + // Populate all members of "e" (UpdatedEventArgs) with real data + e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2); + + if (_scrollableUpdatedEventHandler != null) + { + //here we send all data to user event handlers + _scrollableUpdatedEventHandler(this, e); + } + + } + + public event DaliEventHandler ScrollCompleted + { + add + { + lock (this) + { + // Restricted to only one listener + if (_scrollableCompletedEventHandler == null) + { + _scrollableCompletedEventHandler += value; + + _scrollableCompletedCallbackDelegate = new CompletedCallbackDelegate(OnCompleted); + this.ScrollCompletedSignal().Connect(_scrollableCompletedCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_scrollableCompletedEventHandler != null) + { + this.ScrollCompletedSignal().Disconnect(_scrollableCompletedCallbackDelegate); + } + + _scrollableCompletedEventHandler -= value; + } + } + } + + private void OnCompleted(IntPtr vector2) + { + CompletedEventArgs e = new CompletedEventArgs(); + + // Populate all members of "e" (CompletedEventArgs) with real data + e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2); + + if (_scrollableCompletedEventHandler != null) + { + //here we send all data to user event handlers + _scrollableCompletedEventHandler(this, e); + } + + } + + + public class Property : global::System.IDisposable + { + 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_Scrollable_Property(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public Property() : this(NDalicPINVOKE.new_Scrollable_Property(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly int OVERSHOOT_EFFECT_COLOR = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_EFFECT_COLOR_get(); + public static readonly int OVERSHOOT_ANIMATION_SPEED = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_ANIMATION_SPEED_get(); + public static readonly int OVERSHOOT_ENABLED = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_ENABLED_get(); + public static readonly int OVERSHOOT_SIZE = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_SIZE_get(); + public static readonly int SCROLL_TO_ALPHA_FUNCTION = NDalicPINVOKE.Scrollable_Property_SCROLL_TO_ALPHA_FUNCTION_get(); + public static readonly int SCROLL_RELATIVE_POSITION = NDalicPINVOKE.Scrollable_Property_SCROLL_RELATIVE_POSITION_get(); + public static readonly int SCROLL_POSITION_MIN = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_get(); + public static readonly int SCROLL_POSITION_MIN_X = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_X_get(); + public static readonly int SCROLL_POSITION_MIN_Y = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_Y_get(); + public static readonly int SCROLL_POSITION_MAX = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_get(); + public static readonly int SCROLL_POSITION_MAX_X = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_X_get(); + public static readonly int SCROLL_POSITION_MAX_Y = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_Y_get(); + public static readonly int CAN_SCROLL_VERTICAL = NDalicPINVOKE.Scrollable_Property_CAN_SCROLL_VERTICAL_get(); + public static readonly int CAN_SCROLL_HORIZONTAL = NDalicPINVOKE.Scrollable_Property_CAN_SCROLL_HORIZONTAL_get(); + + } + + public Scrollable() : this(NDalicPINVOKE.new_Scrollable__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Scrollable(Scrollable handle) : this(NDalicPINVOKE.new_Scrollable__SWIG_1(Scrollable.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Scrollable Assign(Scrollable handle) + { + Scrollable ret = new Scrollable(NDalicPINVOKE.Scrollable_Assign(swigCPtr, Scrollable.getCPtr(handle)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public new static Scrollable DownCast(BaseHandle handle) + { + Scrollable ret = new Scrollable(NDalicPINVOKE.Scrollable_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public bool IsOvershootEnabled() + { + bool ret = NDalicPINVOKE.Scrollable_IsOvershootEnabled(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetOvershootEnabled(bool enable) + { + NDalicPINVOKE.Scrollable_SetOvershootEnabled(swigCPtr, enable); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetOvershootEffectColor(Vector4 color) + { + NDalicPINVOKE.Scrollable_SetOvershootEffectColor(swigCPtr, Vector4.getCPtr(color)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Vector4 GetOvershootEffectColor() + { + Vector4 ret = new Vector4(NDalicPINVOKE.Scrollable_GetOvershootEffectColor(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetOvershootAnimationSpeed(float pixelsPerSecond) + { + NDalicPINVOKE.Scrollable_SetOvershootAnimationSpeed(swigCPtr, pixelsPerSecond); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetOvershootAnimationSpeed() + { + float ret = NDalicPINVOKE.Scrollable_GetOvershootAnimationSpeed(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal ScrollableSignal ScrollStartedSignal() + { + ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollStartedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal ScrollableSignal ScrollUpdatedSignal() + { + ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollUpdatedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal ScrollableSignal ScrollCompletedSignal() + { + ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollCompletedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public enum PropertyRange + { + PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, + PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000, + ANIMATABLE_PROPERTY_START_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, + ANIMATABLE_PROPERTY_END_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 + } + + public Vector4 OvershootEffectColor + { + get + { + Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); + GetProperty(Scrollable.Property.OVERSHOOT_EFFECT_COLOR).Get(temp); + return temp; + } + set + { + SetProperty(Scrollable.Property.OVERSHOOT_EFFECT_COLOR, new Tizen.NUI.PropertyValue(value)); + } + } + public float OvershootAnimationSpeed + { + get + { + float temp = 0.0f; + GetProperty(Scrollable.Property.OVERSHOOT_ANIMATION_SPEED).Get(ref temp); + return temp; + } + set + { + SetProperty(Scrollable.Property.OVERSHOOT_ANIMATION_SPEED, new Tizen.NUI.PropertyValue(value)); + } + } + public bool OvershootEnabled + { + get + { + bool temp = false; + GetProperty(Scrollable.Property.OVERSHOOT_ENABLED).Get(ref temp); + return temp; + } + set + { + SetProperty(Scrollable.Property.OVERSHOOT_ENABLED, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 OvershootSize + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(Scrollable.Property.OVERSHOOT_SIZE).Get(temp); + return temp; + } + set + { + SetProperty(Scrollable.Property.OVERSHOOT_SIZE, new Tizen.NUI.PropertyValue(value)); + } + } + public int ScrollToAlphaFunction + { + get + { + int temp = 0; + GetProperty(Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION).Get(ref temp); + return temp; + } + set + { + SetProperty(Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ScrollRelativePosition + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(Scrollable.Property.SCROLL_RELATIVE_POSITION).Get(temp); + return temp; + } + set + { + SetProperty(Scrollable.Property.SCROLL_RELATIVE_POSITION, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ScrollPositionMin + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(Scrollable.Property.SCROLL_POSITION_MIN).Get(temp); + return temp; + } + set + { + SetProperty(Scrollable.Property.SCROLL_POSITION_MIN, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ScrollPositionMax + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(Scrollable.Property.SCROLL_POSITION_MAX).Get(temp); + return temp; + } + set + { + SetProperty(Scrollable.Property.SCROLL_POSITION_MAX, new Tizen.NUI.PropertyValue(value)); + } + } + public bool CanScrollVertical + { + get + { + bool temp = false; + GetProperty(Scrollable.Property.CAN_SCROLL_VERTICAL).Get(ref temp); + return temp; + } + set + { + SetProperty(Scrollable.Property.CAN_SCROLL_VERTICAL, new Tizen.NUI.PropertyValue(value)); + } + } + public bool CanScrollHorizontal + { + get + { + bool temp = false; + GetProperty(Scrollable.Property.CAN_SCROLL_HORIZONTAL).Get(ref temp); + return temp; + } + set + { + SetProperty(Scrollable.Property.CAN_SCROLL_HORIZONTAL, new Tizen.NUI.PropertyValue(value)); + } + } + + } + +} \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/Size.cs b/src/Tizen.NUI/src/public/Size.cs new file mode 100755 index 000000000..f5a3dc7a6 --- /dev/null +++ b/src/Tizen.NUI/src/public/Size.cs @@ -0,0 +1,403 @@ +/* + * 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 +{ + + /// + /// Three dimensional size + /// + public class Size : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal Size(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(Size 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; + + /// + /// Dispose + /// + ~Size() + { + 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_Vector3(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + /// + /// Addition operator for A+B + /// + /// Size, A + /// Size to assign, B + /// A Size containing the result of the addition + public static Size operator +(Size arg1, Size arg2) + { + return arg1.Add(arg2); + } + + /// + /// Subtraction operator for A-B + /// + /// Size, A + /// Size to subtract, B + /// A Size containing the result of the subtraction + public static Size operator -(Size arg1, Size arg2) + { + return arg1.Subtract(arg2); + } + + /// + /// Unary negation operator. + /// + /// Size for unary negation + /// A Size containg the negation + public static Size operator -(Size arg1) + { + return arg1.Subtract(); + } + + /// + /// Multiplication operator. + /// + /// Size for multiplication + /// The Size to multipl + /// A Size containing the result of the multiplication + public static Size operator *(Size arg1, Size arg2) + { + return arg1.Multiply(arg2); + } + + /// + /// Multiplication operator. + /// + /// Size for multiplication + /// The float value to scale the Size + /// A Size containing the result of the scaling + public static Size operator *(Size arg1, float arg2) + { + return arg1.Multiply(arg2); + } + + /// + /// Division operator. + /// + /// Size for division + /// The Size to divide + /// A Size containing the result of the division> + public static Size operator /(Size arg1, Size arg2) + { + return arg1.Divide(arg2); + } + + /// + /// Division operator. + /// + /// Size for division + /// The float value to scale the Size by + /// A Size containing the result of the scaling + public static Size operator /(Size arg1, float arg2) + { + return arg1.Divide(arg2); + } + + /// + /// Array subscript operator. + /// + /// Subscript index + /// The float at the given index + public float this[uint index] + { + get + { + return ValueOfIndex(index); + } + } + + internal static Size GetSizeFromPtr(global::System.IntPtr cPtr) + { + Size ret = new Size(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Constructor. + /// + public Size() : this(NDalicPINVOKE.new_Vector3__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Constructor. + /// + /// x (or width) component + /// y (or height) component + /// z (or depth) component + public Size(float x, float y, float z) : this(NDalicPINVOKE.new_Vector3__SWIG_1(x, y, z), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Constructor. + /// + /// Size2D with x (width) and y (height) + public Size(Size2D size2d) : this(NDalicPINVOKE.new_Vector3__SWIG_3(Size2D.getCPtr(size2d)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Zero constant, (0.0f, 0.0f, 0.0f). + /// + public static Size Zero + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.Vector3_ZERO_get(); + Size ret = (cPtr == global::System.IntPtr.Zero) ? null : new Size(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + private Size Add(Size rhs) + { + Size ret = new Size(NDalicPINVOKE.Vector3_Add(swigCPtr, Size.getCPtr(rhs)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private Size Subtract(Size rhs) + { + Size ret = new Size(NDalicPINVOKE.Vector3_Subtract__SWIG_0(swigCPtr, Size.getCPtr(rhs)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private Size Multiply(Size rhs) + { + Size ret = new Size(NDalicPINVOKE.Vector3_Multiply__SWIG_0(swigCPtr, Size.getCPtr(rhs)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private Size Multiply(float rhs) + { + Size ret = new Size(NDalicPINVOKE.Vector3_Multiply__SWIG_1(swigCPtr, rhs), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private Size Divide(Size rhs) + { + Size ret = new Size(NDalicPINVOKE.Vector3_Divide__SWIG_0(swigCPtr, Size.getCPtr(rhs)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private Size Divide(float rhs) + { + Size ret = new Size(NDalicPINVOKE.Vector3_Divide__SWIG_1(swigCPtr, rhs), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private Size Subtract() + { + Size ret = new Size(NDalicPINVOKE.Vector3_Subtract__SWIG_1(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private float ValueOfIndex(uint index) + { + float ret = NDalicPINVOKE.Vector3_ValueOfIndex__SWIG_0(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Check equality.
+ /// Utilizes appropriate machine epsilon values.
+ ///
+ /// The Size to test against + /// True if the Sizes are equal + public bool EqualTo(Size rhs) + { + bool ret = NDalicPINVOKE.Vector3_EqualTo(swigCPtr, Size.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Check inequality.
+ /// Utilizes appropriate machine epsilon values.
+ ///
+ /// The Size to test against + /// True if the Sizes are not equal + public bool NotEqualTo(Size rhs) + { + bool ret = NDalicPINVOKE.Vector3_NotEqualTo(swigCPtr, Size.getCPtr(rhs)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Width property for width component of Siz + /// + public float Width + { + set + { + NDalicPINVOKE.Vector3_Width_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.Vector3_Width_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + /// + /// Height property for height component of Size + /// + public float Height + { + set + { + NDalicPINVOKE.Vector3_Height_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.Vector3_Height_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + /// + /// Depth property for depth component of Size + /// + public float Depth + { + set + { + NDalicPINVOKE.Vector3_Depth_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.Vector3_Depth_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + /// + /// Type cast operator, Size to Vector3. + /// + /// Object of Size type + public static implicit operator Vector3(Size size) + { + return new Vector3(size.Width, size.Height, size.Depth); + } + + /// + /// Type cast operator, Vector3 to Size type. + /// + /// Object of Vector3 type + public static implicit operator Size(Vector3 vec) + { + return new Size(vec.Width, vec.Height, vec.Depth); + } + + } + +} + diff --git a/src/Tizen.NUI/src/public/TableView.cs b/src/Tizen.NUI/src/public/TableView.cs index f45d8b5af..63273a7db 100755 --- a/src/Tizen.NUI/src/public/TableView.cs +++ b/src/Tizen.NUI/src/public/TableView.cs @@ -597,12 +597,6 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - internal void DeleteRow(uint rowIndex, ViewContainer removed) - { - NDalicPINVOKE.TableView_DeleteRow__SWIG_1(swigCPtr, rowIndex, ViewContainer.getCPtr(removed)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - /// /// Inserts a new column to the given index. /// @@ -624,12 +618,6 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - internal void DeleteColumn(uint columnIndex, ViewContainer removed) - { - NDalicPINVOKE.TableView_DeleteColumn__SWIG_1(swigCPtr, columnIndex, ViewContainer.getCPtr(removed)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - /// /// Resizes the TableView. /// @@ -641,12 +629,6 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - internal void Resize(uint rows, uint columns, ViewContainer removed) - { - NDalicPINVOKE.TableView_Resize__SWIG_1(swigCPtr, rows, columns, ViewContainer.getCPtr(removed)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - /// /// Sets horizontal and vertical padding between cells. /// diff --git a/src/Tizen.NUI/src/public/TransitionData.cs b/src/Tizen.NUI/src/public/TransitionData.cs new file mode 100755 index 000000000..6de51d70d --- /dev/null +++ b/src/Tizen.NUI/src/public/TransitionData.cs @@ -0,0 +1,126 @@ +/** 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. +//------------------------------------------------------------------------------ + +namespace Tizen.NUI +{ + + public class TransitionData : BaseHandle + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal TransitionData(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TransitionData_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TransitionData obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + 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_TransitionData(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + public TransitionData(PropertyMap transition) : this(NDalicPINVOKE.TransitionData_New__SWIG_0(PropertyMap.getCPtr(transition)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public TransitionData(PropertyArray transition) : this(NDalicPINVOKE.TransitionData_New__SWIG_1(PropertyArray.getCPtr(transition)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public static TransitionData DownCast(BaseHandle handle) + { + TransitionData ret = new TransitionData(NDalicPINVOKE.TransitionData_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public TransitionData(TransitionData handle) : this(NDalicPINVOKE.new_TransitionData__SWIG_1(TransitionData.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public TransitionData Assign(TransitionData handle) + { + TransitionData ret = new TransitionData(NDalicPINVOKE.TransitionData_Assign(swigCPtr, TransitionData.getCPtr(handle)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint Count() + { + uint ret = NDalicPINVOKE.TransitionData_Count(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public PropertyMap GetAnimatorAt(uint index) + { + PropertyMap ret = new PropertyMap(NDalicPINVOKE.TransitionData_GetAnimatorAt(swigCPtr, index), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal TransitionData(SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData impl) : this(NDalicPINVOKE.new_TransitionData__SWIG_2(SWIGTYPE_p_Dali__Toolkit__Internal__TransitionData.getCPtr(impl)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } + +} diff --git a/src/Tizen.NUI/src/public/UIComponents/Button.cs b/src/Tizen.NUI/src/public/UIComponents/Button.cs new file mode 100755 index 000000000..51a416cc7 --- /dev/null +++ b/src/Tizen.NUI/src/public/UIComponents/Button.cs @@ -0,0 +1,973 @@ +// 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 +// Some have been manually changed + +namespace Tizen.NUI.UIComponents +{ + + using System; + using System.Runtime.InteropServices; + using Tizen.NUI.BaseComponents; + + /// + /// Button is a base class for different kinds of buttons.
+ /// This class provides the disabled property and the clicked signal.
+ /// A Clicked event handler is emitted when the button is touched and the touch point doesn't leave the boundary of the button.
+ /// When the disabled property is set to true, no signal is emitted.
+ /// 'Visual' describes not just traditional images like png, bmp but refers to whatever is used to show the button, it could be a color, gradient or some other kind of renderer.
+ /// The button's appearance can be modified by setting properties for the various visuals/images.
+ /// It is not mandatory to set all visuals. A button could be defined only by setting its background visual or by setting its background and selected visuals.
+ /// The button visual is shown over the background visual.
+ /// When pressed the unselected visuals are replaced by the selected visual.
+ /// The text label is always placed on the top of all images.
+ /// When the button is disabled, background, button and selected visuals are replaced by their disabled visuals.
+ ///
+ public class Button : View + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal Button(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Button_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(Button obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + /// + /// To make Button instance be disposed. + /// + 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. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Button(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + + private EventHandlerWithReturnType _clickedEventHandler; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ClickedCallbackType(global::System.IntPtr data); + private ClickedCallbackType _clickedCallback; + + /// + /// Clicked will be triggered when the button is touched and the touch point doesn't leave the boundary of the button. + /// + public event EventHandlerWithReturnType Clicked + { + add + { + if (_clickedEventHandler == null) + { + _clickedCallback = OnClicked; + ClickedSignal().Connect(_clickedCallback); + } + + _clickedEventHandler += value; + } + + remove + { + _clickedEventHandler -= value; + + if (_clickedEventHandler == null && ClickedSignal().Empty() == false) + { + ClickedSignal().Disconnect(_clickedCallback); + } + } + } + + + private bool OnClicked(IntPtr data) + { + if (_clickedEventHandler != null) + { + return _clickedEventHandler(this, null); + } + return false; + } + + + + private EventHandlerWithReturnType _pressedEventHandler; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool PressedCallbackType(global::System.IntPtr data); + private PressedCallbackType _pressedCallback; + + /// + /// Pressed will be triggered when the button is touched. + /// + public event EventHandlerWithReturnType Pressed + { + add + { + if (_pressedEventHandler == null) + { + _pressedCallback = OnPressed; + PressedSignal().Connect(_pressedCallback); + } + + _pressedEventHandler += value; + } + + remove + { + _pressedEventHandler -= value; + + if (_pressedEventHandler == null && PressedSignal().Empty() == false) + { + this.PressedSignal().Disconnect(_pressedCallback); + } + } + } + + private bool OnPressed(IntPtr data) + { + if (_pressedEventHandler != null) + { + return _pressedEventHandler(this, null); + } + return false; + } + + + + private EventHandlerWithReturnType _releasedEventHandler; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ReleasedCallbackType(global::System.IntPtr data); + private ReleasedCallbackType _releasedCallback; + + /// + /// Released will be triggered when the button is touched and the touch point leaves the boundary of the button. + /// + public event EventHandlerWithReturnType Released + { + add + { + if (_releasedEventHandler == null) + { + _releasedCallback = OnReleased; + ReleasedSignal().Connect(_releasedCallback); + } + _releasedEventHandler += value; + } + + remove + { + _releasedEventHandler -= value; + + if (_releasedEventHandler == null && ReleasedSignal().Empty() == false) + { + ReleasedSignal().Disconnect(_releasedCallback); + } + + } + } + + private bool OnReleased(IntPtr data) + { + if (_releasedEventHandler != null) + { + return _releasedEventHandler(this, null); + } + return false; + } + + + private EventHandlerWithReturnType _stateChangedEventHandler; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool StateChangedCallback(global::System.IntPtr data); + private StateChangedCallback _stateChangedCallback; + + /// + /// StateChanged will be triggered when the button's state is changed. + /// + public event EventHandlerWithReturnType StateChanged + { + add + { + if (_stateChangedEventHandler == null) + { + _stateChangedCallback = OnStateChanged; + StateChangedSignal().Connect(_stateChangedCallback); + } + + _stateChangedEventHandler += value; + } + + remove + { + _stateChangedEventHandler -= value; + + if (_stateChangedEventHandler == null && StateChangedSignal().Empty() == false) + { + StateChangedSignal().Disconnect(_stateChangedCallback); + } + } + } + + private bool OnStateChanged(IntPtr data) + { + if (_stateChangedEventHandler != null) + { + return _stateChangedEventHandler(this, null); + } + return false; + } + + + + internal static Button GetButtonFromPtr(global::System.IntPtr cPtr) + { + Button ret = new Button(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Gets/Sets the unselected button foreground/icon visual + /// + public Tizen.NUI.PropertyMap UnselectedVisual + { + get + { + Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); + GetProperty(Button.Property.UNSELECTED_VISUAL).Get(temp); + return temp; + } + set + { + SetProperty(Button.Property.UNSELECTED_VISUAL, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// Gets/Sets the selected button foreground/icon visual + /// + public Tizen.NUI.PropertyMap SelectedVisual + { + get + { + Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); + GetProperty(Button.Property.SELECTED_VISUAL).Get(temp); + return temp; + } + set + { + SetProperty(Button.Property.SELECTED_VISUAL, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// Gets/Sets the disabled selected state foreground/icon button visual + /// + public Tizen.NUI.PropertyMap DisabledSelectedVisual + { + get + { + Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); + GetProperty(Button.Property.DISABLED_SELECTED_VISUAL).Get(temp); + return temp; + } + set + { + SetProperty(Button.Property.DISABLED_SELECTED_VISUAL, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// Gets/Sets the disabled unselected state foreground/icon visual + /// + public Tizen.NUI.PropertyMap DisabledUnselectedVisual + { + get + { + Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); + GetProperty(Button.Property.DISABLED_UNSELECTED_VISUAL).Get(temp); + return temp; + } + set + { + SetProperty(Button.Property.DISABLED_UNSELECTED_VISUAL, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// Gets/Sets the disabled in the unselected state background, button visual + /// + public Tizen.NUI.PropertyMap UnselectedBackgroundVisual + { + get + { + Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); + GetProperty(Button.Property.UNSELECTED_BACKGROUND_VISUAL).Get(temp); + return temp; + } + set + { + SetProperty(Button.Property.UNSELECTED_BACKGROUND_VISUAL, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// Gets/Sets the selected background button visual + /// + public Tizen.NUI.PropertyMap SelectedBackgroundVisual + { + get + { + Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); + GetProperty(Button.Property.SELECTED_BACKGROUND_VISUAL).Get(temp); + return temp; + } + set + { + SetProperty(Button.Property.SELECTED_BACKGROUND_VISUAL, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// Gets/Sets the disabled while unselected background button visual + /// + public Tizen.NUI.PropertyMap DisabledUnselectedBackgroundVisual + { + get + { + Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); + GetProperty(Button.Property.DISABLED_UNSELECTED_BACKGROUND_VISUAL).Get(temp); + return temp; + } + set + { + SetProperty(Button.Property.DISABLED_UNSELECTED_BACKGROUND_VISUAL, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// Gets/Sets the disabled while selected background button visual + /// + public Tizen.NUI.PropertyMap DisabledSelectedBackgroundVisual + { + get + { + Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); + GetProperty(Button.Property.DISABLED_SELECTED_BACKGROUND_VISUAL).Get(temp); + return temp; + } + set + { + SetProperty(Button.Property.DISABLED_SELECTED_BACKGROUND_VISUAL, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// Gets/Sets the position of the the label in relation to the foreground/icon if both present + /// + public Align LabelRelativeAlignment + { + get + { + string temp; + if (GetProperty(Button.Property.LABEL_RELATIVE_ALIGNMENT).Get(out temp) == false) + { +#if DEBUG_ON + Tizen.Log.Error("NUI", "LabelRelativeAlignment get error!"); +#endif + } + switch (temp) + { + case "BEGIN": + return Align.Begin; + case "END": + return Align.End; + case "TOP": + return Align.Top; + case "BOTTOM": + return Align.Bottom; + default: + return Align.End; + } + } + set + { + string valueToString = ""; + switch (value) + { + case Align.Begin: + { + valueToString = "BEGIN"; + break; + } + case Align.End: + { + valueToString = "END"; + break; + } + case Align.Top: + { + valueToString = "TOP"; + break; + } + case Align.Bottom: + { + valueToString = "BOTTOM"; + break; + } + default: + { + valueToString = "END"; + break; + } + } + SetProperty(Button.Property.LABEL_RELATIVE_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString)); + } + } + + /// + /// Gets/Sets the padding around the text + /// + public Vector4 LabelPadding + { + get + { + Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); + GetProperty(Button.Property.LABEL_PADDING).Get(temp); + return temp; + } + set + { + SetProperty(Button.Property.LABEL_PADDING, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// Gets/Sets the padding around the foreground visual + /// + public Vector4 VisualPadding + { + get + { + Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); + GetProperty(Button.Property.VISUAL_PADDING).Get(temp); + return temp; + } + set + { + SetProperty(Button.Property.VISUAL_PADDING, new Tizen.NUI.PropertyValue(value)); + } + } + + internal class Property : global::System.IDisposable + { + 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_Button_Property(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + internal static readonly int UNSELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_UNSELECTED_VISUAL_get(); + internal static readonly int SELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_SELECTED_VISUAL_get(); + internal static readonly int DISABLED_SELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_SELECTED_VISUAL_get(); + internal static readonly int DISABLED_UNSELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_UNSELECTED_VISUAL_get(); + internal static readonly int UNSELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_UNSELECTED_BACKGROUND_VISUAL_get(); + internal static readonly int SELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_SELECTED_BACKGROUND_VISUAL_get(); + internal static readonly int DISABLED_UNSELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_UNSELECTED_BACKGROUND_VISUAL_get(); + internal static readonly int DISABLED_SELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_SELECTED_BACKGROUND_VISUAL_get(); + internal static readonly int LABEL_RELATIVE_ALIGNMENT = NDalicManualPINVOKE.Button_Property_LABEL_RELATIVE_ALIGNMENT_get(); + internal static readonly int LABEL_PADDING = NDalicManualPINVOKE.Button_Property_LABEL_PADDING_get(); + internal static readonly int VISUAL_PADDING = NDalicManualPINVOKE.Button_Property_VISUAL_PADDING_get(); + //changed + internal Property() : this(NDalicPINVOKE.new_Button_Property(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal static readonly int DISABLED = NDalicPINVOKE.Button_Property_DISABLED_get(); + internal static readonly int AUTO_REPEATING = NDalicPINVOKE.Button_Property_AUTO_REPEATING_get(); + internal static readonly int INITIAL_AUTO_REPEATING_DELAY = NDalicPINVOKE.Button_Property_INITIAL_AUTO_REPEATING_DELAY_get(); + internal static readonly int NEXT_AUTO_REPEATING_DELAY = NDalicPINVOKE.Button_Property_NEXT_AUTO_REPEATING_DELAY_get(); + internal static readonly int TOGGLABLE = NDalicPINVOKE.Button_Property_TOGGLABLE_get(); + internal static readonly int SELECTED = NDalicPINVOKE.Button_Property_SELECTED_get(); + internal static readonly int UNSELECTED_COLOR = NDalicPINVOKE.Button_Property_UNSELECTED_COLOR_get(); + internal static readonly int SELECTED_COLOR = NDalicPINVOKE.Button_Property_SELECTED_COLOR_get(); + internal static readonly int LABEL = NDalicPINVOKE.Button_Property_LABEL_get(); + internal static readonly int LABEL_TEXT = NDalicPINVOKE.Button_Property_LABEL_TEXT_get(); + + } + + /// + /// Creates an uninitialized Button.
+ /// Only derived versions can be instantiated.
+ ///
+ public Button() : this(NDalicPINVOKE.new_Button__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal Button(Button button) : this(NDalicPINVOKE.new_Button__SWIG_1(Button.getCPtr(button)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal Button Assign(Button button) + { + Button ret = new Button(NDalicPINVOKE.Button_Assign(swigCPtr, Button.getCPtr(button)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Downcasts a handle to Button handle.
+ /// If handle points to a Button, the downcast produces valid handle.
+ /// If not the returned handle is left uninitialized.
+ ///
+ /// Handle to an object + /// A handle to a Button or an uninitialized handle + public new static Button DownCast(BaseHandle handle) + { + Button ret = new Button(NDalicPINVOKE.Button_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal bool IsDisabled() + { + bool ret = NDalicPINVOKE.Button_IsDisabled(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal bool IsAutoRepeating() + { + bool ret = NDalicPINVOKE.Button_IsAutoRepeating(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal float GetInitialAutoRepeatingDelay() + { + float ret = NDalicPINVOKE.Button_GetInitialAutoRepeatingDelay(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal float GetNextAutoRepeatingDelay() + { + float ret = NDalicPINVOKE.Button_GetNextAutoRepeatingDelay(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal bool IsTogglableButton() + { + bool ret = NDalicPINVOKE.Button_IsTogglableButton(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal bool IsSelected() + { + bool ret = NDalicPINVOKE.Button_IsSelected(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Retrieves button's animation time. + /// + /// + public float GetAnimationTime() + { + float ret = NDalicPINVOKE.Button_GetAnimationTime(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal string GetLabelText() + { + string ret = NDalicPINVOKE.Button_GetLabelText(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal void SetLabel(View label) + { + NDalicPINVOKE.Button_SetLabel(swigCPtr, View.getCPtr(label)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal void SetButtonImage(Image image) + { + NDalicPINVOKE.Button_SetButtonImage(swigCPtr, Image.getCPtr(image)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal void SetSelectedImage(Image image) + { + NDalicPINVOKE.Button_SetSelectedImage(swigCPtr, Image.getCPtr(image)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal View GetButtonImage() + { + View ret = new View(NDalicPINVOKE.Button_GetButtonImage(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal View GetSelectedImage() + { + View ret = new View(NDalicPINVOKE.Button_GetSelectedImage(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal ButtonSignal PressedSignal() + { + ButtonSignal ret = new ButtonSignal(NDalicPINVOKE.Button_PressedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal ButtonSignal ReleasedSignal() + { + ButtonSignal ret = new ButtonSignal(NDalicPINVOKE.Button_ReleasedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal ButtonSignal ClickedSignal() + { + ButtonSignal ret = new ButtonSignal(NDalicPINVOKE.Button_ClickedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal ButtonSignal StateChangedSignal() + { + ButtonSignal ret = new ButtonSignal(NDalicPINVOKE.Button_StateChangedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal enum PropertyRange + { + PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, + PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000 + } + + /// + /// Gets/Sets the button as disabled. + /// + public bool Disabled + { + get + { + bool temp = false; + GetProperty(Button.Property.DISABLED).Get(ref temp); + return temp; + } + set + { + SetProperty(Button.Property.DISABLED, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// If the autorepeating property is set to true then the togglable property is set to false. + /// + public bool AutoRepeating + { + get + { + bool temp = false; + GetProperty(Button.Property.AUTO_REPEATING).Get(ref temp); + return temp; + } + set + { + SetProperty(Button.Property.AUTO_REPEATING, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// By default this value is set to 0.15 seconds. + /// + public float InitialAutoRepeatingDelay + { + get + { + float temp = 0.0f; + GetProperty(Button.Property.INITIAL_AUTO_REPEATING_DELAY).Get(ref temp); + return temp; + } + set + { + SetProperty(Button.Property.INITIAL_AUTO_REPEATING_DELAY, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// default this value is set to 0.05 seconds. + /// + public float NextAutoRepeatingDelay + { + get + { + float temp = 0.0f; + GetProperty(Button.Property.NEXT_AUTO_REPEATING_DELAY).Get(ref temp); + return temp; + } + set + { + SetProperty(Button.Property.NEXT_AUTO_REPEATING_DELAY, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// If the togglable property is set to true, then the autorepeating property is set to false. + /// + public bool Togglable + { + get + { + bool temp = false; + GetProperty(Button.Property.TOGGLABLE).Get(ref temp); + return temp; + } + set + { + SetProperty(Button.Property.TOGGLABLE, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// /Gets/Sets the togglable button as either selected or unselected, togglable property must be set to true. + /// + public bool Selected + { + get + { + bool temp = false; + GetProperty(Button.Property.SELECTED).Get(ref temp); + return temp; + } + set + { + SetProperty(Button.Property.SELECTED, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// Gets/Sets unselected color. + /// + public Color UnselectedColor + { + get + { + Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f); + GetProperty(Button.Property.UNSELECTED_COLOR).Get(temp); + return temp; + } + set + { + SetProperty(Button.Property.UNSELECTED_COLOR, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// Gets/Sets selected color. + /// + public Color SelectedColor + { + get + { + Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f); + GetProperty(Button.Property.SELECTED_COLOR).Get(temp); + return temp; + } + set + { + SetProperty(Button.Property.SELECTED_COLOR, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// Gets/Sets label. + /// + public Tizen.NUI.PropertyMap Label + { + get + { + Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); + GetProperty(Button.Property.LABEL).Get(temp); + return temp; + } + set + { + SetProperty(Button.Property.LABEL, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// Gets/Sets text of label. + /// + public string LabelText + { + get + { + string temp; + GetProperty(Button.Property.LABEL_TEXT).Get(out temp); + return temp; + } + set + { + SetProperty(Button.Property.LABEL_TEXT, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// Enumeration for describing the position the text label can be in relation to the control(and foreground/icon). + /// + public enum Align + { + /// + /// At the start of the control before the foreground/icon + /// + Begin, + /// + /// At the end of the control after the foreground/icon + /// + End, + /// + /// At the top of the control above the foreground/icon + /// + Top, + /// + /// At the bottom of the control below the foreground/icon + /// + Bottom + } + + } + +} diff --git a/src/Tizen.NUI/src/public/UIComponents/Popup.cs b/src/Tizen.NUI/src/public/UIComponents/Popup.cs new file mode 100755 index 000000000..d451c38be --- /dev/null +++ b/src/Tizen.NUI/src/public/UIComponents/Popup.cs @@ -0,0 +1,1121 @@ +/** 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. +//------------------------------------------------------------------------------ + +namespace Tizen.NUI.UIComponents +{ + + using System; + using System.Runtime.InteropServices; + using Tizen.NUI.BaseComponents; + + /// + /// The Popup widget provides a configurable pop-up dialog with built-in layout of three main fields. + /// + public class Popup : View + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal Popup(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Popup_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(Popup obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + + 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. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Popup(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + + + + /// + /// Event arguments that passed via OutsideTouchedEvent + /// + public class OutsideTouchedEventArgs : EventArgs + { + } + + /// + /// Event arguments that passed via ShowingEventArgs + /// + public class ShowingEventArgs : EventArgs + { + } + + /// + /// Event arguments that passed via ShownEventArgs + /// + public class ShownEventArgs : EventArgs + { + } + + /// + /// Event arguments that passed via HidingEventArgs + /// + public class HidingEventArgs : EventArgs + { + } + + /// + /// Event arguments that passed via HiddenEventArgs + /// + public class HiddenEventArgs : EventArgs + { + } + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void OutsideTouchedEventCallbackDelegate(); + private EventHandler _popUpOutsideTouchedEventHandler; + private OutsideTouchedEventCallbackDelegate _popUpOutsideTouchedEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void ShowingEventCallbackDelegate(); + private EventHandler _popUpShowingEventHandler; + private ShowingEventCallbackDelegate _popUpShowingEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void ShownEventCallbackDelegate(); + private EventHandler _popUpShownEventHandler; + private ShownEventCallbackDelegate _popUpShownEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void HidingEventCallbackDelegate(); + private EventHandler _popUpHidingEventHandler; + private HidingEventCallbackDelegate _popUpHidingEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void HiddenEventCallbackDelegate(); + private EventHandler _popUpHiddenEventHandler; + private HiddenEventCallbackDelegate _popUpHiddenEventCallbackDelegate; + + /// + /// Event is sent when user has touched outside of the Dialog. + /// + public event EventHandler OutsideTouched + { + add + { + if (_popUpOutsideTouchedEventHandler == null) + { + _popUpOutsideTouchedEventCallbackDelegate = (OnOutsideTouched); + OutsideTouchedSignal().Connect(_popUpOutsideTouchedEventCallbackDelegate); + } + _popUpOutsideTouchedEventHandler += value; + } + remove + { + _popUpOutsideTouchedEventHandler -= value; + if (_popUpOutsideTouchedEventHandler == null && OutsideTouchedSignal().Empty() == false) + { + this.OutsideTouchedSignal().Disconnect(_popUpOutsideTouchedEventCallbackDelegate); + } + } + } + + // Callback for Popup OutsideTouchedSignal + private void OnOutsideTouched() + { + OutsideTouchedEventArgs e = new OutsideTouchedEventArgs(); + + if (_popUpOutsideTouchedEventHandler != null) + { + //here we send all data to user event handlers + _popUpOutsideTouchedEventHandler(this, e); + } + } + + /// + /// Event is sent when the Popup is starting to be shown. + /// + public event EventHandler Showing + { + add + { + if (_popUpShowingEventHandler == null) + { + _popUpShowingEventCallbackDelegate = (OnShowing); + ShowingSignal().Connect(_popUpShowingEventCallbackDelegate); + } + _popUpShowingEventHandler += value; + } + remove + { + _popUpShowingEventHandler -= value; + if (_popUpShowingEventHandler == null && ShowingSignal().Empty() == false) + { + ShowingSignal().Disconnect(_popUpShowingEventCallbackDelegate); + } + } + } + + // Callback for ShowingSignal + private void OnShowing() + { + ShowingEventArgs e = new ShowingEventArgs(); + + if (_popUpShowingEventHandler != null) + { + //here we send all data to user event handlers + _popUpShowingEventHandler(this, e); + } + } + + + /// + /// Event is sent when the Popup has been fully displayed. + /// + public event EventHandler Shown + { + add + { + if (_popUpShownEventHandler == null) + { + _popUpShownEventCallbackDelegate = (OnShown); + ShownSignal().Connect(_popUpShownEventCallbackDelegate); + } + _popUpShownEventHandler += value; + } + remove + { + _popUpShownEventHandler -= value; + if (_popUpShownEventHandler == null && ShownSignal().Empty() == false) + { + ShownSignal().Disconnect(_popUpShownEventCallbackDelegate); + } + } + } + + // Callback for ShownSignal + private void OnShown() + { + ShownEventArgs e = new ShownEventArgs(); + + if (_popUpShownEventHandler != null) + { + //here we send all data to user event handlers + _popUpShownEventHandler(this, e); + } + } + + /// + /// Event is sent when the Popup is starting to be hidden. + /// + public event EventHandler Hiding + { + add + { + if (_popUpHidingEventHandler == null) + { + _popUpHidingEventCallbackDelegate = (OnHiding); + HidingSignal().Connect(_popUpHidingEventCallbackDelegate); + } + _popUpHidingEventHandler += value; + } + remove + { + _popUpHidingEventHandler -= value; + if (_popUpHidingEventHandler == null && HidingSignal().Empty() == false) + { + HidingSignal().Disconnect(_popUpHidingEventCallbackDelegate); + } + } + } + + // Callback for HidingSignal + private void OnHiding() + { + HidingEventArgs e = new HidingEventArgs(); + + if (_popUpHidingEventHandler != null) + { + //here we send all data to user event handlers + _popUpHidingEventHandler(this, e); + } + } + + /// + /// Event is sent when the Popup has been completely hidden. + /// + public event EventHandler Hidden + { + add + { + if (_popUpHiddenEventHandler == null) + { + _popUpHiddenEventCallbackDelegate = (OnHidden); + HiddenSignal().Connect(_popUpHiddenEventCallbackDelegate); + } + _popUpHiddenEventHandler += value; + } + remove + { + _popUpHiddenEventHandler -= value; + if (_popUpHiddenEventHandler == null && HiddenSignal().Empty() == false) + { + HiddenSignal().Disconnect(_popUpHiddenEventCallbackDelegate); + } + } + } + + // Callback for HiddenSignal + private void OnHidden() + { + HiddenEventArgs e = new HiddenEventArgs(); + + if (_popUpHiddenEventHandler != null) + { + //here we send all data to user event handlers + _popUpHiddenEventHandler(this, e); + } + } + + internal class Property : global::System.IDisposable + { + 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_Popup_Property(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + internal Property() : this(NDalicPINVOKE.new_Popup_Property(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal static readonly int TITLE = NDalicPINVOKE.Popup_Property_TITLE_get(); + internal static readonly int CONTENT = NDalicPINVOKE.Popup_Property_CONTENT_get(); + internal static readonly int FOOTER = NDalicPINVOKE.Popup_Property_FOOTER_get(); + internal static readonly int DISPLAY_STATE = NDalicPINVOKE.Popup_Property_DISPLAY_STATE_get(); + internal static readonly int TOUCH_TRANSPARENT = NDalicPINVOKE.Popup_Property_TOUCH_TRANSPARENT_get(); + internal static readonly int TAIL_VISIBILITY = NDalicPINVOKE.Popup_Property_TAIL_VISIBILITY_get(); + internal static readonly int TAIL_POSITION = NDalicPINVOKE.Popup_Property_TAIL_POSITION_get(); + internal static readonly int CONTEXTUAL_MODE = NDalicPINVOKE.Popup_Property_CONTEXTUAL_MODE_get(); + internal static readonly int ANIMATION_DURATION = NDalicPINVOKE.Popup_Property_ANIMATION_DURATION_get(); + internal static readonly int ANIMATION_MODE = NDalicPINVOKE.Popup_Property_ANIMATION_MODE_get(); + internal static readonly int ENTRY_ANIMATION = NDalicPINVOKE.Popup_Property_ENTRY_ANIMATION_get(); + internal static readonly int EXIT_ANIMATION = NDalicPINVOKE.Popup_Property_EXIT_ANIMATION_get(); + internal static readonly int AUTO_HIDE_DELAY = NDalicPINVOKE.Popup_Property_AUTO_HIDE_DELAY_get(); + internal static readonly int BACKING_ENABLED = NDalicPINVOKE.Popup_Property_BACKING_ENABLED_get(); + internal static readonly int BACKING_COLOR = NDalicPINVOKE.Popup_Property_BACKING_COLOR_get(); + internal static readonly int POPUP_BACKGROUND_IMAGE = NDalicPINVOKE.Popup_Property_POPUP_BACKGROUND_IMAGE_get(); + internal static readonly int POPUP_BACKGROUND_BORDER = NDalicPINVOKE.Popup_Property_POPUP_BACKGROUND_BORDER_get(); + internal static readonly int TAIL_UP_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_UP_IMAGE_get(); + internal static readonly int TAIL_DOWN_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_DOWN_IMAGE_get(); + internal static readonly int TAIL_LEFT_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_LEFT_IMAGE_get(); + internal static readonly int TAIL_RIGHT_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_RIGHT_IMAGE_get(); + + } + + /// + /// Create the Popup. + /// + public Popup() : this(NDalicPINVOKE.Popup_New(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + internal Popup(Popup handle) : this(NDalicPINVOKE.new_Popup__SWIG_1(Popup.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal Popup Assign(Popup handle) + { + Popup ret = new Popup(NDalicPINVOKE.Popup_Assign(swigCPtr, Popup.getCPtr(handle)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Downcasts a handle to Popup handle.
+ /// If handle points to a Popup, the downcast produces valid handle.
+ /// If not the returned handle is left uninitialized.
+ ///
+ /// Handle to an object + /// handle to a Popup or an uninitialized handle + public new static Popup DownCast(BaseHandle handle) + { + Popup ret = new Popup(NDalicPINVOKE.Popup_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Sets a title for this Popup. + /// + /// The actor to set a title + public void SetTitle(View titleView) + { + NDalicPINVOKE.Popup_SetTitle(swigCPtr, View.getCPtr(titleView)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal View GetTitle() + { + View ret = new View(NDalicPINVOKE.Popup_GetTitle(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Sets the content actor. + /// + /// The actor to use + public void SetContent(View content) + { + NDalicPINVOKE.Popup_SetContent(swigCPtr, View.getCPtr(content)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal View GetContent() + { + View ret = new View(NDalicPINVOKE.Popup_GetContent(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Sets the actor to use for a footer in this Popup. + /// + /// The footer actor to be added to this Popup + public void SetFooter(View footer) + { + NDalicPINVOKE.Popup_SetFooter(swigCPtr, View.getCPtr(footer)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal View GetFooter() + { + View ret = new View(NDalicPINVOKE.Popup_GetFooter(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Sets the display state of Popup.
+ /// There are 4 total display states.
+ /// Only 2 can be set, but all four can be read for better inspection of the current popup state.
+ ///
+ /// The other two states are getable, but not setable and are there for consistency.
+ ///
+ /// | Value | Setting the state | Getting the state |
+ /// |----------|--------------------------------|--------------------------------|
+ /// | SHOWN | Show the popup | The popup is fully shown |
+ /// | HIDDEN | Hide the popup | The popup is fully hidden |
+ /// | SHOWING | | The popup is transitioning in |
+ /// | HIDING | | The popup is transitioning out |
+ ///
+ /// All 4 state changes cause notifications via 4 respective signals that can be connected to.
+ ///
+ /// The desired display state to change to + public void SetDisplayState(Popup.DisplayStateType displayState) + { + NDalicPINVOKE.Popup_SetDisplayState(swigCPtr, (int)displayState); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal Popup.DisplayStateType GetDisplayState() + { + Popup.DisplayStateType ret = (Popup.DisplayStateType)NDalicPINVOKE.Popup_GetDisplayState(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal VoidSignal OutsideTouchedSignal() + { + VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_OutsideTouchedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal VoidSignal ShowingSignal() + { + VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_ShowingSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal VoidSignal ShownSignal() + { + VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_ShownSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal VoidSignal HidingSignal() + { + VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_HidingSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal VoidSignal HiddenSignal() + { + VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_HiddenSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal enum PropertyRange + { + PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, + PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000 + } + + /// + /// The display states of the Popup. + /// + public enum DisplayStateType + { + Showing, + Shown, + Hiding, + Hidden + } + + /// + /// The animation mode within popup.
+ /// Choose from a predefined mode or "CUSTOM" to use the ANIMATION_IN and ANIMATION_OUT properties.
+ ///
+ public enum AnimationModeType + { + None, + Zoom, + Fade, + Custom + } + + /// + /// Types of contextual layout.
+ /// The Popup is positioned adjacent to it's parent in the direction specified by this mode.
+ /// NON_CONTEXTUAL disables any contextual positioning.
+ ///
+ public enum ContextualModeType + { + NonContextual, + Above, + Rright, + Below, + Left + } + + /// + /// Popup title. + /// + public PropertyMap Title + { + get + { + PropertyMap temp = new PropertyMap(); + GetProperty(Popup.Property.TITLE).Get(temp); + return temp; + } + set + { + SetProperty(Popup.Property.TITLE, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// Popup content. + /// + public PropertyMap Content + { + get + { + PropertyMap temp = new PropertyMap(); + GetProperty(Popup.Property.CONTENT).Get(temp); + return temp; + } + set + { + SetProperty(Popup.Property.CONTENT, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// Popup footer. + /// + public PropertyMap Footer + { + get + { + PropertyMap temp = new PropertyMap(); + GetProperty(Popup.Property.FOOTER).Get(temp); + return temp; + } + set + { + SetProperty(Popup.Property.FOOTER, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// Popup display state. + /// + public DisplayStateType DisplayState + { + get + { + string temp; + if (GetProperty(Popup.Property.DISPLAY_STATE).Get(out temp) == false) + { +#if DEBUG_ON + Tizen.Log.Error("NUI", "DisplayState get error!"); +#endif + } + switch (temp) + { + case "SHOWING": + return DisplayStateType.Showing; + case "SHOWN": + return DisplayStateType.Shown; + case "HIDING": + return DisplayStateType.Hiding; + case "HIDDEN": + return DisplayStateType.Hidden; + default: + return DisplayStateType.Hidden; + } + } + set + { + string valueToString = ""; + switch (value) + { + case DisplayStateType.Showing: + { + valueToString = "SHOWING"; + break; + } + case DisplayStateType.Shown: + { + valueToString = "SHOWN"; + break; + } + case DisplayStateType.Hiding: + { + valueToString = "HIDING"; + break; + } + case DisplayStateType.Hidden: + { + valueToString = "HIDDEN"; + break; + } + default: + { + valueToString = "HIDDEN"; + break; + } + } + SetProperty(Popup.Property.DISPLAY_STATE, new Tizen.NUI.PropertyValue(valueToString)); + } + } + /// + /// Touch transparent. + /// + public bool TouchTransparent + { + get + { + bool temp = false; + GetProperty(Popup.Property.TOUCH_TRANSPARENT).Get(ref temp); + return temp; + } + set + { + SetProperty(Popup.Property.TOUCH_TRANSPARENT, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// Popup tail visibility. + /// + public bool TailVisibility + { + get + { + bool temp = false; + GetProperty(Popup.Property.TAIL_VISIBILITY).Get(ref temp); + return temp; + } + set + { + SetProperty(Popup.Property.TAIL_VISIBILITY, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// Popup tail position. + /// + public Vector3 TailPosition + { + get + { + Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f); + GetProperty(Popup.Property.TAIL_POSITION).Get(temp); + return temp; + } + set + { + SetProperty(Popup.Property.TAIL_POSITION, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// Contextual mode. + /// + public ContextualModeType ContextualMode + { + get + { + string temp; + if (GetProperty(Popup.Property.CONTEXTUAL_MODE).Get(out temp) == false) + { +#if DEBUG_ON + Tizen.Log.Error("NUI", "ContextualMode get error!"); +#endif + } + switch (temp) + { + case "NON_CONTEXTUAL": + return ContextualModeType.NonContextual; + case "ABOVE": + return ContextualModeType.Above; + case "RIGHT": + return ContextualModeType.Rright; + case "BELOW": + return ContextualModeType.Below; + case "LEFT": + return ContextualModeType.Left; + default: + return ContextualModeType.Below; + } + } + set + { + string valueToString = ""; + switch (value) + { + case ContextualModeType.NonContextual: + { + valueToString = "NON_CONTEXTUAL"; + break; + } + case ContextualModeType.Above: + { + valueToString = "ABOVE"; + break; + } + case ContextualModeType.Rright: + { + valueToString = "RIGHT"; + break; + } + case ContextualModeType.Below: + { + valueToString = "BELOW"; + break; + } + case ContextualModeType.Left: + { + valueToString = "LEFT"; + break; + } + default: + { + valueToString = "BELOW"; + break; + } + } + SetProperty(Popup.Property.CONTEXTUAL_MODE, new Tizen.NUI.PropertyValue(valueToString)); + } + } + /// + /// Animation duration. + /// + public float AnimationDuration + { + get + { + float temp = 0.0f; + GetProperty(Popup.Property.ANIMATION_DURATION).Get(ref temp); + return temp; + } + set + { + SetProperty(Popup.Property.ANIMATION_DURATION, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// Animation mode. + /// + public AnimationModeType AnimationMode + { + get + { + string temp; + if (GetProperty(Popup.Property.ANIMATION_MODE).Get(out temp) == false) + { +#if DEBUG_ON + Tizen.Log.Error("NUI", "AnimationMode get error!"); +#endif + } + switch (temp) + { + case "NONE": + return AnimationModeType.None; + case "ZOOM": + return AnimationModeType.Zoom; + case "FADE": + return AnimationModeType.Fade; + case "CUSTOM": + return AnimationModeType.Custom; + default: + return AnimationModeType.Fade; + } + } + set + { + string valueToString = ""; + switch (value) + { + case AnimationModeType.None: + { + valueToString = "NONE"; + break; + } + case AnimationModeType.Zoom: + { + valueToString = "ZOOM"; + break; + } + case AnimationModeType.Fade: + { + valueToString = "FADE"; + break; + } + case AnimationModeType.Custom: + { + valueToString = "CUSTOM"; + break; + } + default: + { + valueToString = "FADE"; + break; + } + } + SetProperty(Popup.Property.ANIMATION_MODE, new Tizen.NUI.PropertyValue(valueToString)); + } + } + /// + /// Entry animation. + /// + public PropertyMap EntryAnimation + { + get + { + PropertyMap temp = new PropertyMap(); + GetProperty(Popup.Property.ENTRY_ANIMATION).Get(temp); + return temp; + } + set + { + SetProperty(Popup.Property.ENTRY_ANIMATION, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// Exit animation. + /// + public PropertyMap ExitAnimation + { + get + { + PropertyMap temp = new PropertyMap(); + GetProperty(Popup.Property.EXIT_ANIMATION).Get(temp); + return temp; + } + set + { + SetProperty(Popup.Property.EXIT_ANIMATION, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// Auto hide delay. + /// + public int AutoHideDelay + { + get + { + int temp = 0; + GetProperty(Popup.Property.AUTO_HIDE_DELAY).Get(ref temp); + return temp; + } + set + { + SetProperty(Popup.Property.AUTO_HIDE_DELAY, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// Backing enabled. + /// + public bool BackingEnabled + { + get + { + bool temp = false; + GetProperty(Popup.Property.BACKING_ENABLED).Get(ref temp); + return temp; + } + set + { + SetProperty(Popup.Property.BACKING_ENABLED, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// Backing color. + /// + public Vector4 BackingColor + { + get + { + Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); + GetProperty(Popup.Property.BACKING_COLOR).Get(temp); + return temp; + } + set + { + SetProperty(Popup.Property.BACKING_COLOR, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// Background image. + /// + public string PopupBackgroundImage + { + get + { + string temp; + GetProperty(Popup.Property.POPUP_BACKGROUND_IMAGE).Get(out temp); + return temp; + } + set + { + SetProperty(Popup.Property.POPUP_BACKGROUND_IMAGE, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// Background border. + /// + public Rectangle PopupBackgroundBorder + { + get + { + Rectangle temp = new Rectangle(0, 0, 0, 0); + GetProperty(Popup.Property.POPUP_BACKGROUND_BORDER).Get(temp); + return temp; + } + set + { + SetProperty(Popup.Property.POPUP_BACKGROUND_BORDER, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// Tail up image. + /// + public string TailUpImage + { + get + { + string temp; + GetProperty(Popup.Property.TAIL_UP_IMAGE).Get(out temp); + return temp; + } + set + { + SetProperty(Popup.Property.TAIL_UP_IMAGE, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// Tail down image. + /// + public string TailDownImage + { + get + { + string temp; + GetProperty(Popup.Property.TAIL_DOWN_IMAGE).Get(out temp); + return temp; + } + set + { + SetProperty(Popup.Property.TAIL_DOWN_IMAGE, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// Tail left image. + /// + public string TailLeftImage + { + get + { + string temp; + GetProperty(Popup.Property.TAIL_LEFT_IMAGE).Get(out temp); + return temp; + } + set + { + SetProperty(Popup.Property.TAIL_LEFT_IMAGE, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// Tail right image. + /// + public string TailRightImage + { + get + { + string temp; + GetProperty(Popup.Property.TAIL_RIGHT_IMAGE).Get(out temp); + return temp; + } + set + { + SetProperty(Popup.Property.TAIL_RIGHT_IMAGE, new Tizen.NUI.PropertyValue(value)); + } + } + + } + +} diff --git a/src/Tizen.NUI/src/public/UIComponents/RadioButton.cs b/src/Tizen.NUI/src/public/UIComponents/RadioButton.cs new file mode 100755 index 000000000..150ffb20e --- /dev/null +++ b/src/Tizen.NUI/src/public/UIComponents/RadioButton.cs @@ -0,0 +1,140 @@ +/** 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. +//------------------------------------------------------------------------------ + +namespace Tizen.NUI.UIComponents +{ + + /// + /// A RadioButton provides a radio button which two states \e selected or \e unselected.
+ /// Radio buttons are designed to select one of many option at the same time.
+ /// RadioButton can change its current state using Selected.
+ ///
+ /// RadioButtons can be grouped.
+ /// Two or more RadioButtons are in one group when they have this same parent.
+ /// In each groups only one RadioButton can be \e selected at a given time.
+ /// So when RadioButton is set to \e selected, other RadioButtons in its group are set to \e unselected.
+ /// When \e selected RadioButton is set to \e unselected no other RadioButtons in his group is set to \e selected.
+ ///
+ /// A StateChanged Event is emitted when the RadioButton change its state to \e selected or \e unselected.
+ ///
+ public class RadioButton : Button + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal RadioButton(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.RadioButton_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RadioButton obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + /// + /// To make RadioButton instance be disposed. + /// + 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. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_RadioButton(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + /// + /// Creates an uninitialized RadioButton + /// + public RadioButton() : this(NDalicPINVOKE.RadioButton_New__SWIG_0(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + + /// + /// Creates an uninitialized RadioButton with Label + /// + /// Label text + public RadioButton(string label) : this(NDalicPINVOKE.RadioButton_New__SWIG_1(label), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + internal RadioButton(RadioButton radioButton) : this(NDalicPINVOKE.new_RadioButton__SWIG_1(RadioButton.getCPtr(radioButton)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal RadioButton Assign(RadioButton radioButton) + { + RadioButton ret = new RadioButton(NDalicPINVOKE.RadioButton_Assign(swigCPtr, RadioButton.getCPtr(radioButton)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Downcasts a handle to RadioButton handle. + /// If handle points to a RadioButton, the downcast produces valid handle. + /// If not, the returned handle is left uninitialized. + /// + /// Handle to an object + /// A handle to a RadioButton or an uninitialized handle + public new static RadioButton DownCast(BaseHandle handle) + { + RadioButton ret = new RadioButton(NDalicPINVOKE.RadioButton_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + } + +} diff --git a/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs b/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs index 4236141e8..7b4f6b583 100755 --- a/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs +++ b/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs @@ -359,19 +359,6 @@ namespace Tizen.NUI.UIComponents return ret; } - internal void SetScrollPositionIntervals(VectorFloat positions) - { - NDalicPINVOKE.ScrollBar_SetScrollPositionIntervals(swigCPtr, VectorFloat.getCPtr(positions)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal VectorFloat GetScrollPositionIntervals() - { - VectorFloat ret = new VectorFloat(NDalicPINVOKE.ScrollBar_GetScrollPositionIntervals(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - internal void SetScrollDirection(ScrollBar.Direction direction) { NDalicPINVOKE.ScrollBar_SetScrollDirection(swigCPtr, (int)direction); diff --git a/src/Tizen.NUI/src/public/UIComponents/ScrollView.cs b/src/Tizen.NUI/src/public/UIComponents/ScrollView.cs new file mode 100755 index 000000000..9fd9ae82a --- /dev/null +++ b/src/Tizen.NUI/src/public/UIComponents/ScrollView.cs @@ -0,0 +1,1139 @@ +/** 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. +//------------------------------------------------------------------------------ + +namespace Tizen.NUI +{ + + using System; + using System.Runtime.InteropServices; + using Tizen.NUI.BaseComponents; + + public class ScrollView : Scrollable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal ScrollView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ScrollView_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ScrollView obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + 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. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ScrollView(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + /** + * @brief Event arguments that passed via SnapStarted signal + * + */ + public class SnapStartedEventArgs : EventArgs + { + private Tizen.NUI.ScrollView.SnapEvent _snapEvent; + + /** + * @brief SnapEvent - is the SnapEvent information like snap or flick (it tells the target position, scale, rotation for the snap or flick). + * + */ + public Tizen.NUI.ScrollView.SnapEvent SnapEventInfo + { + get + { + return _snapEvent; + } + set + { + _snapEvent = value; + } + } + } + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void SnapStartedCallbackDelegate(IntPtr data); + private DaliEventHandler _scrollViewSnapStartedEventHandler; + private SnapStartedCallbackDelegate _scrollViewSnapStartedCallbackDelegate; + + /** + * @brief Event for SnapStarted signal which can be used to subscribe/unsubscribe the event handler + * (in the type of SnapStartedEventHandler-DaliEventHandler) provided by the user. + * SnapStarted signal is emitted hen the ScrollView has started to snap or flick (it tells the target + * position, scale, rotation for the snap or flick). + * + */ + public event DaliEventHandler SnapStarted + { + add + { + lock (this) + { + // Restricted to only one listener + if (_scrollViewSnapStartedEventHandler == null) + { + _scrollViewSnapStartedEventHandler += value; + + _scrollViewSnapStartedCallbackDelegate = new SnapStartedCallbackDelegate(OnSnapStarted); + this.SnapStartedSignal().Connect(_scrollViewSnapStartedCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_scrollViewSnapStartedEventHandler != null) + { + this.SnapStartedSignal().Disconnect(_scrollViewSnapStartedCallbackDelegate); + } + + _scrollViewSnapStartedEventHandler -= value; + } + } + } + + // Callback for ScrollView SnapStarted signal + private void OnSnapStarted(IntPtr data) + { + SnapStartedEventArgs e = new SnapStartedEventArgs(); + + // Populate all members of "e" (SnapStartedEventArgs) with real data + e.SnapEventInfo = SnapEvent.GetSnapEventFromPtr(data); + + if (_scrollViewSnapStartedEventHandler != null) + { + //here we send all data to user event handlers + _scrollViewSnapStartedEventHandler(this, e); + } + } + + + public class ClampEvent : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal ClampEvent(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(ClampEvent 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; + + + ~ClampEvent() + { + 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_ScrollView_ClampEvent(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public ClampEvent() : this(NDalicPINVOKE.new_ScrollView_ClampEvent(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } + + public class SnapEvent : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal SnapEvent(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(SnapEvent 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; + + + ~SnapEvent() + { + 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_ScrollView_SnapEvent(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public static SnapEvent GetSnapEventFromPtr(global::System.IntPtr cPtr) + { + SnapEvent ret = new SnapEvent(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal SnapType type + { + set + { + NDalicPINVOKE.ScrollView_SnapEvent_type_set(swigCPtr, (int)value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + SnapType ret = (SnapType)NDalicPINVOKE.ScrollView_SnapEvent_type_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public Vector2 position + { + set + { + NDalicPINVOKE.ScrollView_SnapEvent_position_set(swigCPtr, Vector2.getCPtr(value)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.ScrollView_SnapEvent_position_get(swigCPtr); + Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public float duration + { + set + { + NDalicPINVOKE.ScrollView_SnapEvent_duration_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = NDalicPINVOKE.ScrollView_SnapEvent_duration_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + public SnapEvent() : this(NDalicPINVOKE.new_ScrollView_SnapEvent(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } + + public class Property : global::System.IDisposable + { + 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_ScrollView_Property(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public Property() : this(NDalicPINVOKE.new_ScrollView_Property(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly int WRAP_ENABLED = NDalicPINVOKE.ScrollView_Property_WRAP_ENABLED_get(); + public static readonly int PANNING_ENABLED = NDalicPINVOKE.ScrollView_Property_PANNING_ENABLED_get(); + public static readonly int AXIS_AUTO_LOCK_ENABLED = NDalicPINVOKE.ScrollView_Property_AXIS_AUTO_LOCK_ENABLED_get(); + public static readonly int WHEEL_SCROLL_DISTANCE_STEP = NDalicPINVOKE.ScrollView_Property_WHEEL_SCROLL_DISTANCE_STEP_get(); + public static readonly int SCROLL_MODE = NDalicPINVOKE.ScrollView_Property_SCROLL_MODE_get(); + public static readonly int SCROLL_POSITION = NDalicPINVOKE.ScrollView_Property_SCROLL_POSITION_get(); + public static readonly int SCROLL_PRE_POSITION = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_get(); + public static readonly int SCROLL_PRE_POSITION_X = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_X_get(); + public static readonly int SCROLL_PRE_POSITION_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_Y_get(); + public static readonly int SCROLL_PRE_POSITION_MAX = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_MAX_get(); + public static readonly int SCROLL_PRE_POSITION_MAX_X = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_MAX_X_get(); + public static readonly int SCROLL_PRE_POSITION_MAX_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_MAX_Y_get(); + public static readonly int OVERSHOOT_X = NDalicPINVOKE.ScrollView_Property_OVERSHOOT_X_get(); + public static readonly int OVERSHOOT_Y = NDalicPINVOKE.ScrollView_Property_OVERSHOOT_Y_get(); + public static readonly int SCROLL_FINAL = NDalicPINVOKE.ScrollView_Property_SCROLL_FINAL_get(); + public static readonly int SCROLL_FINAL_X = NDalicPINVOKE.ScrollView_Property_SCROLL_FINAL_X_get(); + public static readonly int SCROLL_FINAL_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_FINAL_Y_get(); + public static readonly int WRAP = NDalicPINVOKE.ScrollView_Property_WRAP_get(); + public static readonly int PANNING = NDalicPINVOKE.ScrollView_Property_PANNING_get(); + public static readonly int SCROLLING = NDalicPINVOKE.ScrollView_Property_SCROLLING_get(); + public static readonly int SCROLL_DOMAIN_SIZE = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_SIZE_get(); + public static readonly int SCROLL_DOMAIN_SIZE_X = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_SIZE_X_get(); + public static readonly int SCROLL_DOMAIN_SIZE_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_SIZE_Y_get(); + public static readonly int SCROLL_DOMAIN_OFFSET = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_OFFSET_get(); + public static readonly int SCROLL_POSITION_DELTA = NDalicPINVOKE.ScrollView_Property_SCROLL_POSITION_DELTA_get(); + public static readonly int START_PAGE_POSITION = NDalicPINVOKE.ScrollView_Property_START_PAGE_POSITION_get(); + + } + + public ScrollView() : this(NDalicPINVOKE.ScrollView_New(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public ScrollView(ScrollView handle) : this(NDalicPINVOKE.new_ScrollView__SWIG_1(ScrollView.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ScrollView Assign(ScrollView handle) + { + ScrollView ret = new ScrollView(NDalicPINVOKE.ScrollView_Assign(swigCPtr, ScrollView.getCPtr(handle)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public new static ScrollView DownCast(BaseHandle handle) + { + ScrollView ret = new ScrollView(NDalicPINVOKE.ScrollView_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public AlphaFunction GetScrollSnapAlphaFunction() + { + AlphaFunction ret = new AlphaFunction(NDalicPINVOKE.ScrollView_GetScrollSnapAlphaFunction(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetScrollSnapAlphaFunction(AlphaFunction alpha) + { + NDalicPINVOKE.ScrollView_SetScrollSnapAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public AlphaFunction GetScrollFlickAlphaFunction() + { + AlphaFunction ret = new AlphaFunction(NDalicPINVOKE.ScrollView_GetScrollFlickAlphaFunction(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetScrollFlickAlphaFunction(AlphaFunction alpha) + { + NDalicPINVOKE.ScrollView_SetScrollFlickAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetScrollSnapDuration() + { + float ret = NDalicPINVOKE.ScrollView_GetScrollSnapDuration(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetScrollSnapDuration(float time) + { + NDalicPINVOKE.ScrollView_SetScrollSnapDuration(swigCPtr, time); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetScrollFlickDuration() + { + float ret = NDalicPINVOKE.ScrollView_GetScrollFlickDuration(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetScrollFlickDuration(float time) + { + NDalicPINVOKE.ScrollView_SetScrollFlickDuration(swigCPtr, time); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + + public void SetScrollSensitive(bool sensitive) + { + NDalicPINVOKE.ScrollView_SetScrollSensitive(swigCPtr, sensitive); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetMaxOvershoot(float overshootX, float overshootY) + { + NDalicPINVOKE.ScrollView_SetMaxOvershoot(swigCPtr, overshootX, overshootY); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetSnapOvershootAlphaFunction(AlphaFunction alpha) + { + NDalicPINVOKE.ScrollView_SetSnapOvershootAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetSnapOvershootDuration(float duration) + { + NDalicPINVOKE.ScrollView_SetSnapOvershootDuration(swigCPtr, duration); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetViewAutoSnap(bool enable) + { + NDalicPINVOKE.ScrollView_SetActorAutoSnap(swigCPtr, enable); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetWrapMode(bool enable) + { + NDalicPINVOKE.ScrollView_SetWrapMode(swigCPtr, enable); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public int GetScrollUpdateDistance() + { + int ret = NDalicPINVOKE.ScrollView_GetScrollUpdateDistance(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetScrollUpdateDistance(int distance) + { + NDalicPINVOKE.ScrollView_SetScrollUpdateDistance(swigCPtr, distance); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool GetAxisAutoLock() + { + bool ret = NDalicPINVOKE.ScrollView_GetAxisAutoLock(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetAxisAutoLock(bool enable) + { + NDalicPINVOKE.ScrollView_SetAxisAutoLock(swigCPtr, enable); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetAxisAutoLockGradient() + { + float ret = NDalicPINVOKE.ScrollView_GetAxisAutoLockGradient(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetAxisAutoLockGradient(float gradient) + { + NDalicPINVOKE.ScrollView_SetAxisAutoLockGradient(swigCPtr, gradient); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetFrictionCoefficient() + { + float ret = NDalicPINVOKE.ScrollView_GetFrictionCoefficient(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetFrictionCoefficient(float friction) + { + NDalicPINVOKE.ScrollView_SetFrictionCoefficient(swigCPtr, friction); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetFlickSpeedCoefficient() + { + float ret = NDalicPINVOKE.ScrollView_GetFlickSpeedCoefficient(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetFlickSpeedCoefficient(float speed) + { + NDalicPINVOKE.ScrollView_SetFlickSpeedCoefficient(swigCPtr, speed); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Vector2 GetMinimumDistanceForFlick() + { + Vector2 ret = new Vector2(NDalicPINVOKE.ScrollView_GetMinimumDistanceForFlick(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetMinimumDistanceForFlick(Vector2 distance) + { + NDalicPINVOKE.ScrollView_SetMinimumDistanceForFlick(swigCPtr, Vector2.getCPtr(distance)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetMinimumSpeedForFlick() + { + float ret = NDalicPINVOKE.ScrollView_GetMinimumSpeedForFlick(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetMinimumSpeedForFlick(float speed) + { + NDalicPINVOKE.ScrollView_SetMinimumSpeedForFlick(swigCPtr, speed); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public float GetMaxFlickSpeed() + { + float ret = NDalicPINVOKE.ScrollView_GetMaxFlickSpeed(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetMaxFlickSpeed(float speed) + { + NDalicPINVOKE.ScrollView_SetMaxFlickSpeed(swigCPtr, speed); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Vector2 GetWheelScrollDistanceStep() + { + Vector2 ret = new Vector2(NDalicPINVOKE.ScrollView_GetWheelScrollDistanceStep(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void SetWheelScrollDistanceStep(Vector2 step) + { + NDalicPINVOKE.ScrollView_SetWheelScrollDistanceStep(swigCPtr, Vector2.getCPtr(step)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public Vector2 GetCurrentScrollPosition() + { + Vector2 ret = new Vector2(NDalicPINVOKE.ScrollView_GetCurrentScrollPosition(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetCurrentPage() + { + uint ret = NDalicPINVOKE.ScrollView_GetCurrentPage(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void ScrollTo(Vector2 position) + { + NDalicPINVOKE.ScrollView_ScrollTo__SWIG_0(swigCPtr, Vector2.getCPtr(position)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ScrollTo(Vector2 position, float duration) + { + NDalicPINVOKE.ScrollView_ScrollTo__SWIG_1(swigCPtr, Vector2.getCPtr(position), duration); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ScrollTo(Vector2 position, float duration, AlphaFunction alpha) + { + NDalicPINVOKE.ScrollView_ScrollTo__SWIG_2(swigCPtr, Vector2.getCPtr(position), duration, AlphaFunction.getCPtr(alpha)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ScrollTo(Vector2 position, float duration, DirectionBias horizontalBias, DirectionBias verticalBias) + { + NDalicPINVOKE.ScrollView_ScrollTo__SWIG_3(swigCPtr, Vector2.getCPtr(position), duration, (int)horizontalBias, (int)verticalBias); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ScrollTo(Vector2 position, float duration, AlphaFunction alpha, DirectionBias horizontalBias, DirectionBias verticalBias) + { + NDalicPINVOKE.ScrollView_ScrollTo__SWIG_4(swigCPtr, Vector2.getCPtr(position), duration, AlphaFunction.getCPtr(alpha), (int)horizontalBias, (int)verticalBias); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ScrollTo(uint page) + { + NDalicPINVOKE.ScrollView_ScrollTo__SWIG_5(swigCPtr, page); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ScrollTo(uint page, float duration) + { + NDalicPINVOKE.ScrollView_ScrollTo__SWIG_6(swigCPtr, page, duration); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ScrollTo(uint page, float duration, DirectionBias bias) + { + NDalicPINVOKE.ScrollView_ScrollTo__SWIG_7(swigCPtr, page, duration, (int)bias); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ScrollTo(View view) + { + NDalicPINVOKE.ScrollView_ScrollTo__SWIG_8(swigCPtr, View.getCPtr(view)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ScrollTo(View view, float duration) + { + NDalicPINVOKE.ScrollView_ScrollTo__SWIG_9(swigCPtr, View.getCPtr(view), duration); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public bool ScrollToSnapPoint() + { + bool ret = NDalicPINVOKE.ScrollView_ScrollToSnapPoint(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal void ApplyConstraintToChildren(SWIGTYPE_p_Dali__Constraint constraint) + { + NDalicPINVOKE.ScrollView_ApplyConstraintToChildren(swigCPtr, SWIGTYPE_p_Dali__Constraint.getCPtr(constraint)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveConstraintsFromChildren() + { + NDalicPINVOKE.ScrollView_RemoveConstraintsFromChildren(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void ApplyEffect(ScrollViewEffect effect) + { + NDalicPINVOKE.ScrollView_ApplyEffect(swigCPtr, ScrollViewEffect.getCPtr(effect)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveEffect(ScrollViewEffect effect) + { + NDalicPINVOKE.ScrollView_RemoveEffect(swigCPtr, ScrollViewEffect.getCPtr(effect)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveAllEffects() + { + NDalicPINVOKE.ScrollView_RemoveAllEffects(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void BindView(View child) + { + NDalicPINVOKE.ScrollView_BindActor(swigCPtr, View.getCPtr(child)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void UnbindView(View child) + { + NDalicPINVOKE.ScrollView_UnbindActor(swigCPtr, View.getCPtr(child)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetScrollingDirection(Radian direction, Radian threshold) + { + NDalicPINVOKE.ScrollView_SetScrollingDirection__SWIG_0(swigCPtr, Radian.getCPtr(direction), Radian.getCPtr(threshold)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void SetScrollingDirection(Radian direction) + { + NDalicPINVOKE.ScrollView_SetScrollingDirection__SWIG_1(swigCPtr, Radian.getCPtr(direction)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void RemoveScrollingDirection(Radian direction) + { + NDalicPINVOKE.ScrollView_RemoveScrollingDirection(swigCPtr, Radian.getCPtr(direction)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal ScrollViewSnapStartedSignal SnapStartedSignal() + { + ScrollViewSnapStartedSignal ret = new ScrollViewSnapStartedSignal(NDalicPINVOKE.ScrollView_SnapStartedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public enum PropertyRange + { + PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, + PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000, + ANIMATABLE_PROPERTY_START_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, + ANIMATABLE_PROPERTY_END_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 + } + + public bool WrapEnabled + { + get + { + bool temp = false; + GetProperty(ScrollView.Property.WRAP_ENABLED).Get(ref temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.WRAP_ENABLED, new Tizen.NUI.PropertyValue(value)); + } + } + public bool PanningEnabled + { + get + { + bool temp = false; + GetProperty(ScrollView.Property.PANNING_ENABLED).Get(ref temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.PANNING_ENABLED, new Tizen.NUI.PropertyValue(value)); + } + } + public bool AxisAutoLockEnabled + { + get + { + bool temp = false; + GetProperty(ScrollView.Property.AXIS_AUTO_LOCK_ENABLED).Get(ref temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.AXIS_AUTO_LOCK_ENABLED, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 WheelScrollDistanceStep + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(ScrollView.Property.WHEEL_SCROLL_DISTANCE_STEP).Get(temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.WHEEL_SCROLL_DISTANCE_STEP, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ScrollPosition + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(ScrollView.Property.SCROLL_POSITION).Get(temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.SCROLL_POSITION, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ScrollPrePosition + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(ScrollView.Property.SCROLL_PRE_POSITION).Get(temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.SCROLL_PRE_POSITION, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ScrollPrePositionMax + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(ScrollView.Property.SCROLL_PRE_POSITION_MAX).Get(temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.SCROLL_PRE_POSITION_MAX, new Tizen.NUI.PropertyValue(value)); + } + } + public float OvershootX + { + get + { + float temp = 0.0f; + GetProperty(ScrollView.Property.OVERSHOOT_X).Get(ref temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.OVERSHOOT_X, new Tizen.NUI.PropertyValue(value)); + } + } + public float OvershootY + { + get + { + float temp = 0.0f; + GetProperty(ScrollView.Property.OVERSHOOT_Y).Get(ref temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.OVERSHOOT_Y, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ScrollFinal + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(ScrollView.Property.SCROLL_FINAL).Get(temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.SCROLL_FINAL, new Tizen.NUI.PropertyValue(value)); + } + } + public bool Wrap + { + get + { + bool temp = false; + GetProperty(ScrollView.Property.WRAP).Get(ref temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.WRAP, new Tizen.NUI.PropertyValue(value)); + } + } + public bool Panning + { + get + { + bool temp = false; + GetProperty(ScrollView.Property.PANNING).Get(ref temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.PANNING, new Tizen.NUI.PropertyValue(value)); + } + } + public bool Scrolling + { + get + { + bool temp = false; + GetProperty(ScrollView.Property.SCROLLING).Get(ref temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.SCROLLING, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ScrollDomainSize + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(ScrollView.Property.SCROLL_DOMAIN_SIZE).Get(temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.SCROLL_DOMAIN_SIZE, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ScrollDomainOffset + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(ScrollView.Property.SCROLL_DOMAIN_OFFSET).Get(temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.SCROLL_DOMAIN_OFFSET, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector2 ScrollPositionDelta + { + get + { + Vector2 temp = new Vector2(0.0f, 0.0f); + GetProperty(ScrollView.Property.SCROLL_POSITION_DELTA).Get(temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.SCROLL_POSITION_DELTA, new Tizen.NUI.PropertyValue(value)); + } + } + public Vector3 StartPagePosition + { + get + { + Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f); + GetProperty(ScrollView.Property.START_PAGE_POSITION).Get(temp); + return temp; + } + set + { + SetProperty(ScrollView.Property.START_PAGE_POSITION, new Tizen.NUI.PropertyValue(value)); + } + } + + public PropertyMap ScrollMode + { + get + { + PropertyValue value = GetProperty( ScrollView.Property.SCROLL_MODE ); + PropertyMap map = new PropertyMap(); + value.Get( map ); + return map; + } + set + { + SetProperty( ScrollView.Property.SCROLL_MODE, new PropertyValue( value ) ); + } + } + + } + +} diff --git a/src/Tizen.NUI/src/public/UIComponents/ToggleButton.cs b/src/Tizen.NUI/src/public/UIComponents/ToggleButton.cs new file mode 100755 index 000000000..034f03e13 --- /dev/null +++ b/src/Tizen.NUI/src/public/UIComponents/ToggleButton.cs @@ -0,0 +1,246 @@ +/** 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. +//------------------------------------------------------------------------------ + +using Tizen.NUI.BaseComponents; + +namespace Tizen.NUI +{ + + public class ToggleButton : Tizen.NUI.UIComponents.Button + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal ToggleButton(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ToggleButton_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ToggleButton obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + 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. + + //Unreference this from if a static instance refer to this. + ViewRegistry.UnregisterView(this); + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_ToggleButton(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + public class Property : global::System.IDisposable + { + 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_ToggleButton_Property(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public Property() : this(NDalicPINVOKE.new_ToggleButton_Property(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public static readonly int STATE_VISUALS = NDalicPINVOKE.ToggleButton_Property_STATE_VISUALS_get(); + public static readonly int TOOLTIPS = NDalicPINVOKE.ToggleButton_Property_TOOLTIPS_get(); + public static readonly int CURRENT_STATE_INDEX = NDalicPINVOKE.ToggleButton_Property_CURRENT_STATE_INDEX_get(); + + } + + public ToggleButton() : this(NDalicPINVOKE.ToggleButton_New(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + public ToggleButton(ToggleButton toggleButton) : this(NDalicPINVOKE.new_ToggleButton__SWIG_1(ToggleButton.getCPtr(toggleButton)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public ToggleButton Assign(ToggleButton toggleButton) + { + ToggleButton ret = new ToggleButton(NDalicPINVOKE.ToggleButton_Assign(swigCPtr, ToggleButton.getCPtr(toggleButton)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public new static ToggleButton DownCast(BaseHandle handle) + { + ToggleButton ret = new ToggleButton(NDalicPINVOKE.ToggleButton_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public enum PropertyRange + { + PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, + PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000 + } + + public Tizen.NUI.PropertyArray StateVisuals + { + get + { + Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray(); + GetProperty(ToggleButton.Property.STATE_VISUALS).Get(temp); + return temp; + } + set + { + SetProperty(ToggleButton.Property.STATE_VISUALS, new Tizen.NUI.PropertyValue(value)); + } + } + public Tizen.NUI.PropertyArray Tooltips + { + get + { + Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray(); + GetProperty(ToggleButton.Property.TOOLTIPS).Get(temp); + return temp; + } + set + { + SetProperty(ToggleButton.Property.TOOLTIPS, new Tizen.NUI.PropertyValue(value)); + } + } + public int CurrentStateIndex + { + get + { + int temp = 0; + GetProperty(ToggleButton.Property.CURRENT_STATE_INDEX).Get(ref temp); + return temp; + } + set + { + SetProperty(ToggleButton.Property.CURRENT_STATE_INDEX, new Tizen.NUI.PropertyValue(value)); + } + } + + } + +}