tony / oxwm

Branch: 9f770b4
Switch branches/tags
master
emzywastaken treewide: change function names to camelCase b3ae92e 2026-02-23
24 lines · 564 B Raw Blame History
1 const std = @import("std");
2
3 pub const Static = struct {
4 text: []const u8,
5 color: c_ulong,
6
7 pub fn init(text: []const u8, color: c_ulong) Static {
8 return .{ .text = text, .color = color };
9 }
10
11 pub fn content(self: *Static, buffer: []u8) []const u8 {
12 const len = @min(self.text.len, buffer.len);
13 @memcpy(buffer[0..len], self.text[0..len]);
14 return buffer[0..len];
15 }
16
17 pub fn interval(_: *Static) u64 {
18 return 0;
19 }
20
21 pub fn getColor(self: *Static) c_ulong {
22 return self.color;
23 }
24 };