Update CSharp_Dali_NativeImageSource_SetSource 54/315954/1
authorSeungkeun <sngn.lee@samsung.com>
Mon, 12 Aug 2024 04:04:28 +0000 (13:04 +0900)
committerSeungkeun <sngn.lee@samsung.com>
Mon, 12 Aug 2024 04:10:39 +0000 (13:10 +0900)
 - Updated API signature to use tbm_surface_h
 - Moved code place into tizen dependent place

Change-Id: I15d8d33ffe80829e964ebd8111490c3d1f217b27

dali-csharp-binder/common/tizen-dependency-wrap.cpp
dali-csharp-binder/dali-adaptor/dali-adaptor-wrap.cpp

index 06eb44c88ca84763d21d2139baa482c87ecdf469..7d0ac428dfd7de4770a70b0cc469983a972b848f 100644 (file)
@@ -47,6 +47,33 @@ SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_new_Texture_TbmSurface(tbm_surface_h tb
   return (void*)jresult;\r
 }\r
 \r
+\r
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_NativeImageSource_SetSource(void* jarg1, tbm_surface_h jarg2)\r
+{\r
+  Dali::NativeImageSource* pImage = (Dali::NativeImageSource*)jarg1;\r
+  Dali::Any source = (Dali::Any)jarg2;\r
+\r
+  try {\r
+    pImage->SetSource(source);\r
+  }\r
+  catch (std::out_of_range & e) {\r
+    SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what()));\r
+    return;\r
+  }\r
+  catch (std::exception & e) {\r
+    SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what()));\r
+    return;\r
+  }\r
+  catch (Dali::DaliException e) {\r
+    SWIG_CSharpException(SWIG_UnknownError, e.condition);\r
+    return;\r
+  }\r
+  catch (...) {\r
+    SWIG_CSharpException(SWIG_UnknownError, "unknown error");\r
+    return;\r
+  }\r
+}\r
+\r
 #ifdef __cplusplus\r
 }\r
 #endif\r
index 877afde6a16eacdb2ffc883c4aec86470c590d5d..6514f874da274748111d8414583594a85c9103d4 100644 (file)
@@ -1362,32 +1362,6 @@ 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;