From: Heeyong Song Date: Mon, 30 Jan 2023 08:16:52 +0000 (+0900) Subject: Apply environment variables to preinitialized app X-Git-Tag: dali_2.2.12~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F63%2F287463%2F6;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Apply environment variables to preinitialized app Change-Id: Idb66ee33ccf2fed8f71ee5ed5c2cd2f47fdce529 --- diff --git a/dali/devel-api/adaptor-framework/application-devel.cpp b/dali/devel-api/adaptor-framework/application-devel.cpp index 18a233c..886620a 100644 --- a/dali/devel-api/adaptor-framework/application-devel.cpp +++ b/dali/devel-api/adaptor-framework/application-devel.cpp @@ -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,10 +36,6 @@ 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)); diff --git a/dali/internal/adaptor/common/application-impl.cpp b/dali/internal/adaptor/common/application-impl.cpp index e7d2687..6590889 100644 --- a/dali/internal/adaptor/common/application-impl.cpp +++ b/dali/internal/adaptor/common/application-impl.cpp @@ -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. @@ -83,9 +83,9 @@ void Application::PreInitialize(int* argc, char** argv[]) { Dali::TextAbstraction::FontClientPreInitialize(); - gPreInitializedApplication = new Application(argc, argv, "", Dali::Application::OPAQUE, PositionSize(), Framework::NORMAL, WindowType::NORMAL, false); - gPreInitializedApplication->CreateWindow(); // Only create window + gPreInitializedApplication = new Application(argc, argv, "", Dali::Application::OPAQUE, PositionSize(), Framework::NORMAL, WindowType::NORMAL, false); gPreInitializedApplication->mLaunchpadState = Launchpad::PRE_INITIALIZED; + gPreInitializedApplication->CreateWindow(); // Only create window } } @@ -98,27 +98,24 @@ Application::Application(int* argc, char** argv[], const std::string& stylesheet mAppControlSignal(), mLanguageChangedSignal(), mRegionChangedSignal(), - mEventLoop(nullptr), mFramework(nullptr), mCommandLineOptions(nullptr), mAdaptorBuilder(nullptr), mAdaptor(nullptr), + mEnvironmentOptions(nullptr), mMainWindow(), mMainWindowMode(windowMode), mMainWindowName(), mStylesheet(stylesheet), - mEnvironmentOptions(), mWindowPositionSize(positionSize), mLaunchpadState(Launchpad::NONE), mDefaultWindowType(type), mUseUiThread(useUiThread), mSlotDelegate(this) { - // Get mName from environment options - mMainWindowName = mEnvironmentOptions.GetWindowName(); - if(mMainWindowName.empty() && argc && (*argc > 0)) + // Set mName from command-line args + if(argc && (*argc > 0)) { - // Set mName from command-line args if environment option not set mMainWindowName = (*argv)[0]; } @@ -128,6 +125,8 @@ Application::Application(int* argc, char** argv[], const std::string& stylesheet mUseUiThread = true; } + WindowSystem::Initialize(); + mCommandLineOptions = new CommandLineOptions(argc, argv); mFramework = new Framework(*this, *this, argc, argv, applicationType, mUseUiThread); mUseRemoteSurface = (applicationType == Framework::WATCH); @@ -147,6 +146,8 @@ Application::~Application() delete mAdaptorBuilder; delete mCommandLineOptions; delete mFramework; + + WindowSystem::Shutdown(); } void Application::StoreWindowPositionSize(PositionSize positionSize) @@ -154,14 +155,24 @@ void Application::StoreWindowPositionSize(PositionSize positionSize) mWindowPositionSize = positionSize; } -void Application::ChangePreInitializedWindowSize() +void Application::ChangePreInitializedWindowInfo() { + // Set window name + auto windowClassName = mEnvironmentOptions->GetWindowClassName(); + auto windowName = mEnvironmentOptions->GetWindowName(); + if(!windowName.empty()) + { + mMainWindowName = windowName; + } + mMainWindow.SetClass(mMainWindowName, windowClassName); + // The real screen size may be different from the value of the preinitialized state. Update it. Dali::Internal::Adaptor::WindowSystem::UpdateScreenSize(); int screenWidth, screenHeight; Dali::Internal::Adaptor::WindowSystem::GetScreenSize(screenWidth, screenHeight); + // Set window position / size if(mWindowPositionSize != PositionSize(0, 0, 0, 0)) { Dali::DevelWindow::SetPositionSize(mMainWindow, mWindowPositionSize); @@ -173,11 +184,11 @@ void Application::ChangePreInitializedWindowSize() mWindowPositionSize.height = mCommandLineOptions->stageHeight; mMainWindow.SetSize(Dali::Window::WindowSize(mWindowPositionSize.width, mWindowPositionSize.height)); } - else if(mEnvironmentOptions.GetWindowWidth() && mEnvironmentOptions.GetWindowHeight()) + else if(mEnvironmentOptions->GetWindowWidth() && mEnvironmentOptions->GetWindowHeight()) { // Environment options override full screen functionality if command line arguments not provided - mWindowPositionSize.width = mEnvironmentOptions.GetWindowWidth(); - mWindowPositionSize.height = mEnvironmentOptions.GetWindowHeight(); + mWindowPositionSize.width = mEnvironmentOptions->GetWindowWidth(); + mWindowPositionSize.height = mEnvironmentOptions->GetWindowHeight(); mMainWindow.SetSize(Dali::Window::WindowSize(mWindowPositionSize.width, mWindowPositionSize.height)); } else if(screenWidth != mWindowPositionSize.width || screenHeight != mWindowPositionSize.height) @@ -191,26 +202,43 @@ void Application::ChangePreInitializedWindowSize() void Application::CreateWindow() { - if(mWindowPositionSize.width == 0 && mWindowPositionSize.height == 0) + Internal::Adaptor::Window* window; + + if(mLaunchpadState != Launchpad::PRE_INITIALIZED) { - if(mCommandLineOptions->stageWidth > 0 && mCommandLineOptions->stageHeight > 0) + if(mWindowPositionSize.width == 0 && mWindowPositionSize.height == 0) { - // Command line options override environment options and full screen - mWindowPositionSize.width = mCommandLineOptions->stageWidth; - mWindowPositionSize.height = mCommandLineOptions->stageHeight; + if(mCommandLineOptions->stageWidth > 0 && mCommandLineOptions->stageHeight > 0) + { + // Command line options override environment options and full screen + mWindowPositionSize.width = mCommandLineOptions->stageWidth; + mWindowPositionSize.height = mCommandLineOptions->stageHeight; + } + else if(mEnvironmentOptions->GetWindowWidth() && mEnvironmentOptions->GetWindowHeight()) + { + // Environment options override full screen functionality if command line arguments not provided + mWindowPositionSize.width = mEnvironmentOptions->GetWindowWidth(); + mWindowPositionSize.height = mEnvironmentOptions->GetWindowHeight(); + } } - else if(mEnvironmentOptions.GetWindowWidth() && mEnvironmentOptions.GetWindowHeight()) + + auto windowClassName = mEnvironmentOptions->GetWindowClassName(); + auto windowName = mEnvironmentOptions->GetWindowName(); + if(!windowName.empty()) { - // Environment options override full screen functionality if command line arguments not provided - mWindowPositionSize.width = mEnvironmentOptions.GetWindowWidth(); - mWindowPositionSize.height = mEnvironmentOptions.GetWindowHeight(); + mMainWindowName = windowName; } - } - const std::string& windowClassName = mEnvironmentOptions.GetWindowClassName(); + window = Internal::Adaptor::Window::New(mWindowPositionSize, mMainWindowName, windowClassName, mDefaultWindowType, mMainWindowMode == Dali::Application::TRANSPARENT); + } + else + { + // The position, size and the window name of the pre-initialized application will be updated in ChangePreInitializedWindowInfo() + // when the real application is launched. + window = Internal::Adaptor::Window::New(mWindowPositionSize, "", "", mDefaultWindowType, mMainWindowMode == Dali::Application::TRANSPARENT); + } - Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(mWindowPositionSize, mMainWindowName, windowClassName, mDefaultWindowType, mMainWindowMode == Dali::Application::TRANSPARENT); - mMainWindow = Dali::Window(window); + mMainWindow = Dali::Window(window); // Quit the application when the window is closed GetImplementation(mMainWindow).DeleteRequestSignal().Connect(mSlotDelegate, &Application::Quit); @@ -224,14 +252,14 @@ void Application::CreateAdaptor() Integration::SceneHolder sceneHolder = Integration::SceneHolder(&Dali::GetImplementation(mMainWindow)); - mAdaptor = Adaptor::New(graphicsFactory, sceneHolder, &mEnvironmentOptions); + mAdaptor = Adaptor::New(graphicsFactory, sceneHolder, mEnvironmentOptions.get()); Adaptor::GetImplementation(*mAdaptor).SetUseRemoteSurface(mUseRemoteSurface); } void Application::CreateAdaptorBuilder() { - mAdaptorBuilder = new AdaptorBuilder(mEnvironmentOptions); + mAdaptorBuilder = new AdaptorBuilder(*mEnvironmentOptions); } void Application::MainLoop() @@ -265,6 +293,8 @@ void Application::QuitFromMainLoop() void Application::OnInit() { + mEnvironmentOptions = std::unique_ptr(new EnvironmentOptions()); + mFramework->AddAbortCallback(MakeCallback(this, &Application::QuitFromMainLoop)); CreateAdaptorBuilder(); @@ -278,7 +308,7 @@ void Application::OnInit() if(mLaunchpadState == Launchpad::PRE_INITIALIZED) { - ChangePreInitializedWindowSize(); + ChangePreInitializedWindowInfo(); } // Run the adaptor @@ -521,6 +551,12 @@ void Application::SetCommandLineOptions(int* argc, char** argv[]) mCommandLineOptions = new CommandLineOptions(argc, argv); mFramework->SetCommandLineOptions(argc, argv); + + if(argc && (*argc > 0)) + { + // Set mName from command-line args + mMainWindowName = (*argv)[0]; + } } void Application::SetDefaultWindowType(WindowType type) diff --git a/dali/internal/adaptor/common/application-impl.h b/dali/internal/adaptor/common/application-impl.h index 8e334a7..a881314 100644 --- a/dali/internal/adaptor/common/application-impl.h +++ b/dali/internal/adaptor/common/application-impl.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_APPLICATION_H /* - * 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. @@ -54,7 +54,6 @@ enum State } // namespace Launchpad class CommandLineOptions; -class EventLoop; typedef Dali::Rect PositionSize; @@ -498,9 +497,9 @@ protected: void QuitFromMainLoop(); /** - * Changes size of preInitialized window + * Changes information of preInitialized window */ - void ChangePreInitializedWindowSize(); + void ChangePreInitializedWindowInfo(); private: AppSignalType mInitSignal; @@ -524,13 +523,13 @@ private: LowMemorySignalType mTaskLowMemorySignal; DeviceOrientationChangedSignalType mTaskDeviceOrientationChangedSignal; - EventLoop* mEventLoop; Framework* mFramework; CommandLineOptions* mCommandLineOptions; Dali::Internal::Adaptor::AdaptorBuilder* mAdaptorBuilder; ///< The adaptor builder Dali::Adaptor* mAdaptor; + std::unique_ptr mEnvironmentOptions; // The Main Window is that window created by the Application during initial startup // (previously this was the only window) @@ -538,13 +537,12 @@ private: Dali::Application::WINDOW_MODE mMainWindowMode; ///< Window mode of the main window std::string mMainWindowName; ///< Name of the main window as obtained from environment options - std::string mStylesheet; - EnvironmentOptions mEnvironmentOptions; - PositionSize mWindowPositionSize; - Launchpad::State mLaunchpadState; - bool mUseRemoteSurface; - WindowType mDefaultWindowType; ///< Default window's type. It is used when Application is created. - bool mUseUiThread; + std::string mStylesheet; + PositionSize mWindowPositionSize; + Launchpad::State mLaunchpadState; + WindowType mDefaultWindowType; ///< Default window's type. It is used when Application is created. + bool mUseRemoteSurface; + bool mUseUiThread; SlotDelegate mSlotDelegate; diff --git a/dali/internal/offscreen/common/offscreen-application-impl.cpp b/dali/internal/offscreen/common/offscreen-application-impl.cpp index 634d69f..9510978 100644 --- a/dali/internal/offscreen/common/offscreen-application-impl.cpp +++ b/dali/internal/offscreen/common/offscreen-application-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 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. @@ -24,6 +24,7 @@ #include #include #include +#include namespace Dali { @@ -39,6 +40,8 @@ IntrusivePtr OffscreenApplication::New(uint16_t width, uin OffscreenApplication::OffscreenApplication(uint16_t width, uint16_t height, Dali::Any surface, bool isTranslucent, RenderMode renderMode) { + Dali::Internal::Adaptor::WindowSystem::Initialize(); + // Generate a default window IntrusivePtr impl = Internal::OffscreenWindow::New(width, height, surface, isTranslucent); mDefaultWindow = Dali::OffscreenWindow(impl.Get()); @@ -49,6 +52,11 @@ OffscreenApplication::OffscreenApplication(uint16_t width, uint16_t height, Dali impl->Initialize(true); } +OffscreenApplication::~OffscreenApplication() +{ + Dali::Internal::Adaptor::WindowSystem::Shutdown(); +} + void OffscreenApplication::Start() { // Start the adaptor diff --git a/dali/internal/offscreen/common/offscreen-application-impl.h b/dali/internal/offscreen/common/offscreen-application-impl.h index b9b7c8c..6a868ca 100644 --- a/dali/internal/offscreen/common/offscreen-application-impl.h +++ b/dali/internal/offscreen/common/offscreen-application-impl.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_OFFSCREEN_APPLICATION_IMPL_H /* - * Copyright (c) 2021 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. @@ -56,7 +56,7 @@ public: /** * Destructor */ - virtual ~OffscreenApplication() = default; + virtual ~OffscreenApplication(); /** * @copydoc Dali::OffscreenApplication::Start() diff --git a/dali/internal/window-system/macos/window-system-mac.mm b/dali/internal/window-system/macos/window-system-mac.mm index 70aa68c..1f67d12 100644 --- a/dali/internal/window-system/macos/window-system-mac.mm +++ b/dali/internal/window-system/macos/window-system-mac.mm @@ -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. @@ -27,6 +27,10 @@ void Initialize() { } +void Shutdown() +{ +} + void GetScreenSize( int32_t& width, int32_t& height ) { NSRect r = [[NSScreen mainScreen] frame]; diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp b/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp index ddf4ad5..e13f885 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp +++ b/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp @@ -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. @@ -26,7 +26,6 @@ #include #include #include -#include // EXTERNAL_HEADERS #include @@ -607,8 +606,6 @@ WindowBaseEcoreWl::~WindowBaseEcoreWl() if(mOwnSurface) { ecore_wl_window_free(mEcoreWindow); - - WindowSystem::Shutdown(); } } @@ -624,8 +621,6 @@ void WindowBaseEcoreWl::Initialize(PositionSize positionSize, Any surface, bool else { // we own the surface about to created - WindowSystem::Initialize(); - mOwnSurface = true; CreateWindow(positionSize); } diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp index 762fd65..5eec7b6 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp +++ b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp @@ -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. @@ -842,8 +842,6 @@ WindowBaseEcoreWl2::~WindowBaseEcoreWl2() if(mOwnSurface) { ecore_wl2_window_free(mEcoreWindow); - - WindowSystem::Shutdown(); } } @@ -859,8 +857,6 @@ void WindowBaseEcoreWl2::Initialize(PositionSize positionSize, Any surface, bool else { // we own the surface about to created - WindowSystem::Initialize(); - mOwnSurface = true; CreateWindow(positionSize); } diff --git a/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp b/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp index 09fd990..c215b30 100644 --- a/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp +++ b/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 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. @@ -39,7 +39,6 @@ #include #include #include -#include namespace Dali { @@ -61,8 +60,6 @@ NativeRenderSurfaceEcoreWl::NativeRenderSurfaceEcoreWl(SurfaceSize surfaceSize, mTbmQueue(NULL), mThreadSynchronization(NULL) { - Dali::Internal::Adaptor::WindowSystem::Initialize(); - if(surface.Empty()) { mSurfaceSize = surfaceSize; @@ -101,8 +98,6 @@ NativeRenderSurfaceEcoreWl::~NativeRenderSurfaceEcoreWl() DALI_LOG_INFO(gNativeSurfaceLogFilter, Debug::General, "Own tbm surface queue destroy\n"); } - - Dali::Internal::Adaptor::WindowSystem::Shutdown(); } void NativeRenderSurfaceEcoreWl::SetRenderNotification(TriggerEventInterface* renderNotification) diff --git a/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp b/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp index e13f26e..ef2e530 100644 --- a/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp +++ b/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp @@ -21,7 +21,6 @@ // INTERNAL HEADERS #include #include -#include #include // EXTERNAL_HEADERS @@ -272,8 +271,6 @@ WindowBaseEcoreX::~WindowBaseEcoreX() if(mOwnSurface) { ecore_x_window_free(mEcoreWindow); - - WindowSystem::Shutdown(); } } @@ -285,8 +282,6 @@ void WindowBaseEcoreX::Initialize(PositionSize positionSize, Any surface, bool i // if the surface is empty, create a new one. if(surfaceId == 0) { - WindowSystem::Initialize(); - // we own the surface about to created mOwnSurface = true; CreateWindow(positionSize, isTransparent); diff --git a/dali/internal/window-system/x11/window-base-x.cpp b/dali/internal/window-system/x11/window-base-x.cpp index 9dd0b5b..3f803f7 100644 --- a/dali/internal/window-system/x11/window-base-x.cpp +++ b/dali/internal/window-system/x11/window-base-x.cpp @@ -270,9 +270,6 @@ WindowBaseX::~WindowBaseX() if(mOwnSurface) { XDestroyWindow(WindowSystem::GetImplementation().GetXDisplay(), mWindow); - - /**** @todo Should not be destroyed here! ****/ - WindowSystem::Shutdown(); } } @@ -284,9 +281,6 @@ void WindowBaseX::Initialize(PositionSize positionSize, Any surface, bool isTran // if the surface is empty, create a new one. if(surfaceId == 0) { - /**** @todo Should be created from somewhere else! ****/ - WindowSystem::Initialize(); - // we own the surface about to created mOwnSurface = true; CreateWindow(positionSize, isTransparent); diff --git a/dali/public-api/adaptor-framework/application.cpp b/dali/public-api/adaptor-framework/application.cpp index 5daf923..d484028 100644 --- a/dali/public-api/adaptor-framework/application.cpp +++ b/dali/public-api/adaptor-framework/application.cpp @@ -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. @@ -39,10 +39,6 @@ Application Application::New(int* argc, char** argv[]) { // pre-initialized application internal->SetCommandLineOptions(argc, argv); - if(argc && (*argc > 0)) - { - internal->GetWindow().SetClass((*argv)[0], ""); - } } else { @@ -58,10 +54,6 @@ Application Application::New(int* argc, char** argv[], const std::string& styles { // pre-initialized application internal->SetCommandLineOptions(argc, argv); - if(argc && (*argc > 0)) - { - internal->GetWindow().SetClass((*argv)[0], ""); - } internal->SetStyleSheet(stylesheet); } else @@ -78,10 +70,6 @@ Application Application::New(int* argc, char** argv[], const std::string& styles { // 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)); @@ -100,10 +88,6 @@ Application Application::New(int* argc, char** argv[], const std::string& styles { // 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)); @@ -125,10 +109,6 @@ Application Application::New(int* argc, char** argv[], const std::string& styles { // 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));