[NUI] Add Obsolete attributes for EditorBrowsable apis
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / NUIWidgetApplication.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 using System;
19 using System.ComponentModel;
20 using Tizen.Applications;
21 using Tizen.Applications.CoreBackend;
22 using Tizen.NUI;
23
24 namespace Tizen.NUI
25 {
26
27     /// <summary>
28     /// Represents an application that have UI screen. The NUIWidgetApplication class has a default stage.
29     /// </summary>
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
34     {
35
36         /// <summary>
37         /// The default constructor.
38         /// </summary>
39         /// <since_tizen> 4 </since_tizen>
40         public NUIWidgetApplication() : base(new NUIWidgetCoreBackend())
41         {
42             Tizen.Log.Fatal("NUI", "### NUIWidgetApplication called");
43         }
44
45         /// <summary>
46         /// The constructor with stylesheet.
47         /// </summary>
48         /// <param name="styleSheet">The styleSheet url.</param>
49         /// <since_tizen> 4 </since_tizen>
50         public NUIWidgetApplication(string styleSheet) : base(new NUIWidgetCoreBackend(styleSheet))
51         {
52             Tizen.Log.Fatal("NUI", "### NUIWidgetApplication(string) called");
53         }
54
55         /// <summary>
56         /// Overrides this method if want to handle behavior.
57         /// </summary>
58         /// <since_tizen> 4 </since_tizen>
59         protected override void OnLocaleChanged(LocaleChangedEventArgs e)
60         {
61             Log.Fatal("NUI", "OnLocaleChanged() is called!");
62             base.OnLocaleChanged(e);
63         }
64
65         /// <summary>
66         /// Overrides this method if want to handle behavior.
67         /// </summary>
68         /// <since_tizen> 4 </since_tizen>
69         protected override void OnLowBattery(LowBatteryEventArgs e)
70         {
71             Log.Fatal("NUI", "OnLowBattery() is called!");
72             base.OnLowBattery(e);
73         }
74
75         /// <summary>
76         /// Overrides this method if want to handle behavior.
77         /// </summary>
78         /// <since_tizen> 4 </since_tizen>
79         protected override void OnLowMemory(LowMemoryEventArgs e)
80         {
81             Log.Fatal("NUI", "OnLowMemory() is called!");
82             base.OnLowMemory(e);
83         }
84
85         /// <summary>
86         /// Overrides this method if want to handle behavior.
87         /// </summary>
88         /// <since_tizen> 4 </since_tizen>
89         protected override void OnRegionFormatChanged(RegionFormatChangedEventArgs e)
90         {
91             Log.Fatal("NUI", "OnRegionFormatChanged() is called!");
92             base.OnRegionFormatChanged(e);
93         }
94
95         /// <summary>
96         /// Overrides this method if want to handle behavior.
97         /// </summary>
98         /// <since_tizen> 4 </since_tizen>
99         protected override void OnTerminate()
100         {
101             Log.Fatal("NUI", "OnTerminate() is called!");
102             base.OnTerminate();
103         }
104
105         /// <summary>
106         /// Overrides this method if want to handle behavior.
107         /// </summary>
108         /// <since_tizen> 4 </since_tizen>
109         protected virtual void OnPreCreate()
110         {
111             Log.Fatal("NUI", "OnPreCreate() is called!");
112         }
113
114         /// <summary>
115         /// Overrides this method if want to handle behavior.
116         /// </summary>
117         /// <since_tizen> 4 </since_tizen>
118         protected override void OnCreate()
119         {
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!");
124             base.OnCreate();
125         }
126
127         /// <summary>
128         /// Run NUIWidgetApplication.
129         /// </summary>
130         /// <param name="args">Arguments from commandline.</param>
131         /// <since_tizen> 4 </since_tizen>
132         public override void Run(string[] args)
133         {
134             Backend.AddEventHandler(EventType.PreCreated, OnPreCreate);
135             base.Run(args);
136         }
137
138         /// <summary>
139         /// Exit NUIWidgetApplication.
140         /// </summary>
141         /// <since_tizen> 4 </since_tizen>
142         public override void Exit()
143         {
144             Tizen.Log.Fatal("NUI", "### NUIWidgetApplication Exit called");
145             base.Exit();
146         }
147
148         internal WidgetApplication ApplicationHandle
149         {
150             get
151             {
152                 return ((NUIWidgetCoreBackend)this.Backend).WidgetApplicationHandle;
153             }
154         }
155     }
156 }