Binds Spring AlphaFunction. 61/323861/3
authorSeungho Baek <sbsh.baek@samsung.com>
Thu, 8 May 2025 07:07:51 +0000 (16:07 +0900)
committerSeungho Baek <sbsh.baek@samsung.com>
Thu, 8 May 2025 07:45:15 +0000 (16:45 +0900)
Change-Id: I70b332737d75a40b61474d3c7ab377f28b80f7af
Signed-off-by: Seungho Baek <sbsh.baek@samsung.com>
dali-csharp-binder/common/dali-wrap.cpp
dali-csharp-binder/dali-core/alpha-function-spring-data-wrap.cpp [new file with mode: 0644]
dali-csharp-binder/dali-core/alpha-function-wrap.cpp [new file with mode: 0644]
dali-csharp-binder/file.list

index 1910abc90e5512f6b9acdf6384106ac363b46efa..6adf42c2179bd4f55b9e7514e16aadaff4ff1e77 100644 (file)
@@ -16694,148 +16694,6 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_TapGesture_localPoint_get(void * jarg1
 }
 
 
-SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_AlphaFunction__SWIG_0() {
-  void * jresult ;
-  Dali::AlphaFunction *result = 0 ;
-
-  {
-    try {
-      result = (Dali::AlphaFunction *)new Dali::AlphaFunction();
-    } CALL_CATCH_EXCEPTION(0);
-  }
-
-  jresult = (void *)result;
-  return jresult;
-}
-
-
-SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_AlphaFunction__SWIG_1(int jarg1) {
-  void * jresult ;
-  Dali::AlphaFunction::BuiltinFunction arg1 ;
-  Dali::AlphaFunction *result = 0 ;
-
-  arg1 = (Dali::AlphaFunction::BuiltinFunction)jarg1;
-  {
-    try {
-      result = (Dali::AlphaFunction *)new Dali::AlphaFunction(arg1);
-    } CALL_CATCH_EXCEPTION(0);
-  }
-
-  jresult = (void *)result;
-  return jresult;
-}
-
-
-SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_AlphaFunction__SWIG_2(void * jarg1) {
-  void * jresult ;
-  Dali::AlphaFunctionPrototype arg1 = (Dali::AlphaFunctionPrototype) 0 ;
-  Dali::AlphaFunction *result = 0 ;
-
-  arg1 = (Dali::AlphaFunctionPrototype)jarg1;
-  {
-    try {
-      result = (Dali::AlphaFunction *)new Dali::AlphaFunction(arg1);
-    } CALL_CATCH_EXCEPTION(0);
-  }
-
-  jresult = (void *)result;
-  return jresult;
-}
-
-
-SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_AlphaFunction__SWIG_3(void * jarg1, void * jarg2) {
-  void * jresult ;
-  Dali::Vector2 *arg1 = 0 ;
-  Dali::Vector2 *arg2 = 0 ;
-  Dali::AlphaFunction *result = 0 ;
-
-  arg1 = (Dali::Vector2 *)jarg1;
-  if (!arg1) {
-    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector2 const & type is null", 0);
-    return 0;
-  }
-  arg2 = (Dali::Vector2 *)jarg2;
-  if (!arg2) {
-    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector2 const & type is null", 0);
-    return 0;
-  }
-  {
-    try {
-      result = (Dali::AlphaFunction *)new Dali::AlphaFunction((Dali::Vector2 const &)*arg1,(Dali::Vector2 const &)*arg2);
-    } CALL_CATCH_EXCEPTION(0);
-  }
-
-  jresult = (void *)result;
-  return jresult;
-}
-
-
-SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_AlphaFunction_GetBezierControlPoints(void * jarg1) {
-  void * jresult ;
-  Dali::AlphaFunction *arg1 = (Dali::AlphaFunction *) 0 ;
-  Dali::Vector4 result;
-
-  arg1 = (Dali::AlphaFunction *)jarg1;
-  {
-    try {
-      result = ((Dali::AlphaFunction const *)arg1)->GetBezierControlPoints();
-    } CALL_CATCH_EXCEPTION(0);
-  }
-
-  jresult = new Dali::Vector4((const Dali::Vector4 &)result);
-  return jresult;
-}
-
-
-
-
-SWIGEXPORT int SWIGSTDCALL CSharp_Dali_AlphaFunction_GetBuiltinFunction(void * jarg1) {
-  int jresult ;
-  Dali::AlphaFunction *arg1 = (Dali::AlphaFunction *) 0 ;
-  Dali::AlphaFunction::BuiltinFunction result;
-
-  arg1 = (Dali::AlphaFunction *)jarg1;
-  {
-    try {
-      result = (Dali::AlphaFunction::BuiltinFunction)((Dali::AlphaFunction const *)arg1)->GetBuiltinFunction();
-    } CALL_CATCH_EXCEPTION(0);
-  }
-
-  jresult = (int)result;
-  return jresult;
-}
-
-
-SWIGEXPORT int SWIGSTDCALL CSharp_Dali_AlphaFunction_GetMode(void * jarg1) {
-  int jresult ;
-  Dali::AlphaFunction *arg1 = (Dali::AlphaFunction *) 0 ;
-  Dali::AlphaFunction::Mode result;
-
-  arg1 = (Dali::AlphaFunction *)jarg1;
-  {
-    try {
-      result = (Dali::AlphaFunction::Mode)((Dali::AlphaFunction const *)arg1)->GetMode();
-    } CALL_CATCH_EXCEPTION(0);
-  }
-
-  jresult = (int)result;
-  return jresult;
-}
-
-
-SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_AlphaFunction(void * jarg1) {
-  Dali::AlphaFunction *arg1 = (Dali::AlphaFunction *) 0 ;
-
-  arg1 = (Dali::AlphaFunction *)jarg1;
-  {
-    try {
-      delete arg1;
-    } CALL_CATCH_EXCEPTION();
-  }
-
-}
-
-
 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_KeyFrames_New() {
   void * jresult ;
   Dali::KeyFrames result;
diff --git a/dali-csharp-binder/dali-core/alpha-function-spring-data-wrap.cpp b/dali-csharp-binder/dali-core/alpha-function-spring-data-wrap.cpp
new file mode 100644 (file)
index 0000000..ebc85cd
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <dali/public-api/animation/spring-data.h>
+#include <cstdint>
+
+// INTERNAL INCLUDES
+#include <dali-csharp-binder/common/common.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+SWIGEXPORT float SWIGSTDCALL CSharp_Dali_AlphaFunctionSpringData_GetDuration(float stiffness, float damping, float mass)
+{
+  float duration = 0.0f;
+
+  Dali::SpringData springData(stiffness, damping, mass);
+  {
+    try
+    {
+      duration = springData.GetDuration();
+    }
+    CALL_CATCH_EXCEPTION(0);
+  }
+
+  return duration;
+}
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/dali-csharp-binder/dali-core/alpha-function-wrap.cpp b/dali-csharp-binder/dali-core/alpha-function-wrap.cpp
new file mode 100644 (file)
index 0000000..e811e3c
--- /dev/null
@@ -0,0 +1,215 @@
+/*
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <dali/public-api/animation/alpha-function.h>
+#include <cstdint>
+
+// INTERNAL INCLUDES
+#include <dali-csharp-binder/common/common.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_new_AlphaFunction_0()
+{
+  void*                jresult;
+  Dali::AlphaFunction* result = 0;
+
+  {
+    try
+    {
+      result = (Dali::AlphaFunction*)new Dali::AlphaFunction();
+    }
+    CALL_CATCH_EXCEPTION(0);
+  }
+
+  jresult = (void*)result;
+  return jresult;
+}
+
+SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_new_AlphaFunction_BuiltInFunction(int csBuiltInFunction)
+{
+  void*                                jresult;
+  Dali::AlphaFunction::BuiltinFunction builtInFunction;
+  Dali::AlphaFunction*                 result = 0;
+
+  builtInFunction = (Dali::AlphaFunction::BuiltinFunction)csBuiltInFunction;
+  {
+    try
+    {
+      result = (Dali::AlphaFunction*)new Dali::AlphaFunction(builtInFunction);
+    }
+    CALL_CATCH_EXCEPTION(0);
+  }
+
+  jresult = (void*)result;
+  return jresult;
+}
+
+SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_new_AlphaFunction_CustomAlphaFunction(void* csAlphaFunction)
+{
+  void*                        jresult;
+  Dali::AlphaFunctionPrototype alphaFunction = (Dali::AlphaFunctionPrototype)csAlphaFunction;
+  Dali::AlphaFunction*         result        = 0;
+  {
+    try
+    {
+      result = (Dali::AlphaFunction*)new Dali::AlphaFunction(alphaFunction);
+    }
+    CALL_CATCH_EXCEPTION(0);
+  }
+
+  jresult = (void*)result;
+  return jresult;
+}
+
+SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_new_AlphaFunction_Bezier(void* csControlPoint0, void* csControlPoint1)
+{
+  void*                jresult;
+  Dali::AlphaFunction* result = 0;
+
+  Dali::Vector2* controlPoint0 = (Dali::Vector2*)csControlPoint0;
+  if(!controlPoint0)
+  {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector2 const & type is null", 0);
+    return 0;
+  }
+  Dali::Vector2* controlPoint1 = (Dali::Vector2*)csControlPoint1;
+  if(!controlPoint1)
+  {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector2 const & type is null", 0);
+    return 0;
+  }
+  {
+    try
+    {
+      result = (Dali::AlphaFunction*)new Dali::AlphaFunction((Dali::Vector2 const&)*controlPoint0, (Dali::Vector2 const&)*controlPoint1);
+    }
+    CALL_CATCH_EXCEPTION(0);
+  }
+
+  jresult = (void*)result;
+  return jresult;
+}
+
+SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_new_AlphaFunction_BuiltInSpring(int csSpringType)
+{
+  void*                jresult;
+  Dali::AlphaFunction* result = 0;
+
+  Dali::AlphaFunction::SpringType springType = (Dali::AlphaFunction::SpringType)csSpringType;
+  {
+    try
+    {
+      result = (Dali::AlphaFunction*)new Dali::AlphaFunction(springType);
+    }
+    CALL_CATCH_EXCEPTION(0);
+  }
+
+  jresult = (void*)result;
+  return jresult;
+}
+
+SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_new_AlphaFunction_CustomSpring(float stiffness, float damping, float mass)
+{
+  void*                jresult;
+  Dali::AlphaFunction* result = 0;
+
+  Dali::SpringData springData(stiffness, damping, mass);
+  {
+    try
+    {
+      result = (Dali::AlphaFunction*)new Dali::AlphaFunction(springData);
+    }
+    CALL_CATCH_EXCEPTION(0);
+  }
+
+  jresult = (void*)result;
+  return jresult;
+}
+
+SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_AlphaFunction_GetBezierControlPoints(void* csAlphaFunction)
+{
+  void*         jresult;
+  Dali::Vector4 result;
+
+  Dali::AlphaFunction* alphaFunction = (Dali::AlphaFunction*)csAlphaFunction;
+  {
+    try
+    {
+      result = ((Dali::AlphaFunction const*)alphaFunction)->GetBezierControlPoints();
+    }
+    CALL_CATCH_EXCEPTION(0);
+  }
+
+  jresult = new Dali::Vector4((const Dali::Vector4&)result);
+  return jresult;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_Dali_AlphaFunction_GetBuiltinFunction(void* csAlphaFunction)
+{
+  int                                  jresult;
+  Dali::AlphaFunction::BuiltinFunction result;
+
+  Dali::AlphaFunction* alphaFunction = (Dali::AlphaFunction*)csAlphaFunction;
+  {
+    try
+    {
+      result = (Dali::AlphaFunction::BuiltinFunction)((Dali::AlphaFunction const*)alphaFunction)->GetBuiltinFunction();
+    }
+    CALL_CATCH_EXCEPTION(0);
+  }
+
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_Dali_AlphaFunction_GetMode(void* csAlphaFunction)
+{
+  int                       jresult;
+  Dali::AlphaFunction::Mode result;
+
+  Dali::AlphaFunction* alphaFunction = (Dali::AlphaFunction*)csAlphaFunction;
+  {
+    try
+    {
+      result = (Dali::AlphaFunction::Mode)((Dali::AlphaFunction const*)alphaFunction)->GetMode();
+    }
+    CALL_CATCH_EXCEPTION(0);
+  }
+
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_AlphaFunction(void* csAlphaFunction)
+{
+  Dali::AlphaFunction* alphaFunction = (Dali::AlphaFunction*)csAlphaFunction;
+  {
+    try
+    {
+      delete alphaFunction;
+    }
+    CALL_CATCH_EXCEPTION();
+  }
+}
+
+#ifdef __cplusplus
+}
+#endif
index c52419e8ad03a7f24cee0095af31754af335b2ba..110beb498d43610b7cf957f9dca8545667f37760 100755 (executable)
@@ -24,6 +24,8 @@ SET( dali_csharp_binder_common_src_files
 
   ${dali_csharp_binder_dir}/dali-core/dali-core-wrap.cpp
   ${dali_csharp_binder_dir}/dali-core/actor-wrap.cpp
+  ${dali_csharp_binder_dir}/dali-core/alpha-function-spring-data-wrap.cpp
+  ${dali_csharp_binder_dir}/dali-core/alpha-function-wrap.cpp
   ${dali_csharp_binder_dir}/dali-core/animation-wrap.cpp
   ${dali_csharp_binder_dir}/dali-core/capabilities-wrap.cpp
   ${dali_csharp_binder_dir}/dali-core/constraint-wrap.cpp