return jresult;
}
+SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Application_New_WithWindowData(int nuiArgc, char* nuiArgv, char* nuiStyleSheet, bool nuiUIThread, void* nuiWindowData)
+{
+ void* jresult;
+ int* argc = nullptr;
+ char*** argv = nullptr;
+ Dali::WindowData* pWindowData;
+ Dali::Application result;
+
+ {
+ // TODO : What should we do if already generated argv exist?
+ ReleaseArgVMemory();
+ // generate argv data from the C# args
+ int index = 0;
+ int length = 0;
+ char* retPtr = NULL;
+ char* nextPtr;
+
+ gArgV = new char*[nuiArgc + 1];
+
+ for(retPtr = strtok_r(nuiArgv, " ", &nextPtr);
+ retPtr != NULL && index < nuiArgc;
+ retPtr = strtok_r(NULL, " ", &nextPtr))
+ {
+ length = 0;
+ length = strlen(retPtr);
+ gArgV[index] = new char[length + 1];
+ strncpy(gArgV[index], retPtr, length);
+ gArgV[index][length] = '\0';
+ index++;
+ }
+
+ while(index < nuiArgc)
+ {
+ // if nuiArgc - index >1, maybe cause error.
+ gArgV[index] = NULL;
+ index++;
+ }
+
+ gArgV[nuiArgc] = NULL;
+ gArgC = nuiArgc;
+
+ argc = &gArgC;
+ argv = &gArgV;
+ }
+
+ std::string styleSheet(nuiStyleSheet);
+ pWindowData = (Dali::WindowData*)nuiWindowData;
+ if(!pWindowData)
+ {
+ SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::PositionSize", 0);
+ return 0;
+ }
+
+ {
+ try
+ {
+ result = Dali::Application::New(argc, argv, styleSheet, nuiUIThread, *pWindowData);
+ }
+ CALL_CATCH_EXCEPTION(0);
+ }
+ jresult = new Dali::Application((const Dali::Application&)result);
+ return jresult;
+}
+
SWIGEXPORT int32_t SWIGSTDCALL CSharp_Dali_Application_GetRenderThreadId(void* jarg1)
{
Dali::Application* arg1 = (Dali::Application*)jarg1;
--- /dev/null
+/*
+ * Copyright (c) 2023 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <dali/public-api/adaptor-framework/window-data.h>
+
+#include "common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_new_WindowData()
+{
+ void* nuiResult;
+ Dali::WindowData* result = 0;
+
+ {
+ try
+ {
+ result = (Dali::WindowData*)new Dali::WindowData();
+ }
+ CALL_CATCH_EXCEPTION(0);
+ }
+
+ nuiResult = (void*)result;
+ return nuiResult;
+}
+
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_WindowData(void* nuiWindowData)
+{
+ Dali::WindowData* handle = (Dali::WindowData*)0;
+
+ handle = (Dali::WindowData*)nuiWindowData;
+ {
+ try
+ {
+ delete handle;
+ }
+ CALL_CATCH_EXCEPTION();
+ }
+}
+
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_WindowData_SetPositionSize(void* nuiWindowData, void* nuiPositionSize)
+{
+ Dali::WindowData* pWindowData;
+ Dali::Rect<int>* rect = 0;
+
+ pWindowData = (Dali::WindowData*)nuiWindowData;
+ if(!pWindowData)
+ {
+ SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::WindowData", 0);
+ return;
+ }
+
+ rect = (Dali::Rect<int>*)nuiPositionSize;
+ if(!rect)
+ {
+ SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Rect< int > const & type is null", 0);
+ return;
+ }
+ {
+ try
+ {
+ pWindowData->SetPositionSize(*rect);
+ }
+ CALL_CATCH_EXCEPTION();
+ }
+}
+
+SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_WindowData_GetPositionSize(void* nuiWindowData)
+{
+ void* nuiResult;
+ Dali::WindowData* pWindowData;
+ Dali::Rect<int> result;
+
+ pWindowData = (Dali::WindowData*)nuiWindowData;
+ if(!pWindowData)
+ {
+ SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::WindowData", 0);
+ return nullptr;
+ }
+
+ {
+ try
+ {
+ result = pWindowData->GetPositionSize();
+ }
+ CALL_CATCH_EXCEPTION(0);
+ }
+
+ nuiResult = new Dali::Rect<int>((const Dali::Rect<int>&)result);
+ return nuiResult;
+}
+
+// --
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_WindowData_SetWindowType(void* nuiWindowData, int nuiWindowType)
+{
+ Dali::WindowData* pWindowData;
+ Dali::WindowType windowType;
+
+ pWindowData = (Dali::WindowData*)nuiWindowData;
+ if(!pWindowData)
+ {
+ SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::WindowData", 0);
+ return;
+ }
+
+ windowType = (Dali::WindowType)nuiWindowType;
+ {
+ try
+ {
+ pWindowData->SetWindowType(windowType);
+ }
+ CALL_CATCH_EXCEPTION();
+ }
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_Dali_WindowData_GetWindowType(void* nuiWindowData)
+{
+ int nuiResult;
+ Dali::WindowData* pWindowData;
+ Dali::WindowType result;
+
+ pWindowData = (Dali::WindowData*)nuiWindowData;
+ if(!pWindowData)
+ {
+ SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::WindowData", 0);
+ return 0;
+ }
+
+ {
+ try
+ {
+ result = (Dali::WindowType)pWindowData->GetWindowType();
+ }
+ CALL_CATCH_EXCEPTION(0);
+ }
+
+ nuiResult = (int)result;
+ return nuiResult;
+}
+
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_WindowData_SetTransparency(void* nuiWindowData, bool nuiTransparency)
+{
+ Dali::WindowData* pWindowData;
+
+ pWindowData = (Dali::WindowData*)nuiWindowData;
+ if(!pWindowData)
+ {
+ SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::WindowData", 0);
+ return;
+ }
+
+ {
+ try
+ {
+ pWindowData->SetTransparency(nuiTransparency);
+ }
+ CALL_CATCH_EXCEPTION();
+ }
+}
+
+SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_WindowData_GetTransparency(void* nuiWindowData)
+{
+ Dali::WindowData* pWindowData;
+ bool result;
+
+ pWindowData = (Dali::WindowData*)nuiWindowData;
+ if(!pWindowData)
+ {
+ SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::WindowData", 0);
+ return 0;
+ }
+
+ {
+ try
+ {
+ result = (bool)pWindowData->GetTransparency();
+ }
+ CALL_CATCH_EXCEPTION(0);
+ }
+
+ return result;
+}
+
+#ifdef __cplusplus
+}
+#endif