aboutsummaryrefslogtreecommitdiffstats
path: root/LispREPLController.h
blob: a9abdda4950afb191b48454897c88eb487c2263a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//
//  LispREPLController.h
//  Moxie
//
//  Created by Brian Cully on Mon Aug 09 2004.
//  Copyright (c) 2004 Brian Cully. All rights reserved.
//

#import "LispREPL.h"

@interface LispREPLController : NSWindowController
{
    IBOutlet NSTextView *theTextView;
    
    int theMark, theValueMark;
    BOOL theInputViewIsDirty;
    
    NSTimer *theREPLUpdateTimer;
    NSConditionLock *theREPLUpdateLock;
    NSMutableArray *theUpdates;
    BOOL waitingForResult;
    
    NSMutableSet *theKeystrokeMacros;
    
    NSMutableArray *theInputHistory;
    unsigned theHistoryLevel;
}

+ (LispREPLController *)sharedController;

- (void)sendEvent: (NSString *)anEvent;
- (void)sendEvent: (NSString *)anEvent withArg: (id)anArg;
- (void)sendEventWithArgs: (NSString *)anEvent, ...;
- (void)sendEvent: (NSString *)anEvent arguments: (va_list)args;

- (BOOL)dispatchKeystrokeMacro: (NSEvent *)anEvent
                        fromID: (NSNumber *)aWorld;
@end

@interface LispREPLController (TextAttributes)
- (NSDictionary *)REPLPromptAttributes;
- (NSDictionary *)REPLInputAttributes;
- (NSDictionary *)REPLOutputAttributes;
- (NSDictionary *)REPLReturnValueAttributes;
@end

@interface LispREPLController (Accessors)
- (NSTextView *)textView;

- (int)mark;
- (void)setMark: (int)aPoint;
- (int)valueMark;
- (void)setValueMark: (int)aPoint;

- (NSMutableSet *)keystrokeMacros;
- (void)setKeystrokeMacros: (NSMutableSet *)macros;

- (NSMutableArray *)inputHistory;
- (void)setInputHistory: (NSMutableArray *)aHistory;
@end