1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
22 public class WidgetData : BaseHandle
24 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
26 internal WidgetData(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.WidgetData_SWIGUpcast(cPtr), cMemoryOwn)
28 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
31 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetData obj)
33 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
37 /// To make Window instance be disposed.
39 protected override void Dispose(DisposeTypes type)
46 if(type == DisposeTypes.Explicit)
49 //Release your own managed resources here.
50 //You should release all of your own disposable objects here.
53 //Release your own unmanaged resources here.
54 //You should not access any managed member here except static instance.
55 //because the execution order of Finalizes is non-deterministic.
57 if (swigCPtr.Handle != global::System.IntPtr.Zero)
62 NDalicManualPINVOKE.delete_WidgetData(swigCPtr);
64 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
70 internal static WidgetData GetWidgetDataFromPtr(global::System.IntPtr cPtr)
72 WidgetData ret = new WidgetData(cPtr, false);
73 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
77 internal WidgetData(string instanceId, SWIGTYPE_p_bundle args, string content) : this(NDalicManualPINVOKE.WidgetData_New(instanceId, SWIGTYPE_p_bundle.getCPtr(args), content), true)
79 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
82 internal WidgetData(WidgetData widgetData) : this(NDalicManualPINVOKE.new_WidgetData__SWIG_1(WidgetData.getCPtr(widgetData)), true)
84 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
87 internal WidgetData Assign(WidgetData widgetData)
89 WidgetData ret = new WidgetData(NDalicManualPINVOKE.WidgetData_Assign(swigCPtr, WidgetData.getCPtr(widgetData)), false);
90 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
95 /// Get widget instance id.
97 /// <returns>Id of widget instance.</returns>
98 /// <since_tizen> 4 </since_tizen>
99 public string GetInstanceId()
101 string ret = NDalicManualPINVOKE.WidgetData_GetInstanceId(swigCPtr);
102 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
106 internal SWIGTYPE_p_bundle GetArgs()
108 global::System.IntPtr cPtr = NDalicManualPINVOKE.WidgetData_GetArgs(swigCPtr);
109 SWIGTYPE_p_bundle ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_bundle(cPtr, false);
110 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
115 /// Get widget instance content.
117 /// <returns>Content of widget instance.</returns>
118 /// <since_tizen> 4 </since_tizen>
119 public string GetContent()
121 string ret = NDalicManualPINVOKE.WidgetData_GetContent(swigCPtr);
122 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
127 /// Get widget instance Window.
129 /// <returns>Window of widget instance</returns>
130 /// <since_tizen> 4 </since_tizen>
131 public Window GetWindow()
133 Window ret = new Window(NDalicManualPINVOKE.WidgetData_GetWindow(swigCPtr), false);
134 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
138 internal void SetArgs(SWIGTYPE_p_bundle args)
140 NDalicManualPINVOKE.WidgetData_SetArgs(swigCPtr, SWIGTYPE_p_bundle.getCPtr(args));
141 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
145 /// Set widget instance arguments.
147 /// <param name="content">Content of widget instance</param>
148 /// <since_tizen> 4 </since_tizen>
149 public void SetContent(string content)
151 NDalicManualPINVOKE.WidgetData_SetContent(swigCPtr, content);
152 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
156 /// Set widget instance arguments.
158 /// <param name="window">Window of widget instance.</param>
159 /// <since_tizen> 4 </since_tizen>
160 public void SetWindow(Window window)
162 NDalicManualPINVOKE.WidgetData_SetWindow(swigCPtr, Window.getCPtr(window));
163 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();