forked from quickshell/quickshell
feat: basic plugin system
The wayland plugin now uses it.
This commit is contained in:
parent
6c6272e523
commit
3bd587cfcc
8 changed files with 94 additions and 4 deletions
19
src/wayland/init.cpp
Normal file
19
src/wayland/init.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include <qguiapplication.h>
|
||||
#include <qqml.h>
|
||||
|
||||
#include "../core/plugin.hpp"
|
||||
#include "waylandlayershell.hpp"
|
||||
|
||||
namespace {
|
||||
|
||||
class WaylandPlugin: public QuickshellPlugin {
|
||||
bool applies() override { return QGuiApplication::platformName() == "wayland"; }
|
||||
|
||||
void registerTypes() override {
|
||||
qmlRegisterType<WaylandPanelInterface>("QuickShell", 1, 0, "PanelWindow");
|
||||
}
|
||||
};
|
||||
|
||||
QS_REGISTER_PLUGIN(WaylandPlugin);
|
||||
|
||||
} // namespace
|
Loading…
Add table
Add a link
Reference in a new issue