window: generate qmltypes

This commit is contained in:
outfoxxed 2024-10-31 01:28:06 -07:00
parent 4e48c6eefb
commit 9980f8587e
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
9 changed files with 51 additions and 8 deletions

View file

@ -44,7 +44,8 @@ target_link_libraries(quickshell-core PRIVATE quickshell-build)
qt_add_qml_module(quickshell-core
URI Quickshell
VERSION 0.1
IMPORTS Quickshell._Window
OPTIONAL_IMPORTS Quickshell._Window
DEFAULT_IMPORTS Quickshell._Window
)
target_link_libraries(quickshell-core PRIVATE ${QT_DEPS} CLI11::CLI11)

View file

@ -10,6 +10,9 @@
#define QSDOC_ELEMENT
#define QSDOC_NAMED_ELEMENT(name)
// unmark uncreatable (will be overlayed by other types)
#define QSDOC_CREATABLE
// change the cname used for this type
#define QSDOC_CNAME(name)

View file

@ -7,12 +7,12 @@ headers = [
"shell.hpp",
"variants.hpp",
"region.hpp",
"proxywindow.hpp",
"../window/proxywindow.hpp",
"persistentprops.hpp",
"windowinterface.hpp",
"panelinterface.hpp",
"floatingwindow.hpp",
"popupwindow.hpp",
"../window/windowinterface.hpp",
"../window/panelinterface.hpp",
"../window/floatingwindow.hpp",
"../window/popupwindow.hpp",
"singleton.hpp",
"lazyloader.hpp",
"easingcurve.hpp",

View file

@ -19,6 +19,10 @@ void QuickshellPlugin::initPlugins() {
plugins.end()
);
std::sort(plugins.begin(), plugins.end(), [](QuickshellPlugin* a, QuickshellPlugin* b) {
return b->dependencies().contains(a->name());
});
for (QuickshellPlugin* plugin: plugins) {
plugin->init();
}

View file

@ -2,6 +2,7 @@
#include <qcontainerfwd.h>
#include <qfunctionpointer.h>
#include <qlist.h>
class EngineGeneration;
@ -14,6 +15,8 @@ public:
void operator=(QuickshellPlugin&&) = delete;
void operator=(const QuickshellPlugin&) = delete;
virtual QString name() { return QString(); }
virtual QList<QString> dependencies() { return {}; }
virtual bool applies() { return true; }
virtual void init() {}
virtual void registerTypes() {}