diff options
Diffstat (limited to 'src/wl/output/root.zig')
| -rw-r--r-- | src/wl/output/root.zig | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/wl/output/root.zig b/src/wl/output/root.zig index ce2169f..f4ca36d 100644 --- a/src/wl/output/root.zig +++ b/src/wl/output/root.zig @@ -38,7 +38,7 @@ handle: wayland.Object.Ref, pub fn init( self: *Self, - ctx: *wayland.Context, + ctx: *const wayland.Context, ) !void { self.* = .{ .handle = try ctx.display.registry.add_object( @@ -58,7 +58,7 @@ pub const handler: wl.Registry.GlobalHandler = .{ .handler = register, }; -fn register(ctx: *wayland.Context) ?wayland.Object.Ref { +fn register(ctx: *const wayland.Context) ?wayland.Object.Ref { const output = ctx.allocator.create(Self) catch return null; output.init(ctx) catch return null; @@ -68,7 +68,7 @@ fn register(ctx: *wayland.Context) ?wayland.Object.Ref { fn geometry( self: *Self, - ctx: *wayland.Context, + ctx: *const wayland.Context, x: u32, y: u32, physical_width: u32, @@ -93,7 +93,7 @@ fn geometry( fn mode( self: *Self, - ctx: *wayland.Context, + ctx: *const wayland.Context, flags: Mode.Kind, width: u32, height: u32, @@ -108,7 +108,7 @@ fn mode( }; } -fn done(self: *Self, ctx: *wayland.Context) void { +fn done(self: *Self, ctx: *const wayland.Context) void { if (self.info) |info| { ctx.allocator.free(info.name); ctx.allocator.free(info.description); @@ -117,17 +117,17 @@ fn done(self: *Self, ctx: *wayland.Context) void { self.info = self.staging; } -fn scale(self: *Self, ctx: *wayland.Context, factor: u32) void { +fn scale(self: *Self, ctx: *const wayland.Context, factor: u32) void { _ = ctx; self.staging.scale = factor; } -fn name(self: *Self, ctx: *wayland.Context, n: []const u8) !void { +fn name(self: *Self, ctx: *const wayland.Context, n: []const u8) !void { self.staging.name = try ctx.allocator.alloc(u8, n.len); @memcpy(@constCast(self.staging.name), n); } -fn description(self: *Self, ctx: *wayland.Context, d: []const u8) !void { +fn description(self: *Self, ctx: *const wayland.Context, d: []const u8) !void { self.staging.description = try ctx.allocator.alloc(u8, d.len); @memcpy(@constCast(self.staging.description), d); } |