Use WindowData in the constructors of Application
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / application-devel.cpp
index 533a68c..11ab483 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * 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.
@@ -36,19 +36,21 @@ Application New(int* argc, char** argv[], const std::string& stylesheet, Applica
 
     // pre-initialized application
     internal->SetCommandLineOptions(argc, argv);
-    if(argc && (*argc > 0))
-    {
-      internal->GetWindow().SetClass((*argv)[0], "");
-    }
     internal->SetStyleSheet(stylesheet);
 
-    internal->GetWindow().SetTransparency((windowMode == Application::OPAQUE ? false : true));
+    internal->GetWindow().SetTransparency((windowMode == Application::TRANSPARENT));
 
-    //Store only the value before adaptor is created
+    // Store only the value before adaptor is created
     internal->StoreWindowPositionSize(positionSize);
-  } else
+  }
+  else
   {
-    internal = Internal::Adaptor::Application::New(argc, argv, stylesheet, windowMode, positionSize, Internal::Adaptor::Framework::NORMAL, type);
+    WindowData windowData;
+    windowData.SetPositionSize(positionSize);
+    windowData.SetTransparency(windowMode == Application::TRANSPARENT);
+    windowData.SetWindowType(type);
+
+    internal = Internal::Adaptor::Application::New(argc, argv, stylesheet, Internal::Adaptor::Framework::NORMAL, false, windowData);
   }
   return Application(internal.Get());
 }
@@ -79,6 +81,11 @@ CustomCommandReceivedSignalType& CustomCommandReceivedSignal(Application applica
   return networkService->CustomCommandReceivedSignal();
 }
 
+int32_t GetRenderThreadId(Application application)
+{
+  return Internal::Adaptor::GetImplementation(application).GetRenderThreadId();
+}
+
 } // namespace DevelApplication
 
 } // namespace Dali