-
Notifications
You must be signed in to change notification settings - Fork 273
Expand file tree
/
Copy pathFrameComponent.cs
More file actions
119 lines (109 loc) · 4.67 KB
/
FrameComponent.cs
File metadata and controls
119 lines (109 loc) · 4.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/*
* Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved
*
* 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;
namespace Tizen.Applications.ComponentBased.Common
{
/// <summary>
/// Represents a base class for UI components in the component-based application model.
/// This class provides methods for handling the lifecycle and state of UI components.
/// </summary>
/// <since_tizen> 6 </since_tizen>
[Obsolete("This has been deprecated in API14")]
public abstract class FrameComponent : BaseComponent
{
/// <summary>
/// Gets the current display status of the component.
/// </summary>
/// <value>
/// The current <see cref="DisplayStatus"/> of the component.
/// </value>
/// <exception cref="InvalidOperationException">Thrown when the display status cannot be retrieved.</exception>
/// <since_tizen> 6 </since_tizen>
[Obsolete("This has been deprecated in API14")]
public DisplayStatus DisplayStatus
{
get
{
Interop.CBApplication.NativeDisplayStatus status;
Interop.CBApplication.ErrorCode err = Interop.CBApplication.BaseFrameGetDisplayStatus(Handle, out status);
if (err != Interop.CBApplication.ErrorCode.None)
throw new InvalidOperationException("Fail to get display status : err(" + err + ")");
return (DisplayStatus)status;
}
}
/// <summary>
/// Called when the component is launched. Override this method to implement custom launch behavior.
/// </summary>
/// <returns>
/// <c>true</c> if the service component is successfully created; otherwise, <c>false</c>.
/// </returns>
/// <since_tizen> 6 </since_tizen>
[Obsolete("This has been deprecated in API14")]
public abstract bool OnCreate();
/// <summary>
/// Called to create the window for the component. Override this method to provide a custom window.
/// This method will be called before <see cref="OnCreate"/> method.
/// </summary>
/// <returns>
/// An <see cref="IWindowInfo"/> object that represents the created window.
/// </returns>
/// <since_tizen> 6 </since_tizen>
[Obsolete("This has been deprecated in API14")]
public abstract IWindowInfo CreateWindowInfo();
/// <summary>
/// Called when the component receives an app control message. Override this method to handle app control messages.
/// </summary>
/// <param name="appControl">The <see cref="AppControl"/> object containing the app control data.</param>
/// <param name="restarted"><c>true</c> if the component was restarted; otherwise, <c>false</c>.</param>
/// <since_tizen> 6 </since_tizen>
[Obsolete("This has been deprecated in API14")]
public virtual void OnStart(AppControl appControl, bool restarted)
{
}
/// <summary>
/// Called when the component is resumed. Override this method to handle resume behavior.
/// </summary>
/// <since_tizen> 6 </since_tizen>
[Obsolete("This has been deprecated in API14")]
public virtual void OnResume()
{
}
/// <summary>
/// Called when the component is paused. Override this method to handle pause behavior.
/// </summary>
/// <since_tizen> 6 </since_tizen>
[Obsolete("This has been deprecated in API14")]
public virtual void OnPause()
{
}
/// <summary>
/// Called when the component is stopped. Override this method to handle stop behavior.
/// </summary>
/// <since_tizen> 6 </since_tizen>
[Obsolete("This has been deprecated in API14")]
public virtual void OnStop()
{
}
/// <summary>
/// Called when the component is destroyed. Override this method to handle destruction behavior.
/// </summary>
/// <since_tizen> 6 </since_tizen>
[Obsolete("This has been deprecated in API14")]
public virtual void OnDestroy()
{
}
}
}