2 * Copyright(c) 2017 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.
23 public class WidgetData : BaseHandle
25 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
27 internal WidgetData(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.WidgetData_SWIGUpcast(cPtr), cMemoryOwn)
29 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
32 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetData obj)
34 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
38 /// To make Window instance be disposed.
40 protected override void Dispose(DisposeTypes type)
47 if(type == DisposeTypes.Explicit)
50 //Release your own managed resources here.
51 //You should release all of your own disposable objects here.
54 //Release your own unmanaged resources here.
55 //You should not access any managed member here except static instance.
56 //because the execution order of Finalizes is non-deterministic.
58 if (swigCPtr.Handle != global::System.IntPtr.Zero)
63 NDalicManualPINVOKE.delete_WidgetData(swigCPtr);
65 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
71 internal static WidgetData GetWidgetDataFromPtr(global::System.IntPtr cPtr)
73 WidgetData ret = new WidgetData(cPtr, false);
74 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
78 internal WidgetData(string instanceId, SWIGTYPE_p_bundle args, string content) : this(NDalicManualPINVOKE.WidgetData_New(instanceId, SWIGTYPE_p_bundle.getCPtr(args), content), true)
80 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
83 internal WidgetData(WidgetData widgetData) : this(NDalicManualPINVOKE.new_WidgetData__SWIG_1(WidgetData.getCPtr(widgetData)), true)
85 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
88 internal WidgetData Assign(WidgetData widgetData)
90 WidgetData ret = new WidgetData(NDalicManualPINVOKE.WidgetData_Assign(swigCPtr, WidgetData.getCPtr(widgetData)), false);
91 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
96 /// Get widget instance id.
98 /// <returns>Id of widget instance.</returns>
99 /// <since_tizen> 4 </since_tizen>
100 public string GetInstanceId()
102 string ret = NDalicManualPINVOKE.WidgetData_GetInstanceId(swigCPtr);
103 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
107 internal SWIGTYPE_p_bundle GetArgs()
109 global::System.IntPtr cPtr = NDalicManualPINVOKE.WidgetData_GetArgs(swigCPtr);
110 SWIGTYPE_p_bundle ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_bundle(cPtr, false);
111 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
116 /// Get widget instance content.
118 /// <returns>Content of widget instance.</returns>
119 /// <since_tizen> 4 </since_tizen>
120 public string GetContent()
122 string ret = NDalicManualPINVOKE.WidgetData_GetContent(swigCPtr);
123 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128 /// Get widget instance Window.
130 /// <returns>Window of widget instance</returns>
131 /// <since_tizen> 4 </since_tizen>
132 public Window GetWindow()
134 Window ret = new Window(NDalicManualPINVOKE.WidgetData_GetWindow(swigCPtr), false);
135 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
139 internal void SetArgs(SWIGTYPE_p_bundle args)
141 NDalicManualPINVOKE.WidgetData_SetArgs(swigCPtr, SWIGTYPE_p_bundle.getCPtr(args));
142 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
146 /// Set widget instance arguments.
148 /// <param name="content">Content of widget instance</param>
149 /// <since_tizen> 4 </since_tizen>
150 public void SetContent(string content)
152 NDalicManualPINVOKE.WidgetData_SetContent(swigCPtr, content);
153 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
157 /// Set widget instance arguments.
159 /// <param name="window">Window of widget instance.</param>
160 /// <since_tizen> 4 </since_tizen>
161 public void SetWindow(Window window)
163 NDalicManualPINVOKE.WidgetData_SetWindow(swigCPtr, Window.getCPtr(window));
164 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();