/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
int* argc,
char **argv[],
const std::string& stylesheet,
- Dali::Application::WINDOW_MODE windowMode)
+ Dali::Application::WINDOW_MODE windowMode,
+ Framework::Type applicationType)
{
- ApplicationPtr application ( new Application (argc, argv, stylesheet, windowMode ) );
+ ApplicationPtr application ( new Application (argc, argv, stylesheet, windowMode, applicationType ) );
return application;
}
-Application::Application( int* argc, char** argv[], const std::string& stylesheet, Dali::Application::WINDOW_MODE windowMode )
+Application::Application( int* argc, char** argv[], const std::string& stylesheet,
+ Dali::Application::WINDOW_MODE windowMode, Framework::Type applicationType )
: mInitSignal(),
mTerminateSignal(),
mPauseSignal(),
}
mCommandLineOptions = new CommandLineOptions(argc, argv);
-
- mFramework = new Framework( *this, argc, argv );
+ mFramework = new Framework( *this, argc, argv, applicationType );
+ mUseRemoteSurface = (applicationType == Framework::WATCH);
}
Application::~Application()
delete mFramework;
delete mCommandLineOptions;
delete mAdaptor;
+
mWindow.Reset();
}
mAdaptor = Dali::Internal::Adaptor::Adaptor::New( mWindow, mContextLossConfiguration, &mEnvironmentOptions );
mAdaptor->ResizedSignal().Connect( mSlotDelegate, &Application::OnResize );
+
+ Internal::Adaptor::Adaptor::GetImplementation( *mAdaptor ).SetUseRemoteSurface( mUseRemoteSurface );
}
void Application::MainLoop(Dali::Configuration::ContextLoss configuration)
mFramework->AddAbortCallback( MakeCallback( this, &Application::QuitFromMainLoop ) );
CreateWindow();
- CreateAdaptor();
- // Run the adaptor
+ // Start the adaptor
+ CreateAdaptor();
mAdaptor->Start();
// Check if user requires no vsyncing and set on X11 Adaptor