← All compilation units

Flyology_TUI.Backends

Description

Backend

type Backend is limited interface;

Terminal and test backends implement this interface. The POSIX backend is the first target; the same boundary is reserved for a future Windows console backend and optional Flyology-aware wait adapter.

Backend_Error

Backend_Error : exception;

Close

procedure Close (Item : in out Backend)

Close is idempotent and restores every terminal mode changed by Open or Render. It may be called after partial initialization.

Parameters
Item

Current_Size

procedure Current_Size
  (Item      : Backend;
   Width     : in out Natural;
   Height    : in out Natural;
   Available : in out Boolean)

Report the terminal size observed by Open. Callers initialize the in-out values to unknown geometry; the default null primitive preserves those values for backends without a meaningful terminal size. Runners use this query to deliver Resize before the first rendered frame.

Parameters
Item
Width
Height
Available

Input_Status

type Input_Status is (Event_Available, End_Of_Input, Interrupted);
Enumeration literals
Event_Available
End_Of_Input
Interrupted

Interrupt

procedure Interrupt (Item : in out Backend)
Parameters
Item

Next_Event

procedure Next_Event
  (Item   : in out Backend;
   Event  : out Flyology_TUI.Events.Terminal_Event;
   Status : out Input_Status)

Wait for one terminal event. Interrupt must make a concurrent call return promptly with status Interrupted.

Parameters
Item
Event
Status

Open

procedure Open (Item : in out Backend)
Parameters
Item

Render

procedure Render
  (Item : in out Backend;
   View : Flyology_TUI.Views.View)
Parameters
Item
View