Termisu::Event::Resize
Inherits Struct / Value / Object
Terminal resize event.
Generated when the terminal window size changes (SIGWINCH). Optionally includes previous dimensions for incremental resize handling.
Example:
event = termisu.poll_event
if event.is_a?(Termisu::Event::Resize)
puts "Terminal resized to #{event.width}x#{event.height}"
if event.changed?
puts "Changed from #{event.old_width}x#{event.old_height}"
end
termisu.sync # Force full redraw
end
Constructors
new(width : Int32, height : Int32, old_width : Int32 | Nil = nil, old_height : Int32 | Nil = nil)
SourceInstance methods
changed?
Returns true if the dimensions have changed from previous values.
Returns true if:
- Previous dimensions are unknown (nil)
- Width or height differs from previous values