license SPDX line, implementing first global state

This commit is contained in:
neo
2026-08-25 13:48:33 +02:00
parent 215362f1bb
commit aeab2375c8
8 changed files with 114 additions and 3 deletions
+20
View File
@@ -1,9 +1,29 @@
// SPDX: GPL-2.0-only
use std::io;
use wayland_server::client::Client;
use wayland_server::display::Display;
use wayland_server::global::{Global, GlobalState};
struct State {
}
impl GlobalState for State {
fn handle_output_bind(&self, client: Client, version: u32, id: u32) {
todo!()
}
}
fn main() -> io::Result<()> {
// Creating a compositor State
let state = State {};
// create a wayland display
let display = Display::new()?;
// get the global registry
let global = Global::new(&display, state)?;
println!("Running wayland_display on {}", display.get_name());
display.run()?;