[ACR-564] deprecate unused API
[platform/core/csapi/tizenfx.git] / src / ElmSharp / ElmSharp / Elementary.cs
index 7984f83..7f0de15 100644 (file)
@@ -21,34 +21,67 @@ using System.IO;
 namespace ElmSharp
 {
     /// <summary>
-    /// Focus Autoscroll Mode
+    /// Focus Autoscroll mode.
     /// </summary>
+    /// <since_tizen> preview </since_tizen>
+    [Obsolete("This has been deprecated in API12")]
     public enum FocusAutoScrollMode
     {
         /// <summary>
-        /// Directly show the focused region or item automatically
+        /// Directly show the focused region or item automatically.
         /// </summary>
         Show,
+
         /// <summary>
-        /// Do not show the focused region or item automatically
+        /// Do not show the focused region or item automatically.
         /// </summary>
         None,
+
         /// <summary>
-        /// Bring in the focused region or item automatically which might invole the scrolling
+        /// Bring in the focused region or item automatically, which might involve the scrolling.
         /// </summary>
         BringIn
     }
 
     /// <summary>
-    /// The Elementary is a General Elementary,a VERY SIMPLE toolkit.
+    /// The Elementary is a general elementary, a VERY SIMPLE toolkit.
     /// </summary>
+    /// <since_tizen> preview </since_tizen>
+    [Obsolete("This has been deprecated in API12")]
     public static class Elementary
     {
-        private static readonly string _themeFilePath = "/usr/share/elm-sharp/elm-sharp-theme.edj";
+        private const string _themeFilePath = "/usr/share/elm-sharp/elm-sharp-theme.edj";
+        private const string _tvThemeFilePath = "/usr/share/elm-sharp/vd-elm-sharp-theme.edj";
+
+        /// <summary>
+        /// EvasObjectRealized will be triggered when the EvasObject is realized.
+        /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
+        public static event EventHandler EvasObjectRealized;
+
+        /// <summary>
+        /// ItemObjectRealized will be triggered when the ItemObject is realized.
+        /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
+        public static event EventHandler ItemObjectRealized;
+
+        internal static void SendEvasObjectRealized(EvasObject obj)
+        {
+            EvasObjectRealized?.Invoke(obj, EventArgs.Empty);
+        }
+
+        internal static void SendItemObjectRealized(ItemObject obj)
+        {
+            ItemObjectRealized?.Invoke(obj, EventArgs.Empty);
+        }
 
         /// <summary>
         /// Gets or sets the configured finger size.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static int FingerSize
         {
             get
@@ -62,8 +95,10 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Gets or sets the enable status of the focus highlight animation
+        /// Gets or sets the enable status of the focus highlight animation.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static bool IsFocusHighlightAnimation
         {
             get
@@ -80,6 +115,8 @@ namespace ElmSharp
         /// Gets or sets the system mirrored mode.
         /// This determines the default mirrored mode of widgets.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static bool IsMirrored
         {
             get
@@ -95,6 +132,8 @@ namespace ElmSharp
         /// <summary>
         /// Gets or sets the enable status of the focus highlight.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static bool CanFocusHighlight
         {
             get
@@ -110,6 +149,8 @@ namespace ElmSharp
         /// <summary>
         /// Gets or sets the base scale of the application.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static double AppBaseScale
         {
             get
@@ -125,6 +166,8 @@ namespace ElmSharp
         /// <summary>
         /// Gets or sets the global scaling factor.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static double Scale
         {
             get
@@ -138,8 +181,10 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Gets or sets the amount of inertia a scroller imposes during region bring animations.
+        /// Gets or sets the amount of inertia, a scroller imposes during a region to bring animations.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static double BringInScrollFriction
         {
             get
@@ -153,8 +198,10 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Gets of sets focus auto scroll mode.
+        /// Gets or sets the focus on autoscroll mode.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static FocusAutoScrollMode FocusAutoScrollMode
         {
             get
@@ -170,83 +217,111 @@ namespace ElmSharp
         /// <summary>
         /// Initializes Elementary.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static void Initialize()
         {
-            Interop.Elementary.elm_init(0, null);
+            if (!Window.IsPreloaded)
+                Interop.Elementary.elm_init(0, null);
         }
 
         /// <summary>
         /// Shuts down Elementary.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static void Shutdown()
         {
             Interop.Elementary.elm_shutdown();
         }
 
         /// <summary>
-        /// Runs Elementary's main loop.
+        /// Runs the elementary's main loop.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static void Run()
         {
             Interop.Elementary.elm_run();
         }
 
+        /// <summary>
+        /// Prepends a theme overlay to the list of overlays.
+        /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static void ThemeOverlay()
         {
-            if (File.Exists(_themeFilePath))
+            if (!Window.IsPreloaded)
             {
-                AddThemeOverlay(_themeFilePath);
+                if (File.Exists(_themeFilePath))
+                    AddThemeOverlay(_themeFilePath);
+
+                if (Elementary.GetProfile() == "tv" && File.Exists(_tvThemeFilePath))
+                    AddThemeOverlay(_tvThemeFilePath);
             }
         }
 
         /// <summary>
-        /// Prepends a theme overlay to the list of overlays
+        /// Prepends a theme overlay to the list of overlays.
         /// </summary>
-        /// <param name="filePath">The Edje file path to be used.</param>
+        /// <param name="filePath">The edje file path to be used.</param>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static void AddThemeOverlay(string filePath)
         {
             Interop.Elementary.elm_theme_overlay_add(IntPtr.Zero, filePath);
         }
 
         /// <summary>
-        /// Delete a theme overlay from the list of overlays
+        /// Deletes a theme overlay from the list of overlays.
         /// </summary>
         /// <param name="filePath">The name of the theme overlay.</param>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static void DeleteThemeOverlay(string filePath)
         {
             Interop.Elementary.elm_theme_overlay_del(IntPtr.Zero, filePath);
         }
 
         /// <summary>
-        /// Free a theme
+        /// Frees a theme.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static void FreeTheme()
         {
             Interop.Elementary.elm_theme_free(IntPtr.Zero);
         }
 
         /// <summary>
-        /// Set the theme search order for the given theme
+        /// Sets the theme search order for the given theme.
         /// </summary>
-        /// <param name="theme">Theme search string</param>
-        /// <remarks>This sets the search string for the theme in path-notation from first theme to search, to last, delimited by the : character. Example:"shiny:/path/to/file.edj:default"</remarks>
+        /// <param name="theme">Theme search string.</param>
+        /// <remarks>This sets the search string for the theme in path-notation from the first theme to search, to last, delimited by the : character. For example, "shiny:/path/to/file.edj:default".</remarks>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static void SetTheme(string theme)
         {
             Interop.Elementary.elm_theme_set(IntPtr.Zero, theme);
         }
 
         /// <summary>
-        /// Flush the current theme.
+        /// Flushes the current theme.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static void FlushTheme()
         {
             Interop.Elementary.elm_theme_flush(IntPtr.Zero);
         }
 
         /// <summary>
-        /// This flushes all themes (default and specific ones).
+        /// This flushes all the themes (default and specific ones).
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static void FlushAllThemes()
         {
             Interop.Elementary.elm_theme_full_flush();
@@ -256,35 +331,63 @@ namespace ElmSharp
         /// Deletes a theme extension from the list of extensions.
         /// </summary>
         /// <param name="item">The name of the theme extension.</param>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static void DeleteThemeExtention(string item)
         {
             Interop.Elementary.elm_theme_extension_del(IntPtr.Zero, item);
         }
 
+        /// <summary>
+        /// Gets the amount of inertia that a scroller imposes during region to bring animations.
+        /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static double GetSystemScrollFriction()
         {
             return BringInScrollFriction;
         }
 
+        /// <summary>
+        /// Sets the amount of inertia that a scroller imposes during the region bring animations.
+        /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static void SetSystemScrollFriction(double timeSet)
+
         {
             BringInScrollFriction = timeSet;
         }
 
+        /// <summary>
+        /// Gets the elementary's profile in use.
+        /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static string GetProfile()
         {
             return Interop.Elementary.elm_config_profile_get();
         }
 
+        /// <summary>
+        /// Sets the global scaling factor.
+        /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static void SetScale(double scale)
         {
             Scale = scale;
         }
 
+        /// <summary>
+        /// Gets the global scaling factor.
+        /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static double GetScale()
         {
@@ -292,18 +395,32 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Flush all caches.
-        /// Frees all data that was in cache and is not currently being used to reduce memory usage. This frees Edje's, Evas' and Eet's cache.
+        /// Use FlushAllCache instead.
         /// </summary>
+        [Obsolete("use FlushAllCache instead")]
+        [EditorBrowsable(EditorBrowsableState.Never)]
         public static void FlushAllCashe()
         {
             Interop.Elementary.elm_cache_all_flush();
         }
 
         /// <summary>
+        /// Flushes all the cache.
+        /// Frees all data that was in cache and is not currently being used, to reduce memory usage. This frees Edje's, Evas', and Eet's cache.
+        /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
+        public static void FlushAllCache()
+        {
+            Interop.Elementary.elm_cache_all_flush();
+        }
+
+        /// <summary>
         /// Changes the language of the current application.
         /// </summary>
-        /// <param name="language">The language to set, must be the full name of the locale.</param>
+        /// <param name="language">The language to set must be the full name of the locale.</param>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static void SetLanguage(string language)
         {
             Interop.Elementary.elm_language_set(language);
@@ -312,25 +429,32 @@ namespace ElmSharp
         /// <summary>
         /// Sets a new policy's value (for a given policy group/identifier).
         /// </summary>
-        /// <param name="policy">The policy identifier</param>
-        /// <param name="value">The policy value, which depends on the identifier</param>
+        /// <param name="policy">The policy identifier.</param>
+        /// <param name="value">The policy value, which depends on the identifier.</param>
         /// <returns></returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static bool SetPolicy(uint policy, int value)
         {
             return Interop.Elementary.elm_policy_set(policy, value);
         }
 
         /// <summary>
-        /// Reloads Elementary's configuration, bounded to the current selected profile.
+        /// Reloads the elementary's configuration, bounded to the current selected profile.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
+        [EditorBrowsable(EditorBrowsableState.Never)]
         public static void ReloadConfig()
         {
             Interop.Elementary.elm_config_reload();
         }
 
         /// <summary>
-        /// Flushes all config settings and then applies those settings to all applications using elementary on the current display.
+        /// Flushes all the configuration settings, and then applies those settings to all applications using elementary on the current display.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static void FlushAllConfig()
         {
             Interop.Elementary.elm_config_all_flush();