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 /// <since_tizen> 4 </since_tizen>
31 [Obsolete("Please do not use! this will be deprecated")]
32 [EditorBrowsable(EditorBrowsableState.Never)]
33 public class NUIWidgetApplication : CoreApplication
37 /// The default constructor.
39 /// <since_tizen> 4 </since_tizen>
40 public NUIWidgetApplication() : base(new NUIWidgetCoreBackend())
42 Tizen.Log.Fatal("NUI", "### NUIWidgetApplication called");
46 /// The constructor with stylesheet.
48 /// <param name="styleSheet">The styleSheet url.</param>
49 /// <since_tizen> 4 </since_tizen>
50 public NUIWidgetApplication(string styleSheet) : base(new NUIWidgetCoreBackend(styleSheet))
52 Tizen.Log.Fatal("NUI", "### NUIWidgetApplication(string) called");
56 /// Overrides this method if want to handle behavior.
58 /// <since_tizen> 4 </since_tizen>
59 protected override void OnLocaleChanged(LocaleChangedEventArgs e)
61 Log.Fatal("NUI", "OnLocaleChanged() is called!");
62 base.OnLocaleChanged(e);
66 /// Overrides this method if want to handle behavior.
68 /// <since_tizen> 4 </since_tizen>
69 protected override void OnLowBattery(LowBatteryEventArgs e)
71 Log.Fatal("NUI", "OnLowBattery() is called!");
76 /// Overrides this method if want to handle behavior.
78 /// <since_tizen> 4 </since_tizen>
79 protected override void OnLowMemory(LowMemoryEventArgs e)
81 Log.Fatal("NUI", "OnLowMemory() is called!");
86 /// Overrides this method if want to handle behavior.
88 /// <since_tizen> 4 </since_tizen>
89 protected override void OnRegionFormatChanged(RegionFormatChangedEventArgs e)
91 Log.Fatal("NUI", "OnRegionFormatChanged() is called!");
92 base.OnRegionFormatChanged(e);
96 /// Overrides this method if want to handle behavior.
98 /// <since_tizen> 4 </since_tizen>
99 protected override void OnTerminate()
101 Log.Fatal("NUI", "OnTerminate() is called!");
106 /// Overrides this method if want to handle behavior.
108 /// <since_tizen> 4 </since_tizen>
109 protected virtual void OnPreCreate()
111 Log.Fatal("NUI", "OnPreCreate() is called!");
115 /// Overrides this method if want to handle behavior.
117 /// <since_tizen> 4 </since_tizen>
118 protected override void OnCreate()
120 // This is also required to create DisposeQueue on main thread.
121 DisposeQueue disposeQ = DisposeQueue.Instance;
122 disposeQ.Initialize();
123 Log.Fatal("NUI","OnCreate() is called!");
128 /// Run NUIWidgetApplication.
130 /// <param name="args">Arguments from commandline.</param>
131 /// <since_tizen> 4 </since_tizen>
132 public override void Run(string[] args)
134 Backend.AddEventHandler(EventType.PreCreated, OnPreCreate);
139 /// Exit NUIWidgetApplication.
141 /// <since_tizen> 4 </since_tizen>
142 public override void Exit()
144 Tizen.Log.Fatal("NUI", "### NUIWidgetApplication Exit called");
148 internal WidgetApplication ApplicationHandle
152 return ((NUIWidgetCoreBackend)this.Backend).WidgetApplicationHandle;