Skip to main content

Module backend

Module backend 

Source
Expand description

§Backends

This module contains the different backends implementations. The backend is responsible for rendering the UI and handling user input.

The backend is not created by the user, it is created by the system based on some parameters that are provided when an Application is being initialized.

§Terminal Support and Capabilities

AppCUI supports multiple backends with varying capabilities across different operating systems:

  • Windows Console: Native Windows terminal with full keyboard/mouse support
  • NCurses: Unix-based terminal with good display and input capabilities
  • Termios: Basic Unix terminal with limited features

§Default Backends by OS:

  • Windows: Windows Console
  • Linux: NCurses
  • Mac/OSX: Termios

§Key Capabilities:

§Display
  • 16 foreground and background colors across all terminals
  • Unicode support (Windows Console: UTF-16, NCurses: UTF-8)
  • Cursor control and underline support (Windows/NCurses)
  • Bold text support (NCurses only)
§Input Handling
  • Keyboard: Full modifier support in Windows (Alt/Ctrl/Shift combinations)
  • Mouse: Click, move, drag and wheel support (Windows/NCurses)
  • System: Console resize events (Windows/NCurses)
§Additional Features
  • Clipboard support via native APIs (Windows) or copypasta crate (NCurses)
  • Window title control (Windows only)
  • Console dimension control (Windows/NCurses)

Each backend implementation provides these capabilities through the Backend trait, allowing AppCUI to work consistently across different platforms while leveraging platform-specific features when available.

Enums§

Type