This is the uncursed Reference Manual, version 0.2.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 07:01:26 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
uncursed
Another TUI library, this time without curses.
tianlin qu
BSD 3-Clause
0.2.0
cffi-grovel
(system).
alexandria
(system).
cffi
(system).
terminfo
(system).
cl-setlocale
(system).
package.lisp
(file).
grovel.lisp
(file).
wrappers.lisp
(file).
condition.lisp
(file).
hacks.lisp
(file).
util.lisp
(file).
uncursed.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
uncursed/uncursed.asd
uncursed/package.lisp
uncursed/grovel.lisp
uncursed/wrappers.lisp
uncursed/condition.lisp
uncursed/hacks.lisp
uncursed/util.lisp
uncursed/uncursed.lisp
uncursed/grovel.lisp
package.lisp
(file).
uncursed
(system).
uncursed/wrappers.lisp
grovel.lisp
(file).
uncursed
(system).
uncursed/condition.lisp
wrappers.lisp
(file).
uncursed
(system).
error-syscall-error
(function).
syscall-error
(condition).
uncursed-error
(condition).
uncursed/hacks.lisp
condition.lisp
(file).
uncursed
(system).
*current-index*
(special variable).
*palette*
(special variable).
*xterm-256*
(special variable).
approximate-rgb
(function).
color
(function).
color-diff
(function).
color-magic
(function).
lookup-color
(function).
next-free-color
(function).
reset-colors
(function).
uncursed/util.lisp
hacks.lisp
(file).
uncursed
(system).
*character-widths*
(special variable).
*default-style*
(special variable).
bg
(reader).
(setf bg)
(writer).
boldp
(reader).
(setf boldp)
(writer).
catch-sigwinch
(function).
character-width
(function).
clear-chars
(function).
clear-screen
(function).
clear-to-end-of-line
(function).
copy-style
(function).
disable-alternate-screen
(function).
disable-focus-tracking
(function).
disable-mouse
(function).
display-width
(function).
enable-alternate-screen
(function).
enable-focus-tracking
(function).
enable-mouse
(function).
fg
(reader).
(setf fg)
(writer).
italicp
(reader).
(setf italicp)
(writer).
make-load-form
(method).
make-style
(function).
mouse-event-p
(function).
read-event
(function).
read-event-timeout
(function).
reset-sigwinch
(function).
restore-terminal
(function).
reversep
(reader).
(setf reversep)
(writer).
set-background
(function).
set-cursor-position
(function).
set-cursor-shape
(function).
set-foreground
(function).
set-style
(function).
set-style-from-old
(function).
setup-terminal
(function).
style
(structure).
style-difference
(function).
terminal-dimensions
(function).
underlinep
(reader).
(setf underlinep)
(writer).
*fallback-terminal-dimensions*
(special variable).
+blank-style+
(constant).
+sigwinch+
(constant).
c-close
(function).
c-read
(function).
c-write
(function).
code->fkey
(function).
fd-setp
(function).
initialize-color-magic
(function).
modify-key
(function).
non-blocking-pipe
(function).
pipe
(function).
pipe-cleanup
(function).
read-fd
(function).
read-function-and-special-keys
(function).
read-integer
(function).
read-modified-function-keys
(function).
read-modified-special-keys-and-f1-f4
(function).
read-mouse-sgr
(function).
select
(function).
set-nonblock
(function).
style-p
(function).
tcgetattr
(function).
tcsetattr
(function).
write-fd
(function).
uncursed/uncursed.lisp
util.lisp
(file).
uncursed
(system).
cell
(class).
cell-string
(reader method).
(setf cell-string)
(writer method).
cell-style
(reader method).
(setf cell-style)
(method).
cols
(reader method).
(setf cols)
(writer method).
copy-rect
(function).
dimensions
(reader method).
(setf dimensions)
(writer method).
event-handler
(reader method).
(setf event-handler)
(writer method).
focused-p
(reader method).
(setf focused-p)
(writer method).
focused-window
(reader method).
(setf focused-window)
(writer method).
handle-key-event
(generic function).
handle-mouse-event
(generic function).
handle-resize
(generic function).
initialize
(method).
initialize
(method).
make-rect
(function).
make-timer
(function).
present
(generic function).
print-object
(method).
print-object
(method).
put
(function).
put-style
(function).
puts
(function).
rect
(structure).
rect-cols
(reader).
(setf rect-cols)
(writer).
rect-rows
(reader).
(setf rect-rows)
(writer).
rect-x
(reader).
(setf rect-x)
(writer).
rect-y
(reader).
(setf rect-y)
(writer).
redisplay
(generic function).
rows
(reader method).
(setf rows)
(writer method).
run
(generic function).
schedule-timer
(method).
standard-window
(class).
stop
(generic function).
timer-callback
(reader method).
(setf timer-callback)
(writer method).
timer-interval
(reader method).
(setf timer-interval)
(writer method).
tui
(class).
tui-base
(class).
unschedule-timer
(method).
use-palette
(reader method).
(setf use-palette)
(writer method).
wakeup
(function).
wide-char-overwrite-error
(condition).
window
(class).
window-bounds-error
(condition).
window-bounds-error-bounds
(reader method).
window-bounds-error-coordinate
(reader method).
window-bounds-error-window
(reader method).
windows
(reader method).
(setf windows)
(writer method).
%termios
(reader method).
(setf %termios)
(writer method).
%wakeup-pipe
(reader method).
(setf %wakeup-pipe)
(writer method).
%winch-pipe
(reader method).
(setf %winch-pipe)
(writer method).
*put-buffer*
(special variable).
*put-window*
(special variable).
buffer
(type).
buffer-diff
(function).
canvas
(reader method).
(setf canvas)
(writer method).
cell/=
(function).
dispatch-event
(function).
dispatch-mouse-event
(function).
process-timer
(function).
rect-p
(function).
screen
(reader method).
(setf screen)
(writer method).
timer
(class).
timer-context
(reader method).
(setf timer-context)
(writer method).
timers
(reader method).
(setf timers)
(writer method).
wide-cell-p
(function).
wide-char-overwrite-error-buffer
(reader method).
wide-char-overwrite-error-x
(reader method).
wide-char-overwrite-error-y
(reader method).
write-seconds-to-timeval
(function).
Packages are listed by definition order.
uncursed
common-lisp
.
cell
(class).
cell-string
(generic reader).
(setf cell-string)
(generic writer).
cell-style
(generic reader).
(setf cell-style)
(generic function).
cols
(generic reader).
(setf cols)
(generic writer).
copy-rect
(function).
dimensions
(generic reader).
(setf dimensions)
(generic writer).
event-handler
(generic reader).
(setf event-handler)
(generic writer).
focused-p
(generic reader).
(setf focused-p)
(generic writer).
focused-window
(generic reader).
(setf focused-window)
(generic writer).
handle-key-event
(generic function).
handle-mouse-event
(generic function).
handle-resize
(generic function).
initialize
(generic function).
make-rect
(function).
make-timer
(function).
present
(generic function).
put
(function).
put-style
(function).
puts
(function).
rect
(structure).
rect-cols
(reader).
(setf rect-cols)
(writer).
rect-rows
(reader).
(setf rect-rows)
(writer).
rect-x
(reader).
(setf rect-x)
(writer).
rect-y
(reader).
(setf rect-y)
(writer).
redisplay
(generic function).
rows
(generic reader).
(setf rows)
(generic writer).
run
(generic function).
schedule-timer
(generic function).
standard-window
(class).
stop
(generic function).
timer-callback
(generic reader).
(setf timer-callback)
(generic writer).
timer-interval
(generic reader).
(setf timer-interval)
(generic writer).
tui
(class).
tui-base
(class).
unschedule-timer
(generic function).
use-palette
(generic reader).
(setf use-palette)
(generic writer).
wakeup
(function).
wide-char-overwrite-error
(condition).
window
(class).
window-bounds-error
(condition).
window-bounds-error-bounds
(generic reader).
window-bounds-error-coordinate
(generic reader).
window-bounds-error-window
(generic reader).
windows
(generic reader).
(setf windows)
(generic writer).
%termios
(generic reader).
(setf %termios)
(generic writer).
%wakeup-pipe
(generic reader).
(setf %wakeup-pipe)
(generic writer).
%winch-pipe
(generic reader).
(setf %winch-pipe)
(generic writer).
*put-buffer*
(special variable).
*put-window*
(special variable).
buffer
(type).
buffer-diff
(function).
canvas
(generic reader).
(setf canvas)
(generic writer).
cell/=
(function).
dispatch-event
(function).
dispatch-mouse-event
(function).
process-timer
(function).
rect-p
(function).
screen
(generic reader).
(setf screen)
(generic writer).
timer
(class).
timer-context
(generic reader).
(setf timer-context)
(generic writer).
timers
(generic reader).
(setf timers)
(generic writer).
wide-cell-p
(function).
wide-char-overwrite-error-buffer
(generic reader).
wide-char-overwrite-error-x
(generic reader).
wide-char-overwrite-error-y
(generic reader).
write-seconds-to-timeval
(function).
uncursed-sys
alexandria
.
common-lisp
.
*character-widths*
(special variable).
*default-style*
(special variable).
bg
(reader).
(setf bg)
(writer).
blue
(function).
boldp
(reader).
(setf boldp)
(writer).
catch-sigwinch
(function).
character-width
(function).
clear-chars
(function).
clear-screen
(function).
clear-to-end-of-line
(function).
copy-style
(function).
disable-alternate-screen
(function).
disable-focus-tracking
(function).
disable-mouse
(function).
display-width
(function).
enable-alternate-screen
(function).
enable-focus-tracking
(function).
enable-mouse
(function).
error-syscall-error
(function).
fg
(reader).
(setf fg)
(writer).
green
(function).
italicp
(reader).
(setf italicp)
(writer).
make-style
(function).
mouse-event-p
(function).
read-event
(function).
read-event-timeout
(function).
red
(function).
reset-sigwinch
(function).
restore-terminal
(function).
reversep
(reader).
(setf reversep)
(writer).
set-background
(function).
set-cursor-position
(function).
set-cursor-shape
(function).
set-foreground
(function).
set-style
(function).
set-style-from-old
(function).
setup-terminal
(function).
style
(structure).
style-difference
(function).
syscall-error
(condition).
terminal-dimensions
(function).
uncursed-error
(condition).
underlinep
(reader).
(setf underlinep)
(writer).
*current-index*
(special variable).
*fallback-terminal-dimensions*
(special variable).
*palette*
(special variable).
*xterm-256*
(special variable).
+blank-style+
(constant).
+sigwinch+
(constant).
approximate-rgb
(function).
c-close
(function).
c-read
(function).
c-write
(function).
code->fkey
(function).
color
(function).
color-diff
(function).
color-magic
(function).
fd-setp
(function).
initialize-color-magic
(function).
lookup-color
(function).
modify-key
(function).
next-free-color
(function).
non-blocking-pipe
(function).
pipe
(function).
pipe-cleanup
(function).
read-fd
(function).
read-function-and-special-keys
(function).
read-integer
(function).
read-modified-function-keys
(function).
read-modified-special-keys-and-f1-f4
(function).
read-mouse-sgr
(function).
reset-colors
(function).
select
(function).
set-nonblock
(function).
style-p
(function).
tcgetattr
(function).
tcsetattr
(function).
write-fd
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Enables handling SIGWINCH. May fail silently.
Returns the displayed width of CHARACTER. It is recommended to bind *character-widths* dynamically in calling threads.
Interval is given in seconds
Returns a value of one of the following forms:
* CHARACTER - singular character
* (CHARACTER [modifiers]...) - modifiers include :shift, :alt, :control and :meta
* :f1-20, :home, :end, :insert, :delete, :up/:down/:left/:right-arrow, :page-down, :page-up
* (:function/special [modifiers]...) - above but with modifiers
* (:left/middle/right/wheel-up/down/left/right/hover :click/release/drag ROW COL [mods]...)
* (:unknown [key-sequence]...)
Notably (:unknown :csi #I/O) may be xterm focus in/out events.
Wait up to timeout seconds waiting for input, returning NIL on timeout or an event.
cols
.
rows
.
Restores the terminal device backing FD to its original state. ORIG-TERMIOS is a pointer to the original termios struct returned by a call to SETUP-TERM which is freed.
NEW-VALUE is a (LINE . COLUMN) pair
Disables terminal echoing and buffering. Returns a pointer to the original termios. Sets process locale from environment.
Returns a cons (LINES . COLUMNS) containing the dimensions of the terminal device backing FD. Returns NIL on failure.
Wakes up TUI in a thread-safe manner.
Interface may change.
Interface may change. Methods may optionally accept boolean keyword arguments :shift, :alt, :control and :meta.
Called when SIGWINCH is caught (the terminal window is resized).
standard-window
)) ¶Causes the terminal to be restored to its original state immediately. May only be called from within the dynamic-extent of a call to RUN.
timer
)) ¶timer
)) ¶A function that is run when the timer expires. It is a
function of two arguments, the TUI object and context it was scheduled with. The callback
is expected to return one value: either the next timer expiry interval in seconds or NIL,
meaning to cancel the timer. A second optional return value assigns a new timer context.
window-bounds-error
)) ¶window-bounds-error
)) ¶window-bounds-error
)) ¶simple-error
.
Signaled if an attempt is made to overwrite a wide character.
Signaled if an attempt is made to index outside a window’s bounds
structure-object
.
fixnum
(error "rect x not provided")
fixnum
(error "rect y not provided")
fixnum
(error "rect rows not provided")
fixnum
(error "rect cols not provided")
uncursed-sys:style
(uncursed-sys:copy-style uncursed-sys:*default-style*)
:style
This slot is read-only.
Represents a grapheme cluster and its display style. Note that
setf-ing the style copies over the new attributes into the existing cell-style.
simple-string
(string #\ )
:string
(setf canvas)
.
canvas
.
(setf event-handler)
.
event-handler
.
(setf focused-window)
.
focused-window
.
handle-resize
.
initialize
.
initialize
.
redisplay
.
redisplay
.
run
.
schedule-timer
.
(setf screen)
.
screen
.
stop
.
(setf timers)
.
timers
.
unschedule-timer
.
(setf use-palette)
.
use-palette
.
(setf windows)
.
windows
.
The contents of the screen
uncursed::buffer
:screen
The contents to be drawn to the screen
uncursed::buffer
:canvas
Windows in drawing order.
(list)
:windows
uncursed:window
:focused-window
(error "must provide an event handler")
:event-handler
(list)
(member t nil :approximate)
:use-palette
Pure data.
Signal number of SIGWINCH.
Maps indexes 1-231 to their colors to save some sequences.
Yes we only actually use 16-231 as otherwise the user’s custom colors get clobbered.
very clever.
CSI [code] ~/h (or modified, see above)
CSI [code] ; [mods] ~
CSI 1 ; [mods] [terminator]
CSI < [code&mods] ; COL ; ROW ; M/m
wide-char-overwrite-error
)) ¶wide-char-overwrite-error
)) ¶x
.
wide-char-overwrite-error
)) ¶y
.
A function that is run when the timer expires. It is a
function of two arguments, the TUI object and context it was scheduled with. The callback
is expected to return one value: either the next timer expiry interval in seconds or NIL,
meaning to cancel the timer. A second optional return value assigns a new timer context.
:callback
:context
(real 0)
:interval
Jump to: | %
(
A B C D E F G H I L M N P R S T U W |
---|
Jump to: | %
(
A B C D E F G H I L M N P R S T U W |
---|
Jump to: | %
*
+
B C F I R S U W X Y |
---|
Jump to: | %
*
+
B C F I R S U W X Y |
---|
Jump to: | B C F G H P R S T U W |
---|
Jump to: | B C F G H P R S T U W |
---|