sync with tizen branch to finalize API
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Window.cs
index 9718abd..24c5fbe 100755 (executable)
 * limitations under the License.
 *
 */
-// This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
-//------------------------------------------------------------------------------
-// <auto-generated />
-//
-// This file was automatically generated by SWIG (http://www.swig.org).
-// Version 3.0.9
-//
-// Do not make changes to this file unless you know what you are doing--modify
-// the SWIG interface file instead.
-//------------------------------------------------------------------------------
 
 namespace Tizen.NUI
 {
@@ -103,19 +93,15 @@ namespace Tizen.NUI
             return ret;
        }
 
-        /// <summary>
-        /// Sets the focus acceptable flag of an window as true.
-        /// </summary>
-        internal void SetAcceptFocus(bool accept)
+        [Obsolete("Please do not use! this will be internal method")]
+        public void SetAcceptFocus(bool accept)
         {
             NDalicPINVOKE.SetAcceptFocus(swigCPtr, accept);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        /// <summary>
-        /// Retrieves whether the window is focus acceptable or not.
-        /// </summary>
-        internal bool IsFocusAcceptable()
+        [Obsolete("Please do not use! this will be internal method")]
+        public bool IsFocusAcceptable()
         {
             return NDalicPINVOKE.IsFocusAcceptable(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -519,21 +505,13 @@ namespace Tizen.NUI
             return this.GetRootLayer();
         }
 
-        /// <summary>
-        /// Add layer to the Stage.
-        /// </summary>
-        /// <param name="layer">Layer to add</param>
-        public void Add(Layer layer)
+        internal void Add(Layer layer)
         {
             NDalicPINVOKE.Stage_Add(stageCPtr, Layer.getCPtr(layer));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        /// <summary>
-        /// Remove layer from the Stage.
-        /// </summary>
-        /// <param name="layer">Layer to remove</param>
-        public void Remove(Layer layer)
+        internal void Remove(Layer layer)
         {
             NDalicPINVOKE.Stage_Remove(stageCPtr, Layer.getCPtr(layer));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -841,7 +819,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Touch event argument.
         /// </summary>
-        public class TouchedEventArgs : EventArgs
+        public class TouchEventArgs : EventArgs
         {
             private Touch _touch;
 
@@ -861,7 +839,7 @@ namespace Tizen.NUI
             }
         }
 
-        private event EventHandler<TouchedEventArgs> _stageTouchHandler;
+        private event EventHandler<TouchEventArgs> _stageTouchHandler;
         private EventCallbackDelegateType1 _stageTouchCallbackDelegate;
 
         /// <summary>
@@ -870,7 +848,7 @@ namespace Tizen.NUI
         /// then when the last finger is lifted.<br>
         /// An interrupted event will also be emitted (if it occurs).<br>
         /// </summary>
-        public event EventHandler<TouchedEventArgs> Touched
+        public event EventHandler<TouchEventArgs> TouchEvent
         {
             add
             {
@@ -896,7 +874,7 @@ namespace Tizen.NUI
 
         private void OnStageTouch(IntPtr data)
         {
-            TouchedEventArgs e = new TouchedEventArgs();
+            TouchEventArgs e = new TouchEventArgs();
 
             if (data != null)
             {
@@ -912,7 +890,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Wheel event arguments.
         /// </summary>
-        public class WheelRolledEventArgs : EventArgs
+        public class WheelEventArgs : EventArgs
         {
             private Wheel _wheel;
 
@@ -932,13 +910,13 @@ namespace Tizen.NUI
             }
         }
 
-        private event EventHandler<WheelRolledEventArgs> _stageWheelHandler;
+        private event EventHandler<WheelEventArgs> _stageWheelHandler;
         private EventCallbackDelegateType1 _stageWheelCallbackDelegate;
 
         /// <summary>
         /// Event emitted when wheel event is received.
         /// </summary>
-        public event EventHandler<WheelRolledEventArgs> WheelRolled
+        public event EventHandler<WheelEventArgs> WheelEvent
         {
             add
             {
@@ -961,7 +939,7 @@ namespace Tizen.NUI
 
         private void OnStageWheel(IntPtr data)
         {
-            WheelRolledEventArgs e = new WheelRolledEventArgs();
+            WheelEventArgs e = new WheelEventArgs();
 
             if (data != null)
             {
@@ -1003,7 +981,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Event emitted when key event is received.
         /// </summary>
-        public event EventHandler<KeyEventArgs> KeyPressed
+        public event EventHandler<KeyEventArgs> KeyEvent
         {
             add
             {
@@ -1299,5 +1277,81 @@ namespace Tizen.NUI
                 return GetLayerCount();
             }
         }
+
+
+        /// <summary>
+        /// Add layer to the Stage.
+        /// </summary>
+        /// <param name="layer">Layer to add</param>
+        public void AddLayer(Layer layer)
+        {
+            NDalicPINVOKE.Stage_Add(stageCPtr, Layer.getCPtr(layer));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Remove layer from the Stage.
+        /// </summary>
+        /// <param name="layer">Layer to remove</param>
+        public void RemoveLayer(Layer layer)
+        {
+            NDalicPINVOKE.Stage_Remove(stageCPtr, Layer.getCPtr(layer));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        [Obsolete("Please do not use! this will be deprecated")]
+        public class WindowFocusChangedEventArgs : EventArgs
+        {
+            public bool FocusGained
+            {
+                get;
+                set;
+            }
+        }
+
+        private WindowFocusChangedEventCallbackType _windowFocusChangedEventCallback2;
+        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+        private delegate void WindowFocusChangedEventCallbackType2(bool focusGained);
+        private event EventHandler<WindowFocusChangedEventArgs> _windowFocusChangedEventHandler2;
+
+        [Obsolete("Please do not use! this will be deprecated")]
+        public event EventHandler<WindowFocusChangedEventArgs> WindowFocusChanged
+        {
+            add
+            {
+                if (_windowFocusChangedEventHandler2 == null)
+                {
+                    _windowFocusChangedEventCallback2 = OnWindowFocusedChanged2;
+                    WindowFocusChangedSignal().Connect(_windowFocusChangedEventCallback2);
+                }
+
+                _windowFocusChangedEventHandler2 += value;
+            }
+            remove
+            {
+                _windowFocusChangedEventHandler2 -= value;
+
+                if (_windowFocusChangedEventHandler2 == null && WindowFocusChangedSignal().Empty() == false && _windowFocusChangedEventCallback2 != null)
+                {
+                    WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback2);
+                }
+            }
+        }
+
+        private void OnWindowFocusedChanged2(bool focusGained)
+        {
+            WindowFocusChangedEventArgs e = new WindowFocusChangedEventArgs();
+
+            e.FocusGained = focusGained;
+
+            if (_windowFocusChangedEventHandler2 != null)
+            {
+                _windowFocusChangedEventHandler2(this, e);
+            }
+        }
+
+
+
+
     }
 }