2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.ComponentModel;
24 /// Focus Autoscroll mode.
26 /// <since_tizen> preview </since_tizen>
27 [Obsolete("This has been deprecated in API12")]
28 public enum FocusAutoScrollMode
31 /// Directly show the focused region or item automatically.
36 /// Do not show the focused region or item automatically.
41 /// Bring in the focused region or item automatically, which might involve the scrolling.
47 /// The Elementary is a general elementary, a VERY SIMPLE toolkit.
49 /// <since_tizen> preview </since_tizen>
50 [Obsolete("This has been deprecated in API12")]
51 public static class Elementary
53 private const string _themeFilePath = "/usr/share/elm-sharp/elm-sharp-theme.edj";
54 private const string _tvThemeFilePath = "/usr/share/elm-sharp/vd-elm-sharp-theme.edj";
57 /// EvasObjectRealized will be triggered when the EvasObject is realized.
59 /// <since_tizen> preview </since_tizen>
60 [Obsolete("This has been deprecated in API12")]
61 public static event EventHandler EvasObjectRealized;
64 /// ItemObjectRealized will be triggered when the ItemObject is realized.
66 /// <since_tizen> preview </since_tizen>
67 [Obsolete("This has been deprecated in API12")]
68 public static event EventHandler ItemObjectRealized;
70 internal static void SendEvasObjectRealized(EvasObject obj)
72 EvasObjectRealized?.Invoke(obj, EventArgs.Empty);
75 internal static void SendItemObjectRealized(ItemObject obj)
77 ItemObjectRealized?.Invoke(obj, EventArgs.Empty);
81 /// Gets or sets the configured finger size.
83 /// <since_tizen> preview </since_tizen>
84 [Obsolete("This has been deprecated in API12")]
85 public static int FingerSize
89 return Interop.Elementary.elm_config_finger_size_get();
93 Interop.Elementary.elm_config_finger_size_set(value);
98 /// Gets or sets the enable status of the focus highlight animation.
100 /// <since_tizen> preview </since_tizen>
101 [Obsolete("This has been deprecated in API12")]
102 public static bool IsFocusHighlightAnimation
106 return Interop.Elementary.elm_config_focus_highlight_animate_get();
110 Interop.Elementary.elm_config_focus_highlight_animate_set(value);
115 /// Gets or sets the system mirrored mode.
116 /// This determines the default mirrored mode of widgets.
118 /// <since_tizen> preview </since_tizen>
119 [Obsolete("This has been deprecated in API12")]
120 public static bool IsMirrored
124 return Interop.Elementary.elm_config_mirrored_get();
128 Interop.Elementary.elm_config_mirrored_set(value);
133 /// Gets or sets the enable status of the focus highlight.
135 /// <since_tizen> preview </since_tizen>
136 [Obsolete("This has been deprecated in API12")]
137 public static bool CanFocusHighlight
141 return Interop.Elementary.elm_config_focus_highlight_enabled_get();
145 Interop.Elementary.elm_config_focus_highlight_enabled_set(value);
150 /// Gets or sets the base scale of the application.
152 /// <since_tizen> preview </since_tizen>
153 [Obsolete("This has been deprecated in API12")]
154 public static double AppBaseScale
158 return Interop.Elementary.elm_app_base_scale_get();
162 Interop.Elementary.elm_app_base_scale_set(value);
167 /// Gets or sets the global scaling factor.
169 /// <since_tizen> preview </since_tizen>
170 [Obsolete("This has been deprecated in API12")]
171 public static double Scale
175 return Interop.Elementary.elm_config_scale_get();
179 Interop.Elementary.elm_config_scale_set(value);
184 /// Gets or sets the amount of inertia, a scroller imposes during a region to bring animations.
186 /// <since_tizen> preview </since_tizen>
187 [Obsolete("This has been deprecated in API12")]
188 public static double BringInScrollFriction
192 return Interop.Elementary.elm_config_scroll_bring_in_scroll_friction_get();
196 Interop.Elementary.elm_config_scroll_bring_in_scroll_friction_set(value);
201 /// Gets or sets the focus on autoscroll mode.
203 /// <since_tizen> preview </since_tizen>
204 [Obsolete("This has been deprecated in API12")]
205 public static FocusAutoScrollMode FocusAutoScrollMode
209 return (FocusAutoScrollMode)Interop.Elementary.elm_config_focus_autoscroll_mode_get();
213 Interop.Elementary.elm_config_focus_autoscroll_mode_set((Interop.Elementary.Elm_Focus_Autoscroll_Mode)value);
218 /// Initializes Elementary.
220 /// <since_tizen> preview </since_tizen>
221 [Obsolete("This has been deprecated in API12")]
222 public static void Initialize()
224 if (!Window.IsPreloaded)
225 Interop.Elementary.elm_init(0, null);
229 /// Shuts down Elementary.
231 /// <since_tizen> preview </since_tizen>
232 [Obsolete("This has been deprecated in API12")]
233 public static void Shutdown()
235 Interop.Elementary.elm_shutdown();
239 /// Runs the elementary's main loop.
241 /// <since_tizen> preview </since_tizen>
242 [Obsolete("This has been deprecated in API12")]
243 public static void Run()
245 Interop.Elementary.elm_run();
249 /// Prepends a theme overlay to the list of overlays.
251 /// <since_tizen> preview </since_tizen>
252 [Obsolete("This has been deprecated in API12")]
253 [EditorBrowsable(EditorBrowsableState.Never)]
254 public static void ThemeOverlay()
256 if (!Window.IsPreloaded)
258 if (File.Exists(_themeFilePath))
259 AddThemeOverlay(_themeFilePath);
261 if (Elementary.GetProfile() == "tv" && File.Exists(_tvThemeFilePath))
262 AddThemeOverlay(_tvThemeFilePath);
267 /// Prepends a theme overlay to the list of overlays.
269 /// <param name="filePath">The edje file path to be used.</param>
270 /// <since_tizen> preview </since_tizen>
271 [Obsolete("This has been deprecated in API12")]
272 public static void AddThemeOverlay(string filePath)
274 Interop.Elementary.elm_theme_overlay_add(IntPtr.Zero, filePath);
278 /// Deletes a theme overlay from the list of overlays.
280 /// <param name="filePath">The name of the theme overlay.</param>
281 /// <since_tizen> preview </since_tizen>
282 [Obsolete("This has been deprecated in API12")]
283 public static void DeleteThemeOverlay(string filePath)
285 Interop.Elementary.elm_theme_overlay_del(IntPtr.Zero, filePath);
291 /// <since_tizen> preview </since_tizen>
292 [Obsolete("This has been deprecated in API12")]
293 public static void FreeTheme()
295 Interop.Elementary.elm_theme_free(IntPtr.Zero);
299 /// Sets the theme search order for the given theme.
301 /// <param name="theme">Theme search string.</param>
302 /// <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>
303 /// <since_tizen> preview </since_tizen>
304 [Obsolete("This has been deprecated in API12")]
305 public static void SetTheme(string theme)
307 Interop.Elementary.elm_theme_set(IntPtr.Zero, theme);
311 /// Flushes the current theme.
313 /// <since_tizen> preview </since_tizen>
314 [Obsolete("This has been deprecated in API12")]
315 public static void FlushTheme()
317 Interop.Elementary.elm_theme_flush(IntPtr.Zero);
321 /// This flushes all the themes (default and specific ones).
323 /// <since_tizen> preview </since_tizen>
324 [Obsolete("This has been deprecated in API12")]
325 public static void FlushAllThemes()
327 Interop.Elementary.elm_theme_full_flush();
331 /// Deletes a theme extension from the list of extensions.
333 /// <param name="item">The name of the theme extension.</param>
334 /// <since_tizen> preview </since_tizen>
335 [Obsolete("This has been deprecated in API12")]
336 public static void DeleteThemeExtention(string item)
338 Interop.Elementary.elm_theme_extension_del(IntPtr.Zero, item);
342 /// Gets the amount of inertia that a scroller imposes during region to bring animations.
344 /// <since_tizen> preview </since_tizen>
345 [Obsolete("This has been deprecated in API12")]
346 [EditorBrowsable(EditorBrowsableState.Never)]
347 public static double GetSystemScrollFriction()
349 return BringInScrollFriction;
353 /// Sets the amount of inertia that a scroller imposes during the region bring animations.
355 /// <since_tizen> preview </since_tizen>
356 [Obsolete("This has been deprecated in API12")]
357 [EditorBrowsable(EditorBrowsableState.Never)]
358 public static void SetSystemScrollFriction(double timeSet)
361 BringInScrollFriction = timeSet;
365 /// Gets the elementary's profile in use.
367 /// <since_tizen> preview </since_tizen>
368 [Obsolete("This has been deprecated in API12")]
369 [EditorBrowsable(EditorBrowsableState.Never)]
370 public static string GetProfile()
372 return Interop.Elementary.elm_config_profile_get();
376 /// Sets the global scaling factor.
378 /// <since_tizen> preview </since_tizen>
379 [Obsolete("This has been deprecated in API12")]
380 [EditorBrowsable(EditorBrowsableState.Never)]
381 public static void SetScale(double scale)
387 /// Gets the global scaling factor.
389 /// <since_tizen> preview </since_tizen>
390 [Obsolete("This has been deprecated in API12")]
391 [EditorBrowsable(EditorBrowsableState.Never)]
392 public static double GetScale()
398 /// Use FlushAllCache instead.
400 [Obsolete("use FlushAllCache instead")]
401 [EditorBrowsable(EditorBrowsableState.Never)]
402 public static void FlushAllCashe()
404 Interop.Elementary.elm_cache_all_flush();
408 /// Flushes all the cache.
409 /// 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.
411 /// <since_tizen> preview </since_tizen>
412 [Obsolete("This has been deprecated in API12")]
413 public static void FlushAllCache()
415 Interop.Elementary.elm_cache_all_flush();
419 /// Changes the language of the current application.
421 /// <param name="language">The language to set must be the full name of the locale.</param>
422 /// <since_tizen> preview </since_tizen>
423 [Obsolete("This has been deprecated in API12")]
424 public static void SetLanguage(string language)
426 Interop.Elementary.elm_language_set(language);
430 /// Sets a new policy's value (for a given policy group/identifier).
432 /// <param name="policy">The policy identifier.</param>
433 /// <param name="value">The policy value, which depends on the identifier.</param>
434 /// <returns></returns>
435 /// <since_tizen> preview </since_tizen>
436 [Obsolete("This has been deprecated in API12")]
437 public static bool SetPolicy(uint policy, int value)
439 return Interop.Elementary.elm_policy_set(policy, value);
443 /// Reloads the elementary's configuration, bounded to the current selected profile.
445 /// <since_tizen> preview </since_tizen>
446 [Obsolete("This has been deprecated in API12")]
447 [EditorBrowsable(EditorBrowsableState.Never)]
448 public static void ReloadConfig()
450 Interop.Elementary.elm_config_reload();
454 /// Flushes all the configuration settings, and then applies those settings to all applications using elementary on the current display.
456 /// <since_tizen> preview </since_tizen>
457 [Obsolete("This has been deprecated in API12")]
458 public static void FlushAllConfig()
460 Interop.Elementary.elm_config_all_flush();