2 * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
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.
17 using System.ComponentModel;
18 using Tizen.Applications;
19 using Tizen.Applications.ComponentBased.Common;
24 /// The class for showing UI module
26 [EditorBrowsable(EditorBrowsableState.Never)]
27 public class NUIFrameComponent : FrameComponent
29 private bool defaultWindowSet = false;
30 internal NUIWindowInfo NUIWindowInfo
36 [EditorBrowsable(EditorBrowsableState.Never)]
44 /// Overrides this method to create window. It will be called before OnCreate method.
46 /// <returns>Window object to use</returns>
47 [EditorBrowsable(EditorBrowsableState.Never)]
48 public override IWindowInfo CreateWindowInfo()
50 ComponentApplication instance = ComponentApplication.Instance as ComponentApplication;
53 if (!defaultWindowSet)
55 instance.GetWindow().WindowPositionSize = new Rectangle(0, 0, 1, 1);
56 instance.GetWindow().BackgroundColor = new Color(0, 0, 0, 0);
57 instance.GetWindow().Hide();
58 defaultWindowSet = true;
61 Window = new Window();
64 NUIWindowInfo = new NUIWindowInfo(Window);
69 /// Overrides this method to handle behavior when the component is launched.
71 /// <returns>True if a service component is successfully created</returns>
72 [EditorBrowsable(EditorBrowsableState.Never)]
73 public override bool OnCreate()
79 /// Overrides this method if want to handle behavior when the component receives the appcontrol message.
81 /// <param name="appControl">appcontrol object</param>
82 /// <param name="restarted">True if it was restarted</param>
83 [EditorBrowsable(EditorBrowsableState.Never)]
84 public override void OnStart(AppControl appControl, bool restarted)
86 base.OnStart(appControl, restarted);
90 /// Overrides this method if you want to handle the behavior when the component is resumed.
92 [EditorBrowsable(EditorBrowsableState.Never)]
93 public override void OnResume()
99 /// Overrides this method if you want to handle the behavior when the component is paused.
101 [EditorBrowsable(EditorBrowsableState.Never)]
102 public override void OnPause()
108 /// Overrides this method if you want to handle the behavior when the component is stopped.
110 [EditorBrowsable(EditorBrowsableState.Never)]
111 public override void OnStop()
117 /// Overrides this method if want to handle behavior when the component is destroyed.
119 [EditorBrowsable(EditorBrowsableState.Never)]
120 public override void OnDestroy()