linux: get build working with new system
This commit is contained in:
parent
1fe47b2b19
commit
0ec182c3f4
3 changed files with 14 additions and 0 deletions
|
|
@ -25,11 +25,17 @@ const BackendEnum = enum {
|
||||||
x11,
|
x11,
|
||||||
wayland,
|
wayland,
|
||||||
};
|
};
|
||||||
|
|
||||||
const Backend = union(BackendEnum) {
|
const Backend = union(BackendEnum) {
|
||||||
x11: X11,
|
x11: X11,
|
||||||
wayland: Wayland,
|
wayland: Wayland,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pub const Native = union(BackendEnum) {
|
||||||
|
x11: X11.Native,
|
||||||
|
wayland: Wayland.Native,
|
||||||
|
};
|
||||||
|
|
||||||
pub const Linux = @This();
|
pub const Linux = @This();
|
||||||
|
|
||||||
allocator: std.mem.Allocator,
|
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_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" };
|
const MISSING_FEATURES_WAYLAND = [_][]const u8{ "Changing display mode", "VSync", "Setting window border/cursor" };
|
||||||
|
|
||||||
|
pub fn tick(core: *Core) !void {
|
||||||
|
_ = core;
|
||||||
|
}
|
||||||
|
|
||||||
pub fn init(
|
pub fn init(
|
||||||
linux: *Linux,
|
linux: *Linux,
|
||||||
core: *Core,
|
core: *Core,
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,8 @@ libxkbcommon: LibXkbCommon,
|
||||||
modifiers: Core.KeyMods,
|
modifiers: Core.KeyMods,
|
||||||
modifier_indices: KeyModInd,
|
modifier_indices: KeyModInd,
|
||||||
|
|
||||||
|
pub const Native = struct {};
|
||||||
|
|
||||||
pub fn init(
|
pub fn init(
|
||||||
linux: *Linux,
|
linux: *Linux,
|
||||||
core: *Core,
|
core: *Core,
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,8 @@ cursors: [@typeInfo(CursorShape).@"enum".fields.len]?c.Cursor,
|
||||||
// Mutable state fields; read/write by any thread
|
// Mutable state fields; read/write by any thread
|
||||||
surface_descriptor: *gpu.Surface.DescriptorFromXlibWindow,
|
surface_descriptor: *gpu.Surface.DescriptorFromXlibWindow,
|
||||||
|
|
||||||
|
pub const Native = struct {};
|
||||||
|
|
||||||
pub fn init(
|
pub fn init(
|
||||||
linux: *Linux,
|
linux: *Linux,
|
||||||
core: *Core,
|
core: *Core,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue