Parent: #77
Summary
Create the core platform abstraction interface and event types that will be implemented by platform-specific console handlers.
Files to Create
src/Termina/Platform/IPlatformConsole.cs
src/Termina/Platform/ConsoleInputEvent.cs
src/Termina/Platform/PlatformConsoleFactory.cs
Interface Design
public interface IPlatformConsole : IDisposable
{
void Initialize();
void Restore();
Task<ConsoleInputEvent?> ReadInputAsync(CancellationToken ct);
(int Width, int Height) GetSize();
IObservable<(int Width, int Height)> Resized { get; }
void Write(string text);
void Flush();
}
Event Types
public abstract record ConsoleInputEvent;
public record KeyEvent(ConsoleKeyInfo KeyInfo) : ConsoleInputEvent;
public record MouseEvent(...) : ConsoleInputEvent; // If needed
public record ResizeEvent(int Width, int Height) : ConsoleInputEvent;
Acceptance Criteria
Parent: #77
Summary
Create the core platform abstraction interface and event types that will be implemented by platform-specific console handlers.
Files to Create
src/Termina/Platform/IPlatformConsole.cssrc/Termina/Platform/ConsoleInputEvent.cssrc/Termina/Platform/PlatformConsoleFactory.csInterface Design
Event Types
Acceptance Criteria