2015-08-18 19:40:26 +00:00
|
|
|
#ifndef APPLICATION_UNIX_CPP
|
2015-05-06 00:50:57 +00:00
|
|
|
#error This file may only be included from CApplicationUnix.cpp
|
|
|
|
#endif
|
|
|
|
|
2015-08-18 22:43:30 +00:00
|
|
|
#include "boo/IApplication.hpp"
|
2015-05-06 00:50:57 +00:00
|
|
|
|
2015-05-13 22:21:13 +00:00
|
|
|
#include <dbus/dbus.h>
|
2015-10-28 01:47:55 +00:00
|
|
|
DBusConnection* RegisterDBus(const char* appName, bool& isFirst);
|
2015-05-13 22:21:13 +00:00
|
|
|
|
2015-05-06 00:50:57 +00:00
|
|
|
namespace boo
|
|
|
|
{
|
|
|
|
|
2015-10-28 01:47:55 +00:00
|
|
|
IWindow* _WindowWaylandNew(const std::string& title);
|
2015-05-06 00:50:57 +00:00
|
|
|
|
2015-08-18 19:40:26 +00:00
|
|
|
class ApplicationWayland final : public IApplication
|
2015-05-06 00:50:57 +00:00
|
|
|
{
|
2015-05-10 07:02:18 +00:00
|
|
|
IApplicationCallback& m_callback;
|
2015-05-13 22:21:13 +00:00
|
|
|
const std::string m_uniqueName;
|
2015-05-06 00:50:57 +00:00
|
|
|
const std::string m_friendlyName;
|
|
|
|
const std::string m_pname;
|
|
|
|
const std::vector<std::string> m_args;
|
2015-05-13 22:21:13 +00:00
|
|
|
bool m_singleInstance;
|
|
|
|
|
2015-05-06 00:50:57 +00:00
|
|
|
void _deletedWindow(IWindow* window)
|
|
|
|
{
|
|
|
|
(void)window;
|
|
|
|
}
|
|
|
|
|
|
|
|
public:
|
2015-08-18 19:40:26 +00:00
|
|
|
ApplicationWayland(IApplicationCallback& callback,
|
2015-05-13 22:21:13 +00:00
|
|
|
const std::string& uniqueName,
|
2015-05-06 00:50:57 +00:00
|
|
|
const std::string& friendlyName,
|
|
|
|
const std::string& pname,
|
2015-05-13 22:21:13 +00:00
|
|
|
const std::vector<std::string>& args,
|
|
|
|
bool singleInstance)
|
2015-05-06 00:50:57 +00:00
|
|
|
: m_callback(callback),
|
2015-05-13 22:21:13 +00:00
|
|
|
m_uniqueName(uniqueName),
|
2015-05-06 00:50:57 +00:00
|
|
|
m_friendlyName(friendlyName),
|
|
|
|
m_pname(pname),
|
2015-05-13 22:21:13 +00:00
|
|
|
m_args(args),
|
|
|
|
m_singleInstance(singleInstance)
|
2015-05-06 00:50:57 +00:00
|
|
|
{}
|
|
|
|
|
|
|
|
EPlatformType getPlatformType() const
|
|
|
|
{
|
|
|
|
return PLAT_WAYLAND;
|
|
|
|
}
|
|
|
|
|
2015-10-28 01:47:55 +00:00
|
|
|
int run()
|
2015-05-06 00:50:57 +00:00
|
|
|
{
|
2015-10-30 00:00:56 +00:00
|
|
|
return 0;
|
2015-05-09 05:33:48 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 22:21:13 +00:00
|
|
|
const std::string& getUniqueName() const
|
|
|
|
{
|
|
|
|
return m_uniqueName;
|
|
|
|
}
|
|
|
|
|
|
|
|
const std::string& getFriendlyName() const
|
|
|
|
{
|
|
|
|
return m_friendlyName;
|
|
|
|
}
|
2015-05-06 00:50:57 +00:00
|
|
|
|
|
|
|
const std::string& getProcessName() const
|
|
|
|
{
|
|
|
|
return m_pname;
|
|
|
|
}
|
|
|
|
|
|
|
|
const std::vector<std::string>& getArgs() const
|
|
|
|
{
|
|
|
|
return m_args;
|
|
|
|
}
|
|
|
|
|
2015-11-01 00:14:32 +00:00
|
|
|
IWindow* newWindow(const std::string& title)
|
2015-05-06 00:50:57 +00:00
|
|
|
{
|
2015-11-01 00:14:32 +00:00
|
|
|
return _WindowWaylandNew(title);
|
2015-05-06 00:50:57 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|