VisibilityChangeTest();
ResourceReadyTest();
+ WindowDevelPropertyTest();
Animatable handle = new Animatable();
int myPropertyIndex = handle.RegisterProperty("myProperty", new PropertyValue(10.0f), PropertyAccessMode.ReadWrite);
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();
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
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";
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;
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
{
}
/// <summary>
+ /// Gets the natural size of the view.<br>
+ /// </summary>
+ /// <remarks>
+ /// Readonly.
+ /// </remarks>
+ public Vector3 NaturalSize
+ {
+ get
+ {
+ Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+ }
+
+ /// <summary>
/// Shows the View.
/// </summary>
/// <remarks>
SetVisible(false);
}
- /// <summary>
- /// Raise view above the next highest level of view(s).
- /// </summary>
- /// <remarks>
- /// 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.
- /// </remarks>
- public void Raise()
+ internal void Raise()
{
NDalicPINVOKE.Raise(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- /// <summary>
- /// Lower the view to underneath the level below view(s).
- /// </summary>
- /// <remarks>
- /// 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.
- /// </remarks>
- public void Lower()
+ internal void Lower()
{
NDalicPINVOKE.Lower(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending)
return ret;
}
- /// <summary>
- /// Returns the natural size of the view.<br>
- /// Deriving classes stipulate the natural size and by default an view has a ZERO natural size.<br>
- /// </summary>
- /// <returns>The view's natural size</returns>
- public Vector3 GetNaturalSize()
+ internal Vector3 GetNaturalSize()
{
Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
if (NDalicPINVOKE.SWIGPendingException.Pending)
}
/// <summary>
+ /// Retrieves child view by index.
+ /// </summary>
+ /// <pre>The View has been initialized.</pre>
+ /// <param name="index">The index of the child to retrieve</param>
+ /// <returns>The view for the given index or empty handle if children not initialized</returns>
+ 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;
+ }
+
+ /// <summary>
/// Enumeration for the behavior of the layer.
/// </summary>
public enum LayerBehavior
return ret;
}
- internal uint GetLayerCount()
+ /// <summary>
+ /// Queries the number of on-window layers.
+ /// </summary>
+ /// <returns>The number of layers.</returns>
+ /// <remarks>Note that a default layer is always provided (count >= 1).</remarks>
+ public uint GetLayerCount()
{
uint ret = NDalicPINVOKE.Stage_GetLayerCount(stageCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();