2016-07-09 15:04:09 +03:00
|
|
|
/**
|
|
|
|
* Tae Won Ha - http://taewon.de - @hataewon
|
|
|
|
* See LICENSE
|
|
|
|
*/
|
|
|
|
|
2016-08-03 22:43:05 +03:00
|
|
|
@import Cocoa;
|
2016-07-09 15:04:09 +03:00
|
|
|
|
|
|
|
|
2017-06-24 12:33:37 +03:00
|
|
|
#import "NeoVimUiBridgeProtocol.h"
|
|
|
|
|
|
|
|
|
2016-08-12 15:32:42 +03:00
|
|
|
@class NeoVimBuffer;
|
2016-10-22 23:20:22 +03:00
|
|
|
@class NeoVimTab;
|
2016-10-23 20:42:51 +03:00
|
|
|
@class NeoVimWindow;
|
2016-07-09 23:52:59 +03:00
|
|
|
|
|
|
|
|
2016-07-09 15:04:09 +03:00
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
@interface NeoVimAgent : NSObject
|
|
|
|
|
2016-09-24 17:31:14 +03:00
|
|
|
@property (nonatomic) bool useInteractiveZsh;
|
2017-06-12 01:30:33 +03:00
|
|
|
@property (nonatomic) NSURL *cwd;
|
|
|
|
@property (nonatomic, nullable) NSArray<NSString *> *nvimArgs;
|
2017-08-27 15:25:10 +03:00
|
|
|
@property (readonly) bool neoVimIsQuitting;
|
2016-07-09 23:52:59 +03:00
|
|
|
@property (nonatomic, weak) id <NeoVimUiBridgeProtocol> bridge;
|
|
|
|
|
2017-08-27 15:25:10 +03:00
|
|
|
@property (readonly) bool neoVimHasQuit;
|
|
|
|
@property (readonly) NSCondition *neoVimQuitCondition;
|
|
|
|
|
2016-07-09 15:04:09 +03:00
|
|
|
- (instancetype)initWithUuid:(NSString *)uuid;
|
2017-01-07 15:55:53 +03:00
|
|
|
|
|
|
|
- (void)debug;
|
|
|
|
|
2017-08-27 15:25:10 +03:00
|
|
|
- (void)forceQuit;
|
2016-08-12 19:00:05 +03:00
|
|
|
- (void)quit;
|
2016-08-18 18:40:30 +03:00
|
|
|
|
2017-06-12 20:28:28 +03:00
|
|
|
- (bool)runLocalServerAndNeoVimWithWidth:(NSInteger)width height:(NSInteger)height;
|
2016-07-09 23:52:59 +03:00
|
|
|
|
2017-05-08 21:25:11 +03:00
|
|
|
- (NSURL *)pwd;
|
2016-08-04 21:01:03 +03:00
|
|
|
- (void)vimCommand:(NSString *)string;
|
|
|
|
|
2016-07-09 23:52:59 +03:00
|
|
|
- (void)vimInput:(NSString *)string;
|
2016-12-05 23:30:25 +03:00
|
|
|
- (void)vimInputMarkedText:(NSString *)markedText;
|
2016-07-09 23:52:59 +03:00
|
|
|
- (void)deleteCharacters:(NSInteger)count;
|
2016-08-09 22:54:56 +03:00
|
|
|
|
2016-07-09 23:52:59 +03:00
|
|
|
- (void)resizeToWidth:(int)width height:(int)height;
|
2017-01-07 17:12:07 +03:00
|
|
|
- (void)cursorGoToRow:(int)row column:(int)column;
|
2016-07-09 15:04:09 +03:00
|
|
|
|
2016-07-18 21:16:56 +03:00
|
|
|
- (bool)hasDirtyDocs;
|
2017-03-13 20:44:57 +03:00
|
|
|
- (NSString * _Nullable)escapedFileName:(NSString *)fileName;
|
2016-08-13 12:20:03 +03:00
|
|
|
- (NSArray<NSString *> *)escapedFileNames:(NSArray<NSString *> *)fileNames;
|
|
|
|
- (NSArray<NeoVimBuffer *> *)buffers;
|
2016-10-22 23:20:22 +03:00
|
|
|
- (NSArray<NeoVimTab*> *)tabs;
|
2017-05-30 23:13:52 +03:00
|
|
|
|
2017-06-24 12:33:37 +03:00
|
|
|
- (void)scrollHorizontal:(NSInteger)horiz vertical:(NSInteger)vert at:(Position)position;
|
2016-10-23 20:42:51 +03:00
|
|
|
- (void)selectWindow:(NeoVimWindow *)window;
|
2016-07-18 21:16:56 +03:00
|
|
|
|
2016-12-05 23:30:25 +03:00
|
|
|
// WAITS
|
|
|
|
- (NSString * _Nullable)vimCommandOutput:(NSString *)string;
|
|
|
|
- (NSNumber * _Nullable)boolOption:(NSString *)option;
|
2016-12-07 22:24:25 +03:00
|
|
|
- (void)setBoolOption:(NSString *)option to:(bool)value;
|
2016-12-05 23:30:25 +03:00
|
|
|
|
2017-09-07 19:24:06 +03:00
|
|
|
- (void)focusGained:(bool)gained;
|
|
|
|
|
2016-07-09 15:04:09 +03:00
|
|
|
@end
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|