From d4c843104e9cafc8b5d4778d6c95caa3612bc920 Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Mon, 20 Jan 2025 11:56:09 +0900 Subject: [PATCH] Bind componentwise FrameUpdateCallback interface Change-Id: I93de160ada95e20c9d069582a0a8e3d0989118c7 Signed-off-by: Eunki, Hong --- .../dali-toolkit/dali-toolkit-wrap.cpp | 61 ++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/dali-csharp-binder/dali-toolkit/dali-toolkit-wrap.cpp b/dali-csharp-binder/dali-toolkit/dali-toolkit-wrap.cpp index 27d6f12d..959031fa 100644 --- a/dali-csharp-binder/dali-toolkit/dali-toolkit-wrap.cpp +++ b/dali-csharp-binder/dali-toolkit/dali-toolkit-wrap.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Samsung Electronics Co., Ltd. + * Copyright (c) 2025 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -11629,6 +11629,65 @@ SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_GetUpdateArea(voi return proxy->GetUpdateArea(id, *vector4); } +/// UIVector2 and UIColor +SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_GetPositionVector2Componentwise(void * updateProxy, unsigned int id, float* x, float* y) { + Dali::UpdateProxy *proxy = (Dali::UpdateProxy*)updateProxy; + Dali::Vector3 vector3; + bool ret = proxy->GetPosition(id, vector3); + *x = vector3.x; + *y = vector3.y; + return ret; +} + +SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_BakePositionVector2Componentwise(void * updateProxy, unsigned int id, float x, float y) { + Dali::UpdateProxy *proxy = (Dali::UpdateProxy*)updateProxy; + return proxy->BakePosition(id, Vector3(x, y, 0.0f)); +} + +SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_GetSizeVector2Componentwise(void * updateProxy, unsigned int id, float* x, float* y) { + Dali::UpdateProxy *proxy = (Dali::UpdateProxy*)updateProxy; + Dali::Vector3 vector3; + bool ret = proxy->GetSize(id, vector3); + *x = vector3.x; + *y = vector3.y; + return ret; +} + +SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_BakeSizeVector2Componentwise(void * updateProxy, unsigned int id, float x, float y) { + Dali::UpdateProxy *proxy = (Dali::UpdateProxy*)updateProxy; + return proxy->BakeSize(id, Vector3(x, y, 0.0f)); +} + +SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_GetScaleVector2Componentwise(void * updateProxy, unsigned int id, float* x, float* y) { + Dali::UpdateProxy *proxy = (Dali::UpdateProxy*)updateProxy; + Dali::Vector3 vector3; + bool ret = proxy->GetScale(id, vector3); + *x = vector3.x; + *y = vector3.y; + return ret; +} + +SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_BakeScaleVector2Componentwise(void * updateProxy, unsigned int id, float x, float y) { + Dali::UpdateProxy *proxy = (Dali::UpdateProxy*)updateProxy; + return proxy->BakeScale(id, Vector3(x, y, 1.0f)); +} + +SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_GetColorVector4Componentwise(void * updateProxy, unsigned int id, float* r, float* g, float* b, float* a) { + Dali::UpdateProxy *proxy = (Dali::UpdateProxy*)updateProxy; + Dali::Vector4 vector4; + bool ret = proxy->GetColor(id, vector4); + *r = vector4.r; + *g = vector4.g; + *b = vector4.b; + *a = vector4.a; + return ret; +} + +SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_FrameCallbackInterface_BakeColorVector4Componentwise(void * updateProxy, unsigned int id, float r, float g, float b, float a) { + Dali::UpdateProxy *proxy = (Dali::UpdateProxy*)updateProxy; + return proxy->BakeColor(id, Vector4(r, g, b, a)); +} + SWIGEXPORT void SWIGSTDCALL CSharp_Dali_SetCustomAlgorithm(void * jarg1, void * jarg2) { KeyboardFocusManager arg1 ; Dali::Toolkit::DevelKeyboardFocusManager::CustomAlgorithmInterface *arg2 = 0 ; -- 2.34.1