This is the croatoan Reference Manual, version 0.3, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 08 17:49:42 2024 GMT+0.
croatoan/croatoan.asd
croatoan/package.lisp
croatoan/character.lisp
croatoan/stack.lisp
croatoan/grid.lisp
croatoan/classes.lisp
croatoan/croatoan.lisp
croatoan/menu.lisp
croatoan/form.lisp
croatoan/field.lisp
croatoan/textarea.lisp
croatoan/dropdown.lisp
croatoan/hook.lisp
croatoan/queue.lisp
croatoan/gray_streams.lisp
croatoan/utf8.lisp
croatoan/dialog.lisp
croatoan/addch.lisp
croatoan/add_wch.lisp
croatoan/addstr.lisp
croatoan/attr.lisp
croatoan/beep.lisp
croatoan/bkgd.lisp
croatoan/bkgrnd.lisp
croatoan/border.lisp
croatoan/border_set.lisp
croatoan/clear.lisp
croatoan/color.lisp
croatoan/delch.lisp
croatoan/deleteln.lisp
croatoan/getch.lisp
croatoan/define_key.lisp
croatoan/get_wch.lisp
croatoan/getstr.lisp
croatoan/initscr.lisp
croatoan/inopts.lisp
croatoan/inch.lisp
croatoan/in_wch.lisp
croatoan/inwstr.lisp
croatoan/inchstr.lisp
croatoan/insch.lisp
croatoan/ins_wch.lisp
croatoan/insstr.lisp
croatoan/instr.lisp
croatoan/kernel.lisp
croatoan/keybound.lisp
croatoan/key_defined.lisp
croatoan/keyok.lisp
croatoan/mouse.lisp
croatoan/move.lisp
croatoan/refresh.lisp
croatoan/scroll.lisp
croatoan/slk.lisp
croatoan/terminfo.lisp
croatoan/touch.lisp
croatoan/util.lisp
croatoan/wresize.lisp
croatoan/shape.lisp
The main system appears first, followed by any subsystem dependency.
croatoan
High-level Lisp CLOS bindings for the ncurses terminal library.
Anton Vidovic <anton.vidovic@gmx.de>
MIT
0.3
croatoan-ncurses
(system).
trivial-gray-streams
(system).
bordeaux-threads
(system).
sb-introspect
(system)., required, for feature :sbcl
package.lisp
(file).
character.lisp
(file).
stack.lisp
(file).
grid.lisp
(file).
classes.lisp
(file).
croatoan.lisp
(file).
menu.lisp
(file).
form.lisp
(file).
field.lisp
(file).
textarea.lisp
(file).
dropdown.lisp
(file).
hook.lisp
(file).
queue.lisp
(file).
gray_streams.lisp
(file).
utf8.lisp
(file).
dialog.lisp
(file).
addch.lisp
(file).
add_wch.lisp
(file).
addstr.lisp
(file).
attr.lisp
(file).
beep.lisp
(file).
bkgd.lisp
(file).
bkgrnd.lisp
(file).
border.lisp
(file).
border_set.lisp
(file).
clear.lisp
(file).
color.lisp
(file).
delch.lisp
(file).
deleteln.lisp
(file).
getch.lisp
(file).
define_key.lisp
(file).
get_wch.lisp
(file).
getstr.lisp
(file).
initscr.lisp
(file).
inopts.lisp
(file).
inch.lisp
(file).
in_wch.lisp
(file).
inwstr.lisp
(file).
inchstr.lisp
(file).
insch.lisp
(file).
ins_wch.lisp
(file).
insstr.lisp
(file).
instr.lisp
(file).
kernel.lisp
(file).
keybound.lisp
(file).
key_defined.lisp
(file).
keyok.lisp
(file).
mouse.lisp
(file).
move.lisp
(file).
refresh.lisp
(file).
scroll.lisp
(file).
slk.lisp
(file).
terminfo.lisp
(file).
touch.lisp
(file).
util.lisp
(file).
wresize.lisp
(file).
shape.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
croatoan/croatoan.asd
croatoan/package.lisp
croatoan/character.lisp
croatoan/stack.lisp
croatoan/grid.lisp
croatoan/classes.lisp
croatoan/croatoan.lisp
croatoan/menu.lisp
croatoan/form.lisp
croatoan/field.lisp
croatoan/textarea.lisp
croatoan/dropdown.lisp
croatoan/hook.lisp
croatoan/queue.lisp
croatoan/gray_streams.lisp
croatoan/utf8.lisp
croatoan/dialog.lisp
croatoan/addch.lisp
croatoan/add_wch.lisp
croatoan/addstr.lisp
croatoan/attr.lisp
croatoan/beep.lisp
croatoan/bkgd.lisp
croatoan/bkgrnd.lisp
croatoan/border.lisp
croatoan/border_set.lisp
croatoan/clear.lisp
croatoan/color.lisp
croatoan/delch.lisp
croatoan/deleteln.lisp
croatoan/getch.lisp
croatoan/define_key.lisp
croatoan/get_wch.lisp
croatoan/getstr.lisp
croatoan/initscr.lisp
croatoan/inopts.lisp
croatoan/inch.lisp
croatoan/in_wch.lisp
croatoan/inwstr.lisp
croatoan/inchstr.lisp
croatoan/insch.lisp
croatoan/ins_wch.lisp
croatoan/insstr.lisp
croatoan/instr.lisp
croatoan/kernel.lisp
croatoan/keybound.lisp
croatoan/key_defined.lisp
croatoan/keyok.lisp
croatoan/mouse.lisp
croatoan/move.lisp
croatoan/refresh.lisp
croatoan/scroll.lisp
croatoan/slk.lisp
croatoan/terminfo.lisp
croatoan/touch.lisp
croatoan/util.lisp
croatoan/wresize.lisp
croatoan/shape.lisp
croatoan/character.lisp
croatoan
(system).
attributes
(reader method).
(setf attributes)
(writer method).
bgcolor
(reader method).
(setf bgcolor)
(writer method).
complex-char
(class).
complex-char-array
(reader method).
(setf complex-char-array)
(writer method).
complex-char=
(function).
complex-string
(class).
complex-string->chars-string
(function).
complex-string-format
(macro).
complex-string-length
(function).
concat-complex-string
(generic function).
fgcolor
(reader method).
(setf fgcolor)
(writer method).
initialize-instance
(method).
initialize-instance
(method).
make-background
(function).
make-load-form
(method).
nconcat-complex-string
(function).
simple-char
(reader method).
(setf simple-char)
(writer method).
text-ellipsize
(generic function).
text-right-pad
(generic function).
text-slice
(generic function).
text-width
(generic function).
array-slice
(function).
char-style
(function).
complex-string-first-char-attributes
(function).
complex-string-last-char-attributes
(function).
concat-complex-string-no-contagion
(function).
concat-complex-string-with-contagion
(function).
copy-complex-char
(function).
copy-complex-char-array
(function).
copy-complex-string
(method).
right-padding
(function).
set-equal
(function).
style-char
(function).
vector-not-empty-p
(function).
croatoan/stack.lisp
croatoan
(system).
*main-stack*
(special variable).
empty-stack
(function).
items
(reader method).
(setf items)
(writer method).
refresh
(generic function).
stack
(class).
stack-empty-p
(function).
stack-move
(function).
stack-pop
(function).
stack-push
(function).
rotate
(function).
croatoan/grid.lisp
croatoan
(system).
calculate-layout
(generic function).
calculate-positions
(function).
column-layout
(class).
column-widths
(generic function).
cumsum-predecessors
(function).
current-item
(method).
flatten-items
(function).
grid
(class).
height
(method).
initialize-instance
(method).
initialize-instance
(method).
initialize-leaves
(function).
layout
(class).
leaves
(function).
move-down
(generic function).
move-left
(generic function).
move-right
(generic function).
move-up
(generic function).
nth2d
(function).
ref2d
(function).
row-heights
(generic function).
row-layout
(class).
select-next-item
(method).
select-previous-item
(method).
width
(method).
collect-height-hints
(function).
collect-width-hints
(function).
split-size
(function).
visible-grid-columns
(function).
visible-grid-rows
(function).
croatoan/classes.lisp
croatoan
(system).
activep
(reader method).
(setf activep)
(writer method).
add-child
(function).
append-item
(function).
attributes
(method).
(setf attributes)
(method).
background
(generic function).
(setf background)
(generic function).
bgcolor
(method).
(setf bgcolor)
(method).
bindings
(reader method).
bindings
(reader method).
(setf bindings)
(writer method).
(setf bindings)
(writer method).
border-width
(reader method).
borderp
(reader method).
borderp
(reader method).
button
(class).
callback
(reader method).
(setf callback)
(writer method).
center-position
(function).
checkbox
(class).
checkedp
(reader method).
(setf checkedp)
(writer method).
children
(reader method).
(setf children)
(writer method).
clear
(generic function).
close
(method).
close
(method).
close
(method).
close
(method).
close
(method).
close
(method).
collection
(class).
color-pair
(generic function).
(setf color-pair)
(generic function).
copy-key
(function).
current-item
(generic function).
current-item-number
(function).
(setf current-item-number)
(function).
cursor-position
(generic function).
(setf cursor-position)
(generic function).
cursor-position-x
(generic function).
(setf cursor-position-x)
(generic function).
cursor-position-y
(generic function).
(setf cursor-position-y)
(generic function).
cursor-visible-p
(generic function).
(setf cursor-visible-p)
(generic function).
cyclicp
(reader method).
(setf cyclicp)
(writer method).
dimensions
(generic function).
(setf dimensions)
(generic function).
draw
(generic function).
elements
(method).
(setf elements)
(method).
event
(class).
event-code
(reader method).
event-key
(reader method).
fgcolor
(method).
(setf fgcolor)
(method).
find-node
(function).
form
(class).
form-window
(class).
frame-rate
(generic function).
(setf frame-rate)
(generic function).
function-keys-enabled-p
(generic function).
(setf function-keys-enabled-p)
(generic function).
geometry
(generic function).
(setf geometry)
(generic function).
height
(generic function).
(setf height)
(generic function).
hooks
(reader method).
(setf hooks)
(writer method).
initialize-instance
(method).
initialize-instance
(method).
initialize-instance
(method).
initialize-instance
(method).
initialize-instance
(method).
initialize-instance
(method).
initialize-instance
(method).
initialize-instance
(method).
initialize-instance
(method).
initialize-instance
(method).
initialize-instance
(method).
initialize-instance
(method).
initialize-instance
(method).
initialize-instance
(method).
initialize-instance
(method).
input-blocking
(generic function).
(setf input-blocking)
(generic function).
input-buffering-p
(generic function).
(setf input-buffering-p)
(generic function).
input-echoing-p
(generic function).
(setf input-echoing-p)
(generic function).
insert-mode-p
(reader method).
(setf insert-mode-p)
(writer method).
items
(method).
(setf items)
(method).
key
(structure).
key-alt
(reader).
(setf key-alt)
(writer).
key-ctrl
(reader).
(setf key-ctrl)
(writer).
key-name
(reader).
(setf key-name)
(writer).
key-p
(function).
key-shift
(reader).
(setf key-shift)
(writer).
keymap
(reader method).
(setf keymap)
(writer method).
keymap
(class).
label
(class).
layout
(reader method).
(setf layout)
(writer method).
make-key
(function).
make-load-form
(method).
mouse-event
(class).
name
(reader method).
newline-translation-enabled-p
(generic function).
(setf newline-translation-enabled-p)
(generic function).
node
(class).
pad
(class).
panel
(class).
parent
(reader method).
parent
(reader method).
parent
(reader method).
(setf parent)
(writer method).
(setf parent)
(writer method).
(setf parent)
(writer method).
position-x
(generic function).
(setf position-x)
(generic function).
position-y
(generic function).
(setf position-y)
(generic function).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
process-control-chars-p
(generic function).
(setf process-control-chars-p)
(generic function).
push-item
(function).
random-position
(function).
refresh
(method).
remove-item
(generic function).
remove-nth
(function).
screen
(class).
scrolling-enabled-p
(generic function).
(setf scrolling-enabled-p)
(generic function).
scrolling-region
(generic function).
(setf scrolling-region)
(generic function).
select-first-item
(generic function).
select-last-item
(generic function).
select-next-item
(generic function).
select-previous-item
(generic function).
selectedp
(reader method).
(setf selectedp)
(writer method).
selection-callback
(reader method).
(setf selection-callback)
(writer method).
(setf source-position)
(generic function).
stackedp
(method).
(setf stackedp)
(method).
style
(method).
style
(reader method).
(setf style)
(method).
(setf style)
(method).
(setf style)
(method).
(setf style)
(writer method).
sub-pad
(class).
sub-window
(reader method).
sub-window
(class).
title
(reader method).
(setf title)
(writer method).
toggle-insert-mode
(function).
value
(reader method).
(setf value)
(writer method).
visiblep
(reader method).
(setf visiblep)
(writer method).
widget
(class).
widget-position
(generic function).
(setf widget-position)
(generic function).
width
(generic function).
(setf width)
(generic function).
window
(method).
window
(reader method).
(setf window)
(method).
(setf window)
(writer method).
window
(class).
window-position
(generic function).
(setf window-position)
(generic function).
winptr
(reader method).
border-width-bottom
(reader method).
(setf border-width-bottom)
(writer method).
border-width-left
(reader method).
(setf border-width-left)
(writer method).
border-width-right
(reader method).
(setf border-width-right)
(writer method).
border-width-top
(reader method).
(setf border-width-top)
(writer method).
component
(class).
count-lines
(function).
element
(class).
extended-window
(class).
external-height
(generic function).
external-width
(generic function).
get-geometry-plist
(function).
label-text
(function).
last-item-number
(generic function).
margin-bottom
(reader method).
(setf margin-bottom)
(writer method).
margin-left
(reader method).
(setf margin-left)
(writer method).
margin-right
(reader method).
(setf margin-right)
(writer method).
margin-top
(reader method).
(setf margin-top)
(writer method).
next-item-p
(function).
padding-bottom
(reader method).
(setf padding-bottom)
(writer method).
padding-left
(reader method).
(setf padding-left)
(writer method).
padding-right
(reader method).
(setf padding-right)
(writer method).
padding-top
(reader method).
(setf padding-top)
(writer method).
previous-item-p
(function).
reference
(reader method).
(setf reference)
(writer method).
set-geometry-plist
(function).
visible-height
(generic function).
visible-width
(generic function).
croatoan/croatoan.lisp
croatoan
(system).
bind
(function).
define-keymap
(macro).
dogrid
(macro).
event-case
(macro).
exit-event-loop
(function).
find-keymap
(function).
run-event-loop
(function).
save-excursion
(macro).
unbind
(function).
with-screen
(macro).
with-window
(macro).
with-windows
(macro).
%defcdr
(macro).
*keymaps*
(special variable).
alist2plist
(function).
apply-handler
(function).
assoc-merge
(function).
assoc-unique
(function).
check-string-char
(function).
convert-strings
(function).
function-arity
(function).
function-lambda-list
(function).
get-event-handler
(function).
handle-event
(generic function).
handle-events
(function).
parse-key
(function).
parse-key-spec
(function).
plist2alist
(function).
tokenize-key-spec
(function).
croatoan/form.lisp
croatoan
(system).
accept
(function).
cancel
(function).
clear
(method).
draw
(method).
draw
(method).
draw
(method).
draw
(method).
draw
(method).
draw
(method).
edit
(function).
find-element
(function).
move-next-char
(generic function).
move-previous-char
(generic function).
reset
(generic function).
reset-form
(function).
return-element-value
(function).
return-form-values
(function).
select-next-item
(method).
select-previous-item
(method).
add-title
(function).
call-button-function
(function).
content-position
(generic function).
external-dimensions
(function).
external-height
(method).
external-width
(method).
format-title
(generic function).
get-catch-tag
(function).
get-form-values
(function).
select-next-element
(function).
select-previous-element
(function).
toggle-checkbox
(function).
update-cursor-position
(generic function).
visible-dimensions
(function).
visible-height
(method).
visible-width
(method).
croatoan/field.lisp
croatoan
(system).
buffer
(reader method).
(setf buffer)
(writer method).
delete-next-char
(generic function).
delete-previous-char
(generic function).
draw
(method).
field
(class).
field-add-char
(function).
height
(method).
initialize-instance
(method).
insert-mode-p
(reader method).
(setf insert-mode-p)
(writer method).
insert-nth
(function).
max-buffer-length
(reader method).
(setf max-buffer-length)
(writer method).
move-end-of-line
(function).
move-next-char
(method).
move-previous-char
(method).
move-start-of-line
(function).
replace-nth
(function).
reset
(method).
value
(method).
(setf value)
(method).
width
(reader method).
(setf width)
(writer method).
debug-print-field-buffer
(function).
display-pointer
(reader method).
(setf display-pointer)
(writer method).
input-pointer
(reader method).
(setf input-pointer)
(writer method).
update-cursor-position
(method).
croatoan/textarea.lisp
croatoan
(system).
buffer
(reader method).
(setf buffer)
(writer method).
cursor-position-x
(reader method).
(setf cursor-position-x)
(writer method).
cursor-position-y
(reader method).
(setf cursor-position-y)
(writer method).
delete-next-char
(method).
delete-previous-char
(method).
draw
(method).
height
(reader method).
(setf height)
(writer method).
insert-mode-p
(reader method).
(setf insert-mode-p)
(writer method).
move-next-char
(method).
move-previous-char
(method).
reset
(method).
textarea
(class).
value
(method).
(setf value)
(method).
width
(reader method).
(setf width)
(writer method).
debug-textarea
(function).
display-pointer
(reader method).
(setf display-pointer)
(writer method).
distance-to-newline
(function).
input-pointer
(reader method).
(setf input-pointer)
(writer method).
input-pointer-x
(function).
multiplep
(function).
previous-char=
(function).
previous-line-length
(function).
textarea-add-char
(function).
update-cursor-position
(method).
croatoan/dropdown.lisp
croatoan
(system).
update-cursor-position
(method).
croatoan/hook.lisp
croatoan
(system).
hook
(function).
run-hook
(function).
croatoan/queue.lisp
croatoan
(system).
dequeue
(generic function).
enqueue
(generic function).
initialize-instance
(method).
initialize-instance
(method).
job-error
(condition).
print-object
(method).
print-object
(method).
process
(function).
queue
(class).
simple-queue
(class).
submit
(macro).
*job-queue*
(special variable).
emptyp
(function).
queue-items
(function).
croatoan/gray_streams.lisp
croatoan
(system).
stream-line-column
(method).
stream-read-char
(method).
stream-unread-char
(method).
stream-write-char
(method).
stream-write-char
(method).
croatoan/utf8.lisp
croatoan
(system).
ascii-byte-p
(function).
lead-byte-p
(function).
multi-byte-p
(function).
n-trail-bytes
(function).
test-utf-8
(function).
trail-byte-p
(function).
unicode-to-utf-8
(function).
utf-8-to-unicode
(function).
croatoan/dialog.lisp
croatoan
(system).
checklist
(class).
initialize-instance
(method).
initialize-instance
(method).
initialize-instance
(method).
initialize-instance
(method).
initialize-instance
(method).
inputbox
(class).
menubox
(class).
msgbox
(class).
dialog
(class).
make-dialog-button
(function).
make-dialog-layout
(function).
croatoan/addch.lisp
croatoan
(system).
acs-alist
(special variable).
distance-to-bottom
(function).
distance-to-eol
(function).
croatoan/add_wch.lisp
croatoan
(system).
add-wide-char
(function).
add-wide-char-utf-8
(function).
echo-wide-char
(function).
wacs
(function).
funcall-make-cchar_t
(function).
funcall-make-cchar_t-ptr
(function).
wide-acs-alist
(special variable).
croatoan/addstr.lisp
croatoan
(system).
add-string
(function).
croatoan/attr.lisp
croatoan
(system).
*ansi-color-list*
(special variable).
add-attributes
(function).
attrs2chtype
(function).
change-attributes
(function).
chtype2attrs
(function).
chtype2colors
(function).
complete-default-pair
(function).
convert-char
(generic function).
default-color-pair
(function).
(setf default-color-pair)
(function).
get-bitmask
(function).
pair-to-number
(function).
remove-attributes
(function).
use-terminal-colors-p
(function).
(setf use-terminal-colors-p)
(function).
*bitmask-alist*
(special variable).
*color-pair-alist*
(special variable).
*default-color-pair*
(special variable).
*valid-attributes*
(special variable).
*xterm-color-name-list*
(special variable).
char2chtype
(function).
chtype2xchar
(function).
color-name-to-number
(function).
color-to-number
(function).
colors2chtype
(function).
complete-pair
(function).
funcall-make-chtype
(function).
make-chtype
(function).
number-to-pair
(function).
set-attributes
(function).
set-color-pair
(function).
set-default-color-pair
(function).
xchar2chtype
(function).
croatoan/beep.lisp
croatoan/bkgd.lisp
croatoan
(system).
get-background-char
(function).
set-background-char
(function).
croatoan/bkgrnd.lisp
croatoan
(system).
funcall-get-cchar_t
(function).
get-background-cchar_t
(function).
set-background-cchar_t
(function).
croatoan/border.lisp
croatoan
(system).
box
(function).
draw-border
(function).
draw-hline
(function).
draw-rectangle
(function).
draw-vline
(function).
croatoan/border_set.lisp
croatoan
(system).
draw-wide-border
(function).
croatoan/clear.lisp
croatoan
(system).
clear
(method).
clear-rectangle
(function).
fill-rectangle
(function).
croatoan/color.lisp
croatoan
(system).
*xterm-color-hex-list*
(special variable).
closest-gray
(function).
color-1k-to-8bit
(function).
color-8bit-to-1k
(function).
gray-to-rgb
(function).
hex-to-rgb
(function).
hex-to-sgr
(function).
rgb-to-hex
(function).
rgb-to-rgb6
(function).
rgb6-to-rgb
(function).
rgb6-to-sgr
(function).
sgr-to-hex
(function).
sgr-to-rgb6
(function).
croatoan/delch.lisp
croatoan
(system).
delete-char
(function).
croatoan/deleteln.lisp
croatoan
(system).
delete-line
(function).
insert-line
(function).
croatoan/getch.lisp
croatoan
(system).
add-function-key
(function).
code-key
(function).
delete-function-key
(generic function).
function-key-p
(function).
get-char
(function).
get-event
(function).
key-code
(function).
key-code-to-name
(function).
key-name-to-code
(function).
key-pressed-p
(function).
key-supported-p
(function).
unget-char
(function).
*extended-key-caps*
(special variable).
*key-alist*
(special variable).
*missing-xterm-cap-sequences*
(special variable).
*missing-xterm-fkey-sequences*
(special variable).
access-alist
(macro).
add-extended-function-keys
(function).
add-function-key-cap
(function).
gen-unused-key-code
(function).
get-key-event
(function).
croatoan/define_key.lisp
croatoan
(system).
define-function-key
(function).
croatoan/get_wch.lisp
croatoan
(system).
get-wide-char
(function).
get-wide-event
(generic function).
wait-for-event
(function).
croatoan/getstr.lisp
croatoan
(system).
get-string
(function).
croatoan/initscr.lisp
croatoan
(system).
closed-p
(generic function).
end-screen
(function).
init-screen
(function).
new-terminal
(function).
set-current-terminal
(function).
croatoan/inopts.lisp
croatoan
(system).
set-input-blocking
(function).
set-input-mode
(function).
croatoan/inch.lisp
croatoan
(system).
extract-char
(function).
croatoan/in_wch.lisp
croatoan
(system).
extract-wide-char
(function).
croatoan/inwstr.lisp
croatoan
(system).
extract-wide-string
(function).
croatoan/inchstr.lisp
croatoan
(system).
extract-complex-string
(function).
croatoan/insch.lisp
croatoan
(system).
insert-char
(function).
croatoan/ins_wch.lisp
croatoan
(system).
insert
(function).
insert-wide-char
(function).
croatoan/insstr.lisp
croatoan
(system).
insert-string
(function).
croatoan/instr.lisp
croatoan
(system).
extract-string
(function).
croatoan/kernel.lisp
croatoan
(system).
set-cursor-visibility
(function).
croatoan/keybound.lisp
croatoan
(system).
function-key-definition
(function).
croatoan/key_defined.lisp
croatoan
(system).
function-key-code
(function).
croatoan/keyok.lisp
croatoan
(system).
enable-function-key
(function).
croatoan/mouse.lisp
croatoan
(system).
event-position
(function).
get-mouse-event
(function).
set-mouse-event
(function).
*mouse-button-event-bitmask-alist*
(special variable).
*mouse-event-bitmask-alist*
(special variable).
bitmask-to-keyword
(function).
keyword-to-bitmask
(function).
mouse-bitmask
(macro).
croatoan/move.lisp
croatoan
(system).
get-direction
(function).
goto
(function).
move
(function).
move-direction
(function).
move-window
(function).
croatoan/refresh.lisp
croatoan
(system).
mark-for-redraw
(function).
mark-for-refresh
(generic function).
refresh
(method).
refresh
(method).
refresh-marked
(function).
croatoan/scroll.lisp
croatoan/slk.lisp
croatoan
(system).
add-attributes
(function).
attributes
(function).
(setf attributes)
(method).
clear
(function).
color-pair
(function).
(setf color-pair)
(function).
initialize
(function).
label
(function).
(setf label)
(function).
mark-for-refresh
(function).
refresh
(function).
remove-attributes
(function).
restore
(function).
set-attributes
(function).
touch
(function).
add-attribute
(function).
remove-attribute
(function).
croatoan/terminfo.lisp
croatoan/touch.lisp
croatoan/util.lisp
croatoan
(system).
char-to-string
(generic function).
char-width
(function).
control-char-p
(function).
flush-input
(function).
join-lines
(function).
join-strings
(function).
key-to-string
(generic function).
mapc-plist
(function).
pair-plist
(function).
split-lines
(function).
split-string
(function).
string-to-char
(function).
string-width
(function).
unpair-plist
(function).
wrap-lines
(function).
wrap-string
(function).
croatoan/wresize.lisp
croatoan/shape.lisp
croatoan
(system).
angle-line
(function).
circle
(function).
coordinates
(reader method).
(setf coordinates)
(writer method).
draw-line
(function).
draw-shape
(function).
fill-shape
(function).
line
(function).
merge-shapes
(function).
origin-x
(reader method).
(setf origin-x)
(writer method).
origin-y
(reader method).
(setf origin-y)
(writer method).
plot-char
(reader method).
(setf plot-char)
(writer method).
polygon
(function).
quadrilateral
(function).
rectangle
(function).
shape
(class).
shape-extent
(function).
triangle
(function).
Packages are listed by definition order.
de.anvi.croatoan
High-level Lisp interface to the basic CFFI Ncurses API.
croatoan
crt
common-lisp
.
trivial-gray-streams
.
*ansi-color-list*
(special variable).
*main-stack*
(special variable).
accept
(function).
accept-selection
(function).
acs
(function).
activep
(generic reader).
(setf activep)
(generic writer).
add
(function).
add-attributes
(function).
add-char
(function).
add-child
(function).
add-function-key
(function).
add-string
(function).
add-wide-char
(function).
add-wide-char-utf-8
(function).
alert
(function).
angle-line
(function).
append-item
(function).
attributes
(generic function).
(setf attributes)
(generic function).
attrs2chtype
(function).
background
(generic function).
(setf background)
(generic function).
bgcolor
(generic function).
(setf bgcolor)
(generic function).
bind
(function).
bindings
(generic reader).
(setf bindings)
(generic writer).
border-width
(generic reader).
borderp
(generic reader).
box
(function).
buffer
(generic reader).
(setf buffer)
(generic writer).
button
(class).
calculate-layout
(generic function).
calculate-positions
(function).
callback
(generic reader).
(setf callback)
(generic writer).
cancel
(function).
center-position
(function).
change-attributes
(function).
char-to-string
(generic function).
char-width
(function).
checkbox
(class).
checkedp
(generic reader).
(setf checkedp)
(generic writer).
checklist
(class).
children
(generic reader).
(setf children)
(generic writer).
chtype2attrs
(function).
chtype2colors
(function).
circle
(function).
clear
(generic function).
clear-rectangle
(function).
closed-p
(generic function).
code-key
(function).
collection
(class).
color-pair
(generic function).
(setf color-pair)
(generic function).
column-layout
(class).
column-widths
(generic function).
complete-default-pair
(function).
complex-char
(class).
complex-char-array
(generic reader).
(setf complex-char-array)
(generic writer).
complex-char=
(function).
complex-string
(class).
complex-string->chars-string
(function).
complex-string-format
(macro).
complex-string-length
(function).
concat-complex-string
(generic function).
control-char-p
(function).
convert-char
(generic function).
coordinates
(generic reader).
(setf coordinates)
(generic writer).
copy-key
(function).
cumsum-predecessors
(function).
current-item
(generic function).
current-item-mark
(generic reader).
current-item-number
(function).
(setf current-item-number)
(function).
cursor-position
(generic function).
(setf cursor-position)
(generic function).
cursor-position-x
(generic function).
(setf cursor-position-x)
(generic function).
cursor-position-y
(generic function).
(setf cursor-position-y)
(generic function).
cursor-visible-p
(generic function).
(setf cursor-visible-p)
(generic function).
cyclicp
(generic reader).
(setf cyclicp)
(generic writer).
default-color-pair
(function).
(setf default-color-pair)
(function).
define-function-key
(function).
define-keymap
(macro).
delete-char
(function).
delete-function-key
(generic function).
delete-line
(function).
delete-next-char
(generic function).
delete-previous-char
(generic function).
dequeue
(generic function).
dimensions
(generic function).
(setf dimensions)
(generic function).
dogrid
(macro).
draw
(generic function).
draw-border
(function).
draw-hline
(function).
draw-line
(function).
draw-menu
(function).
draw-rectangle
(function).
draw-shape
(function).
draw-table-lines
(function).
draw-vline
(function).
draw-wide-border
(function).
dropdown
(class).
echo
(function).
echo-char
(function).
echo-wide-char
(function).
edit
(function).
elements
(generic function).
(setf elements)
(generic function).
empty-stack
(function).
enable-function-key
(function).
end-screen
(function).
enqueue
(generic function).
event
(class).
event-case
(macro).
event-code
(generic reader).
event-key
(generic reader).
event-position
(function).
exit-event-loop
(function).
exit-menu-event-loop
(function).
extract-char
(function).
extract-complex-string
(function).
extract-string
(function).
extract-wide-char
(function).
extract-wide-string
(function).
fgcolor
(generic function).
(setf fgcolor)
(generic function).
field
(class).
field-add-char
(function).
fill-rectangle
(function).
fill-shape
(function).
find-element
(function).
find-keymap
(function).
find-node
(function).
flatten-items
(function).
flush-input
(function).
form
(class).
form-window
(class).
frame-rate
(generic function).
(setf frame-rate)
(generic function).
function-key-code
(function).
function-key-definition
(function).
function-key-p
(function).
function-keys-enabled-p
(generic function).
(setf function-keys-enabled-p)
(generic function).
geometry
(generic function).
(setf geometry)
(generic function).
get-bitmask
(function).
get-char
(function).
get-direction
(function).
get-event
(function).
get-mouse-event
(function).
get-string
(function).
get-wide-char
(function).
get-wide-event
(generic function).
goto
(function).
grid
(class).
height
(generic function).
(setf height)
(generic function).
hook
(function).
hooks
(generic reader).
(setf hooks)
(generic writer).
initialize-leaves
(function).
input-blocking
(generic function).
(setf input-blocking)
(generic function).
input-buffering-p
(generic function).
(setf input-buffering-p)
(generic function).
input-echoing-p
(generic function).
(setf input-echoing-p)
(generic function).
insert
(function).
insert-char
(function).
insert-line
(function).
insert-mode-p
(generic reader).
(setf insert-mode-p)
(generic writer).
insert-nth
(function).
insert-string
(function).
insert-wide-char
(function).
items
(generic function).
(setf items)
(generic function).
job-error
(condition).
join-lines
(function).
join-strings
(function).
key
(structure).
key-alt
(reader).
(setf key-alt)
(writer).
key-code
(function).
key-code-to-name
(function).
key-ctrl
(reader).
(setf key-ctrl)
(writer).
key-name
(reader).
(setf key-name)
(writer).
key-name-to-code
(function).
key-p
(function).
key-pressed-p
(function).
key-shift
(reader).
(setf key-shift)
(writer).
key-supported-p
(function).
key-to-string
(generic function).
keymap
(generic reader).
(setf keymap)
(generic writer).
keymap
(class).
label
(class).
layout
(generic reader).
(setf layout)
(generic writer).
layout
(class).
leaves
(function).
line
(function).
make-background
(function).
make-key
(function).
mapc-plist
(function).
mark-for-redraw
(function).
mark-for-refresh
(generic function).
max-buffer-length
(generic reader).
(setf max-buffer-length)
(generic writer).
max-item-length
(generic reader).
(setf max-item-length)
(generic writer).
menu
(class).
menu-item
(class).
menu-type
(generic reader).
(setf menu-type)
(generic writer).
menu-window
(class).
merge-shapes
(function).
mouse-event
(class).
move
(function).
move-direction
(function).
move-down
(generic function).
move-end-of-line
(function).
move-left
(generic function).
move-next-char
(generic function).
move-previous-char
(generic function).
move-right
(generic function).
move-start-of-line
(function).
move-up
(generic function).
move-window
(function).
msgbox
(class).
name
(generic reader).
nconcat-complex-string
(function).
new-line
(function).
newline-translation-enabled-p
(generic function).
(setf newline-translation-enabled-p)
(generic function).
node
(class).
nth2d
(function).
origin-x
(generic reader).
(setf origin-x)
(generic writer).
origin-y
(generic reader).
(setf origin-y)
(generic writer).
pad
(class).
pair-plist
(function).
pair-to-number
(function).
panel
(class).
parent
(generic reader).
(setf parent)
(generic writer).
plot-char
(generic reader).
(setf plot-char)
(generic writer).
polygon
(function).
position-x
(generic function).
(setf position-x)
(generic function).
position-y
(generic function).
(setf position-y)
(generic function).
process
(function).
process-control-chars-p
(generic function).
(setf process-control-chars-p)
(generic function).
push-item
(function).
put
(function).
put-char
(function).
put-string
(function).
quadrilateral
(function).
queue
(class).
random-position
(function).
rectangle
(function).
ref2d
(function).
refresh
(generic function).
refresh-marked
(function).
remove-attributes
(function).
remove-item
(generic function).
remove-nth
(function).
replace-nth
(function).
reset
(generic function).
reset-form
(function).
resize
(function).
return-element-value
(function).
return-form-values
(function).
return-from-menu
(function).
row-heights
(generic function).
row-layout
(class).
run-event-loop
(function).
save-excursion
(macro).
screen
(class).
scroll
(function).
scrolling-enabled-p
(generic function).
(setf scrolling-enabled-p)
(generic function).
scrolling-region
(generic function).
(setf scrolling-region)
(generic function).
select
(generic function).
select-first-item
(generic function).
select-last-item
(generic function).
select-next-item
(generic function).
select-previous-item
(generic function).
selectedp
(generic reader).
(setf selectedp)
(generic writer).
selection-callback
(generic reader).
(setf selection-callback)
(generic writer).
set-mouse-event
(function).
shape
(class).
shape-extent
(function).
simple-char
(generic reader).
(setf simple-char)
(generic writer).
simple-queue
(class).
(setf source-position)
(generic function).
split-lines
(function).
split-string
(function).
stack
(class).
stack-empty-p
(function).
stack-move
(function).
stack-pop
(function).
stack-push
(function).
stackedp
(generic function).
(setf stackedp)
(generic function).
string-to-char
(function).
string-width
(function).
style
(generic function).
(setf style)
(generic function).
sub-pad
(class).
sub-window
(generic reader).
sub-window
(class).
submit
(macro).
text-ellipsize
(generic function).
text-right-pad
(generic function).
text-slice
(generic function).
text-width
(generic function).
textarea
(class).
tigetstr
(function).
title
(generic reader).
(setf title)
(generic writer).
toggle-insert-mode
(function).
toggle-item-checkbox
(function).
touch
(generic function).
triangle
(function).
unbind
(function).
unget-char
(function).
unpair-plist
(function).
use-terminal-colors-p
(function).
(setf use-terminal-colors-p)
(function).
value
(generic function).
(setf value)
(generic function).
visiblep
(generic reader).
(setf visiblep)
(generic writer).
wacs
(function).
wait-for-event
(function).
widget
(class).
widget-position
(generic function).
(setf widget-position)
(generic function).
width
(generic function).
(setf width)
(generic function).
window
(generic function).
(setf window)
(generic function).
window
(class).
window-position
(generic function).
(setf window-position)
(generic function).
winptr
(generic reader).
with-screen
(macro).
with-window
(macro).
with-windows
(macro).
wrap-lines
(function).
wrap-string
(function).
%defcdr
(macro).
*bitmask-alist*
(special variable).
*color-pair-alist*
(special variable).
*default-color-pair*
(special variable).
*extended-key-caps*
(special variable).
*job-queue*
(special variable).
*key-alist*
(special variable).
*keymaps*
(special variable).
*menu-stack*
(special variable).
*missing-xterm-cap-sequences*
(special variable).
*missing-xterm-fkey-sequences*
(special variable).
*mouse-button-event-bitmask-alist*
(special variable).
*mouse-event-bitmask-alist*
(special variable).
*valid-attributes*
(special variable).
*xterm-color-hex-list*
(special variable).
*xterm-color-name-list*
(special variable).
access-alist
(macro).
acs-alist
(special variable).
add-extended-function-keys
(function).
add-function-key-cap
(function).
add-title
(function).
alist2plist
(function).
apply-handler
(function).
array-slice
(function).
ascii-byte-p
(function).
assoc-merge
(function).
assoc-unique
(function).
bitmask-to-keyword
(function).
border-width-bottom
(generic reader).
(setf border-width-bottom)
(generic writer).
border-width-left
(generic reader).
(setf border-width-left)
(generic writer).
border-width-right
(generic reader).
(setf border-width-right)
(generic writer).
border-width-top
(generic reader).
(setf border-width-top)
(generic writer).
call-button-function
(function).
char-style
(function).
char2chtype
(function).
check-string-char
(function).
checked-items
(function).
chtype2xchar
(function).
closest-gray
(function).
collect-height-hints
(function).
collect-width-hints
(function).
color-1k-to-8bit
(function).
color-8bit-to-1k
(function).
color-name-to-number
(function).
color-to-number
(function).
colors2chtype
(function).
complete-pair
(function).
complex-string-first-char-attributes
(function).
complex-string-last-char-attributes
(function).
component
(class).
concat-complex-string-no-contagion
(function).
concat-complex-string-with-contagion
(function).
content-position
(generic function).
convert-strings
(function).
copy-complex-char
(function).
copy-complex-char-array
(function).
copy-complex-string
(generic function).
count-lines
(function).
current-item-position
(generic reader).
(setf current-item-position)
(generic writer).
debug-print-field-buffer
(function).
debug-textarea
(function).
display-pointer
(generic reader).
(setf display-pointer)
(generic writer).
distance-to-bottom
(function).
distance-to-eol
(function).
distance-to-newline
(function).
draw-stack-p
(generic reader).
draw-table-bottom
(function).
draw-table-row-separator
(function).
draw-table-top
(function).
element
(class).
emptyp
(function).
extended-window
(class).
external-dimensions
(function).
external-height
(generic function).
external-width
(generic function).
format-menu-item
(function).
format-title
(generic function).
funcall-get-cchar_t
(function).
funcall-make-cchar_t
(function).
funcall-make-cchar_t-ptr
(function).
funcall-make-chtype
(function).
function-arity
(function).
function-lambda-list
(function).
gen-unused-key-code
(function).
get-background-cchar_t
(function).
get-background-char
(function).
get-catch-tag
(function).
get-event-handler
(function).
get-form-values
(function).
get-geometry-plist
(function).
get-key-event
(function).
gray-to-rgb
(function).
handle-event
(generic function).
handle-events
(function).
hex-to-rgb
(function).
hex-to-sgr
(function).
init-screen
(function).
input-pointer
(generic reader).
(setf input-pointer)
(generic writer).
input-pointer-x
(function).
keyword-to-bitmask
(function).
label-text
(function).
last-item-number
(generic function).
lead-byte-p
(function).
list2array
(function).
make-chtype
(function).
margin-bottom
(generic reader).
(setf margin-bottom)
(generic writer).
margin-left
(generic reader).
(setf margin-left)
(generic writer).
margin-right
(generic reader).
(setf margin-right)
(generic writer).
margin-top
(generic reader).
(setf margin-top)
(generic writer).
mouse-bitmask
(macro).
move-down-possible-p
(function).
move-left-possible-p
(function).
move-right-possible-p
(function).
move-up-possible-p
(function).
multi-byte-p
(function).
multiplep
(function).
n-trail-bytes
(function).
new-terminal
(function).
next-item-p
(function).
number-to-pair
(function).
padding-bottom
(generic reader).
(setf padding-bottom)
(generic writer).
padding-left
(generic reader).
(setf padding-left)
(generic writer).
padding-right
(generic reader).
(setf padding-right)
(generic writer).
padding-top
(generic reader).
(setf padding-top)
(generic writer).
parse-key
(function).
parse-key-spec
(function).
plist2alist
(function).
previous-char=
(function).
previous-item-p
(function).
previous-line-length
(function).
queue-items
(function).
reference
(generic reader).
(setf reference)
(generic writer).
reset-menu
(function).
rgb-to-hex
(function).
rgb-to-rgb6
(function).
rgb6-to-rgb
(function).
rgb6-to-sgr
(function).
right-padding
(function).
rmi2sub
(function).
rotate
(function).
run-hook
(function).
select-next-element
(function).
select-previous-element
(function).
set-attributes
(function).
set-background-cchar_t
(function).
set-background-char
(function).
set-color-pair
(function).
set-current-terminal
(function).
set-cursor-visibility
(function).
set-default-color-pair
(function).
set-equal
(function).
set-geometry-plist
(function).
set-input-blocking
(function).
set-input-mode
(function).
sgr-to-hex
(function).
sgr-to-rgb6
(function).
split-size
(function).
style-char
(function).
sub2rmi
(function).
sync-collection-grid
(function).
sync-grid-collection
(function).
tablep
(generic reader).
test-utf-8
(function).
textarea-add-char
(function).
toggle-checkbox
(function).
tokenize-key-spec
(function).
trail-byte-p
(function).
unicode-to-utf-8
(function).
update-cursor-position
(generic function).
utf-8-to-unicode
(function).
variable-column-width-p
(generic reader).
vector-not-empty-p
(function).
visible-dimensions
(function).
visible-grid-columns
(function).
visible-grid-rows
(function).
visible-height
(generic function).
visible-width
(generic function).
wide-acs-alist
(special variable).
xchar2chtype
(function).
de.anvi.croatoan.soft-labels
Soft labels for the function keys F1-F12 in the bottom screen line.
soft-labels
slk
common-lisp
.
add-attributes
(function).
attributes
(function).
(setf attributes)
(generic function).
clear
(function).
color-pair
(function).
(setf color-pair)
(function).
initialize
(function).
label
(function).
(setf label)
(function).
mark-for-refresh
(function).
refresh
(function).
remove-attributes
(function).
restore
(function).
set-attributes
(function).
touch
(function).
add-attribute
(function).
remove-attribute
(function).
de.anvi.croatoan.dialog
Dialog windows allow simple user input.
dialog
dlg
common-lisp
.
de.anvi.croatoan
.
dialog
(class).
make-dialog-button
(function).
make-dialog-layout
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Global window stack. Windows can be added upon initialization with :stacked t or (setf (stackedp win) t).
(setf (visiblep win) nil) prevents a stacked window from being refreshed and thus displayed.
Use ‘control-string’ to build a ‘complex-string’ with the help of ‘format’ function.
Register a keymap given its name and (key function) pairs.
As a second argument, optionally a parent keymap can be given.
Keys can be characters, key structs for function keys with modifiers
or a keyword for a function key without modifiers, which will
implicitely converted to a struct.
In addition to single chars or keys, emacs-style specs like ’C-x 2’
or ’C-M-S-<home>’ can be given as strings, which will be parsed to
char and key lists and then bound to the given event.
If a keymap with the same name already exists, it will be deleted before the new one is added.
Loop over a 2D grid in row major order.
The grid is specified by position coordinates y0 x0 and dimensions height width.
Example: ((i 10 2) (j 10 3)) produces:
10 10, 10 11, 10 12
11 10, 11 11, 11 12
Window event loop, events are handled by an implicit case form.
For now, it is limited to events generated in a single window.
So events from multiple windows have to be handled separately.
In order for event handling to work, input-buffering has to be nil.
Several control character events can only be handled when
process-control-chars is also nil.
Allowed values for keys are lisp characters, function key names as
keywords, t for all events or (nil) for the idle event.
Key structs or emacs-style key specs are not supported, because the
underlying lisp eql can not test for structs and strings.
If input-blocking is nil, we can handle the (nil) event, i.e. what
happens between key presses.
If input-blocking is t, the (nil) event is never returned.
The main window event loop name is hard coded to event-case to be
used with return-from.
Instead of ((nil) nil), which eats 100% CPU, use input-blocking t.
After executing body, return the cursor in window to its initial position.
Submit BODY from a producer thread to a job queue to be processed by the main thread.
The main thread should be the only one interfacing ncurses directly,
and should be running in a terminal.
SUBMIT uses a thread-safe FIFO queue to queue up jobs which should be
evaluated inside the terminal thread.
For this to work PROCESS has to be called from inside the terminal
thread to pop requests from the FIFO queue and evaluate them.
When a condition is signaled while the body of SUBMIT is evaluated, it
is handled by PROCESS and put inside a JOB-ERROR which also contains
the failed form.
The condition is then signaled again from within a restart which
allows skipping the failed form and continue evaluating requests.
In practice, this allows for calls to ncurses forms from SLIME to be
performed without IO glitches that tend to occur when ncurses code is
called from the SLIME repl thread directly.
Create a screen, evaluate the forms in the body, then cleanly close the screen.
Pass any arguments besides BIND-DEBUGGER-HOOK to the initialisation of the
screen object. The screen is cleared immediately after initialisation.
This macro will bind *DEBUGGER-HOOK* so that END-SCREEN gets called before the condition is printed. This will interfere with SWANK as it also binds *DEBUGGER-HOOK*. To prevent WITH-SCREEN from binding *DEBUGGER-HOOK*, set BIND-DEBUGGER-HOOK to NIL.
This macro is the main entry point for writing ncurses programs with the croatoan library. Do not run more than one screen at the same time.
Create a window, evaluate the forms in the body, then cleanly close the window.
Pass any arguments to the initialisation of the window object.
Example:
(with-window (win :input-echoing t
body)
Create one or more windows, evaluate the forms in the body, then cleanly close the windows.
Pass any arguments to the initialisation of the window objects.
Example:
(with-windows ((win1 :input-echoing t)
(win2 :input-echoing t))
body)
Exit the event loop of a form or form element.
The first return value is t, emphasizing that the user has accepted the form.
The element name is returned as a second value.
Bind this function to an event (key binding or button).
Return the value of the currently selected item or all checked items.
Take a symbol, return the integer representing the acs char.
Add the text object to the window, then advance the cursor.
Currently supported text objects are characters (simple and complex),
characters given by integer codes or keywords, and strings
(simple and complex).
If the position coordinates y (row) and x (column) are given, move the
cursor to the position first and then add the object.
The position can also be passed in form of a two-element list.
If n is given for a char, write n chars. If n is -1, add as many chars
as will fit on the line.
If n is given for a string, add at most n chars from the string. If n is -1, add as many chars from the string as will fit on the line.
Takes a list of keywords and turns the appropriate attributes on.
Add attributes to the rendition of the soft labels.
The default attribute used to highlight soft labels is :standout.
Add the narrow (single-byte) char to the window, then advance the cursor.
If the position coordinates y (row) and x (column) are given, move the
cursor to the position first and then add the character.
The position can also be passed in form of a two-element list.
If n is given for a char, write n chars. If n is -1, add as many chars
as will fit on the line.
Example: (add-char scr #a :attributes ’(:bold) :color-pair ’(:red :yellow))
Append an element to parent’s children list.
Add a new mapping (code . key) to *key-alist*.
The codes and keys have to be unique, so if the alist already contains either the key or the code, any existing mapping will be replaced by the new one.
Add the unrendered string to the window.
If n is given, add at most n chars from the string. If n is -1, as
many chars will be added that will fit on the line.
If the position coordinates y (row) and x (column) are given, move the
cursor to the position first and then add the object.
The position can also be passed in form of a two-element list.
Add the wide (multi-byte) char to the window, then advance the cursor.
If the position coordinates y (row) and x (column) are given, move the
cursor to the position first and then add the character.
The position can also be passed in form of a two-element list.
If n is given for a char, write n chars. If n is -1, add as many chars
as will fit on the line.
If char is a complex-char, its own style overrides any style parameters.
If a style is passed, it overrides attributes and color-pair.
Add the wide (multi-byte) char to the window, then advance the cursor.
If the position coordinates y (row) and x (column) are given, move the
cursor to the position first and then add the character.
The position can also be passed in form of a two-element list.
If n is given, write n chars. If n is -1, as many chars will be added as will fit on the line.
Draw a line of the given length in the bearing theta from the origin.
Append the item at the end of the collection list.
This does not change the current item number.
Return a list of attributes used for the rendition of soft labels.
Take a list of attribute keywords, return a chtype with the attribute bits set.
Bind the handler to the event in the bindings alist of the object.
The object can be a croatoan object (like window or form) or a keymap.
If event argument is a list, bind the handler to the whole sequence
of events (key chain).
The handler can be a function object, a fbound symbol or a keymap.
The handler function will be called by the run-event-loop when
keyboard or mouse events occur. The functions have two mandatory
arguments, object and event.
If a keymap is bound to a key, this allows keys to be defined as
prefix keys, so event sequences like ’^X a’ can be chained together
and handled like a single event.
For every event-loop, at least an event to exit the event loop should
be assigned, by associating it with the predefined function
exit-event-loop.
If a default event handler (for the event t) is defined, it will
handle all events for which no specific event handler has been
defined.
If the handler for an event is the symbol t, the event is ignored.
If the event was part of an event sequence, the handler t cancels the
input sequence.
Bind adds t as the default handler to all implicitly created
sub-keymaps, which cancels the input sequence of a key chain in case
an unknown key is typed.
If input-blocking of the window is set to nil, a handler for the nil event can be defined, which will be called at a specified frame-rate between keypresses. Here the main application state can be updated.
Alternatively, to achieve the same effect, input-blocking can be set
to a specific delay in miliseconds.
Example use: (bind scr #q (lambda (win event) (throw scr :quit)))
Draw a border around the window.
If any parameter is nil or zero, the default ACS char will be used.
Recursively set the position (y x) of each of the layout’s children.
Exit the event loop of a form or form element.
The return value is nil, emphasizing that the user has canceled the form.
The element name is returned as a second value.
As a consequence of the cancel, all elements are reset and the input content is discarded.
Bind this function to an event (key binding or button).
Return the position (y x) of the center of the window.
Change the attributes of n chars starting at the current cursor position.
If n is -1, as many chars will be added as will fit on the line.
If the destination coordinates y and x are given, the attributes are changed from the given point without moving the cursor position.
Return the number of columns required to display the wide char.
If char is not printable, for example a control char, return nil.
In order to get a meaningful result from wcwidth, the locale has to be set, see ‘setlocale’.
Take a chtype, return a list of used attribute keywords.
Take a chtype or attr_t integer, return a list of two keywords denoting a color pair.
Return a circle with a given radius, optionally filled.
Clear labels from the screen. Use restore to restore the labels afterwards.
Clear the rectangular area of a window by overwriting it with space.
If the background of a window is set, then the background char is used instead.
Return a key struct representing the key code returned by ncurses:getch.
Return nil if the code is unknown.
An existing but unknown code can be added with add-function-key.
A new escape sequence and a new code can be added with define-function-key.
This function is analogous to cl:code-char but for function key structs.
Return the color pair used for soft labels.
The color pair is a 2-element list (:foreground :background).
Set the color pair used for soft labels.
The color pair is a 2-element list (:foreground :background).
Take a color pair possibly containing nil, return a pair completed from the default color pair 0.
Return t if the simple-char, the color pair and the attribute list of a complex-char are equal.
The initial purpose of this function is to be used as the equality test for alexandria:define-constant.
Convert a ‘complex-string’ to a ‘string’.
Returns the length (in characters units) of a complex string passed as argument ‘complex-string’.
Take a list, return a cumulative sum of previous elements.
For every number, sum the numbers preceding it in the list.
For example, for the list (2 4 3 6) we will get (0 2 6 9).
For example, if (2 4 3 6) is a list of column widths in a table, then (0 2 6 9) is a list of x positions of each column.
Return the current item number of collection.
Set and return the new current item number of the collection.
Run the selection-callback, if it is set.
Set the colors which will comprise the default color pair 0.
The default color pair is used when no other colors are specified.
The ncurses default color pair is white on black.
If the terminal can set its own colors, they are named :terminal.
Add or replace a function key defined by a character sequence.
The key has to be given by a key struct, which at least has to contain
the key-name slot.
The key name is a keyword symbol used to represent the key (e.g. :f1).
The definition of the function key can be passed as a list of
characters or as a string.
The definition is the raw (escape) sequence of characters returned by the terminal to identify an event (key pressed, mouse event, etc.).
If key-code is an integer, a new mapping (code . key) is added to the
*key-alist* database overwriting any already existing mapping which
contains either key or code.
If key-code is nil (default) the mapping is added with an unique, unused, generated keycode.
Delete the character under the cursor.
All characters to the right of the cursor on the same line are moved
to the left one position and the last character on the line is filled
with a blank. The cursor position does not change after moving
to (y,x), if specified.
Delete n lines starting with the one under the cursor.
The remaining lines are moved up. The bottom n lines are cleared.
The current cursor position does not change.
Draw a border around the window using single-byte line-drawing characters.
If no border chars are given, the default ncurses ACS chars will be used.
Draw a line in window from start (y1 x1) to end (y2 x2) position using the Bresenham algorithm.
Draw a shape in the given window.
Draw a border around the window using (wide) unicode line-drawing characters.
If no border chars are given, the default ncurses WACS chars will be used.
Add one character to the window, then advance the cursor.
If the position coordinates y (row) and x (column) are given, move the
cursor to the position first and then add the character.
The position can also be passed in form of a two-element list.
If n is given for a char, write n chars. If n is -1, add as many chars
as will fit on the line.
If char is a complex-char, its own style overrides any style parameters.
If a style is passed, it overrides attributes and color-pair.
Add one narrow (single-byte) character to the window, then refresh the window.
If the position coordinates y (row) and x (column) are given, move the
cursor to the position first and then echo the character.
The position can also be passed in form of a two-element list.
The only difference to add-char and a subsequent refresh is a
performance gain if we know that we only need to output a single
character.
Add one wide (multi-byte) character to the window, then refresh the window.
If the position coordinates y (row) and x (column) are given, move the
cursor to the position first and then add the character.
The position can also be passed in form of a two-element list.
The only difference to add-wide-char and a subsequent refresh is a performance gain if we know that we only need to output a single character.
Modify a form or form element. Return t if the edit was accepted, nil of it was canceled.
The return values of the event handler are the return values of the event loop and thus also returned by edit.
Remove all items from the stack.
Enable (default) or disable a function key given by its code.
This function allows to disable specific keys as an alternative to using ncurses:keypad to disable all function keys.
Clean shutdown of the curses display.
Associate this function with an event to exit the event loop.
Extract and return the single-byte complex char from the window.
If the position coordinates y (row) and x (column) are given, move the
cursor to the position first and then add the character.
The position can also be passed in form of a two-element list.
Extract and return a complex string from the window.
Start at the current cursor position and end at the right margin of window.
If the position coordinates y (row) and x (column) are given, move the
cursor to the position first and then add the character.
The position can also be passed in form of a two-element list.
If n is given, read at most n chars.
Extract and return a string from window.
Any attributes are stripped from the characters before the string is returned.
Start at the current cursor position and end at the right margin of window.
If the position coordinates y (row) and x (column) are given, move the
cursor to the position first and then add the character.
The position can also be passed in form of a two-element list.
If n is given, read at most n chars.
Extract and return a single wide (complex) character from the window.
This includes wide characters (code > 255), and requires the ncursesw library.
If the position coordinates y (row) and x (column) are given, move the
cursor to the position first and then add the character.
The position can also be passed in form of a two-element list.
Extract and return a string from window.
Any attributes are stripped from the characters before the string is returned.
Start at the current cursor position and end at the right margin of window.
If the position coordinates y (row) and x (column) are given, move the
cursor to the position first and then add the character.
The position can also be passed in form of a two-element list.
If n is given, read at most n chars.
Add char to the current cursor position in the field, then move the cursor forward.
The buffer can be longer than the displayed field width, horizontal scrolling is enabled.
Display char in every cell of a rectangular area in a window.
The rectangle is specified by a starting position and its dimensions.
4 arguments: y0 x0 height width
2 arguments: (y0 x0) (h w)
Take a shape that only shows the borders and ’color it out’.
Return from the given form the element given by its name.
The name should be a keyword, symbol or integer, the default test is eql.
If the name is a string, equal should be used as the test.
Instead of the name, another key can be provided to identify the element.
Return a keymap given by its name from the global keymap alist.
Return the first node that matches the name.
Take a layout object, return a flattened list of elements to be passed to a form.
Nested layouts are spliced in, nils removed and strings/symbols/numbers converted to labels.
Throw away any typeahead that has been input by the user and has
not yet been read by the program.
This can be used to clear the input buffer after a key has been held
down for a longer time to prevent that events are handled by the
progrem even after the key is released. (That form of intertia can
happen in games.)
This ncurses function has the same purpose as cl:clear-input.
Take a function key definition, return the ncurses key code.
If the key is defined, return the key code (as returned by getch or
get_wch), or nil if the key is not defined.
A key definition is an escape sequence of characters that is generated by the keyboard and recognized by ncurses as a single function key.
The definition can be passed as string or as a list of characters.
Also see: function-key-definition.
Take a function key code, return its definition as a string.
The key definition is a escape sequence of characters that is
generated by the keyboard and recognized by ncurses as a single
function key.
Also see: function-key-code.
Take a single-byte key code returned by get-char, return t if the
number is a known function key, or nil if it is either a char or an
unknown key.
Used in get-event to check the return value of get-char.
get-wide-char/event has a different way to check for function keys.
Returns an ncurses attr/chtype representing the attribute keyword.
Read in a C char (single byte) from the keyboard and return it.
If the destination coordinates y (row) and x (column) are given, move
the cursor to the destination first and then read a single byte.
The window from which the char is read is automatically refreshed.
Take a keyword name of a direction, return a direction given as a two-element list.
The two-element list is given as (y x), where y is the vertical
direction up (-1) or down (+1) and x is the horizontal direction
left (-1) or right (+1).
Calculated that way, we have 8 possible directions:
-1,-1 -1,0 -1,1
0,-1 0,1
1,-1 1,0 1,1
The direction is a 2D increment (dy dx) that can be added to a
position (y x) to get a new position (y+dy x+dx).
Read a single-byte char from window, return an event object.
The object contains the event key (a simple character or a keyword for
function keys) and the integer key code.
The following chars can be returned:
1. Regular single-byte control and graphic characters with codes 0-255
are returned as lisp characters.
Multi-byte characters are returned as a sequence of chars/integers.
To return a multi-byte char as a single char, use get-wide-event.
2. If input-blocking of the window is set to nil, non-events (idle time when no real events occur) are returned as nil with the code -1.
3. If enable-fkeys is set to t, function keys are converted by ncurses
from an escape sequence to an integer >255 and returned by
get-event as a lisp keyword name.
If enable-fkeys is nil, the whole sequence is read and returned.
Decode and return the mouse event struct as multiple values.
Read a string from the keyboard and return it.
Reading is performed until a newline or carriage return is received. The terminating character is not included in the returned string.
If n is given, read at most n chars, to prevent a possible input
buffer overflow.
If the destination coordinates y and x are given, move the cursor there first.
Read in a wide C wchar_t (multi-byte) from the keyboard and return it.
If the destination coordinates y (row) and x (column) are given, move
the cursor to the destination first and then read a multi-byte char.
The window from which the char is read is automatically refreshed.
If the second returned value is t, the char is a function key, nil otherwise.
Move cursor to the window position given as a two-element list (y x).
If more than one position is given, add their coordinates before moving the cursor.
This allows to address element-relative coordinates or cursor movement to a different position.
Add the function to the object’s hook.
A hook is a list of functions to call on different pre-defined
occasions in order to customize the library’s behavior.
The function should take the object as its only argument.
The functions are called to perform side effects, their return values are discarded.
Initialize soft function-key labels on the bottom screen line.
Soft labels are used to display short titles of the functions bound
to the function keys F1 to F12.
The following 4 modes (label layouts) are supported:
Show 8 labels, each with a width of 8 characters:
:mode-3-2-3 - 3 labels left, 2 in the center, 3 right
:mode-4-4 - 4 labels left, 4 labels right
Show 12 labels, each with a width of 5 characters:
:mode-4-4-4 - 4 labels left, 4 in the center, 4 right :mode-4-4-4-index - display an line with F1-F12 above the labels.
The single-line 4-4-4 mode without the index line is the default, as most PC keyboards support 12 function keys.
Walk the layout tree given by node and initialize the leaf objects that are given as plists.
Insert char or string into window before the char currently under the cursor.
Currently supported text objects are characters (simple and complex),
characters given by integer codes or keywords, and strings
(simple and complex).
If the position coordinates y (row) and x (column) are given, move the
cursor to the position first and then insert the object.
The position can also be passed in form of a two-element list.
If n is given for a char, insert n chars.
If n is given for a string, add at most n chars from the string.
Insert char into window before the character currently under the cursor.
Chars right of the cursor are moved one position to the right.
The rightmost character on the line may be lost. The position of the
cursor is not changed.
char can be a simple character or a complex-char with attributes and colors.
If the position coordinates y (row) and x (column) are given, move the
cursor to the position first and then add the object.
The position can also be passed in form of a two-element list.
If n is given, insert n chars.
Insert n lines above the current line.
The current line and the lines below are moved down. The n bottom
lines are lost.
The current cursor position does not change.
Insert element into list at nth place, increasing the length of the list.
Example: (insert-nth 3 ’x ’(a b c d e)) => (A B C X D E)
Insert string before the current position in window.
Chars right of the cursor are moved to the right. The rightmost chars
on the line may be lost. The cursor position is not changed.
If n is given, insert at most n chars from the string.
If the position coordinates y (row) and x (column) are given, move the
cursor to the position first and then add the object.
The position can also be passed in form of a two-element list.
Insert char into window before the character currently under the cursor.
Chars right of the cursor are moved one position to the right.
The rightmost character on the line may be lost. The position of the
cursor is not changed.
char can be a simple character or a complex-char with attributes and colors.
If the position coordinates y (row) and x (column) are given, move the
cursor to the position first and then add the object.
The position can also be passed in form of a two-element list.
If n is given, insert n chars.
Join a list of strings into a string of lines separated by newline.
Return the code associated with a function key struct.
Take an integer representing the function key code, return a
keyword representing the function key name.
If a name to the given code is not in the key list, return the value of the optional parameter: ’default’.
Return the first code (an integer) from the given keyname (a keyword).
Since we can have more than one key struct with the same name, we can here
only return the first code, which would be the key without modifiers.
If the code does not exist, return the value of the optional parameter: ’default’.
Returns t if the code is recognized by the current terminal as a key.
Return the title of the soft label given by the function key number.
Set the title of the label of the function key given by the number.
Note that since function keys are F1-F12, the numbering starts at 1.
Walk the layout tree given by the root node, return a list of leaves.
Return a straight line between two points
Make an object suitable as a window background.
Use ‘color-bg’ as background color, ‘color-fg’ as foreground color and character ‘char’.
If color-fg is not given, default to ‘color-bg’).
Mapc function of two args (k v) to successive keys and values in plist.
The function is applied for its side effects, the results are not accumulated.
Mark a whole window or a number of lines to be completely redrawn on the next refresh.
It does not redraw, only marks for redrawing by refresh.
It assumes that the display on the terminal has been corrupted.
It is unclear how redrawwin differs from touchwin.
Mark the soft labels for a later refresh with refresh-marked.
This allows the soft labes to be refreshed in one sweep with other elements of the screen.
Create a new shape object by merging the coordinates of a given list of shapes.
Move cursor to the position given by row y and column x.
If relative is t, move the cursor by y rows and x columns relative to the current cursor position.
Move cursor in the given direction by n cells.
Move the cursor to the last char in the field.
Move the cursor to the first char in the field.
Move top left corner of the window to row y and column x.
If relative is t, move the window by y rows and x columns relative to its current position.
Destructively concatenate the ‘complex-string’ ‘a’ and ‘b’
Insert count newline characters into window.
Return the position (i j) of list by assuming grid dimensions (m n) and row major order.
Return a plist constructed out of separate keys and values lists.
This is supposed to work like cl:pairlis but returning a plist instead
of an alist.
If an initial plist is provided, the new key-value pairs are prepended
to it.
Example 1: (pair-plist ’(a b c) ’(1 2 3)) => (a 1 b 2 c 3)
Example 2: (pair-plist ’(a b) ’(1 2) ’(x 3 y 4)) => (A 1 B 2 X 3 Y 4)
The resulting plist can be again taken apart into keys and values by the reverse function ‘unpair-plist’.
Take a two-element list of colors, return the ncurses pair number.
The colors can be keywords or numbers -1:255.
-1 is the :terminal default color when use-terminal-colors-p is t.
If it is a new color pair, add it to ncurses, then return the new pair number.
If the pair already exists, return its pair number.
If pair is nil, return the default color number, 0.
Example:
(pair-to-number ’(:white :black)) => 0
Return a polygon along a list of corners, optionally filled
Process the contents of the job queue in the current thread, then exit.
Process should be called from the main thread, which should be the only thread interfacing ncurses directly, and should be running in a terminal.
Add the item at the front of the collection list.
This increments the current item number.
Add the object to the window at position (y x), then advance the cursor.
put is a thin convenience wrapper around add with the difference that the position arguments (y x) are mandatory.
Return a quadrilateral (utility wrapper around ‘polygon’).
Return a random valid position (y x) inside the window.
Return a rectangle (utility wrapper around ‘polygon’).
Return the position (i j) of list by assuming grid dimensions (m n) and row major order.
Refresh the soft label line(s).
Refresh one or more windows marked for refresh.
If only one window is refreshed, refresh can be called directly.
The goal of this batch refresh is improved efficiency and preventing flicker that might occur if several windows are refreshed in sequence.
Takes a list of keywords and turns the appropriate attributes off.
Takes a list of keywords and turns the appropriate attributes off.
Remove element at nth place from the list, decreasing the length of the list.
Example: (remove-nth 3 ’(a b c d e)) => (A B C E)
Replaces element of list at nth place, not increasing the length of the list.
Example: (replace-nth 3 ’x ’(a b c d e)) => (A B C X E)
Reset a parent form from an element callback, for example a button.
Restore the labels previously removed by clear.
Exit the event loop and return the value of the (current) element.
The element name is returned as a second value.
Instead of accept or cancel, which return t or nil, this function allows to exit the form event loop and return any value.
Return an alist with element names as keys and element values as values.
It is supposed to resemble GET params fname=John&lname=Doe from html forms.
Only active elements are returned.
Only the activated button is returned, other buttons are ignored.
Bind this to an event or element to exit the event loop of a form.
Pop the menu from the menu stack, refresh the remaining menu stack.
If the menu is not a window, clear the menu from the window.
Return the value from select.
Read events from the object, then call predefined event handler functions on the events.
The object has to be a ncurses window or have an associated ncurses window.
The handlers can be added by the bind function, or by directly setting a predefined keymap
to the object’s bindings slot.
Args is one or more additional arguments that can be passed to the handlers.
Provide a non-local exit point so we can exit the loop from an event handler.
One of the events must provide a way to exit the event loop by ’throwing’ the object.
The function exit-event-loop is pre-defined to perform this non-local exit.
Scroll the window up or down for n lines relative to its contents.
If n is positive, move the contents up relative to the window.
The line i becomes line i-n. The window view moves n lines down.
If n is negative, move the contents down relative to the window.
The line i becomes line i+n. The window view moves n lines up.
Initial Scroll up Scroll down
n = 1 n = -1
1
+—–+ +—–+ +—–+
| 1 | | 2 | | |
| 2 | | 3 | | 1 |
| 3 | | | | 2 |
+—–+ +—–+ +—–+
3
The content lines that leave the scrolled window aren’t buffered and
can not be retrieved when moving back, they are lost. (If you need to
scroll up and down without losing lines, consider using pad windows
instead of simple windows.)
The cursor position in the window is not changed when the contents are scrolled.
Set the attributes and color-pair for the rendition of soft labels.
This function overwrites any previous used attributes including the color. If you only want to set the attributes, you might want to use setf attributes instead.
Take a list of mouse event keys, activate tracking of those events.
Returns an integer bitmask. An empty list turns off mouse tracking.
Return min-y, min-x, max-y, and max-x of a shape’s coordinates as multiple values.
Split a string containing newlines into a list of strings.
Split the string into a list of words separated by one or more chars.
Return t if there are no items on the stack, nil otherwise.
Move an object in the stack.
The object can be passed directly and is the compared by eq, or by its
position in the stack.
Valid movement directions are :up :down :top and :bottom.
Remove and return the top item off the stack.
Add the object or objects on top of the stack.
Take a string representing a character, return the corresponding character.
The char can be a printable, graphical char or a control char in the caret ^A notation.
Return the number of columns required to display the string.
If the string contains a non-printable character, return nil.
Take a terminfo capability name, return its string value.
Error return values:
-1 if capname is not a string capability,
0 if it is canceled or absent from the terminal description.
This function is just a thin convenience wrapper around ncurses:tigetstr, so we dont have to deal with C pointers.
Toggle the insert mode boolean property of the object.
This applies to window, field and textarea objects, for example.
Toggle the checked state of the current item, used in checkbox menus.
Force all labels to be output on the next refresh.
Touch marks the label line as changed because refresh only considers changed cells.
Return a triangle (utility wrapper around ‘polygon’).
Remove the event and the handler function from object’s bindings alist.
If event argument is a list, remove the whole sequence of events (key chain).
Take a simple C chtype and put it back into the read buffer.
It will be read with the next call to get-char.
Separate a plist into two lists, returned as separate values.
The first list contains the keys and the second the values.
Example: (unpair-plist ’(a 1 b 2 c 3)) => (a b c), (1 2 3)
The resulting keys and values can be combined back into the initial plist by the function ‘pair-plist’.
Take a keyword symbol, return the wide unicode integer representing the ACS char.
Wait till a valid event (keyboard, mouse or resize) occurs, then return.
If blocking is set to t, wait till any event is read.
If blocking is nil, ignore the nil events and only return when the first non-nil event is read.
The return value is not specified.
Wrap a list of strings so that no single line exceeds the given width.
Insert newlines in the string so that no single line exceeds the width.
All pre-existing newlines and multiple spaces are removed.
Long words (by default >20 chars) are split instead of being wrapped. This avoids large gaps when long urls are wrapped, for example.
complex-char
)) ¶List of keywords denoting attributes.
complex-char
)) ¶List of keywords denoting attributes.
complex-char
)) ¶A keyword denoting the background color of the complex character.
complex-char
)) ¶A keyword denoting the background color of the complex character.
component
)) ¶component
)) ¶Alist of events (characters, keywords or integers) as keys and handler functions as values. Used by the run-event-loop function.
keymap
)) ¶keymap
)) ¶Alist of events and handler functions (or sub-keymaps).
When the bindings are provided not as an alist, but as an plist for convenience, convert the plist to an alist.
The plist is easier to provide when there is a large number of bindings.
extended-window
)) ¶element
)) ¶Border width, similar to padding, but with a drawn border.
Recursively calculate the missing geometry parameters for the node’s children.
column-layout
)) ¶row-layout
)) ¶Recursively calculate the geometries of layout’s children.
If initial widths are not given, evenly split the remaining parent width.
This routine can be used to calculate a layout of windows on a screen and
recalculate their geometries for example after a terminal resize.
After the initial calculation, initialize-leaves has to be called in order to initialize the window objects (and call the underlying ncurses functions).
See examples t43, t43a.
Return a string representing the char.
Control characters are displayed using the ^X notation.
Function keys are not represented by this routine. Use key-to-string instead.
window
) &key redraw target) ¶Clear the window by overwriting it with blanks.
If the keyword redraw is t, first copy blanks to every position in the
window, then set the clear-redraw-flag to have the window redrawn from
scratch on the next refresh.
If target is :end-of-line, clear the window from the cursor to the end
of the current line.
If target is :bottom, clear the window from the cursor to the end of the current line and all lines below.
element
) &key) ¶Clear the element by overwriting the underlying window with the background char.
The default background char is #space.
If the underlying window has a background char, that will be used to
clear the window instead of #space.
The char, attributes and colors can be set by providing the following styles:
:border
:selected-border
:background
:selected-background
If an element is inactive, for example the label, the selected style is not applied.
menu-window
) &key) ¶Check whether the screen has been closed without a subsequent call to refresh to reactivate it.
Return the color pair of the object as a 2-element list (fg bg).
Set the color pair of the object by setting the fgcolor and bgcolor properties.
complex-string
)) ¶complex-string
)) ¶Lisp primitive string type.
Return a new ‘complex-string’ that is the result of concatenating ‘a’ and ’b’.
If ‘color-attributes-contagion’ is non nil, ‘b’ will inherit all the attributes and color of the last element of ‘a’.
complex-string
) (b complex-string
) &key color-attributes-contagion) ¶Concatenate and return two ‘complex-strings’ ‘a’ and ‘b’.
If ‘color-attributes-contagion’ is non nil ‘b’ will inherit all the attributes and color of the last element of ‘a’.
sequence
) (b complex-string
) &key color-attributes-contagion) ¶Return a complex string that is the result of concatenating ‘a’ (string) and ‘b’ (complex-string).
If ‘color-attributes-contagion’ is non nil, ‘a’ will inherit all the
attributes and color of the first element of ‘b’.
complex-string
) (b sequence
) &key color-attributes-contagion) ¶Return a complex string that is the results of concatenating of ‘a’ (a ‘complex-string’) and ‘b’ (a string).
If ‘color-attributes-contagion’ is non nil ‘b’ will inherit all the
attributes and color of the last element of ‘a’.
Take a char and convert it to a char of result-type.
integer
) result-type) ¶character
) result-type) ¶complex-char
) result-type) ¶Return the current object from the collection.
collection
)) ¶collection
)) ¶If true, the first element is selected after the last.
Delete one or more (code . key) mappings from *key-alist*.
key
)) ¶Take a key struct, delete the mapping (code . key) from *key-alist*.
integer
)) ¶Delete the key with the given unique code from *key-alist*.
symbol
)) ¶Delete all keys with the given keyword name from *key-alist*.
Since more than one key can have the same name, becuse key structs can have different modifier slots, all the keys with the given name are deleted.
Delete the next char (the char under the cursor), without moving the cursor.
Instead of moving the cursor, the rest of the line is moved one cell to the left.
Delete the previous char, moving the cursor to the left.
simple-queue
)) ¶Pop of the first element of queue and return it, returns NIL when queue is empty.
Return a two-element list with the height and width of the object.
Take a list (height width) and an object, set its height and width.
The default method just sets the slots height and width of a widget, so call-next-method should be called for ncurses-based widgets in addition to underlying ncurses calls.
Draw objects (form, field, menu) to their associated window.
form-window
)) ¶Draw the the border and the title, then the form.
extended-window
)) ¶Draw the background window, and the title and the border if they are given.
form
)) ¶Draw the form by drawing the elements, then moving the cursor to the current element.
menu-window
)) ¶Draw the menu to position (0 0) of its window.
simple-queue
)) ¶Push a new item onto the tail of the queue, return the new item.
complex-char
)) ¶A keyword denoting the foreground color of the complex character.
complex-char
)) ¶A keyword denoting the foreground color of the complex character.
Set the frame rate of the event loop in fps (frames per second).
If the widget is a window, this sets the input-blocking duration of the window.
If the widget is not a window (for example a menu, form or element), setting
the frame rate essentially sets the input-blocking duration of its associated
window.
We have the following relation between the frame rate and the blocking duration:
If the frame rate is nil (default) or 0, input blocking is t (default).
If the frame rate is an integer below 2000, the blocking is 1000/rate miliseconds.
If the frame rate is greater or equal than 2000 fps, the blocking is nil.
Set the frame rate of a window or a widget.
A non-nil frame rate implies non-blocking delayed input.
Setting the frame rate sets the input-blocking delay of a window.
window
)) ¶Set the input blocking by setting the frame rate in fps (frames per second).
If the frame rate is nil or 0, input blocking is t.
If the frame rate is a number below 2000, the blocking delay is 1000/rate ms.
If the frame rate is greater or equal than 2000, the blocking is nil.
frame-rate blocking
nil,0 t
<2000 1000/frame-rate
>=2000 nil
If the widget is not a window, set the delay of its associated window.
If t, function keys will be recognized when returned by get-char.
If flag is t, bind function keys to known codes when returned by get-char.
If flag is nil, F keys will be system-dependent multi-character escape codes.
Return the geometry of the object as a list (y x width height).
Set the geometry (y x width height) of the object.
The default method sets the slots of the object.
Return a single user input event and its code as a second value.
If the object is not a window, the event is read from the object’s associated window.
An event can be a lisp character or a keyword representing a function or mouse key.
If input-blocking is nil for the window, return nil if no key was typed.
form-window
)) ¶window
)) ¶Return a single user input event and its code as a second value.
An event can be a lisp character or a keyword representing a function or mouse key.
If input-blocking is nil for the window, return nil if no key was typed.
Default method: Read an event from the window associated with object.
Return the height of the object.
textarea
)) ¶The height (number of visible lines) of the textarea. The area can be scrolled vertically.
symbol
)) ¶number
)) ¶string
)) ¶(eql nil)
)) ¶label
)) ¶If the label was given an explicit height, return the given height.
Otherwise calculate the height from the displayed text.
Resize the object to have the new height.
Set whether chars will be echoed on input.
textarea
)) ¶textarea
)) ¶Printing a new char will insert (t, default) it before the character under the cursor instead of overwriting it (nil).
field
)) ¶field
)) ¶Printing a new char will insert (t) it before the character under the cursor instead of overwriting it (nil, default).
collection
)) ¶The children of a collection can be accessed as items.
collection
)) ¶The children of a collection can be accessed as items.
Return a string representing the key.
The key can be a printable character, a control character or a function key.
In particular:
- A printable character becomes a string containing that character (e.g. #a -> "a");
- A control character becomes a string with the (upcased) character prefixed with the caret character (#^).
(e.g Control-j -> "^J")
- A keyword becomes a string.
Note that the key names returned by ncurses in general do not correspond to the key names used by croatoan.
KEY_LEFT vs LEFT
KEY_F(1) vs F1
kLFT5 vs CTRL-LEFT
See: https://en.wikipedia.org/wiki/Control_character#How_control_characters_map_to_keyboards
integer
)) ¶Take the integer code representing a character, return a string representing that character in ncurses/terminfo.
character
)) ¶Take a lisp character, return a string representing that character in ncurses/terminfo.
Control characters are represented in caret notation, for example ^J.
symbol
)) ¶Take a keyword representing a croatoan function key name, return the corresponding ncurses/terminfo name as a string.
component
)) ¶component
)) ¶Keymap containing the key bindings to be used by run-event-loop instead
of the object’s own bindings. If using an instance-local binding isn’t
sufficient, we can create an external keymap and reference it in the object.
Mark a window for a later refresh.
Copy a window to the virtual screen, but do not display it on the
visible physical screen.
After all windows are marked, call refresh-marked to display all
marked refreshes.
refresh = mark + refresh-marked
The goal of this batch refresh is improved efficiency and preventing flicker that might occur if several refreshes are called in sequence.
panel
) &rest args) ¶Refreshing a panel also refreshes its shadow and border, if existing.
pad
) &rest args) ¶A pad requires 6 additional arguments to be refreshed.
The additional arguments are required to specify which part of the pad
should be displayed and on which position on the screen.
All 6 arguments have to be given, otherwise an error is signalled. We don’t have default arguments.
menu
)) ¶menu
)) ¶If the variable column width is nil, this is the default width of all items.
If the variable column width is t, the width of every column is calculated from the item titles and the columns exceeding max item length are ellipsized or truncated.
Move the current grid position one cell downwards.
Move the current grid position one cell to the left.
Move the cursor to the next char.
Move the cursor to the previous character.
textarea
)) ¶Move the cursor to the previous char in the textarea.
field
)) ¶Move the cursor to the previous char in the field.
The default method does nothing.
Move the current grid position one cell to the right.
Move the current grid position one cell upwards.
If status is t, enable translation of RET to NL on input, and NL to RET and LF on output.
It is enabled by default.
node
)) ¶node
)) ¶Pointer to the parent object.
Return the x position (column) of the top left corner of the widget.
sub-window
)) ¶Set the x position (column) of the top left corner of the widget.
Return the y position (row) of the top left corner of the widget.
sub-window
)) ¶Set the y position (row) of the top left corner of the widget.
Redisplay the object after changes have been made to it.
Copy the object to the virtual screen, then updates the visible physical screen by the contents of the virtual screen.
pad
) &rest args) ¶A pad requires 6 additional arguments to be refreshed.
The additional arguments are required to specify which part of the pad
should be displayed and on which position on the screen.
The top-left corner of the rectangular area of the pad to be displayed.
1. pad-min-y
2. pad-min-x
The top-left and bottom-right corner of the screen where the pad should
be displayed.
3. screen-min-y
4. screen-min-x
5. screen-max-y
6. screen-max-y
All 6 arguments have to be given, otherwise an error is signalled. There are no default arguments.
window
) &rest args) ¶Redisplay the window after changes have been made to it.
Copies a window to the virtual screen, then updates the visible
physical screen by the contents of the virtual screen.
Only updates the changed parts of the window. In order to redraw the whole window, it has to be explicitely touched or marked for redraw.
A window does not require any additional arguments to be refreshed. Any provided additional arguments are ignored.
collection
) &optional number) ¶Remove the item given by its number from the collection list.
If the item number is not given, remove the current element.
Current number is decreased when we remove an item before the current or when we remove the last item, when it is current.
Clear user-editable form elements and reset its internal buffers and pointers.
If t, scrolling is enabled.
Enables and disables window scrolling.
If flag is t, when the curses moves below the bottom line of a window
or scrolling region, the window/region is scrolled.
If flag is nil, the cursor is left on the bottom line.
menu-window
)) ¶Display the menu, let the user select an item, return the selected item.
If the selected item is a menu object, recursively display the sub menu.
Select the first item in the collection.
Select the last item in the collection.
Select the next item in the collection.
Select the previous item in the collection.
collection
)) ¶collection
)) ¶Function called when a new item is selected.
complex-char
)) ¶complex-char
)) ¶Lisp primitive character type, like #a.
Set the position of the parent window that will be mirrored in the sub-window.
By default it is identical to the position of the sub-window.
sub-window
)) ¶element
)) ¶If the element’s style slot is empty, check whether a default style has been defined in the parent form.
component
)) ¶A style is a plist with properties relevant to the rendering of an object.
The basic style corresponds to the slots of a complex-char:
:fgcolor, :bgcolor, :attributes and :simple-char
Currently, the compound styles for the following objects can be set:
form:
A plist of default styles for each form element type.
menu (styles of the menu items)
:foreground, :background, :selected-foreground, :selected-background
The default style of the selected item is the attribute :reverse,
and nil for other items.
button, checkbox:
:foreground and :selected-foreground.
field, textarea:
:foreground, :background, :selected-foreground, :selected-background.
extended-window
)) ¶component
)) ¶A style is a plist with properties relevant to the rendering of an object.
The basic style corresponds to the slots of a complex-char:
:fgcolor, :bgcolor, :attributes and :simple-char
Currently, the compound styles for the following objects can be set:
form:
A plist of default styles for each form element type.
menu (styles of the menu items)
:foreground, :background, :selected-foreground, :selected-background
The default style of the selected item is the attribute :reverse,
and nil for other items.
button, checkbox:
:foreground and :selected-foreground.
field, textarea:
:foreground, :background, :selected-foreground, :selected-background.
extended-window
)) ¶Subwindow for content, for example a menu or a form.
If object length is bigger than ‘len’, cut the last characters out.
Also replaces the last n characters (where n is the length of ‘truncate-string’) of the shortened string with ‘truncate-string’.
It defaults to ..., but can be nil or the empty string.
complex-string
) len &key truncate-string) ¶string
) len &key truncate-string) ¶Prepend a number of copies of ‘padding-char’ to ‘object’ so that the latter has a length equals to ‘total-size’
complex-string
) (total-size number
) &key padding-char) ¶string
) (total-size number
) &key padding-char) ¶Returns a sub-sequence of ‘object’ starting from ‘start‘ and terminating at ‘end’.
If end in nil the the sub sequence ends alt the last element of the sequence.
complex-string
) start &optional end) ¶string
) start &optional end) ¶Returns the length (in characters units) of a complex string passed as argument ‘complex-string’.
complex-string
)) ¶string
)) ¶Touching a window marks all its cells as changed.
This makes the next call to refresh rewrite whe whole window instead
of only the cells that have actually been changed.
The combination of touch and refresh is required to raise overlapping windows.
textarea
)) ¶If the buffer is empty, return nil, otherwise return the buffer as a string.
field
)) ¶If the field buffer is empty, return nil, otherwise return the buffer as a string.
Return the position (y x) of the top left corner of the widget.
sub-window
)) ¶The default method returns the values of the y and x slots in a two-element list.
If both y and x slots are nil, nil is returned instead of (nil nil).
Set the position (y x) of the top left corner of the widget.
The default method sets the values of the y and x slots from a two-element list.
If position is nil, both y and x are set to nil.
Return the width of the object.
textarea
)) ¶The width (number of columns) of the textarea. The area can not be scrolled horizontally.
Lines exceeding the width are soft-wrapped to the next line.
(This corresponds to the emacs behavior when truncate-lines is set to nil.)
field
)) ¶The width of the field. The default buffer length is equal the width.
menu
)) ¶content width = column-widths + item marks + item padding + checkbox
symbol
)) ¶number
)) ¶string
)) ¶(eql nil)
)) ¶Resize the object to have the new width.
textarea
)) ¶The width (number of columns) of the textarea. The area can not be scrolled horizontally.
Lines exceeding the width are soft-wrapped to the next line.
(This corresponds to the emacs behavior when truncate-lines is set to nil.)
field
)) ¶The width of the field. The default buffer length is equal the width.
The default method sets the width slot of the object.
element
)) ¶Return the window associated with an element, which can optionally be part of a form.
If there is no window asociated with the element, return the window associated with the parent form.
Deprecated but kept for backward compatibility, use the inherited widget-position instead.
menu-window
) &key abort) ¶sub-window
) &key abort) ¶form-window
) &key abort) ¶extended-window
) &key abort) ¶simple-queue
) &key) ¶msgbox
) &rest initargs &key message buttons wrap-message) ¶complex-char
) &key color-pair) ¶If color-pair is passed as a keyword, set fgcolor and bgcolor.
menu-window
) &key color-pair) ¶collection
) &key items) ¶sub-window
) &key) ¶grid
) &key grid-position grid-dimensions grid-geometry region-dimensions) ¶form-window
) &key) ¶complex-string
) &key string attributes fgcolor bgcolor color-pair) ¶extended-window
) &key) ¶checklist
) &rest initargs &key message buttons wrap-message choices) ¶menubox
) &rest initargs &key message buttons wrap-message choices) ¶inputbox
) &rest initargs &key message buttons wrap-message fields) ¶complex-char
) &optional environment) ¶Describe how complex-char objects can be serialized and loaded by the compiler.
complex-char
) stream) ¶complex-char
) (stream window
)) ¶complex-string
) (stream window
)) ¶complex-string
) stream) ¶window
) (ch complex-char
)) ¶sb-gray
.
error
.
The form that failed to execute
(quote (error "form required"))
:form
The error that was signaled when form was executed
common-lisp
.
(quote (error "error required"))
:error
Stuct representing a function key or a mouse button with modifier keys.
A key struct is associated with an escape sequence which is parsed by ncurses
and returned from getch or get_wch as an integer code.
Every combination of a key name and the modifiers is represented by a separate
code.
Supported modifiers are ctrl (C), alt (M) and shift (S).
In bindings, emacs notation is used to specify the keys which are then parsed
to structs, for example C-S-M-<left>, C-<button-1-click>.
Also see: ‘bind’.
An element that can call a function by pressing enter (or in future, with a mouse click).
Initarg | Value |
---|---|
:keymap | (quote button-map) |
Callback function called when the button is activated.
(or null symbol function)
:callback
A boolean element that can be checked (t) or unchecked (nil)
Initarg | Value |
---|---|
:keymap | (quote checkbox-map) |
t if the checkbox has been checked, nil if it hasn’t.
boolean
:checked
A checklist is a multi-selection menu with checkable items.
menu
.
Initarg | Value |
---|---|
:menu-type | checklist |
:keymap | (quote checklist-map) |
A collection is a list keeping track of the currently selected item.
Methods on collection objects allow selecting the previous item, next item, etc. The main use is keeping track of the currently selected element in a form or a layout.
node
.
Number (row major mode) of the currently selected item, nil if the list is empty.
(or null integer)
Function called when a new item is selected.
(or null symbol function)
:selection-callback
If true, the first element is selected after the last.
boolean
:cyclic
A container of widgets organized in one column.
Initarg | Value |
---|---|
:grid-columns | 1 |
A complex char consists of a simple char, a list of attribute keywords and a pair of color keywords.
Lisp primitive character type, like #a.
(or null integer character keyword)
:simple-char
List of keywords denoting attributes.
(or null cons)
(quote nil)
:attributes
A keyword denoting the foreground color of the complex character.
(or null keyword integer list)
:fgcolor
A keyword denoting the background color of the complex character.
(or null keyword integer list)
:bgcolor
A complex string consists of an array of complex characters.
Lisp primitive string type.
vector
(make-array 0 :element-type (quote de.anvi.croatoan:complex-char) :fill-pointer 0 :adjustable t)
:complex-char-array
A drop-down menu is a button that calls a menu-window when activated.
The selected item becomes the new title of the button and the value of the widget.
Initarg | Value |
---|---|
:keymap | (quote dropdown-map) |
A string displayed as a prompt before an item is selected.
string
"select..."
And event represents characters, function keys, mouse buttons and terminal resize events.
Lisp character representing a character key or key struct representing a function key or mouse button.
(or null integer keyword character de.anvi.croatoan:key)
:key
This slot is read-only.
Integer code representing the character or function key as returned by ncurses:getch or get_wch.
(or null integer)
:code
This slot is read-only.
A field is an editable part of the screen for user input. Can be part of a form.
(setf buffer)
.
buffer
.
delete-next-char
.
delete-previous-char
.
(setf display-pointer)
.
display-pointer
.
draw
.
height
.
initialize-instance
.
(setf input-pointer)
.
input-pointer
.
(setf insert-mode-p)
.
insert-mode-p
.
(setf max-buffer-length)
.
max-buffer-length
.
move-next-char
.
move-previous-char
.
reset
.
update-cursor-position
.
(setf value)
.
value
.
(setf width)
.
width
.
Initarg | Value |
---|---|
:keymap | (quote field-map) |
The width of the field. The default buffer length is equal the width.
(or null integer)
:width
Printing a new char will insert (t) it before the character under the cursor instead of overwriting it (nil, default).
boolean
:insert-mode
List containing the characters in the field.
(or null list)
Max length of the field buffer. If nil, it will be initialized to field width. Horizontal scrolling is then disabled.
(or null integer)
:max-buffer-length
Position in the input buffer from which n=width characters are displayed.
When max-buffer-length is greater than width, display-pointer can be greater than zero.
Horizontal scrolling is then enabled.
(or null integer)
0
The position in the input buffer to which the next character will be written.
integer
0
A form is a collection of elements like fields, textareas, checkboxes, menus and buttons.
Initarg | Value |
---|---|
:keymap | (quote form-map) |
:cyclic | t |
The elements of a form can be passed in a layout object.
(or null de.anvi.croatoan:layout)
:layout
Window created separately and then associated with the form.
(or null de.anvi.croatoan:window)
:window
A form window is an extended window displaying a form.
Utility to track the display of items in a scrollable mxn grid, like a layout or a menu.
integer
0
:grid-row
integer
0
:grid-column
(or null integer)
:grid-rows
(or null integer)
:grid-columns
boolean
:cyclic
boolean
:enable-scrolling
(or null integer)
:region-start-row
(or null integer)
:region-start-column
(or null integer)
:region-rows
(or null integer)
:region-columns
An input box provides one or more input fields and buttons to accept or cancel the input.
Initarg | Value |
---|---|
:buttons | (quote ((ok . t) (cancel))) |
:fields | (quote (input)) |
A keymap contains an alist of events as keys and event handlers or chained keymaps as values.
Alist of events and handler functions (or sub-keymaps).
When the bindings are provided not as an alist, but as an plist for convenience, convert the plist to an alist.
The plist is easier to provide when there is a large number of bindings.
(or null cons)
:bindings
Parent keymaps given as a symbol name or keymap object.
(or null de.anvi.croatoan:keymap)
:parent
A single-line string displayed at the specified position.
If the name of a reference element is specified, the element’s title will be displayed instead of the label’s. If a title for the label is explicitely provided, it overrides the title of the reference element.
(or null symbol keyword string)
:reference
The width of the label.
(or null integer)
:width
Labels are by default not active and can not be selected when cycling through the elements.
A layout is a container widget containing items positioned in a grid. Layouts can be nested.
collection
.
grid
.
widget
.
Gap between rows in a grid.
integer
0
:grid-row-gap
Gap between columns in a grid.
integer
0
:grid-column-gap
A menu is a list of items displayed in a grid that can be selected by the user.
Item types can be strings, symbols, numbers, other menus or callback functions.
clear
.
content-position
.
current-item-mark
.
(setf current-item-position)
.
current-item-position
.
draw
.
draw-stack-p
.
external-height
.
external-width
.
height
.
initialize-instance
.
(setf max-item-length)
.
max-item-length
.
(setf menu-type)
.
menu-type
.
move-down
.
move-left
.
move-right
.
move-up
.
select
.
tablep
.
update-cursor-position
.
value
.
variable-column-width-p
.
visible-height
.
visible-width
.
width
.
Initarg | Value |
---|---|
:keymap | (quote menu-map) |
Types of menus: :selection (default) or :checklist.
keyword
:selection
:menu-type
Position (y x) of the current item in the window.
This can be used to position the cursor on the current item after the menu is drawn.
(or null cons)
:current-item-position
A string prefixed to the current item in the menu.
(or string cons)
""
:current-item-mark
This slot is read-only.
If t, table row and column lines are drawn between the items.
boolean
:table
This slot is read-only.
Additional space added to the top of the item title, with the same background style.
integer
0
:item-padding-top
Additional space added below the item title, with the same background style.
integer
0
:item-padding-bottom
Additional space added to the left of the item title, with the same background style.
integer
0
:item-padding-left
Additional space added to the right of the item title, with the same background style.
integer
0
:item-padding-right
If t, columns widths are calculated from the items.
If nil (default), use max-item-length as the width for every column.
boolean
:variable-column-width
This slot is read-only.
Set how the item titles and thus the menu columns are aligned.
Items can be aligned if they are shorter than the max-item-length or
the calculated column width.
Possible values are :left (default) or :right.
keyword
:left
:align
Redraw all menus in the stack when a submenu is quit/entered, so we see the whole stack.
If nil, only one direct parent/child is redrawn, so we move through the stack one by one.
At the moment, this setting applies only to stacks of simple (non-window) menus).
boolean
t
:draw-stack
This slot is read-only.
If the variable column width is nil, this is the default width of all items.
If the variable column width is t, the width of every column is calculated from the item titles and the columns exceeding max item length are ellipsized or truncated.
integer
15
:max-item-length
Ellipsis/truncation string for too long item titles.
If an item title is longer than max-item-length shorten the title by
replacing the last characters with the ellipsis string.
If the ellipsis is an empty string, the title will simply be truncated.
The default value is the unicode ellipsis character (of length 1), #horizontal_ellipsis (code point #x2026).
string
"…"
:ellipsis
If nil (default) the selected item will be reset when exited.
boolean
:save-selected-item
A menu contains of a list of menu items.
The value of an item can be a string, a number, a sub menu or a function to be called when the item is selected.
(or symbol keyword string de.anvi.croatoan:menu de.anvi.croatoan:menu-window function number)
A menu-window is a window displaying a menu.
Initarg | Value |
---|---|
:keymap | (quote menu-window-map) |
The class represents the ncurses MEVENT struct as returned by getmouse.
A message box displays a (wrapped) message and one default OK button.
The message is wrapped by default, but the wrapping can be disabled to
display a pre-formatted text, for example.
The title of the activated button is returned, or its value, if provided.
Initarg | Value |
---|---|
:buttons | (quote ((ok . t))) |
Base class for objects that can be organized in a tree, like layouts.
A pad is a window without a specified position on screen, which is specified dynamically during refresh.
A panel is a window displaying the main content decorated by a background window for
the border, title and other decorations and a second window providing a shadow.
The border and the shadow are displayed outside of the content window, so they change the absolute position and dimensions of the panel.
integer
1
:border-width
A border window for decorations like title, border, scroll bar.
(or null de.anvi.croatoan:window)
Draw (t) or don’t draw (nil, default) a shadow behind the panel.
boolean
:shadow
A window to provide the shadow.
(or null de.anvi.croatoan:window)
A thread-safe FIFO queue.
A container of widgets organized in one column.
Initarg | Value |
---|---|
:grid-rows | 1 |
Represents the main window created upon screen initialisation.
Enable (t) or disable (nil) display of colors, if the terminal supports it.
boolean
:enable-colors
Use (t) colors set by the terminal (named :terminal) as the default instead of the ncurses default white on black.
boolean
:use-terminal-colors
Enable (t) or disable (nil) the display of a visible cursor.
boolean
t
:cursor-visible
Enable (t) or disable (nil) echoing of chars during keyboard input.
boolean
t
:input-echoing
Set whether typed characters will be returned immediately when they are typed (nil, default) or buffered until Return is typed (t).
boolean
:input-buffering
If input-buffering is nil, set whether some control characters like ^C, ^S, ^Q, ^D will be processed (t, default)
or passed directly to the program (nil).
When input-buffering is t, control chars are always processed and this option has no effect.
boolean
t
:process-control-chars
If t (default), the #return character (CR ^M r) is automatically translated to newline (NL) on input,
and NL is translated to CR LF on output.
NL is the standard, system independent, portable way to end a line.
It can be either #linefeed (LF ^J n) on Linux, carriage #return on MacOS, CRLF rn on Windows.
Setting newline translation to nil is necessary to be able to detect the #return key.
boolean
t
:enable-newline-translation
Use the bottom line of the terminal to display short descriptions
of the function keys F1-F12.
The default label layout is 4-4-4, which means 12 labels of 5 characters, 4 on the left, 4 in the center, 4 on the right.
boolean
:enable-soft-labels
keyword
:mode-4-4-4
:soft-labels-layout
Check whether the screen has been closed, without a subsequent call to refresh to reactivate it.
boolean
A shape is a list of coordinates, relative to an origin, that can be plotted in a window.
The x coordinate of this shape’s point of origin.
integer
0
:x0
The y coordinate of this shape’s point of origin.
integer
0
:y0
A list of coordinates relative to the origin that form this shape.
(or null cons)
The character to use for plotting.
(or null character keyword de.anvi.croatoan:complex-char)
(make-instance (quote de.anvi.croatoan:complex-char) :simple-char #\x :color-pair (quote (:white :black)) :attributes nil)
:char
A simple FIFO queue (not thread-safe).
Stack implementation of ncurses panels, allows management of overlapping windows.
List containing the items.
(or null cons)
:items
A sub-pad shares the memory and the display with a parent pad and has to be contained within it.
A sub-window shares the memory and the display with and has to be contained within a parent window.
The parent window which will contain the sub-window.
(or null de.anvi.croatoan:window)
:parent
The position of the sub-window is relative to the parent window (t) or to the screen (nil, default).
boolean
:relative
Position (y x) of the area of the parent window, which is mapped to the subwindow. By default it is identical to the position of the subwindow.
(or null cons)
:source-position
A textarea is a multiline field for display and editing of texts including newlines.
For now, control characters other than newline are not interpreted.
The main difference to a window is the ability to scroll the buffer.
(setf buffer)
.
buffer
.
(setf cursor-position-x)
.
cursor-position-x
.
(setf cursor-position-y)
.
cursor-position-y
.
delete-next-char
.
delete-previous-char
.
(setf display-pointer)
.
display-pointer
.
draw
.
(setf height)
.
height
.
(setf input-pointer)
.
input-pointer
.
(setf insert-mode-p)
.
insert-mode-p
.
move-next-char
.
move-previous-char
.
reset
.
update-cursor-position
.
(setf value)
.
value
.
(setf width)
.
width
.
Initarg | Value |
---|---|
:keymap | (quote textarea-map) |
The width (number of columns) of the textarea. The area can not be scrolled horizontally.
Lines exceeding the width are soft-wrapped to the next line.
(This corresponds to the emacs behavior when truncate-lines is set to nil.)
(or null integer)
:width
The height (number of visible lines) of the textarea. The area can be scrolled vertically.
(or null integer)
:height
Printing a new char will insert (t, default) it before the character under the cursor instead of overwriting it (nil).
boolean
t
:insert-mode
List containing the characters of the textarea.
(or null list)
:buffer
When the area contains more lines than can be shown on screen because they exceed the given height, this points to the first line that is displayed.
(or null integer)
0
The row-major index in the input buffer to which the next character will be written. Can not be greater than the row-major length of the current buffer content.
(or null integer)
0
Y position (row) in the textarea window where the next character will be added.
(or null integer)
0
X position (column) in the textarea window where the next character will be added.
(or null integer)
0
A widget is a visible component defined by its dimensions (h w) and displayed
at a given position (y x).
It represents a visible region on the screen, either a window, or a form element like a button or input field.
The y coordinate (row) of the top left corner.
integer
0
:y
The x coordinate (column) of the top left corner.
integer
0
:x
The width (second, horizontal, x dimension), number of columns.
(or null integer)
:width
The height (first, vertical, y dimension), number of rows.
(or null integer)
:height
Internal variable to hold the initial dimension hint for layouts whose geometry
is recalculated.
It can be either a width or height, which is interpreted by whether it is part of a row or column layout.
(or null integer)
:initial-dimension-hint
A curses window object as returned by newwin.
fundamental-character-input-stream
.
fundamental-character-output-stream
.
widget
.
(setf attributes)
.
attributes
.
(setf background)
.
background
.
(setf bgcolor)
.
bgcolor
.
borderp
.
clear
.
close
.
(setf color-pair)
.
(setf cursor-position)
.
cursor-position
.
(setf cursor-position-x)
.
cursor-position-x
.
(setf cursor-position-y)
.
cursor-position-y
.
(setf dimensions)
.
(setf fgcolor)
.
fgcolor
.
format-title
.
(setf frame-rate)
.
frame-rate
.
(setf function-keys-enabled-p)
.
function-keys-enabled-p
.
(setf geometry)
.
geometry
.
get-wide-event
.
(setf height)
.
height
.
initialize-instance
.
initialize-instance
.
(setf input-blocking)
.
input-blocking
.
(setf insert-mode-p)
.
insert-mode-p
.
mark-for-refresh
.
(setf position-x)
.
position-x
.
(setf position-y)
.
position-y
.
print-object
.
print-object
.
print-object
.
print-object
.
refresh
.
(setf scrolling-enabled-p)
.
scrolling-enabled-p
.
(setf scrolling-region)
.
scrolling-region
.
(setf stackedp)
.
stackedp
.
stream-line-column
.
stream-read-char
.
stream-unread-char
.
stream-write-char
.
stream-write-char
.
(setf style)
.
touch
.
(setf visiblep)
.
visiblep
.
(setf widget-position)
.
widget-position
.
(setf width)
.
width
.
(setf window-position)
.
window-position
.
winptr
.
The current cursor position coordinates in the form (y x).
cons
(quote (0 0))
Input mode: blocking (t), non-blocking (nil) or blocking duration in (positive integer) miliseconds.
(or boolean integer)
t
:input-blocking
Enable (t) or disable (nil) support for function keys.
boolean
:enable-function-keys
Enable (t) or disable (nil) support for window scrolling.
boolean
:enable-scrolling
When scrolling is enabled, only scroll the window region from line y1 to y2 given as the list (y1 y2).
(or null cons)
:scrolling-region
Printing a new char will insert (t) it before the character under the cursor instead of overwriting it (nil, default).
boolean
:insert-mode
Sets a complex char with its attributes and colors as the default style of unrendered text and empty cells of the window.
Complex chars with pre-existing attributes and colors are not changed.
If the background char with attributes is set after the foreground attributes, the background attributes override the foreground attributes. To prevent this, set the background char with attributes before the foreground attributes.
(or null de.anvi.croatoan:complex-char)
:background
A list of keywords denoting attributes of new characters added to a window.
(or null cons)
:attributes
A keyword denoting the foreground color of new characters added to the window.
(or null keyword integer list)
:fgcolor
A keyword denoting the background color of new characters added to the window.
(or null keyword integer list)
:bgcolor
Draw (t) or don’t draw (nil, default) an initial border around a window. Not redrawn automatically.
boolean
:border
This slot is read-only.
If stacked is t, the window is added to the global window stack, so overlapping windows can be refreshed in the stacking order.
boolean
:stacked
If visible is nil, do not refresh the stacked window when refreshing the window stack.
boolean
t
:visible
A queue of functions (consed to their form for debugging purposes) to be processed by the main thread to interface with ncurses.
An alist of available keymaps.
Take a keymap and populate it with key-value pairs given in the body.
Helper macro for ’key-name-to-code’ and ’key-code-to-name’.
Add a single attribute to the rendition of soft labels.
The labels maybe have to be touched for attribute changes to take effect.
Check if common extended function keys are supported by the terminal.
In most cases these extended keys are existing function keys with
additional modifiers.
If the keys are supported, add them to the key alist, so they can be returned as valid events.
Check if a terminal supports an extended function key capability and add it to key-alist.
Draw a title to the first line of a window.
Usually, this will be an extended-window with a border and the title on the top border.
When title is t instead of a title string, display the symbol name of the widget.
Take an alist ((k1 . v1) (k2 . v2)), return a plist (k1 v1 kv v2).
Determine and pass the correct arguments to each event handler.
The number of the arguments passed to the handler the arity (number of
required arguments) of the handler function.
This allows handlers with the following lambda lists to be defined:
(lambda () ...)
(lambda (object) ...)
(lambda (object event) ...)
Return t if octet is a single-byte 7-bit ASCII char.
The most significant bit is 0, so the allowed pattern is 0xxx xxxx.
Merge alists then return an alist with duplicate entries removed.
Return a copy of alist with duplicate entries (keys) removed.
Only the first (newest) unique key is kept, others are discarded.
Take a bitmask and an alist, return a list of keys with bits matching the mask.
The bitmask should be a 32bit integer.
The values in alist should be 32bit integers with only one single bit switched on.
Take a complex char, return a plist of its properties.
Take a character in different forms, return a chtype containing that character.
If char is a string convert it to a character.
Take a menu, return a list of checked menu items.
Converts a ncurses chtype to croatoan complex-char.
Take an integer 0-255 denoting a gray color intensity, return the closest gray from the xterm palette.
Take a list of plists or objects, return a list of their initial heights.
Take a list of plists or objects, return a list of their initial widths.
The initial widths can be given directly in the initial plist.
Is is then passed as an initial-dimension-hint to the later object.
The list of initial width hints is used by split-size in calculate-layout
to calculate the widths which are still nil.
The call to initialize-leaves makes objects from the plists.
The initial-dimension-hint is then used by subsequent calls to calculate layout to recalculate all widths.
Convert the ncurses color intensity 0-1000 to the 8bit range 0-255.
Convert the 8bit range 0-255 to the ncurses color intensity 0-1000.
Take a keyword denoting a color name, return the color number.
Takes a color in various notations, converts that notation to the exact or most appropriate color number.
Take a list of a color pair, return a chtype with the color attribute set.
If either the foreground or background color is nil, complete the pair for the given window.
Return the completed pair.
Try to complete the missing colors in the following order:
1. window color pair.
2. window background character color pair.
3. ncurses default color pair 0 (white on black or the terminal default color pair).
If both colors are missing, they are substituted in the following order:
1. window color pair.
2. ncurses default color pair 0 (white on black or the terminal default color pair).
Returns the attributes of the first character of ‘complex-string’ as three values: attributes, background color and foreground color.
Returns the attributes of the last character of ‘complex-string’ as three values: attributes, background color and foreground color
Concatenate two ‘complex-strings’: the args ‘b’ does not inherit the color and attributes of ‘a’.
Concatenate two ‘complex-strings’.
The args ‘string-2’ does not inherit the color and attributes of ‘string-1’.
Loop over a bindings plist, convert strings to characters.
Make a (non deep) copy of ‘complex-char’ array ‘a’
Take a string, return the number of lines it will need to be displayed without wrapping.
It is basically the number of newline characters plus one.
Return the number of lines from the cursor position to the bottom of the window.
Return the number of columns from the cursor position to the end of the line in the window.
Draw the top line of a table at the current position using ANSI drawing characters.
The bottom line is only drawn when border is t.
Draw the horizontal line between table cells.
Draw the top line of a table at the current position using ANSI drawing characters.
The top line is only drawn when border is t.
Take a menu and return item item-number as a properly formatted string.
If the menu is a checklist, return [ ] or [X] at the first position.
If a mark is set for the current item, display the mark at the second position.
Display the same number of spaces for other items.
At the third position, display the item given by item-number.
Call function fn to read a cchar_t from window and return it as a wide complex char.