Manual Merge for nui v0.2.33-pre 21/122421/2
authorFeng Jin <feng16.jin@samsung.com>
Fri, 31 Mar 2017 16:23:39 +0000 (00:23 +0800)
committerdongsug.song <dongsug.song@samsung.com>
Fri, 31 Mar 2017 08:53:28 +0000 (17:53 +0900)
Change-Id: I27020dd5ffbfc38aa30234317016abf655ab0bd1
Signed-off-by: Feng Jin <feng16.jin@samsung.com>
23 files changed:
NUISamples/NUISamples/NUISamples.TizenTV/NUISamples.TizenTV.csproj
NUISamples/NUISamples/NUISamples.TizenTV/examples/Main.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/control-dashboard.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/date-picker.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/hello-test.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/hello-world.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/image-view.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/json-loader.cs [deleted file]
NUISamples/NUISamples/NUISamples.TizenTV/examples/scroll-view.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-view-test.cs
NUISamples/NUISamples/NUISamples.TizenTV/res/json/date-picker-theme.json [new file with mode: 0755]
Tizen.NUI/Tizen.NUI.csproj
Tizen.NUI/src/internal/Application.cs
Tizen.NUI/src/internal/DisposeQueue.cs
Tizen.NUI/src/internal/EventThreadCallback.cs [new file with mode: 0755]
Tizen.NUI/src/internal/ManualPINVOKE.cs
Tizen.NUI/src/internal/NDalicPINVOKE.cs
Tizen.NUI/src/internal/ViewWrapper.cs
Tizen.NUI/src/internal/WindowFocusSignalType.cs [new file with mode: 0755]
Tizen.NUI/src/public/NUIApplication.cs
Tizen.NUI/src/public/Rectangle.cs
Tizen.NUI/src/public/VisualMaps.cs
Tizen.NUI/src/public/Window.cs

index e9d47d5..ef7c2e1 100755 (executable)
@@ -45,6 +45,7 @@
     <None Include="NUISamples.TizenTV.project.json" />\r
     <None Include="res\json\control-dashboard.json" />\r
     <None Include="res\json\date-picker-template.json" />\r
+    <None Include="res\json\date-picker-theme.json" />\r
     <None Include="res\json\date-picker.json" />\r
     <None Include="res\json\spin.json" />\r
     <None Include="res\json\style-example-theme-one.json" />\r
