[NUI] Reduce code duplication - refactor dispose codes (#1010)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / CubeTransitionEffect.cs
1 /*
2  * Copyright(c) 2019 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
18 using System;
19 using System.Runtime.InteropServices;
20 using Tizen.NUI.BaseComponents;
21 using System.ComponentModel;
22
23 namespace Tizen.NUI
24 {
25     /// <summary>
26     /// Cube Transition Effect base class, used to apply custom effects to a
27     /// Cube Transition instance.
28     /// </summary>
29     /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
30     [EditorBrowsable(EditorBrowsableState.Never)]
31     public class CubeTransitionEffect : View
32     {
33         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
34         private EventHandler<TransitionCompletedEventArgs> _transitionCompletedEventHandler;
35         private TransitionCompletedCallbackDelegate _transitionCompletedCallbackDelegate;
36
37         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
38         private delegate void TransitionCompletedCallbackDelegate(IntPtr cubeTransition, IntPtr cubeTexture);
39
40         /// <summary>
41         /// The constructor.
42         /// </summary>
43         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
44         [EditorBrowsable(EditorBrowsableState.Never)]
45         public CubeTransitionEffect() : this(Interop.CubeTransitionEffect.new_CubeTransitionEffect(), true)
46         {
47             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
48         }
49
50         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CubeTransitionEffect obj)
51         {
52             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
53         }
54
55         internal CubeTransitionEffect(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.CubeTransitionEffect.CubeTransitionEffect_SWIGUpcast(cPtr), cMemoryOwn)
56         {
57             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
58         }
59
60         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
61         [EditorBrowsable(EditorBrowsableState.Never)]
62         public void SetTransitionDuration(float duration)
63         {
64             Interop.CubeTransitionEffect.CubeTransitionEffect_SetTransitionDuration(swigCPtr, duration);
65             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
66         }
67
68         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
69         [EditorBrowsable(EditorBrowsableState.Never)]
70         public float GetTransitionDuration()
71         {
72             float result = Interop.CubeTransitionEffect.CubeTransitionEffect_GetTransitionDuration(swigCPtr);
73             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
74             return result;
75         }
76
77         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
78         [EditorBrowsable(EditorBrowsableState.Never)]
79         public void SetCubeDisplacement(float displacement)
80         {
81             Interop.CubeTransitionEffect.CubeTransitionEffect_SetCubeDisplacement(swigCPtr, displacement);
82             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
83         }
84
85         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
86         [EditorBrowsable(EditorBrowsableState.Never)]
87         public float GetCubeDisplacement()
88         {
89             float result = Interop.CubeTransitionEffect.CubeTransitionEffect_GetCubeDisplacement(swigCPtr);
90             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
91             return result;
92         }
93
94         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
95         [EditorBrowsable(EditorBrowsableState.Never)]
96         public bool IsTransitioning()
97         {
98             bool result = Interop.CubeTransitionEffect.CubeTransitionEffect_IsTransitioning(swigCPtr);
99             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
100             return result;
101         }
102
103         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
104         [EditorBrowsable(EditorBrowsableState.Never)]
105         public void SetCurrentTexture(Texture texture)
106         {
107             Interop.CubeTransitionEffect.CubeTransitionEffect_SetCurrentTexture(swigCPtr, Texture.getCPtr(texture));
108             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
109         }
110
111         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
112         [EditorBrowsable(EditorBrowsableState.Never)]
113         public void SetTargetTexture(Texture texture)
114         {
115             Interop.CubeTransitionEffect.CubeTransitionEffect_SetTargetTexture(swigCPtr, Texture.getCPtr(texture));
116             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
117         }
118
119         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
120         [EditorBrowsable(EditorBrowsableState.Never)]
121         public void StartTransition(bool toNextImage = true)
122         {
123             Interop.CubeTransitionEffect.CubeTransitionEffect_StartTransition__SWIG1(swigCPtr, toNextImage);
124             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
125         }
126
127         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
128         [EditorBrowsable(EditorBrowsableState.Never)]
129         public void StartTransition(Vector2 panPosition, Vector2 panDisplacement)
130         {
131             Interop.CubeTransitionEffect.CubeTransitionEffect_StartTransition__SWIG2(swigCPtr, Vector2.getCPtr(panPosition), Vector2.getCPtr(panDisplacement));
132             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
133         }
134
135         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
136         [EditorBrowsable(EditorBrowsableState.Never)]
137         public void PauseTransition()
138         {
139             Interop.CubeTransitionEffect.CubeTransitionEffect_PauseTransition(swigCPtr);
140             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
141         }
142
143         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
144         [EditorBrowsable(EditorBrowsableState.Never)]
145         public void ResumeTransition()
146         {
147             Interop.CubeTransitionEffect.CubeTransitionEffect_ResumeTransition(swigCPtr);
148             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
149         }
150
151         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
152         [EditorBrowsable(EditorBrowsableState.Never)]
153         public void StopTransition()
154         {
155             Interop.CubeTransitionEffect.CubeTransitionEffect_StopTransition(swigCPtr);
156             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
157         }
158
159         CubeTransitionEffectSignal TransitionCompletedSignal()
160         {
161             CubeTransitionEffectSignal ret = new CubeTransitionEffectSignal(Interop.CubeTransitionEffect.CubeTransitionEffect_TransitionCompletedSignal(swigCPtr), false);
162             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
163             return ret;
164         }
165
166         /// <summary>
167         /// The TransitionCompleted event.
168         /// </summary>
169         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
170         [EditorBrowsable(EditorBrowsableState.Never)]
171         public event EventHandler<TransitionCompletedEventArgs> TransitionCompleted
172         {
173             add
174             {
175                 if (_transitionCompletedEventHandler == null)
176                 {
177                     _transitionCompletedCallbackDelegate = (OnTransitionCompleted);
178                     TransitionCompletedSignal().Connect(_transitionCompletedCallbackDelegate);
179                 }
180                 _transitionCompletedEventHandler += value;
181             }
182             remove
183             {
184                 _transitionCompletedEventHandler -= value;
185                 if (_transitionCompletedEventHandler == null && TransitionCompletedSignal().Empty() == false)
186                 {
187                     TransitionCompletedSignal().Disconnect(_transitionCompletedCallbackDelegate);
188                 }
189             }
190         }
191
192         private void OnTransitionCompleted(IntPtr cubeTransition, IntPtr cubeTexture)
193         {
194             TransitionCompletedEventArgs e = new TransitionCompletedEventArgs();
195
196             // Populate all members of "e" (TransitionCompletedEventArgs) with real data
197             //e.CubeTransitionEffect = Registry.GetManagedBaseHandleFromNativePtr(cubeTransition) as CubeTransitionEffect;
198
199             if (_transitionCompletedEventHandler != null)
200             {
201                 //here we send all data to user event handlers
202                 _transitionCompletedEventHandler(this, e);
203             }
204         }
205
206         /// <summary>
207         /// Dispose.
208         /// </summary>
209         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
210         [EditorBrowsable(EditorBrowsableState.Never)]
211         protected override void Dispose(DisposeTypes type)
212         {
213             if (disposed)
214             {
215                 return;
216             }
217
218             //Release your own unmanaged resources here.
219             //You should not access any managed member here except static instance.
220             //because the execution order of Finalizes is non-deterministic.
221
222             if (swigCPtr.Handle != global::System.IntPtr.Zero)
223             {
224                 if (swigCMemOwn)
225                 {
226                     swigCMemOwn = false;
227                     Interop.CubeTransitionEffect.delete_CubeTransitionEffect(swigCPtr);
228                 }
229                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
230             }
231
232             base.Dispose(type);
233         }
234
235         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
236         [EditorBrowsable(EditorBrowsableState.Never)]
237         public class TransitionCompletedEventArgs : EventArgs
238         {
239             private CubeTransitionEffect _cubeTransitionEffect;
240             private Texture _cubeTransitonTexture;
241
242             /// <summary>
243             /// CubeTransitionEffect.
244             /// </summary>
245             /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
246             [EditorBrowsable(EditorBrowsableState.Never)]
247             public CubeTransitionEffect CubeTransitionEffect
248             {
249                 get
250                 {
251                     return _cubeTransitionEffect;
252                 }
253                 set
254                 {
255                     _cubeTransitionEffect = value;
256                 }
257             }
258
259             /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
260             [EditorBrowsable(EditorBrowsableState.Never)]
261             public Texture CubeTransitonTexture
262             {
263                 get
264                 {
265                     return _cubeTransitonTexture;
266                 }
267                 set
268                 {
269                     _cubeTransitonTexture = value;
270                 }
271             }
272         }
273     }
274
275     internal class CubeTransitionEffectSignal : global::System.IDisposable
276     {
277         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
278         protected bool swigCMemOwn;
279
280         internal CubeTransitionEffectSignal(global::System.IntPtr cPtr, bool cMemoryOwn)
281         {
282             swigCMemOwn = cMemoryOwn;
283             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
284         }
285
286         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CubeTransitionEffectSignal obj)
287         {
288             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
289         }
290
291         //A Flag to check who called Dispose(). (By User or DisposeQueue)
292         private bool isDisposeQueued = false;
293         //A Flat to check if it is already disposed.
294         protected bool disposed = false;
295
296
297         ~CubeTransitionEffectSignal()
298         {
299             if (!isDisposeQueued)
300             {
301                 isDisposeQueued = true;
302                 DisposeQueue.Instance.Add(this);
303             }
304         }
305
306         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
307         [EditorBrowsable(EditorBrowsableState.Never)]
308         public bool Empty()
309         {
310             bool ret = Interop.CubeTransitionEffect.CubeTransitionEffectSignal_Empty(swigCPtr);
311             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
312             return ret;
313         }
314
315         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
316         [EditorBrowsable(EditorBrowsableState.Never)]
317         public uint GetConnectionCount()
318         {
319             uint ret = Interop.CubeTransitionEffect.CubeTransitionEffectSignal_GetConnectionCount(swigCPtr);
320             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
321             return ret;
322         }
323
324         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
325         [EditorBrowsable(EditorBrowsableState.Never)]
326         public void Connect(System.Delegate func)
327         {
328             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
329             {
330                 Interop.CubeTransitionEffect.CubeTransitionEffectSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
331                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
332             }
333         }
334
335         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
336         [EditorBrowsable(EditorBrowsableState.Never)]
337         public void Disconnect(System.Delegate func)
338         {
339             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
340             {
341                 Interop.CubeTransitionEffect.CubeTransitionEffectSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
342                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
343             }
344         }
345
346         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
347         [EditorBrowsable(EditorBrowsableState.Never)]
348         public void Emit(CubeTransitionEffect arg)
349         {
350             Interop.TextField.TextFieldSignal_Emit(swigCPtr, CubeTransitionEffect.getCPtr(arg));
351             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
352         }
353
354         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
355         [EditorBrowsable(EditorBrowsableState.Never)]
356         public CubeTransitionEffectSignal() : this(Interop.CubeTransitionEffect.new_CubeTransitionEffectSignal(), true)
357         {
358             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
359         }
360
361         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
362         [EditorBrowsable(EditorBrowsableState.Never)]
363         public void Dispose()
364         {
365             //Throw excpetion if Dispose() is called in separate thread.
366             if (!Window.IsInstalled())
367             {
368                 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
369             }
370
371             if (isDisposeQueued)
372             {
373                 Dispose(DisposeTypes.Implicit);
374             }
375             else
376             {
377                 Dispose(DisposeTypes.Explicit);
378                 System.GC.SuppressFinalize(this);
379             }
380         }
381
382         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
383         [EditorBrowsable(EditorBrowsableState.Never)]
384         protected virtual void Dispose(DisposeTypes type)
385         {
386             if (disposed)
387             {
388                 return;
389             }
390
391             if (type == DisposeTypes.Explicit)
392             {
393                 //Called by User
394                 //Release your own managed resources here.
395                 //You should release all of your own disposable objects here.
396
397             }
398
399             //Release your own unmanaged resources here.
400             //You should not access any managed member here except static instance.
401             //because the execution order of Finalizes is non-deterministic.
402
403             if (swigCPtr.Handle != global::System.IntPtr.Zero)
404             {
405                 if (swigCMemOwn)
406                 {
407                     swigCMemOwn = false;
408                     Interop.CubeTransitionEffect.delete_CubeTransitionEffectSignal(swigCPtr);
409                 }
410                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
411             }
412
413             disposed = true;
414         }
415     }
416
417     
418
419     /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
420     [EditorBrowsable(EditorBrowsableState.Never)]
421     public class CubeTransitionWaveEffect : CubeTransitionEffect
422     {
423         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
424
425         /// <summary>
426         /// The constructor.
427         /// </summary>
428         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
429         [EditorBrowsable(EditorBrowsableState.Never)]
430         public CubeTransitionWaveEffect(uint numRows, uint numColumns) : this(Interop.CubeTransitionWaveEffect.CubeTransitionWaveEffect_New(numRows, numColumns), true)
431         {
432             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
433         }
434
435         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CubeTransitionWaveEffect obj)
436         {
437             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
438         }
439
440         internal CubeTransitionWaveEffect(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.CubeTransitionWaveEffect.CubeTransitionWaveEffect_SWIGUpcast(cPtr), cMemoryOwn)
441         {
442             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
443         }
444
445         /// <summary>
446         /// Dispose.
447         /// </summary>
448         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
449         [EditorBrowsable(EditorBrowsableState.Never)]
450         protected override void Dispose(DisposeTypes type)
451         {
452             if (disposed)
453             {
454                 return;
455             }
456
457             if (type == DisposeTypes.Explicit)
458             {
459                 //Called by User
460                 //Release your own managed resources here.
461                 //You should release all of your own disposable objects here.
462
463             }
464
465             //Release your own unmanaged resources here.
466             //You should not access any managed member here except static instance.
467             //because the execution order of Finalizes is non-deterministic.
468
469             if (swigCPtr.Handle != global::System.IntPtr.Zero)
470             {
471                 if (swigCMemOwn)
472                 {
473                     swigCMemOwn = false;
474                     Interop.CubeTransitionWaveEffect.delete_CubeTransitionWaveEffect(swigCPtr);
475                 }
476                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
477             }
478
479             base.Dispose(type);
480         }
481     }
482
483     /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
484     [EditorBrowsable(EditorBrowsableState.Never)]
485     public class CubeTransitionCrossEffect : CubeTransitionEffect
486     {
487         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
488
489         /// <summary>
490         /// The constructor.
491         /// </summary>
492         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
493         [EditorBrowsable(EditorBrowsableState.Never)]
494         public CubeTransitionCrossEffect(uint numRows, uint numColumns) : this(Interop.CubeTransitionCrossEffect.CubeTransitionCrossEffect_New(numRows, numColumns), true)
495         {
496             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
497         }
498
499         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CubeTransitionCrossEffect obj)
500         {
501             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
502         }
503
504         internal CubeTransitionCrossEffect(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.CubeTransitionCrossEffect.CubeTransitionCrossEffect_SWIGUpcast(cPtr), cMemoryOwn)
505         {
506             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
507         }
508
509         /// <summary>
510         /// Dispose.
511         /// </summary>
512         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
513         [EditorBrowsable(EditorBrowsableState.Never)]
514         protected override void Dispose(DisposeTypes type)
515         {
516             if (disposed)
517             {
518                 return;
519             }
520
521             if (type == DisposeTypes.Explicit)
522             {
523                 //Called by User
524                 //Release your own managed resources here.
525                 //You should release all of your own disposable objects here.
526
527             }
528
529             //Release your own unmanaged resources here.
530             //You should not access any managed member here except static instance.
531             //because the execution order of Finalizes is non-deterministic.
532
533             if (swigCPtr.Handle != global::System.IntPtr.Zero)
534             {
535                 if (swigCMemOwn)
536                 {
537                     swigCMemOwn = false;
538                     Interop.CubeTransitionCrossEffect.delete_CubeTransitionCrossEffect(swigCPtr);
539                 }
540                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
541             }
542
543             base.Dispose(type);
544         }
545     }
546
547     /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
548     [EditorBrowsable(EditorBrowsableState.Never)]
549     public class CubeTransitionFoldEffect : CubeTransitionEffect
550     {
551         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
552
553         /// <summary>
554         /// The constructor.
555         /// </summary>
556         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
557         [EditorBrowsable(EditorBrowsableState.Never)]
558         public CubeTransitionFoldEffect(uint numRows, uint numColumns) : this(Interop.CubeTransitionFoldEffect.CubeTransitionFoldEffect_New(numRows, numColumns), true)
559         {
560             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
561         }
562
563         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CubeTransitionFoldEffect obj)
564         {
565             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
566         }
567
568         internal CubeTransitionFoldEffect(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.CubeTransitionWaveEffect.CubeTransitionWaveEffect_SWIGUpcast(cPtr), cMemoryOwn)
569         {
570             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
571         }
572
573         /// <summary>
574         /// Dispose.
575         /// </summary>
576         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
577         [EditorBrowsable(EditorBrowsableState.Never)]
578         protected override void Dispose(DisposeTypes type)
579         {
580             if (disposed)
581             {
582                 return;
583             }
584
585             if (type == DisposeTypes.Explicit)
586             {
587                 //Called by User
588                 //Release your own managed resources here.
589                 //You should release all of your own disposable objects here.
590
591             }
592
593             //Release your own unmanaged resources here.
594             //You should not access any managed member here except static instance.
595             //because the execution order of Finalizes is non-deterministic.
596
597             if (swigCPtr.Handle != global::System.IntPtr.Zero)
598             {
599                 if (swigCMemOwn)
600                 {
601                     swigCMemOwn = false;
602                     Interop.CubeTransitionFoldEffect.delete_CubeTransitionFoldEffect(swigCPtr);
603                 }
604                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
605             }
606
607             base.Dispose(type);
608         }
609     }
610 }