[ACR-564] deprecate unused API
[platform/core/csapi/tizenfx.git] / src / ElmSharp / ElmSharp / Elementary.cs
index cf26c57..7f0de15 100644 (file)
@@ -21,15 +21,67 @@ using System.IO;
 namespace ElmSharp
 {
     /// <summary>
-    /// The Elementary is a General Elementary,a VERY SIMPLE toolkit.
+    /// 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.
+        /// </summary>
+        Show,
+
+        /// <summary>
+        /// Do not show the focused region or item automatically.
+        /// </summary>
+        None,
+
+        /// <summary>
+        /// 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.
+    /// </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
@@ -43,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
@@ -61,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
@@ -76,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
@@ -91,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
@@ -106,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
@@ -119,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
@@ -134,24 +198,48 @@ namespace ElmSharp
         }
 
         /// <summary>
+        /// 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
+            {
+                return (FocusAutoScrollMode)Interop.Elementary.elm_config_focus_autoscroll_mode_get();
+            }
+            set
+            {
+                Interop.Elementary.elm_config_focus_autoscroll_mode_set((Interop.Elementary.Elm_Focus_Autoscroll_Mode)value);
+            }
+        }
+
+        /// <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();
@@ -160,62 +248,80 @@ namespace ElmSharp
         /// <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();
@@ -225,15 +331,18 @@ 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 a scroller imposes during region bring animations.
+        /// Gets the amount of inertia that a scroller imposes during region to bring animations.
         /// </summary>
-        /// <returns>The bring in scroll friction</returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static double GetSystemScrollFriction()
         {
@@ -241,19 +350,22 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Sets the amount of inertia a scroller imposes during region bring animations.
+        /// Sets the amount of inertia that a scroller imposes during the region bring animations.
         /// </summary>
-        /// <param name="timeSet">The bring in scroll friction</param>
+        /// <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 Elementary's profile in use.
+        /// Gets the elementary's profile in use.
         /// </summary>
-        /// <returns>The profile name</returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static string GetProfile()
         {
@@ -262,9 +374,9 @@ namespace ElmSharp
 
         /// <summary>
         /// Sets the global scaling factor.
-        /// This sets the globally configured scaling factor that is applied to all objects.
         /// </summary>
-        /// <param name="scale">The scaling factor to set</param>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static void SetScale(double scale)
         {
@@ -273,9 +385,9 @@ namespace ElmSharp
 
         /// <summary>
         /// Gets the global scaling factor.
-        /// This gets the globally configured scaling factor that is applied to all objects.
         /// </summary>
-        /// <returns>The scaling factor</returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static double GetScale()
         {
@@ -283,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);
@@ -303,28 +429,35 @@ 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();
         }
     }
-}
\ No newline at end of file
+}