linux: get build working with new system

This commit is contained in:
Joshua Holmes 2024-11-30 18:06:16 -08:00 committed by Emi Gutekanst
parent 1fe47b2b19
commit 0ec182c3f4
3 changed files with 14 additions and 0 deletions

View file

@ -25,11 +25,17 @@ const BackendEnum = enum {
x11,
wayland,
};
const Backend = union(BackendEnum) {
x11: X11,
wayland: Wayland,
};
pub const Native = union(BackendEnum) {
x11: X11.Native,
wayland: Wayland.Native,
};
pub const Linux = @This();
allocator: std.mem.Allocator,
@ -52,6 +58,10 @@ backend: Backend,
const MISSING_FEATURES_X11 = [_][]const u8{ "Resizing window", "Changing display mode", "VSync", "Setting window border/cursor" };
const MISSING_FEATURES_WAYLAND = [_][]const u8{ "Changing display mode", "VSync", "Setting window border/cursor" };
pub fn tick(core: *Core) !void {
_ = core;
}
pub fn init(
linux: *Linux,
core: *Core,

View file

@ -70,6 +70,8 @@ libxkbcommon: LibXkbCommon,
modifiers: Core.KeyMods,
modifier_indices: KeyModInd,
pub const Native = struct {};
pub fn init(
linux: *Linux,
core: *Core,

View file

@ -61,6 +61,8 @@ cursors: [@typeInfo(CursorShape).@"enum".fields.len]?c.Cursor,
// Mutable state fields; read/write by any thread
surface_descriptor: *gpu.Surface.DescriptorFromXlibWindow,
pub const Native = struct {};
pub fn init(
linux: *Linux,
core: *Core,