mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-13 23:26:16 +00:00
Major refactor for better modularity
This commit is contained in:
85
lib/x11/ApplicationWayland.hpp
Normal file
85
lib/x11/ApplicationWayland.hpp
Normal file
@@ -0,0 +1,85 @@
|
||||
#ifndef APPLICATION_UNIX_CPP
|
||||
#error This file may only be included from CApplicationUnix.cpp
|
||||
#endif
|
||||
|
||||
#include "IApplication.hpp"
|
||||
|
||||
#include <dbus/dbus.h>
|
||||
DBusConnection* registerDBus(const char* appName, bool& isFirst);
|
||||
|
||||
namespace boo
|
||||
{
|
||||
|
||||
IWindow* _CWindowWaylandNew(const std::string& title);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public:
|
||||
ApplicationWayland(IApplicationCallback& callback,
|
||||
const std::string& uniqueName,
|
||||
const std::string& friendlyName,
|
||||
const std::string& pname,
|
||||
const std::vector<std::string>& args,
|
||||
bool singleInstance)
|
||||
: m_callback(callback),
|
||||
m_uniqueName(uniqueName),
|
||||
m_friendlyName(friendlyName),
|
||||
m_pname(pname),
|
||||
m_args(args),
|
||||
m_singleInstance(singleInstance)
|
||||
{}
|
||||
|
||||
EPlatformType getPlatformType() const
|
||||
{
|
||||
return PLAT_WAYLAND;
|
||||
}
|
||||
|
||||
void run()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void quit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
const std::string& getUniqueName() const
|
||||
{
|
||||
return m_uniqueName;
|
||||
}
|
||||
|
||||
const std::string& getFriendlyName() const
|
||||
{
|
||||
return m_friendlyName;
|
||||
}
|
||||
|
||||
const std::string& getProcessName() const
|
||||
{
|
||||
return m_pname;
|
||||
}
|
||||
|
||||
const std::vector<std::string>& getArgs() const
|
||||
{
|
||||
return m_args;
|
||||
}
|
||||
|
||||
IWindow* newWindow(const std::string& title)
|
||||
{
|
||||
return _CWindowWaylandNew(title);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user