1 #import <Cocoa/Cocoa.h>
3 typedef int (*R_READER_FN
)(char *,unsigned char*,int,int);
4 typedef void (*R_WRITER_FN
)(char*,int);
5 typedef void (*R_FLUSH_FN
)();
7 @interface TerminalDelegate
: NSObject
{
10 unsigned char* readerBuffer
;
11 int readerMaxLen
,readerUsed
;
21 - (void)setReaderFunction
:(R_READER_FN
)fn
;
22 - (void)setWriterFunction
:(R_WRITER_FN
)fn
;
23 - (void)setFlushFunction
:(R_FLUSH_FN
)fn
;
26 //Device open/closing delegate methods
27 - (void)didOpenDevice
:(id
)aDevice forInterpreter
:(id
)anInterpreter
;
28 - (void)didCloseDevice
:(id
)aDevice forInterpreter
:(id
)anInterpreter
;
30 - (void)didFinishEvaluationForInterpreter
:(id
)anInterpreter
;
31 - (void)didBeginEvaluationForInterpreter
:(id
)anInterpreter
;
32 - (void)didBeginWaitingForInputWithMaximumLength
:(int)bufferLength addToHistory
:(BOOL
)shouldAdd forInterpreter
:(id
)anInterpreter
;
33 - (void)didGetInputForInterpreter
:(id
)anInterpreter
;
34 - (void)didCloseInterpreter
:(id
)anInterpreter
;
36 - (BOOL
)shouldBufferOutputForInterpreter
:(id
)anInterpreter
;
37 - (void)appendString
:(NSString
*)outputString ofType
:(int)aType forInterpreter
:(id
)anInterpreter
;
38 - (void)flushOutputForInterpreter
:(id
)anInterpreter
;