diff --git a/src/input/mouse_encode.zig b/src/input/mouse_encode.zig index 0cf431303..13a8bd462 100644 --- a/src/input/mouse_encode.zig +++ b/src/input/mouse_encode.zig @@ -69,7 +69,7 @@ pub const Event = struct { pos: Pos = .{}, /// Mouse position in surface-space pixels. - pub const Pos = struct { + pub const Pos = extern struct { x: f32 = 0, y: f32 = 0, }; diff --git a/src/renderer/size.zig b/src/renderer/size.zig index e9754d1f3..565e95e2c 100644 --- a/src/renderer/size.zig +++ b/src/renderer/size.zig @@ -172,7 +172,7 @@ pub const Coordinate = union(enum) { /// /// The units for the width and height are in world space. They have to /// be normalized for any renderer implementation. -pub const CellSize = struct { +pub const CellSize = extern struct { width: u32, height: u32, }; @@ -180,7 +180,7 @@ pub const CellSize = struct { /// The dimensions of the screen that the grid is rendered to. This is the /// terminal screen, so it is likely a subset of the window size. The dimensions /// should be in pixels. -pub const ScreenSize = struct { +pub const ScreenSize = extern struct { width: u32, height: u32, @@ -224,7 +224,7 @@ pub const ScreenSize = struct { }; /// The dimensions of the grid itself, in rows/columns units. -pub const GridSize = struct { +pub const GridSize = extern struct { pub const Unit = terminal.size.CellCountInt; columns: Unit = 0, @@ -257,7 +257,7 @@ pub const GridSize = struct { }; /// The padding to add to a screen. -pub const Padding = struct { +pub const Padding = extern struct { top: u32 = 0, bottom: u32 = 0, right: u32 = 0, diff --git a/src/terminal/point.zig b/src/terminal/point.zig index 5a3d4a6f8..c5983fcbc 100644 --- a/src/terminal/point.zig +++ b/src/terminal/point.zig @@ -66,7 +66,7 @@ pub const Point = union(Tag) { } }; -pub const Coordinate = struct { +pub const Coordinate = extern struct { /// x can use size.CellCountInt because the number of columns /// can't ever be more than a valid number of columns in a Page. x: size.CellCountInt = 0,