commander-s/scheme/nuit-packages.scm

288 lines
5.3 KiB
Scheme

;;; 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
;; 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-view-plugin
(export)
(open scheme
define-record-types
srfi-1
srfi-13
formats
pps
plugin
layout
select-list
tty-debug)
(files process))
;;; file list view plugin
(define-structure dirlist-view-plugin
(export)
(open (modify nuit-eval (hide string-copy))
define-record-types
srfi-1
(subset srfi-13 (string-copy))
signals
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)
(open nuit-eval
plugin)
(files std-command))
;;; 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))
(define-structure fs-object fs-object-interface
(open scheme
(subset scsh (file-info))
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))
(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
srfi-1
srfi-6
display-conditions
ncurses
layout
select-list
tty-debug
plugin)
(files inspector))
;;; nuit evaluates the expressions entered into command buffer in this
;;; package
(define-structure nuit-eval
(interface-of scheme-with-scsh)
(open
(modify scheme-with-scsh
(rename (directory-files scsh-directory-files)))
let-opt
srfi-1
fs-object
pps)
(files eval))
;;; nuit plug-in registration
(define-interface plugin-interface
(export make-view-plugin
view-plugin?
view-plugin-fun
view-plugin-type-predicate
make-command-plugin
command-plugin?
command-plugin-command
command-plugin-completer
command-plugin-evaluater
register-plugin!
next-command-message?
next-command-string
next-command-message-parameters
next-command-message-width
init-with-result-message?
init-with-result-message-result
init-with-result-message-buffer
key-pressed-message?
key-pressed-message-result-buffer
key-pressed-message-result-object
key-pressed-message-key
key-pressed-message-prefix-key
print-message?
print-message-command-string
print-message-result-object
print-message-width
restore-message?
restore-message-command-string
restore-message-result-object
selection-message?
selection-message-command-string
selection-message-result-object
message-result-object
message-command-string))
(define-interface plugin-host-interface
(export command-plugin-list
view-plugin-list
make-next-command-message
make-init-with-result-message
make-key-pressed-message
make-print-message
make-restore-message
make-selection-message))
(define-structures
((plugin plugin-interface)
(plugin-host plugin-host-interface))
(open scheme
define-record-types
let-opt
signals)
(files plugins))
;;; nuit
(define-interface nuit-interface
(export nuit))
(define-structure nuit nuit-interface
(open scheme-with-scsh
external-calls
define-record-types
conditions
signals
handle
rt-modules
ncurses
srfi-1
srfi-6
srfi-13
debugging
inspect-exception
rt-modules
tty-debug
fs-object
plugin
plugin-host
layout
pps
history
;; the following modules are plugins
dirlist-view-plugin
process-view-plugin
standard-command-plugin
nuit-inspector-plugin)
(files nuit-engine
handle-fatal-error))