mod: restructure terminal structs Key, Position and Size
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 39s
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 39s
This commit is contained in:
@@ -1,20 +1,11 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
pub const Key = @import("terminal/key.zig");
|
pub const Key = @import("terminal/Key.zig");
|
||||||
|
pub const Size = @import("terminal/Size.zig");
|
||||||
|
pub const Position = @import("terminal/Position.zig");
|
||||||
pub const code_point = @import("code_point");
|
pub const code_point = @import("code_point");
|
||||||
|
|
||||||
const log = std.log.scoped(.terminal);
|
const log = std.log.scoped(.terminal);
|
||||||
|
|
||||||
pub const Size = struct {
|
|
||||||
anchor: Position = .{ .col = 1, .row = 1 }, // top left corner by default
|
|
||||||
cols: u16,
|
|
||||||
rows: u16,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub const Position = struct {
|
|
||||||
col: u16,
|
|
||||||
row: u16,
|
|
||||||
};
|
|
||||||
|
|
||||||
// Ref: https://vt100.net/docs/vt510-rm/DECRPM.html
|
// Ref: https://vt100.net/docs/vt510-rm/DECRPM.html
|
||||||
pub const ReportMode = enum {
|
pub const ReportMode = enum {
|
||||||
not_recognized,
|
not_recognized,
|
||||||
|
|||||||
2
src/terminal/Position.zig
Normal file
2
src/terminal/Position.zig
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
col: u16,
|
||||||
|
row: u16,
|
||||||
5
src/terminal/Size.zig
Normal file
5
src/terminal/Size.zig
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
const Position = @import("Position.zig");
|
||||||
|
|
||||||
|
anchor: Position = .{ .col = 1, .row = 1 }, // top left corner by default
|
||||||
|
cols: u16,
|
||||||
|
rows: u16,
|
||||||
Reference in New Issue
Block a user