Implement the backend protocol with two backends (modern planned, simple done). Includes package definitions, CLOS generic protocol, simple-backend with ASCII borders, and 9 FiveAM tests. RED: 9/9 tests failing (no implementation) GREEN: 9/9 tests passing - backend/package.lisp — defpackage, exports - backend/classes.lisp — backend base class, 18 generics - backend/simple.lisp — simple-backend implementation - backend/tests.lisp — 9 FiveAM test cases - org/backend-protocol.org — literate source
23 lines
582 B
Common Lisp
23 lines
582 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))
|
|
(in-package :cl-tui.backend)
|