Begin setting up infrastructure for the WM

Mostly just created the very basic Wayland connection needed, but I also
bind to the rwm protocol which is neat.
This commit is contained in:
Ben Buhse 2025-05-06 21:47:22 -05:00
commit c87fa2d4af
No known key found for this signature in database
GPG key ID: 7916ACFCD38FD0B4
7 changed files with 1858 additions and 7 deletions

View file

@ -5,9 +5,6 @@
const std = @import("std");
const Scanner = @import("wayland").Scanner;
// Although this function looks imperative, note that its job is to
// declaratively construct a build graph that will be executed by an external
// runner.
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
@ -19,6 +16,13 @@ pub fn build(b: *std.Build) void {
const scanner = Scanner.create(b, .{});
const wayland = b.createModule(.{ .root_source_file = scanner.result });
scanner.addCustomProtocol(b.path("protocol/river-window-management-v1.xml"));
scanner.generate("wl_compositor", 4);
scanner.generate("wl_shm", 1);
scanner.generate("wl_output", 4);
scanner.generate("river_window_manager_v1", 1);
const exe = b.addExecutable(.{
.name = "beansprout",
.root_source_file = b.path("src/main.zig"),