index d211d81..3349227 100755 (executable)
@@ -15,7 +15,6 @@ namespace NUISamples.TizenTV.examples
         static void Main(string[] args)\r
         {\r
             new VisualsUsingCustomView.VisualsExample().Run(args);    //o\r
-            //new VisualsExample().Run(args);                           //o\r
             //new ControlDashboard.Example().Run(args);                 //o\r
             //new DatePickerTest.Example().Run(args);                   //o\r
             //new HelloTest.Example().Run(args);                        //o\r
@@ -30,7 +29,6 @@ namespace NUISamples.TizenTV.examples
             //new FlexContainerTest.SampleMain().Run(args);             //o \r
                                                                         \r
                                                                         \r
-            //new JsonLoaderTest.Example().Run(args);                   //x 우분투용\r
             //new DatePickerUsingJson.Example().Run(args);              //x date-picker-theme.json없음\r
             //new DaliTest.Example().Run(args);                         //x 검은화면 나오고 죽음\r
 \r
index b12fc6e..f0afd74 100755 (executable)
@@ -83,7 +83,7 @@ namespace ControlDashboard
             topLabel.WidthResizePolicy = ResizePolicyType.FillToParent;
             topLabel.HeightResizePolicy = ResizePolicyType.SizeRelativeToParent;
             topLabel.AnchorPoint = AnchorPoint.TopCenter;
-            topLabel.ParentOrigin = ParentOrigin.TopCenter;
+            //topLabel.ParentOrigin = ParentOrigin.TopCenter;
             topLabel.SetSizeModeFactor(new Vector3(0.0f, 0.1f, 0.0f));
             topLabel.BackgroundColor = new Color(43.0f / 255.0f, 145.0f / 255.0f, 175.0f / 255.0f, 1.0f);
             topLabel.TextColor = Color.White;
@@ -101,7 +101,8 @@ namespace ControlDashboard
             _contentContainer.HeightResizePolicy = ResizePolicyType.SizeRelativeToParent;
             _contentContainer.SetSizeModeFactor(new Vector3(0.0f, 0.9f, 0.0f));
             _contentContainer.AnchorPoint = AnchorPoint.BottomCenter;
-            _contentContainer.ParentOrigin = ParentOrigin.BottomCenter;
+            //_contentContainer.ParentOrigin = ParentOrigin.BottomCenter;
+            _contentContainer.Position = new Position(0, _stage.Size.Height * 0.1f, 0);
             _contentContainer.SetRelativeHeight(0, 0.07f);
             _contentContainer.SetRelativeHeight(1, 0.26f);
             _contentContainer.SetRelativeHeight(2, 0.07f);
@@ -315,7 +316,7 @@ namespace ControlDashboard
                 {
                     PushButton button = new PushButton();
                     button.LabelText = "Popup";
-                    button.ParentOrigin = ParentOrigin.Center;
+                    //button.ParentOrigin = ParentOrigin.Center;
                     button.AnchorPoint = AnchorPoint.Center;
                     button.MaximumSize = new Size2D(150, 100);
                     _popup = CreatePopup();
@@ -344,7 +345,7 @@ namespace ControlDashboard
                 {
                     PushButton button = new PushButton();
                     button.LabelText = "Toast";
-                    button.ParentOrigin = ParentOrigin.Center;
+                    //button.ParentOrigin = ParentOrigin.Center;
                     button.AnchorPoint = AnchorPoint.Center;
                     button.Clicked += (obj, ee) =>
                     {
@@ -390,25 +391,25 @@ namespace ControlDashboard
             footer.WidthResizePolicy = ResizePolicyType.FillToParent;
             footer.HeightResizePolicy = ResizePolicyType.Fixed;
             footer.Size = new Size(0.0f, 80.0f, 0.0f);
-            footer.ParentOrigin = ParentOrigin.Center;
+            //footer.ParentOrigin = ParentOrigin.Center;
             footer.AnchorPoint = AnchorPoint.Center;
 
             PushButton okButton = CreateOKButton();
-            okButton.ParentOrigin = ParentOrigin.Center;
+            //okButton.ParentOrigin = ParentOrigin.Center;
             okButton.AnchorPoint = AnchorPoint.Center;
             okButton.WidthResizePolicy = ResizePolicyType.SizeFixedOffsetFromParent;
             okButton.HeightResizePolicy = ResizePolicyType.SizeFixedOffsetFromParent;
             okButton.SetSizeModeFactor(new Vector3(-20.0f, -20.0f, 0.0f));
 
             PushButton cancelButton = CreateCancelButton();
-            cancelButton.ParentOrigin = ParentOrigin.Center;
+            //cancelButton.ParentOrigin = ParentOrigin.Center;
             cancelButton.AnchorPoint = AnchorPoint.Center;
             cancelButton.WidthResizePolicy = ResizePolicyType.SizeFixedOffsetFromParent;
             cancelButton.HeightResizePolicy = ResizePolicyType.SizeFixedOffsetFromParent;
             cancelButton.SetSizeModeFactor(new Vector3(-20.0f, -20.0f, 0.0f));
 
             TableView controlLayout = new TableView(1, 2);
-            controlLayout.ParentOrigin = ParentOrigin.Center;
+            //controlLayout.ParentOrigin = ParentOrigin.Center;
             controlLayout.AnchorPoint = AnchorPoint.Center;
             controlLayout.WidthResizePolicy = ResizePolicyType.FillToParent;
             controlLayout.HeightResizePolicy = ResizePolicyType.FillToParent;
index 6351a76..d27a4fc 100755 (executable)
@@ -43,7 +43,7 @@ namespace DatePickerTest
 
         public void Initialize()
         {
-
+            InternalSetting.DefaultParentOriginAsTopLeft = false;
             Stage stage = Stage.Instance;
             stage.BackgroundColor = Color.White;
 
index fb78c78..3664442 100755 (executable)
@@ -54,6 +54,7 @@ namespace HelloTest
 
         private void Initialize()
         {
+            InternalSetting.DefaultParentOriginAsTopLeft = false;
             // Connect the signal callback for stage touched signal
             _stage = Stage.Instance;
             _stage.Touch += OnStageTouched;
index 7e01ad9..e907b24 100755 (executable)
@@ -49,6 +49,7 @@ namespace HelloWorldTest
 
         public void Initialize()
         {
+            InternalSetting.DefaultParentOriginAsTopLeft = false;
             Stage stage = Stage.Instance;
             stage.BackgroundColor = Color.White;
             stage.Touch += OnStageTouched;
index fb5b481..b68aedd 100755 (executable)
@@ -58,6 +58,7 @@ namespace ImageViewTest
 
         public void Initialize()
         {
+            InternalSetting.DefaultParentOriginAsTopLeft = false;
             Log("Customized Application Initialize event handler");
             stage = Stage.Instance;
             stage.BackgroundColor = Color.Cyan;
diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/json-loader.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/json-loader.cs
deleted file mode 100755 (executable)
index e9badc8..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 2016 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 System.Runtime.InteropServices;
-using Tizen.NUI;
-
-namespace JsonLoaderTest
-{
-  class Example : NUIApplication
-  {
-    private Builder _builder;
-    private string _jsonFileName;
-
-    public Example() : base()
-    {
-    }
-
-    public Example(string stylesheet) : base(stylesheet)
-    {
-       _jsonFileName = stylesheet;
-    }
-
-    public Example(string stylesheet, WindowMode windowMode) : base(stylesheet, windowMode)
-    {
-    }
-
-    protected override void OnCreate()
-    {
-        base.OnCreate();
-        Initialize();
-    }
-
-    public void Initialize()
-    {
-        if( _jsonFileName.Length == 0)
-        {
-          Console.WriteLine("Please specify JSON file to load");
-          return;
-        }
-
-        _builder = new Builder ();
-
-        PropertyMap constants = new  PropertyMap();
-
-        //  In dali-demo we have some JSON files that can be loaded, but they need 3 different macros defining.
-        // The JSON folder is typically installed into dali-env/opt/share/com.samsung.dali-demo/res:
-        //
-        //string demoDirectory = ".../dali-env/opt/share/com.samsung.dali-demo/res";
-        //constants.Insert( "DEMO_IMAGE_DIR" ,  new PropertyValue( demoDirectory+"/images") );
-        //constants.Insert( "DEMO_MODEL_DIR" ,  new PropertyValue( demoDirectory+"/models") );
-        //constants.Insert( "DEMO_SCRIPT_DIR",  new PropertyValue( demoDirectory+"/scripts") );
-        constants.Insert( "CONFIG_SCRIPT_LOG_LEVEL",  new PropertyValue( "Verbose") );
-
-         _builder.AddConstants( constants );
-
-
-        Stage stage = Stage.Instance;
-        stage.BackgroundColor = Color.White;
-
-        _builder.LoadFromFile( _jsonFileName );
-
-        _builder.AddActors( stage.GetDefaultLayer() );
-
-    }
-
-    /// <summary>
-    /// The main entry point for the application.
-    /// </summary>
-    [STAThread]
-    static void _Main(string[] args)
-    {
-      string fileName= "";
-
-      if( args.Length > 0)
-      {
-          fileName = args[0];
-      }
-
-      Console.WriteLine("arguments = " + args.Length);
-      Example example = new Example(fileName);
-      example.Run(args);
-    }
-  }
-}
index f97f0e2..4fc206b 100755 (executable)
@@ -57,6 +57,7 @@ namespace ScrollViewTest
 
     public void Initialize()
     {
+            InternalSetting.DefaultParentOriginAsTopLeft = false;
       CreateScrollView();
     }
 
@@ -141,7 +142,7 @@ namespace ScrollViewTest
       _text.ParentOrigin = ParentOrigin.Center;
       _text.AnchorPoint = AnchorPoint.Center;
       _text.HorizontalAlignment = "CENTER";
-      _text.PointSize = 48.0f;
+            _text.PointSize = 20.0f;
 
       _scrollView.Add(_text);
     }
index 1e2c633..c57905e 100755 (executable)
@@ -26,6 +26,7 @@ namespace VisualViewTest
     {
         private VisualView _visualView = null;
         private const string resources = "/home/owner/apps_rw/NUISamples.TizenTV/res";
+        private Window _window;
 
         public Example() : base()
         {
@@ -243,7 +244,7 @@ namespace VisualViewTest
             _visualView.AddVisual("meshVisual1", meshVisualMap1);
 
             /* n-patch image visual 1. */
-            NpatchImageVisualMap npatchImageVisualMap1 = new NpatchImageVisualMap();
+            NPatchVisualMap npatchImageVisualMap1 = new NPatchVisualMap();
             npatchImageVisualMap1.URL = resources + "/images/gallery-4.jpg";
             npatchImageVisualMap1.VisualSize = new Size2D(400, 400);
             npatchImageVisualMap1.Offset = new Position2D(300, 600);
@@ -254,6 +255,19 @@ namespace VisualViewTest
             npatchImageVisualMap1.Border = new Rectangle(100, 100, 100, 100);
             _visualView.AddVisual("npatchImageVisual1", npatchImageVisualMap1);
 
+            _window = this.Window;
+            _window.WindowFocusChanged += (sender, ee) =>
+            {
+                Tizen.Log.Debug("NUI", "[WindowFocusTest] WindowFocusChanged event comes! focus gained=" + ee.FocusGained);
+            };
+
+            Tizen.Log.Debug("NUI", "[WindowFocusTest] is focus acceptable=" + _window.IsFocusAcceptable());
+            _window.SetAcceptFocus(false);
+            Tizen.Log.Debug("NUI", "[WindowFocusTest] set focus acceptable=false!!!");
+            Tizen.Log.Debug("NUI", "[WindowFocusTest] is focus acceptable=" + _window.IsFocusAcceptable());
+            _window.SetAcceptFocus(true);
+            Tizen.Log.Debug("NUI", "[WindowFocusTest] set focus acceptable=true!!!");
+            Tizen.Log.Debug("NUI", "[WindowFocusTest] is focus acceptable=" + _window.IsFocusAcceptable());
         }\r
 
         [STAThread]
diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/res/json/date-picker-theme.json b/NUISamples/NUISamples/NUISamples.TizenTV/res/json/date-picker-theme.json
new file mode 100755 (executable)
index 0000000..6424a38
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * This file is part of Dali Toolkit
+ *
+ * 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.
+ */
+
+{
+  "styles": {
+    "Spin": {
+      "MinValue": 0,
+      "MaxValue": 100,
+      "Value": 50,
+      "Step": 1,
+      "TextColor": [ 1.0, 0.0, 0.0, 1.0 ]
+    }
+  }
+}
index f9d47be..7dd1b78 100755 (executable)
     <Compile Include="src\internal\VisualTransformPolicyType.cs" />\r
     <Compile Include="src\internal\VisualTransformPropertyType.cs" />\r
     <Compile Include="src\internal\VisualType.cs" />\r
+    <Compile Include="src\internal\WindowFocusSignalType.cs" />\r
     <Compile Include="src\internal\VoidSignal.cs" />\r
     <Compile Include="src\internal\WrapModeType.cs" />\r
     <Compile Include="src\public\Actor.cs" />\r
index 8f50284..4b91ba8 100755 (executable)
@@ -448,6 +448,8 @@ namespace Tizen.NUI
         // Callback for Application InitSignal
         private void OnApplicationInit(IntPtr data)
         {
+            // Initialize DisposeQueue Singleton class. This is also required to create DisposeQueue on main thread.
+            DisposeQueue.Instance.Initialize();
             NUIApplicationInitEventArgs e = new NUIApplicationInitEventArgs();
 
             // Populate all members of "e" (NUIApplicationInitEventArgs) with real data
@@ -1109,7 +1111,8 @@ namespace Tizen.NUI
             return ret;
         }
 
-        public bool AddIdle(System.Delegate func)
+        //Removed from v0.2.33
+        /*public bool AddIdle(System.Delegate func)
         {
             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
             System.IntPtr ip2 = NDalicManualPINVOKE.MakeCallback(new System.Runtime.InteropServices.HandleRef(this, ip));
@@ -1118,7 +1121,7 @@ namespace Tizen.NUI
 
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
-        }
+        }*/
 
 
 
index 2531371..a7004a5 100755 (executable)
@@ -15,16 +15,14 @@ namespace Tizen.NUI
 
     internal class DisposeQueue
     {
-        private static DisposeQueue _disposableQueue = new DisposeQueue();
+        private static readonly DisposeQueue _disposableQueue = new DisposeQueue();
         private List<IDisposable> _disposables = new List<IDisposable>();
         private Object _listLock = new object();
-        private delegate int ProcessDisposablesDelegate(IntPtr ptr);
-        private ProcessDisposablesDelegate _disposequeueProcessDisposablesDelegate;
+        private EventThreadCallback _eventThreadCallback;
+        private EventThreadCallback.CallbackDelegate _disposeQueueProcessDisposablesDelegate;
 
         private DisposeQueue()
         {
-          _disposequeueProcessDisposablesDelegate = new ProcessDisposablesDelegate(ProcessDisposables);
-          Application.Instance.AddIdle(_disposequeueProcessDisposablesDelegate);
         }
 
         ~DisposeQueue()
@@ -36,15 +34,23 @@ namespace Tizen.NUI
             get { return _disposableQueue; }
         }
 
+        public void Initialize()
+        {
+            _disposeQueueProcessDisposablesDelegate = new EventThreadCallback.CallbackDelegate(ProcessDisposables);
+            _eventThreadCallback = new EventThreadCallback(_disposeQueueProcessDisposablesDelegate);
+        }
+
         public void Add(IDisposable disposable)
         {
             lock(_listLock)
             {
                 _disposables.Add(disposable);
             }
+
+            _eventThreadCallback.Trigger();
         }
 
-        private int ProcessDisposables(IntPtr ptr)
+        private void ProcessDisposables()
         {
             lock(_listLock)
             {
@@ -54,7 +60,6 @@ namespace Tizen.NUI
                 }
                 _disposables.Clear();
             }
-            return 0;
         }
     }
 }
diff --git a/Tizen.NUI/src/internal/EventThreadCallback.cs b/Tizen.NUI/src/internal/EventThreadCallback.cs
new file mode 100755 (executable)
index 0000000..18a25b7
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * 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.
+ *
+ */
+
+namespace Tizen.NUI
+{
+
+    public class EventThreadCallback : global::System.IDisposable
+    {
+        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+        protected bool swigCMemOwn;
+        public delegate void CallbackDelegate();
+
+        internal EventThreadCallback(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(EventThreadCallback obj)
+        {
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+        }
+
+        ~EventThreadCallback()
+        {
+            Dispose();
+        }
+
+        public virtual void Dispose()
+        {
+            lock (this)
+            {
+                if (swigCPtr.Handle != global::System.IntPtr.Zero)
+                {
+                    if (swigCMemOwn)
+                    {
+                        swigCMemOwn = false;
+                        NDalicManualPINVOKE.delete_EventThreadCallback(swigCPtr);
+                    }
+                    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+                }
+                global::System.GC.SuppressFinalize(this);
+            }
+        }
+
+        public EventThreadCallback(CallbackDelegate func) : this(NDalicManualPINVOKE.new_EventThreadCallback(func), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending)
+                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        public void Trigger()
+        {
+            NDalicManualPINVOKE.EventThreadCallback_Trigger(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending)
+                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+    }
+
+}
index 0d6e639..1a19d4b 100755 (executable)
@@ -184,8 +184,14 @@ namespace Tizen.NUI
         [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_ViewWrapperImpl_ApplyThemeStyle")]
         public static extern void ViewWrapperImpl_ApplyThemeStyle(global::System.Runtime.InteropServices.HandleRef jarg1);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_MakeCallback")]
-        public static extern global::System.IntPtr MakeCallback(global::System.Runtime.InteropServices.HandleRef jarg1);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_EventThreadCallback")]
+        public static extern global::System.IntPtr new_EventThreadCallback(EventThreadCallback.CallbackDelegate delegate1);
+
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_EventThreadCallback")]
+        public static extern void delete_EventThreadCallback(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_EventThreadCallback_Trigger")]
+        public static extern void EventThreadCallback_Trigger(global::System.Runtime.InteropServices.HandleRef jarg1);
 
         [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Actor_Property_SIBLING_ORDER_get")]
         public static extern int Actor_Property_SIBLING_ORDER_get();
index 93df46c..bce283d 100755 (executable)
@@ -6338,6 +6338,30 @@ class NDalicPINVOKE {
   [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_TimerSignalType")]
   public static extern void delete_TimerSignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
 
+
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_WindowFocusSignalType_Empty")]
+        public static extern bool WindowFocusSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_WindowFocusSignalType_GetConnectionCount")]
+        public static extern uint WindowFocusSignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_WindowFocusSignalType_Connect")]
+        public static extern void WindowFocusSignalType_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_WindowFocusSignalType_Disconnect")]
+        public static extern void WindowFocusSignalType_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_WindowFocusSignalType_Emit")]
+        public static extern void WindowFocusSignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2);
+
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_new_WindowFocusSignalType")]
+        public static extern global::System.IntPtr new_WindowFocusSignalType();
+
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_delete_WindowFocusSignalType")]
+        public static extern void delete_WindowFocusSignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+
+
   [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_VISUAL_PROPERTY_TYPE_get")]
   public static extern int VISUAL_PROPERTY_TYPE_get();
 
index ac80b47..4c22cc5 100755 (executable)
@@ -34,11 +34,16 @@ namespace Tizen.NUI
 
         ~ViewWrapper()
         {
-            Dispose();
+            DisposeQueue.Instance.Add(this);
         }
 
         public override void Dispose()
         {
+            if (!Stage.IsInstalled())
+            {
+                DisposeQueue.Instance.Add(this);
+                return;
+            }
             lock(this)
             {
                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
diff --git a/Tizen.NUI/src/internal/WindowFocusSignalType.cs b/Tizen.NUI/src/internal/WindowFocusSignalType.cs
new file mode 100755 (executable)
index 0000000..245c7b2
--- /dev/null
@@ -0,0 +1,97 @@
+//------------------------------------------------------------------------------\r
+// <auto-generated />\r
+//\r
+// This file was automatically generated by SWIG (http://www.swig.org).\r
+// Version 3.0.9\r
+//\r
+// Do not make changes to this file unless you know what you are doing--modify\r
+// the SWIG interface file instead.\r
+//------------------------------------------------------------------------------\r
+\r
+namespace Tizen.NUI\r
+{\r
+\r
+    public class WindowFocusSignalType : global::System.IDisposable\r
+    {\r
+        private global::System.Runtime.InteropServices.HandleRef swigCPtr;\r
+        protected bool swigCMemOwn;\r
+\r
+        internal WindowFocusSignalType(global::System.IntPtr cPtr, bool cMemoryOwn)\r
+        {\r
+            swigCMemOwn = cMemoryOwn;\r
+            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);\r
+        }\r
+\r
+        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WindowFocusSignalType obj)\r
+        {\r
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;\r
+        }\r
+\r
+        ~WindowFocusSignalType()\r
+        {\r
+            Dispose();\r
+        }\r
+\r
+        public virtual void Dispose()\r
+        {\r
+            lock (this)\r
+            {\r
+                if (swigCPtr.Handle != global::System.IntPtr.Zero)\r
+                {\r
+                    if (swigCMemOwn)\r
+                    {\r
+                        swigCMemOwn = false;\r
+                        NDalicPINVOKE.delete_WindowFocusSignalType(swigCPtr);\r
+                    }\r
+                    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);\r
+                }\r
+                global::System.GC.SuppressFinalize(this);\r
+            }\r
+        }\r
+\r
+        public bool Empty()\r
+        {\r
+            bool ret = NDalicPINVOKE.WindowFocusSignalType_Empty(swigCPtr);\r
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
+            return ret;\r
+        }\r
+\r
+        public uint GetConnectionCount()\r
+        {\r
+            uint ret = NDalicPINVOKE.WindowFocusSignalType_GetConnectionCount(swigCPtr);\r
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
+            return ret;\r
+        }\r
+\r
+        public void Connect(System.Delegate func)\r
+        {\r
+            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);\r
+            {\r
+                NDalicPINVOKE.WindowFocusSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));\r
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
+            }\r
+        }\r
+\r
+        public void Disconnect(System.Delegate func)\r
+        {\r
+            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);\r
+            {\r
+                NDalicPINVOKE.WindowFocusSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));\r
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
+            }\r
+        }\r
+\r
+        public void Emit(bool arg)\r
+        {\r
+            NDalicPINVOKE.WindowFocusSignalType_Emit(swigCPtr, arg);\r
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
+        }\r
+\r
+        public WindowFocusSignalType() : this(NDalicPINVOKE.new_WindowFocusSignalType(), true)\r
+        {\r
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
+        }\r
+\r
+    }\r
+\r
+}\r
index f54a0ca..0ea4cde 100755 (executable)
@@ -232,5 +232,12 @@ namespace Tizen.NUI
             Transparent = 1
         }
 
+        public Window Window
+        {
+            get
+            {
+                return _application.GetWindow();
+            }
+        }
     }
 }
\ No newline at end of file
index dada221..e81eb40 100755 (executable)
@@ -58,6 +58,10 @@ namespace Tizen.NUI
             }
         }
 
