using ElmSharp; using System; using System.Collections.Generic; using Tizen.Applications.ComponentBased.Common; namespace Tizen.Applications.ComponentBased.Default { /// /// The basic EFL component-based application class. /// /// 6 public class EFLComponentBasedApplication : ComponentBasedApplication { private const string LogTag = "Tizen.Applications"; /// /// Initializes the ComponentBasedApplication class. /// /// The component type information. /// The key should be a class type of BaseComponent subclass. /// The value should be a component id which is declared in tizen-manifest.xml. /// /// 6 public EFLComponentBasedApplication(IDictionary typeInfo) : base(typeInfo) { } /// /// This method will be called before running main-loop /// /// /// 6 protected override void OnInit(string[] args) { Interop.Elementary.ElmInit(args.Length, args); string hwacc = Environment.GetEnvironmentVariable("HWACC"); if (hwacc == "USE") { Interop.Elementary.ElmConfigAccelPreferenceSet("hw"); Log.Info(LogTag, "elm_config_accel_preference_set: hw"); } else if (hwacc == "NOT_USE") { Interop.Elementary.ElmConfigAccelPreferenceSet("none"); Log.Info(LogTag, "elm_config_accel_preference_set: none"); } else { Log.Info(LogTag, "elm_config_accel_preference_set is not called"); } } /// /// This method will be called after exiting main-loop /// /// 6 protected override void OnFinished() { Interop.Elementary.ElmShutdown(); if (Environment.GetEnvironmentVariable("AUL_LOADER_INIT") == null) return; Environment.SetEnvironmentVariable("AUL_LOADER_INIT", null); Interop.Elementary.ElmShutdown(); } /// /// This method will be called to start main-loop /// /// 6 protected override void OnRun() { Interop.Elementary.ElmRun(); } /// /// This method will be called to exit main-loop /// /// 6 protected override void OnExit() { Interop.Elementary.ElmExit(); } } }