[NUI] TCSACR-226 code change (#1032)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / WidgetViewManager.cs
1 /*
2  * Copyright(c) 2017 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 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
18 //------------------------------------------------------------------------------
19 // <auto-generated />
20 //
21 // This file was automatically generated by SWIG (http://www.swig.org).
22 // Version 3.0.12
23 //
24 // Do not make changes to this file unless you know what you are doing--modify
25 // the SWIG interface file instead.
26 //------------------------------------------------------------------------------
27
28 namespace Tizen.NUI
29 {
30     /// <summary>
31     /// WidgetViewManager manages addition of WidgetView controls.
32     /// This class provides the functionality of adding the widget views and controlling the widgets.
33     /// </summary>
34     /// <since_tizen> 3 </since_tizen>
35     public class WidgetViewManager : BaseHandle
36     {
37         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
38
39         /// <summary>
40         /// Creates a new widgetView manager object.
41         /// </summary>
42         /// <since_tizen> 3 </since_tizen>
43         public WidgetViewManager(NUIApplication nuiApplication, string appId) : this(Interop.WidgetViewManager.WidgetViewManager_New(Application.getCPtr(nuiApplication.ApplicationHandle), appId), true)
44         {
45             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
46         }
47         internal WidgetViewManager(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.WidgetViewManager.WidgetViewManager_SWIGUpcast(cPtr), cMemoryOwn)
48         {
49             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
50         }
51
52         /// <summary>
53         /// Creates a new widget view object.
54         /// </summary>
55         /// <param name="widgetId">The widget ID.</param>
56         /// <param name="contentInfo">Contents that will be given to the widget instance.</param>
57         /// <param name="width">The widget width.</param>
58         /// <param name="height">The widget height.</param>
59         /// <param name="updatePeriod">The period of updating contents of the widget.</param>
60         /// <returns>A handle to WidgetView.</returns>
61         /// <since_tizen> 3 </since_tizen>
62         public WidgetView AddWidget(string widgetId, string contentInfo, int width, int height, float updatePeriod)
63         {
64             WidgetView ret = new WidgetView(Interop.WidgetViewManager.WidgetViewManager_AddWidget(swigCPtr, widgetId, contentInfo, width, height, updatePeriod), true);
65             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
66             return ret;
67         }
68
69         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetViewManager obj)
70         {
71             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
72         }
73
74         internal static WidgetViewManager DownCast(BaseHandle handle)
75         {
76             WidgetViewManager ret = new WidgetViewManager(Interop.WidgetViewManager.WidgetViewManager_DownCast(BaseHandle.getCPtr(handle)), true);
77             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
78             return ret;
79         }
80
81         internal WidgetViewManager(WidgetViewManager handle) : this(Interop.WidgetViewManager.new_WidgetViewManager__SWIG_1(WidgetViewManager.getCPtr(handle)), true)
82         {
83             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
84         }
85
86         internal WidgetViewManager Assign(WidgetViewManager handle)
87         {
88             WidgetViewManager ret = new WidgetViewManager(Interop.WidgetViewManager.WidgetViewManager_Assign(swigCPtr, WidgetViewManager.getCPtr(handle)), false);
89             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
90             return ret;
91         }
92
93         /// <summary>
94         /// To make WidgetViewManager instance be disposed.
95         /// </summary>
96         /// <since_tizen> 3 </since_tizen>
97         protected override void Dispose(DisposeTypes type)
98         {
99             if (disposed)
100             {
101                 return;
102             }
103
104             //Release your own unmanaged resources here.
105             //You should not access any managed member here except static instance.
106             //because the execution order of Finalizes is non-deterministic.
107             if (swigCPtr.Handle != global::System.IntPtr.Zero)
108             {
109                 if (swigCMemOwn)
110                 {
111                     swigCMemOwn = false;
112                     Interop.WidgetViewManager.delete_WidgetViewManager(swigCPtr);
113                 }
114                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
115             }
116             base.Dispose(type);
117         }
118     }
119 }