[NUI] change Tizen.NUI.State as Tizen.NUI.NUIApplication.States because it is NUIAppl...
authordongsug.song <dongsug.song@samsung.com>
Tue, 26 Mar 2024 04:44:41 +0000 (13:44 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 26 Mar 2024 04:54:47 +0000 (13:54 +0900)
src/Tizen.NUI/src/public/Application/NUIApplication.cs

index 5219822..b2bf8f5 100755 (executable)
@@ -45,7 +45,7 @@ namespace Tizen.NUI
         private bool borderEnabled = false;
         private IBorderInterface borderInterface = null;
 
-        private State currentState = State.Invalid;
+        private States currentState = States.Invalid;
 
         /// <summary>
         /// Xaml loaded delegate.
@@ -65,7 +65,7 @@ namespace Tizen.NUI
         [SuppressMessage("Microsoft.Design", "CA2000: Dispose objects before losing scope", Justification = "NUICoreBackend is disposed in the base class when the application is terminated")]
         public NUIApplication() : base(new NUICoreBackend())
         {
-            currentState = State.Ready;
+            currentState = States.Ready;
         }
 
         /// <summary>
@@ -79,7 +79,7 @@ namespace Tizen.NUI
         [EditorBrowsable(EditorBrowsableState.Never)]
         public NUIApplication(Size2D windowSize, Position2D windowPosition) : base(new NUICoreBackend("", NUIApplication.WindowMode.Opaque, windowSize, windowPosition))
         {
-            currentState = State.Ready;
+            currentState = States.Ready;
         }
 
         /// <summary>
@@ -90,7 +90,7 @@ namespace Tizen.NUI
         [SuppressMessage("Microsoft.Design", "CA2000: Dispose objects before losing scope", Justification = "NUICoreBackend is disposed in the base class when the application is terminated")]
         public NUIApplication(string styleSheet) : base(new NUICoreBackend(styleSheet))
         {
-            currentState = State.Ready;
+            currentState = States.Ready;
         }
 
         /// <summary>
@@ -105,7 +105,7 @@ namespace Tizen.NUI
         [EditorBrowsable(EditorBrowsableState.Never)]
         public NUIApplication(string styleSheet, Size2D windowSize, Position2D windowPosition) : base(new NUICoreBackend(styleSheet, WindowMode.Opaque, windowSize, windowPosition))
         {
-            currentState = State.Ready;
+            currentState = States.Ready;
         }
 
         /// <summary>
@@ -117,7 +117,7 @@ namespace Tizen.NUI
         [SuppressMessage("Microsoft.Design", "CA2000: Dispose objects before losing scope", Justification = "NUICoreBackend is disposed in the base class when the application is terminated")]
         public NUIApplication(string styleSheet, WindowMode windowMode) : base(new NUICoreBackend(styleSheet, windowMode))
         {
-            currentState = State.Ready;
+            currentState = States.Ready;
         }
 
         /// <summary>
@@ -133,7 +133,7 @@ namespace Tizen.NUI
         [EditorBrowsable(EditorBrowsableState.Never)]
         public NUIApplication(string styleSheet, WindowMode windowMode, Size2D windowSize, Position2D windowPosition) : base(new NUICoreBackend(styleSheet, windowMode, windowSize, windowPosition))
         {
-            currentState = State.Ready;
+            currentState = States.Ready;
         }
 
         /// <summary>
@@ -150,7 +150,7 @@ namespace Tizen.NUI
         public NUIApplication(Graphics.BackendType backend, WindowMode windowMode = WindowMode.Opaque, Size2D windowSize = null, Position2D windowPosition = null, string styleSheet = "") : base(new NUICoreBackend(styleSheet, windowMode, windowSize, windowPosition))
         {
             //windowMode and styleSheet will be added later. currently it's not working as expected.
-            currentState = State.Ready;
+            currentState = States.Ready;
             Graphics.Backend = backend;
             Tizen.Log.Error("NUI", "Plaese DO NOT set graphical backend type with this constructor! This will give no effect!");
         }
@@ -163,7 +163,7 @@ namespace Tizen.NUI
         [SuppressMessage("Microsoft.Design", "CA2000: Dispose objects before losing scope", Justification = "NUICoreBackend is disposed in the base class when the application is terminated")]
         public NUIApplication(ThemeOptions option) : base(new NUICoreBackend())
         {
-            currentState = State.Ready;
+            currentState = States.Ready;
             ApplyThemeOption(option);
         }
 
@@ -177,7 +177,7 @@ namespace Tizen.NUI
         [EditorBrowsable(EditorBrowsableState.Never)]
         public NUIApplication(Size2D windowSize, Position2D windowPosition, ThemeOptions option) : base(new NUICoreBackend("", NUIApplication.WindowMode.Opaque, windowSize, windowPosition))
         {
-            currentState = State.Ready;
+            currentState = States.Ready;
             ApplyThemeOption(option);
         }
 
@@ -192,7 +192,7 @@ namespace Tizen.NUI
         [SuppressMessage("Microsoft.Design", "CA2000: Dispose objects before losing scope", Justification = "NUICoreBackend is disposed in the base class when the application is terminated")]
         public NUIApplication(string styleSheet, WindowMode windowMode, WindowType type) : base(new NUICoreBackend(styleSheet, windowMode, type))
         {
-            currentState = State.Ready;
+            currentState = States.Ready;
             ExternalThemeManager.Initialize();
         }
 
@@ -208,7 +208,7 @@ namespace Tizen.NUI
         [SuppressMessage("Microsoft.Design", "CA2000: Dispose objects before losing scope", Justification = "NUICoreBackend is disposed in the base class when the application is terminated")]
         public NUIApplication(string styleSheet, Size2D windowSize, Position2D windowPosition, IBorderInterface borderInterface, WindowMode windowMode = WindowMode.Opaque) : base(new NUICoreBackend(styleSheet, windowMode, windowSize, windowPosition))
         {
-            currentState = State.Ready;
+            currentState = States.Ready;
             EnableBorder(borderInterface);
         }
 
@@ -221,7 +221,7 @@ namespace Tizen.NUI
         [SuppressMessage("Microsoft.Design", "CA2000: Dispose objects before losing scope", Justification = "NUICoreBackend is disposed in the base class when the application is terminated")]
         public NUIApplication(ThemeOptions option, IBorderInterface borderInterface) : base(new NUICoreBackend())
         {
-            currentState = State.Ready;
+            currentState = States.Ready;
             EnableBorder(borderInterface);
             ApplyThemeOption(option);
         }
@@ -237,7 +237,7 @@ namespace Tizen.NUI
         [EditorBrowsable(EditorBrowsableState.Never)]
         public NUIApplication(Size2D windowSize, Position2D windowPosition, ThemeOptions option, IBorderInterface borderInterface) : base(new NUICoreBackend("", NUIApplication.WindowMode.Opaque, windowSize, windowPosition))
         {
-            currentState = State.Ready;
+            currentState = States.Ready;
             EnableBorder(borderInterface);
             ApplyThemeOption(option);
         }
@@ -262,7 +262,7 @@ namespace Tizen.NUI
         [EditorBrowsable(EditorBrowsableState.Never)]
         public NUIApplication(string styleSheet, WindowMode windowMode, CoreTask task) : base(new NUICoreBackend(styleSheet, windowMode), task)
         {
-            currentState = State.Ready;
+            currentState = States.Ready;
         }
 
         /// <summary>
@@ -277,7 +277,7 @@ namespace Tizen.NUI
         [EditorBrowsable(EditorBrowsableState.Never)]
         public NUIApplication(string styleSheet, WindowMode windowMode, Size2D windowSize, Position2D windowPosition, CoreTask task) : base(new NUICoreBackend(styleSheet, windowMode, windowSize, windowPosition), task)
         {
-            currentState = State.Ready;
+            currentState = States.Ready;
         }
 
         /// <summary>
@@ -289,7 +289,7 @@ namespace Tizen.NUI
         [EditorBrowsable(EditorBrowsableState.Never)]
         public NUIApplication(ThemeOptions option, WindowData windowData) : base(new NUICoreBackend(windowData))
         {
-            currentState = State.Ready;
+            currentState = States.Ready;
             if (windowData.BorderInterface != null)
             {
                 EnableBorder(windowData.BorderInterface);
@@ -430,13 +430,13 @@ namespace Tizen.NUI
         /// </summary>
         // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public State State
+        public States State
         {
             get
             {
                 return currentState;
             }
-        } 
+        }
 
         /// <summary>
         /// Gets the default window.
@@ -601,7 +601,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         protected override void OnTerminate()
         {
-            currentState = State.Terminated;
+            currentState = States.Terminated;
             base.OnTerminate();
         }
 
@@ -611,7 +611,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         protected virtual void OnPause()
         {
-            currentState = State.Paused;
+            currentState = States.Paused;
             Paused?.Invoke(this, EventArgs.Empty);
         }
 
@@ -621,7 +621,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         protected virtual void OnResume()
         {
-            currentState = State.Resumed;
+            currentState = States.Resumed;
             Resumed?.Invoke(this, EventArgs.Empty);
         }
 
@@ -633,7 +633,7 @@ namespace Tizen.NUI
         {
             Tizen.Tracer.Begin("[NUI] OnPreCreate()");
 
-            currentState = State.PreCreated;
+            currentState = States.PreCreated;
             if (borderEnabled && GetDefaultWindow() != null)
             {
                 GetDefaultWindow().EnableBorder(borderInterface, new Window.BorderCloseDelegate(Exit));
@@ -662,7 +662,7 @@ namespace Tizen.NUI
         protected override void OnCreate()
         {
             Tizen.Tracer.Begin("[NUI] OnCreate()");
-            currentState = State.Created;
+            currentState = States.Created;
 
             base.OnCreate();
 
@@ -718,6 +718,57 @@ namespace Tizen.NUI
             borderEnabled = true;
             this.borderInterface = borderInterface;
         }
+
+        /// <summary>
+        /// Enum of Application status
+        /// </summary>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public enum States
+        {
+            /// <summary>
+            /// Invalid
+            /// </summary>
+            // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            Invalid = -1,
+            /// <summary>
+            /// Ready
+            /// </summary>
+            // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            Ready,
+            /// <summary>
+            /// PreCreated
+            /// </summary>
+            // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            PreCreated,
+            /// <summary>
+            /// Created
+            /// </summary>
+            // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            Created,
+            /// <summary>
+            /// Resumed
+            /// </summary>
+            // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            Resumed,
+            /// <summary>
+            /// Paused
+            /// </summary>
+            // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            Paused,
+            /// <summary>
+            /// Terminated
+            /// </summary>
+            // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            Terminated
+        }
     }
 
     /// <summary>
@@ -752,55 +803,4 @@ namespace Tizen.NUI
         internal const string GlesCSharpBinder = NDalicPINVOKE.Lib;
         internal const string VulkanCSharpBinder = "libdali-csharp-binder-vk.so";
     }
-
-    /// <summary>
-    /// Enum of Application status
-    /// </summary>
-    // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
-    [EditorBrowsable(EditorBrowsableState.Never)]
-    public enum State
-    {
-        /// <summary>
-        /// Invalid
-        /// </summary>
-        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        Invalid = -1,
-        /// <summary>
-        /// Ready
-        /// </summary>
-        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        Ready,
-        /// <summary>
-        /// PreCreated
-        /// </summary>
-        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        PreCreated,
-        /// <summary>
-        /// Created
-        /// </summary>
-        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        Created,
-        /// <summary>
-        /// Resumed
-        /// </summary>
-        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        Resumed,
-        /// <summary>
-        /// Paused
-        /// </summary>
-        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        Paused,
-        /// <summary>
-        /// Terminated
-        /// </summary>
-        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        Terminated
-    }
 }