From 3f358b5e696282cc740422c9a156a96bb2b7ec0c Mon Sep 17 00:00:00 2001 From: Eunki Hong Date: Sun, 31 Dec 2023 00:02:38 +0900 Subject: [PATCH] Bind NativeImageQueue constructor with queue size Change-Id: Ibca8095ae42187d3ef355b14845383295fc90355 Signed-off-by: Eunki Hong --- .../dali-adaptor/native-image-queue-wrap.cpp | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/dali-csharp-binder/dali-adaptor/native-image-queue-wrap.cpp b/dali-csharp-binder/dali-adaptor/native-image-queue-wrap.cpp index fc86dd2e..b6fd03d5 100644 --- a/dali-csharp-binder/dali-adaptor/native-image-queue-wrap.cpp +++ b/dali-csharp-binder/dali-adaptor/native-image-queue-wrap.cpp @@ -45,6 +45,20 @@ SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_new_NativeImageQueuePtr(unsigned int wi return jresult; } +SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_new_NativeImageQueuePtr_2(unsigned int queueCount, unsigned int width, unsigned int height, int colorFormat) +{ + void* jresult; + NativeImageSourceQueuePtrHandle* queue = new NativeImageSourceQueuePtrHandle(); + { + try { + queue->Ptr = Dali::NativeImageSourceQueue::New(queueCount, width, height, (Dali::NativeImageSourceQueue::ColorFormat)colorFormat); + } + CALL_CATCH_EXCEPTION(0); + } + jresult = (void *)queue; + return jresult; +} + SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_NativeImageQueue_GetPtr(void* nuiqueue) { void* jresult; @@ -107,6 +121,19 @@ SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_NativeImageQueue_EnqueueBuffer(void* nui return jresult; } +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_NativeImageQueue_GetQueueCount(void* nuiqueue) +{ + unsigned int jresult; + Dali::NativeImageSourceQueue* queue = (Dali::NativeImageSourceQueue*)nuiqueue; + { + try { + jresult = static_cast(queue->GetQueueCount()); + } + CALL_CATCH_EXCEPTION(0); + } + return jresult; +} + SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_NativeImageQueue_GenerateUrl(void* nuiqueue) { Dali::Toolkit::ImageUrl result; -- 2.34.1