From: dongsug.song Date: Tue, 7 Mar 2017 05:28:25 +0000 (+0900) Subject: AnimationBetween() parameter changed and more X-Git-Tag: submit/trunk/20170823.075128~91^2~268 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69d8e41a5f73c8cdda590f8a372910c4b69e7322;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git AnimationBetween() parameter changed and more - resolve crash issue : http://suprem.sec.samsung.net/jira/browse/NUI-66 crash - event handler pattern changed - Visibility property in Actor.cs is removed - NUIApplication class is changed to public class, hello-test.cs is sample app - FlexContainer's child property in View.cs gets some comments - nui second minor version up (form 1.0.0 to 1.0.1) - some useless files are removed Signed-off-by: dongsug.song Change-Id: I6e3392f98b8397ace49252e966fdfb8ec663b1ec --- diff --git a/packaging/csapi-nui.spec b/packaging/csapi-nui.spec index e9e013f..f2af8c7 100755 --- a/packaging/csapi-nui.spec +++ b/packaging/csapi-nui.spec @@ -1,6 +1,6 @@ Name: csapi-nui Summary: dali-NUI -Version: 1.0.0 +Version: 1.0.1 Release: 0 Group: Development/Libraries License: Apache-2.0 diff --git a/src/Tizen.NUI/Tizen.NUI.csproj.user b/src/Tizen.NUI/Tizen.NUI.csproj.user deleted file mode 100755 index e482657..0000000 --- a/src/Tizen.NUI/Tizen.NUI.csproj.user +++ /dev/null @@ -1,6 +0,0 @@ - - - - ShowAllFiles - - \ No newline at end of file diff --git a/src/Tizen.NUI/src/internal/Application.cs b/src/Tizen.NUI/src/internal/Application.cs index c52adaf..c616ded 100755 --- a/src/Tizen.NUI/src/internal/Application.cs +++ b/src/Tizen.NUI/src/internal/Application.cs @@ -1,19 +1,19 @@ -//------------------------------------------------------------------------------ -// -// -// 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. -//------------------------------------------------------------------------------ - +//------------------------------------------------------------------------------ +// +// +// 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 System; + using System.Runtime.InteropServices; + internal class LOG { internal LOG(string _str) @@ -22,17 +22,17 @@ namespace Tizen.NUI } } - /** - * @brief Event arguments that passed via NUIApplicationInit signal - * - */ - public class NUIApplicationInitEventArgs : EventArgs + /** + * @brief Event arguments that passed via NUIApplicationInit signal + * + */ + internal class NUIApplicationInitEventArgs : EventArgs { private Application _application; - /** - * @brief Application - is the application that is being initialized - * + /** + * @brief Application - is the application that is being initialized + * */ public Application Application { @@ -44,19 +44,19 @@ namespace Tizen.NUI { _application = value; } - } - } - - /** - * @brief Event arguments that passed via NUIApplicationTerminate signal - * - */ - public class NUIApplicationTerminateEventArgs : EventArgs + } + } + + /** + * @brief Event arguments that passed via NUIApplicationTerminate signal + * + */ + internal class NUIApplicationTerminateEventArgs : EventArgs { private Application _application; - /** - * @brief Application - is the application that is being Terminated - * + /** + * @brief Application - is the application that is being Terminated + * */ public Application Application { @@ -68,19 +68,19 @@ namespace Tizen.NUI { _application = value; } - } - } - - /** - * @brief Event arguments that passed via NUIApplicationPause signal - * - */ - public class NUIApplicationPauseEventArgs : EventArgs + } + } + + /** + * @brief Event arguments that passed via NUIApplicationPause signal + * + */ + internal class NUIApplicationPauseEventArgs : EventArgs { private Application _application; - /** - * @brief Application - is the application that is being Paused - * + /** + * @brief Application - is the application that is being Paused + * */ public Application Application { @@ -92,19 +92,19 @@ namespace Tizen.NUI { _application = value; } - } - } - - /** - * @brief Event arguments that passed via NUIApplicationResume signal - * - */ - public class NUIApplicationResumeEventArgs : EventArgs + } + } + + /** + * @brief Event arguments that passed via NUIApplicationResume signal + * + */ + internal class NUIApplicationResumeEventArgs : EventArgs { private Application _application; - /** - * @brief Application - is the application that is being Resumed - * + /** + * @brief Application - is the application that is being Resumed + * */ public Application Application { @@ -116,19 +116,19 @@ namespace Tizen.NUI { _application = value; } - } - } - - /** - * @brief Event arguments that passed via NUIApplicationReset signal - * - */ - public class NUIApplicationResetEventArgs : EventArgs + } + } + + /** + * @brief Event arguments that passed via NUIApplicationReset signal + * + */ + internal class NUIApplicationResetEventArgs : EventArgs { private Application _application; - /** - * @brief Application - is the application that is being Reset - * + /** + * @brief Application - is the application that is being Reset + * */ public Application Application { @@ -140,19 +140,19 @@ namespace Tizen.NUI { _application = value; } - } - } - - /** - * @brief Event arguments that passed via NUIApplicationResize signal - * - */ - public class NUIApplicationResizeEventArgs : EventArgs + } + } + + /** + * @brief Event arguments that passed via NUIApplicationResize signal + * + */ + internal class NUIApplicationResizeEventArgs : EventArgs { private Application _application; - /** - * @brief Application - is the application that is being Resized - * + /** + * @brief Application - is the application that is being Resized + * */ public Application Application { @@ -164,19 +164,19 @@ namespace Tizen.NUI { _application = value; } - } - } - - /** - * @brief Event arguments that passed via NUIApplicationLanguageChanged signal - * - */ - public class NUIApplicationLanguageChangedEventArgs : EventArgs + } + } + + /** + * @brief Event arguments that passed via NUIApplicationLanguageChanged signal + * + */ + internal class NUIApplicationLanguageChangedEventArgs : EventArgs { private Application _application; - /** - * @brief Application - is the application that is being affected with Device's language change - * + /** + * @brief Application - is the application that is being affected with Device's language change + * */ public Application Application { @@ -188,19 +188,19 @@ namespace Tizen.NUI { _application = value; } - } - } - - /** - * @brief Event arguments that passed via NUIApplicationRegionChanged signal - * - */ - public class NUIApplicationRegionChangedEventArgs : EventArgs + } + } + + /** + * @brief Event arguments that passed via NUIApplicationRegionChanged signal + * + */ + internal class NUIApplicationRegionChangedEventArgs : EventArgs { private Application _application; - /** - * @brief Application - is the application that is being affected with Device's region change - * + /** + * @brief Application - is the application that is being affected with Device's region change + * */ public Application Application { @@ -212,19 +212,19 @@ namespace Tizen.NUI { _application = value; } - } - } - - /** - * @brief Event arguments that passed via NUIApplicationBatteryLow signal - * - */ - public class NUIApplicationBatteryLowEventArgs : EventArgs + } + } + + /** + * @brief Event arguments that passed via NUIApplicationBatteryLow signal + * + */ + internal class NUIApplicationBatteryLowEventArgs : EventArgs { private Application _application; - /** - * @brief Application - is the application that is being affected when the battery level of the device is low - * + /** + * @brief Application - is the application that is being affected when the battery level of the device is low + * */ public Application Application { @@ -236,19 +236,19 @@ namespace Tizen.NUI { _application = value; } - } - } - - /** - * @brief Event arguments that passed via NUIApplicationMemoryLow signal - * - */ - public class NUIApplicationMemoryLowEventArgs : EventArgs + } + } + + /** + * @brief Event arguments that passed via NUIApplicationMemoryLow signal + * + */ + internal class NUIApplicationMemoryLowEventArgs : EventArgs { private Application _application; - /** - * @brief Application - is the application that is being affected when the memory level of the device is low - * + /** + * @brief Application - is the application that is being affected when the memory level of the device is low + * */ public Application Application { @@ -260,20 +260,20 @@ namespace Tizen.NUI { _application = value; } - } - } - - /** - * @brief Event arguments that passed via NUIApplicationAppControl signal - * - */ - public class NUIApplicationAppControlEventArgs : EventArgs + } + } + + /** + * @brief Event arguments that passed via NUIApplicationAppControl signal + * + */ + internal class NUIApplicationAppControlEventArgs : EventArgs { private Application _application; private IntPtr _voidp; - /** - * @brief Application - is the application that is receiving the launch request from another application - * + /** + * @brief Application - is the application that is receiving the launch request from another application + * */ public Application Application { @@ -286,9 +286,9 @@ namespace Tizen.NUI _application = value; } } - /** - * @brief VoidP - contains the information about why the application is launched - * + /** + * @brief VoidP - contains the information about why the application is launched + * */ public IntPtr VoidP { @@ -300,10 +300,10 @@ namespace Tizen.NUI { _voidp = value; } - } + } } - public class Application : BaseHandle + internal class Application : BaseHandle { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -405,10 +405,10 @@ namespace Tizen.NUI private DaliEventHandler _applicationAppControlEventHandler; private NUIApplicationAppControlEventCallbackDelegate _applicationAppControlEventCallbackDelegate; - /** - * @brief Event for Initialized signal which can be used to subscribe/unsubscribe the event handler - * (in the type of NUIApplicationInitEventHandler - DaliEventHandler) - * provided by the user. Initialized signal is emitted when application is initialised + /** + * @brief Event for Initialized signal which can be used to subscribe/unsubscribe the event handler + * (in the type of NUIApplicationInitEventHandler - DaliEventHandler) + * provided by the user. Initialized signal is emitted when application is initialised */ public event DaliEventHandler Initialized { @@ -456,10 +456,10 @@ namespace Tizen.NUI } } - /** - * @brief Event for Terminated signal which can be used to subscribe/unsubscribe the event handler - * (in the type of NUIApplicationTerminateEventHandler-DaliEventHandler) - * provided by the user. Terminated signal is emitted when application is terminated + /** + * @brief Event for Terminated signal which can be used to subscribe/unsubscribe the event handler + * (in the type of NUIApplicationTerminateEventHandler-DaliEventHandler) + * provided by the user. Terminated signal is emitted when application is terminated */ public event DaliEventHandler Terminated { @@ -507,10 +507,10 @@ namespace Tizen.NUI } } - /** - * @brief Event for Paused signal which can be used to subscribe/unsubscribe the event handler - * (in the type of NUIApplicationPauseEventHandler-DaliEventHandler) - * provided by the user. Paused signal is emitted when application is paused + /** + * @brief Event for Paused signal which can be used to subscribe/unsubscribe the event handler + * (in the type of NUIApplicationPauseEventHandler-DaliEventHandler) + * provided by the user. Paused signal is emitted when application is paused */ public event DaliEventHandler Paused { @@ -558,10 +558,10 @@ namespace Tizen.NUI } } - /** - * @brief Event for Resumed signal which can be used to subscribe/unsubscribe the event handler - * (in the type of NUIApplicationResumeEventHandler-DaliEventHandler) - * provided by the user. Resumed signal is emitted when application is resumed + /** + * @brief Event for Resumed signal which can be used to subscribe/unsubscribe the event handler + * (in the type of NUIApplicationResumeEventHandler-DaliEventHandler) + * provided by the user. Resumed signal is emitted when application is resumed */ public event DaliEventHandler Resumed { @@ -609,10 +609,10 @@ namespace Tizen.NUI } } - /** - * @brief Event for Reset signal which can be used to subscribe/unsubscribe the event handler - * (in the type of NUIApplicationResetEventHandler-DaliEventHandler) - * provided by the user. Reset signal is emitted when application is reset + /** + * @brief Event for Reset signal which can be used to subscribe/unsubscribe the event handler + * (in the type of NUIApplicationResetEventHandler-DaliEventHandler) + * provided by the user. Reset signal is emitted when application is reset */ public event DaliEventHandler Reset { @@ -660,10 +660,10 @@ namespace Tizen.NUI } } - /** - * @brief Event for Resized signal which can be used to subscribe/unsubscribe the event handler - * (in the type of NUIApplicationResizeEventHandler-DaliEventHandler) - * provided by the user. Resized signal is emitted when application is resized + /** + * @brief Event for Resized signal which can be used to subscribe/unsubscribe the event handler + * (in the type of NUIApplicationResizeEventHandler-DaliEventHandler) + * provided by the user. Resized signal is emitted when application is resized */ public event DaliEventHandler Resized { @@ -711,10 +711,10 @@ namespace Tizen.NUI } } - /** - * @brief Event for LanguageChanged signal which can be used to subscribe/unsubscribe the event handler - * (in the type of NUIApplicationLanguageChangedEventHandler-DaliEventHandler) - * provided by the user. LanguageChanged signal is emitted when the region of the device is changed. + /** + * @brief Event for LanguageChanged signal which can be used to subscribe/unsubscribe the event handler + * (in the type of NUIApplicationLanguageChangedEventHandler-DaliEventHandler) + * provided by the user. LanguageChanged signal is emitted when the region of the device is changed. */ public event DaliEventHandler LanguageChanged { @@ -762,10 +762,10 @@ namespace Tizen.NUI } } - /** - * @brief Event for RegionChanged signal which can be used to subscribe/unsubscribe the event handler - * (in the type of NUIApplicationRegionChangedEventHandler-DaliEventHandler) - * provided by the user. RegionChanged signal is emitted when the region of the device is changed. + /** + * @brief Event for RegionChanged signal which can be used to subscribe/unsubscribe the event handler + * (in the type of NUIApplicationRegionChangedEventHandler-DaliEventHandler) + * provided by the user. RegionChanged signal is emitted when the region of the device is changed. */ public event DaliEventHandler RegionChanged { @@ -813,10 +813,10 @@ namespace Tizen.NUI } } - /** - * @brief Event for BatteryLow signal which can be used to subscribe/unsubscribe the event handler - * (in the type of NUIApplicationBatteryLowEventHandler-DaliEventHandler) - * provided by the user. BatteryLow signal is emitted when the battery level of the device is low. + /** + * @brief Event for BatteryLow signal which can be used to subscribe/unsubscribe the event handler + * (in the type of NUIApplicationBatteryLowEventHandler-DaliEventHandler) + * provided by the user. BatteryLow signal is emitted when the battery level of the device is low. */ public event DaliEventHandler BatteryLow { @@ -864,10 +864,10 @@ namespace Tizen.NUI } } - /** - * @brief Event for MemoryLow signal which can be used to subscribe/unsubscribe the event handler - * (in the type of NUIApplicationMemoryLowEventHandler-DaliEventHandler) - * provided by the user. MemoryLow signal is emitted when the memory level of the device is low. + /** + * @brief Event for MemoryLow signal which can be used to subscribe/unsubscribe the event handler + * (in the type of NUIApplicationMemoryLowEventHandler-DaliEventHandler) + * provided by the user. MemoryLow signal is emitted when the memory level of the device is low. */ public event DaliEventHandler MemoryLow { @@ -915,10 +915,10 @@ namespace Tizen.NUI } } - /** - * @brief Event for AppControl signal which can be used to subscribe/unsubscribe the event handler - * (in the type of NUIApplicationAppControlEventHandler-DaliEventHandler) - * provided by the user. AppControl signal is emitted when another application sends a launch request to the application. + /** + * @brief Event for AppControl signal which can be used to subscribe/unsubscribe the event handler + * (in the type of NUIApplicationAppControlEventHandler-DaliEventHandler) + * provided by the user. AppControl signal is emitted when another application sends a launch request to the application. */ public event DaliEventHandler AppControl { @@ -1090,8 +1090,8 @@ namespace Tizen.NUI - /** - * Outer::outer_method(int) + /** + * Outer::outer_method(int) */ public static Application New() { @@ -1308,6 +1308,6 @@ namespace Tizen.NUI Transparent = 1 } - } - -} + } + +} diff --git a/src/Tizen.NUI/src/public/Actor.cs b/src/Tizen.NUI/src/public/Actor.cs index 1f47787..04ae4f1 100755 --- a/src/Tizen.NUI/src/public/Actor.cs +++ b/src/Tizen.NUI/src/public/Actor.cs @@ -100,14 +100,6 @@ namespace Tizen.NUI } } - public bool Visibility - { - get - { - return IsVisible(); - } - } - public float Opacity { get diff --git a/src/Tizen.NUI/src/public/Animation.cs b/src/Tizen.NUI/src/public/Animation.cs index fdcfe52..a626665 100755 --- a/src/Tizen.NUI/src/public/Animation.cs +++ b/src/Tizen.NUI/src/public/Animation.cs @@ -80,11 +80,6 @@ namespace Tizen.NUI - private AnimationFinishedEventCallbackType _animationFinishedEventCallback; - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void AnimationFinishedEventCallbackType(IntPtr data); - private event EventHandler _animationFinishedEventHandler; - /** * @brief Create an initialized Animation. * @@ -101,6 +96,10 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + private AnimationFinishedEventCallbackType _animationFinishedEventCallback; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void AnimationFinishedEventCallbackType(IntPtr data); + private event EventHandler _animationFinishedEventHandler; /** * @brief Event for Finished signal which can be used to subscribe/unsubscribe the event handler * Finished signal is emitted when an Animation's animations have finished. @@ -119,12 +118,12 @@ namespace Tizen.NUI } remove { - if (_animationFinishedEventHandler != null) + _animationFinishedEventHandler -= value; + + if (_animationFinishedEventHandler == null && _animationFinishedEventCallback != null) { FinishedSignal().Disconnect(_animationFinishedEventCallback); } - - _animationFinishedEventHandler -= value; } } private void OnFinished(IntPtr data) @@ -401,7 +400,7 @@ namespace Tizen.NUI } } - public void AnimateBetween(Actor target, string property, KeyFrames keyFrames, AlphaFunction alphaFunction = null) + public void AnimateBetween(Actor target, string property, KeyFrames keyFrames, Interpolation interpolation = Interpolation.Linear, AlphaFunction alphaFunction = null) { string _str1 = property.Substring(0, 1); string _str2 = property.Substring(1); @@ -415,12 +414,11 @@ namespace Tizen.NUI if (alphaFunction != null) { - - AnimateBetween(_prop, keyFrames); + AnimateBetween(_prop, keyFrames, alphaFunction, interpolation); } else { - AnimateBetween(_prop, keyFrames, alphaFunction); + AnimateBetween(_prop, keyFrames, interpolation); } } diff --git a/src/Tizen.NUI/src/public/Button.cs b/src/Tizen.NUI/src/public/Button.cs index 4378eba..5523fd8 100755 --- a/src/Tizen.NUI/src/public/Button.cs +++ b/src/Tizen.NUI/src/public/Button.cs @@ -18,14 +18,14 @@ // 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 @@ -100,12 +100,12 @@ namespace Tizen.NUI remove { - if (_clickedEventHandler != null) + _clickedEventHandler -= value; + + if (_clickedEventHandler == null && _clickedCallback != null) { ClickedSignal().Disconnect(_clickedCallback); } - - _clickedEventHandler -= value; } } @@ -141,12 +141,12 @@ namespace Tizen.NUI remove { - if (_pressedEventHandler != null) + _pressedEventHandler -= value; + + if (_pressedEventHandler == null && _pressedCallback != null) { this.PressedSignal().Disconnect(_pressedCallback); } - - _pressedEventHandler -= value; } } @@ -175,21 +175,18 @@ namespace Tizen.NUI _releasedCallback = OnReleased; ReleasedSignal().Connect(_releasedCallback); } - _releasedEventHandler += value; } remove { - lock (this) - { - if (_releasedEventHandler != null) - { - ReleasedSignal().Disconnect(_releasedCallback); - } + _releasedEventHandler -= value; - _releasedEventHandler -= value; + if (_releasedEventHandler == null && _releasedCallback != null) + { + ReleasedSignal().Disconnect(_releasedCallback); } + } } @@ -223,12 +220,12 @@ namespace Tizen.NUI remove { - if (_stateChangedEventHandler != null) + _stateChangedEventHandler -= value; + + if (_stateChangedEventHandler == null && _stateChangedCallback != null) { StateChangedSignal().Disconnect(_stateChangedCallback); } - - _stateChangedEventHandler -= value; } } @@ -791,6 +788,6 @@ namespace Tizen.NUI } } - } - + } + } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/FlexContainer.cs b/src/Tizen.NUI/src/public/FlexContainer.cs index 9359885..9628ef2 100755 --- a/src/Tizen.NUI/src/public/FlexContainer.cs +++ b/src/Tizen.NUI/src/public/FlexContainer.cs @@ -201,6 +201,10 @@ namespace Tizen.NUI return ret; } + /// + /// Enumeration for the direction of the main axis in the flex container. This determines + /// the direction that flex items are laid out in the flex container. + /// public enum FlexDirectionType { Column, @@ -216,6 +220,10 @@ namespace Tizen.NUI RTL } + /// + /// Enumeration for the alignment of the flex items when the items do not use all available + /// space on the main-axis. + /// public enum Justification { JustifyFlexStart, @@ -225,6 +233,10 @@ namespace Tizen.NUI JustifySpaceAround } + /// + /// Enumeration for the alignment of the flex items or lines when the items or lines do not + /// use all the available space on the cross-axis. + /// public enum Alignment { AlignAuto, @@ -233,6 +245,11 @@ namespace Tizen.NUI AlignFlexEnd, AlignStretch } + + /// + /// Enumeration for the wrap type of the flex container when there is no enough room for + /// all the items on one flex line. + /// public enum WrapType { NoWrap, @@ -247,82 +264,105 @@ namespace Tizen.NUI CHILD_PROPERTY_END_INDEX = PropertyRanges.CHILD_PROPERTY_REGISTRATION_START_INDEX + 1000 } - public int ContentDirection + /// + /// The primary direction in which content is ordered + /// + public ContentDirectionType ContentDirection { get { int temp = 0; GetProperty(FlexContainer.Property.CONTENT_DIRECTION).Get(ref temp); - return temp; + return (ContentDirectionType)temp; } set { - SetProperty(FlexContainer.Property.CONTENT_DIRECTION, new Tizen.NUI.PropertyValue(value)); + SetProperty(FlexContainer.Property.CONTENT_DIRECTION, new Tizen.NUI.PropertyValue((int)value)); } } - public int FlexDirection + + /// + /// The direction of the main-axis which determines the direction that flex items are laid out + /// + public FlexDirectionType FlexDirection { get { int temp = 0; GetProperty(FlexContainer.Property.FLEX_DIRECTION).Get(ref temp); - return temp; + return (FlexDirectionType)temp; } set { - SetProperty(FlexContainer.Property.FLEX_DIRECTION, new Tizen.NUI.PropertyValue(value)); + SetProperty(FlexContainer.Property.FLEX_DIRECTION, new Tizen.NUI.PropertyValue((int)value)); } } - public int FlexWrap + + /// + /// Whether the flex items should wrap or not if there is no enough room for them on one flex line + /// + public WrapType FlexWrap { get { int temp = 0; GetProperty(FlexContainer.Property.FLEX_WRAP).Get(ref temp); - return temp; + return (WrapType)temp; } set { - SetProperty(FlexContainer.Property.FLEX_WRAP, new Tizen.NUI.PropertyValue(value)); + SetProperty(FlexContainer.Property.FLEX_WRAP, new Tizen.NUI.PropertyValue((int)value)); } } - public int JustifyContent + + /// + /// The alignment of flex items when the items do not use all available space on the main-axis + /// + public Justification JustifyContent { get { int temp = 0; GetProperty(FlexContainer.Property.JUSTIFY_CONTENT).Get(ref temp); - return temp; + return (Justification)temp; } set { - SetProperty(FlexContainer.Property.JUSTIFY_CONTENT, new Tizen.NUI.PropertyValue(value)); + SetProperty(FlexContainer.Property.JUSTIFY_CONTENT, new Tizen.NUI.PropertyValue((int)value)); } } - public int AlignItems + + /// + /// The alignment of flex items when the items do not use all available space on the cross-axis + /// + public Alignment AlignItems { get { int temp = 0; GetProperty(FlexContainer.Property.ALIGN_ITEMS).Get(ref temp); - return temp; + return (Alignment)temp; } set { - SetProperty(FlexContainer.Property.ALIGN_ITEMS, new Tizen.NUI.PropertyValue(value)); + SetProperty(FlexContainer.Property.ALIGN_ITEMS, new Tizen.NUI.PropertyValue((int)value)); } } - public int AlignContent + + /// + /// Similar to "alignItems", but it aligns flex lines, so only works when there are multiple lines + /// + public Alignment AlignContent { get { int temp = 0; GetProperty(FlexContainer.Property.ALIGN_CONTENT).Get(ref temp); - return temp; + return (Alignment)temp; } set { - SetProperty(FlexContainer.Property.ALIGN_CONTENT, new Tizen.NUI.PropertyValue(value)); + SetProperty(FlexContainer.Property.ALIGN_CONTENT, new Tizen.NUI.PropertyValue((int)value)); } } diff --git a/src/Tizen.NUI/src/public/FocusManager.cs b/src/Tizen.NUI/src/public/FocusManager.cs index 4124bab..bea570a 100755 --- a/src/Tizen.NUI/src/public/FocusManager.cs +++ b/src/Tizen.NUI/src/public/FocusManager.cs @@ -145,11 +145,11 @@ namespace Tizen.NUI } remove { - if (_preFocusChangeEventHandler != null) + _preFocusChangeEventHandler -= value; + if (_preFocusChangeEventHandler == null && _preFocusChangeCallback != null) { PreFocusChangeSignal().Disconnect(_preFocusChangeCallback); } - _preFocusChangeEventHandler -= value; } } @@ -222,11 +222,12 @@ namespace Tizen.NUI } remove { - if (_focusChangedEventCallback != null) + _focusChangedEventHandler -= value; + + if (_focusChangedEventCallback == null && _focusChangedEventCallback != null) { FocusChangedSignal().Disconnect(_focusChangedEventCallback); } - _focusChangedEventHandler -= value; } } @@ -296,11 +297,12 @@ namespace Tizen.NUI } remove { - if (_focusGroupChangedEventCallback != null) + _focusGroupChangedEventHandler -= value; + + if (_focusGroupChangedEventCallback == null && _focusGroupChangedEventCallback != null) { FocusGroupChangedSignal().Disconnect(_focusGroupChangedEventCallback); } - _focusGroupChangedEventHandler -= value; } } @@ -357,11 +359,12 @@ namespace Tizen.NUI } remove { - if (_focusedViewEnterKeyEventCallback != null) + _focusedViewEnterKeyEventHandler -= value; + + if (_focusedViewEnterKeyEventCallback == null && _focusedViewEnterKeyEventCallback != null) { FocusedActorEnterKeySignal().Disconnect(_focusedViewEnterKeyEventCallback); } - _focusedViewEnterKeyEventHandler -= value; } } diff --git a/src/Tizen.NUI/src/public/NUIApplication.cs b/src/Tizen.NUI/src/public/NUIApplication.cs index 6ba6408..bdc1679 100755 --- a/src/Tizen.NUI/src/public/NUIApplication.cs +++ b/src/Tizen.NUI/src/public/NUIApplication.cs @@ -22,26 +22,61 @@ using Tizen.NUI; namespace Tizen.NUI { + /// + /// Represents an application that have UI screen. The NUIApplication class has a default stage. + /// public class NUIApplication : CoreUIApplication { private void LOG(string _str) { - Tizen.Log.Debug("NUI", _str); + //Tizen.Log.Debug("NUI", _str); //Console.WriteLine("[NUI]" + _str); } + /// + /// The instance of the Application. + /// + /// + /// This application is created before OnCreate() or created event. And the NUIApplication will be terminated when this application is closed. + /// private Application _application; + + /// + /// The instance of the Dali Application extension. + /// private ApplicationExtensions _applicationExt; + + /// + /// Store the stylesheet value. + /// private string _stylesheet; + + /// + /// Store the window mode value. + /// private Application.WindowMode _windowMode; + + /// + /// Store the app mode value. + /// private AppMode _appMode; + + /// + /// The instance of the Dali Stage. + /// private Stage _stage; + /// + /// The default constructor. + /// public NUIApplication() : base() { _appMode = AppMode.Default; } + /// + /// The constructor with stylesheet. + /// public NUIApplication(string stylesheet) : base() { //handle the stylesheet @@ -49,15 +84,20 @@ namespace Tizen.NUI _stylesheet = stylesheet; } - public NUIApplication(string stylesheet, Application.WindowMode windowMode) : base() + /// + /// The constructor with stylesheet and window mode. + /// + public NUIApplication(string stylesheet, WindowMode windowMode) : base() { //handle the stylesheet and windowMode _appMode = AppMode.StyleSheetWithWindowMode; _stylesheet = stylesheet; - _windowMode = windowMode; + _windowMode = (Application.WindowMode)windowMode; } - + /// + /// Overrides this method if want to handle behavior. + /// protected override void OnPause() { base.OnPause(); @@ -65,6 +105,10 @@ namespace Tizen.NUI LOG("OnPause() is called!"); } + /// + /// Overrides this method if want to handle behavior before calling OnCreate(). + /// stage property is initialized in this overrided method. + /// protected override void OnPreCreate() { switch (_appMode) @@ -89,6 +133,9 @@ namespace Tizen.NUI LOG("OnPreCreate() is called!"); } + /// + /// Overrides this method if want to handle behavior. + /// protected override void OnResume() { base.OnResume(); @@ -96,6 +143,9 @@ namespace Tizen.NUI LOG("OnResume() is called!"); } + /// + /// Overrides this method if want to handle behavior. + /// protected override void OnAppControlReceived(AppControlReceivedEventArgs e) { base.OnAppControlReceived(e); @@ -107,12 +157,18 @@ namespace Tizen.NUI } } + /// + /// Overrides this method if want to handle behavior. + /// protected override void OnCreate() { base.OnCreate(); LOG("OnCreate() is called!"); } + /// + /// Overrides this method if want to handle behavior. + /// protected override void OnLocaleChanged(LocaleChangedEventArgs e) { base.OnLocaleChanged(e); @@ -120,24 +176,36 @@ namespace Tizen.NUI LOG("OnLocaleChanged() is called!"); } + /// + /// Overrides this method if want to handle behavior. + /// protected override void OnLowBattery(LowBatteryEventArgs e) { base.OnLowBattery(e); LOG("OnLowBattery() is called!"); } + /// + /// Overrides this method if want to handle behavior. + /// protected override void OnLowMemory(LowMemoryEventArgs e) { base.OnLowMemory(e); LOG("OnLowMemory() is called!"); } + /// + /// Overrides this method if want to handle behavior. + /// protected override void OnRegionFormatChanged(RegionFormatChangedEventArgs e) { base.OnRegionFormatChanged(e); LOG("OnRegionFormatChanged() is called!"); } + /// + /// Overrides this method if want to handle behavior. + /// protected override void OnTerminate() { base.OnTerminate(); @@ -145,11 +213,24 @@ namespace Tizen.NUI LOG("OnTerminate() is called!"); } + /// + /// The mode of creating NUI application. + /// private enum AppMode { Default = 0, StyleSheetOnly = 1, StyleSheetWithWindowMode = 2 } + + /// + /// Enumeration for deciding whether a NUI application window is opaque or transparent. + /// + public enum WindowMode + { + Opaque = 0, + Transparent = 1 + } + } } diff --git a/src/Tizen.NUI/src/public/Popup.cs b/src/Tizen.NUI/src/public/Popup.cs index 450cc14..91febd1 100755 --- a/src/Tizen.NUI/src/public/Popup.cs +++ b/src/Tizen.NUI/src/public/Popup.cs @@ -140,12 +140,12 @@ namespace Tizen.NUI } remove { - if (_popUpOutsideTouchedEventCallback != null) + _popUpOutsideTouchedEventHandler -= value; + + if (_popUpOutsideTouchedEventCallback == null && _popUpOutsideTouchedEventCallback != null) { OutsideTouchedSignal().Disconnect(_popUpOutsideTouchedEventCallback); - } - _popUpOutsideTouchedEventHandler -= value; } } @@ -173,11 +173,12 @@ namespace Tizen.NUI remove { - if (_popUpShowingEventCallback != null) + _popUpShowingEventHandler -= value; + + if (_popUpShowingEventCallback == null && _popUpShowingEventCallback != null) { ShowingSignal().Disconnect(_popUpShowingEventCallback); } - _popUpShowingEventHandler -= value; } } @@ -206,11 +207,12 @@ namespace Tizen.NUI remove { - if (_popUpShownEventCallback == null) + _popUpShownEventHandler -= value; + + if (_popUpShownEventCallback == null && _popUpShownEventCallback != null) { ShownSignal().Disconnect(_popUpShownEventCallback); } - _popUpShownEventHandler -= value; } } @@ -238,11 +240,12 @@ namespace Tizen.NUI remove { - if (_popUpHidingEventCallback != null) + _popUpHidingEventHandler -= value; + + if (_popUpHidingEventCallback == null && _popUpHidingEventCallback != null) { HidingSignal().Disconnect(_popUpHidingEventCallback); } - _popUpHidingEventHandler -= value; } } @@ -269,11 +272,12 @@ namespace Tizen.NUI } remove { - if (_popUpHiddenEventCallback != null) + _popUpHiddenEventHandler -= value; + + if (_popUpHiddenEventCallback == null && _popUpHiddenEventCallback != null) { HiddenSignal().Disconnect(_popUpHiddenEventCallback); } - _popUpHiddenEventHandler -= value; } } diff --git a/src/Tizen.NUI/src/public/Stage.cs b/src/Tizen.NUI/src/public/Stage.cs index cdfe67b..7c34b64 100755 --- a/src/Tizen.NUI/src/public/Stage.cs +++ b/src/Tizen.NUI/src/public/Stage.cs @@ -131,12 +131,12 @@ namespace Tizen.NUI } remove { - if (_stageTouchEventHandler != null) + _stageTouchEventHandler -= value; + + if (_stageTouchEventHandler == null && _stageTouchCallback != null) { TouchSignal().Disconnect(_stageTouchCallback); } - - _stageTouchEventHandler -= value; } } @@ -200,12 +200,13 @@ namespace Tizen.NUI } remove { - if (_stageWheelEventHandler != null) + _stageWheelEventHandler -= value; + + if (_stageWheelEventHandler == null && _stageWheelCallback != null) { WheelEventSignal().Disconnect(_stageWheelCallback); } - _stageWheelEventHandler -= value; } } @@ -269,12 +270,12 @@ namespace Tizen.NUI } remove { - if (_stageKeyEventHandler != null) + _stageKeyEventHandler -= value; + + if (_stageKeyEventHandler == null && _stageKeyCallback != null) { KeyEventSignal().Disconnect(_stageKeyCallback); } - - _stageKeyEventHandler -= value; } } @@ -318,12 +319,12 @@ namespace Tizen.NUI } remove { - if (_stageEventProcessingFinishedEventHandler != null) + _stageEventProcessingFinishedEventHandler -= value; + + if (_stageEventProcessingFinishedEventHandler == null && _stageEventProcessingFinishedEventCallback != null) { EventProcessingFinishedSignal().Disconnect(_stageEventProcessingFinishedEventCallback); } - - _stageEventProcessingFinishedEventHandler -= value; } } @@ -359,12 +360,12 @@ namespace Tizen.NUI } remove { - if (_stageContextLostEventHandler != null) + _stageContextLostEventHandler -= value; + + if (_stageContextLostEventHandler == null && _stageContextLostEventCallback != null) { ContextLostSignal().Disconnect(_stageContextLostEventCallback); } - - _stageContextLostEventHandler -= value; } } @@ -401,12 +402,12 @@ namespace Tizen.NUI } remove { - if (_stageContextRegainedEventHandler != null) + _stageContextRegainedEventHandler -= value; + + if (_stageContextRegainedEventHandler == null && _stageContextRegainedEventCallback != null) { ContextRegainedSignal().Disconnect(_stageContextRegainedEventCallback); } - - _stageContextRegainedEventHandler -= value; } } @@ -442,12 +443,13 @@ namespace Tizen.NUI } remove { - if (_stageSceneCreatedEventHandler != null) + _stageSceneCreatedEventHandler -= value; + + if (_stageSceneCreatedEventHandler == null && _stageSceneCreatedEventCallback != null) { SceneCreatedSignal().Disconnect(_stageSceneCreatedEventCallback); } - _stageSceneCreatedEventHandler -= value; } } diff --git a/src/Tizen.NUI/src/public/Timer.cs b/src/Tizen.NUI/src/public/Timer.cs index 0cae3cb..96be00b 100755 --- a/src/Tizen.NUI/src/public/Timer.cs +++ b/src/Tizen.NUI/src/public/Timer.cs @@ -178,12 +178,13 @@ namespace Tizen.NUI } remove { - if (_tickCallBack != null) + _tickEventHandler -= value; + + if (_tickCallBack == null && _tickCallBack != null) { this.TickSignal().Disconnect(_tickCallBack); _tickCallBack = null; } - _tickEventHandler -= value; } } private bool OnTick() diff --git a/src/Tizen.NUI/src/public/View.cs b/src/Tizen.NUI/src/public/View.cs index cc67900..e3323f6 100755 --- a/src/Tizen.NUI/src/public/View.cs +++ b/src/Tizen.NUI/src/public/View.cs @@ -58,11 +58,11 @@ namespace Tizen.NUI public override void Dispose() { - if (!Stage.IsInstalled()) - { - DisposeQueue.Instance.Add(this); - return; - } + if (!Stage.IsInstalled()) + { + DisposeQueue.Instance.Add(this); + return; + } lock (this) { @@ -104,12 +104,12 @@ namespace Tizen.NUI remove { - if (_keyInputFocusGainedEventHandler != null) + _keyInputFocusGainedEventHandler -= value; + + if (_keyInputFocusGainedEventHandler == null && _keyInputFocusGainedCallback != null) { this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback); } - - _keyInputFocusGainedEventHandler -= value; } } @@ -146,12 +146,12 @@ namespace Tizen.NUI remove { - if (_keyInputFocusLostEventHandler != null) + _keyInputFocusLostEventHandler -= value; + + if (_keyInputFocusLostEventHandler == null && _keyInputFocusLostCallback != null) { this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback); } - - _keyInputFocusLostEventHandler -= value; } } @@ -213,12 +213,12 @@ namespace Tizen.NUI remove { - if (_keyEventHandler != null) + _keyEventHandler -= value; + + if (_keyEventHandler == null && _keyCallback != null) { this.KeyEventSignal().Disconnect(_keyCallback); } - - _keyEventHandler -= value; } } @@ -260,12 +260,13 @@ namespace Tizen.NUI remove { - if (_onRelayoutEventHandler != null) + _onRelayoutEventHandler -= value; + + if (_onRelayoutEventHandler == null && _onRelayoutEventCallback != null) { this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback); } - _onRelayoutEventHandler -= value; } } @@ -328,12 +329,13 @@ namespace Tizen.NUI remove { - if (_touchDataEventHandler != null) + _touchDataEventHandler -= value; + + if (_touchDataEventHandler == null && _touchDataCallback != null) { this.TouchSignal().Disconnect(_touchDataCallback); } - _touchDataEventHandler -= value; } } @@ -401,12 +403,13 @@ namespace Tizen.NUI remove { - if (_hoverEventHandler != null) + _hoverEventHandler -= value; + + if (_hoverEventHandler == null && _hoverEventCallback != null) { this.HoveredSignal().Disconnect(_hoverEventCallback); } - _hoverEventHandler -= value; } } @@ -473,12 +476,13 @@ namespace Tizen.NUI remove { - if (_wheelEventHandler != null) + _wheelEventHandler -= value; + + if (_wheelEventHandler == null && _wheelEventCallback != null) { this.WheelEventSignal().Disconnect(_wheelEventCallback); } - _wheelEventHandler -= value; } } @@ -521,12 +525,12 @@ namespace Tizen.NUI remove { - if (_onStageEventHandler != null) + _onStageEventHandler -= value; + + if (_onStageEventHandler == null && _onStageEventCallback != null) { this.OnStageSignal().Disconnect(_onStageEventCallback); } - - _onStageEventHandler -= value; } } @@ -564,11 +568,12 @@ namespace Tizen.NUI remove { - if (_offStageEventHandler != null) + _offStageEventHandler -= value; + + if (_offStageEventHandler == null && _offStageEventCallback != null) { this.OnStageSignal().Disconnect(_offStageEventCallback); } - _offStageEventHandler -= value; } } @@ -956,6 +961,11 @@ namespace Tizen.NUI } } + /// + /// Child Property of FlexContainer + /// The proportion of the free space in the container the flex item will receive. + /// If all items in the container set this property, their sizes will be proportional to the specified flex factor + /// public float Flex { get @@ -969,6 +979,11 @@ namespace Tizen.NUI SetProperty(FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue(value)); } } + + /// + /// Child Property of FlexContainer + /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container + /// public int AlignSelf { get @@ -982,6 +997,11 @@ namespace Tizen.NUI SetProperty(FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue(value)); } } + + /// + /// Child Property of FlexContainer + /// The space around the flex item + /// public Vector4 FlexMargin { get