forked from quickshell/quickshell
x11: add XPanelWindow
This commit is contained in:
parent
908ba3eef5
commit
73cfeba61b
15 changed files with 804 additions and 5 deletions
29
src/x11/init.cpp
Normal file
29
src/x11/init.cpp
Normal file
|
@ -0,0 +1,29 @@
|
|||
#include <qguiapplication.h>
|
||||
#include <qqml.h>
|
||||
|
||||
#include "../core/plugin.hpp"
|
||||
#include "panel_window.hpp"
|
||||
#include "util.hpp"
|
||||
|
||||
namespace {
|
||||
|
||||
class X11Plugin: public QuickshellPlugin {
|
||||
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
|
Loading…
Add table
Add a link
Reference in a new issue