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.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
# Linux-only. GTK4 Layer Shell and WebKitGTK are not built or stubbed on Windows.
|
||||
project(nebula-shell LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(GTK4 REQUIRED IMPORTED_TARGET gtk4)
|
||||
pkg_check_modules(GTK4_LAYER_SHELL REQUIRED IMPORTED_TARGET gtk4-layer-shell-0)
|
||||
pkg_check_modules(WEBKITGTK REQUIRED IMPORTED_TARGET webkitgtk-6.0)
|
||||
|
||||
add_executable(nebula-shell
|
||||
src/main.cpp
|
||||
src/ShellApplication.cpp
|
||||
src/Surface.cpp
|
||||
src/DesktopSurface.cpp
|
||||
src/TopBarSurface.cpp
|
||||
src/LauncherSurface.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(nebula-shell PRIVATE
|
||||
PkgConfig::GTK4
|
||||
PkgConfig::GTK4_LAYER_SHELL
|
||||
PkgConfig::WEBKITGTK
|
||||
)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
target_compile_options(nebula-shell PRIVATE -Wall -Wextra)
|
||||
endif()
|
||||
Reference in New Issue
Block a user