river: Implement input_method and text_input

This commit is contained in:
praschke
2023-07-11 13:22:05 +01:00
committed by Isaac Freund
parent 3aba3abbcd
commit 2abab1e9c7
6 changed files with 456 additions and 3 deletions

View File

@ -40,6 +40,11 @@ pub fn add(self: *Self, new: u32) void {
self.len += 1;
}
pub fn present(self: *Self, value: u32) bool {
for (self.items[0..self.len]) |item| if (value == item) return true;
return false;
}
pub fn remove(self: *Self, old: u32) bool {
for (self.items[0..self.len], 0..) |item, idx| if (old == item) {
self.len -= 1;