Many changes! Snapshots now working properly. Programmatic environment interface...
[RExecServer.git] / TerminalDelegate.h
blobd2e60ce59452870830d25cda3ed3d4962dcb2121
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 {
8 //Reader thread stuff
9 int readerCurMax;
10 unsigned char* readerBuffer;
11 int readerMaxLen,readerUsed;
12 BOOL readerHistory;
14 R_READER_FN readerFn;
15 R_WRITER_FN writerFn;
16 R_FLUSH_FN flushFn;
19 - (id)init;
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;
42 @end