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.
23 /// The Elementary is a General Elementary,a VERY SIMPLE toolkit.
25 public static class Elementary
27 private static readonly string _themeFilePath = "/usr/share/elm-sharp/elm-sharp-theme.edj";
30 /// Initializes Elementary.
32 public static void Initialize()
34 Interop.Elementary.elm_init(0, null);
38 /// Shuts down Elementary.
40 public static void Shutdown()
42 Interop.Elementary.elm_shutdown();
46 /// Runs Elementary's main loop.
48 public static void Run()
50 Interop.Elementary.elm_run();
54 /// Prepends a theme overlay to the list of overlays.
56 public static void ThemeOverlay()
58 if (File.Exists(_themeFilePath))
60 Interop.Elementary.elm_theme_overlay_add(IntPtr.Zero, _themeFilePath);
65 /// Gets the amount of inertia a scroller imposes during region bring animations.
67 /// <returns>The bring in scroll friction</returns>
68 public static double GetSystemScrollFriction()
70 return Interop.Elementary.elm_config_scroll_bring_in_scroll_friction_get();
74 /// Sets the amount of inertia a scroller imposes during region bring animations.
76 /// <param name="timeSet">The bring in scroll friction</param>
77 public static void SetSystemScrollFriction(double timeSet)
79 Interop.Elementary.elm_config_scroll_bring_in_scroll_friction_set(timeSet);
83 /// Gets Elementary's profile in use.
85 /// <returns>The profile name</returns>
86 public static string GetProfile()
88 return Interop.Elementary.elm_config_profile_get();
92 /// Sets the global scaling factor.
93 /// This sets the globally configured scaling factor that is applied to all objects.
95 /// <param name="scale">The scaling factor to set</param>
96 public static void SetScale(double scale)
98 Interop.Elementary.elm_config_scale_set(scale);
102 /// Gets the global scaling factor.
103 /// This gets the globally configured scaling factor that is applied to all objects.
105 /// <returns>The scaling factor</returns>
106 public static double GetScale()
108 return Interop.Elementary.elm_config_scale_get();