2 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
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.
19 using System.ComponentModel;
20 using Tizen.Applications;
21 using Tizen.Applications.CoreBackend;
28 /// Represents an application that have UI screen. The NUIWidgetApplication class has a default stage.
30 [Obsolete("Please do not use! this will be deprecated")]
31 [EditorBrowsable(EditorBrowsableState.Never)]
32 public class NUIWidgetApplication : CoreApplication
36 /// The default constructor.
38 /// <since_tizen> 4 </since_tizen>
39 public NUIWidgetApplication() : base(new NUIWidgetCoreBackend())
41 Tizen.Log.Fatal("NUI", "### NUIWidgetApplication called");
45 /// The constructor with stylesheet.
47 /// <param name="styleSheet">The styleSheet url.</param>
48 /// <since_tizen> 4 </since_tizen>
49 public NUIWidgetApplication(string styleSheet) : base(new NUIWidgetCoreBackend(styleSheet))
51 Tizen.Log.Fatal("NUI", "### NUIWidgetApplication(string) called");
55 /// Overrides this method if want to handle behavior.
57 protected override void OnLocaleChanged(LocaleChangedEventArgs e)
59 Log.Fatal("NUI", "OnLocaleChanged() is called!");
60 base.OnLocaleChanged(e);
64 /// Overrides this method if want to handle behavior.
66 protected override void OnLowBattery(LowBatteryEventArgs e)
68 Log.Fatal("NUI", "OnLowBattery() is called!");
73 /// Overrides this method if want to handle behavior.
75 protected override void OnLowMemory(LowMemoryEventArgs e)
77 Log.Fatal("NUI", "OnLowMemory() is called!");
82 /// Overrides this method if want to handle behavior.
84 protected override void OnRegionFormatChanged(RegionFormatChangedEventArgs e)
86 Log.Fatal("NUI", "OnRegionFormatChanged() is called!");
87 base.OnRegionFormatChanged(e);
91 /// Overrides this method if want to handle behavior.
93 protected override void OnTerminate()
95 Log.Fatal("NUI", "OnTerminate() is called!");
100 /// Overrides this method if want to handle behavior.
102 protected virtual void OnPreCreate()
104 Log.Fatal("NUI", "OnPreCreate() is called!");
108 /// Overrides this method if want to handle behavior.
110 protected override void OnCreate()
112 // This is also required to create DisposeQueue on main thread.
113 DisposeQueue disposeQ = DisposeQueue.Instance;
114 disposeQ.Initialize();
115 Log.Fatal("NUI","OnCreate() is called!");
120 /// Run NUIWidgetApplication.
122 /// <param name="args">Arguments from commandline.</param>
123 /// <since_tizen> 4 </since_tizen>
124 public override void Run(string[] args)
126 Backend.AddEventHandler(EventType.PreCreated, OnPreCreate);
131 /// Exit NUIWidgetApplication.
133 /// <since_tizen> 4 </since_tizen>
134 public override void Exit()
136 Tizen.Log.Fatal("NUI", "### NUIWidgetApplication Exit called");
140 internal WidgetApplication ApplicationHandle
144 return ((NUIWidgetCoreBackend)this.Backend).WidgetApplicationHandle;