IWindowSizeMonitor.cs 619 B

12345678910111213141516171819
  1. #nullable enable
  2. namespace Terminal.Gui;
  3. /// <summary>
  4. /// Interface for classes responsible for reporting the current
  5. /// size of the terminal window.
  6. /// </summary>
  7. public interface IWindowSizeMonitor
  8. {
  9. /// <summary>Invoked when the terminal's size changed. The new size of the terminal is provided.</summary>
  10. event EventHandler<SizeChangedEventArgs>? SizeChanging;
  11. /// <summary>
  12. /// Examines the current size of the terminal and raises <see cref="SizeChanging"/> if it is different
  13. /// from last inspection.
  14. /// </summary>
  15. /// <returns></returns>
  16. bool Poll ();
  17. }