forked from gnachman/iTerm2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVT100State.h
27 lines (18 loc) · 1006 Bytes
/
VT100State.h
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
#import <Foundation/Foundation.h>
// Called on state transition with the event (character) as its argument.
typedef void (^VT100StateAction)(unsigned char character);
@class VT100StateTransition;
@interface VT100State : NSObject
@property(nonatomic, readonly) NSString *name;
@property(nonatomic, retain) NSObject *identifier;
@property(nonatomic, copy) VT100StateAction entryAction;
@property(nonatomic, copy) VT100StateAction exitAction;
+ (instancetype)stateWithName:(NSString *)name identifier:(NSObject *)identifier;
- (void)addStateTransitionForCharacter:(unsigned char)character
to:(VT100State *)state
withAction:(VT100StateAction)action;
- (void)addStateTransitionForCharacterRange:(NSRange)characterRange
to:(VT100State *)state
withAction:(VT100StateAction)action;
- (VT100StateTransition *)stateTransitionForCharacter:(unsigned char)character;
@end