[NUI] Clean NUI codes from Adaptor.cs to Window.cs (#652)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / WidgetView.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     using System;
31     using System.Runtime.InteropServices;
32     using Tizen.NUI.BaseComponents;
33
34     /// <summary>
35     /// The WidgetView is a class for displaying the widget image and controlling the widget.<br />
36     /// Input events that the WidgetView gets are delivered to the widget.
37     /// </summary>
38     /// <since_tizen> 3 </since_tizen>
39     public class WidgetView : View
40     {
41         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
42         private EventHandler<WidgetViewEventArgs> _widgetAddedEventHandler;
43         private WidgetAddedEventCallbackType _widgetAddedEventCallback;
44         private EventHandler<WidgetViewEventArgs> _widgetContentUpdatedEventHandler;
45         private WidgetContentUpdatedEventCallbackType _widgetContentUpdatedEventCallback;
46         private EventHandler<WidgetViewEventArgs> _widgetDeletedEventHandler;
47         private WidgetDeletedEventCallbackType _widgetDeletedEventCallback;
48         private EventHandler<WidgetViewEventArgs> _widgetCreationAbortedEventHandler;
49         private WidgetCreationAbortedEventCallbackType _widgetCreationAbortedEventCallback;
50         private EventHandler<WidgetViewEventArgs> _widgetUpdatePeriodChangedEventHandler;
51         private WidgetUpdatePeriodChangedEventCallbackType _widgetUpdatePeriodChangedEventCallback;
52         private EventHandler<WidgetViewEventArgs> _widgetFaultedEventHandler;
53         private WidgetFaultedEventCallbackType _widgetFaultedEventCallback;
54         /// <summary>
55         /// Creates a new WidgetView.
56         /// </summary>
57         /// <since_tizen> 3 </since_tizen>
58         public WidgetView(string widgetId, string contentInfo, int width, int height, float updatePeriod) : this(NDalicManualPINVOKE.WidgetView_New(widgetId, contentInfo, width, height, updatePeriod), true)
59         {
60             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
61
62         }
63
64         internal WidgetView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.WidgetView_SWIGUpcast(cPtr), cMemoryOwn)
65         {
66             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
67         }
68         internal WidgetView(WidgetView handle) : this(NDalicManualPINVOKE.new_WidgetView__SWIG_1(WidgetView.getCPtr(handle)), true)
69         {
70             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
71         }
72
73         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
74         private delegate void WidgetAddedEventCallbackType(IntPtr data);
75         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
76         private delegate void WidgetContentUpdatedEventCallbackType(IntPtr data);
77         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
78         private delegate void WidgetDeletedEventCallbackType(IntPtr data);
79         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
80         private delegate void WidgetCreationAbortedEventCallbackType(IntPtr data);
81         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
82         private delegate void WidgetUpdatePeriodChangedEventCallbackType(IntPtr data);
83         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
84         private delegate void WidgetFaultedEventCallbackType(IntPtr data);
85
86         /// <summary>
87         /// An event for the ResourceReady signal which can be used to subscribe or unsubscribe the event handler.<br />
88         /// This signal is emitted after all resources required by a control are loaded and ready.<br />
89         /// Most resources are only loaded when the control is placed on the stage.<br />
90         /// </summary>
91         /// <since_tizen> 3 </since_tizen>
92         public event EventHandler<WidgetViewEventArgs> WidgetAdded
93         {
94             add
95             {
96                 if (_widgetAddedEventHandler == null)
97                 {
98                     _widgetAddedEventCallback = OnWidgetAdded;
99                     WidgetAddedSignal().Connect(_widgetAddedEventCallback);
100                 }
101
102                 _widgetAddedEventHandler += value;
103             }
104
105             remove
106             {
107                 _widgetAddedEventHandler -= value;
108
109                 if (_widgetAddedEventHandler == null && WidgetAddedSignal().Empty() == false)
110                 {
111                     WidgetAddedSignal().Disconnect(_widgetAddedEventCallback);
112                 }
113             }
114         }
115
116         /// <summary>
117         /// An event for the ResourceReady signal which can be used to subscribe or unsubscribe the event handler.<br />
118         /// This signal is emitted after all resources required by a control are loaded and ready.<br />
119         /// Most resources are only loaded when the control is placed on the stage.<br />
120         /// </summary>
121         /// <since_tizen> 3 </since_tizen>
122         public event EventHandler<WidgetViewEventArgs> WidgetContentUpdated
123         {
124             add
125             {
126                 if (_widgetContentUpdatedEventHandler == null)
127                 {
128                     _widgetContentUpdatedEventCallback = OnWidgetContentUpdated;
129                     WidgetContentUpdatedSignal().Connect(_widgetContentUpdatedEventCallback);
130                 }
131
132                 _widgetContentUpdatedEventHandler += value;
133             }
134
135             remove
136             {
137                 _widgetContentUpdatedEventHandler -= value;
138
139                 if (_widgetContentUpdatedEventHandler == null && WidgetContentUpdatedSignal().Empty() == false)
140                 {
141                     WidgetContentUpdatedSignal().Disconnect(_widgetContentUpdatedEventCallback);
142                 }
143             }
144         }
145
146         /// <summary>
147         /// An event for the ResourceReady signal which can be used to subscribe or unsubscribe the event handler.<br />
148         /// This signal is emitted after all resources required by a control are loaded and ready.<br />
149         /// Most resources are only loaded when the control is placed on the stage.<br />
150         /// </summary>
151         /// <since_tizen> 3 </since_tizen>
152         public event EventHandler<WidgetViewEventArgs> WidgetDeleted
153         {
154             add
155             {
156                 if (_widgetDeletedEventHandler == null)
157                 {
158                     _widgetDeletedEventCallback = OnWidgetDeleted;
159                     WidgetDeletedSignal().Connect(_widgetDeletedEventCallback);
160                 }
161
162                 _widgetDeletedEventHandler += value;
163             }
164
165             remove
166             {
167                 _widgetDeletedEventHandler -= value;
168
169                 if (_widgetDeletedEventHandler == null && WidgetDeletedSignal().Empty() == false)
170                 {
171                     WidgetDeletedSignal().Disconnect(_widgetDeletedEventCallback);
172                 }
173             }
174         }
175
176         /// <summary>
177         /// An event for the ResourceReady signal which can be used to subscribe or unsubscribe the event handler.<br />
178         /// This signal is emitted after all resources required by a control are loaded and ready.<br />
179         /// Most resources are only loaded when the control is placed on the stage.<br />
180         /// </summary>
181         /// <since_tizen> 3 </since_tizen>
182         public event EventHandler<WidgetViewEventArgs> WidgetCreationAborted
183         {
184             add
185             {
186                 if (_widgetCreationAbortedEventHandler == null)
187                 {
188                     _widgetCreationAbortedEventCallback = OnWidgetCreationAborted;
189                     WidgetCreationAbortedSignal().Connect(_widgetCreationAbortedEventCallback);
190                 }
191
192                 _widgetCreationAbortedEventHandler += value;
193             }
194
195             remove
196             {
197                 _widgetCreationAbortedEventHandler -= value;
198
199                 if (_widgetCreationAbortedEventHandler == null && WidgetCreationAbortedSignal().Empty() == false)
200                 {
201                     WidgetCreationAbortedSignal().Disconnect(_widgetCreationAbortedEventCallback);
202                 }
203             }
204         }
205
206         /// <summary>
207         /// An event for the ResourceReady signal which can be used to subscribe or unsubscribe the event handler.<br />
208         /// This signal is emitted after all resources required by a control are loaded and ready.<br />
209         /// Most resources are only loaded when the control is placed on the stage.<br />
210         /// </summary>
211         /// <since_tizen> 3 </since_tizen>
212         public event EventHandler<WidgetViewEventArgs> WidgetUpdatePeriodChanged
213         {
214             add
215             {
216                 if (_widgetUpdatePeriodChangedEventHandler == null)
217                 {
218                     _widgetUpdatePeriodChangedEventCallback = OnWidgetUpdatePeriodChanged;
219                     WidgetUpdatePeriodChangedSignal().Connect(_widgetUpdatePeriodChangedEventCallback);
220                 }
221
222                 _widgetUpdatePeriodChangedEventHandler += value;
223             }
224
225             remove
226             {
227                 _widgetUpdatePeriodChangedEventHandler -= value;
228
229                 if (_widgetUpdatePeriodChangedEventHandler == null && WidgetUpdatePeriodChangedSignal().Empty() == false)
230                 {
231                     WidgetUpdatePeriodChangedSignal().Disconnect(_widgetUpdatePeriodChangedEventCallback);
232                 }
233             }
234         }
235
236         /// <summary>
237         /// An event for the ResourceReady signal which can be used to subscribe or unsubscribe the event handler.<br />
238         /// This signal is emitted after all resources required by a control are loaded and ready.<br />
239         /// Most resources are only loaded when the control is placed on the stage.<br />
240         /// </summary>
241         /// <since_tizen> 3 </since_tizen>
242         public event EventHandler<WidgetViewEventArgs> WidgetFaulted
243         {
244             add
245             {
246                 if (_widgetFaultedEventHandler == null)
247                 {
248                     _widgetFaultedEventCallback = OnWidgetFaulted;
249                     WidgetFaultedSignal().Connect(_widgetFaultedEventCallback);
250                 }
251
252                 _widgetFaultedEventHandler += value;
253             }
254
255             remove
256             {
257                 _widgetFaultedEventHandler -= value;
258
259                 if (_widgetFaultedEventHandler == null && WidgetFaultedSignal().Empty() == false)
260                 {
261                     WidgetFaultedSignal().Disconnect(_widgetFaultedEventCallback);
262                 }
263             }
264         }
265
266         /// <summary>
267         /// Gets the ID of the widget.
268         /// </summary>
269         /// <since_tizen> 3 </since_tizen>
270         public string WidgetID
271         {
272             get
273             {
274                 string temp;
275                 GetProperty(WidgetView.Property.WIDGET_ID).Get(out temp);
276                 return temp;
277             }
278         }
279
280         /// <summary>
281         /// Gets the ID of the instance.
282         /// </summary>
283         /// <since_tizen> 3 </since_tizen>
284         public string InstanceID
285         {
286             get
287             {
288                 string temp;
289                 GetProperty(WidgetView.Property.INSTANCE_ID).Get(out temp);
290                 return temp;
291             }
292         }
293
294         /// <summary>
295         /// Gets the content info.
296         /// </summary>
297         /// <since_tizen> 3 </since_tizen>
298         public string ContentInfo
299         {
300             get
301             {
302                 string temp;
303                 GetProperty(WidgetView.Property.CONTENT_INFO).Get(out temp);
304                 return temp;
305             }
306         }
307
308         /// <summary>
309         /// Gets the title.
310         /// </summary>
311         /// <since_tizen> 3 </since_tizen>
312         public string Title
313         {
314             get
315             {
316                 string temp;
317                 GetProperty(WidgetView.Property.TITLE).Get(out temp);
318                 return temp;
319             }
320         }
321
322         /// <summary>
323         /// Gets the update peroid.
324         /// </summary>
325         /// <since_tizen> 3 </since_tizen>
326         public float UpdatePeriod
327         {
328             get
329             {
330                 float temp;
331                 GetProperty(WidgetView.Property.UPDATE_PERIOD).Get(out temp);
332                 return temp;
333             }
334         }
335
336         /// <summary>
337         /// Gets or sets the preview.
338         /// </summary>
339         /// <since_tizen> 3 </since_tizen>
340         public bool Preview
341         {
342             get
343             {
344                 bool temp;
345                 GetProperty(WidgetView.Property.PREVIEW).Get(out temp);
346                 return temp;
347             }
348             set
349             {
350                 SetProperty(WidgetView.Property.PREVIEW, new Tizen.NUI.PropertyValue(value));
351             }
352         }
353
354         /// <summary>
355         /// Gets or sets the loading text.
356         /// </summary>
357         /// <since_tizen> 3 </since_tizen>
358         public bool LoadingText
359         {
360             get
361             {
362                 bool temp;
363                 GetProperty(WidgetView.Property.LOADING_TEXT).Get(out temp);
364                 return temp;
365             }
366             set
367             {
368                 SetProperty(WidgetView.Property.LOADING_TEXT, new Tizen.NUI.PropertyValue(value));
369             }
370         }
371
372         /// <summary>
373         /// Gets or sets whether the widget state is faulted or not.
374         /// </summary>
375         /// <since_tizen> 3 </since_tizen>
376         public bool WidgetStateFaulted
377         {
378             get
379             {
380                 bool temp;
381                 GetProperty(WidgetView.Property.WIDGET_STATE_FAULTED).Get(out temp);
382                 return temp;
383             }
384             set
385             {
386                 SetProperty(WidgetView.Property.WIDGET_STATE_FAULTED, new Tizen.NUI.PropertyValue(value));
387             }
388         }
389
390         /// <summary>
391         /// Gets or sets whether the widget is to delete permanently or not.
392         /// </summary>
393         /// <since_tizen> 3 </since_tizen>
394         public bool PermanentDelete
395         {
396             get
397             {
398                 bool temp;
399                 GetProperty(WidgetView.Property.PERMANENT_DELETE).Get(out temp);
400                 return temp;
401             }
402             set
403             {
404                 SetProperty(WidgetView.Property.PERMANENT_DELETE, new Tizen.NUI.PropertyValue(value));
405             }
406         }
407
408         /// <summary>
409         /// Gets or sets retry text.
410         /// </summary>
411         /// <since_tizen> 4 </since_tizen>
412         public PropertyMap RetryText
413         {
414             get
415             {
416                 PropertyMap temp = new PropertyMap();
417                 GetProperty(WidgetView.Property.RETRY_TEXT).Get(temp);
418                 return temp;
419             }
420             set
421             {
422                 SetProperty(WidgetView.Property.RETRY_TEXT, new Tizen.NUI.PropertyValue(value));
423             }
424         }
425
426         /// <summary>
427         /// Gets or sets effect.
428         /// </summary>
429         /// <since_tizen> 4 </since_tizen>
430         public PropertyMap Effect
431         {
432             get
433             {
434                 PropertyMap temp = new PropertyMap();
435                 GetProperty(WidgetView.Property.EFFECT).Get(temp);
436                 return temp;
437             }
438             set
439             {
440                 SetProperty(WidgetView.Property.EFFECT, new Tizen.NUI.PropertyValue(value));
441             }
442         }
443
444         /// <summary>
445         /// Pauses a given widget.
446         /// </summary>
447         /// <returns>True on success, false otherwise.</returns>
448         /// <since_tizen> 3 </since_tizen>
449         public bool PauseWidget()
450         {
451             bool ret = NDalicManualPINVOKE.WidgetView_PauseWidget(swigCPtr);
452             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
453             return ret;
454         }
455
456         /// <summary>
457         /// Resumes a given widget.
458         /// </summary>
459         /// <returns>True on success, false otherwise.</returns>
460         /// <since_tizen> 3 </since_tizen>
461         public bool ResumeWidget()
462         {
463             bool ret = NDalicManualPINVOKE.WidgetView_ResumeWidget(swigCPtr);
464             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
465             return ret;
466         }
467
468         /// <summary>
469         /// Cancels the touch event procedure.
470         /// If you call this function after feed the touch down event, the widget will get ON_HOLD events.
471         ///  If a widget gets ON_HOLD event, it will not do anything even if you feed touch up event.
472         /// </summary>
473         /// <returns>True on success, false otherwise.</returns>
474         /// <since_tizen> 3 </since_tizen>
475         public bool CancelTouchEvent()
476         {
477             bool ret = NDalicManualPINVOKE.WidgetView_CancelTouchEvent(swigCPtr);
478             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
479             return ret;
480         }
481
482         /// <summary>
483         /// Activates a widget in the faulted state.
484         /// A widget in faulted state must be activated before adding the widget.
485         /// </summary>
486         /// <since_tizen> 3 </since_tizen>
487         public void ActivateFaultedWidget()
488         {
489             NDalicManualPINVOKE.WidgetView_ActivateFaultedWidget(swigCPtr);
490             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
491         }
492
493         /// <summary>
494         /// Terminate a widget instance.
495         /// </summary>
496         /// <returns>True on success, false otherwise</returns>
497         /// <since_tizen> 4 </since_tizen>
498         public bool TerminateWidget()
499         {
500             bool ret = NDalicManualPINVOKE.WidgetView_TerminateWidget(swigCPtr);
501             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
502             return ret;
503         }
504
505         internal static WidgetView DownCast(BaseHandle handle)
506         {
507             WidgetView ret = new WidgetView(NDalicManualPINVOKE.WidgetView_DownCast(BaseHandle.getCPtr(handle)), true);
508             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
509             return ret;
510         }
511
512         internal static WidgetView GetWidgetViewFromPtr(global::System.IntPtr cPtr)
513         {
514             WidgetView ret = new WidgetView(cPtr, false);
515             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
516             return ret;
517         }
518
519         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetView obj)
520         {
521             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
522         }
523
524         internal WidgetView Assign(WidgetView handle)
525         {
526             WidgetView ret = new WidgetView(NDalicManualPINVOKE.WidgetView_Assign(swigCPtr, WidgetView.getCPtr(handle)), false);
527             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
528             return ret;
529         }
530
531         internal WidgetViewSignal WidgetAddedSignal()
532         {
533             WidgetViewSignal ret = new WidgetViewSignal(NDalicManualPINVOKE.WidgetView_WidgetAddedSignal(swigCPtr), false);
534             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
535             return ret;
536         }
537
538         internal WidgetViewSignal WidgetDeletedSignal()
539         {
540             WidgetViewSignal ret = new WidgetViewSignal(NDalicManualPINVOKE.WidgetView_WidgetDeletedSignal(swigCPtr), false);
541             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
542             return ret;
543         }
544
545         internal WidgetViewSignal WidgetCreationAbortedSignal()
546         {
547             WidgetViewSignal ret = new WidgetViewSignal(NDalicManualPINVOKE.WidgetView_WidgetCreationAbortedSignal(swigCPtr), false);
548             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
549             return ret;
550         }
551
552         internal WidgetViewSignal WidgetContentUpdatedSignal()
553         {
554             WidgetViewSignal ret = new WidgetViewSignal(NDalicManualPINVOKE.WidgetView_WidgetContentUpdatedSignal(swigCPtr), false);
555             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
556             return ret;
557         }
558
559         internal WidgetViewSignal WidgetUpdatePeriodChangedSignal()
560         {
561             WidgetViewSignal ret = new WidgetViewSignal(NDalicManualPINVOKE.WidgetView_WidgetUpdatePeriodChangedSignal(swigCPtr), false);
562             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
563             return ret;
564         }
565
566         internal WidgetViewSignal WidgetFaultedSignal()
567         {
568             WidgetViewSignal ret = new WidgetViewSignal(NDalicManualPINVOKE.WidgetView_WidgetFaultedSignal(swigCPtr), false);
569             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
570             return ret;
571         }
572
573         /// <summary>
574         /// To make the Button instance be disposed.
575         /// </summary>
576         /// <since_tizen> 3 </since_tizen>
577         protected override void Dispose(DisposeTypes type)
578         {
579             if (disposed)
580             {
581                 return;
582             }
583
584             if (type == DisposeTypes.Explicit)
585             {
586                 //Called by User
587                 //Release your own managed resources here.
588                 //You should release all of your own disposable objects here.
589
590             }
591
592             //Release your own unmanaged resources here.
593             //You should not access any managed member here except static instance.
594             //because the execution order of Finalizes is non-deterministic.
595
596             if (_widgetAddedEventCallback != null)
597             {
598                 this.WidgetAddedSignal().Disconnect(_widgetAddedEventCallback);
599             }
600
601             if (_widgetContentUpdatedEventCallback != null)
602             {
603                 this.WidgetContentUpdatedSignal().Disconnect(_widgetContentUpdatedEventCallback);
604             }
605
606             if (_widgetCreationAbortedEventCallback != null)
607             {
608                 this.WidgetCreationAbortedSignal().Disconnect(_widgetCreationAbortedEventCallback);
609             }
610
611             if (_widgetDeletedEventCallback != null)
612             {
613                 this.WidgetDeletedSignal().Disconnect(_widgetDeletedEventCallback);
614             }
615
616             if (_widgetFaultedEventCallback != null)
617             {
618                 this.WidgetFaultedSignal().Disconnect(_widgetFaultedEventCallback);
619             }
620
621             if (_widgetUpdatePeriodChangedEventCallback != null)
622             {
623                 this.WidgetUpdatePeriodChangedSignal().Disconnect(_widgetUpdatePeriodChangedEventCallback);
624             }
625
626             if (swigCPtr.Handle != global::System.IntPtr.Zero)
627             {
628                 if (swigCMemOwn)
629                 {
630                     swigCMemOwn = false;
631                     NDalicManualPINVOKE.delete_WidgetView(swigCPtr);
632                 }
633                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
634             }
635             base.Dispose(type);
636         }
637
638
639         // Callback for WidgetView WidgetAdded signal
640         private void OnWidgetAdded(IntPtr data)
641         {
642             WidgetViewEventArgs e = new WidgetViewEventArgs();
643             if(data != null)
644             {
645                 e.WidgetView = WidgetView.GetWidgetViewFromPtr(data);
646             }
647
648             if (_widgetAddedEventHandler != null)
649             {
650                 _widgetAddedEventHandler(this, e);
651             }
652         }
653
654         // Callback for WidgetView WidgetDeleted signal
655         private void OnWidgetDeleted(IntPtr data)
656         {
657             WidgetViewEventArgs e = new WidgetViewEventArgs();
658             if (data != null)
659             {
660                 e.WidgetView = WidgetView.GetWidgetViewFromPtr(data);
661             }
662
663             if (_widgetDeletedEventHandler != null)
664             {
665                 _widgetDeletedEventHandler(this, e);
666             }
667         }
668
669         // Callback for WidgetView WidgetCreationAborted signal
670         private void OnWidgetCreationAborted(IntPtr data)
671         {
672             WidgetViewEventArgs e = new WidgetViewEventArgs();
673             if (data != null)
674             {
675                 e.WidgetView = WidgetView.GetWidgetViewFromPtr(data);
676             }
677
678             if (_widgetCreationAbortedEventHandler != null)
679             {
680                 _widgetCreationAbortedEventHandler(this, e);
681             }
682         }
683
684
685
686         // Callback for WidgetView WidgetContentUpdated signal
687         private void OnWidgetContentUpdated(IntPtr data)
688         {
689             WidgetViewEventArgs e = new WidgetViewEventArgs();
690             if (data != null)
691             {
692                 e.WidgetView = WidgetView.GetWidgetViewFromPtr(data);
693             }
694
695             if (_widgetContentUpdatedEventHandler != null)
696             {
697                 _widgetContentUpdatedEventHandler(this, e);
698             }
699         }
700
701         // Callback for WidgetView WidgetUpdatePeriodChanged signal
702         private void OnWidgetUpdatePeriodChanged(IntPtr data)
703         {
704             WidgetViewEventArgs e = new WidgetViewEventArgs();
705             if (data != null)
706             {
707                 e.WidgetView = WidgetView.GetWidgetViewFromPtr(data);
708             }
709
710             if (_widgetUpdatePeriodChangedEventHandler != null)
711             {
712                 _widgetUpdatePeriodChangedEventHandler(this, e);
713             }
714         }
715
716         // Callback for WidgetView WidgetFaulted signal
717         private void OnWidgetFaulted(IntPtr data)
718         {
719             WidgetViewEventArgs e = new WidgetViewEventArgs();
720             if(data != null)
721             {
722                 e.WidgetView = WidgetView.GetWidgetViewFromPtr(data);
723             }
724
725             if (_widgetFaultedEventHandler != null)
726             {
727                 _widgetFaultedEventHandler(this, e);
728             }
729         }
730
731         /// <summary>
732         /// Event arguments of the widget view.
733         /// </summary>
734         /// <since_tizen> 3 </since_tizen>
735         public class WidgetViewEventArgs : EventArgs
736         {
737             private WidgetView _widgetView;
738
739             /// <summary>
740             /// The widet view.
741             /// </summary>
742             /// <since_tizen> 3 </since_tizen>
743             public WidgetView WidgetView
744             {
745                 get
746                 {
747                     return _widgetView;
748                 }
749                 set
750                 {
751                     _widgetView = value;
752                 }
753             }
754         }
755
756         internal new class Property
757         {
758             internal static readonly int WIDGET_ID = NDalicManualPINVOKE.WidgetView_Property_WIDGET_ID_get();
759             internal static readonly int INSTANCE_ID = NDalicManualPINVOKE.WidgetView_Property_INSTANCE_ID_get();
760             internal static readonly int CONTENT_INFO = NDalicManualPINVOKE.WidgetView_Property_CONTENT_INFO_get();
761             internal static readonly int TITLE = NDalicManualPINVOKE.WidgetView_Property_TITLE_get();
762             internal static readonly int UPDATE_PERIOD = NDalicManualPINVOKE.WidgetView_Property_UPDATE_PERIOD_get();
763             internal static readonly int PREVIEW = NDalicManualPINVOKE.WidgetView_Property_PREVIEW_get();
764             internal static readonly int LOADING_TEXT = NDalicManualPINVOKE.WidgetView_Property_LOADING_TEXT_get();
765             internal static readonly int WIDGET_STATE_FAULTED = NDalicManualPINVOKE.WidgetView_Property_WIDGET_STATE_FAULTED_get();
766             internal static readonly int PERMANENT_DELETE = NDalicManualPINVOKE.WidgetView_Property_PERMANENT_DELETE_get();
767             internal static readonly int RETRY_TEXT = NDalicManualPINVOKE.WidgetView_Property_RETRY_TEXT_get();
768             internal static readonly int EFFECT = NDalicManualPINVOKE.WidgetView_Property_EFFECT_get();
769         }
770     }
771
772 }