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
|
|
|
|
2018-12-08 05:17:51 +00:00
|
|
|
namespace boo {
|
|
|
|
|
2017-11-13 07:19:49 +00:00
|
|
|
std::shared_ptr<IWindow> _WindowWaylandNew(std::string_view title);
|
2015-05-13 22:21:13 +00:00
|
|
|
|
2018-12-08 05:17:51 +00:00
|
|
|
class ApplicationWayland final : public IApplication {
|
|
|
|
IApplicationCallback& m_callback;
|
|
|
|
const std::string m_uniqueName;
|
|
|
|
const std::string m_friendlyName;
|
|
|
|
const std::string m_pname;
|
|
|
|
const std::vector<std::string> m_args;
|
|
|
|
bool m_singleInstance;
|
|
|
|
|
|
|
|
void _deletedWindow(IWindow* window) { (void)window; }
|
|
|
|
|
2015-05-06 00:50:57 +00:00
|
|
|
public:
|
2018-12-08 05:17:51 +00:00
|
|
|
ApplicationWayland(IApplicationCallback& callback, std::string_view uniqueName, std::string_view friendlyName,
|
|
|
|
std::string_view pname, const std::vector<std::string>& args, std::string_view gfxApi,
|
|
|
|
uint32_t samples, uint32_t anisotropy, bool deepColor, bool singleInstance)
|
|
|
|
: m_callback(callback)
|
|
|
|
, m_uniqueName(uniqueName)
|
|
|
|
, m_friendlyName(friendlyName)
|
|
|
|
, m_pname(pname)
|
|
|
|
, m_args(args)
|
|
|
|
, m_singleInstance(singleInstance) {
|
|
|
|
(void)m_callback;
|
|
|
|
(void)m_singleInstance;
|
|
|
|
}
|
|
|
|
|
|
|
|
EPlatformType getPlatformType() const { return EPlatformType::Wayland; }
|
|
|
|
|
|
|
|
int run() { return 0; }
|
2015-05-09 05:33:48 +00:00
|
|
|
|
2018-12-08 05:17:51 +00:00
|
|
|
std::string_view getUniqueName() const { return m_uniqueName; }
|
2015-05-13 22:21:13 +00:00
|
|
|
|
2018-12-08 05:17:51 +00:00
|
|
|
std::string_view getFriendlyName() const { return m_friendlyName; }
|
|
|
|
|
|
|
|
std::string_view getProcessName() const { return m_pname; }
|
|
|
|
|
|
|
|
const std::vector<std::string>& getArgs() const { return m_args; }
|
|
|
|
|
|
|
|
std::shared_ptr<IWindow> newWindow(std::string_view title) { return _WindowWaylandNew(title); }
|
2015-05-06 00:50:57 +00:00
|
|
|
};
|
2018-12-08 05:17:51 +00:00
|
|
|
|
|
|
|
} // namespace boo
|