/* * Copyright (c) 2016 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ using System; using Tizen.Applications; using Tizen.Applications.CoreBackend; using Tizen.NUI; namespace Tizen.NUI { /// /// Represents an application that have UI screen. The NUIWidgetApplication class has a default stage. /// public class NUIWidgetApplication : CoreApplication { /// /// The default constructor. /// /// 4 public NUIWidgetApplication() : base(new NUIWidgetCoreBackend()) { Tizen.Log.Fatal("NUI", "### NUIWidgetApplication called"); } /// /// The constructor with stylesheet. /// /// The styleSheet url. /// 4 public NUIWidgetApplication(string styleSheet) : base(new NUIWidgetCoreBackend(styleSheet)) { Tizen.Log.Fatal("NUI", "### NUIWidgetApplication(string) called"); } /// /// Overrides this method if want to handle behavior. /// protected override void OnLocaleChanged(LocaleChangedEventArgs e) { Log.Fatal("NUI", "OnLocaleChanged() is called!"); base.OnLocaleChanged(e); } /// /// Overrides this method if want to handle behavior. /// protected override void OnLowBattery(LowBatteryEventArgs e) { Log.Fatal("NUI", "OnLowBattery() is called!"); base.OnLowBattery(e); } /// /// Overrides this method if want to handle behavior. /// protected override void OnLowMemory(LowMemoryEventArgs e) { Log.Fatal("NUI", "OnLowMemory() is called!"); base.OnLowMemory(e); } /// /// Overrides this method if want to handle behavior. /// protected override void OnRegionFormatChanged(RegionFormatChangedEventArgs e) { Log.Fatal("NUI", "OnRegionFormatChanged() is called!"); base.OnRegionFormatChanged(e); } /// /// Overrides this method if want to handle behavior. /// protected override void OnTerminate() { Log.Fatal("NUI", "OnTerminate() is called!"); base.OnTerminate(); } /// /// Overrides this method if want to handle behavior. /// protected virtual void OnPreCreate() { Log.Fatal("NUI", "OnPreCreate() is called!"); } /// /// Overrides this method if want to handle behavior. /// protected override void OnCreate() { // This is also required to create DisposeQueue on main thread. DisposeQueue disposeQ = DisposeQueue.Instance; disposeQ.Initialize(); Log.Fatal("NUI","OnCreate() is called!"); base.OnCreate(); } /// /// Run NUIWidgetApplication. /// /// Arguments from commandline. /// 4 public override void Run(string[] args) { Backend.AddEventHandler(EventType.PreCreated, OnPreCreate); base.Run(args); } /// /// Exit NUIWidgetApplication. /// /// 4 public override void Exit() { Tizen.Log.Fatal("NUI", "### NUIWidgetApplication Exit called"); base.Exit(); } internal WidgetApplication ApplicationHandle { get { return ((NUIWidgetCoreBackend)this.Backend).WidgetApplicationHandle; } } } }