Binds SceneView Capture 77/316077/4
authorSeungho Baek <sbsh.baek@samsung.com>
Tue, 13 Aug 2024 08:27:31 +0000 (17:27 +0900)
committerSeungho Baek <sbsh.baek@samsung.com>
Wed, 14 Aug 2024 05:54:23 +0000 (14:54 +0900)
Change-Id: I1e5571d5b26de09dc2d5f52bcf3109b00019e64d
Signed-off-by: Seungho Baek <sbsh.baek@samsung.com>
dali-csharp-binder/dali-scene3d/scene-view-wrap.cpp

index 2f4440a..2c541fb 100755 (executable)
@@ -649,7 +649,6 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_SceneView_StartCameraTransition_Index(vo
     }
     CALL_CATCH_EXCEPTION();
   }
-  return;
 }
 
 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_SceneView_StartCameraTransition_Name(void* csSceneView, char* name, int durationMilliSeconds, void* csAlphaFunction)
@@ -675,7 +674,38 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_SceneView_StartCameraTransition_Name(voi
     }
     CALL_CATCH_EXCEPTION();
   }
-  return;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_Dali_SceneView_Capture(void* csSceneView, void* csCamera, void* csSize)
+{
+  Dali::Scene3D::SceneView* sceneView = (Dali::Scene3D::SceneView*)csSceneView;
+  Dali::CameraActor*        camera    = (Dali::CameraActor*)csCamera;
+  Dali::Vector2*            size      = (Dali::Vector2*)csSize;
+  int                       captureId = 0;
+
+  if(!sceneView)
+  {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Scene3D::SceneView", 0);
+    return 0;
+  }
+  if(!camera)
+  {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::CameraActor", 0);
+    return 0;
+  }
+  if(!size)
+  {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Vector2", 0);
+    return 0;
+  }
+  {
+    try
+    {
+      captureId = sceneView->Capture(*camera, *size);
+    }
+    CALL_CATCH_EXCEPTION(0);
+  }
+  return captureId;
 }
 
 // Signals
@@ -687,6 +717,10 @@ GENERATE_SCENE_VIEW_SIGNAL(void (*)(Dali::Scene3D::SceneView), CameraTransitionF
 // CSharp_Dali_SceneView_CameraTransitionFinishedSignal_Connect
 // CSharp_Dali_SceneView_CameraTransitionFinishedSignal_Disconnect
 
+GENERATE_SCENE_VIEW_SIGNAL(void (*)(Dali::Scene3D::SceneView, int32_t, Dali::Toolkit::ImageUrl const&), CaptureFinishedSignal)
+// CSharp_Dali_SceneView_CaptureFinishedSignal_Connect
+// CSharp_Dali_SceneView_CaptureFinishedSignal_Disconnect
+
 #ifdef __cplusplus
 }
 #endif