Implements the modern-backend with truecolor SGR, Unicode box-drawing (rounded/double/single), DECICM synchronized updates, OSC 8 hyperlinks, cursor style control, and hex color parsing. RED: 32 checks, 5 fail (class forward-ref + test bug) GREEN: 32/32 checks passing (100%) - backend/modern.lisp — escape generators + modern-backend class - backend/modern-tests.lisp — 16 test cases, 32 assertions - backend/package.lisp — updated exports - org/modern-backend.org — literate source
30 lines
825 B
Common Lisp
30 lines
825 B
Common Lisp
(defpackage :cl-tui.backend
|
|
(:use :cl)
|
|
(:export
|
|
;; Backend classes
|
|
#:backend #:simple-backend
|
|
;; Lifecycle
|
|
#:initialize-backend #:shutdown-backend
|
|
#:backend-size #:backend-write #:backend-clear
|
|
;; Drawing
|
|
#:draw-text #:draw-border #:draw-rect
|
|
#:draw-link #:draw-ellipsis
|
|
;; Cursor
|
|
#:cursor-move #:cursor-hide #:cursor-show #:cursor-style
|
|
;; Sync
|
|
#:begin-sync #:end-sync
|
|
;; Input
|
|
#:read-event #:enable-mouse #:enable-bracketed-paste
|
|
;; Queries
|
|
#:capable-p
|
|
;; Constructors
|
|
#:make-simple-backend
|
|
;; Modern backend
|
|
#:modern-backend #:make-modern-backend
|
|
;; Internal (for testing)
|
|
#:sgr-fg #:sgr-bg #:sgr-attr
|
|
#:cursor-move-escape #:cursor-style-escape
|
|
#:decicm-begin #:decicm-end #:osc8-link
|
|
#:hex-to-rgb #:border-char))
|
|
(in-package :cl-tui.backend)
|