Merge "Add C# binding for VideoView.Underlay property."
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / NUIApplication.cs
index 32f9950..b1d888b 100755 (executable)
 using System;
 using Tizen.Applications;
 using Tizen.Applications.CoreBackend;
-using Tizen.NUI;
 
 namespace Tizen.NUI
 {
 
     /// <summary>
-    /// Represents an application that have UI screen. The NUIApplication class has a default stage.
+    /// Represents an application that have UI screen. The NUIApplication class has a default stage.
     /// </summary>
     public class NUIApplication : CoreApplication
     {
         /// <summary>
         /// Occurs whenever the application is resumed.
         /// </summary>
+        /// <since_tizen> 4 </since_tizen>
         public event EventHandler Resumed;
 
         /// <summary>
         /// Occurs whenever the application is paused.
         /// </summary>
+        /// <since_tizen> 4 </since_tizen>
         public event EventHandler Paused;
 
         /// <summary>
@@ -46,125 +47,122 @@ namespace Tizen.NUI
         /// <summary>
         /// The default constructor.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public NUIApplication() : base(new NUICoreBackend())
         {
         }
 
         /// <summary>
-        /// The constructor with stylesheet.
+        /// The constructor with stylesheet.
         /// </summary>
-        public NUIApplication(string stylesheet) : base(new NUICoreBackend(stylesheet))
+        /// <param name="styleSheet">The styleSheet url.</param>
+        /// <since_tizen> 3 </since_tizen>
+        public NUIApplication(string styleSheet) : base(new NUICoreBackend(styleSheet))
         {
         }
 
         /// <summary>
-        /// The constructor with stylesheet and window mode.
+        /// The constructor with stylesheet and window mode.
         /// </summary>
-        public NUIApplication(string stylesheet, WindowMode windowMode) : base(new NUICoreBackend(stylesheet,windowMode))
+        /// <param name="styleSheet">The styleSheet url.</param>
+        /// <param name="windowMode">The windowMode.</param>
+        /// <since_tizen> 3 </since_tizen>
+        public NUIApplication(string styleSheet, WindowMode windowMode) : base(new NUICoreBackend(styleSheet, windowMode))
         {
         }
 
         /// <summary>
-        /// Overrides this method if want to handle behavior.
+        /// Overrides this method if you want to handle behavior.
         /// </summary>
         protected override void OnLocaleChanged(LocaleChangedEventArgs e)
         {
-            Log.Debug("NUI", "OnLocaleChanged() is called!");
             base.OnLocaleChanged(e);
         }
 
         /// <summary>
-        /// Overrides this method if want to handle behavior.
+        /// Overrides this method if you want to handle behavior.
         /// </summary>
         protected override void OnLowBattery(LowBatteryEventArgs e)
         {
-            Log.Debug("NUI", "OnLowBattery() is called!");
             base.OnLowBattery(e);
         }
 
         /// <summary>
-        /// Overrides this method if want to handle behavior.
+        /// Overrides this method if you want to handle behavior.
         /// </summary>
         protected override void OnLowMemory(LowMemoryEventArgs e)
         {
-            Log.Debug("NUI", "OnLowMemory() is called!");
             base.OnLowMemory(e);
         }
 
         /// <summary>
-        /// Overrides this method if want to handle behavior.
+        /// Overrides this method if you want to handle behavior.
         /// </summary>
         protected override void OnRegionFormatChanged(RegionFormatChangedEventArgs e)
         {
-            Log.Debug("NUI", "OnRegionFormatChanged() is called!");
             base.OnRegionFormatChanged(e);
         }
 
         /// <summary>
-        /// Overrides this method if want to handle behavior.
+        /// Overrides this method if you want to handle behavior.
         /// </summary>
         protected override void OnTerminate()
         {
-            Log.Debug("NUI", "OnTerminate() is called!");
             base.OnTerminate();
         }
 
         /// <summary>
-        /// Overrides this method if want to handle behavior.
+        /// Overrides this method if you want to handle behavior.
         /// </summary>
         protected virtual void OnPause()
         {
-            Log.Debug("NUI", "OnPause() is called!");
             Paused?.Invoke(this, EventArgs.Empty);
         }
 
         /// <summary>
-        /// Overrides this method if want to handle behavior.
+        /// Overrides this method if you want to handle behavior.
         /// </summary>
         protected virtual void OnResume()
         {
-            Log.Debug("NUI", "OnResume() is called!");
             Resumed?.Invoke(this, EventArgs.Empty);
         }
 
         /// <summary>
-        /// Overrides this method if want to handle behavior.
+        /// Overrides this method if you want to handle behavior.
         /// </summary>
         protected virtual void OnPreCreate()
         {
-            Log.Debug("NUI", "OnPreCreate() is called!");
         }
 
         /// <summary>
-        /// Overrides this method if want to handle behavior.
+        /// Overrides this method if you want to handle behavior.
         /// </summary>
         protected override void OnAppControlReceived(AppControlReceivedEventArgs e)
         {
-            Log.Debug("NUI", "OnAppControlReceived() is called!");
             if (e != null)
             {
-                Log.Debug("NUI", "OnAppControlReceived() is called! ApplicationId=" + e.ReceivedAppControl.ApplicationId);
-                Log.Debug("NUI", "CallerApplicationId=" + e.ReceivedAppControl.CallerApplicationId + "   IsReplyRequest=" + e.ReceivedAppControl.IsReplyRequest);
+                Log.Info("NUI", "OnAppControlReceived() is called! ApplicationId=" + e.ReceivedAppControl.ApplicationId);
+                Log.Info("NUI", "CallerApplicationId=" + e.ReceivedAppControl.CallerApplicationId + "   IsReplyRequest=" + e.ReceivedAppControl.IsReplyRequest);
             }
             base.OnAppControlReceived(e);
         }
 
         /// <summary>
-        /// Overrides this method if want to handle behavior.
+        /// Overrides this method if you want to handle behavior.
         /// </summary>
         protected override void OnCreate()
         {
             // This is also required to create DisposeQueue on main thread.
             DisposeQueue disposeQ = DisposeQueue.Instance;
             disposeQ.Initialize();
-            Log.Debug("NUI","OnCreate() is called!");
             base.OnCreate();
         }
 
         /// <summary>
-        /// Run NUIApplication.
+        /// Runs the NUIApplication.
         /// </summary>
         /// <param name="args">Arguments from commandline.</param>
+        /// <since_tizen> 4 </since_tizen>
         public override void Run(string[] args)
         {
             Backend.AddEventHandler(EventType.PreCreated, OnPreCreate);
@@ -174,19 +172,40 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Exit NUIApplication.
+        /// Exits the NUIApplication.
         /// </summary>
+        /// <since_tizen> 4 </since_tizen>
         public override void Exit()
         {
             base.Exit();
         }
 
         /// <summary>
+        /// Ensures that the function passed in is called from the main loop when it is idle.
+        /// </summary>
+        /// <param name="func">The function to call</param>
+        /// <returns>true if added successfully, false otherwise</returns>
+        /// <since_tizen> 4 </since_tizen>
+        public bool AddIdle(System.Delegate func)
+        {
+            return ((NUICoreBackend)this.Backend).AddIdle(func);
+        }
+
+        /// <summary>
         /// Enumeration for deciding whether a NUI application window is opaque or transparent.
         /// </summary>
+        /// <since_tizen> 3 </since_tizen>
         public enum WindowMode
         {
+            /// <summary>
+            /// Opaque
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             Opaque = 0,
+            /// <summary>
+            /// Transparent
+            /// </summary>
+            /// <since_tizen> 3 </since_tizen>
             Transparent = 1
         }
 
@@ -200,8 +219,9 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// ResourceManager to handle multilingual
+        /// ResourceManager to handle multilingual.
         /// </summary>
+        /// <since_tizen> 4 </since_tizen>
         public static System.Resources.ResourceManager MultilingualResourceManager
         {
             get
@@ -215,7 +235,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Get the window instance.
+        /// Gets the window instance.
         /// </summary>
         [Obsolete("Please do not use! this will be deprecated")]
         public Window Window
@@ -226,4 +246,4 @@ namespace Tizen.NUI
             }
         }
     }
-}
+}
\ No newline at end of file