int* argc,
char **argv[],
const std::string& name,
- const DeviceLayout& baseLayout )
+ const DeviceLayout& baseLayout,
+ Dali::Application::WINDOW_MODE windowMode)
{
- ApplicationPtr application ( new Application (argc, argv, name, baseLayout ) );
+ ApplicationPtr application ( new Application (argc, argv, name, baseLayout, windowMode ) );
return application;
}
int* argc,
char** argv[],
const std::string& name,
- const DeviceLayout& baseLayout )
+ const DeviceLayout& baseLayout,
+ Dali::Application::WINDOW_MODE windowMode)
: mFramework(NULL),
mCommandLineOptions(NULL),
mAdaptor(NULL),
mWindow(),
+ mWindowMode( windowMode ),
mName(name),
mInitialized(false),
mBaseLayout(baseLayout),
windowPosition = PositionSize(0,0,mCommandLineOptions->stageWidth,mCommandLineOptions->stageHeight);
}
- mWindow = Dali::Window::New( windowPosition, mName );
+ mWindow = Dali::Window::New( windowPosition, mName, mWindowMode == Dali::Application::TRANSPARENT );
}
void Application::CreateAdaptor()
* @param[in] argv A pointer to the argument list
* @param[in] name A name of application
* @param[in] baseLayout The base layout that the application has been written for
+ * @param[in] windowMode A member of Dali::Application::WINDOW_MODE
*/
- static ApplicationPtr New(int* argc, char **argv[], const std::string& name, const DeviceLayout& baseLayout);
+ static ApplicationPtr New(int* argc, char **argv[], const std::string& name,
+ const DeviceLayout& baseLayout,
+ Dali::Application::WINDOW_MODE windowMode);
- Application(int* argc, char **argv[], const std::string& name, const DeviceLayout& baseLayout);
+ Application(int* argc, char **argv[], const std::string& name, const DeviceLayout& baseLayout, Dali::Application::WINDOW_MODE windowMode );
/**
* Destructor
Dali::Adaptor* mAdaptor;
Dali::Window mWindow;
+ Dali::Application::WINDOW_MODE mWindowMode;
std::string mName;
bool mInitialized;
Application Application::New( int* argc, char **argv[] )
{
- Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::New( argc, argv, "Dali Application", DeviceLayout::DEFAULT_BASE_LAYOUT );
+ Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::New( argc, argv, "Dali Application", DeviceLayout::DEFAULT_BASE_LAYOUT, OPAQUE );
return Application(internal.Get());
}
Application Application::New( int* argc, char **argv[], const std::string& name )
{
- Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::New( argc, argv, name, DeviceLayout::DEFAULT_BASE_LAYOUT );
+ Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::New( argc, argv, name, DeviceLayout::DEFAULT_BASE_LAYOUT, OPAQUE );
+ return Application(internal.Get());
+}
+
+Application Application::New( int* argc, char **argv[], const std::string& name, WINDOW_MODE windowMode )
+{
+ Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::New( argc, argv, name, DeviceLayout::DEFAULT_BASE_LAYOUT, windowMode );
return Application(internal.Get());
}
Application Application::New(int* argc, char **argv[], const DeviceLayout& baseLayout)
{
- Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::New( argc, argv, "Dali Application", baseLayout );
+ Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::New( argc, argv, "Dali Application", baseLayout, OPAQUE );
return Application(internal.Get());
}
Application Application::New(int* argc, char **argv[], const std::string& name, const DeviceLayout& baseLayout)
{
- Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::New( argc, argv, name, baseLayout );
+ Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::New( argc, argv, name, baseLayout, OPAQUE );
return Application(internal.Get());
}
typedef SignalV2< void (Application&) > AppSignalV2;
+ /**
+ * Decides whether a Dali application window is opaque or transparent.
+ */
+ enum WINDOW_MODE
+ {
+ OPAQUE = 0, ///< The window will be opaque
+ TRANSPARENT = 1 ///< The window transparency will match the alpha value set in Dali::Stage::SetBackgroundcolor()
+ };
+
public:
/**
static Application New( int* argc, char **argv[], const std::string& name );
/**
+ * This is the constructor for applications with a name, and also require a
+ * transparent top-level window
+ *
+ * @param[in,out] argc A pointer to the number of arguments
+ * @param[in,out] argv A pointer the the argument list
+ * @param[in] name A name of application
+ * @param[in] windowMode A member of WINDOW_MODE
+ *
+ * @note The default base layout (DeviceLayout::DEFAULT_BASE_LAYOUT) will be used with this constructor.
+ * @note Supported options are stripped from argv, and argc is updated appropriately.
+ */
+ static Application New( int* argc, char **argv[], const std::string& name, WINDOW_MODE windowMode );
+
+ /**
* This is the constructor for applications when a layout for the application is specified.
*
* @param[in,out] argc A pointer to the number of arguments