Bind some API for KeyFrames 34/294534/2
authorEunki, Hong <eunkiki.hong@samsung.com>
Wed, 21 Jun 2023 02:39:16 +0000 (11:39 +0900)
committerEunki Hong <eunkiki.hong@samsung.com>
Wed, 21 Jun 2023 03:44:29 +0000 (03:44 +0000)
Let we allow to change added keyframes.

Change-Id: I0dc53f1638186007f6c08970e423a0d8413f4141
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali-csharp-binder/src/dali-wrap.cpp

index 067ed27..e2b4d91 100644 (file)
@@ -24531,12 +24531,35 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_KeyFrames_Add__SWIG_1(void * jarg1, floa
 
 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_KeyFrames_GetKeyFrameCount(void* keyFrames)
 {
-  return (unsigned int) Dali::DevelKeyFrames::GetKeyFrameCount(*((Dali::KeyFrames*)keyFrames));
+  unsigned int jresult;
+  {
+    try {
+      jresult = Dali::DevelKeyFrames::GetKeyFrameCount(*((Dali::KeyFrames*)keyFrames));
+    } CALL_CATCH_EXCEPTION(0);
+  }
+  return jresult;
 }
 
 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_KeyFrames_GetKeyFrame(void* keyFrames, unsigned int index, float* time, void* value)
 {
-  Dali::DevelKeyFrames::GetKeyFrame(*((Dali::KeyFrames*)keyFrames), (size_t)index, *time, *((Property::Value*)value));
+  if (!value) {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Property::Value", 0);
+    return ;
+  }
+  try {
+    Dali::DevelKeyFrames::GetKeyFrame(*((Dali::KeyFrames*)keyFrames), (size_t)index, *time, *((Property::Value*)value));
+  } CALL_CATCH_EXCEPTION();
+}
+
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_KeyFrames_SetKeyFrameValue(void* keyFrames, unsigned int index, void* value)
+{
+  if (!value) {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Property::Value", 0);
+    return ;
+  }
+  try {
+    Dali::DevelKeyFrames::SetKeyFrameValue(*((Dali::KeyFrames*)keyFrames), (size_t)index, *((const Property::Value*)value));
+  } CALL_CATCH_EXCEPTION();
 }
 
 SWIGEXPORT int SWIGSTDCALL CSharp_Dali_Path_Property_POINTS_get() {