Manual Merge for nui v0.2.33-pre
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>
12 files changed:
src/Tizen.NUI/Tizen.NUI.csproj
src/Tizen.NUI/src/internal/Application.cs
src/Tizen.NUI/src/internal/DisposeQueue.cs
src/Tizen.NUI/src/internal/EventThreadCallback.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/ManualPINVOKE.cs
src/Tizen.NUI/src/internal/NDalicPINVOKE.cs
src/Tizen.NUI/src/internal/ViewWrapper.cs
src/Tizen.NUI/src/internal/WindowFocusSignalType.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/NUIApplication.cs
src/Tizen.NUI/src/public/Rectangle.cs
src/Tizen.NUI/src/public/VisualMaps.cs
src/Tizen.NUI/src/public/Window.cs

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/src/Tizen.NUI/src/internal/EventThreadCallback.cs b/src/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/src/Tizen.NUI/src/internal/WindowFocusSignalType.cs b/src/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>