Files
Nebula-OS/shells/desktop/native/src/LauncherSurface.cpp
T
andrew 2dadead399 Add native Wayland shell host scaffolding
Introduce a Linux-only C++20 `nebula-shell` host built with CMake, GTK4, gtk4-layer-shell, and WebKitGTK 6.0. Add a shared `Surface` abstraction and concrete Desktop/TopBar/Launcher surfaces with layer placement, sizing, transparency, and per-surface `?surface=` URL loading.

Add `ShellApplication` startup flow that validates `NEBULA_SHELL_DEV_URL`, checks layer-shell support, creates/presents desktop and top bar, and keeps launcher created but hidden for future bridge-driven toggling. Update the native README to document architecture, development setup, dependencies, and current milestone scope.
2026-08-26 15:44:44 +12:00

22 lines
851 B
C++

#include "LauncherSurface.hpp"
LauncherSurface::LauncherSurface(GtkApplication* app, const std::string& base_url)
: Surface(app, base_url, Config{
.layer_namespace = "nebula-launcher",
.surface_name = "launcher",
.layer = GTK_LAYER_SHELL_LAYER_OVERLAY,
.anchor_top = true,
.anchor_bottom = true,
.anchor_left = true,
.anchor_right = true,
.height_px = -1,
.keyboard_mode = GTK_LAYER_SHELL_KEYBOARD_MODE_ON_DEMAND,
.auto_exclusive_zone = false,
})
{
// Created and fully configured, but left unmapped on purpose.
// Later, when shellBridge is wired to WebKitGTK, call present() to show
// the launcher and gtk_widget_set_visible(GTK_WIDGET(window()), FALSE) to hide it.
gtk_widget_set_visible(GTK_WIDGET(window()), FALSE);
}