From: xb.teng Date: Wed, 17 May 2017 10:13:46 +0000 (+0800) Subject: the remain things of manual merge for nui 0.2.39 X-Git-Tag: preview1-00180^2~52^2~69 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c205c246a4332d2754c7429565745d83655d3cd7;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git the remain things of manual merge for nui 0.2.39 Change-Id: Idb56f84f824d621f8bb428ed148b40913c4a822d --- diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/dali-test.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/dali-test.cs old mode 100644 new mode 100755 index abe525d..ee00d88 --- 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 old mode 100644 new mode 100755 index fe496dd..f8ee10f --- 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/src/Tizen.NUI/src/internal/FriendAssembly.cs b/src/Tizen.NUI/src/internal/FriendAssembly.cs index 630d83e..98b0db6 100644 --- a/src/Tizen.NUI/src/internal/FriendAssembly.cs +++ b/src/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/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs index be07b93..48ddd27 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs @@ -1830,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. /// /// @@ -1853,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) @@ -2161,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/src/Tizen.NUI/src/public/Layer.cs b/src/Tizen.NUI/src/public/Layer.cs old mode 100644 new mode 100755 index a89b498..3087d20 --- a/src/Tizen.NUI/src/public/Layer.cs +++ b/src/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/src/Tizen.NUI/src/public/Window.cs b/src/Tizen.NUI/src/public/Window.cs index 55c3e3d..8815c05 100755 --- a/src/Tizen.NUI/src/public/Window.cs +++ b/src/Tizen.NUI/src/public/Window.cs @@ -609,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();