Preparing to add widget support
[RExecServer.git] / TerminalDelegate.h
blob70c597caa785aa3fb4bc831357d26f24501f9739
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 //Interpreter evaluation
31 - (void)didFinishEvaluationForInterpreter:(id)anInterpreter;
32 - (void)didBeginEvaluationForInterpreter:(id)anInterpreter;
33 - (void)didBeginWaitingForInputWithMaximumLength:(int)bufferLength addToHistory:(BOOL)shouldAdd forInterpreter:(id)anInterpreter;
34 - (void)didGetInputForInterpreter:(id)anInterpreter;
35 - (void)didCloseInterpreter:(id)anInterpreter;
37 - (BOOL)shouldBufferOutputForInterpreter:(id)anInterpreter;
38 - (void)appendString:(NSString*)outputString ofType:(int)aType forInterpreter:(id)anInterpreter;
39 - (void)flushOutputForInterpreter:(id)anInterpreter;
41 - (void)openWidgetAtPath:(NSString*)aPath forInterpreter:(id)anInterpreter;
43 @end