+3
-4
src/tty.zig
+3
-4
src/tty.zig
···
198
buf: [4]u8 = undefined,
199
200
/// File.Writer for efficient buffered writing
201
-
reader: std.fs.File.Writer,
202
tty_writer: std.fs.File.Writer,
203
204
/// The last mouse button that was pressed. We store the previous state of button presses on each
···
223
};
224
225
pub fn init(buffer: []u8) !Tty {
226
-
const stdin: std.fs.File = .stdout();
227
const stdout: std.fs.File = .stdout();
228
229
// get initial modes
···
243
.initial_codepage = initial_output_codepage,
244
.initial_input_mode = initial_input_mode,
245
.initial_output_mode = initial_output_mode,
246
-
.writer = .initStreaming(stdout, buffer),
247
};
248
249
// save a copy of this tty as the global_tty for panic handling
···
688
};
689
pub const PINPUT_RECORD = *INPUT_RECORD;
690
691
-
pub extern "kernel32" fn ReadConsoleInputW(hConsoleInput: windows.HANDLE, lpBuffer: PINPUT_RECORD, nLength: windows.DWORD, lpNumberOfEventsRead: *windows.DWORD) callconv(windows.WINAPI) windows.BOOL;
692
};
693
694
pub const TestTty = struct {
···
198
buf: [4]u8 = undefined,
199
200
/// File.Writer for efficient buffered writing
201
tty_writer: std.fs.File.Writer,
202
203
/// The last mouse button that was pressed. We store the previous state of button presses on each
···
222
};
223
224
pub fn init(buffer: []u8) !Tty {
225
+
const stdin: std.fs.File = .stdin();
226
const stdout: std.fs.File = .stdout();
227
228
// get initial modes
···
242
.initial_codepage = initial_output_codepage,
243
.initial_input_mode = initial_input_mode,
244
.initial_output_mode = initial_output_mode,
245
+
.tty_writer = .initStreaming(stdout, buffer),
246
};
247
248
// save a copy of this tty as the global_tty for panic handling
···
687
};
688
pub const PINPUT_RECORD = *INPUT_RECORD;
689
690
+
pub extern "kernel32" fn ReadConsoleInputW(hConsoleInput: windows.HANDLE, lpBuffer: PINPUT_RECORD, nLength: windows.DWORD, lpNumberOfEventsRead: *windows.DWORD) callconv(.winapi) windows.BOOL;
691
};
692
693
pub const TestTty = struct {