2005-05-27 05:47:37 -04:00
|
|
|
;;; 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))
|
|
|
|
|
2005-05-22 05:20:44 -04:00
|
|
|
;;; 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
|
2005-05-22 11:05:25 -04:00
|
|
|
(open scheme
|
2005-05-22 05:20:44 -04:00
|
|
|
define-record-types)
|
|
|
|
(files history))
|
|
|
|
|
2005-05-22 11:05:25 -04:00
|
|
|
;;; 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
|
2005-05-25 05:44:27 -04:00
|
|
|
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))
|
2005-05-22 11:05:25 -04:00
|
|
|
|
|
|
|
(define-structure layout layout-interface
|
|
|
|
(open scheme
|
|
|
|
srfi-6 ;; basic string ports
|
2005-05-25 05:44:27 -04:00
|
|
|
define-record-types
|
|
|
|
|
|
|
|
tty-debug
|
|
|
|
ncurses)
|
2005-05-22 11:05:25 -04:00
|
|
|
(files layout))
|
|
|
|
|
|
|
|
;;; process viewer plugin
|
2005-05-22 05:20:44 -04:00
|
|
|
|
2005-05-22 11:05:25 -04:00
|
|
|
(define-structure process-view-plugin
|
|
|
|
(export)
|
|
|
|
(open scheme
|
2005-05-25 05:44:27 -04:00
|
|
|
define-record-types
|
2005-05-22 11:05:25 -04:00
|
|
|
srfi-1
|
2005-05-25 05:44:27 -04:00
|
|
|
srfi-13
|
2005-05-22 11:05:25 -04:00
|
|
|
formats
|
2005-05-25 05:44:27 -04:00
|
|
|
|
2005-05-22 11:05:25 -04:00
|
|
|
pps
|
|
|
|
plugin
|
2005-05-25 07:36:12 -04:00
|
|
|
layout
|
2005-05-25 05:44:27 -04:00
|
|
|
select-list
|
2005-05-22 11:05:25 -04:00
|
|
|
tty-debug)
|
|
|
|
(files process))
|
|
|
|
|
|
|
|
;;; file list view plugin
|
|
|
|
|
2005-05-27 17:32:21 -04:00
|
|
|
(define-structure dirlist-view-plugin (export)
|
2005-05-26 07:35:17 -04:00
|
|
|
(open (modify nuit-eval (hide string-copy))
|
2005-05-22 11:05:25 -04:00
|
|
|
define-record-types
|
2005-05-26 07:35:17 -04:00
|
|
|
srfi-1
|
2005-05-27 17:32:21 -04:00
|
|
|
(subset srfi-13 (string-copy string-drop string-prefix-length))
|
2005-05-26 07:35:17 -04:00
|
|
|
signals
|
|
|
|
|
2005-05-22 11:05:25 -04:00
|
|
|
layout
|
|
|
|
fs-object
|
2005-05-26 07:35:17 -04:00
|
|
|
select-list
|
2005-05-22 11:05:25 -04:00
|
|
|
plugin
|
|
|
|
ncurses
|
|
|
|
tty-debug)
|
|
|
|
(files browse-directory-list))
|
|
|
|
|
2005-05-23 10:52:03 -04:00
|
|
|
;;; standard command plugin
|
|
|
|
|
|
|
|
(define-structure standard-command-plugin
|
2005-05-27 17:32:21 -04:00
|
|
|
(export standard-command-plugin show-shell-screen)
|
2005-05-27 13:01:14 -04:00
|
|
|
(open let-opt
|
|
|
|
signals
|
|
|
|
srfi-1
|
|
|
|
srfi-13
|
2005-05-27 17:32:21 -04:00
|
|
|
|
|
|
|
fs-object
|
2005-05-27 12:02:39 -04:00
|
|
|
pps
|
2005-05-27 13:01:14 -04:00
|
|
|
nuit-eval
|
2005-05-27 12:02:39 -04:00
|
|
|
ncurses
|
2005-05-27 13:01:14 -04:00
|
|
|
tty-debug
|
2005-05-23 10:52:03 -04:00
|
|
|
plugin)
|
|
|
|
(files std-command))
|
|
|
|
|
2005-05-22 11:05:25 -04:00
|
|
|
;;; fs-objects
|
|
|
|
|
|
|
|
(define-interface fs-object-interface
|
|
|
|
(export make-fs-object
|
|
|
|
fs-object?
|
|
|
|
fs-object-name
|
2005-05-26 07:35:17 -04:00
|
|
|
fs-object-path
|
|
|
|
fs-object-info
|
2005-05-27 17:32:21 -04:00
|
|
|
fs-object-complete-path
|
|
|
|
combine-path
|
|
|
|
file-name->fs-object))
|
2005-05-22 11:05:25 -04:00
|
|
|
|
|
|
|
(define-structure fs-object fs-object-interface
|
2005-05-27 17:32:21 -04:00
|
|
|
(open scheme-with-scsh
|
2005-05-27 05:53:06 -04:00
|
|
|
formats
|
|
|
|
handle-fatal-error
|
2005-05-22 11:05:25 -04:00
|
|
|
define-record-types)
|
|
|
|
(files fs-object))
|
|
|
|
|
2005-05-25 05:44:27 -04:00
|
|
|
;;; browse list stuff
|
|
|
|
|
|
|
|
(define-interface select-list-interface
|
|
|
|
(export make-select-list
|
|
|
|
select-list?
|
2005-05-26 07:35:17 -04:00
|
|
|
|
|
|
|
make-unmarked-element
|
|
|
|
make-marked-element
|
|
|
|
element?
|
|
|
|
|
2005-05-25 05:44:27 -04:00
|
|
|
select-list-handle-key-press
|
|
|
|
unmark-current-line
|
|
|
|
mark-current-line
|
|
|
|
move-cursor-up
|
|
|
|
move-cursor-down
|
2005-05-25 07:36:12 -04:00
|
|
|
paint-selection-list
|
2005-05-25 09:48:17 -04:00
|
|
|
paint-selection-list-at
|
|
|
|
select-list-get-selection
|
|
|
|
select-list-selected-entry))
|
2005-05-25 05:44:27 -04:00
|
|
|
|
|
|
|
(define-structure select-list select-list-interface
|
|
|
|
(open scheme
|
|
|
|
srfi-1
|
|
|
|
define-record-types
|
2005-05-26 07:35:17 -04:00
|
|
|
signals
|
2005-05-25 05:44:27 -04:00
|
|
|
|
|
|
|
tty-debug
|
|
|
|
plugin
|
|
|
|
layout
|
|
|
|
ncurses)
|
|
|
|
(files select-list))
|
|
|
|
|
2005-05-24 09:57:56 -04:00
|
|
|
;;; 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
|
2005-05-27 12:02:39 -04:00
|
|
|
signals
|
2005-05-25 11:18:26 -04:00
|
|
|
|
|
|
|
ncurses
|
|
|
|
layout
|
|
|
|
select-list
|
2005-05-24 09:57:56 -04:00
|
|
|
tty-debug
|
|
|
|
plugin)
|
|
|
|
(files inspector))
|
|
|
|
|
2005-05-22 11:05:25 -04:00
|
|
|
;;; nuit evaluates the expressions entered into command buffer in this
|
|
|
|
;;; package
|
|
|
|
|
2005-05-27 17:32:21 -04:00
|
|
|
(define-structure nuit-eval (interface-of scheme-with-scsh)
|
2005-05-22 11:05:25 -04:00
|
|
|
(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
|
2005-05-23 08:47:41 -04:00
|
|
|
(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
|
|
|
|
|
2005-05-22 11:05:25 -04:00
|
|
|
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
|
2005-05-25 07:36:12 -04:00
|
|
|
init-with-result-message-buffer
|
2005-05-22 11:05:25 -04:00
|
|
|
|
|
|
|
key-pressed-message?
|
2005-05-25 05:44:27 -04:00
|
|
|
key-pressed-message-result-buffer
|
2005-05-22 11:05:25 -04:00
|
|
|
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
|
2005-05-23 08:47:41 -04:00
|
|
|
(export command-plugin-list
|
|
|
|
view-plugin-list
|
2005-05-28 08:05:33 -04:00
|
|
|
command-completions
|
2005-05-22 11:05:25 -04:00
|
|
|
make-next-command-message
|
|
|
|
make-init-with-result-message
|
|
|
|
make-key-pressed-message
|
|
|
|
make-print-message
|
|
|
|
make-restore-message
|
2005-05-28 08:05:33 -04:00
|
|
|
make-selection-message))
|
2005-05-22 11:05:25 -04:00
|
|
|
|
|
|
|
(define-structures
|
|
|
|
((plugin plugin-interface)
|
|
|
|
(plugin-host plugin-host-interface))
|
|
|
|
(open scheme
|
|
|
|
define-record-types
|
|
|
|
let-opt
|
2005-05-28 08:05:33 -04:00
|
|
|
signals
|
|
|
|
|
|
|
|
completion-sets)
|
2005-05-22 11:05:25 -04:00
|
|
|
(files plugins))
|
2005-05-22 05:20:44 -04:00
|
|
|
|
2005-05-27 13:01:14 -04:00
|
|
|
;;; focus table
|
|
|
|
|
2005-05-28 08:05:33 -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-05-28 08:05:33 -04:00
|
|
|
; (define-structure focus-table focus-table-interface
|
|
|
|
; (open scheme
|
|
|
|
; define-record-types
|
|
|
|
; general-table)
|
|
|
|
; (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
|
2005-05-28 08:05:33 -04:00
|
|
|
srfi-1
|
|
|
|
thread-fluids)
|
|
|
|
(files complete))
|
2005-05-27 13:01:14 -04:00
|
|
|
|
2005-05-22 05:20:44 -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
|
|
|
|
signals
|
|
|
|
handle
|
2005-05-24 09:57:56 -04:00
|
|
|
rt-modules
|
2005-05-30 05:31:47 -04:00
|
|
|
(modify ncurses (hide filter))
|
2005-05-20 11:20:34 -04:00
|
|
|
srfi-1
|
2004-10-03 05:13:30 -04:00
|
|
|
srfi-6
|
2005-05-20 11:20:34 -04:00
|
|
|
srfi-13
|
2005-05-18 11:25:16 -04:00
|
|
|
debugging
|
2005-05-17 05:22:07 -04:00
|
|
|
inspect-exception
|
2005-05-18 11:25:16 -04:00
|
|
|
rt-modules
|
2005-05-20 11:20:34 -04:00
|
|
|
tty-debug
|
2005-05-22 11:05:25 -04:00
|
|
|
fs-object
|
|
|
|
plugin
|
|
|
|
plugin-host
|
|
|
|
layout
|
2005-05-22 05:20:44 -04:00
|
|
|
pps
|
2005-05-22 11:05:25 -04:00
|
|
|
history
|
2005-05-27 05:47:37 -04:00
|
|
|
handle-fatal-error
|
2005-05-28 08:05:33 -04:00
|
|
|
completion-sets
|
|
|
|
select-list
|
2005-05-22 11:05:25 -04:00
|
|
|
;; the following modules are plugins
|
|
|
|
dirlist-view-plugin
|
2005-05-23 10:52:03 -04:00
|
|
|
process-view-plugin
|
2005-05-24 09:57:56 -04:00
|
|
|
standard-command-plugin
|
|
|
|
nuit-inspector-plugin)
|
2005-05-27 05:47:37 -04:00
|
|
|
(files nuit-engine))
|
|
|
|
|