From dd3aa9150a872e3d4b5377062c1decb3d07aacd8 Mon Sep 17 00:00:00 2001 From: "dongsug.song" Date: Fri, 31 Mar 2017 21:33:39 +0900 Subject: [PATCH] build error fix Change-Id: Ie8a4a40a0052d68975ae3e0953d5900fd919bfee Signed-off-by: dongsug.song --- .../NUISamples/NUISamples.TizenTV/examples/Main.cs | 74 ++-- .../NUISamples.TizenTV/examples/test1.cs | 392 ++++++++++----------- .../examples/view-navi-property.cs | 356 +++++++++---------- .../examples/visual-view-test.cs | 2 +- .../visuals-using-custom-view/ContactData.cs | 8 +- .../visuals-using-custom-view/ContactView.cs | 2 +- .../visuals-using-custom-view.cs | 2 +- .../NUISamples.TizenTV/firstscreen/App.cs | 46 +-- .../NUISamples.TizenTV/firstscreen/Constants.cs | 6 +- .../NUISamples.TizenTV/firstscreen/FocusData.cs | 4 +- .../firstscreen/ScrollContainer.cs | 88 ++--- Tizen.NUI/src/internal/Application.cs | 2 +- Tizen.NUI/src/internal/FriendAssembly.cs | 8 +- Tizen.NUI/src/internal/WindowFocusSignalType.cs | 194 +++++----- Tizen.NUI/src/public/View.cs | 42 +-- 15 files changed, 613 insertions(+), 613 deletions(-) diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/Main.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/Main.cs index 97c897a..442c35f 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/Main.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/Main.cs @@ -1,37 +1,37 @@ -using System; -using Tizen.NUI; - - -namespace NUISamples.TizenTV.examples -{ - /// - /// The main entry point for the application. - /// - /// - - class Application - { - [STAThread] - static void Main(string[] args) - { - new VisualsUsingCustomView.VisualsExample().Run(args); //o - //new ControlDashboard.Example().Run(args); //o - //new DatePickerTest.Example().Run(args); //o - //new HelloTest.Example().Run(args); //o - //new HelloWorldTest.Example().Run(args); //o - //new Test1.Example().Run(args); //o - //new UserAlphaFunctionTest.Example().Run(args); //o - //new MyCSharpExample.Example().Run(args); //o - //new VisualViewTest.Example().Run(args); //o - //new CustomControlTest.Example().Run(args); //o - //new ScrollViewTest.Example().Run(args); //o - //new ImageViewTest.Example().Run(args); //o - //new FlexContainerTest.SampleMain().Run(args); //o - //new DatePickerUsingJson.Example().Run(args); //o - //new DaliTest.Example().Run(args); //o - //new FirstScreen.FirstScreenApp().Run(args); //o - - } - } - -} +using System; +using Tizen.NUI; + + +namespace NUISamples.TizenTV.examples +{ + /// + /// The main entry point for the application. + /// + /// + + class Application + { + [STAThread] + static void Main(string[] args) + { + new VisualsUsingCustomView.VisualsExample().Run(args); //o + //new ControlDashboard.Example().Run(args); //o + //new DatePickerTest.Example().Run(args); //o + //new HelloTest.Example().Run(args); //o + //new HelloWorldTest.Example().Run(args); //o + //new Test1.Example().Run(args); //o + //new UserAlphaFunctionTest.Example().Run(args); //o + //new MyCSharpExample.Example().Run(args); //o + //new VisualViewTest.Example().Run(args); //o + //new CustomControlTest.Example().Run(args); //o + //new ScrollViewTest.Example().Run(args); //o + //new ImageViewTest.Example().Run(args); //o + //new FlexContainerTest.SampleMain().Run(args); //o + //new DatePickerUsingJson.Example().Run(args); //o + //new DaliTest.Example().Run(args); //o + //new FirstScreen.FirstScreenApp().Run(args); //o + + } + } + +} diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/test1.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/test1.cs index 7f2043b..b2989c7 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/test1.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/test1.cs @@ -50,7 +50,7 @@ namespace Test1 _stage.BackgroundColor = Color.White; // 1) sibling order test - SiblingTest(); + SiblingTest(); // 2) text visual test dali_VisualBase_Creation_test(); @@ -59,24 +59,24 @@ namespace Test1 _style = StyleManager.Get(); //_style.StyleChanged += _style_StyleChanged; - _style.StyleChanged += (obj, e) => - { - Tizen.Log.Debug("NUI", "in stylechanged.. C#side..\n"); - //flag = true; - }; - - _style.ApplyTheme("/home/owner/apps_rw/NUISamples.TizenTV/res/json/date-picker-theme.json"); - Tizen.Log.Debug("NUI", "#### 1) first change!"); - - - AnimatePath_1(); - } - - private void _style_StyleChanged(object sender, StyleManager.StyleChangedEventArgs e) - { - Tizen.Log.Debug("NUI", "style changed event handler comes"); - } - + _style.StyleChanged += (obj, e) => + { + Tizen.Log.Debug("NUI", "in stylechanged.. C#side..\n"); + //flag = true; + }; + + _style.ApplyTheme("/home/owner/apps_rw/NUISamples.TizenTV/res/json/date-picker-theme.json"); + Tizen.Log.Debug("NUI", "#### 1) first change!"); + + + AnimatePath_1(); + } + + private void _style_StyleChanged(object sender, StyleManager.StyleChangedEventArgs e) + { + Tizen.Log.Debug("NUI", "style changed event handler comes"); + } + public void SiblingTest() { View _prev = null; @@ -106,10 +106,10 @@ namespace Test1 Tizen.Log.Debug("NUI", "raise on top is called!curr sibling=" + curr.SiblingOrder + " prev name=" + _prev.Name + " sibling=" + _prev.SiblingOrder); } _prev = curr; - _txt.Text = "on top: " + curr.Name + ", sibling order=" + curr.SiblingOrder; - - _style.ApplyTheme("/home/owner/apps_rw/NUISamples.TizenTV/res/json/style-example-theme-one.json"); - Tizen.Log.Debug("NUI", "#### 2) second change!"); + _txt.Text = "on top: " + curr.Name + ", sibling order=" + curr.SiblingOrder; + + _style.ApplyTheme("/home/owner/apps_rw/NUISamples.TizenTV/res/json/style-example-theme-one.json"); + Tizen.Log.Debug("NUI", "#### 2) second change!"); return true; }; @@ -127,185 +127,185 @@ namespace Test1 _txt.Text = "on top: sibling#, sibling order=?"; _txt.Position2D = _myPos + new Position2D(-50, 200); _txt.TextColor = Color.Blue; - _stage.GetDefaultLayer().Add(_txt); - - } - - public class VisualTest : CustomView - { - private int TextVisualPropertyIndex = -1; - private VisualBase _textVisual; - private string _string; - - public VisualTest() : base(typeof(VisualTest).Name, CustomViewBehaviour.RequiresKeyboardNavigationSupport) - { - } - public string TextVisual - { - get - { - return _string; - } - set - { - _string = value; + _stage.GetDefaultLayer().Add(_txt); + + } + + public class VisualTest : CustomView + { + private int TextVisualPropertyIndex = -1; + private VisualBase _textVisual; + private string _string; + + public VisualTest() : base(typeof(VisualTest).Name, CustomViewBehaviour.RequiresKeyboardNavigationSupport) + { + } + public string TextVisual + { + get + { + return _string; + } + set + { + _string = value; TextVisualPropertyIndex = RegisterProperty("textvisualtest", new PropertyValue("textvisualtest"), PropertyAccessMode.ReadWrite); - - PropertyMap textVisual = new PropertyMap(); - textVisual.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text)) - .Add(TextVisualProperty.Text, new PropertyValue(_string)) - .Add(TextVisualProperty.TextColor, new PropertyValue(Color.Blue)) - .Add(TextVisualProperty.PointSize, new PropertyValue(10)) - .Add(TextVisualProperty.HorizontalAlignment, new PropertyValue("CENTER")) - .Add(TextVisualProperty.VerticalAlignment, new PropertyValue("CENTER")); - _textVisual = VisualFactory.Get().CreateVisual(textVisual); - RegisterVisual(TextVisualPropertyIndex, _textVisual); - _textVisual.DepthIndex = TextVisualPropertyIndex; - } + + PropertyMap textVisual = new PropertyMap(); + textVisual.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text)) + .Add(TextVisualProperty.Text, new PropertyValue(_string)) + .Add(TextVisualProperty.TextColor, new PropertyValue(Color.Blue)) + .Add(TextVisualProperty.PointSize, new PropertyValue(10)) + .Add(TextVisualProperty.HorizontalAlignment, new PropertyValue("CENTER")) + .Add(TextVisualProperty.VerticalAlignment, new PropertyValue("CENTER")); + _textVisual = VisualFactory.Get().CreateVisual(textVisual); + RegisterVisual(TextVisualPropertyIndex, _textVisual); + _textVisual.DepthIndex = TextVisualPropertyIndex; + } } - } - - //when use belowing testcase, Time is out and this case is BLOCK - public void dali_VisualBase_Creation_test() - { - try - { - Tizen.Log.Debug("NUI", "##### start! ######"); - - VisualTest _visualTest = new VisualTest(); - _visualTest.TextVisual = "Hello NUI Text Visual!"; - _visualTest.ParentOrigin = ParentOrigin.TopLeft; - _visualTest.AnchorPoint = AnchorPoint.TopLeft; - _visualTest.Size2D = new Size2D(600, 200); - _visualTest.Position2D = new Position2D(50, 400); - _visualTest.BackgroundColor = Color.Yellow; - _stage.GetDefaultLayer().Add(_visualTest); - } - catch (Exception e) - { - Tizen.Log.Error("NUI", "##### Caught Exception" + e.ToString()); - throw new System.InvalidOperationException("visual test error!!!"); - } - } + } + + //when use belowing testcase, Time is out and this case is BLOCK + public void dali_VisualBase_Creation_test() + { + try + { + Tizen.Log.Debug("NUI", "##### start! ######"); + + VisualTest _visualTest = new VisualTest(); + _visualTest.TextVisual = "Hello NUI Text Visual!"; + _visualTest.ParentOrigin = ParentOrigin.TopLeft; + _visualTest.AnchorPoint = AnchorPoint.TopLeft; + _visualTest.Size2D = new Size2D(600, 200); + _visualTest.Position2D = new Position2D(50, 400); + _visualTest.BackgroundColor = Color.Yellow; + _stage.GetDefaultLayer().Add(_visualTest); + } + catch (Exception e) + { + Tizen.Log.Error("NUI", "##### Caught Exception" + e.ToString()); + throw new System.InvalidOperationException("visual test error!!!"); + } + } public void VisualTest2() - { - try - { - Tizen.Log.Debug("NUI", "##### VisualTest2() start! ######"); - - VisualFactory visualfactory = VisualFactory.Instance; - PropertyMap textMap1 = new PropertyMap(); - textMap1.Insert(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text)); - textMap1.Insert(TextVisualProperty.Text, new PropertyValue("Hello")); - textMap1.Insert(TextVisualProperty.PointSize, new PropertyValue(10.0f)); - - PropertyMap textMap2 = new PropertyMap(); - VisualBase textVisual1 = visualfactory.CreateVisual(textMap1); - textVisual1.Creation = textMap2; - } - catch (Exception e) - { - Tizen.Log.Error("NUI", "Caught Exception" + e.ToString()); - throw new System.InvalidOperationException("visual test2 error!!!"); - //LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); - //Assert.IsTrue(e is ArgumentException, "Argument Exception Not Recieved"); + { + try + { + Tizen.Log.Debug("NUI", "##### VisualTest2() start! ######"); + + VisualFactory visualfactory = VisualFactory.Instance; + PropertyMap textMap1 = new PropertyMap(); + textMap1.Insert(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text)); + textMap1.Insert(TextVisualProperty.Text, new PropertyValue("Hello")); + textMap1.Insert(TextVisualProperty.PointSize, new PropertyValue(10.0f)); + + PropertyMap textMap2 = new PropertyMap(); + VisualBase textVisual1 = visualfactory.CreateVisual(textMap1); + textVisual1.Creation = textMap2; + } + catch (Exception e) + { + Tizen.Log.Error("NUI", "Caught Exception" + e.ToString()); + throw new System.InvalidOperationException("visual test2 error!!!"); + //LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); + //Assert.IsTrue(e is ArgumentException, "Argument Exception Not Recieved"); } - } - - //[Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] - public void AnimatePath_1() - { - Tizen.Log.Debug("NUI", "#### 1) animate path test !"); - /* TEST CODE */ - View view = new View(); - view.ParentOrigin = ParentOrigin.TopLeft; - view.AnchorPoint = AnchorPoint.TopLeft; - view.MinimumSize = new Size2D(100, 100); - view.BackgroundColor = Color.Red; - _stage.GetDefaultLayer().Add(view); - - Position position0 = new Position(200.0f, 200.0f, 0.0f); - Position position1 = new Position(300.0f, 300.0f, 0.0f); - Position position2 = new Position(400.0f, 400.0f, 0.0f); - - Path path = new Path(); - path.AddPoint(position0); - path.AddPoint(position1); - path.AddPoint(position2); - //Control points for first segment - path.AddControlPoint(new Vector3(39.0f, 90.0f, 0.0f)); - path.AddControlPoint(new Vector3(56.0f, 119.0f, 0.0f)); - //Control points for second segment - path.AddControlPoint(new Vector3(78.0f, 120.0f, 0.0f)); - path.AddControlPoint(new Vector3(93.0f, 104.0f, 0.0f)); - - Animation animation = new Animation(); - animation.AnimatePath(view, path, Vector3.XAxis, 0, 5000, new AlphaFunction(AlphaFunction.BuiltinFunctions.Linear)); - animation.Play(); - Vector3 position = new Vector3(); - Vector3 tangent = new Vector3(); - - path.Sample(0.0f, position, tangent); - Rotation rotation = new Rotation(new Radian(new Degree(0.0f)), tangent); - Tizen.Log.Debug("NUI", "################ progress = 0! "); - Tizen.Log.Debug("NUI", "position=(" + position.X + "," + position.Y + "," + position.Z + ")"); - Tizen.Log.Debug("NUI", "view position=(" + view.Position.X + "," + view.Position.Y + "," + view.Position.Z + ")"); - Tizen.Log.Debug("NUI", "view position=(" + view.PositionX + "," + view.PositionY + "," + view.PositionZ + ")"); - Tizen.Log.Debug("NUI", "view cur position=(" + view.CurrentPosition.X + "," + view.CurrentPosition.Y + "," + view.CurrentPosition.Z + ")"); - Tizen.Log.Debug("NUI", "tangent=(" + tangent.X + "," + tangent.Y + "," + tangent.Z + ")"); - Tizen.Log.Debug("NUI", "angle between=" + Rotation.AngleBetween(view.Orientation, rotation) + " view orientation length=" + view.Orientation.Length() + " rotation length=" + rotation.Length()); - //Assert.AreEqual(position.X, view.PositionX, "The actor's PositionX of is not correct"); - //Assert.AreEqual(position.Y, actor.PositionY, "The actor's PositionY of is not correct"); - //Assert.AreEqual(position.Z, actor.PositionZ, "The actor's PositionZ of is not correct"); - //Assert.IsTrue(rotation.Equals(actor.Orientation)); - //await Task.Delay(250); - path.Sample(0.25f, position, tangent); - rotation = new Rotation(new Radian(new Degree(0.0f)), tangent); - Tizen.Log.Debug("NUI", "################ progress = 0.25! "); - Tizen.Log.Debug("NUI", "position=(" + position.X + "," + position.Y + "," + position.Z + ")"); - Tizen.Log.Debug("NUI", "view position=(" + view.Position.X + "," + view.Position.Y + "," + view.Position.Z + ")"); - Tizen.Log.Debug("NUI", "view position=(" + view.PositionX + "," + view.PositionY + "," + view.PositionZ + ")"); - Tizen.Log.Debug("NUI", "view cur position=(" + view.CurrentPosition.X + "," + view.CurrentPosition.Y + "," + view.CurrentPosition.Z + ")"); - Tizen.Log.Debug("NUI", "tangent=(" + tangent.X + "," + tangent.Y + "," + tangent.Z + ")"); - Tizen.Log.Debug("NUI", "angle between=" + Rotation.AngleBetween(view.Orientation, rotation) + " view orientation length=" + view.Orientation.Length() + " rotation length=" + rotation.Length()); - //Assert.AreEqual(position.X, actor.PositionX, "The PositionX of actor is not correct"); - //Assert.AreEqual(position.Y, actor.PositionY, "The PositionY of actor is not correct"); - //Assert.AreEqual(position.Z, actor.PositionZ, "The PositionZ of actor is not correct"); - //Assert.IsTrue(rotation.Equals(actor.Orientation)); - //await Task.Delay(500); - path.Sample(0.75f, position, tangent); - rotation = new Rotation(new Radian(new Degree(0.0f)), tangent); - Tizen.Log.Debug("NUI", "################ progress = 0.75! "); - Tizen.Log.Debug("NUI", "position=(" + position.X + "," + position.Y + "," + position.Z + ")"); - Tizen.Log.Debug("NUI", "view position=(" + view.Position.X + "," + view.Position.Y + "," + view.Position.Z + ")"); - Tizen.Log.Debug("NUI", "view position=(" + view.PositionX + "," + view.PositionY + "," + view.PositionZ + ")"); - Tizen.Log.Debug("NUI", "view cur position=(" + view.CurrentPosition.X + "," + view.CurrentPosition.Y + "," + view.CurrentPosition.Z + ")"); - Tizen.Log.Debug("NUI", "tangent=(" + tangent.X + "," + tangent.Y + "," + tangent.Z + ")"); - Tizen.Log.Debug("NUI", "angle between=" + Rotation.AngleBetween(view.Orientation, rotation) + " view orientation length=" + view.Orientation.Length() + " rotation length=" + rotation.Length()); - //Assert.AreEqual(position.X, actor.PositionX, "The PositionX of actor is not correct here"); - //Assert.AreEqual(position.Y, actor.PositionY, "The PositionY of actor is not correct here"); - //Assert.AreEqual(position.Z, actor.PositionZ, "The PositionZ of actor is not correct here"); - //Assert.IsTrue(rotation.Equals(actor.Orientation)); - - path.Sample(1.0f, position, tangent); - rotation = new Rotation(new Radian(new Degree(0.0f)), tangent); - Tizen.Log.Debug("NUI", "################ progress = 1.0! "); - Tizen.Log.Debug("NUI", "position=(" + position.X + "," + position.Y + "," + position.Z + ")"); - Tizen.Log.Debug("NUI", "view position=(" + view.Position.X + "," + view.Position.Y + "," + view.Position.Z + ")"); - Tizen.Log.Debug("NUI", "view position=(" + view.PositionX + "," + view.PositionY + "," + view.PositionZ + ")"); - Tizen.Log.Debug("NUI", "view cur position=(" + view.CurrentPosition.X + "," + view.CurrentPosition.Y + "," + view.CurrentPosition.Z + ")"); - Tizen.Log.Debug("NUI", "tangent=(" + tangent.X + "," + tangent.Y + "," + tangent.Z + ")"); - Tizen.Log.Debug("NUI", "angle between=" + Rotation.AngleBetween(view.Orientation, rotation) + " view orientation length=" + view.Orientation.Length() + " rotation length=" + rotation.Length()); - - - Tizen.Log.Debug("NUI", "#### 2) animate path test end!"); - } - - - - + } + + //[Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] + public void AnimatePath_1() + { + Tizen.Log.Debug("NUI", "#### 1) animate path test !"); + /* TEST CODE */ + View view = new View(); + view.ParentOrigin = ParentOrigin.TopLeft; + view.AnchorPoint = AnchorPoint.TopLeft; + view.MinimumSize = new Size2D(100, 100); + view.BackgroundColor = Color.Red; + _stage.GetDefaultLayer().Add(view); + + Position position0 = new Position(200.0f, 200.0f, 0.0f); + Position position1 = new Position(300.0f, 300.0f, 0.0f); + Position position2 = new Position(400.0f, 400.0f, 0.0f); + + Path path = new Path(); + path.AddPoint(position0); + path.AddPoint(position1); + path.AddPoint(position2); + //Control points for first segment + path.AddControlPoint(new Vector3(39.0f, 90.0f, 0.0f)); + path.AddControlPoint(new Vector3(56.0f, 119.0f, 0.0f)); + //Control points for second segment + path.AddControlPoint(new Vector3(78.0f, 120.0f, 0.0f)); + path.AddControlPoint(new Vector3(93.0f, 104.0f, 0.0f)); + + Animation animation = new Animation(); + animation.AnimatePath(view, path, Vector3.XAxis, 0, 5000, new AlphaFunction(AlphaFunction.BuiltinFunctions.Linear)); + animation.Play(); + Vector3 position = new Vector3(); + Vector3 tangent = new Vector3(); + + path.Sample(0.0f, position, tangent); + Rotation rotation = new Rotation(new Radian(new Degree(0.0f)), tangent); + Tizen.Log.Debug("NUI", "################ progress = 0! "); + Tizen.Log.Debug("NUI", "position=(" + position.X + "," + position.Y + "," + position.Z + ")"); + Tizen.Log.Debug("NUI", "view position=(" + view.Position.X + "," + view.Position.Y + "," + view.Position.Z + ")"); + Tizen.Log.Debug("NUI", "view position=(" + view.PositionX + "," + view.PositionY + "," + view.PositionZ + ")"); + Tizen.Log.Debug("NUI", "view cur position=(" + view.CurrentPosition.X + "," + view.CurrentPosition.Y + "," + view.CurrentPosition.Z + ")"); + Tizen.Log.Debug("NUI", "tangent=(" + tangent.X + "," + tangent.Y + "," + tangent.Z + ")"); + Tizen.Log.Debug("NUI", "angle between=" + Rotation.AngleBetween(view.Orientation, rotation) + " view orientation length=" + view.Orientation.Length() + " rotation length=" + rotation.Length()); + //Assert.AreEqual(position.X, view.PositionX, "The actor's PositionX of is not correct"); + //Assert.AreEqual(position.Y, actor.PositionY, "The actor's PositionY of is not correct"); + //Assert.AreEqual(position.Z, actor.PositionZ, "The actor's PositionZ of is not correct"); + //Assert.IsTrue(rotation.Equals(actor.Orientation)); + //await Task.Delay(250); + path.Sample(0.25f, position, tangent); + rotation = new Rotation(new Radian(new Degree(0.0f)), tangent); + Tizen.Log.Debug("NUI", "################ progress = 0.25! "); + Tizen.Log.Debug("NUI", "position=(" + position.X + "," + position.Y + "," + position.Z + ")"); + Tizen.Log.Debug("NUI", "view position=(" + view.Position.X + "," + view.Position.Y + "," + view.Position.Z + ")"); + Tizen.Log.Debug("NUI", "view position=(" + view.PositionX + "," + view.PositionY + "," + view.PositionZ + ")"); + Tizen.Log.Debug("NUI", "view cur position=(" + view.CurrentPosition.X + "," + view.CurrentPosition.Y + "," + view.CurrentPosition.Z + ")"); + Tizen.Log.Debug("NUI", "tangent=(" + tangent.X + "," + tangent.Y + "," + tangent.Z + ")"); + Tizen.Log.Debug("NUI", "angle between=" + Rotation.AngleBetween(view.Orientation, rotation) + " view orientation length=" + view.Orientation.Length() + " rotation length=" + rotation.Length()); + //Assert.AreEqual(position.X, actor.PositionX, "The PositionX of actor is not correct"); + //Assert.AreEqual(position.Y, actor.PositionY, "The PositionY of actor is not correct"); + //Assert.AreEqual(position.Z, actor.PositionZ, "The PositionZ of actor is not correct"); + //Assert.IsTrue(rotation.Equals(actor.Orientation)); + //await Task.Delay(500); + path.Sample(0.75f, position, tangent); + rotation = new Rotation(new Radian(new Degree(0.0f)), tangent); + Tizen.Log.Debug("NUI", "################ progress = 0.75! "); + Tizen.Log.Debug("NUI", "position=(" + position.X + "," + position.Y + "," + position.Z + ")"); + Tizen.Log.Debug("NUI", "view position=(" + view.Position.X + "," + view.Position.Y + "," + view.Position.Z + ")"); + Tizen.Log.Debug("NUI", "view position=(" + view.PositionX + "," + view.PositionY + "," + view.PositionZ + ")"); + Tizen.Log.Debug("NUI", "view cur position=(" + view.CurrentPosition.X + "," + view.CurrentPosition.Y + "," + view.CurrentPosition.Z + ")"); + Tizen.Log.Debug("NUI", "tangent=(" + tangent.X + "," + tangent.Y + "," + tangent.Z + ")"); + Tizen.Log.Debug("NUI", "angle between=" + Rotation.AngleBetween(view.Orientation, rotation) + " view orientation length=" + view.Orientation.Length() + " rotation length=" + rotation.Length()); + //Assert.AreEqual(position.X, actor.PositionX, "The PositionX of actor is not correct here"); + //Assert.AreEqual(position.Y, actor.PositionY, "The PositionY of actor is not correct here"); + //Assert.AreEqual(position.Z, actor.PositionZ, "The PositionZ of actor is not correct here"); + //Assert.IsTrue(rotation.Equals(actor.Orientation)); + + path.Sample(1.0f, position, tangent); + rotation = new Rotation(new Radian(new Degree(0.0f)), tangent); + Tizen.Log.Debug("NUI", "################ progress = 1.0! "); + Tizen.Log.Debug("NUI", "position=(" + position.X + "," + position.Y + "," + position.Z + ")"); + Tizen.Log.Debug("NUI", "view position=(" + view.Position.X + "," + view.Position.Y + "," + view.Position.Z + ")"); + Tizen.Log.Debug("NUI", "view position=(" + view.PositionX + "," + view.PositionY + "," + view.PositionZ + ")"); + Tizen.Log.Debug("NUI", "view cur position=(" + view.CurrentPosition.X + "," + view.CurrentPosition.Y + "," + view.CurrentPosition.Z + ")"); + Tizen.Log.Debug("NUI", "tangent=(" + tangent.X + "," + tangent.Y + "," + tangent.Z + ")"); + Tizen.Log.Debug("NUI", "angle between=" + Rotation.AngleBetween(view.Orientation, rotation) + " view orientation length=" + view.Orientation.Length() + " rotation length=" + rotation.Length()); + + + Tizen.Log.Debug("NUI", "#### 2) animate path test end!"); + } + + + + static void _Main(string[] args) { Example example = new Example(); diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/view-navi-property.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/view-navi-property.cs index 0e34cbb..2de61ba 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/view-navi-property.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/view-navi-property.cs @@ -1,179 +1,179 @@ -/* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * 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. - * - */ - -using System; -using Tizen.NUI; - -namespace MyCSharpExample -{ - class Example : NUIApplication - { - const int num = 2; - View[] view; - - View lastFocusedView; - - protected override void OnCreate() - { - base.OnCreate(); - Initialize(); - } - - public void Initialize() - { - view = new View[2]; - - for (int i = 0; i < num; i++) - { - view[i] = new View(); - view[i].Size = new Size(200, 200, 0); - view[i].BackgroundColor = Color.Blue; - view[i].Position = new Position(300 + i * 300, 300, 0); - view[i].Name = "MyView" + i; - view[i].Focusable = true; - Stage.Instance.GetDefaultLayer().Add(view[i]); - view[i].FocusGained += FocusNavigationSample_FocusGained; - view[i].FocusLost += FocusNavigationSample_FocusLost; - view[i].KeyEvent += FocusNavigationSample_KeyEvent; - } - - view[0].RightFocusableView = view[1]; - view[0].LeftFocusableView = view[1]; - view[1].RightFocusableView = view[0]; - view[1].LeftFocusableView = view[0]; - - FocusManager.Instance.SetCurrentFocusView(view[0]); - FocusManager.Instance.PreFocusChange += Instance_PreFocusChange; - - Stage.Instance.Touch += Instance_Touch; - } - - private void Instance_Touch(object sender, Stage.TouchEventArgs e) - { - Tizen.Log.Debug("NUI", "stage touched! set key focus as lastFocusedView!"); - FocusManager.Instance.SetCurrentFocusView(lastFocusedView); - } - - private bool FocusNavigationSample_KeyEvent(object source, View.KeyEventArgs e) - { - Tizen.Log.Debug("NUI", "..."); - View view = source as View; - - Tizen.Log.Debug("NUI", "NUI-1 " + "View-" + view.Name + ", Pressed-" + e.Key.KeyPressedName + e.Key.State.ToString()); - - return false; - } - - private void FocusNavigationSample_FocusLost(object sender, EventArgs e) - { - Tizen.Log.Debug("NUI", "..."); - View view = sender as View; - view.BackgroundColor = Color.Blue; - view.Scale = new Vector3(1.0f, 1.0f, 1.0f); - - Tizen.Log.Debug("NUI", "NUI-2 " + "FocusLost-" + view.Name); - } - - private void FocusNavigationSample_FocusGained(object sender, EventArgs e) - { - Tizen.Log.Debug("NUI", "..."); - View view = sender as View; - view.BackgroundColor = Color.Red; - view.Scale = new Vector3(1.2f, 1.2f, 1.0f); - - Tizen.Log.Debug("NUI", "NUI-3 " + "FocusGained-" + view.Name); - } - - private View Instance_PreFocusChange(object source, FocusManager.PreFocusChangeEventArgs e) - { - Tizen.Log.Debug("NUI", "..."); - View currentView = (e.CurrentView) ?? lastFocusedView; - View nextView = null; - - Tizen.Log.Debug("NUI", "NUI-4 " + "PreFocusChange-" + e.Direction); - - if (currentView != null && currentView.HasBody()) - Tizen.Log.Debug("NUI", "NUI-5 " + " Current-" + currentView.Name); - - if (currentView) - { - switch (e.Direction) - { - case View.FocusDirection.Left: - nextView = currentView.LeftFocusableView; - if (nextView == null) - Tizen.Log.Debug("NUI", "NUI-6 " + "LeftFocusableView is NULL!!!!"); - else - Tizen.Log.Debug("NUI", "NUI-7 " + currentView.Name + ".LeftFocusableView =" + nextView.Name); - break; - case View.FocusDirection.Right: - nextView = currentView.RightFocusableView; - if (nextView == null) - Tizen.Log.Debug("NUI", "NUI-8 " + "RightFocusableView is NULL!!!!"); - else - Tizen.Log.Debug("NUI", "NUI-9 " + currentView.Name + ".RightFocusableView =" + nextView.Name); - break; - case View.FocusDirection.Up: - nextView = currentView.UpFocusableView; - if (nextView == null) - Tizen.Log.Debug("NUI", "NUI-10 " + "UpFocusableView is NULL!!!!"); - else - Tizen.Log.Debug("NUI", "NUI-11 " + currentView.Name + ".UpFocusableView =" + nextView.Name); - break; - case View.FocusDirection.Down: - nextView = currentView.DownFocusableView; - if (nextView == null) - Tizen.Log.Debug("NUI", "NUI-12 " + "DownFocusableView is NULL!!!!"); - else - Tizen.Log.Debug("NUI", "NUI-13 " + currentView.Name + ".DownFocusableView =" + nextView.Name); - break; - default: - nextView = null; //added - break; - } - } - - if (e.ProposedView == null) - { - Tizen.Log.Debug("NUI", "NUI-14 " + "ProposedView in NULL!!"); - } - else if (e.ProposedView.HasBody()) - { - Tizen.Log.Debug("NUI", "NUI-15 " + "ProposedView-" + e.ProposedView.Name); - } - else - { - Tizen.Log.Debug("NUI", "NUI-16 " + "ProposedView does NOT have body!!!" + e.ProposedView); - } - - nextView = nextView ?? (e.ProposedView) ?? currentView; - lastFocusedView = nextView; - - if (nextView != null && nextView.HasBody()) - Tizen.Log.Debug("NUI", "NUI-17 " + "Next-" + nextView.Name); - - return nextView; - } - - [STAThread] - static void _Main(string[] args) - { - Example example = new Example(); - example.Run(args); - } - } +/* + * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * 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. + * + */ + +using System; +using Tizen.NUI; + +namespace MyCSharpExample +{ + class Example : NUIApplication + { + const int num = 2; + View[] view; + + View lastFocusedView; + + protected override void OnCreate() + { + base.OnCreate(); + Initialize(); + } + + public void Initialize() + { + view = new View[2]; + + for (int i = 0; i < num; i++) + { + view[i] = new View(); + view[i].Size = new Size(200, 200, 0); + view[i].BackgroundColor = Color.Blue; + view[i].Position = new Position(300 + i * 300, 300, 0); + view[i].Name = "MyView" + i; + view[i].Focusable = true; + Stage.Instance.GetDefaultLayer().Add(view[i]); + view[i].FocusGained += FocusNavigationSample_FocusGained; + view[i].FocusLost += FocusNavigationSample_FocusLost; + view[i].KeyEvent += FocusNavigationSample_KeyEvent; + } + + view[0].RightFocusableView = view[1]; + view[0].LeftFocusableView = view[1]; + view[1].RightFocusableView = view[0]; + view[1].LeftFocusableView = view[0]; + + FocusManager.Instance.SetCurrentFocusView(view[0]); + FocusManager.Instance.PreFocusChange += Instance_PreFocusChange; + + Stage.Instance.Touch += Instance_Touch; + } + + private void Instance_Touch(object sender, Stage.TouchEventArgs e) + { + Tizen.Log.Debug("NUI", "stage touched! set key focus as lastFocusedView!"); + FocusManager.Instance.SetCurrentFocusView(lastFocusedView); + } + + private bool FocusNavigationSample_KeyEvent(object source, View.KeyEventArgs e) + { + Tizen.Log.Debug("NUI", "..."); + View view = source as View; + + Tizen.Log.Debug("NUI", "NUI-1 " + "View-" + view.Name + ", Pressed-" + e.Key.KeyPressedName + e.Key.State.ToString()); + + return false; + } + + private void FocusNavigationSample_FocusLost(object sender, EventArgs e) + { + Tizen.Log.Debug("NUI", "..."); + View view = sender as View; + view.BackgroundColor = Color.Blue; + view.Scale = new Vector3(1.0f, 1.0f, 1.0f); + + Tizen.Log.Debug("NUI", "NUI-2 " + "FocusLost-" + view.Name); + } + + private void FocusNavigationSample_FocusGained(object sender, EventArgs e) + { + Tizen.Log.Debug("NUI", "..."); + View view = sender as View; + view.BackgroundColor = Color.Red; + view.Scale = new Vector3(1.2f, 1.2f, 1.0f); + + Tizen.Log.Debug("NUI", "NUI-3 " + "FocusGained-" + view.Name); + } + + private View Instance_PreFocusChange(object source, FocusManager.PreFocusChangeEventArgs e) + { + Tizen.Log.Debug("NUI", "..."); + View currentView = (e.CurrentView) ?? lastFocusedView; + View nextView = null; + + Tizen.Log.Debug("NUI", "NUI-4 " + "PreFocusChange-" + e.Direction); + + if (currentView != null && currentView.HasBody()) + Tizen.Log.Debug("NUI", "NUI-5 " + " Current-" + currentView.Name); + + if (currentView) + { + switch (e.Direction) + { + case View.FocusDirection.Left: + nextView = currentView.LeftFocusableView; + if (nextView == null) + Tizen.Log.Debug("NUI", "NUI-6 " + "LeftFocusableView is NULL!!!!"); + else + Tizen.Log.Debug("NUI", "NUI-7 " + currentView.Name + ".LeftFocusableView =" + nextView.Name); + break; + case View.FocusDirection.Right: + nextView = currentView.RightFocusableView; + if (nextView == null) + Tizen.Log.Debug("NUI", "NUI-8 " + "RightFocusableView is NULL!!!!"); + else + Tizen.Log.Debug("NUI", "NUI-9 " + currentView.Name + ".RightFocusableView =" + nextView.Name); + break; + case View.FocusDirection.Up: + nextView = currentView.UpFocusableView; + if (nextView == null) + Tizen.Log.Debug("NUI", "NUI-10 " + "UpFocusableView is NULL!!!!"); + else + Tizen.Log.Debug("NUI", "NUI-11 " + currentView.Name + ".UpFocusableView =" + nextView.Name); + break; + case View.FocusDirection.Down: + nextView = currentView.DownFocusableView; + if (nextView == null) + Tizen.Log.Debug("NUI", "NUI-12 " + "DownFocusableView is NULL!!!!"); + else + Tizen.Log.Debug("NUI", "NUI-13 " + currentView.Name + ".DownFocusableView =" + nextView.Name); + break; + default: + nextView = null; //added + break; + } + } + + if (e.ProposedView == null) + { + Tizen.Log.Debug("NUI", "NUI-14 " + "ProposedView in NULL!!"); + } + else if (e.ProposedView.HasBody()) + { + Tizen.Log.Debug("NUI", "NUI-15 " + "ProposedView-" + e.ProposedView.Name); + } + else + { + Tizen.Log.Debug("NUI", "NUI-16 " + "ProposedView does NOT have body!!!" + e.ProposedView); + } + + nextView = nextView ?? (e.ProposedView) ?? currentView; + lastFocusedView = nextView; + + if (nextView != null && nextView.HasBody()) + Tizen.Log.Debug("NUI", "NUI-17 " + "Next-" + nextView.Name); + + return nextView; + } + + [STAThread] + static void _Main(string[] args) + { + Example example = new Example(); + example.Run(args); + } + } } \ No newline at end of file diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-view-test.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-view-test.cs index c57905e..05b5494 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-view-test.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-view-test.cs @@ -268,7 +268,7 @@ namespace VisualViewTest _window.SetAcceptFocus(true); Tizen.Log.Debug("NUI", "[WindowFocusTest] set focus acceptable=true!!!"); Tizen.Log.Debug("NUI", "[WindowFocusTest] is focus acceptable=" + _window.IsFocusAcceptable()); - } + } [STAThread] static void _Main(string[] args) diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visuals-using-custom-view/ContactData.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visuals-using-custom-view/ContactData.cs index f5fc67c..20b535b 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visuals-using-custom-view/ContactData.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visuals-using-custom-view/ContactData.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,9 +23,9 @@ namespace VisualsUsingCustomView { // The collection of contacts static class ContactsList - { - private const string resources = "/home/owner/apps_rw/NUISamples.TizenTV/res"; - + { + private const string resources = "/home/owner/apps_rw/NUISamples.TizenTV/res"; + public static readonly ContactItem[] s_contactData = new ContactItem[] { new ContactItem ("Emmett Yates", resources + "/images/gallery-small-43.jpg", diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visuals-using-custom-view/ContactView.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visuals-using-custom-view/ContactView.cs index 3ba9d75..86ce4fc 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visuals-using-custom-view/ContactView.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visuals-using-custom-view/ContactView.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visuals-using-custom-view/visuals-using-custom-view.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visuals-using-custom-view/visuals-using-custom-view.cs index 660c92f..9d86a6e 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visuals-using-custom-view/visuals-using-custom-view.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visuals-using-custom-view/visuals-using-custom-view.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/firstscreen/App.cs b/NUISamples/NUISamples/NUISamples.TizenTV/firstscreen/App.cs index 75048b3..ecf029d 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/firstscreen/App.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/firstscreen/App.cs @@ -34,10 +34,10 @@ namespace FirstScreen private ScrollContainer _hideScrollContainer; // The unused Poster scrollContainer which needs to be transparent. FocusManager _keyboardFocusManager; // Reference to Dali KeyboardFocusManager. - protected override void OnCreate() - { - base.OnCreate(); - OnInitialize(); + protected override void OnCreate() + { + base.OnCreate(); + OnInitialize(); } @@ -226,7 +226,7 @@ namespace FirstScreen Convert.ToInt32((_stageSize.Height * Constants.TopClipLayerExpandHeightFactor))); // X, Y, Width, Height - _hideBottomContainerAnimation.AnimateTo(_bottomContainer, "Position", new Position(0.0f, _stageSize.Height * Constants.BottomContainerHidePositionFactor, 0.0f), + _hideBottomContainerAnimation.AnimateTo(_bottomContainer, "Position", new Position(0.0f, _stageSize.Height * Constants.BottomContainerHidePositionFactor, 0.0f), new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOutSine)); _hideBottomContainerAnimation.Play(); @@ -240,15 +240,15 @@ namespace FirstScreen Convert.ToInt32((_stageSize.Width)), Convert.ToInt32((_stageSize.Height * Constants.TopClipLayerHeightFactor))); // X, Y, Width, Height - _showBottomContainerAnimation.AnimateTo(_bottomContainer, "Position", new Position(0.0f, _stageSize.Height * Constants.BottomContainerShowPositionFactor, 0.0f), + _showBottomContainerAnimation.AnimateTo(_bottomContainer, "Position", new Position(0.0f, _stageSize.Height * Constants.BottomContainerShowPositionFactor, 0.0f), new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOutSine)); _showBottomContainerAnimation.Play(); } // First screen demo Application initialisation private void OnInitialize() - { - Tizen.Log.Debug("NUI", "OnInitialize() is called!"); + { + Tizen.Log.Debug("NUI", "OnInitialize() is called!"); Tizen.NUI.InternalSetting.DefaultParentOriginAsTopLeft = false; _hideScrollContainer = null; _stage = Stage.Instance; @@ -292,9 +292,9 @@ namespace FirstScreen // Add both Top and Bottom Containers to Stage _stage.GetDefaultLayer().Add(_topContainer); - _stage.GetDefaultLayer().Add(_bottomContainer); - - // Add a clip layer to Top Container + _stage.GetDefaultLayer().Add(_bottomContainer); + + // Add a clip layer to Top Container _topClipLayer = new Layer(); _topClipLayer.AnchorPoint = AnchorPoint.BottomCenter; _topClipLayer.ParentOrigin = ParentOrigin.BottomCenter; @@ -448,26 +448,26 @@ namespace FirstScreen _dateOfTest.UnderlineEnabled = true; _stage.GetDefaultLayer().Add(_dateOfTest); Tizen.Log.Debug("NUI", "### 1) ColorMode = " + _dateOfTest.ColorMode); - _dateOfTest.ColorMode = ColorMode.UseParentColor; - Tizen.Log.Debug("NUI", "### 2) ColorMode = " + _dateOfTest.ColorMode); - _dateOfTest.ColorMode = ColorMode.UseOwnMultiplyParentColor; + _dateOfTest.ColorMode = ColorMode.UseParentColor; + Tizen.Log.Debug("NUI", "### 2) ColorMode = " + _dateOfTest.ColorMode); + _dateOfTest.ColorMode = ColorMode.UseOwnMultiplyParentColor; Tizen.Log.Debug("NUI", "### 3) ColorMode = " + _dateOfTest.ColorMode); Tizen.Log.Debug("NUI", "### 1) DrawModeType = " + _dateOfTest.DrawMode); - _dateOfTest.DrawMode = DrawModeType.Overlay2D; - Tizen.Log.Debug("NUI", "### 2) DrawModeType = " + _dateOfTest.DrawMode); - + _dateOfTest.DrawMode = DrawModeType.Overlay2D; + Tizen.Log.Debug("NUI", "### 2) DrawModeType = " + _dateOfTest.DrawMode); + #endif - - } + + } [STAThread] static void _Main(string[] args) - { - Tizen.Log.Debug("NUI", "Main() is called! "); + { + Tizen.Log.Debug("NUI", "Main() is called! "); FirstScreenApp app = new FirstScreenApp(); app.Run(args); - } - + } + } } diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/firstscreen/Constants.cs b/NUISamples/NUISamples/NUISamples.TizenTV/firstscreen/Constants.cs index 5913793..e261835 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/firstscreen/Constants.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/firstscreen/Constants.cs @@ -42,9 +42,9 @@ namespace FirstScreen public const int SpotLightDuration = 5000; // Duration of Spot Light Animation. public const int FocusTransitionDuration = 350; // MilliSecond Duration of Focus Transition Animation. public const int FocusDuration = 350; // Duration of Focus Animation. - public const int ScrollDuration = 350; // Duration of Scroll Animation. - - // public const string ImageResourcePath = "./firstscreen/images/"; // for Ubuntu + public const int ScrollDuration = 350; // Duration of Scroll Animation. + + // public const string ImageResourcePath = "./firstscreen/images/"; // for Ubuntu public const string ImageResourcePath = "/home/owner/apps_rw/NUISamples.TizenTV/res/images/"; // for target } diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/firstscreen/FocusData.cs b/NUISamples/NUISamples/NUISamples.TizenTV/firstscreen/FocusData.cs index e457f8f..a424703 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/firstscreen/FocusData.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/firstscreen/FocusData.cs @@ -101,7 +101,7 @@ namespace FirstScreen public ImageView ImageItem { get { return _imageFocus; } - } - + } + } } diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/firstscreen/ScrollContainer.cs b/NUISamples/NUISamples/NUISamples.TizenTV/firstscreen/ScrollContainer.cs index 915f80b..0164b9a 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/firstscreen/ScrollContainer.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/firstscreen/ScrollContainer.cs @@ -33,17 +33,17 @@ namespace FirstScreen private Animation _focusTransitionAnimation; // Focus Transition (scaling /unscaling) animation on items of ScrollContainer. private Path _circularPath; // Circular path used for SpotLight Animation applied to the focused item on ScrollContainer. - static CustomView CreateInstance() - { - return new ScrollContainer(); - } - - // static constructor registers the control type (for user can add kinds of visuals to it) - static ScrollContainer() - { - // ViewRegistry registers control type with DALi type registery - // also uses introspection to find any properties that need to be registered with type registry - ViewRegistry.Instance.Register(CreateInstance, typeof(ScrollContainer)); + static CustomView CreateInstance() + { + return new ScrollContainer(); + } + + // static constructor registers the control type (for user can add kinds of visuals to it) + static ScrollContainer() + { + // ViewRegistry registers control type with DALi type registery + // also uses introspection to find any properties that need to be registered with type registry + ViewRegistry.Instance.Register(CreateInstance, typeof(ScrollContainer)); } public ScrollContainer() : base(typeof(ScrollContainer).Name, CustomViewBehaviour.DisableStyleChangeSignals | @@ -272,9 +272,9 @@ namespace FirstScreen _focusAnimation = new Animation(Constants.FocusDuration); _focusAnimation.EndAction = Animation.EndActions.StopFinal; _scrollAnimation = new Animation(Constants.ScrollDuration); - _scrollAnimation.EndAction = Animation.EndActions.StopFinal; - - //changed to internal + _scrollAnimation.EndAction = Animation.EndActions.StopFinal; + + //changed to internal //EnableGestureDetection(Gesture.Type.Pan); } @@ -318,39 +318,39 @@ namespace FirstScreen // This override function supports two dimensional keyboard navigation. // This function returns the next keyboard focusable actor in ScrollContainer control towards the given direction. - public override View GetNextKeyboardFocusableView(View currentFocusedView, View.FocusDirection direction, bool loopEnabled) - { - if (direction == View.FocusDirection.Left) - { - return View.DownCast(FocusPrevious(loopEnabled)); - } - else if (direction == View.FocusDirection.Right) - { - return View.DownCast(FocusNext(loopEnabled)); - } - else - { - return View.DownCast(currentFocusedView); - } - } - - public override void OnKeyboardFocusChangeCommitted(View commitedFocusableView) + public override View GetNextKeyboardFocusableView(View currentFocusedView, View.FocusDirection direction, bool loopEnabled) + { + if (direction == View.FocusDirection.Left) + { + return View.DownCast(FocusPrevious(loopEnabled)); + } + else if (direction == View.FocusDirection.Right) + { + return View.DownCast(FocusNext(loopEnabled)); + } + else + { + return View.DownCast(currentFocusedView); + } + } + + public override void OnKeyboardFocusChangeCommitted(View commitedFocusableView) { Focus(_focusedItem); } - - - // This override function is invoked before chosen focusable actor will be focused. - // This allows the application to preform any actions (i.e. Scroll and SpotLight animations) before the focus is actually moved to the chosen actor. - - // This override function is invoked whenever a pan gesture is detected on this control. - // Perform Scroll Animation based upon pan gesture velocity / speed. - /*public override void OnPan(PanGesture pan) - { - return; //currently not used - }*/ - - // This function returns current focused actor + + + // This override function is invoked before chosen focusable actor will be focused. + // This allows the application to preform any actions (i.e. Scroll and SpotLight animations) before the focus is actually moved to the chosen actor. + + // This override function is invoked whenever a pan gesture is detected on this control. + // Perform Scroll Animation based upon pan gesture velocity / speed. + /*public override void OnPan(PanGesture pan) + { + return; //currently not used + }*/ + + // This function returns current focused actor public View GetCurrentFocusedActor() { if (_focusedItem < 0) diff --git a/Tizen.NUI/src/internal/Application.cs b/Tizen.NUI/src/internal/Application.cs index 3b37876..c6f125d 100755 --- a/Tizen.NUI/src/internal/Application.cs +++ b/Tizen.NUI/src/internal/Application.cs @@ -1084,7 +1084,7 @@ namespace Tizen.NUI if (ver1 != Version.ver1 || ver2 != Version.ver2 || ver3 != Version.ver3) { //throw new System.InvalidOperationException("Dali native version mismatch error! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3 + " but dali=" + ver1 + "." + ver2 + "." + ver3); - Tizen.Log.Fatal("NUI", "Dali native version mismatch error! nui=" + Version.nuiVer1 "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease + " but native dali=" + ver1 + "." + ver2 + "." + ver3); + Tizen.Log.Fatal("NUI", "Dali native version mismatch error! nui=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease + " but native dali=" + ver1 + "." + ver2 + "." + ver3); } } else diff --git a/Tizen.NUI/src/internal/FriendAssembly.cs b/Tizen.NUI/src/internal/FriendAssembly.cs index b580beb..60b87e6 100755 --- a/Tizen.NUI/src/internal/FriendAssembly.cs +++ b/Tizen.NUI/src/internal/FriendAssembly.cs @@ -16,10 +16,10 @@ // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts // Some have been manually changed -// friend assembly setting -// compile with: /target:Tizen.NUI.ExtTEST /keyfile:FriendAssemblies.snk - -using System.Runtime.CompilerServices; +// friend assembly setting +// compile with: /target:Tizen.NUI.ExtTEST /keyfile:FriendAssemblies.snk + +using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("Tizen.NUI.Extension.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001004d7c7c03a196ecb8e7cc5056750e1f40ee2bbe99f0e53a07f2538f2b0f450bd731b9dca3706503a0378baca74a09cf3af6261b330c031f44817ab6ed64189460765a402279d3e0c1fa7295ae1dccb2e3ff329705fd85b58d66ae7cb7e95ba06e0d847c3e3ba918798f579e5caeb1c6149955e6baf24236eec46227a623e494b1")] [assembly: InternalsVisibleTo("Tizen.MM.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001004d7c7c03a196ecb8e7cc5056750e1f40ee2bbe99f0e53a07f2538f2b0f450bd731b9dca3706503a0378baca74a09cf3af6261b330c031f44817ab6ed64189460765a402279d3e0c1fa7295ae1dccb2e3ff329705fd85b58d66ae7cb7e95ba06e0d847c3e3ba918798f579e5caeb1c6149955e6baf24236eec46227a623e494b1")] namespace Tizen.NUI diff --git a/Tizen.NUI/src/internal/WindowFocusSignalType.cs b/Tizen.NUI/src/internal/WindowFocusSignalType.cs index 245c7b2..9931518 100755 --- a/Tizen.NUI/src/internal/WindowFocusSignalType.cs +++ b/Tizen.NUI/src/internal/WindowFocusSignalType.cs @@ -1,97 +1,97 @@ -//------------------------------------------------------------------------------ -// -// -// 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 -{ - - public class WindowFocusSignalType : global::System.IDisposable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal WindowFocusSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) - { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WindowFocusSignalType obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - ~WindowFocusSignalType() - { - Dispose(); - } - - public virtual void Dispose() - { - lock (this) - { - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_WindowFocusSignalType(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - global::System.GC.SuppressFinalize(this); - } - } - - public bool Empty() - { - bool ret = NDalicPINVOKE.WindowFocusSignalType_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetConnectionCount() - { - uint ret = NDalicPINVOKE.WindowFocusSignalType_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Connect(System.Delegate func) - { - System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.WindowFocusSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } - - public void Disconnect(System.Delegate func) - { - System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.WindowFocusSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } - - public void Emit(bool arg) - { - NDalicPINVOKE.WindowFocusSignalType_Emit(swigCPtr, arg); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public WindowFocusSignalType() : this(NDalicPINVOKE.new_WindowFocusSignalType(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - } - -} +//------------------------------------------------------------------------------ +// +// +// 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 +{ + + public class WindowFocusSignalType : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal WindowFocusSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WindowFocusSignalType obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + ~WindowFocusSignalType() + { + Dispose(); + } + + public virtual void Dispose() + { + lock (this) + { + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_WindowFocusSignalType(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } + + public bool Empty() + { + bool ret = NDalicPINVOKE.WindowFocusSignalType_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = NDalicPINVOKE.WindowFocusSignalType_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.WindowFocusSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + NDalicPINVOKE.WindowFocusSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Emit(bool arg) + { + NDalicPINVOKE.WindowFocusSignalType_Emit(swigCPtr, arg); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public WindowFocusSignalType() : this(NDalicPINVOKE.new_WindowFocusSignalType(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } + +} diff --git a/Tizen.NUI/src/public/View.cs b/Tizen.NUI/src/public/View.cs index eccc543..ad34b10 100755 --- a/Tizen.NUI/src/public/View.cs +++ b/Tizen.NUI/src/public/View.cs @@ -969,27 +969,27 @@ namespace Tizen.NUI { get { - int temp = 0; - GetProperty(View.Property.STATE).Get(ref temp); - switch (temp) - { - case 0: - { - return "NORMAL"; - } - case 1: - { - return "FOCUSED"; - } - case 2: - { - return "DISABLED"; - } - default: - { - return ""; - } - } + int temp = 0; + GetProperty(View.Property.STATE).Get(ref temp); + switch (temp) + { + case 0: + { + return "NORMAL"; + } + case 1: + { + return "FOCUSED"; + } + case 2: + { + return "DISABLED"; + } + default: + { + return ""; + } + } } set { -- 2.7.4