X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FElmSharp%2FElmSharp%2FElementary.cs;h=7f0de15aabbe11e41d88032527ccf951b775a4e3;hb=58283d6a09a7f531af61ae7b27b574603ef244df;hp=cf26c57d76d23d0d708f8717e1f0bb857674b381;hpb=a420387f7ca1f994a933db4c8dd960dad9ea18cb;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git diff --git a/src/ElmSharp/ElmSharp/Elementary.cs b/src/ElmSharp/ElmSharp/Elementary.cs index cf26c57..7f0de15 100644 --- a/src/ElmSharp/ElmSharp/Elementary.cs +++ b/src/ElmSharp/ElmSharp/Elementary.cs @@ -21,15 +21,67 @@ using System.IO; namespace ElmSharp { /// - /// The Elementary is a General Elementary,a VERY SIMPLE toolkit. + /// Focus Autoscroll mode. /// + /// preview + [Obsolete("This has been deprecated in API12")] + public enum FocusAutoScrollMode + { + /// + /// Directly show the focused region or item automatically. + /// + Show, + + /// + /// Do not show the focused region or item automatically. + /// + None, + + /// + /// Bring in the focused region or item automatically, which might involve the scrolling. + /// + BringIn + } + + /// + /// The Elementary is a general elementary, a VERY SIMPLE toolkit. + /// + /// preview + [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"; + + /// + /// EvasObjectRealized will be triggered when the EvasObject is realized. + /// + /// preview + [Obsolete("This has been deprecated in API12")] + public static event EventHandler EvasObjectRealized; + + /// + /// ItemObjectRealized will be triggered when the ItemObject is realized. + /// + /// preview + [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); + } /// /// Gets or sets the configured finger size. /// + /// preview + [Obsolete("This has been deprecated in API12")] public static int FingerSize { get @@ -43,8 +95,10 @@ namespace ElmSharp } /// - /// Gets or sets the enable status of the focus highlight animation + /// Gets or sets the enable status of the focus highlight animation. /// + /// preview + [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. /// + /// preview + [Obsolete("This has been deprecated in API12")] public static bool IsMirrored { get @@ -76,6 +132,8 @@ namespace ElmSharp /// /// Gets or sets the enable status of the focus highlight. /// + /// preview + [Obsolete("This has been deprecated in API12")] public static bool CanFocusHighlight { get @@ -91,6 +149,8 @@ namespace ElmSharp /// /// Gets or sets the base scale of the application. /// + /// preview + [Obsolete("This has been deprecated in API12")] public static double AppBaseScale { get @@ -106,6 +166,8 @@ namespace ElmSharp /// /// Gets or sets the global scaling factor. /// + /// preview + [Obsolete("This has been deprecated in API12")] public static double Scale { get @@ -119,8 +181,10 @@ namespace ElmSharp } /// - /// 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. /// + /// preview + [Obsolete("This has been deprecated in API12")] public static double BringInScrollFriction { get @@ -134,24 +198,48 @@ namespace ElmSharp } /// + /// Gets or sets the focus on autoscroll mode. + /// + /// preview + [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); + } + } + + /// /// Initializes Elementary. /// + /// preview + [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); } /// /// Shuts down Elementary. /// + /// preview + [Obsolete("This has been deprecated in API12")] public static void Shutdown() { Interop.Elementary.elm_shutdown(); } /// - /// Runs Elementary's main loop. + /// Runs the elementary's main loop. /// + /// preview + [Obsolete("This has been deprecated in API12")] public static void Run() { Interop.Elementary.elm_run(); @@ -160,62 +248,80 @@ namespace ElmSharp /// /// Prepends a theme overlay to the list of overlays. /// + /// preview + [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); } } /// - /// Prepends a theme overlay to the list of overlays + /// Prepends a theme overlay to the list of overlays. /// - /// The Edje file path to be used. + /// The edje file path to be used. + /// preview + [Obsolete("This has been deprecated in API12")] public static void AddThemeOverlay(string filePath) { Interop.Elementary.elm_theme_overlay_add(IntPtr.Zero, filePath); } /// - /// Delete a theme overlay from the list of overlays + /// Deletes a theme overlay from the list of overlays. /// /// The name of the theme overlay. + /// preview + [Obsolete("This has been deprecated in API12")] public static void DeleteThemeOverlay(string filePath) { Interop.Elementary.elm_theme_overlay_del(IntPtr.Zero, filePath); } /// - /// Free a theme + /// Frees a theme. /// + /// preview + [Obsolete("This has been deprecated in API12")] public static void FreeTheme() { Interop.Elementary.elm_theme_free(IntPtr.Zero); } /// - /// Set the theme search order for the given theme + /// Sets the theme search order for the given theme. /// - /// Theme search string - /// 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" + /// Theme search string. + /// 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". + /// preview + [Obsolete("This has been deprecated in API12")] public static void SetTheme(string theme) { Interop.Elementary.elm_theme_set(IntPtr.Zero, theme); } /// - /// Flush the current theme. + /// Flushes the current theme. /// + /// preview + [Obsolete("This has been deprecated in API12")] public static void FlushTheme() { Interop.Elementary.elm_theme_flush(IntPtr.Zero); } /// - /// This flushes all themes (default and specific ones). + /// This flushes all the themes (default and specific ones). /// + /// preview + [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. /// /// The name of the theme extension. + /// preview + [Obsolete("This has been deprecated in API12")] public static void DeleteThemeExtention(string item) { Interop.Elementary.elm_theme_extension_del(IntPtr.Zero, item); } /// - /// 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. /// - /// The bring in scroll friction + /// preview + [Obsolete("This has been deprecated in API12")] [EditorBrowsable(EditorBrowsableState.Never)] public static double GetSystemScrollFriction() { @@ -241,19 +350,22 @@ namespace ElmSharp } /// - /// 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. /// - /// The bring in scroll friction + /// preview + [Obsolete("This has been deprecated in API12")] [EditorBrowsable(EditorBrowsableState.Never)] public static void SetSystemScrollFriction(double timeSet) + { BringInScrollFriction = timeSet; } /// - /// Gets Elementary's profile in use. + /// Gets the elementary's profile in use. /// - /// The profile name + /// preview + [Obsolete("This has been deprecated in API12")] [EditorBrowsable(EditorBrowsableState.Never)] public static string GetProfile() { @@ -262,9 +374,9 @@ namespace ElmSharp /// /// Sets the global scaling factor. - /// This sets the globally configured scaling factor that is applied to all objects. /// - /// The scaling factor to set + /// preview + [Obsolete("This has been deprecated in API12")] [EditorBrowsable(EditorBrowsableState.Never)] public static void SetScale(double scale) { @@ -273,9 +385,9 @@ namespace ElmSharp /// /// Gets the global scaling factor. - /// This gets the globally configured scaling factor that is applied to all objects. /// - /// The scaling factor + /// preview + [Obsolete("This has been deprecated in API12")] [EditorBrowsable(EditorBrowsableState.Never)] public static double GetScale() { @@ -283,18 +395,32 @@ namespace ElmSharp } /// - /// 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. /// + [Obsolete("use FlushAllCache instead")] + [EditorBrowsable(EditorBrowsableState.Never)] public static void FlushAllCashe() { Interop.Elementary.elm_cache_all_flush(); } /// + /// 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. + /// + /// preview + [Obsolete("This has been deprecated in API12")] + public static void FlushAllCache() + { + Interop.Elementary.elm_cache_all_flush(); + } + + /// /// Changes the language of the current application. /// - /// The language to set, must be the full name of the locale. + /// The language to set must be the full name of the locale. + /// preview + [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 /// /// Sets a new policy's value (for a given policy group/identifier). /// - /// The policy identifier - /// The policy value, which depends on the identifier + /// The policy identifier. + /// The policy value, which depends on the identifier. /// + /// preview + [Obsolete("This has been deprecated in API12")] public static bool SetPolicy(uint policy, int value) { return Interop.Elementary.elm_policy_set(policy, value); } /// - /// Reloads Elementary's configuration, bounded to the current selected profile. + /// Reloads the elementary's configuration, bounded to the current selected profile. /// + /// preview + [Obsolete("This has been deprecated in API12")] + [EditorBrowsable(EditorBrowsableState.Never)] public static void ReloadConfig() { Interop.Elementary.elm_config_reload(); } /// - /// 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. /// + /// preview + [Obsolete("This has been deprecated in API12")] public static void FlushAllConfig() { Interop.Elementary.elm_config_all_flush(); } } -} \ No newline at end of file +}