From 38ab23086294bd3336638db04c5ac621be766877 Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Wed, 21 Jun 2023 11:39:16 +0900 Subject: [PATCH] Bind some API for KeyFrames Let we allow to change added keyframes. Change-Id: I0dc53f1638186007f6c08970e423a0d8413f4141 Signed-off-by: Eunki, Hong --- dali-csharp-binder/src/dali-wrap.cpp | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/dali-csharp-binder/src/dali-wrap.cpp b/dali-csharp-binder/src/dali-wrap.cpp index 067ed27..e2b4d91 100644 --- a/dali-csharp-binder/src/dali-wrap.cpp +++ b/dali-csharp-binder/src/dali-wrap.cpp @@ -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() { -- 2.7.4