quickshell/src/x11/init.cpp
outfoxxed 2996e40ff9
core/plugin: rename QuickshellPlugin to QsEnginePlugin
Fixes conflict with the autogenerated qml plugin of the same name.
2024-11-22 18:59:15 -08:00

33 lines
728 B
C++

#include <qguiapplication.h>
#include <qlist.h>
#include <qqml.h>
#include <qstring.h>
#include "../core/plugin.hpp"
#include "panel_window.hpp"
#include "util.hpp"
namespace {
class X11Plugin: public QsEnginePlugin {
QList<QString> dependencies() override { return {"window"}; }
bool applies() override { return QGuiApplication::platformName() == "xcb"; }
void init() override { XAtom::initAtoms(); }
void registerTypes() override {
qmlRegisterType<XPanelInterface>("Quickshell._X11Overlay", 1, 0, "PanelWindow");
qmlRegisterModuleImport(
"Quickshell",
QQmlModuleImportModuleAny,
"Quickshell._X11Overlay",
QQmlModuleImportLatest
);
}
};
QS_REGISTER_PLUGIN(X11Plugin);
} // namespace