[Tizen] Bind some API for KeyFrames 21/296921/2
authorEunki, Hong <eunkiki.hong@samsung.com>
Wed, 21 Jun 2023 02:39:16 +0000 (11:39 +0900)
committerseungho baek <sbsh.baek@samsung.com>
Wed, 23 Aug 2023 04:53:03 +0000 (13:53 +0900)
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 239a7c2..52dfd50 100644 (file)
@@ -28685,12 +28685,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() {