Refactor dali-csharp-binder source files
[platform/core/uifw/dali-csharp-binder.git] / dali-csharp-binder / dali-toolkit / fade-transition-wrap.cpp
1 /*
2  * Copyright (c) 2021 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 // EXTERNAL INCLUDES
19 #include <dali-toolkit/public-api/transition/fade-transition.h>
20
21 // INTERNAL INCLUDES
22 #include <dali-csharp-binder/common/common.h>
23
24 #ifdef __cplusplus
25 extern "C"
26 {
27 #endif
28
29   SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_new_FadeTransition()
30   {
31     void *jresult;
32     Dali::Toolkit::FadeTransition *result = 0;
33
34     {
35       try
36       {
37         result = (Dali::Toolkit::FadeTransition *)new Dali::Toolkit::FadeTransition();
38       }
39       CALL_CATCH_EXCEPTION(0);
40     }
41
42     jresult = (void *)result;
43     return jresult;
44   }
45
46   SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_FadeTransition_New(void *nuiControl, float nuiOpaicty, void *nuiTimePeriod)
47   {
48     void *jresult;
49     Dali::Toolkit::Control *control = (Dali::Toolkit::Control *)nuiControl;
50     float opacity = nuiOpaicty;
51     Dali::TimePeriod *timePeriod = (Dali::TimePeriod *)nuiTimePeriod;
52
53     Dali::Toolkit::FadeTransition result;
54
55     {
56       try
57       {
58         result = Dali::Toolkit::FadeTransition::New(*control, opacity, *timePeriod);
59       }
60       CALL_CATCH_EXCEPTION(0);
61     }
62
63     jresult = new Dali::Toolkit::FadeTransition((const Dali::Toolkit::FadeTransition &)result);
64     return jresult;
65   }
66
67   SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_FadeTransition(void *nuiFadeTransition)
68   {
69     Dali::Toolkit::FadeTransition *fade = (Dali::Toolkit::FadeTransition *)0;
70
71     fade = (Dali::Toolkit::FadeTransition *)nuiFadeTransition;
72     {
73       try
74       {
75         delete fade;
76       }
77       CALL_CATCH_EXCEPTION();
78     }
79   }
80
81   SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_new_FadeTransition_Set(void *nuiFadeTransition)
82   {
83     Dali::Toolkit::FadeTransition *newFadeTransition = 0;
84     Dali::Toolkit::FadeTransition *fade = (Dali::Toolkit::FadeTransition *)nuiFadeTransition;
85     if (!fade)
86     {
87       SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Toolkit::FadeTransition const & type is null", 0);
88       return 0;
89     }
90     {
91       try
92       {
93         newFadeTransition = (Dali::Toolkit::FadeTransition *)new Dali::Toolkit::FadeTransition((Dali::Toolkit::FadeTransition const &)*fade);
94       }
95       CALL_CATCH_EXCEPTION(0);
96     }
97     void *result;
98     result = (void *)newFadeTransition;
99     return result;
100   }
101
102   SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_FadeTransition_Assign(void *nuiDestination, void *nuiSource)
103   {
104     void *jresult;
105     Dali::Toolkit::FadeTransition *destination = (Dali::Toolkit::FadeTransition *)0;
106     Dali::Toolkit::FadeTransition *source = 0;
107     Dali::Toolkit::FadeTransition *result = 0;
108
109     destination = (Dali::Toolkit::FadeTransition *)nuiDestination;
110     source = (Dali::Toolkit::FadeTransition *)nuiSource;
111
112     if (!source)
113     {
114       SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Toolkit::FadeTransition const & type is null", 0);
115       return 0;
116     }
117     {
118       try
119       {
120         result = (Dali::Toolkit::FadeTransition *)&(destination)->operator=((Dali::Toolkit::FadeTransition const &)*source);
121       }
122       CALL_CATCH_EXCEPTION(0);
123     }
124
125     jresult = (void *)result;
126     return jresult;
127   }
128
129 #ifdef __cplusplus
130 }
131 #endif