+        public Rectangle(float x, float y, float width, float height) : this( (int)x, (int)y, (int)width, (int)height )
+        {
+        }
+
         /// <summary>
         /// Equality operator.
         /// </summary>
@@ -96,26 +100,26 @@ namespace Tizen.NUI
         /// <summary>
         /// X position of the rectangle
         /// </summary>
-        public int X
+        public float X
         {
             set
             {
-                x = value;
+                x = (int)( value );
             }
             get
             {
                 return x;
             }
-        }
+            }
 
         /// <summary>
         /// Y position of the rectangle
         /// </summary>
-        public int Y
+        public float Y
         {
             set
             {
-                y = value;
+                y = (int)( value );
             }
             get
             {
@@ -126,11 +130,11 @@ namespace Tizen.NUI
         /// <summary>
         /// Width of the rectangle
         /// </summary>
-        public int Width
+        public float Width
         {
             set
             {
-                width = value;
+                width = (int)( value );
             }
             get
             {
@@ -141,11 +145,11 @@ namespace Tizen.NUI
         /// <summary>
         /// Height of the rectangle
         /// </summary>
-        public int Height
+        public float Height
         {
             set
             {
-                height = value;
+                height = (int)( value );
             }
             get
             {
index d0f1132..54bfd57 100755 (executable)
@@ -1316,22 +1316,14 @@ namespace Tizen.NUI
     /// <summary>
     /// A class encapsulating the property map of a n-patch image visual.
     /// </summary>
-    public class NpatchImageVisualMap : VisualMap
+    public class NPatchVisualMap : VisualMap
     {
-        public NpatchImageVisualMap() : base()
+        public NPatchVisualMap() : base()
         {
         }
 
         private string _url = "";
-        private FittingModeType _fittingMode = FittingModeType.ShrinkToFit;
-        private SamplingModeType _samplingMode = SamplingModeType.Box;
-        private int _desiredWidth = 0;
-        private int _desiredHeight = 0;
-        private bool _synchronousLoading = false;
         private bool _borderOnly = false;
-        private Vector4 _pixelArea = new Vector4(0.0f, 0.0f, 1.0f, 1.0f);
-        private WrapModeType _wrapModeU = WrapModeType.ClampToEdge;
-        private WrapModeType _wrapModeV = WrapModeType.ClampToEdge;
         private Rectangle _border = new Rectangle(0, 0, 0, 0);
 
         /// <summary>
@@ -1350,91 +1342,6 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Get or set fitting options, used when resizing images to fit desired dimensions.
-        /// If not supplied, default is FittingMode::SHRINK_TO_FIT.
-        /// For Normal Quad images only.
-        /// </summary>
-        public FittingModeType FittingMode
-        {
-            get
-            {
-                return _fittingMode;
-            }
-            set
-            {
-                _fittingMode = value;
-            }
-        }
-
-        /// <summary>
-        /// Get or set filtering options, used when resizing images to sample original pixels.
-        /// If not supplied, default is SamplingMode::BOX.
-        /// For Normal Quad images only.
-        /// </summary>
-        public SamplingModeType SamplingMode
-        {
-            get
-            {
-                return _samplingMode;
-            }
-            set
-            {
-                _samplingMode = value;
-            }
-        }
-
-        /// <summary>
-        /// Get or set the desired image width.
-        /// If not specified, the actual image width is used.
-        /// For Normal Quad images only.
-        /// </summary>
-        public int DesiredWidth
-        {
-            get
-            {
-                return _desiredWidth;
-            }
-            set
-            {
-                _desiredWidth = value;
-            }
-        }
-
-        /// <summary>
-        /// Get or set the desired image height.
-        /// If not specified, the actual image height is used.
-        /// For Normal Quad images only.
-        /// </summary>
-        public int DesiredHeight
-        {
-            get
-            {
-                return _desiredHeight;
-            }
-            set
-            {
-                _desiredHeight = value;
-            }
-        }
-
-        /// <summary>
-        /// Get or set whether to load the image synchronously.
-        /// If not specified, the default is false, i.e. the image is loaded asynchronously.
-        /// For Normal Quad images only.
-        /// </summary>
-        public bool SynchronousLoading
-        {
-            get
-            {
-                return _synchronousLoading;
-            }
-            set
-            {
-                _synchronousLoading = value;
-            }
-        }
-
-        /// <summary>
         /// Get or set whether to draws the borders only(If true).
         /// If not specified, the default is false.
         /// For N-Patch images only.
@@ -1452,61 +1359,8 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Get or set the image area to be displayed.
-        /// It is a rectangular area.
-        /// The first two elements indicate the top-left position of the area, and the last two elements are the area width and height respectively.
-        /// If not specified, the default value is [0.0, 0.0, 1.0, 1.0], i.e. the entire area of the image.
-        /// For For Normal QUAD image only.
-        /// </summary>
-        public Vector4 PixelArea
-        {
-            get
-            {
-                return _pixelArea;
-            }
-            set
-            {
-                _pixelArea = value;
-            }
-        }
-
-        /// <summary>
-        /// Get or set the wrap mode for u coordinate.
-        /// It decides how the texture should be sampled when the u coordinate exceeds the range of 0.0 to 1.0.
-        /// If not specified, the default is CLAMP.
-        /// For Normal QUAD image only.
-        /// </summary>
-        public WrapModeType WrapModeU
-        {
-            get
-            {
-                return _wrapModeU;
-            }
-            set
-            {
-                _wrapModeU = value;
-            }
-        }
-
-        /// <summary>
-        /// Get or set the wrap mode for v coordinate.
-        /// It decides how the texture should be sampled when the v coordinate exceeds the range of 0.0 to 1.0.
-        /// The first two elements indicate the top-left position of the area, and the last two elements are the area width and height respectively.
-        /// If not specified, the default is CLAMP.
-        /// For Normal QUAD image only.
+        ///  The border of the image in the order: left, right, bottom, top.
         /// </summary>
-        public WrapModeType WrapModeV
-        {
-            get
-            {
-                return _wrapModeV;
-            }
-            set
-            {
-                _wrapModeV = value;
-            }
-        }
-
         public Rectangle Border
         {
             get
@@ -1524,26 +1378,9 @@ namespace Tizen.NUI
             if (_url != "")
             {
                 _outputVisualMap = new PropertyMap();
-                _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Npatch));
+                _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.NPatch));
                 _outputVisualMap.Add(NpatchImageVisualProperty.URL, new PropertyValue(_url));
-                _outputVisualMap.Add(NpatchImageVisualProperty.FittingMode, new PropertyValue((int)_fittingMode));
-                _outputVisualMap.Add(NpatchImageVisualProperty.SamplingMode, new PropertyValue((int)_samplingMode));
-
-                if (_desiredWidth != 0)
-                {
-                    _outputVisualMap.Add(NpatchImageVisualProperty.DesiredWidth, new PropertyValue(_desiredWidth));
-                }
-
-                if (_desiredHeight != 0)
-                {
-                    _outputVisualMap.Add(NpatchImageVisualProperty.DesiredHeight, new PropertyValue(_desiredHeight));
-                }
-
-                _outputVisualMap.Add(NpatchImageVisualProperty.SynchronousLoading, new PropertyValue(_synchronousLoading));
                 _outputVisualMap.Add(NpatchImageVisualProperty.BorderOnly, new PropertyValue(_borderOnly));
-                _outputVisualMap.Add(NpatchImageVisualProperty.PixelArea, new PropertyValue(_pixelArea));
-                _outputVisualMap.Add(NpatchImageVisualProperty.WrapModeU, new PropertyValue((int)_wrapModeU));
-                _outputVisualMap.Add(NpatchImageVisualProperty.WrapModeV, new PropertyValue((int)_wrapModeV));
                 _outputVisualMap.Add(NpatchImageVisualProperty.Border, new PropertyValue(_border));
             }
         }
@@ -1650,7 +1487,7 @@ namespace Tizen.NUI
             Primitive,
             Wireframe,
             Text,
-            Npatch
+            NPatch
         }
 
         public struct Property
index fac98d1..3b59e02 100755 (executable)
 
 namespace Tizen.NUI
 {
+
+    using System;
+    using System.Runtime.InteropServices;
+    
+
     /// <summary>
     /// The window class is used internally for drawing.
     /// A Window has an orientation and indicator properties.
@@ -73,6 +78,19 @@ namespace Tizen.NUI
             }
         }
 
+
+        public void SetAcceptFocus(bool accept)
+        {
+            NDalicPINVOKE.SetAcceptFocus(swigCPtr, accept);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        public bool IsFocusAcceptable()
+        {
+            return NDalicPINVOKE.IsFocusAcceptable(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
         public void Show()
         {
             NDalicPINVOKE.Show(swigCPtr);
@@ -91,6 +109,64 @@ namespace Tizen.NUI
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
+        public class WindowFocusChangedEventArgs : EventArgs
+        {
+            public bool FocusGained
+            {
+                get;
+                set;
+            }
+        }
+
+        private WindowFocusChangedEventCallbackType _windowFocusChangedEventCallback;
+        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+        private delegate void WindowFocusChangedEventCallbackType(bool focusGained);
+        private event EventHandler<WindowFocusChangedEventArgs> _windowFocusChangedEventHandler;
+
+        public event EventHandler<WindowFocusChangedEventArgs> WindowFocusChanged
+        {
+            add
+            {
+                if (_windowFocusChangedEventHandler == null)
+                {
+                    _windowFocusChangedEventCallback = OnWindowFocusedChanged;
+                    WindowFocusChangedSignal().Connect(_windowFocusChangedEventCallback);
+                }
+
+                _windowFocusChangedEventHandler += value;
+            }
+            remove
+            {
+                _windowFocusChangedEventHandler -= value;
+
+                if (_windowFocusChangedEventHandler == null && _windowFocusChangedEventCallback != null)
+                {
+                    WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback);
+                }
+            }
+        }
+
+        private void OnWindowFocusedChanged(bool focusGained)
+        {
+            WindowFocusChangedEventArgs e = new WindowFocusChangedEventArgs();
+
+            e.FocusGained = focusGained;
+
+            if (_windowFocusChangedEventHandler != null)
+            {
+                _windowFocusChangedEventHandler(this, e);
+            }
+        }
+
+        public WindowFocusSignalType WindowFocusChangedSignal()
+        {
+            WindowFocusSignalType ret = new WindowFocusSignalType(NDalicPINVOKE.FocusChangedSignal(swigCPtr), false);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+
+
         /// <summary>
         /// Creates an initialized handle to a new Window.
         /// </summary>