Add Qt/QML desktop shell and Nebula.UI
Introduce a new production desktop shell at `shells/desktop/shell` built with C++20, Qt Quick/QML, and LayerShellQt, including top bar, launcher, desktop surfaces, shell state, and mock app data. Add the shared `packages/nebula-ui` QML module (theme, controls, focus, icons) and wire it into the shell build. Retire the old GTK/WebKit native host by removing `shells/desktop/native`, move the React shell UI to `shells/desktop/prototype-react` as an archived design reference, and update root/compositor/session documentation to reflect the new Linux-only production architecture and temporary Sway role.
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
#include <LayerShellQt/Shell>
|
||||
|
||||
#include <QGuiApplication>
|
||||
#include <QQmlApplicationEngine>
|
||||
#include <QQuickWindow>
|
||||
#include <QUrl>
|
||||
#include <QtGlobal>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
LayerShellQt::Shell::useLayerShell();
|
||||
|
||||
QGuiApplication app(argc, argv);
|
||||
app.setApplicationName(QStringLiteral("nebula-shell"));
|
||||
app.setApplicationDisplayName(QStringLiteral("Nebula Desktop"));
|
||||
app.setOrganizationName(QStringLiteral("NebulaOS"));
|
||||
app.setDesktopFileName(QStringLiteral("org.nebulaos.shell"));
|
||||
|
||||
QQuickWindow::setDefaultAlphaBuffer(true);
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
engine.addImportPath(QStringLiteral("qrc:/qt/qml"));
|
||||
|
||||
QObject::connect(
|
||||
&engine,
|
||||
&QQmlApplicationEngine::objectCreationFailed,
|
||||
&app,
|
||||
[]() {
|
||||
qCritical("nebula-shell: failed to load the Nebula QML module.");
|
||||
QCoreApplication::exit(EXIT_FAILURE);
|
||||
},
|
||||
Qt::QueuedConnection);
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||
engine.loadFromModule(QStringLiteral("Nebula.Shell"), QStringLiteral("Main"));
|
||||
#else
|
||||
engine.load(QUrl(QStringLiteral("qrc:/qt/qml/Nebula/Shell/Main.qml")));
|
||||
#endif
|
||||
|
||||
if (engine.rootObjects().isEmpty()) {
|
||||
qCritical("nebula-shell: failed to load the Nebula QML module.");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
Reference in New Issue
Block a user