From 8c753e59febe359f456eb38efdebd4ae3012a519 Mon Sep 17 00:00:00 2001 From: abdullah Date: Wed, 1 Dec 2021 10:57:01 +0200 Subject: [PATCH] Add support for text geometry https://review.tizen.org/gerrit/c/platform/core/uifw/dali-toolkit/+/266891 Change-Id: Iacbe5a4753e9d364139079772c4920043b394cd3 --- dali-csharp-binder/src/dali-wrap.cpp | 347 ++++++++++++++++++++++++++++ dali-csharp-binder/src/text-editor-wrap.cpp | 34 +++ dali-csharp-binder/src/text-field-wrap.cpp | 34 +++ dali-csharp-binder/src/text-label-wrap.cpp | 34 +++ 4 files changed, 449 insertions(+) diff --git a/dali-csharp-binder/src/dali-wrap.cpp b/dali-csharp-binder/src/dali-wrap.cpp index 6f195d4..6c5cf84 100755 --- a/dali-csharp-binder/src/dali-wrap.cpp +++ b/dali-csharp-binder/src/dali-wrap.cpp @@ -59186,6 +59186,353 @@ SWIGEXPORT float SWIGSTDCALL CSharp_Dali_Actor_GetSuggestedMinimumHeight(void * return result; } +SWIGEXPORT int SWIGSTDCALL CSharp_Dali_VectorVector2_BaseType_get() { + int jresult ; + int result; + + result = (int)Dali::Vector< Dali::Vector2 >::BaseType; + jresult = (int)result; + return jresult; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_VectorVector2__SWIG_0() { + void * jresult ; + Dali::Vector< Dali::Vector2 > *result = 0 ; + + { + try { + result = (Dali::Vector< Dali::Vector2 > *)new Dali::Vector< Dali::Vector2 >(); + } CALL_CATCH_EXCEPTION(0); + } + + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_VectorVector2(void * jarg1) { + Dali::Vector< Dali::Vector2 > *arg1 = (Dali::Vector< Dali::Vector2 > *) 0 ; + + arg1 = (Dali::Vector< Dali::Vector2 > *)jarg1; + { + try { + delete arg1; + } CALL_CATCH_EXCEPTION(); + } +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_VectorVector2__SWIG_1(void * jarg1) { + void * jresult ; + Dali::Vector< Dali::Vector2 > *arg1 = 0 ; + Dali::Vector< Dali::Vector2 > *result = 0 ; + + arg1 = (Dali::Vector< Dali::Vector2 > *)jarg1; + if (!arg1) { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector< Dali::Vector2 > const & type is null", 0); + return 0; + } + { + try { + result = (Dali::Vector< Dali::Vector2 > *)new Dali::Vector< Dali::Vector2 >((Dali::Vector< Dali::Vector2 > const &)*arg1); + } CALL_CATCH_EXCEPTION(0); + } + + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_VectorVector2_Assign(void * jarg1, void * jarg2) { + void * jresult ; + Dali::Vector< Dali::Vector2 > *arg1 = (Dali::Vector< Dali::Vector2 > *) 0 ; + Dali::Vector< Dali::Vector2 > *arg2 = 0 ; + Dali::Vector< Dali::Vector2 > *result = 0 ; + + arg1 = (Dali::Vector< Dali::Vector2 > *)jarg1; + arg2 = (Dali::Vector< Dali::Vector2 > *)jarg2; + if (!arg2) { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector< Dali::Vector2 > const & type is null", 0); + return 0; + } + { + try { + result = (Dali::Vector< Dali::Vector2 > *) &(arg1)->operator =((Dali::Vector< Dali::Vector2 > const &)*arg2); + } CALL_CATCH_EXCEPTION(0); + } + + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_VectorVector2_Begin(void * jarg1) { + void * jresult ; + Dali::Vector< Dali::Vector2 > *arg1 = (Dali::Vector< Dali::Vector2 > *) 0 ; + Dali::Vector< Dali::Vector2 >::Iterator result; + + arg1 = (Dali::Vector< Dali::Vector2 > *)jarg1; + { + try { + result = (Dali::Vector< Dali::Vector2 >::Iterator)((Dali::Vector< Dali::Vector2 > const *)arg1)->Begin(); + } CALL_CATCH_EXCEPTION(0); + } + + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_VectorVector2_End(void * jarg1) { + void * jresult ; + Dali::Vector< Dali::Vector2 > *arg1 = (Dali::Vector< Dali::Vector2 > *) 0 ; + Dali::Vector< Dali::Vector2 >::Iterator result; + + arg1 = (Dali::Vector< Dali::Vector2 > *)jarg1; + { + try { + result = (Dali::Vector< Dali::Vector2 >::Iterator)((Dali::Vector< Dali::Vector2 > const *)arg1)->End(); + } CALL_CATCH_EXCEPTION(0); + } + + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_VectorVector2_ValueOfIndex__SWIG_0(void * jarg1, unsigned long jarg2) { + void * jresult ; + Dali::Vector< Dali::Vector2 > *arg1 = (Dali::Vector< Dali::Vector2 > *) 0 ; + Dali::Vector< Dali::Vector2 >::SizeType arg2 ; + Dali::Vector< Dali::Vector2 >::ItemType *result = 0 ; + + arg1 = (Dali::Vector< Dali::Vector2 > *)jarg1; + arg2 = (Dali::Vector< Dali::Vector2 >::SizeType)jarg2; + { + try { + result = (Dali::Vector< Dali::Vector2 >::ItemType *) &(arg1)->operator [](arg2); + } CALL_CATCH_EXCEPTION(0); + } + + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_Dali_VectorVector2_PushBack(void * jarg1, void * jarg2) { + Dali::Vector< Dali::Vector2 > *arg1 = (Dali::Vector< Dali::Vector2 > *) 0 ; + Dali::Vector< Dali::Vector2 >::ItemType *arg2 = 0 ; + + arg1 = (Dali::Vector< Dali::Vector2 > *)jarg1; + arg2 = (Dali::Vector< Dali::Vector2 >::ItemType *)jarg2; + if (!arg2) { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector< Dali::Vector2 >::ItemType const & type is null", 0); + return ; + } + { + try { + (arg1)->PushBack((Dali::Vector< Dali::Vector2 >::ItemType const &)*arg2); + } CALL_CATCH_EXCEPTION(); + } +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_Dali_VectorVector2_Insert__SWIG_0(void * jarg1, void * jarg2, void * jarg3) { + Dali::Vector< Dali::Vector2 > *arg1 = (Dali::Vector< Dali::Vector2 > *) 0 ; + Dali::Vector< Dali::Vector2 >::Iterator arg2 = (Dali::Vector< Dali::Vector2 >::Iterator) 0 ; + Dali::Vector< Dali::Vector2 >::ItemType *arg3 = 0 ; + + arg1 = (Dali::Vector< Dali::Vector2 > *)jarg1; + arg2 = (Dali::Vector< Dali::Vector2 >::Iterator)jarg2; + arg3 = (Dali::Vector< Dali::Vector2 >::ItemType *)jarg3; + if (!arg3) { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector< Dali::Vector2 >::ItemType const & type is null", 0); + return ; + } + { + try { + (arg1)->Insert(arg2,(Dali::Vector< Dali::Vector2 >::ItemType const &)*arg3); + } CALL_CATCH_EXCEPTION(); + } +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_Dali_VectorVector2_Insert__SWIG_1(void * jarg1, void * jarg2, void * jarg3, void * jarg4) { + Dali::Vector< Dali::Vector2 > *arg1 = (Dali::Vector< Dali::Vector2 > *) 0 ; + Dali::Vector< Dali::Vector2 >::Iterator arg2 = (Dali::Vector< Dali::Vector2 >::Iterator) 0 ; + Dali::Vector< Dali::Vector2 >::Iterator arg3 = (Dali::Vector< Dali::Vector2 >::Iterator) 0 ; + Dali::Vector< Dali::Vector2 >::Iterator arg4 = (Dali::Vector< Dali::Vector2 >::Iterator) 0 ; + + arg1 = (Dali::Vector< Dali::Vector2 > *)jarg1; + arg2 = (Dali::Vector< Dali::Vector2 >::Iterator)jarg2; + arg3 = (Dali::Vector< Dali::Vector2 >::Iterator)jarg3; + arg4 = (Dali::Vector< Dali::Vector2 >::Iterator)jarg4; + { + try { + (arg1)->Insert(arg2,arg3,arg4); + } CALL_CATCH_EXCEPTION(); + } +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_Dali_VectorVector2_Reserve(void * jarg1, unsigned long jarg2) { + Dali::Vector< Dali::Vector2 > *arg1 = (Dali::Vector< Dali::Vector2 > *) 0 ; + Dali::Vector< Dali::Vector2 >::SizeType arg2 ; + + arg1 = (Dali::Vector< Dali::Vector2 > *)jarg1; + arg2 = (Dali::Vector< Dali::Vector2 >::SizeType)jarg2; + { + try { + (arg1)->Reserve(arg2); + } CALL_CATCH_EXCEPTION(); + } +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_Dali_VectorVector2_Resize__SWIG_0(void * jarg1, unsigned long jarg2) { + Dali::Vector< Dali::Vector2 > *arg1 = (Dali::Vector< Dali::Vector2 > *) 0 ; + Dali::Vector< Dali::Vector2 >::SizeType arg2 ; + + arg1 = (Dali::Vector< Dali::Vector2 > *)jarg1; + arg2 = (Dali::Vector< Dali::Vector2 >::SizeType)jarg2; + { + try { + (arg1)->Resize(arg2); + } CALL_CATCH_EXCEPTION(); + } +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_Dali_VectorVector2_Resize__SWIG_1(void * jarg1, unsigned long jarg2, void * jarg3) { + Dali::Vector< Dali::Vector2 > *arg1 = (Dali::Vector< Dali::Vector2 > *) 0 ; + Dali::Vector< Dali::Vector2 >::SizeType arg2 ; + Dali::Vector< Dali::Vector2 >::ItemType *arg3 = 0 ; + + arg1 = (Dali::Vector< Dali::Vector2 > *)jarg1; + arg2 = (Dali::Vector< Dali::Vector2 >::SizeType)jarg2; + arg3 = (Dali::Vector< Dali::Vector2 >::ItemType *)jarg3; + if (!arg3) { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector< Dali::Uint16Pair >::ItemType const & type is null", 0); + return ; + } + { + try { + (arg1)->Resize(arg2,(Dali::Vector< Dali::Vector2 >::ItemType const &)*arg3); + } CALL_CATCH_EXCEPTION(); + } +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_VectorVector2_Erase__SWIG_0(void * jarg1, void * jarg2) { + void * jresult ; + Dali::Vector< Dali::Vector2 > *arg1 = (Dali::Vector< Dali::Vector2 > *) 0 ; + Dali::Vector< Dali::Vector2 >::Iterator arg2 = (Dali::Vector< Dali::Vector2 >::Iterator) 0 ; + Dali::Vector< Dali::Vector2 >::Iterator result; + + arg1 = (Dali::Vector< Dali::Vector2 > *)jarg1; + arg2 = (Dali::Vector< Dali::Vector2 >::Iterator)jarg2; + { + try { + result = (Dali::Vector< Dali::Vector2 >::Iterator)(arg1)->Erase(arg2); + } CALL_CATCH_EXCEPTION(0); + } + + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_VectorVector2_Erase__SWIG_1(void * jarg1, void * jarg2, void * jarg3) { + void * jresult ; + Dali::Vector< Dali::Vector2 > *arg1 = (Dali::Vector< Dali::Vector2 > *) 0 ; + Dali::Vector< Dali::Vector2 >::Iterator arg2 = (Dali::Vector< Dali::Vector2 >::Iterator) 0 ; + Dali::Vector< Dali::Vector2 >::Iterator arg3 = (Dali::Vector< Dali::Vector2 >::Iterator) 0 ; + Dali::Vector< Dali::Vector2 >::Iterator result; + + arg1 = (Dali::Vector< Dali::Vector2 > *)jarg1; + arg2 = (Dali::Vector< Dali::Vector2 >::Iterator)jarg2; + arg3 = (Dali::Vector< Dali::Vector2 >::Iterator)jarg3; + { + try { + result = (Dali::Vector< Dali::Vector2 >::Iterator)(arg1)->Erase(arg2,arg3); + } CALL_CATCH_EXCEPTION(0); + } + + jresult = (void *)result; + return jresult; +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_Dali_VectorVector2_Remove(void * jarg1, void * jarg2) { + Dali::Vector< Dali::Vector2 > *arg1 = (Dali::Vector< Dali::Vector2 > *) 0 ; + Dali::Vector< Dali::Vector2 >::Iterator arg2 = (Dali::Vector< Dali::Vector2 >::Iterator) 0 ; + + arg1 = (Dali::Vector< Dali::Vector2 > *)jarg1; + arg2 = (Dali::Vector< Dali::Vector2 >::Iterator)jarg2; + { + try { + (arg1)->Remove(arg2); + } CALL_CATCH_EXCEPTION(); + } +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_Dali_VectorVector2_Swap(void * jarg1, void * jarg2) { + Dali::Vector< Dali::Vector2 > *arg1 = (Dali::Vector< Dali::Vector2 > *) 0 ; + Dali::Vector< Dali::Vector2 > *arg2 = 0 ; + + arg1 = (Dali::Vector< Dali::Vector2 > *)jarg1; + arg2 = (Dali::Vector< Dali::Vector2 > *)jarg2; + if (!arg2) { + SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Vector< Dali::Vector2 > & type is null", 0); + return ; + } + { + try { + (arg1)->Swap(*arg2); + } CALL_CATCH_EXCEPTION(); + } +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_Dali_VectorVector2_Clear(void * jarg1) { + Dali::Vector< Dali::Vector2 > *arg1 = (Dali::Vector< Dali::Vector2 > *) 0 ; + + arg1 = (Dali::Vector< Dali::Vector2 > *)jarg1; + { + try { + (arg1)->Clear(); + } CALL_CATCH_EXCEPTION(); + } +} + + +SWIGEXPORT void SWIGSTDCALL CSharp_Dali_VectorVector2_Release(void * jarg1) { + Dali::Vector< Dali::Vector2 > *arg1 = (Dali::Vector< Dali::Vector2 > *) 0 ; + + arg1 = (Dali::Vector< Dali::Vector2 > *)jarg1; + { + try { + (arg1)->Release(); + } CALL_CATCH_EXCEPTION(); + } +} + +SWIGEXPORT int SWIGSTDCALL CSharp_Dali_VectorVector2_Size(void * jarg1) { + Dali::Vector< Dali::Vector2 > *arg1 = (Dali::Vector< Dali::Vector2 > *) 0 ; + int size; + + arg1 = (Dali::Vector< Dali::Vector2 > *)jarg1; + { + try { + size = (arg1)->Size(); + } CALL_CATCH_EXCEPTION(0); + } + + return size; +} + #ifdef __cplusplus } #endif diff --git a/dali-csharp-binder/src/text-editor-wrap.cpp b/dali-csharp-binder/src/text-editor-wrap.cpp index 463e8e9..f31b1c9 100755 --- a/dali-csharp-binder/src/text-editor-wrap.cpp +++ b/dali-csharp-binder/src/text-editor-wrap.cpp @@ -965,6 +965,40 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_TextEditor_SelectNone(void * jarg1) { } } +SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_TextEditor_GetTextSize(void * pTextEditor, unsigned int start, unsigned int end) +{ + Dali::Toolkit::TextEditor *textEditor = (Dali::Toolkit::TextEditor *) 0; + void* sizeList; + + textEditor = (Dali::Toolkit::TextEditor *)pTextEditor; + { + try { + sizeList = new Dali::Vector< Dali::Vector2, Dali::TypeTraits< Dali::Vector2 >::IS_TRIVIAL_TYPE==true > + ((const Dali::Vector< Dali::Vector2, Dali::TypeTraits< Dali::Vector2 >::IS_TRIVIAL_TYPE==true > &)(Dali::Toolkit::DevelTextEditor::GetTextSize( *textEditor, start, end ))); + } + CALL_CATCH_EXCEPTION(0); + } + + return sizeList; +} + +SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_TextEditor_GetTextPosition(void * pTextEditor, unsigned int start, unsigned int end) +{ + Dali::Toolkit::TextEditor *textEditor = (Dali::Toolkit::TextEditor *) 0; + void* sizeList; + + textEditor = (Dali::Toolkit::TextEditor *)pTextEditor; + { + try { + sizeList = new Dali::Vector< Dali::Vector2, Dali::TypeTraits< Dali::Vector2 >::IS_TRIVIAL_TYPE==true > + ((const Dali::Vector< Dali::Vector2, Dali::TypeTraits< Dali::Vector2 >::IS_TRIVIAL_TYPE==true > &)(Dali::Toolkit::DevelTextEditor::GetTextPosition( *textEditor, start, end ))); + } + CALL_CATCH_EXCEPTION(0); + } + + return sizeList; +} + SWIGEXPORT char* SWIGSTDCALL CSharp_Dali_TextEditor_CopyText(void *pTextEditor) { char *csCopiedText; diff --git a/dali-csharp-binder/src/text-field-wrap.cpp b/dali-csharp-binder/src/text-field-wrap.cpp index b8c37a0..0db9f0e 100755 --- a/dali-csharp-binder/src/text-field-wrap.cpp +++ b/dali-csharp-binder/src/text-field-wrap.cpp @@ -929,6 +929,40 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_TextField_SelectNone(void * jarg1) { } } +SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_TextField_GetTextSize(void * pTextField, unsigned int start, unsigned int end) +{ + Dali::Toolkit::TextField *textField = (Dali::Toolkit::TextField *) 0; + void* sizeList; + + textField = (Dali::Toolkit::TextField *)pTextField; + { + try { + sizeList = new Dali::Vector< Dali::Vector2, Dali::TypeTraits< Dali::Vector2 >::IS_TRIVIAL_TYPE==true > + ((const Dali::Vector< Dali::Vector2, Dali::TypeTraits< Dali::Vector2 >::IS_TRIVIAL_TYPE==true > &)(Dali::Toolkit::DevelTextField::GetTextSize( *textField, start, end ))); + } + CALL_CATCH_EXCEPTION(0); + } + + return sizeList; +} + +SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_TextField_GetTextPosition(void * pTextField, unsigned int start, unsigned int end) +{ + Dali::Toolkit::TextField *textField = (Dali::Toolkit::TextField *) 0; + void* sizeList; + + textField = (Dali::Toolkit::TextField *)pTextField; + { + try { + sizeList = new Dali::Vector< Dali::Vector2, Dali::TypeTraits< Dali::Vector2 >::IS_TRIVIAL_TYPE==true > + ((const Dali::Vector< Dali::Vector2, Dali::TypeTraits< Dali::Vector2 >::IS_TRIVIAL_TYPE==true > &)(Dali::Toolkit::DevelTextField::GetTextPosition( *textField, start, end ))); + } + CALL_CATCH_EXCEPTION(0); + } + + return sizeList; +} + SWIGEXPORT char* SWIGSTDCALL CSharp_Dali_TextField_CopyText(void *pTextField) { char *csCopiedText; diff --git a/dali-csharp-binder/src/text-label-wrap.cpp b/dali-csharp-binder/src/text-label-wrap.cpp index 6ceb67f..3f78af8 100755 --- a/dali-csharp-binder/src/text-label-wrap.cpp +++ b/dali-csharp-binder/src/text-label-wrap.cpp @@ -42,6 +42,40 @@ SWIGEXPORT int SWIGSTDCALL CSharp_Dali_TextLabel_Property_FONT_SIZE_SCALE_get() return jresult; } +SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_TextLabel_GetTextSize(void * pTextLabel, unsigned int start, unsigned int end) +{ + Dali::Toolkit::TextLabel *textLabel = (Dali::Toolkit::TextLabel *) 0; + void* sizeList; + + textLabel = (Dali::Toolkit::TextLabel *)pTextLabel; + { + try { + sizeList = new Dali::Vector< Dali::Vector2, Dali::TypeTraits< Dali::Vector2 >::IS_TRIVIAL_TYPE==true > + ((const Dali::Vector< Dali::Vector2, Dali::TypeTraits< Dali::Vector2 >::IS_TRIVIAL_TYPE==true > &)(Dali::Toolkit::DevelTextLabel::GetTextSize( *textLabel, start, end ))); + } + CALL_CATCH_EXCEPTION(0); + } + + return sizeList; +} + +SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_TextLabel_GetTextPosition(void * pTextLabel, unsigned int start, unsigned int end) +{ + Dali::Toolkit::TextLabel *textLabel = (Dali::Toolkit::TextLabel *) 0; + void* sizeList; + + textLabel = (Dali::Toolkit::TextLabel *)pTextLabel; + { + try { + sizeList = new Dali::Vector< Dali::Vector2, Dali::TypeTraits< Dali::Vector2 >::IS_TRIVIAL_TYPE==true > + ((const Dali::Vector< Dali::Vector2, Dali::TypeTraits< Dali::Vector2 >::IS_TRIVIAL_TYPE==true > &)(Dali::Toolkit::DevelTextLabel::GetTextPosition( *textLabel, start, end ))); + } + CALL_CATCH_EXCEPTION(0); + } + + return sizeList; +} + SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_TextLabel_AnchorClickedSignal(void * jarg1) { void * jresult ; Dali::Toolkit::TextLabel *arg1 = (Dali::Toolkit::TextLabel *) 0 ; -- 2.7.4