From 363d383e6c2e180ccca394ed0cfd67af1f4ba3cb Mon Sep 17 00:00:00 2001 From: "dongsug.song" Date: Wed, 21 Jun 2017 14:52:20 +0900 Subject: [PATCH] [Tizen] changes for preview#4 release This reverts commit 3db01ca6f82d2a454e67ec698de0bcbf94c1d172. Conflicts: Tizen.NUI/src/public/BaseComponents/View.cs Tizen.NUI/src/public/NUIConstants.cs Change-Id: I15e15f06037fefa5e02fd14cb846c9e658d34610 --- Tizen.NUI/src/internal/Builder.cs | 2 +- Tizen.NUI/src/internal/Size.cs | 12 +- Tizen.NUI/src/internal/VideoViewSignal.cs | 2 + .../public/{ => BaseComponents}/FlexContainer.cs | 4 +- .../src/public/{ => BaseComponents}/Scrollable.cs | 3 +- .../src/public/{ => BaseComponents}/TableView.cs | 6 +- .../src/public/{ => BaseComponents}/VideoView.cs | 3 +- Tizen.NUI/src/public/BaseComponents/View.cs | 56 ++++++++ Tizen.NUI/src/public/NUIConstants.cs | 143 +++++++++++++++++++++ .../{internal => public/UIComponents}/Slider.cs | 2 +- Tizen.NUI/src/public/Window.cs | 16 +-- 11 files changed, 222 insertions(+), 27 deletions(-) rename Tizen.NUI/src/public/{ => BaseComponents}/FlexContainer.cs (99%) rename Tizen.NUI/src/public/{ => BaseComponents}/Scrollable.cs (99%) rename Tizen.NUI/src/public/{ => BaseComponents}/TableView.cs (99%) rename Tizen.NUI/src/public/{ => BaseComponents}/VideoView.cs (99%) rename Tizen.NUI/src/{internal => public/UIComponents}/Slider.cs (99%) diff --git a/Tizen.NUI/src/internal/Builder.cs b/Tizen.NUI/src/internal/Builder.cs index 0001b89..6e5a521 100755 --- a/Tizen.NUI/src/internal/Builder.cs +++ b/Tizen.NUI/src/internal/Builder.cs @@ -32,7 +32,7 @@ namespace Tizen.NUI using Tizen.NUI.BaseComponents; - internal class Builder : BaseHandle + public class Builder : BaseHandle { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/Tizen.NUI/src/internal/Size.cs b/Tizen.NUI/src/internal/Size.cs index c656b01..83cd23b 100755 --- a/Tizen.NUI/src/internal/Size.cs +++ b/Tizen.NUI/src/internal/Size.cs @@ -16,12 +16,12 @@ */ namespace Tizen.NUI -{ - - /// - /// Three dimensional size - /// - internal class Size : global::System.IDisposable +{ + + /*********************************************************************************/ + /*** will be removed/deprecated ***/ + /*********************************************************************************/ + public class Size : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/Tizen.NUI/src/internal/VideoViewSignal.cs b/Tizen.NUI/src/internal/VideoViewSignal.cs index 18b79f8..10ff327 100755 --- a/Tizen.NUI/src/internal/VideoViewSignal.cs +++ b/Tizen.NUI/src/internal/VideoViewSignal.cs @@ -8,6 +8,8 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ +using Tizen.NUI.BaseComponents; + namespace Tizen.NUI { internal class VideoViewSignal : global::System.IDisposable { diff --git a/Tizen.NUI/src/public/FlexContainer.cs b/Tizen.NUI/src/public/BaseComponents/FlexContainer.cs similarity index 99% rename from Tizen.NUI/src/public/FlexContainer.cs rename to Tizen.NUI/src/public/BaseComponents/FlexContainer.cs index 0e598d6..9dc26f7 100755 --- a/Tizen.NUI/src/public/FlexContainer.cs +++ b/Tizen.NUI/src/public/BaseComponents/FlexContainer.cs @@ -24,9 +24,7 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -using Tizen.NUI.BaseComponents; - -namespace Tizen.NUI +namespace Tizen.NUI.BaseComponents { /// /// FlexContainer implements a subset of the flexbox spec (defined by W3C):https://www.w3.org/TR/css3-flexbox/
diff --git a/Tizen.NUI/src/public/Scrollable.cs b/Tizen.NUI/src/public/BaseComponents/Scrollable.cs similarity index 99% rename from Tizen.NUI/src/public/Scrollable.cs rename to Tizen.NUI/src/public/BaseComponents/Scrollable.cs index f6edecc..4f747aa 100755 --- a/Tizen.NUI/src/public/Scrollable.cs +++ b/Tizen.NUI/src/public/BaseComponents/Scrollable.cs @@ -8,12 +8,11 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI +namespace Tizen.NUI.BaseComponents { using System; using System.Runtime.InteropServices; - using Tizen.NUI.BaseComponents; public class Scrollable : View { diff --git a/Tizen.NUI/src/public/TableView.cs b/Tizen.NUI/src/public/BaseComponents/TableView.cs similarity index 99% rename from Tizen.NUI/src/public/TableView.cs rename to Tizen.NUI/src/public/BaseComponents/TableView.cs index 01a94ea..7d8c0c7 100755 --- a/Tizen.NUI/src/public/TableView.cs +++ b/Tizen.NUI/src/public/BaseComponents/TableView.cs @@ -24,11 +24,9 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -using Tizen.NUI.BaseComponents; - -namespace Tizen.NUI +namespace Tizen.NUI.BaseComponents { - using Tizen.NUI.BaseComponents; + /// /// TableView is a layout container for aligning child actors in a grid like layout.
/// TableView constrains the x and y position and width and height of the child actors.
diff --git a/Tizen.NUI/src/public/VideoView.cs b/Tizen.NUI/src/public/BaseComponents/VideoView.cs similarity index 99% rename from Tizen.NUI/src/public/VideoView.cs rename to Tizen.NUI/src/public/BaseComponents/VideoView.cs index af52689..13e4b4b 100755 --- a/Tizen.NUI/src/public/VideoView.cs +++ b/Tizen.NUI/src/public/BaseComponents/VideoView.cs @@ -24,12 +24,11 @@ // the SWIG interface file instead. //------------------------------------------------------------------------------ -namespace Tizen.NUI +namespace Tizen.NUI.BaseComponents { using System; using System.Runtime.InteropServices; - using Tizen.NUI.BaseComponents; /// /// VideoView is a control for video playback and display. diff --git a/Tizen.NUI/src/public/BaseComponents/View.cs b/Tizen.NUI/src/public/BaseComponents/View.cs index 2ac63f0..9113d68 100755 --- a/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/Tizen.NUI/src/public/BaseComponents/View.cs @@ -3656,6 +3656,62 @@ namespace Tizen.NUI.BaseComponents } } + + + + + /*********************************************************************************/ + /*** will be removed/deprecated ***/ + /*********************************************************************************/ + public event EventHandlerWithReturnType Touched + { + add + { + if (_touchDataEventHandler == null) + { + _touchDataCallback = OnTouch; + this.TouchSignal().Connect(_touchDataCallback); + } + + _touchDataEventHandler += value; + } + + remove + { + _touchDataEventHandler -= value; + + if (_touchDataEventHandler == null && TouchSignal().Empty() == false) + { + this.TouchSignal().Disconnect(_touchDataCallback); + } + + } + } + public event EventHandlerWithReturnType Hovered + { + add + { + if (_hoverEventHandler == null) + { + _hoverEventCallback = OnHoverEvent; + this.HoveredSignal().Connect(_hoverEventCallback); + } + + _hoverEventHandler += value; + } + + remove + { + _hoverEventHandler -= value; + + if (_hoverEventHandler == null && HoveredSignal().Empty() == false) + { + this.HoveredSignal().Disconnect(_hoverEventCallback); + } + + } + } + /// /// Get the number of renderers held by the view. /// diff --git a/Tizen.NUI/src/public/NUIConstants.cs b/Tizen.NUI/src/public/NUIConstants.cs index cd559ae..6eedcc6 100755 --- a/Tizen.NUI/src/public/NUIConstants.cs +++ b/Tizen.NUI/src/public/NUIConstants.cs @@ -1366,6 +1366,149 @@ namespace Tizen.NUI Implicit, //Called by DisposeQueue } + + + + //will be removed/deprecated + public struct AnchorPoint + { + public static float Top + { + get + { + float ret = NDalicPINVOKE.AnchorPointTop_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static float Bottom + { + get + { + float ret = NDalicPINVOKE.AnchorPointBottom_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static float Left + { + get + { + float ret = NDalicPINVOKE.AnchorPointLeft_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static float Right + { + get + { + float ret = NDalicPINVOKE.AnchorPointRight_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static float Middle + { + get + { + float ret = NDalicPINVOKE.AnchorPointMiddle_get(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position TopLeft + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopLeft_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position TopCenter + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopCenter_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position TopRight + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointTopRight_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position CenterLeft + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterLeft_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position Center + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenter_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position CenterRight + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointCenterRight_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position BottomLeft + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomLeft_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position BottomCenter + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomCenter_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + public static Position BottomRight + { + get + { + global::System.IntPtr cPtr = NDalicPINVOKE.AnchorPointBottomRight_get(); + Position ret = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + } + /// /// An enum of scroll state of text eidtor. /// diff --git a/Tizen.NUI/src/internal/Slider.cs b/Tizen.NUI/src/public/UIComponents/Slider.cs similarity index 99% rename from Tizen.NUI/src/internal/Slider.cs rename to Tizen.NUI/src/public/UIComponents/Slider.cs index a6abd07..ff7b0fd 100755 --- a/Tizen.NUI/src/internal/Slider.cs +++ b/Tizen.NUI/src/public/UIComponents/Slider.cs @@ -34,7 +34,7 @@ namespace Tizen.NUI.UIComponents /// /// Slider is a control to enable sliding an indicator between two values. /// - internal class Slider : View + public class Slider : View { private global::System.Runtime.InteropServices.HandleRef swigCPtr; diff --git a/Tizen.NUI/src/public/Window.cs b/Tizen.NUI/src/public/Window.cs index 9718abd..dcf69ad 100755 --- a/Tizen.NUI/src/public/Window.cs +++ b/Tizen.NUI/src/public/Window.cs @@ -103,19 +103,19 @@ namespace Tizen.NUI return ret; } - /// - /// Sets the focus acceptable flag of an window as true. - /// - internal void SetAcceptFocus(bool accept) + /*********************************************************************************/ + /*** will be removed/deprecated ***/ + /*********************************************************************************/ + public void SetAcceptFocus(bool accept) { NDalicPINVOKE.SetAcceptFocus(swigCPtr, accept); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - /// - /// Retrieves whether the window is focus acceptable or not. - /// - internal bool IsFocusAcceptable() + /*********************************************************************************/ + /*** will be removed/deprecated ***/ + /*********************************************************************************/ + public bool IsFocusAcceptable() { return NDalicPINVOKE.IsFocusAcceptable(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); -- 2.7.4