Page:
hosho
Pages
Control Functions
Embedding the Widget
Home
Keyboard Mouse and Paste
Overview
Pictures
Shell Integration
The Host Functions
The Widget in Use
Themes
Writing a Host
_sidebar
home
hosho
hosho_bidi
hosho_inflate
hosho_input
hosho_parser
hosho_pseudoterminal
hosho_screen
hosho_sixel
hosho_terminal
hosho_text
hosho_theme
hosho_width
No results
1
hosho
liquibyte edited this page 2026-11-19 16:23:30 -06:00
Table of Contents
hosho.h
Hosho, a Terminal Without a Display.
Copyright (c) 2016-2026 Michael Grey (liquibyte) liquibyte@gmail.com SPDX-License-Identifier: Artistic-2.0 Distributed under the Artistic License 2.0; see LICENSE for terms.
Features:
- One include for the whole library: each layer below can also be included on its own
hosho_width.h: how many cells a character fills- hosho_parser.h: the bytes a program writes, split into characters and control functions
- hosho_screen.h: the grid of cells, the alternate buffer, the scrollback
- hosho_sixel.h: the data of a sixel picture as pixels
hosho_inflate.h: data a program compressed with zlib, made whole- hosho_bidi.h: the order in which a line with right-to-left text is shown
- hosho_terminal.h: what each control function does to the screen, the cursor and the modes
- hosho_text.h: the text of a range, search, links, command blocks
- hosho_input.h: a key, a mouse event or a paste as the bytes a program reads
- hosho_theme.h: terminal themes: each color and setting of the display
- hosho_pseudoterminal.h: a program started on a pseudoterminal
Internal design notes:
- No display, no toolkit: Hosho keeps the state of a terminal, and a host draws it and sends it the keys. So a widget of any toolkit, a test or a recorder can all use it
- Written from public standards and manuals (ECMA-48, the DEC VT manuals, xterm's ctlseqs, the Unicode data files), not from the source of another terminal
- Named for hosho (奉書), the paper that official orders were written on: a terminal is where commands are given
#include "hosho.h"
Constants: HOSHO_VERSION
Constants
HOSHO_VERSION
#define HOSHO_VERSION "1.5"
The library's version. Raised by the release script, never by hand.
Hosho API
The whole library
From bytes to a screen
For the host that shows it
The program