From ab9897c80c0b8e60725ddc4dd804f820667822b6 Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Wed, 11 Dec 2024 11:55:26 +0900 Subject: [PATCH] Support create and retrive Property::Value componentwise Let we allow to get Dali::VectorX without create managed class Change-Id: I531ab6f5ba0658142c72d9e02538cf231c0eb62f Signed-off-by: Eunki, Hong --- dali-csharp-binder/common/dali-wrap.cpp | 100 ++++++++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/dali-csharp-binder/common/dali-wrap.cpp b/dali-csharp-binder/common/dali-wrap.cpp index 88a35ccc..8dd749e1 100644 --- a/dali-csharp-binder/common/dali-wrap.cpp +++ b/dali-csharp-binder/common/dali-wrap.cpp @@ -7115,8 +7115,108 @@ SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_Property_Value_Get__SWIG_15(void * jarg1 return jresult; } +// For internal managed memory optimization +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_new_Property_Value_Vector2_Componentwise(float x, float y) { + void* jresult; + Dali::Property::Value* result = 0; + { + try { + result = (Dali::Property::Value *)new Dali::Property::Value(Dali::Vector2(x, y)); + } CALL_CATCH_EXCEPTION(0); + } + + jresult = (void*)result; + return jresult; +} + +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_new_Property_Value_Vector3_Componentwise(float x, float y, float z) { + void* jresult; + Dali::Property::Value* result = 0; + { + try { + result = (Dali::Property::Value *)new Dali::Property::Value(Dali::Vector3(x, y, z)); + } CALL_CATCH_EXCEPTION(0); + } + + jresult = (void*)result; + return jresult; +} + +SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_Property_Value_Vector4_Componentwise(float x, float y, float z, float w) { + void* jresult; + Dali::Property::Value* result = 0; + { + try { + result = (Dali::Property::Value *)new Dali::Property::Value(Dali::Vector4(x, y, z, w)); + } CALL_CATCH_EXCEPTION(0); + } + + jresult = (void*)result; + return jresult; +} + +SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_Property_Value_Get_Vector2_Componentwise(void* csPropertyValue, float* outX, float* outY) { + Dali::Property::Value* arg1 = (Dali::Property::Value*) 0 ; + bool result; + + arg1 = (Dali::Property::Value*)csPropertyValue; + { + try { + Dali::Vector2 value; + result = (bool)((Dali::Property::Value const *)arg1)->Get(value); + if(result) + { + *outX = value.x; + *outY = value.y; + } + } CALL_CATCH_EXCEPTION(0); + } + + return result; +} + +SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_Property_Value_Get_Vector3_Componentwise(void* csPropertyValue, float* outX, float* outY, float* outZ) { + Dali::Property::Value* arg1 = (Dali::Property::Value*) 0 ; + bool result; + + arg1 = (Dali::Property::Value*)csPropertyValue; + { + try { + Dali::Vector3 value; + result = (bool)((Dali::Property::Value const *)arg1)->Get(value); + if(result) + { + *outX = value.x; + *outY = value.y; + *outZ = value.z; + } + } CALL_CATCH_EXCEPTION(0); + } + + return result; +} +SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_Property_Value_Get_Vector4_Componentwise(void* csPropertyValue, float* outX, float* outY, float* outZ, float* outW) { + Dali::Property::Value* arg1 = (Dali::Property::Value*) 0 ; + bool result; + arg1 = (Dali::Property::Value*)csPropertyValue; + { + try { + Dali::Vector4 value; + result = (bool)((Dali::Property::Value const *)arg1)->Get(value); + if(result) + { + *outX = value.x; + *outY = value.y; + *outZ = value.z; + *outW = value.w; + } + } CALL_CATCH_EXCEPTION(0); + } + + return result; +} SWIGEXPORT char * SWIGSTDCALL CSharp_Dali_GetName(int jarg1) { -- 2.34.1