From: dongsug.song Date: Wed, 17 May 2017 12:23:50 +0000 (+0900) Subject: nui 0.2.39 release X-Git-Tag: accepted/tizen/unified/20170518.061208^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F82%2F129682%2F1;p=platform%2Fcore%2Fcsapi%2Fnui.git nui 0.2.39 release Change-Id: I9462bd8600a48053260aac438573e4060578481d Signed-off-by: dongsug.song --- diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/dali-test.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/dali-test.cs index abe525d..ee00d88 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/dali-test.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/dali-test.cs @@ -131,6 +131,7 @@ namespace DaliTest VisibilityChangeTest(); ResourceReadyTest(); + WindowDevelPropertyTest(); Animatable handle = new Animatable(); int myPropertyIndex = handle.RegisterProperty("myProperty", new PropertyValue(10.0f), PropertyAccessMode.ReadWrite); @@ -546,9 +547,9 @@ namespace DaliTest label.VisibilityChanged += (sender, e) => { if (e.Visibility) - Console.WriteLine("VisibilityChanged, label show."); + Tizen.Log.Debug("NUI", "VisibilityChanged, label show."); else - Console.WriteLine("VisibilityChanged, label hide."); + Tizen.Log.Debug("NUI", "VisibilityChanged, label hide."); }; PushButton button = new PushButton(); @@ -581,11 +582,53 @@ namespace DaliTest image.Position = new Position(0.0f, 150.0f, 0.0f); image.ResourceReady += (sender, e) => { - Console.WriteLine("Resource is ready!"); + Tizen.Log.Debug("NUI", "Resource is ready!"); }; Window.GetDefaultLayer().Add(image); } + public void WindowDevelPropertyTest() + { + Window window = Window.Instance; + uint count = window.GetSupportedAuxiliaryHintCount(); + if (count > 0) + { + window.BackgroundColor = Color.Blue; + } + uint id = window.AddAuxiliaryHint("wm.policy.win.effect.disable", "1"); + window.RemoveAuxiliaryHint(id); + window.RemoveAuxiliaryHint(2); + + id = window.AddAuxiliaryHint("wm.policy.win.effect.disable", "1"); + window.SetAuxiliaryHintValue(id, "0"); + string value = window.GetAuxiliaryHintValue(id); + if(value.Length > 0) + { + window.BackgroundColor = Color.Red; + } + + window.SetInputRegion(new Rectangle(0, 0, 0, 0)); + WindowType type = window.Type; + Tizen.Log.Debug("NUI", "window type is "+type); + window.Type = WindowType.Notification; + + NotificationLevelType level = window.GetNotificationLevel(); + window.SetNotificationLevel(NotificationLevelType.High); + level = window.GetNotificationLevel(); + Tizen.Log.Debug("NUI", "window notification level is " + level); + + window.SetOpaqueState(true); + Tizen.Log.Debug("NUI", "window is opaque? " + window.IsOpaqueState()); + + window.SetScreenMode(ScreenModeType.AlwaysOn); + ScreenModeType screenMode = window.GetScreenMode(); + Tizen.Log.Debug("NUI", "window screen mode is " + screenMode); + + bool ret = window.SetBrightness(50); + int brightness = window.GetBrightness(); + Tizen.Log.Debug("NUI", "window brightness is " + brightness, ", return "+ret); + } + public void CustomViewPropertyTest() { // Create a Spin control @@ -648,7 +691,8 @@ namespace DaliTest View container = new View(); container.Position = new Position(-800.0f, -800.0f, 0.0f); Window.Instance.GetDefaultLayer().Add(container); - + Tizen.Log.Debug("NUI", "winow layer count is "+Window.Instance.GetLayerCount()); + Tizen.Log.Debug("NUI", "winow default layer child at 0 is "+Window.GetDefaultLayer().GetChildAt(0)); // Test downcast for native control TextLabel myLabel = new TextLabel(); myLabel.Name = "MyLabelName"; diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/hello-world.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/hello-world.cs index fe496dd..f8ee10f 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/hello-world.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/hello-world.cs @@ -73,6 +73,15 @@ namespace HelloWorldTest ellipsis.Ellipsis = true; window.GetDefaultLayer().Add(ellipsis); + TextLabel autoScrollStopMode = new TextLabel("AutoScrollStopMode is finish-loop."); + autoScrollStopMode.Size2D = new Size2D(400, 100); + autoScrollStopMode.Position2D = new Position2D(10, 400); + autoScrollStopMode.PointSize = 15.0f; + autoScrollStopMode.AutoScrollStopMode = AutoScrollStopMode.FinishLoop; + //autoScrollStopMode.AutoScrollLoopDelay = 10.0f; + autoScrollStopMode.EnableAutoScroll = true; + window.GetDefaultLayer().Add(autoScrollStopMode); + _text = new TextLabel("Hello NUI World"); _text.ParentOrigin = ParentOrigin.Center; _text.AnchorPoint = AnchorPoint.Center; diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-animation-test.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-animation-test.cs index 2165bc1..4edb9eb 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-animation-test.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-animation-test.cs @@ -38,6 +38,7 @@ namespace VisaulAnimationExample private SVGVisual svgVisual; private AnimatedImageVisual gifVisual; + private ImageVisual _icon; public Example() : base() { @@ -97,7 +98,7 @@ namespace VisaulAnimationExample //_contentView.Size2D = new Size2D(250, 250); _contentView.BackgroundImage = _resPath + "/images/background-blocks.jpg"; - ImageVisual _icon = new ImageVisual(); + _icon = new ImageVisual(); _icon.URL = _resPath + "/images/application-icon-0.png"; _icon.DepthIndex = 1; _icon.Size = new Size2D(50, 50); @@ -234,25 +235,11 @@ namespace VisaulAnimationExample if (activate) { - VisualAnimator grow = new VisualAnimator(); - grow.AlphaFunction = AlphaFunction.BuiltinFunctions.Linear; - grow.StartTime = 0; - grow.EndTime = 1000; - grow.Target = "icon_visual1"; - grow.PropertyIndex = "Size"; - grow.DestinationValue = new Size2D(200, 200); - _animation = _contentView.VisualAnimate(grow); + _animation = _contentView.AnimateVisual(_icon, "Size", new Size2D(200, 200), 0, 1000, AlphaFunction.BuiltinFunctions.Linear); } else { - VisualAnimator shrink = new VisualAnimator(); - shrink.AlphaFunction = AlphaFunction.BuiltinFunctions.Linear; - shrink.StartTime = 0; - shrink.EndTime = 1000; - shrink.Target = "icon_visual1"; - shrink.PropertyIndex = "Size"; - shrink.DestinationValue = new Size2D(50, 50); - _animation = _contentView.VisualAnimate(shrink); + _animation = _contentView.AnimateVisual(_icon, "Size", new Position2D(50, 50), 0, 1000, AlphaFunction.BuiltinFunctions.Linear); } if (_animation) diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-animation-test2.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-animation-test2.cs index b8a9561..266f975 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-animation-test2.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-animation-test2.cs @@ -122,7 +122,7 @@ namespace VisaulAnimationExample _shadowButton1.Clicked += (obj, ev) => { _active1 = !_active1; - StartTransition(_contentView1, "icon_visual1", "Offset", _active1); + StartTransition(_contentView1, _icon, "Offset", _active1); return true; }; _shadowButton1.WidthResizePolicy = ResizePolicyType.FillToParent; @@ -160,7 +160,7 @@ namespace VisaulAnimationExample _shadowButton2.Clicked += (obj, ev) => { _active2 = !_active2; - StartTransition(_contentView2, "icon_visual2", "Opacity", _active2); + StartTransition(_contentView2, _icon2, "Opacity", _active2); return true; }; _shadowButton2.WidthResizePolicy = ResizePolicyType.FillToParent; @@ -198,7 +198,7 @@ namespace VisaulAnimationExample _shadowButton3.Clicked += (obj, ev) => { _active3 = !_active3; - StartTransition(_contentView3, "icon_visual3", "MixColor", _active3); + StartTransition(_contentView3, _icon3, "MixColor", _active3); return true; }; _shadowButton3.WidthResizePolicy = ResizePolicyType.FillToParent; @@ -206,7 +206,7 @@ namespace VisaulAnimationExample contentLayout.AddChild(_shadowButton3, new TableView.CellPosition(2, 1)); } - private void StartTransition(VisualView view, string target, string property, bool activate) + private void StartTransition(VisualView view, VisualMap target, string property, bool activate) { if (_animation) { @@ -216,47 +216,33 @@ namespace VisaulAnimationExample if (activate) { - VisualAnimator state1 = new VisualAnimator(); - state1.AlphaFunction = AlphaFunction.BuiltinFunctions.Linear; - state1.StartTime = 0; - state1.EndTime = 1000; - state1.Target = target; - state1.PropertyIndex = property; if (property == "Offset") { - state1.DestinationValue = new Position2D(20, 20); + _animation = view.AnimateVisual(target, property, new Position2D(20, 20), 0, 1000, AlphaFunction.BuiltinFunctions.Linear); } else if (property == "Opacity") { - state1.DestinationValue = 0.0f; + _animation = view.AnimateVisual(target, property, 0.0f, 0, 1000, AlphaFunction.BuiltinFunctions.Linear); } else if (property == "MixColor") { - state1.DestinationValue = Color.Green; + _animation = view.AnimateVisual(target, property, Color.Green, 0, 1000, AlphaFunction.BuiltinFunctions.Linear); } - _animation = view.VisualAnimate(state1); } else { - VisualAnimator state2 = new VisualAnimator(); - state2.AlphaFunction = AlphaFunction.BuiltinFunctions.Linear; - state2.StartTime = 0; - state2.EndTime = 1000; - state2.Target = target; - state2.PropertyIndex = property; if (property == "Offset") { - state2.DestinationValue = new Position2D(5, 5); + _animation = view.AnimateVisual(target, property, new Position2D(5, 5), 0, 1000, AlphaFunction.BuiltinFunctions.Linear); } else if (property == "Opacity") { - state2.DestinationValue = 1.0f; + _animation = view.AnimateVisual(target, property, 1.0f, 0, 1000, AlphaFunction.BuiltinFunctions.Linear); } else if (property == "MixColor") { - state2.DestinationValue = Color.Red; + _animation = view.AnimateVisual(target, property, Color.Red, 0, 1000, AlphaFunction.BuiltinFunctions.Linear); } - _animation = view.VisualAnimate(state2); } if (_animation) diff --git a/Tizen.NUI/src/internal/Alignment.cs b/Tizen.NUI/src/internal/Alignment.cs index 7b8e6c4..b63920d 100755 --- a/Tizen.NUI/src/internal/Alignment.cs +++ b/Tizen.NUI/src/internal/Alignment.cs @@ -33,6 +33,8 @@ internal class Alignment : View { internal Alignment(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Alignment_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(Alignment obj) { diff --git a/Tizen.NUI/src/internal/Application.cs b/Tizen.NUI/src/internal/Application.cs index f136a58..885de01 100755 --- a/Tizen.NUI/src/internal/Application.cs +++ b/Tizen.NUI/src/internal/Application.cs @@ -19,10 +19,10 @@ namespace Tizen.NUI { public const int ver1 = 1; public const int ver2 = 2; - public const int ver3 = 38; + public const int ver3 = 39; public const int nuiVer1 = 0; public const int nuiVer2 = 2; - public const int nuiVer3 = 38; + public const int nuiVer3 = 39; public const string nuiRelease = ""; } diff --git a/Tizen.NUI/src/internal/Button.cs b/Tizen.NUI/src/internal/Button.cs index 80976b3..de51409 100755 --- a/Tizen.NUI/src/internal/Button.cs +++ b/Tizen.NUI/src/internal/Button.cs @@ -43,6 +43,8 @@ namespace Tizen.NUI.UIComponents 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) diff --git a/Tizen.NUI/src/internal/FriendAssembly.cs b/Tizen.NUI/src/internal/FriendAssembly.cs index 630d83e..98b0db6 100755 --- a/Tizen.NUI/src/internal/FriendAssembly.cs +++ b/Tizen.NUI/src/internal/FriendAssembly.cs @@ -22,8 +22,8 @@ using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("Tizen.NUI.Extension.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001004d7c7c03a196ecb8e7cc5056750e1f40ee2bbe99f0e53a07f2538f2b0f450bd731b9dca3706503a0378baca74a09cf3af6261b330c031f44817ab6ed64189460765a402279d3e0c1fa7295ae1dccb2e3ff329705fd85b58d66ae7cb7e95ba06e0d847c3e3ba918798f579e5caeb1c6149955e6baf24236eec46227a623e494b1")] [assembly: InternalsVisibleTo("Tizen.Multimedia, PublicKey=0024000004800000940000000602000000240000525341310004000001000100bd36a93b6d224759632d08a501b9dcb99a533e8ff0c3a1fc7044f5b05e176c005e5a7fc4d1dfa54da4d4cad4868c4518aa1f661380fb90685dc699d5e48dcc697b33c1e38b70845f405612d6827e7337c191ddd0a0aa35fdad654efe4c54881fdaa82ce35dce18ea918953e448c7aa284a47ed6fe3aa9404930b2b973a28cddf")] -[assembly: InternalsVisibleTo("Tizen.TV.NUI, PublicKey=0024000004800000940000000602000000240000525341310004000001000100ed445c2a988d35b99e5766f42eef33d89d1f67225db051f011abcfce47a4788875c39750a2e5695f1ec117f41d96610419811762669f98131db30a6e64c6bb8fde3731f373f6cda4c0087d121f5108559f216dc015807dc46ec5a4d1b63f5deff64c01754a0db0dc849bc300672572cbd2697432ab6c193ebf9fade6bf0f2aad")] -[assembly: InternalsVisibleTo("Tizen.TV.NUI.Component, PublicKey=0024000004800000940000000602000000240000525341310004000001000100ed445c2a988d35b99e5766f42eef33d89d1f67225db051f011abcfce47a4788875c39750a2e5695f1ec117f41d96610419811762669f98131db30a6e64c6bb8fde3731f373f6cda4c0087d121f5108559f216dc015807dc46ec5a4d1b63f5deff64c01754a0db0dc849bc300672572cbd2697432ab6c193ebf9fade6bf0f2aad")] +//[assembly: InternalsVisibleTo("Tizen.TV.NUI, PublicKey=0024000004800000940000000602000000240000525341310004000001000100ed445c2a988d35b99e5766f42eef33d89d1f67225db051f011abcfce47a4788875c39750a2e5695f1ec117f41d96610419811762669f98131db30a6e64c6bb8fde3731f373f6cda4c0087d121f5108559f216dc015807dc46ec5a4d1b63f5deff64c01754a0db0dc849bc300672572cbd2697432ab6c193ebf9fade6bf0f2aad")] +//[assembly: InternalsVisibleTo("Tizen.TV.NUI.Component, PublicKey=0024000004800000940000000602000000240000525341310004000001000100ed445c2a988d35b99e5766f42eef33d89d1f67225db051f011abcfce47a4788875c39750a2e5695f1ec117f41d96610419811762669f98131db30a6e64c6bb8fde3731f373f6cda4c0087d121f5108559f216dc015807dc46ec5a4d1b63f5deff64c01754a0db0dc849bc300672572cbd2697432ab6c193ebf9fade6bf0f2aad")] namespace Tizen.NUI { diff --git a/Tizen.NUI/src/internal/GaussianBlurView.cs b/Tizen.NUI/src/internal/GaussianBlurView.cs index cf11032..3bdb410 100755 --- a/Tizen.NUI/src/internal/GaussianBlurView.cs +++ b/Tizen.NUI/src/internal/GaussianBlurView.cs @@ -37,6 +37,8 @@ using System.Runtime.InteropServices; internal GaussianBlurView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.GaussianBlurView_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(GaussianBlurView obj) { diff --git a/Tizen.NUI/src/internal/ManualPINVOKE.cs b/Tizen.NUI/src/internal/ManualPINVOKE.cs index f2fcee0..56da23b 100755 --- a/Tizen.NUI/src/internal/ManualPINVOKE.cs +++ b/Tizen.NUI/src/internal/ManualPINVOKE.cs @@ -578,7 +578,11 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextLabel_Property_ELLIPSIS_get")] public static extern int TextLabel_Property_ELLIPSIS_get(); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_TextLabel_Property_AUTO_SCROLL_STOP_MODE_get")] + public static extern int TextLabel_Property_AUTO_SCROLL_STOP_MODE_get(); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_TextLabel_Property_AUTO_SCROLL_LOOP_DELAY_get")] + public static extern int TextLabel_Property_AUTO_SCROLL_LOOP_DELAY_get(); } } diff --git a/Tizen.NUI/src/internal/Model3dView.cs b/Tizen.NUI/src/internal/Model3dView.cs index aa8b740..843636c 100755 --- a/Tizen.NUI/src/internal/Model3dView.cs +++ b/Tizen.NUI/src/internal/Model3dView.cs @@ -33,6 +33,8 @@ namespace Tizen.NUI { internal Model3dView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Model3dView_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(Model3dView obj) { diff --git a/Tizen.NUI/src/internal/NDalicPINVOKE.cs b/Tizen.NUI/src/internal/NDalicPINVOKE.cs index a3876a4..6268803 100755 --- a/Tizen.NUI/src/internal/NDalicPINVOKE.cs +++ b/Tizen.NUI/src/internal/NDalicPINVOKE.cs @@ -93,7 +93,7 @@ class NDalicPINVOKE { static void SetPendingArgumentNullException(string message, string paramName) { global::System.Exception e = SWIGPendingException.Retrieve(); if (e != null) message = message + " Inner Exception: " + e.Message; - SWIGPendingException.Set(new global::System.ArgumentNullException(paramName, message)); + SWIGPendingException.Set(new global::System.ArgumentNullException(message, paramName)); } static void SetPendingArgumentOutOfRangeException(string message, string paramName) { global::System.Exception e = SWIGPendingException.Retrieve(); @@ -6208,6 +6208,60 @@ class NDalicPINVOKE { [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_IsVisible")] public static extern bool IsVisible(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_GetSupportedAuxiliaryHintCount")] + public static extern uint GetSupportedAuxiliaryHintCount(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_GetSupportedAuxiliaryHint")] + public static extern string GetSupportedAuxiliaryHint(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_AddAuxiliaryHint")] + public static extern uint AddAuxiliaryHint(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, string jarg3); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_RemoveAuxiliaryHint")] + public static extern bool RemoveAuxiliaryHint(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_SetAuxiliaryHintValue")] + public static extern bool SetAuxiliaryHintValue(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2, string jarg3); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_GetAuxiliaryHintValue")] + public static extern string GetAuxiliaryHintValue(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_GetAuxiliaryHintId")] + public static extern uint GetAuxiliaryHintId(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_SetInputRegion")] + public static extern void SetInputRegion(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_SetType")] + public static extern void SetType(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_GetType")] + public static extern int GetType(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_SetNotificationLevel")] + public static extern bool SetNotificationLevel(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_GetNotificationLevel")] + public static extern int GetNotificationLevel(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_SetOpaqueState")] + public static extern void SetOpaqueState(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_IsOpaqueState")] + public static extern bool IsOpaqueState(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_SetScreenMode")] + public static extern bool SetScreenMode(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_GetScreenMode")] + public static extern int GetScreenMode(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_SetBrightness")] + public static extern bool SetBrightness(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_GetBrightness")] + public static extern int GetBrightness(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_New__SWIG_0")] public static extern global::System.IntPtr Application_New__SWIG_0(); diff --git a/Tizen.NUI/src/internal/PageTurnView.cs b/Tizen.NUI/src/internal/PageTurnView.cs index 0f3b7e3..5c4faa6 100755 --- a/Tizen.NUI/src/internal/PageTurnView.cs +++ b/Tizen.NUI/src/internal/PageTurnView.cs @@ -19,6 +19,8 @@ using Tizen.NUI.BaseComponents; internal PageTurnView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PageTurnView_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(PageTurnView obj) { diff --git a/Tizen.NUI/src/internal/Popup.cs b/Tizen.NUI/src/internal/Popup.cs index 21e8a60..77722b9 100755 --- a/Tizen.NUI/src/internal/Popup.cs +++ b/Tizen.NUI/src/internal/Popup.cs @@ -41,6 +41,8 @@ namespace Tizen.NUI.UIComponents 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) diff --git a/Tizen.NUI/src/internal/ProgressBar.cs b/Tizen.NUI/src/internal/ProgressBar.cs index 1cc47d1..a178cb2 100755 --- a/Tizen.NUI/src/internal/ProgressBar.cs +++ b/Tizen.NUI/src/internal/ProgressBar.cs @@ -41,6 +41,8 @@ namespace Tizen.NUI.UIComponents 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) diff --git a/Tizen.NUI/src/internal/Scrollable.cs b/Tizen.NUI/src/internal/Scrollable.cs index 82a857a..3cf0348 100755 --- a/Tizen.NUI/src/internal/Scrollable.cs +++ b/Tizen.NUI/src/internal/Scrollable.cs @@ -19,6 +19,8 @@ using Tizen.NUI.BaseComponents; 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) { diff --git a/Tizen.NUI/src/internal/Slider.cs b/Tizen.NUI/src/internal/Slider.cs index f45a8dd..22e9d90 100755 --- a/Tizen.NUI/src/internal/Slider.cs +++ b/Tizen.NUI/src/internal/Slider.cs @@ -41,6 +41,8 @@ namespace Tizen.NUI.UIComponents internal Slider(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Slider_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(Slider obj) diff --git a/Tizen.NUI/src/internal/ViewWrapper.cs b/Tizen.NUI/src/internal/ViewWrapper.cs index 90b9112..7bb2967 100755 --- a/Tizen.NUI/src/internal/ViewWrapper.cs +++ b/Tizen.NUI/src/internal/ViewWrapper.cs @@ -27,6 +27,8 @@ namespace Tizen.NUI internal ViewWrapper(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.ViewWrapper_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(ViewWrapper obj) diff --git a/Tizen.NUI/src/internal/dotnetcore/AddedException.cs b/Tizen.NUI/src/internal/dotnetcore/AddedException.cs index d59a4ef..5e05865 100755 --- a/Tizen.NUI/src/internal/dotnetcore/AddedException.cs +++ b/Tizen.NUI/src/internal/dotnetcore/AddedException.cs @@ -20,17 +20,17 @@ namespace System { public ApplicationException() { - new global::System.InvalidCastException(); + new global::System.ApplicationException(); } public ApplicationException(string message) { - new global::System.InvalidCastException(message); + new global::System.ApplicationException(message); } public ApplicationException(string message, Exception innerException) { - new global::System.InvalidCastException(message, innerException); + new global::System.ApplicationException(message, innerException); } } @@ -38,17 +38,17 @@ namespace System { public SystemException() { - new global::System.InvalidCastException(); + new global::System.SystemException(); } public SystemException(string message) { - new global::System.InvalidCastException(message); + new global::System.SystemException(message); } public SystemException(string message, Exception innerException) { - new global::System.InvalidCastException(message, innerException); + new global::System.SystemException(message, innerException); } } } diff --git a/Tizen.NUI/src/public/Animation.cs b/Tizen.NUI/src/public/Animation.cs index badb901..b3f40ce 100755 --- a/Tizen.NUI/src/public/Animation.cs +++ b/Tizen.NUI/src/public/Animation.cs @@ -379,7 +379,7 @@ namespace Tizen.NUI Property _prop = new Property(target, _str); if (_prop.propertyIndex == Property.INVALID_INDEX) { - throw new System.Exception("second argument string property is invalid parameter!"); + throw new System.ArgumentException("second argument string property is invalid parameter!"); } PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex); @@ -423,7 +423,7 @@ namespace Tizen.NUI Property _prop = new Property(target, _str); if (_prop.propertyIndex == Property.INVALID_INDEX) { - throw new System.Exception("second argument string property is invalid parameter!"); + throw new System.ArgumentException("second argument string property is invalid parameter!"); } PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex); @@ -467,7 +467,7 @@ namespace Tizen.NUI Property _prop = new Property(target, _str); if (_prop.propertyIndex == Property.INVALID_INDEX) { - throw new System.Exception("second argument string property is invalid parameter!"); + throw new System.ArgumentException("second argument string property is invalid parameter!"); } PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex); @@ -512,7 +512,7 @@ namespace Tizen.NUI Property _prop = new Property(target, _str); if (_prop.propertyIndex == Property.INVALID_INDEX) { - throw new System.Exception("second argument string property is invalid parameter!"); + throw new System.ArgumentException("second argument string property is invalid parameter!"); } PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex); @@ -557,7 +557,7 @@ namespace Tizen.NUI Property _prop = new Property(target, _str); if (_prop.propertyIndex == Property.INVALID_INDEX) { - throw new System.Exception("second argument string property is invalid parameter!"); + throw new System.ArgumentException("second argument string property is invalid parameter!"); } if (alphaFunction != null) @@ -590,7 +590,7 @@ namespace Tizen.NUI Property _prop = new Property(target, _str); if (_prop.propertyIndex == Property.INVALID_INDEX) { - throw new System.Exception("second argument string property is invalid parameter!"); + throw new System.ArgumentException("second argument string property is invalid parameter!"); } Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime)); diff --git a/Tizen.NUI/src/public/BaseComponents/ImageView.cs b/Tizen.NUI/src/public/BaseComponents/ImageView.cs index 98bad20..93dcc1a 100755 --- a/Tizen.NUI/src/public/BaseComponents/ImageView.cs +++ b/Tizen.NUI/src/public/BaseComponents/ImageView.cs @@ -40,6 +40,8 @@ namespace Tizen.NUI.BaseComponents internal ImageView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ImageView_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(ImageView obj) diff --git a/Tizen.NUI/src/public/BaseComponents/TextEditor.cs b/Tizen.NUI/src/public/BaseComponents/TextEditor.cs index fdc33dc..87195c5 100755 --- a/Tizen.NUI/src/public/BaseComponents/TextEditor.cs +++ b/Tizen.NUI/src/public/BaseComponents/TextEditor.cs @@ -40,6 +40,8 @@ namespace Tizen.NUI.BaseComponents internal TextEditor(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TextEditor_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(TextEditor obj) diff --git a/Tizen.NUI/src/public/BaseComponents/TextField.cs b/Tizen.NUI/src/public/BaseComponents/TextField.cs index 3044e8a..8049dd1 100755 --- a/Tizen.NUI/src/public/BaseComponents/TextField.cs +++ b/Tizen.NUI/src/public/BaseComponents/TextField.cs @@ -40,6 +40,8 @@ namespace Tizen.NUI.BaseComponents internal TextField(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TextField_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(TextField obj) diff --git a/Tizen.NUI/src/public/BaseComponents/TextLabel.cs b/Tizen.NUI/src/public/BaseComponents/TextLabel.cs index 523731a..8b24a6f 100755 --- a/Tizen.NUI/src/public/BaseComponents/TextLabel.cs +++ b/Tizen.NUI/src/public/BaseComponents/TextLabel.cs @@ -38,6 +38,8 @@ namespace Tizen.NUI.BaseComponents internal TextLabel(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TextLabel_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(TextLabel obj) @@ -147,6 +149,8 @@ namespace Tizen.NUI.BaseComponents internal static readonly int OUTLINE = NDalicPINVOKE.TextLabel_Property_OUTLINE_get(); internal static readonly int PIXEL_SIZE = NDalicManualPINVOKE.TextLabel_Property_PIXEL_SIZE_get(); internal static readonly int ELLIPSIS = NDalicManualPINVOKE.TextLabel_Property_ELLIPSIS_get(); + internal static readonly int AUTO_SCROLL_STOP_MODE = NDalicManualPINVOKE.TextLabel_Property_AUTO_SCROLL_STOP_MODE_get(); + internal static readonly int AUTO_SCROLL_LOOP_DELAY = NDalicManualPINVOKE.TextLabel_Property_AUTO_SCROLL_LOOP_DELAY_get(); } @@ -744,5 +748,54 @@ namespace Tizen.NUI.BaseComponents } } + /// + /// AutoScrollLoopDelay property.
+ /// do something.
+ ///
+ public float AutoScrollLoopDelay + { + get + { + float temp = 0.0f; + GetProperty(TextLabel.Property.AUTO_SCROLL_LOOP_DELAY).Get(ref temp); + return temp; + } + set + { + SetProperty(TextLabel.Property.AUTO_SCROLL_LOOP_DELAY, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// AutoScrollStopMode property.
+ /// do something.
+ ///
+ public AutoScrollStopMode AutoScrollStopMode + { + get + { + string temp; + if(GetProperty(TextLabel.Property.AUTO_SCROLL_STOP_MODE).Get(out temp) == false) + { +#if DEBUG_ON + Tizen.Log.Error("NUI", "AutoScrollStopMode get error!"); +#endif + } + switch (temp) + { + case "FINISH_LOOP": + return AutoScrollStopMode.FinishLoop; + case "IMMEDIATE": + return AutoScrollStopMode.Immediate; + default: + return AutoScrollStopMode.FinishLoop; + } + } + set + { + SetProperty(TextLabel.Property.AUTO_SCROLL_STOP_MODE, new Tizen.NUI.PropertyValue((int)value)); + } + } + } } diff --git a/Tizen.NUI/src/public/BaseComponents/View.cs b/Tizen.NUI/src/public/BaseComponents/View.cs index a929f45..48ddd27 100755 --- a/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/Tizen.NUI/src/public/BaseComponents/View.cs @@ -33,9 +33,6 @@ namespace Tizen.NUI.BaseComponents // Register this instance of view in the view registry. ViewRegistry.RegisterView(this); - - // By default, we do not want the position to use the anchor point - this.PositionUsesAnchorPoint = false; } internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj) @@ -831,6 +828,7 @@ namespace Tizen.NUI.BaseComponents /// public View() : this(NDalicPINVOKE.View_New(), true) { + PositionUsesAnchorPoint = false; if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } @@ -1765,12 +1763,12 @@ namespace Tizen.NUI.BaseComponents get { bool temp = false; - if(this) GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(ref temp); + GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(ref temp); return temp; } set { - if(this) SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value)); + SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value)); } } @@ -1832,6 +1830,23 @@ namespace Tizen.NUI.BaseComponents } /// + /// Gets the natural size of the view.
+ ///
+ /// + /// Readonly. + /// + public Vector3 NaturalSize + { + get + { + Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + /// /// Shows the View. /// /// @@ -1855,31 +1870,14 @@ namespace Tizen.NUI.BaseComponents SetVisible(false); } - /// - /// Raise view above the next highest level of view(s). - /// - /// - /// Sibling order of views within the parent will be updated automatically. - /// Initially views added to a parent will have the same sibling order and shown in relation to insertion order. - /// Raising this view above views with the same sibling order as each other will raise this view above them. - /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion. - /// - public void Raise() + internal void Raise() { NDalicPINVOKE.Raise(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - /// - /// Lower the view to underneath the level below view(s). - /// - /// - /// Sibling order of views within the parent will be updated automatically. - /// Lowering this view below views with the same sibling order as each other will lower this view above them. - /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion. - /// - public void Lower() + internal void Lower() { NDalicPINVOKE.Lower(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) @@ -2163,12 +2161,7 @@ namespace Tizen.NUI.BaseComponents return ret; } - /// - /// Returns the natural size of the view.
- /// Deriving classes stipulate the natural size and by default an view has a ZERO natural size.
- ///
- /// The view's natural size - public Vector3 GetNaturalSize() + internal Vector3 GetNaturalSize() { Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true); if (NDalicPINVOKE.SWIGPendingException.Pending) diff --git a/Tizen.NUI/src/public/BaseComponents/VisualView.cs b/Tizen.NUI/src/public/BaseComponents/VisualView.cs index d816d7d..7cb39cd 100755 --- a/Tizen.NUI/src/public/BaseComponents/VisualView.cs +++ b/Tizen.NUI/src/public/BaseComponents/VisualView.cs @@ -204,17 +204,117 @@ namespace Tizen.NUI.BaseComponents } /// - /// Create visual animation (transition) with the input property map + /// Create visual animation (transition) with the input parameters. /// - /// property map to define visual animation + /// The visual map to animation. + /// The property of visual to animation. + /// The destination value of property after animation. + /// The start time of visual animation. + /// The end time of visual animation. + /// The alpha function of visual animation /// Animation instance - public Animation VisualAnimate(VisualAnimator visualMap) + public Animation AnimateVisual(VisualMap target, string property, object destinationValue, int startTime, int endTime, AlphaFunction.BuiltinFunctions alphaFunction) { + string _alphaFunction = ""; + switch (alphaFunction) + { + case Tizen.NUI.AlphaFunction.BuiltinFunctions.Linear: + { + _alphaFunction = "LINEAR"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.Reverse: + { + _alphaFunction = "REVERSE"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSquare: + { + _alphaFunction = "EASE_IN_SQUARE"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSquare: + { + _alphaFunction = "EASE_OUT_SQUARE"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn: + { + _alphaFunction = "EASE_IN"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut: + { + _alphaFunction = "EASE_OUT"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOut: + { + _alphaFunction = "EASE_IN_OUT"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSine: + { + _alphaFunction = "EASE_IN_SINE"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSine: + { + _alphaFunction = "EASE_OUT_SINE"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOutSine: + { + _alphaFunction = "EASE_IN_OUT_SINE"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.Bounce: + { + _alphaFunction = "BOUNCE"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.Sin: + { + _alphaFunction = "SIN"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutBack: + { + _alphaFunction = "EASE_OUT_BACK"; + break; + } + default: + { + _alphaFunction = "DEFAULT"; + break; + } + } + foreach (var item in _visualDictionary.ToList()) { - if (item.Value.Name == visualMap.Target) + if (item.Value.Name == target.Name) { - TransitionData _transitionData = new TransitionData(visualMap.OutputVisualMap); + PropertyMap _animator = new PropertyMap(); + _animator.Add("alphaFunction", new PropertyValue(_alphaFunction)); + + PropertyMap _timePeriod = new PropertyMap(); + _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f)); + _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f)); + _animator.Add("timePeriod", new PropertyValue(_timePeriod)); + + string _str1 = property.Substring(0, 1); + string _str2 = property.Substring(1); + string _str = _str1.ToLower() + _str2; + + PropertyValue val = PropertyValue.CreateFromObject(destinationValue); + + PropertyMap _transition = new PropertyMap(); + _transition.Add("target", new PropertyValue(target.Name)); + _transition.Add("property", new PropertyValue(_str)); + _transition.Add("targetValue", val); + _transition.Add("animator", new PropertyValue(_animator)); + + TransitionData _transitionData = new TransitionData(_transition); return this.CreateTransition(_transitionData); } } diff --git a/Tizen.NUI/src/public/FlexContainer.cs b/Tizen.NUI/src/public/FlexContainer.cs index 30bc27f..83f6341 100755 --- a/Tizen.NUI/src/public/FlexContainer.cs +++ b/Tizen.NUI/src/public/FlexContainer.cs @@ -41,6 +41,8 @@ namespace Tizen.NUI internal FlexContainer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.FlexContainer_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(FlexContainer obj) diff --git a/Tizen.NUI/src/public/Layer.cs b/Tizen.NUI/src/public/Layer.cs index a89b498..3087d20 100755 --- a/Tizen.NUI/src/public/Layer.cs +++ b/Tizen.NUI/src/public/Layer.cs @@ -369,6 +369,20 @@ namespace Tizen.NUI } /// + /// Retrieves child view by index. + /// + ///
The View has been initialized.
+ /// The index of the child to retrieve + /// The view for the given index or empty handle if children not initialized + public View GetChildAt(uint index) + { + View ret = new View(NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// /// Enumeration for the behavior of the layer. /// public enum LayerBehavior diff --git a/Tizen.NUI/src/public/NUIConstants.cs b/Tizen.NUI/src/public/NUIConstants.cs index b2953e6..a09b96d 100755 --- a/Tizen.NUI/src/public/NUIConstants.cs +++ b/Tizen.NUI/src/public/NUIConstants.cs @@ -1229,4 +1229,85 @@ namespace Tizen.NUI } } } + + /// + /// Auto scrolling stop behaviour. + /// + public enum AutoScrollStopMode + { + /// + /// Stop animation after current loop finished. + /// + FinishLoop, + /// + /// Stop animation immediatly and reset position. + /// + Immediate + } + + /// + /// An enum of screen mode. + /// + public enum ScreenModeType { + /// + /// The mode which turns the screen off after a timeout. + /// + Default, + /// + /// The mode which keeps the screen turned on. + /// + AlwaysOn + } + + /// + /// An enum of notification window's priority level. + /// + public enum NotificationLevelType { + /// + /// No notification level.
+ /// Default level.
+ /// This value makes the notification window place in the layer of the normal window. + ///
+ None = -1, + /// + /// Base nofitication level. + /// + Base = 10, + /// + /// Medium notification level than base. + /// + Medium = 20, + /// + /// Higher notification level than medium. + /// + High = 30, + /// + /// The highest notification level. + /// + Top = 40 + } + + /// + /// An enum of Window types. + /// + public enum WindowType { + /// + /// A default window type.
+ /// Indicates a normal, top-level window. + /// Almost every window will be created with this type. + ///
+ Normal, + /// + /// A notification window, like a warning about battery life or a new E-Mail received. + /// + Notification, + /// + /// A persistent utility window, like a toolbox or palette. + /// + Utility, + /// + /// Used for simple dialog windows. + /// + Dialog + } } \ No newline at end of file diff --git a/Tizen.NUI/src/public/TableView.cs b/Tizen.NUI/src/public/TableView.cs index 21913cc..2377e31 100755 --- a/Tizen.NUI/src/public/TableView.cs +++ b/Tizen.NUI/src/public/TableView.cs @@ -42,6 +42,8 @@ namespace Tizen.NUI internal TableView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TableView_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(TableView obj) diff --git a/Tizen.NUI/src/public/UIComponents/ScrollBar.cs b/Tizen.NUI/src/public/UIComponents/ScrollBar.cs index 3fe33e5..7af08ea 100755 --- a/Tizen.NUI/src/public/UIComponents/ScrollBar.cs +++ b/Tizen.NUI/src/public/UIComponents/ScrollBar.cs @@ -42,6 +42,8 @@ namespace Tizen.NUI.UIComponents internal ScrollBar(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ScrollBar_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(ScrollBar obj) diff --git a/Tizen.NUI/src/public/VideoView.cs b/Tizen.NUI/src/public/VideoView.cs index 39d85ab..c2231a5 100755 --- a/Tizen.NUI/src/public/VideoView.cs +++ b/Tizen.NUI/src/public/VideoView.cs @@ -41,6 +41,8 @@ namespace Tizen.NUI internal VideoView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.VideoView_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(VideoView obj) diff --git a/Tizen.NUI/src/public/VisualMaps.cs b/Tizen.NUI/src/public/VisualMaps.cs index 959dd07..1e76181 100755 --- a/Tizen.NUI/src/public/VisualMaps.cs +++ b/Tizen.NUI/src/public/VisualMaps.cs @@ -1978,220 +1978,5 @@ namespace Tizen.NUI } } - /// - /// A class encapsulating the property map of a visual transition(Animator). - /// - public class VisualAnimator : VisualMap - { - public VisualAnimator() : base() - { - } - - private string _alphaFunction = null; - private int _startTime = 0; - private int _endTime = 0; - private string _target = null; - private string _propertyIndex = null; - private object _destinationValue = null; - - public AlphaFunction.BuiltinFunctions AlphaFunction - { - get - { - switch (_alphaFunction) - { - case "LINEAR": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.Linear; - case "REVERSE": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.Reverse; - case "EASE_IN_SQUARE": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSquare; - case "EASE_OUT_SQUARE": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSquare; - case "EASE_IN": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn; - case "EASE_OUT": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut; - case "EASE_IN_OUT": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOut; - case "EASE_IN_SINE": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSine; - case "EASE_OUT_SINE": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSine; - case "EASE_IN_OUT_SINE": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOutSine; - case "BOUNCE": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.Bounce; - case "SIN": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.Sin; - case "EASE_OUT_BACK": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutBack; - default: - return Tizen.NUI.AlphaFunction.BuiltinFunctions.Default; - } - } - set - { - switch (value) - { - case Tizen.NUI.AlphaFunction.BuiltinFunctions.Linear: - { - _alphaFunction = "LINEAR"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.Reverse: - { - _alphaFunction = "REVERSE"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSquare: - { - _alphaFunction = "EASE_IN_SQUARE"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSquare: - { - _alphaFunction = "EASE_OUT_SQUARE"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn: - { - _alphaFunction = "EASE_IN"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut: - { - _alphaFunction = "EASE_OUT"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOut: - { - _alphaFunction = "EASE_IN_OUT"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSine: - { - _alphaFunction = "EASE_IN_SINE"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSine: - { - _alphaFunction = "EASE_OUT_SINE"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOutSine: - { - _alphaFunction = "EASE_IN_OUT_SINE"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.Bounce: - { - _alphaFunction = "BOUNCE"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.Sin: - { - _alphaFunction = "SIN"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutBack: - { - _alphaFunction = "EASE_OUT_BACK"; - break; - } - default: - { - _alphaFunction = "DEFAULT"; - break; - } - } - } - } - - public int StartTime - { - get - { - return _startTime; - } - set - { - _startTime = value; - } - } - - public int EndTime - { - get - { - return _endTime; - } - set - { - _endTime = value; - } - } - - public string Target - { - get - { - return _target; - } - set - { - _target = value; - } - } - - public string PropertyIndex - { - get - { - return _propertyIndex; - } - set - { - _propertyIndex = value; - } - } - - public object DestinationValue - { - get - { - return _destinationValue; - } - set - { - _destinationValue = value; - } - } - - protected override void ComposingPropertyMap() - { - PropertyMap _animator = new PropertyMap(); - _animator.Add("alphaFunction", new PropertyValue(_alphaFunction)); - - PropertyMap _timePeriod = new PropertyMap(); - _timePeriod.Add("duration", new PropertyValue((_endTime - _startTime) / 1000.0f)); - _timePeriod.Add("delay", new PropertyValue(_startTime / 1000.0f)); - _animator.Add("timePeriod", new PropertyValue(_timePeriod)); - - string _str1 = _propertyIndex.Substring(0, 1); - string _str2 = _propertyIndex.Substring(1); - string _str = _str1.ToLower() + _str2; - - PropertyValue val = PropertyValue.CreateFromObject(_destinationValue); - - PropertyMap _transition = new PropertyMap(); - _transition.Add("target", new PropertyValue(_target)); - _transition.Add("property", new PropertyValue(_str)); - _transition.Add("targetValue", val); - _transition.Add("animator", new PropertyValue(_animator)); - - _outputVisualMap = _transition; - } - } } diff --git a/Tizen.NUI/src/public/Window.cs b/Tizen.NUI/src/public/Window.cs index 4a04312..8815c05 100755 --- a/Tizen.NUI/src/public/Window.cs +++ b/Tizen.NUI/src/public/Window.cs @@ -140,6 +140,193 @@ namespace Tizen.NUI return temp; } + /// + /// Gets the count of supported auxiliary hints of the window. + /// + /// The number of supported auxiliary hints. + public uint GetSupportedAuxiliaryHintCount() { + uint ret = NDalicPINVOKE.GetSupportedAuxiliaryHintCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Gets the supported auxiliary hint string of the window. + /// + /// The index of the supported auxiliary hint lists. + /// The auxiliary hint string of the index. + public string GetSupportedAuxiliaryHint(uint index) { + string ret = NDalicPINVOKE.GetSupportedAuxiliaryHint(swigCPtr, index); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Creates an auxiliary hint of the window. + /// + /// The auxiliary hint string. + /// The value string. + /// The ID of created auxiliary hint, or 0 on failure. + public uint AddAuxiliaryHint(string hint, string value) { + uint ret = NDalicPINVOKE.AddAuxiliaryHint(swigCPtr, hint, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Removes an auxiliary hint of the window. + /// + /// The ID of the auxiliary hint. + /// True if no error occurred, false otherwise. + public bool RemoveAuxiliaryHint(uint id) { + bool ret = NDalicPINVOKE.RemoveAuxiliaryHint(swigCPtr, id); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Changes a value of the auxiliary hint. + /// + /// The auxiliary hint ID. + /// The value string to be set. + /// True if no error occurred, false otherwise. + public bool SetAuxiliaryHintValue(uint id, string value) { + bool ret = NDalicPINVOKE.SetAuxiliaryHintValue(swigCPtr, id, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Gets a value of the auxiliary hint. + /// + /// The auxiliary hint ID. + /// The string value of the auxiliary hint ID, or an empty string if none exists. + public string GetAuxiliaryHintValue(uint id) { + string ret = NDalicPINVOKE.GetAuxiliaryHintValue(swigCPtr, id); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Gets an ID of the auxiliary hint string. + /// + /// The auxiliary hint string. + /// The ID of auxiliary hint string, or 0 on failure. + public uint GetAuxiliaryHintId(string hint) { + uint ret = NDalicPINVOKE.GetAuxiliaryHintId(swigCPtr, hint); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Sets a region to accept input events. + /// + /// The region to accept input events. + public void SetInputRegion(Rectangle inputRegion) { + NDalicPINVOKE.SetInputRegion(swigCPtr, Rectangle.getCPtr(inputRegion)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Gets/Sets a window type. + /// + public WindowType Type + { + get + { + WindowType ret = (WindowType)NDalicPINVOKE.GetType(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + set + { + NDalicPINVOKE.SetType(swigCPtr, (int)value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + /// + /// Sets a priority level for the specified notification window. + /// + /// The notification window level. + /// True if no error occurred, false otherwise. + public bool SetNotificationLevel(NotificationLevelType level) { + bool ret = NDalicPINVOKE.SetNotificationLevel(swigCPtr, (int)level); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Gets a priority level for the specified notification window. + /// + /// The notification window level. + public NotificationLevelType GetNotificationLevel() { + NotificationLevelType ret = (NotificationLevelType)NDalicPINVOKE.GetNotificationLevel(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Sets a transparent window's visual state to opaque. + /// + /// Whether the window's visual state is opaque. + public void SetOpaqueState(bool opaque) { + NDalicPINVOKE.SetOpaqueState(swigCPtr, opaque); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Returns whether a transparent window's visual state is opaque or not. + /// + /// True if the window's visual state is opaque, false otherwise. + public bool IsOpaqueState() { + bool ret = NDalicPINVOKE.IsOpaqueState(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Sets a window's screen mode. + /// + /// The screen mode. + /// True if no error occurred, false otherwise. + public bool SetScreenMode(ScreenModeType screenMode) { + bool ret = NDalicPINVOKE.SetScreenMode(swigCPtr, (int)screenMode); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Gets a screen mode of the window. + /// + /// The screen mode. + public ScreenModeType GetScreenMode() { + ScreenModeType ret = (ScreenModeType)NDalicPINVOKE.GetScreenMode(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Sets preferred brightness of the window. + /// + /// The preferred brightness (0 to 100). + /// True if no error occurred, false otherwise. + public bool SetBrightness(int brightness) { + bool ret = NDalicPINVOKE.SetBrightness(swigCPtr, brightness); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Gets preffered brightness of the window. + /// + /// The preffered brightness. + public int GetBrightness() { + int ret = NDalicPINVOKE.GetBrightness(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + public class WindowFocusChangedEventArgs : EventArgs { public bool FocusGained @@ -422,7 +609,12 @@ namespace Tizen.NUI return ret; } - internal uint GetLayerCount() + /// + /// Queries the number of on-window layers. + /// + /// The number of layers. + /// Note that a default layer is always provided (count >= 1). + public uint GetLayerCount() { uint ret = NDalicPINVOKE.Stage_GetLayerCount(stageCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); diff --git a/packaging/csapi-nui.spec b/packaging/csapi-nui.spec index 6896aa5..fdd56f9 100755 --- a/packaging/csapi-nui.spec +++ b/packaging/csapi-nui.spec @@ -1,6 +1,6 @@ Name: csapi-nui Summary: dali-NUI -Version: 0.2.38 +Version: 0.2.39 Release: 1 Group: Development/Libraries License: Apache-2.0 and BSD-3-Clause and MIT