Dialogs are always displayed in the default run loop mode
[MacVim.git] / src / MacVim / MMBackend.h
blobede19c43dba4bea307fe499ebdaa57f892088eda
1 /* vi:set ts=8 sts=4 sw=4 ft=objc:
3 * VIM - Vi IMproved by Bram Moolenaar
4 * MacVim GUI port by Bjorn Winckler
6 * Do ":help uganda" in Vim to read copying and usage conditions.
7 * Do ":help credits" in Vim to see a list of people who contributed.
8 * See README.txt for an overview of the Vim source code.
9 */
11 #import <Foundation/Foundation.h>
12 #import "MacVim.h"
13 #import "vim.h"
18 @interface MMBackend : NSObject <MMBackendProtocol, MMVimServerProtocol,
19 MMVimClientProtocol> {
20 NSMutableArray *outputQueue;
21 NSMutableArray *inputQueue;
22 NSMutableData *drawData;
23 NSConnection *connection;
24 id frontendProxy;
25 NSDictionary *colorDict;
26 NSDictionary *sysColorDict;
27 NSDictionary *actionDict;
28 BOOL inputReceived;
29 BOOL tabBarVisible;
30 unsigned backgroundColor;
31 unsigned foregroundColor;
32 unsigned specialColor;
33 unsigned defaultBackgroundColor;
34 unsigned defaultForegroundColor;
35 NSDate *lastFlushDate;
36 id dialogReturn;
37 NSTimer *blinkTimer;
38 int blinkState;
39 NSTimeInterval blinkWaitInterval;
40 NSTimeInterval blinkOnInterval;
41 NSTimeInterval blinkOffInterval;
42 NSMutableDictionary *connectionNameDict;
43 NSMutableDictionary *clientProxyDict;
44 NSMutableDictionary *serverReplyDict;
45 NSString *alternateServerName;
46 ATSFontContainerRef fontContainerRef;
47 NSFont *oldWideFont;
48 BOOL isTerminating;
51 + (MMBackend *)sharedInstance;
53 - (void)setBackgroundColor:(int)color;
54 - (void)setForegroundColor:(int)color;
55 - (void)setSpecialColor:(int)color;
56 - (void)setDefaultColorsBackground:(int)bg foreground:(int)fg;
57 - (NSConnection *)connection;
58 - (NSDictionary *)actionDict;
60 - (void)queueMessage:(int)msgid properties:(NSDictionary *)props;
61 - (BOOL)checkin;
62 - (BOOL)openVimWindow;
63 - (void)clearAll;
64 - (void)clearBlockFromRow:(int)row1 column:(int)col1
65 toRow:(int)row2 column:(int)col2;
66 - (void)deleteLinesFromRow:(int)row count:(int)count
67 scrollBottom:(int)bottom left:(int)left right:(int)right;
68 - (void)drawString:(char*)s length:(int)len row:(int)row column:(int)col
69 cells:(int)cells flags:(int)flags;
70 - (void)insertLinesFromRow:(int)row count:(int)count
71 scrollBottom:(int)bottom left:(int)left right:(int)right;
72 - (void)drawCursorAtRow:(int)row column:(int)col shape:(int)shape
73 fraction:(int)percent color:(int)color;
74 - (void)drawInvertedRectAtRow:(int)row column:(int)col numRows:(int)nr
75 numColumns:(int)nc invert:(int)invert;
76 - (void)update;
77 - (void)flushQueue:(BOOL)force;
78 - (BOOL)waitForInput:(int)milliseconds;
79 - (void)exit;
80 - (void)selectTab:(int)index;
81 - (void)updateTabBar;
82 - (BOOL)tabBarVisible;
83 - (void)showTabBar:(BOOL)enable;
84 - (void)setRows:(int)rows columns:(int)cols;
85 - (void)setWindowTitle:(char *)title;
86 - (void)setDocumentFilename:(char *)filename;
87 - (char *)browseForFileWithAttributes:(NSDictionary *)attr;
88 - (int)showDialogWithAttributes:(NSDictionary *)attr textField:(char *)txtfield;
89 - (void)showToolbar:(int)enable flags:(int)flags;
90 - (void)createScrollbarWithIdentifier:(long)ident type:(int)type;
91 - (void)destroyScrollbarWithIdentifier:(long)ident;
92 - (void)showScrollbarWithIdentifier:(long)ident state:(int)visible;
93 - (void)setScrollbarPosition:(int)pos length:(int)len identifier:(long)ident;
94 - (void)setScrollbarThumbValue:(long)val size:(long)size max:(long)max
95 identifier:(long)ident;
96 - (void)setFont:(NSFont *)font;
97 - (void)setWideFont:(NSFont *)font;
98 - (void)executeActionWithName:(NSString *)name;
99 - (void)setMouseShape:(int)shape;
100 - (void)setBlinkWait:(int)wait on:(int)on off:(int)off;
101 - (void)startBlink;
102 - (void)stopBlink;
103 - (void)adjustLinespace:(int)linespace;
104 - (void)activate;
105 - (void)setPreEditRow:(int)row column:(int)col;
107 - (int)lookupColorWithKey:(NSString *)key;
108 - (BOOL)hasSpecialKeyWithValue:(NSString *)value;
110 - (void)enterFullscreen:(int)fuoptions background:(int)bg;
111 - (void)leaveFullscreen;
113 - (void)setAntialias:(BOOL)antialias;
115 - (void)updateModifiedFlag;
117 - (void)registerServerWithName:(NSString *)name;
118 - (BOOL)sendToServer:(NSString *)name string:(NSString *)string
119 reply:(char_u **)reply port:(int *)port expression:(BOOL)expr
120 silent:(BOOL)silent;
121 - (NSArray *)serverList;
122 - (NSString *)peekForReplyOnPort:(int)port;
123 - (NSString *)waitForReplyOnPort:(int)port;
124 - (BOOL)sendReply:(NSString *)reply toPort:(int)port;
126 @end