From: ssabah Date: Wed, 14 Dec 2022 21:30:22 +0000 (+0300) Subject: [NUI] Spannable Module: Wrap StrikethroughSpan Class X-Git-Tag: dali_2.2.10~3^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f15e12033c3b1856802a91854c42b31a9c729e56;p=platform%2Fcore%2Fuifw%2Fdali-csharp-binder.git [NUI] Spannable Module: Wrap StrikethroughSpan Class Wrap and bind FontSpan Class and FontSpan methods: - New - GetColor - IsColorDefined - GetHeight - IsHeightDefined This patch should be preceded by the patch below: https://review.tizen.org/gerrit/c/platform/core/uifw/dali-csharp-binder/+/285029 Change-Id: Ibccf7d60c7ee32a5d24f7490b2d47ab7cfd8794c --- diff --git a/dali-csharp-binder/src/text-spans-wrap.cpp b/dali-csharp-binder/src/text-spans-wrap.cpp index 68765aa1..9b8f33e8 100644 --- a/dali-csharp-binder/src/text-spans-wrap.cpp +++ b/dali-csharp-binder/src/text-spans-wrap.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -816,7 +817,6 @@ SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_UnderlineSpan_GetColor(void *refSpan) { try { result = spanPtr->GetColor(); } - CALL_CATCH_EXCEPTION(0); } @@ -920,14 +920,12 @@ CSharp_Dali_UnderlineSpan_GetHeight(void *refSpan) { } { - try { result = spanPtr->GetHeight(); } CALL_CATCH_EXCEPTION(0); } - return result; } @@ -1064,6 +1062,169 @@ CSharp_Dali_UnderlineSpan_IsDashWidthDefined(void *refSpan) { return result; } +// StrikethroughSpan + +SWIGEXPORT void SWIGSTDCALL +CSharp_Dali_delete_StrikethroughSpan(void *refSpan) { + + StrikethroughSpan *spanPtr = (StrikethroughSpan *)0; + spanPtr = (StrikethroughSpan *)refSpan; + { + try { + delete spanPtr; + } + + CALL_CATCH_EXCEPTION(); + } +} + +SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_StrikethroughSpan_New() { + + StrikethroughSpan *spanPtr = 0; + { + try { + spanPtr = + (StrikethroughSpan *)new StrikethroughSpan(StrikethroughSpan::New()); + } + + CALL_CATCH_EXCEPTION(0); + } + + return (void *)spanPtr; +} + +SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_StrikethroughSpan_New_color_height( + void *argColor, float argHeight) { + + float height = (float)argHeight; + Dali::Vector4 *colorPtr = 0; + colorPtr = (Dali::Vector4 *)argColor; + + if (!colorPtr) { + SWIG_CSharpSetPendingExceptionArgument( + SWIG_CSharpArgumentNullException, + "Attempt to dereference null Dali::Vector4", 0); + + return 0; + } + + StrikethroughSpan *spanPtr = 0; + { + try { + spanPtr = (StrikethroughSpan *)new StrikethroughSpan( + StrikethroughSpan::New((Dali::Vector4 const &)*colorPtr, height)); + } + + CALL_CATCH_EXCEPTION(0); + } + + return (void *)spanPtr; +} + +SWIGEXPORT void *SWIGSTDCALL +CSharp_Dali_StrikethroughSpan_GetColor(void *refSpan) { + + StrikethroughSpan *spanPtr; + Dali::Vector4 result; + + spanPtr = (StrikethroughSpan *)refSpan; + if (!spanPtr) { + SWIG_CSharpSetPendingExceptionArgument( + SWIG_CSharpArgumentNullException, + "Attempt to dereference null StrikethroughSpan", 0); + + return 0; + } + + { + try { + result = spanPtr->GetColor(); + } + + CALL_CATCH_EXCEPTION(0); + } + + return new Dali::Vector4((const Dali::Vector4 &)result); +} + +SWIGEXPORT bool SWIGSTDCALL +CSharp_Dali_StrikethroughSpan_IsColorDefined(void *refSpan) { + + StrikethroughSpan *spanPtr; + bool result = false; + + spanPtr = (StrikethroughSpan *)refSpan; + if (!spanPtr) { + SWIG_CSharpSetPendingExceptionArgument( + SWIG_CSharpArgumentNullException, + "Attempt to dereference null StrikethroughSpan", 0); + + return 0; + } + + { + try { + result = spanPtr->IsColorDefined(); + } + + CALL_CATCH_EXCEPTION(0); + } + + return result; +} + +SWIGEXPORT float SWIGSTDCALL +CSharp_Dali_StrikethroughSpan_GetHeight(void *refSpan) { + + StrikethroughSpan *spanPtr; + float result; + + spanPtr = (StrikethroughSpan *)refSpan; + if (!spanPtr) { + SWIG_CSharpSetPendingExceptionArgument( + SWIG_CSharpArgumentNullException, + "Attempt to dereference null StrikethroughSpan", 0); + + return 0; + } + + { + try { + result = spanPtr->GetHeight(); + } + + CALL_CATCH_EXCEPTION(0); + } + + return result; +} + +SWIGEXPORT bool SWIGSTDCALL +CSharp_Dali_StrikethroughSpan_IsHeightDefined(void *refSpan) { + + StrikethroughSpan *spanPtr; + bool result = false; + + spanPtr = (StrikethroughSpan *)refSpan; + if (!spanPtr) { + SWIG_CSharpSetPendingExceptionArgument( + SWIG_CSharpArgumentNullException, + "Attempt to dereference null StrikethroughSpan", 0); + + return 0; + } + + { + try { + result = spanPtr->IsHeightDefined(); + } + + CALL_CATCH_EXCEPTION(0); + } + + return result; +} + #ifdef __cplusplus } #endif