3 using System.Collections.Generic;
4 using Tizen.Applications.ComponentBased.Common;
6 namespace Tizen.Applications.ComponentBased.Default
9 /// The basic EFL component-based application class.
11 /// <since_tizen> 6 </since_tizen>
12 public class EFLComponentBasedApplication : ComponentBasedApplication
14 private const string LogTag = "Tizen.Applications";
17 /// Initializes the ComponentBasedApplication class.
19 /// <param name="typeInfo">The component type information.
20 /// The key should be a class type of BaseComponent subclass.
21 /// The value should be a component id which is declared in tizen-manifest.xml.
23 /// <since_tizen> 6 </since_tizen>
24 public EFLComponentBasedApplication(IDictionary<Type, string> typeInfo) : base(typeInfo)
29 /// This method will be called before running main-loop
31 /// <param name="args"></param>
32 /// <since_tizen> 6 </since_tizen>
33 protected override void OnInit(string[] args)
35 Interop.Elementary.ElmInit(args.Length, args);
36 string hwacc = Environment.GetEnvironmentVariable("HWACC");
40 Interop.Elementary.ElmConfigAccelPreferenceSet("hw");
41 Log.Info(LogTag, "elm_config_accel_preference_set: hw");
43 else if (hwacc == "NOT_USE")
45 Interop.Elementary.ElmConfigAccelPreferenceSet("none");
46 Log.Info(LogTag, "elm_config_accel_preference_set: none");
50 Log.Info(LogTag, "elm_config_accel_preference_set is not called");
55 /// This method will be called after exiting main-loop
57 /// <since_tizen> 6 </since_tizen>
58 protected override void OnFinished()
60 Interop.Elementary.ElmShutdown();
61 if (Environment.GetEnvironmentVariable("AUL_LOADER_INIT") == null)
64 Environment.SetEnvironmentVariable("AUL_LOADER_INIT", null);
65 Interop.Elementary.ElmShutdown();
69 /// This method will be called to start main-loop
71 /// <since_tizen> 6 </since_tizen>
72 protected override void OnRun()
74 Interop.Elementary.ElmRun();
78 /// This method will be called to exit main-loop
80 /// <since_tizen> 6 </since_tizen>
81 protected override void OnExit()
83 Interop.Elementary.ElmExit();