[dali_2.3.30] Merge branch 'devel/master'
[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
30   SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_FadeTransition_New(void *nuiControl, float nuiOpaicty, void *nuiTimePeriod)
31   {
32     void *jresult;
33     Dali::Toolkit::Control *control = (Dali::Toolkit::Control *)nuiControl;
34     float opacity = nuiOpaicty;
35     Dali::TimePeriod *timePeriod = (Dali::TimePeriod *)nuiTimePeriod;
36
37     Dali::Toolkit::FadeTransition result;
38
39     {
40       try
41       {
42         result = Dali::Toolkit::FadeTransition::New(*control, opacity, *timePeriod);
43       }
44       CALL_CATCH_EXCEPTION(0);
45     }
46
47     jresult = new Dali::Toolkit::FadeTransition((const Dali::Toolkit::FadeTransition &)result);
48     return jresult;
49   }
50
51   SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_FadeTransition(void *nuiFadeTransition)
52   {
53     Dali::Toolkit::FadeTransition *fade = (Dali::Toolkit::FadeTransition *)0;
54
55     fade = (Dali::Toolkit::FadeTransition *)nuiFadeTransition;
56     {
57       try
58       {
59         delete fade;
60       }
61       CALL_CATCH_EXCEPTION();
62     }
63   }
64
65   SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_new_FadeTransition_Set(void *nuiFadeTransition)
66   {
67     Dali::Toolkit::FadeTransition *newFadeTransition = 0;
68     Dali::Toolkit::FadeTransition *fade = (Dali::Toolkit::FadeTransition *)nuiFadeTransition;
69     if (!fade)
70     {
71       SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Toolkit::FadeTransition const & type is null", 0);
72       return 0;
73     }
74     {
75       try
76       {
77         newFadeTransition = (Dali::Toolkit::FadeTransition *)new Dali::Toolkit::FadeTransition((Dali::Toolkit::FadeTransition const &)*fade);
78       }
79       CALL_CATCH_EXCEPTION(0);
80     }
81     void *result;
82     result = (void *)newFadeTransition;
83     return result;
84   }
85
86   SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_FadeTransition_Assign(void *nuiDestination, void *nuiSource)
87   {
88     void *jresult;
89     Dali::Toolkit::FadeTransition *destination = (Dali::Toolkit::FadeTransition *)0;
90     Dali::Toolkit::FadeTransition *source = 0;
91     Dali::Toolkit::FadeTransition *result = 0;
92
93     destination = (Dali::Toolkit::FadeTransition *)nuiDestination;
94     source = (Dali::Toolkit::FadeTransition *)nuiSource;
95
96     if (!source)
97     {
98       SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Toolkit::FadeTransition const & type is null", 0);
99       return 0;
100     }
101     {
102       try
103       {
104         result = (Dali::Toolkit::FadeTransition *)&(destination)->operator=((Dali::Toolkit::FadeTransition const &)*source);
105       }
106       CALL_CATCH_EXCEPTION(0);
107     }
108
109     jresult = (void *)result;
110     return jresult;
111   }
112
113 #ifdef __cplusplus
114 }
115 #endif