╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ main_wasm.zig ────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
243 }; 244 } 245 246 fn setTextInputValue(focus_id: u32, bytes: []const u8) !void { 247 const root_ptr = if (root) |*r| r else return error.NotStarted; 248 const root_focus = root_ptr.getFocus(); 249 const child = root_focus.children.get(focus_id) orelse return error.UnknownFocusId; 250 switch (child.focus.kind) { 251 .text_input, .text_input_password, .text_area => {}, 252 else => return error.NotATextInput, 253 } 254 const ti = session.text_inputs.get(focus_id) orelse return error.UnknownFocusId; 255 try ti.setContent(allocator, bytes); 256 } 257