Add binding for NativeImageSource.SetSource API 34/315234/1
authorSeungkeun <sngn.lee@samsung.com>
Mon, 29 Jul 2024 01:01:39 +0000 (10:01 +0900)
committerSeungkeun <sngn.lee@samsung.com>
Mon, 29 Jul 2024 01:01:39 +0000 (10:01 +0900)
Change-Id: Ice75f31212d753c2b23982774837960d81d43590

dali-csharp-binder/dali-adaptor/dali-adaptor-wrap.cpp

index 6514f874da274748111d8414583594a85c9103d4..877afde6a16eacdb2ffc883c4aec86470c590d5d 100644 (file)
@@ -1362,6 +1362,32 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_NativeImageSource_Delete(void* jarg1) {
   }
 }
 
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_NativeImageSource_SetSource(void* jarg1, void* jarg2)
+{
+  NativeImageSource* pImage = (NativeImageSource*)jarg1;
+  Any source = (Any)jarg2;
+
+  try {
+    pImage->SetSource(source);
+  }
+  catch (std::out_of_range & e) {
+    SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what()));
+    return;
+  }
+  catch (std::exception & e) {
+    SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what()));
+    return;
+  }
+  catch (Dali::DaliException e) {
+    SWIG_CSharpException(SWIG_UnknownError, e.condition);
+    return;
+  }
+  catch (...) {
+    SWIG_CSharpException(SWIG_UnknownError, "unknown error");
+    return;
+  }
+}
+
 SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_NativeImageSource_AcquireBuffer(void* jarg1, int* jarg2, int* jarg3, int* jarg4)
 {
   void* jresult;