Update fullscreen background color immediately
[MacVim.git] / src / MacVim / MMBackend.h
blobe0dd855555e65a104f5aa6d9fbcaae8594d08498
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 tabBarVisible;
29 unsigned backgroundColor;
30 unsigned foregroundColor;
31 unsigned specialColor;
32 unsigned defaultBackgroundColor;
33 unsigned defaultForegroundColor;
34 id dialogReturn;
35 NSTimer *blinkTimer;
36 int blinkState;
37 NSTimeInterval blinkWaitInterval;
38 NSTimeInterval blinkOnInterval;
39 NSTimeInterval blinkOffInterval;
40 NSMutableDictionary *connectionNameDict;
41 NSMutableDictionary *clientProxyDict;
42 NSMutableDictionary *serverReplyDict;
43 NSString *alternateServerName;
44 ATSFontContainerRef fontContainerRef;
45 NSFont *oldWideFont;
46 BOOL isTerminating;
47 BOOL waitForAck;
48 int initialWindowLayout;
49 BOOL flushDisabled;
52 + (MMBackend *)sharedInstance;
54 - (void)setBackgroundColor:(int)color;
55 - (void)setForegroundColor:(int)color;
56 - (void)setSpecialColor:(int)color;
57 - (void)setDefaultColorsBackground:(int)bg foreground:(int)fg;
58 - (NSConnection *)connection;
59 - (NSDictionary *)actionDict;
60 - (int)initialWindowLayout;
62 - (void)queueMessage:(int)msgid properties:(NSDictionary *)props;
63 - (BOOL)checkin;
64 - (BOOL)openGUIWindow;
65 - (void)clearAll;
66 - (void)clearBlockFromRow:(int)row1 column:(int)col1
67 toRow:(int)row2 column:(int)col2;
68 - (void)deleteLinesFromRow:(int)row count:(int)count
69 scrollBottom:(int)bottom left:(int)left right:(int)right;
70 - (void)drawString:(char*)s length:(int)len row:(int)row column:(int)col
71 cells:(int)cells flags:(int)flags;
72 - (void)insertLinesFromRow:(int)row count:(int)count
73 scrollBottom:(int)bottom left:(int)left right:(int)right;
74 - (void)drawCursorAtRow:(int)row column:(int)col shape:(int)shape
75 fraction:(int)percent color:(int)color;
76 - (void)drawInvertedRectAtRow:(int)row column:(int)col numRows:(int)nr
77 numColumns:(int)nc invert:(int)invert;
78 - (void)update;
79 - (void)flushQueue:(BOOL)force;
80 - (BOOL)waitForInput:(int)milliseconds;
81 - (void)exit;
82 - (void)selectTab:(int)index;
83 - (void)updateTabBar;
84 - (BOOL)tabBarVisible;
85 - (void)showTabBar:(BOOL)enable;
86 - (void)setRows:(int)rows columns:(int)cols;
87 - (void)setWindowTitle:(char *)title;
88 - (void)setDocumentFilename:(char *)filename;
89 - (char *)browseForFileWithAttributes:(NSDictionary *)attr;
90 - (int)showDialogWithAttributes:(NSDictionary *)attr textField:(char *)txtfield;
91 - (void)showToolbar:(int)enable flags:(int)flags;
92 - (void)createScrollbarWithIdentifier:(long)ident type:(int)type;
93 - (void)destroyScrollbarWithIdentifier:(long)ident;
94 - (void)showScrollbarWithIdentifier:(long)ident state:(int)visible;
95 - (void)setScrollbarPosition:(int)pos length:(int)len identifier:(long)ident;
96 - (void)setScrollbarThumbValue:(long)val size:(long)size max:(long)max
97 identifier:(long)ident;
98 - (void)setFont:(NSFont *)font;
99 - (void)setWideFont:(NSFont *)font;
100 - (void)executeActionWithName:(NSString *)name;
101 - (void)setMouseShape:(int)shape;
102 - (void)setBlinkWait:(int)wait on:(int)on off:(int)off;
103 - (void)startBlink;
104 - (void)stopBlink;
105 - (void)adjustLinespace:(int)linespace;
106 - (void)activate;
107 - (void)setPreEditRow:(int)row column:(int)col;
109 - (int)lookupColorWithKey:(NSString *)key;
110 - (BOOL)hasSpecialKeyWithValue:(NSString *)value;
112 - (void)enterFullscreen:(int)fuoptions background:(int)bg;
113 - (void)leaveFullscreen;
114 - (void)setFullscreenBackgroundColor:(int)color;
116 - (void)setAntialias:(BOOL)antialias;
118 - (void)updateModifiedFlag;
120 - (void)registerServerWithName:(NSString *)name;
121 - (BOOL)sendToServer:(NSString *)name string:(NSString *)string
122 reply:(char_u **)reply port:(int *)port expression:(BOOL)expr
123 silent:(BOOL)silent;
124 - (NSArray *)serverList;
125 - (NSString *)peekForReplyOnPort:(int)port;
126 - (NSString *)waitForReplyOnPort:(int)port;
127 - (BOOL)sendReply:(NSString *)reply toPort:(int)port;
129 - (BOOL)waitForAck;
130 - (void)setWaitForAck:(BOOL)yn;
131 - (void)waitForConnectionAcknowledgement;
133 @end
137 @interface NSString (VimStrings)
138 + (id)stringWithVimString:(char_u *)s;
139 - (char_u *)vimStringSave;
140 @end