[NUI] change some comments of Timer and Window APIs
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Window.cs
index 2e76f74..e21644c 100755 (executable)
@@ -1,31 +1,32 @@
-/** 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.
-*
-*/
+/*
+ * 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 System.Runtime.InteropServices;
+using Tizen.NUI.BaseComponents;
+using System.ComponentModel;
+using System.Collections.Generic;
 
 namespace Tizen.NUI
 {
-
-    using System;
-    using System.Runtime.InteropServices;
-    using Tizen.NUI.BaseComponents;
-    using System.ComponentModel;
-
     /// <summary>
-    /// The window class is used internally for drawing.<br>
-    /// The window has an orientation and indicator properties.<br>
+    /// The window class is used internally for drawing.<br />
+    /// The window has an orientation and indicator properties.<br />
     /// </summary>
+    /// <since_tizen> 3 </since_tizen>
     public class Window : BaseHandle
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
@@ -33,6 +34,15 @@ namespace Tizen.NUI
         private Layer _rootLayer;
         private string _windowTitle;
 
+        private List<Layer> _childLayers = new List<Layer>();
+        internal List<Layer> LayersChildren
+        {
+            get
+            {
+                return _childLayers;
+            }
+        }
+
         internal Window(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Window_SWIGUpcast(cPtr), cMemoryOwn)
         {
             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
@@ -50,14 +60,20 @@ namespace Tizen.NUI
         /// <summary>
         /// To make the window instance be disposed.
         /// </summary>
+        /// Please DO NOT use! This will be deprecated!
+        /// Dispose() method in Singletone classes (ex: FocusManager, StyleManager, VisualFactory, IMFManager, TtsPlayer, Window) is not required.
+        /// Because it is Sigletone, so it is alive for one thread until the NUI is terminated, so it never be disposed.
+        /// <since_tizen> 3 </since_tizen>
+        [Obsolete("Please do not use! This will be deprecated!")]
+        [EditorBrowsable(EditorBrowsableState.Never)]
         protected override void Dispose(DisposeTypes type)
         {
-            if(disposed)
+            if (disposed)
             {
                 return;
             }
 
-            if(type == DisposeTypes.Explicit)
+            if (type == DisposeTypes.Explicit)
             {
                 //Called by User
                 //Release your own managed resources here.
@@ -139,17 +155,18 @@ namespace Tizen.NUI
             return ret;
         }
 
-       internal static bool IsInstalled()
-       {
+        internal static bool IsInstalled()
+        {
             bool ret = NDalicPINVOKE.Stage_IsInstalled();
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
-       }
+        }
 
         /// <summary>
         /// Sets whether the window accepts a focus or not.
         /// </summary>
         /// <param name="accept">If a focus is accepted or not. The default is true.</param>
+        /// <since_tizen> 3 </since_tizen>
         public void SetAcceptFocus(bool accept)
         {
             NDalicPINVOKE.SetAcceptFocus(swigCPtr, accept);
@@ -160,6 +177,7 @@ namespace Tizen.NUI
         /// Returns whether the window accepts a focus or not.
         /// </summary>
         /// <returns>True if the window accepts a focus, false otherwise.</returns>
+        /// <since_tizen> 3 </since_tizen>
         public bool IsFocusAcceptable()
         {
             bool ret = NDalicPINVOKE.IsFocusAcceptable(swigCPtr);
@@ -171,6 +189,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Shows the window if it is hidden.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public void Show()
         {
             NDalicPINVOKE.Show(swigCPtr);
@@ -180,6 +199,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Hides the window if it is showing.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public void Hide()
         {
             NDalicPINVOKE.Hide(swigCPtr);
@@ -190,6 +210,7 @@ namespace Tizen.NUI
         /// Retrieves whether the window is visible or not.
         /// </summary>
         /// <returns>True if the window is visible.</returns>
+        /// <since_tizen> 3 </since_tizen>
         public bool IsVisible()
         {
             bool temp = NDalicPINVOKE.IsVisible(swigCPtr);
@@ -201,7 +222,9 @@ namespace Tizen.NUI
         /// Gets the count of supported auxiliary hints of the window.
         /// </summary>
         /// <returns>The number of supported auxiliary hints.</returns>
-        public uint GetSupportedAuxiliaryHintCount() {
+        /// <since_tizen> 3 </since_tizen>
+        public uint GetSupportedAuxiliaryHintCount()
+        {
             uint ret = NDalicPINVOKE.GetSupportedAuxiliaryHintCount(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -212,7 +235,9 @@ namespace Tizen.NUI
         /// </summary>
         /// <param name="index">The index of the supported auxiliary hint lists.</param>
         /// <returns>The auxiliary hint string of the index.</returns>
-        public string GetSupportedAuxiliaryHint(uint index) {
+        /// <since_tizen> 3 </since_tizen>
+        public string GetSupportedAuxiliaryHint(uint index)
+        {
             string ret = NDalicPINVOKE.GetSupportedAuxiliaryHint(swigCPtr, index);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -224,7 +249,9 @@ namespace Tizen.NUI
         /// <param name="hint">The auxiliary hint string.</param>
         /// <param name="value">The value string.</param>
         /// <returns>The ID of created auxiliary hint, or 0 on failure.</returns>
-        public uint AddAuxiliaryHint(string hint, string value) {
+        /// <since_tizen> 3 </since_tizen>
+        public uint AddAuxiliaryHint(string hint, string value)
+        {
             uint ret = NDalicPINVOKE.AddAuxiliaryHint(swigCPtr, hint, value);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -235,7 +262,9 @@ namespace Tizen.NUI
         /// </summary>
         /// <param name="id">The ID of the auxiliary hint.</param>
         /// <returns>True if no error occurred, false otherwise.</returns>
-        public bool RemoveAuxiliaryHint(uint id) {
+        /// <since_tizen> 3 </since_tizen>
+        public bool RemoveAuxiliaryHint(uint id)
+        {
             bool ret = NDalicPINVOKE.RemoveAuxiliaryHint(swigCPtr, id);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -247,7 +276,9 @@ namespace Tizen.NUI
         /// <param name="id">The auxiliary hint ID.</param>
         /// <param name="value">The value string to be set.</param>
         /// <returns>True if no error occurred, false otherwise.</returns>
-        public bool SetAuxiliaryHintValue(uint id, string value) {
+        /// <since_tizen> 3 </since_tizen>
+        public bool SetAuxiliaryHintValue(uint id, string value)
+        {
             bool ret = NDalicPINVOKE.SetAuxiliaryHintValue(swigCPtr, id, value);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -258,7 +289,9 @@ namespace Tizen.NUI
         /// </summary>
         /// <param name="id">The auxiliary hint ID.</param>
         /// <returns>The string value of the auxiliary hint ID, or an empty string if none exists.</returns>
-        public string GetAuxiliaryHintValue(uint id) {
+        /// <since_tizen> 3 </since_tizen>
+        public string GetAuxiliaryHintValue(uint id)
+        {
             string ret = NDalicPINVOKE.GetAuxiliaryHintValue(swigCPtr, id);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -269,7 +302,9 @@ namespace Tizen.NUI
         /// </summary>
         /// <param name="hint">The auxiliary hint string.</param>
         /// <returns>The ID of auxiliary hint string, or 0 on failure.</returns>
-        public uint GetAuxiliaryHintId(string hint) {
+        /// <since_tizen> 3 </since_tizen>
+        public uint GetAuxiliaryHintId(string hint)
+        {
             uint ret = NDalicPINVOKE.GetAuxiliaryHintId(swigCPtr, hint);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -279,7 +314,9 @@ namespace Tizen.NUI
         /// Sets a region to accept input events.
         /// </summary>
         /// <param name="inputRegion">The region to accept input events.</param>
-        public void SetInputRegion(Rectangle inputRegion) {
+        /// <since_tizen> 3 </since_tizen>
+        public void SetInputRegion(Rectangle inputRegion)
+        {
             NDalicPINVOKE.SetInputRegion(swigCPtr, Rectangle.getCPtr(inputRegion));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
@@ -287,6 +324,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Gets or sets a window type.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public WindowType Type
         {
             get
@@ -307,7 +345,9 @@ namespace Tizen.NUI
         /// </summary>
         /// <param name="level">The notification window level.</param>
         /// <returns>True if no error occurred, false otherwise.</returns>
-        public bool SetNotificationLevel(NotificationLevel level) {
+        /// <since_tizen> 3 </since_tizen>
+        public bool SetNotificationLevel(NotificationLevel level)
+        {
             bool ret = NDalicPINVOKE.SetNotificationLevel(swigCPtr, (int)level);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -317,17 +357,26 @@ namespace Tizen.NUI
         /// Gets a priority level for the specified notification window.
         /// </summary>
         /// <returns>The notification window level.</returns>
-        public NotificationLevel GetNotificationLevel() {
+        /// <since_tizen> 3 </since_tizen>
+        public NotificationLevel GetNotificationLevel()
+        {
             NotificationLevel ret = (NotificationLevel)NDalicPINVOKE.GetNotificationLevel(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
         /// <summary>
-        /// Sets a transparent window's visual state to opaque.
+        /// Sets a transparent window's visual state to opaque. <br />
+        /// If a visual state of a transparent window is opaque, <br />
+        /// then the window manager could handle it as an opaque window when calculating visibility.
         /// </summary>
         /// <param name="opaque">Whether the window's visual state is opaque.</param>
-        public void SetOpaqueState(bool opaque) {
+        /// <remarks>This will have no effect on an opaque window. <br />
+        /// It doesn't change transparent window to opaque window but lets the window manager know the visual state of the window.
+        /// </remarks>
+        /// <since_tizen> 3 </since_tizen>
+        public void SetOpaqueState(bool opaque)
+        {
             NDalicPINVOKE.SetOpaqueState(swigCPtr, opaque);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
@@ -336,19 +385,24 @@ namespace Tizen.NUI
         /// Returns whether a transparent window's visual state is opaque or not.
         /// </summary>
         /// <returns>True if the window's visual state is opaque, false otherwise.</returns>
-        public bool IsOpaqueState() {
+        /// <remarks> The return value has no meaning on an opaque window. </remarks>
+        /// <since_tizen> 3 </since_tizen>
+        public bool IsOpaqueState()
+        {
             bool ret = NDalicPINVOKE.IsOpaqueState(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
         /// <summary>
-        /// Sets a window's screen mode.
+        /// Sets a window's screen off mode.
         /// </summary>
-        /// <param name="screenMode">The screen mode.</param>
+        /// <param name="screenOffMode">The screen mode.</param>
         /// <returns>True if no error occurred, false otherwise.</returns>
-        public bool SetScreenMode(ScreenMode screenMode) {
-            bool ret = NDalicPINVOKE.SetScreenMode(swigCPtr, (int)screenMode);
+        /// <since_tizen> 4 </since_tizen>
+        public bool SetScreenOffMode(ScreenOffMode screenOffMode)
+        {
+            bool ret = NDalicPINVOKE.SetScreenOffMode(swigCPtr, (int)screenOffMode);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
@@ -356,9 +410,11 @@ namespace Tizen.NUI
         /// <summary>
         /// Gets the screen mode of the window.
         /// </summary>
-        /// <returns>The screen mode.</returns>
-        public ScreenMode GetScreenMode() {
-            ScreenMode ret = (ScreenMode)NDalicPINVOKE.GetScreenMode(swigCPtr);
+        /// <returns>The screen off mode.</returns>
+        /// <since_tizen> 4 </since_tizen>
+        public ScreenOffMode GetScreenOffMode()
+        {
+            ScreenOffMode ret = (ScreenOffMode)NDalicPINVOKE.GetScreenOffMode(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
@@ -368,7 +424,9 @@ namespace Tizen.NUI
         /// </summary>
         /// <param name="brightness">The preferred brightness (0 to 100).</param>
         /// <returns>True if no error occurred, false otherwise.</returns>
-        public bool SetBrightness(int brightness) {
+        /// <since_tizen> 3 </since_tizen>
+        public bool SetBrightness(int brightness)
+        {
             bool ret = NDalicPINVOKE.SetBrightness(swigCPtr, brightness);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -378,14 +436,24 @@ namespace Tizen.NUI
         /// Gets the preferred brightness of the window.
         /// </summary>
         /// <returns>The preferred brightness.</returns>
-        public int GetBrightness() {
+        /// <since_tizen> 3 </since_tizen>
+        public int GetBrightness()
+        {
             int ret = NDalicPINVOKE.GetBrightness(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
+        /// <summary>
+        /// The focus changed event argument.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public class FocusChangedEventArgs : EventArgs
         {
+            /// <summary>
+            /// FocusGained flag.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public bool FocusGained
             {
                 get;
@@ -398,6 +466,10 @@ namespace Tizen.NUI
         private delegate void WindowFocusChangedEventCallbackType(bool focusGained);
         private event EventHandler<FocusChangedEventArgs> _windowFocusChangedEventHandler;
 
+        /// <summary>
+        /// FocusChanged event.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public event EventHandler<FocusChangedEventArgs> FocusChanged
         {
             add
@@ -436,6 +508,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Gets/Sets a window title.
         /// </summary>
+        /// <since_tizen> 4 </since_tizen>
         public string Title
         {
             get
@@ -445,7 +518,7 @@ namespace Tizen.NUI
             set
             {
                 _windowTitle = value;
-                SetClass( _windowTitle, "" );
+                SetClass(_windowTitle, "");
             }
         }
 
@@ -499,6 +572,7 @@ namespace Tizen.NUI
         /// </summary>
         /// <param name="name">The name of the window.</param>
         /// <param name="klass">The class of the window.</param>
+        /// <since_tizen> 4 </since_tizen>
         public void SetClass(string name, string klass)
         {
             NDalicPINVOKE.Window_SetClass(swigCPtr, name, klass);
@@ -508,6 +582,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Raises the window to the top of the window stack.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public void Raise()
         {
             NDalicPINVOKE.Window_Raise(swigCPtr);
@@ -517,6 +592,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Lowers the window to the bottom of the window stack.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public void Lower()
         {
             NDalicPINVOKE.Window_Lower(swigCPtr);
@@ -526,6 +602,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Activates the window to the top of the window stack even it is iconified.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public void Activate()
         {
             NDalicPINVOKE.Window_Activate(swigCPtr);
@@ -582,6 +659,7 @@ namespace Tizen.NUI
         /// Gets the default ( root ) layer.
         /// </summary>
         /// <returns>The root layer.</returns>
+        /// <since_tizen> 3 </since_tizen>
         public Layer GetDefaultLayer()
         {
             return this.GetRootLayer();
@@ -591,24 +669,36 @@ namespace Tizen.NUI
         {
             NDalicPINVOKE.Stage_Add(stageCPtr, Layer.getCPtr(layer));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+            LayersChildren.Add(layer);
         }
 
         internal void Remove(Layer layer)
         {
             NDalicPINVOKE.Stage_Remove(stageCPtr, Layer.getCPtr(layer));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+            LayersChildren.Remove(layer);
         }
 
+        /// <summary>
+        /// Add a child view to window.
+        /// </summary>
+        /// <param name="view">the child should be added to the window.</param>
+        /// <since_tizen> 3 </since_tizen>
         public void Add(View view)
         {
-            NDalicPINVOKE.Stage_Add(stageCPtr, View.getCPtr(view));
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            GetRootLayer()?.Add(view);
         }
 
+        /// <summary>
+        /// Remove a child view from window.
+        /// </summary>
+        /// <param name="view">the child to be removed.</param>
+        /// <since_tizen> 3 </since_tizen>
         public void Remove(View view)
         {
-            NDalicPINVOKE.Stage_Remove(stageCPtr, View.getCPtr(view));
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            GetRootLayer()?.Remove(view);
         }
 
         internal Vector2 GetSize()
@@ -632,27 +722,41 @@ namespace Tizen.NUI
         /// <remarks>Note that a default layer is always provided (count >= 1).</remarks>
         internal uint GetLayerCount()
         {
-            uint ret = NDalicPINVOKE.Stage_GetLayerCount(stageCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
+            if (LayersChildren == null || LayersChildren.Count < 0)
+                return 0;
+
+            return (uint) LayersChildren.Count;
         }
 
+        /// <summary>
+        /// Retrieves the layer at a specified depth.
+        /// </summary>
+        /// <param name="depth">The layer's depth index.</param>
+        /// <returns>The layer found at the given depth.</returns>
+        /// <since_tizen> 3 </since_tizen>
         public Layer GetLayer(uint depth)
         {
-            IntPtr cPtr = NDalicPINVOKE.Stage_GetLayer(stageCPtr, depth);
-            Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
-
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
+            if (depth < LayersChildren.Count)
+            {
+                Layer ret = LayersChildren[Convert.ToInt32(depth)];
+                return ret;
+            }
+            else
+            {
+                return null;
+            }
         }
 
         internal Layer GetRootLayer()
         {
-            if (_rootLayer == null)
+            // Window.IsInstalled() is actually true only when called from event thread and
+            // Core has been initialized, not when Stage is ready.
+            if (_rootLayer == null && Window.IsInstalled())
+            {
                 _rootLayer = new Layer(NDalicPINVOKE.Stage_GetRootLayer(stageCPtr), true);
-
-
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                LayersChildren.Add(_rootLayer);
+            }
             return _rootLayer;
         }
 
@@ -687,6 +791,7 @@ namespace Tizen.NUI
         /// Keep rendering for at least the given amount of time.
         /// </summary>
         /// <param name="durationSeconds">Time to keep rendering, 0 means render at least one more frame.</param>
+        /// <since_tizen> 3 </since_tizen>
         public void KeepRendering(float durationSeconds)
         {
             NDalicPINVOKE.Stage_KeepRendering(stageCPtr, durationSeconds);
@@ -774,9 +879,10 @@ namespace Tizen.NUI
         private static readonly Window instance = Application.Instance.GetWindow();
 
         /// <summary>
-        /// The stage instance property (read-only).<br>
-        /// Gets the current window.<br>
+        /// The stage instance property (read-only).<br />
+        /// Gets the current window.<br />
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public static Window Instance
         {
             get
@@ -786,12 +892,13 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Grabs the key specified by a key for a window only when a window is the topmost window.<br>
-        /// This function can be used for following example scenarios: <br>
-        /// - Mobile - Using volume up or down as zoom up or down in camera apps.<br>
+        /// Grabs the key specified by a key for a window only when a window is the topmost window.<br />
+        /// This function can be used for following example scenarios: <br />
+        /// - Mobile - Using volume up or down as zoom up or down in camera apps.<br />
         /// </summary>
         /// <param name="DaliKey">The key code to grab.</param>
         /// <returns>True if the grab succeeds.</returns>
+        /// <since_tizen> 3 </since_tizen>
         public bool GrabKeyTopmost(int DaliKey)
         {
             bool ret = NDalicManualPINVOKE.GrabKeyTopmost(HandleRef.ToIntPtr(this.swigCPtr), DaliKey);
@@ -800,11 +907,12 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Ungrabs the key specified by a key for the window.<br>
-        /// Note: If this function is called between key down and up events of a grabbed key, an application doesn't receive the key up event.<br>
+        /// Ungrabs the key specified by a key for the window.<br />
+        /// Note: If this function is called between key down and up events of a grabbed key, an application doesn't receive the key up event.<br />
         /// </summary>
         /// <param name="DaliKey">The key code to ungrab.</param>
         /// <returns>True if the ungrab succeeds.</returns>
+        /// <since_tizen> 3 </since_tizen>
         public bool UngrabKeyTopmost(int DaliKey)
         {
             bool ret = NDalicManualPINVOKE.UngrabKeyTopmost(HandleRef.ToIntPtr(this.swigCPtr), DaliKey);
@@ -813,15 +921,16 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        ///  Grabs the key specified by a key for a window in a GrabMode. <br>
-        ///  Details: This function can be used for following example scenarios: <br>
-        ///  - TV - A user might want to change the volume or channel of the background TV contents while focusing on the foregrund app. <br>
-        ///  - Mobile - When a user presses the Home key, the homescreen appears regardless of the current foreground app. <br>
-        ///  - Mobile - Using the volume up or down as zoom up or down in camera apps. <br>
+        ///  Grabs the key specified by a key for a window in a GrabMode. <br />
+        ///  Details: This function can be used for following example scenarios: <br />
+        ///  - TV - A user might want to change the volume or channel of the background TV contents while focusing on the foregrund app. <br />
+        ///  - Mobile - When a user presses the Home key, the homescreen appears regardless of the current foreground app. <br />
+        ///  - Mobile - Using the volume up or down as zoom up or down in camera apps. <br />
         /// </summary>
         /// <param name="DaliKey">The key code to grab.</param>
         /// <param name="GrabMode">The grab mode for the key.</param>
         /// <returns>True if the grab succeeds.</returns>
+        /// <since_tizen> 3 </since_tizen>
         public bool GrabKey(int DaliKey, KeyGrabMode GrabMode)
         {
             bool ret = NDalicManualPINVOKE.GrabKey(HandleRef.ToIntPtr(this.swigCPtr), DaliKey, (int)GrabMode);
@@ -830,11 +939,12 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Ungrabs the key specified by a key for a window.<br>
-        /// Note: If this function is called between key down and up events of a grabbed key, an application doesn't receive the key up event. <br>
+        /// Ungrabs the key specified by a key for a window.<br />
+        /// Note: If this function is called between key down and up events of a grabbed key, an application doesn't receive the key up event. <br />
         /// </summary>
         /// <param name="DaliKey">The key code to ungrab.</param>
         /// <returns>True if the ungrab succeeds.</returns>
+        /// <since_tizen> 3 </since_tizen>
         public bool UngrabKey(int DaliKey)
         {
             bool ret = NDalicManualPINVOKE.UngrabKey(HandleRef.ToIntPtr(this.swigCPtr), DaliKey);
@@ -852,17 +962,35 @@ namespace Tizen.NUI
         /// <summary>
         /// Enumeration for orientation of the window is the way in which a rectangular page is oriented for normal viewing.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public enum WindowOrientation
         {
+            /// <summary>
+            /// Portrait orientation. The height of the display area is greater than the width.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             Portrait = 0,
+            /// <summary>
+            /// Landscape orientation. A wide view area is needed.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             Landscape = 90,
+            /// <summary>
+            /// Portrait inverse orientation.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             PortraitInverse = 180,
+            /// <summary>
+            /// Landscape inverse orientation.
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             LandscapeInverse = 270
         }
 
         /// <summary>
         /// Enumeration for the key grab mode for platform-level APIs.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public enum KeyGrabMode
         {
             /// <summary>
@@ -906,6 +1034,7 @@ namespace Tizen.NUI
         /// <summary>
         /// The touch event argument.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public class TouchEventArgs : EventArgs
         {
             private Touch _touch;
@@ -913,6 +1042,7 @@ namespace Tizen.NUI
             /// <summary>
             /// Touch.
             /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public Touch Touch
             {
                 get
@@ -930,11 +1060,12 @@ namespace Tizen.NUI
         private EventCallbackDelegateType1 _stageTouchCallbackDelegate;
 
         /// <summary>
-        /// This event is emitted when the screen is touched and when the touch ends.<br>
+        /// This event is emitted when the screen is touched and when the touch ends.<br />
         /// If there are multiple touch points, then this will be emitted when the first touch occurs and
-        /// then when the last finger is lifted.<br>
-        /// An interrupted event will also be emitted (if it occurs).<br>
+        /// then when the last finger is lifted.<br />
+        /// An interrupted event will also be emitted (if it occurs).<br />
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public event EventHandler<TouchEventArgs> TouchEvent
         {
             add
@@ -977,6 +1108,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Wheel event arguments.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public class WheelEventArgs : EventArgs
         {
             private Wheel _wheel;
@@ -984,6 +1116,7 @@ namespace Tizen.NUI
             /// <summary>
             /// Wheel.
             /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public Wheel Wheel
             {
                 get
@@ -1003,6 +1136,7 @@ namespace Tizen.NUI
         /// <summary>
         /// This event is emitted when the wheel event is received.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public event EventHandler<WheelEventArgs> WheelEvent
         {
             add
@@ -1042,6 +1176,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Key event arguments.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public class KeyEventArgs : EventArgs
         {
             private Key _key;
@@ -1049,6 +1184,7 @@ namespace Tizen.NUI
             /// <summary>
             /// Key.
             /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public Key Key
             {
                 get
@@ -1068,6 +1204,7 @@ namespace Tizen.NUI
         /// <summary>
         /// This event is emitted when the key event is received.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public event EventHandler<KeyEventArgs> KeyEvent
         {
             add
@@ -1243,10 +1380,18 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// This resized event arguments.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public class ResizedEventArgs : EventArgs
         {
             Size2D _windowSize;
 
+            /// <summary>
+            /// This window size.
+            /// </summary>
+            /// <since_tizen> 4 </since_tizen>
             public Size2D WindowSize
             {
                 get
@@ -1265,6 +1410,10 @@ namespace Tizen.NUI
         private delegate void WindowResizedEventCallbackType(IntPtr windowSize);
         private event EventHandler<ResizedEventArgs> _windowResizedEventHandler;
 
+        /// <summary>
+        /// This event is emitted when the window resized.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public event EventHandler<ResizedEventArgs> Resized
         {
             add
@@ -1320,7 +1469,7 @@ namespace Tizen.NUI
 
         internal void SetPosition(Position2D position)
         {
-            var val = new Uint16Pair( (uint)position.X, (uint)position.Y );
+            var val = new Uint16Pair((uint)position.X, (uint)position.Y);
             NDalicManualPINVOKE.SetPosition(swigCPtr, Uint16Pair.getCPtr(val));
 
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -1336,8 +1485,22 @@ namespace Tizen.NUI
         }
 
         /// <summary>
+        /// Sets whether the window is transparent or not.
+        /// </summary>
+        /// <param name="transparent">Whether the window is transparent.</param>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void SetTransparency(bool transparent)
+        {
+            NDalicManualPINVOKE.SetTransparency(swigCPtr, transparent);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
         /// The window size property (read-only).
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public Size2D Size
         {
             get
@@ -1350,6 +1513,7 @@ namespace Tizen.NUI
         /// <summary>
         /// The background color property.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public Color BackgroundColor
         {
             set
@@ -1364,9 +1528,10 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// The DPI property (read-only).<br>
-        /// Retrieves the DPI of the display device to which the Window is connected.<br>
+        /// The DPI property (read-only).<br />
+        /// Retrieves the DPI of the display device to which the Window is connected.<br />
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public Vector2 Dpi
         {
             get
@@ -1376,9 +1541,10 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// The layer count property (read-only).<br>
-        /// Queries the number of on-Window layers.<br>
+        /// The layer count property (read-only).<br />
+        /// Queries the number of on-Window layers.<br />
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public uint LayerCount
         {
             get
@@ -1392,26 +1558,43 @@ namespace Tizen.NUI
         /// Adds a layer to the stage.
         /// </summary>
         /// <param name="layer">Layer to add.</param>
+        /// <since_tizen> 3 </since_tizen>
         public void AddLayer(Layer layer)
         {
             NDalicPINVOKE.Stage_Add(stageCPtr, Layer.getCPtr(layer));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+            LayersChildren.Add(layer);
         }
 
         /// <summary>
         /// Removes a layer from the stage.
         /// </summary>
         /// <param name="layer">Layer to remove.</param>
+        /// <since_tizen> 3 </since_tizen>
         public void RemoveLayer(Layer layer)
         {
             NDalicPINVOKE.Stage_Remove(stageCPtr, Layer.getCPtr(layer));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+            LayersChildren.Remove(layer);
         }
 
-        //Please do not use! this will be deprecated
+        /// <summary>
+        /// Please do not use! this will be deprecated
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        [Obsolete("Please do not use! This will be deprecated! Please use FocusChangedEventArgs instead! " +
+            "Like: " +
+            "Window.Instance.FocusChanged = OnFocusChanged; " +
+            "private void OnFocusChanged(object source, Window.FocusChangedEventArgs args) {...}")]
         [EditorBrowsable(EditorBrowsableState.Never)]
         public class WindowFocusChangedEventArgs : EventArgs
         {
+            /// <summary>
+            /// Please do not use! this will be deprecated
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             public bool FocusGained
             {
                 get;
@@ -1424,7 +1607,17 @@ namespace Tizen.NUI
         private delegate void WindowFocusChangedEventCallbackType2(bool focusGained);
         private event EventHandler<WindowFocusChangedEventArgs> _windowFocusChangedEventHandler2;
 
-        [Obsolete("Please do not use! this will be deprecated. Please use 'FocusChanged' event instead")]
+        /// <summary>
+        /// Please do not use! this will be deprecated. Please use 'FocusChanged' event instead.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// Please do not use! this will be deprecated!
+        /// Instead please use FocusChanged.
+        [Obsolete("Please do not use! This will be deprecated! Please use FocusChanged instead! " +
+            "Like: " +
+            "Window.Instance.FocusChanged = OnFocusChanged; " +
+            "private void OnFocusChanged(object source, Window.FocusChangedEventArgs args) {...}")]
+        [EditorBrowsable(EditorBrowsableState.Never)]
         public event EventHandler<WindowFocusChangedEventArgs> WindowFocusChanged
         {
             add
@@ -1463,6 +1656,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Gets or sets a size of the window.
         /// </summary>
+        /// <since_tizen> 4 </since_tizen>
         public Size2D WindowSize
         {
             get
@@ -1478,6 +1672,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Gets or sets a position of the window.
         /// </summary>
+        /// <since_tizen> 4 </since_tizen>
         public Position2D WindowPosition
         {
             get
@@ -1493,6 +1688,21 @@ namespace Tizen.NUI
         /// <summary>
         /// Feed a key-event into the window.
         /// </summary>
+        /// <param name="keyEvent">The key event to feed.</param>
+        /// <since_tizen> 5 </since_tizen>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void FeedKey(Key keyEvent)
+        {
+            NDalicManualPINVOKE.Window_FeedKeyEvent(Key.getCPtr(keyEvent));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Feed a key-event into the window.
+        /// </summary>
+        /// <param name="keyEvent">The key event to feed.</param>
+        /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! This will be deprecated! Please use FeedKey(Key keyEvent) instead!")]
         public static void FeedKeyEvent(Key keyEvent)
         {
             NDalicManualPINVOKE.Window_FeedKeyEvent(Key.getCPtr(keyEvent));
@@ -1503,11 +1713,48 @@ namespace Tizen.NUI
         /// Allows at least one more render, even when paused.
         /// The window should be shown, not minimised.
         /// </summary>
+        /// <since_tizen> 4 </since_tizen>
         public void RenderOnce()
         {
             NDalicManualPINVOKE.Window_RenderOnce(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
+        /// <summary>
+        /// Contains and encapsulates Native Window handle.
+        /// </summary>
+        /// <since_tizen> 4 </since_tizen>
+        public class SafeNativeWindowHandle : SafeHandle
+        {
+            /// <summary>
+            /// Contructor, Native window handle is set to handle.
+            /// </summary>
+            /// <since_tizen> 4 </since_tizen>
+            public SafeNativeWindowHandle() : base(IntPtr.Zero, false)
+            {
+                SetHandle(Tizen.NUI.Window.Instance.GetNativeWindowHandler());
+            }
+            /// <summary>
+            /// Null check if the handle is valid or not.
+            /// </summary>
+            /// <since_tizen> 4 </since_tizen>
+            public override bool IsInvalid
+            {
+                get
+                {
+                    return this.handle == IntPtr.Zero;
+                }
+            }
+            /// <summary>
+            /// Release handle itself.
+            /// </summary>
+            /// <returns>true when released successfully.</returns>
+            /// <since_tizen> 4 </since_tizen>
+            protected override bool ReleaseHandle()
+            {
+                return true;
+            }
+        }
+
     }
 }