commander-s/scheme/nuit-packages.scm

370 lines
6.8 KiB
Scheme
Raw Normal View History

;;; utilities
(define-interface handle-fatal-error-interface
(export with-fatal-error-handler*
(with-fatal-error-handler :syntax)))
(define-structure handle-fatal-error handle-fatal-error-interface
(open scheme conditions handle)
(files handle-fatal-error))
;;; history data structure
(define-interface history-interface
(export make-empty-history
history?
entry?
entry-data
append-history-item!
insert-history-item!
history-next-entry
history-prev-entry
history-first-entry
history-last-entry))
(define-structure history history-interface
(open scheme
define-record-types)
(files history))
;;; layout utilities
(define-interface layout-interface
(export seperate-line
layout-result-standard
get-marked-positions-1
get-marked-positions-2
get-marked-positions-3
exp->string
sublist
2005-05-31 15:31:38 -04:00
fill-up-string
cut-to-size
;; old drawing cruft
make-result-buffer
result-buffer?
result-buffer-line
set-result-buffer-line!
result-buffer-column
set-result-buffer-column!
result-buffer-y
set-result-buffer-y!
result-buffer-x
set-result-buffer-x!
result-buffer-num-lines
set-result-buffer-num-lines!
result-buffer-num-cols
set-result-buffer-num-cols!
result-buffer-highlighted
set-result-buffer-highlighted!
result-buffer-marked
set-result-buffer-marked!
make-simple-result-buffer-printer))
(define-structure layout layout-interface
(open scheme
srfi-6 ;; basic string ports
define-record-types
tty-debug
ncurses)
(files layout))
;;; process viewer plugin
(define-structure process-viewer
(export)
(open scheme
define-record-types
srfi-1
srfi-13
formats
signals
2005-05-31 15:31:38 -04:00
ncurses
pps
plugin
layout
select-list
tty-debug)
(files process))
2005-05-31 10:54:04 -04:00
;;; user/group viewer plugin
(define-structure user-group-info-plugin (export)
(open scheme-with-scsh
define-record-types
(subset primitives (record-ref record?))
dirlist-view-plugin
fs-object
2005-05-31 10:54:04 -04:00
plugin
layout
select-list
tty-debug)
(files user-group-info))
;;; file list view plugin
(define-structure dirlist-view-plugin (export make-browser-for-dir
make-fsobjects-viewer)
(open (modify nuit-eval (hide string-copy))
srfi-1
(subset srfi-13
(string-copy string-drop string-join
string-drop-right string-prefix-length))
signals
2005-05-31 10:54:48 -04:00
let-opt
2005-06-01 06:04:21 -04:00
focus-table
2005-05-31 04:01:06 -04:00
objects
layout
fs-object
select-list
plugin
ncurses
tty-debug)
(files browse-directory-list))
;;; standard command plugin
(define-structure standard-command-plugin
(export standard-command-plugin show-shell-screen)
2005-05-27 13:01:14 -04:00
(open let-opt
signals
srfi-1
srfi-13
fs-object
pps
2005-05-27 13:01:14 -04:00
nuit-eval
ncurses
2005-05-27 13:01:14 -04:00
tty-debug
plugin)
(files std-command))
(define-structure standard-viewer
(export make-standard-viewer)
(open scheme
2005-05-31 10:54:04 -04:00
tty-debug
objects
layout)
(files std-viewer))
;;; fs-objects
(define-interface fs-object-interface
(export make-fs-object
fs-object?
fs-object-name
fs-object-path
fs-object-info
fs-object-complete-path
combine-path
file-name->fs-object))
(define-structure fs-object fs-object-interface
(open scheme-with-scsh
formats
handle-fatal-error
define-record-types)
(files fs-object))
;;; browse list stuff
(define-interface select-list-interface
(export make-select-list
select-list?
make-unmarked-element
make-marked-element
element?
select-list-handle-key-press
unmark-current-line
mark-current-line
move-cursor-up
move-cursor-down
paint-selection-list
paint-selection-list-at
select-list-get-selection
select-list-selected-entry
select-list-navigation-key?
select-list-marking-key?))
(define-structure select-list select-list-interface
(open scheme
srfi-1
define-record-types
signals
tty-debug
plugin
layout
ncurses)
(files select-list))
;;; inspector
(define-interface nuit-inspector-interface
(export inspect-value))
(define-structure nuit-inspector-plugin nuit-inspector-interface
(open scheme
inspector-internal
continuations
formats
define-record-types
2005-05-25 11:18:26 -04:00
srfi-1
srfi-6
display-conditions
signals
2005-05-25 11:18:26 -04:00
ncurses
layout
select-list
tty-debug
plugin)
(files inspector))
;;; nuit evaluates the expressions entered into command buffer in this
;;; package
(define-structures
((nuit-eval (compound-interface
(interface-of scheme-with-scsh)
(export focus-value)))
(nuit-eval/focus-table (export focus-table)))
(open
(modify scheme-with-scsh
(rename (directory-files scsh-directory-files)))
let-opt
srfi-1
focus-table
fs-object
pps)
(files eval))
;;; nuit plug-in registration
(define-interface plugin-interface
(export make-view-plugin
view-plugin?
view-plugin-constructor
view-plugin-type-predicate
make-command-plugin
command-plugin?
command-plugin-command
command-plugin-completer
command-plugin-evaluater
register-plugin!))
(define-interface plugin-host-interface
(export command-plugin-list
view-plugin-list
command-completions))
(define-structures
((plugin plugin-interface)
(plugin-host plugin-host-interface))
(open scheme
define-record-types
let-opt
signals
completion-sets)
(files plugins))
;;; objects
(define-interface objects-interface
(export send))
(define-structure objects objects-interface
(open scheme
signals)
(files objects))
2005-05-27 13:01:14 -04:00
;;; focus table
2005-06-01 06:04:21 -04:00
(define-interface focus-table-interface
(export make-empty-focus-table
add-focus-object
get-focus-object))
2005-05-27 13:01:14 -04:00
2005-06-01 06:04:21 -04:00
(define-structure focus-table focus-table-interface
(open scheme
define-record-types
tables)
(files focus))
;;; completion-sets
(define-interface completion-set-interface
(export make-empty-completion-set
make-completion-set
adjoin-completion-set
make-completion-set-for-executables
completions-for
completions-for-executables))
(define-structure completion-sets completion-set-interface
(open scheme-with-scsh
2005-05-27 13:01:14 -04:00
define-record-types
srfi-1
thread-fluids)
(files complete))
2005-05-27 13:01:14 -04:00
;;; nuit
2004-09-14 07:54:00 -04:00
(define-interface nuit-interface
2004-10-10 09:22:25 -04:00
(export nuit))
2004-09-14 07:54:00 -04:00
(define-structure nuit nuit-interface
(open scheme-with-scsh
external-calls
define-record-types
conditions
2005-05-30 11:20:39 -04:00
threads
locks
2004-09-14 07:54:00 -04:00
signals
handle
rt-modules
2005-05-30 05:31:47 -04:00
(modify ncurses (hide filter))
srfi-1
srfi-6
srfi-13
2005-05-18 11:25:16 -04:00
debugging
inspect-exception
2005-05-18 11:25:16 -04:00
rt-modules
tty-debug
2005-06-01 06:04:21 -04:00
focus-table
nuit-eval/focus-table
fs-object
objects
plugin
plugin-host
layout
pps
history
handle-fatal-error
completion-sets
select-list
;; the following modules are plugins
dirlist-view-plugin
2005-05-31 10:54:04 -04:00
user-group-info-plugin
process-viewer
standard-command-plugin
standard-viewer
nuit-inspector-plugin)
(files nuit-engine))