From bbd1d71a45e1c365251e450879a24b0455e838ed Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Wed, 28 Apr 2021 15:35:10 +0900 Subject: [PATCH] Add CanvasRenderer::DrawableGroup binder [APIs] New AddDrawable Clear Change-Id: Iab5494cc988fd89f55836f1ff53a3cef06a9ccde --- dali-csharp-binder/src/canvas-view.cpp | 77 ++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/dali-csharp-binder/src/canvas-view.cpp b/dali-csharp-binder/src/canvas-view.cpp index 78874b22..a151fc6d 100644 --- a/dali-csharp-binder/src/canvas-view.cpp +++ b/dali-csharp-binder/src/canvas-view.cpp @@ -7,6 +7,7 @@ // INCLUDES #include "common.h" #include +#include using namespace Dali; using namespace Dali::Toolkit; @@ -842,6 +843,82 @@ SWIGEXPORT int SWIGSTDCALL CSharp_Dali_Shape_GetStrokeJoin(char *jarg1) { return (int)result; } +// Dali::CanvasRenderer::DrawableGroup Wrapper + +SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_DrawableGroup_New() { + void *jresult; + Dali::CanvasRenderer::DrawableGroup result; + + { + try { + result = Dali::CanvasRenderer::DrawableGroup::New(); + } + CALL_CATCH_EXCEPTION(0); + } + + jresult = new Dali::CanvasRenderer::DrawableGroup( + (const Dali::CanvasRenderer::DrawableGroup &)result); + + return jresult; +} + +SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_DrawableGroup_AddDrawable(char *jarg1, + char *jarg2) { + Dali::CanvasRenderer::DrawableGroup arg1; + Dali::CanvasRenderer::DrawableGroup *argp1; + Dali::CanvasRenderer::Drawable arg2; + Dali::CanvasRenderer::Drawable *argp2; + bool result = true; + + argp1 = (Dali::CanvasRenderer::DrawableGroup *)jarg1; + if (!argp1) { + SWIG_CSharpSetPendingExceptionArgument( + SWIG_CSharpArgumentNullException, + "Attempt to dereference null Dali::CanvasRenderer::DrawableGroup", 0); + return false; + } + arg1 = *argp1; + + argp2 = (Dali::CanvasRenderer::Drawable *)jarg2; + if (!argp2) { + SWIG_CSharpSetPendingExceptionArgument( + SWIG_CSharpArgumentNullException, + "Attempt to dereference null Dali::CanvasRenderer::Drawable", 0); + return false; + } + arg2 = *argp2; + { + try { + arg1.AddDrawable(arg2); + } + CALL_CATCH_EXCEPTION(0); + } + + return result; +} + +SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_DrawableGroup_Clear(char *jarg1) { + Dali::CanvasRenderer::DrawableGroup *argp1; + bool result = false; + + argp1 = (Dali::CanvasRenderer::DrawableGroup *)jarg1; + if (!argp1) { + SWIG_CSharpSetPendingExceptionArgument( + SWIG_CSharpArgumentNullException, + "Attempt to dereference null Dali::CanvasRenderer::DrawableGroup", 0); + return false; + } + + { + try { + result = argp1->Clear(); + } + CALL_CATCH_EXCEPTION(0); + } + + return result; +} + #ifdef __cplusplus } // end extern "C" #endif -- 2.34.1