Added to info on MacVim colorscheme
[MacVim/jjgod.git] / MMBackend.h
blobf64753188cb8d8e13b558d62c5508cbe3f2c7d6d
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"
16 // If disabled, all input is dropped if input is already being processed. (If
17 // enabled, same thing happens at the moment actually. So this is pretty
18 // useless.)
19 #define MM_USE_INPUT_QUEUE 0
24 @interface MMBackend : NSObject <MMBackendProtocol, MMVimServerProtocol,
25 MMVimClientProtocol> {
26 NSMutableArray *queue;
27 NSMutableData *drawData;
28 NSConnection *connection;
29 id frontendProxy;
30 NSDictionary *colorDict;
31 NSDictionary *sysColorDict;
32 BOOL inputReceived;
33 BOOL tabBarVisible;
34 int backgroundColor;
35 int foregroundColor;
36 int specialColor;
37 int defaultBackgroundColor;
38 int defaultForegroundColor;
39 NSDate *lastFlushDate;
40 id dialogReturn;
41 NSTimer *blinkTimer;
42 int blinkState;
43 NSTimeInterval blinkWaitInterval;
44 NSTimeInterval blinkOnInterval;
45 NSTimeInterval blinkOffInterval;
46 BOOL inProcessInput;
47 #if MM_USE_INPUT_QUEUE
48 NSMutableArray *inputQueue;
49 #endif
50 NSMutableDictionary *connectionNameDict;
51 NSMutableDictionary *clientProxyDict;
52 NSMutableDictionary *serverReplyDict;
53 NSString *alternateServerName;
54 ATSFontContainerRef fontContainerRef;
57 + (MMBackend *)sharedInstance;
59 - (void)setBackgroundColor:(int)color;
60 - (void)setForegroundColor:(int)color;
61 - (void)setSpecialColor:(int)color;
62 - (void)setDefaultColorsBackground:(int)bg foreground:(int)fg;
63 - (NSConnection *)connection;
65 - (BOOL)checkin;
66 - (BOOL)openVimWindow;
67 - (void)clearAll;
68 - (void)clearBlockFromRow:(int)row1 column:(int)col1
69 toRow:(int)row2 column:(int)col2;
70 - (void)deleteLinesFromRow:(int)row count:(int)count
71 scrollBottom:(int)bottom left:(int)left right:(int)right;
72 - (void)replaceString:(char*)s length:(int)len row:(int)row column:(int)col
73 flags:(int)flags;
74 - (void)insertLinesFromRow:(int)row count:(int)count
75 scrollBottom:(int)bottom left:(int)left right:(int)right;
76 - (void)drawCursorAtRow:(int)row column:(int)col shape:(int)shape
77 fraction:(int)percent color:(int)color;
78 - (void)flushQueue:(BOOL)force;
79 - (BOOL)waitForInput:(int)milliseconds;
80 - (void)exit;
81 - (void)selectTab:(int)index;
82 - (void)updateTabBar;
83 - (BOOL)tabBarVisible;
84 - (void)showTabBar:(BOOL)enable;
85 - (void)setRows:(int)rows columns:(int)cols;
86 - (void)setVimWindowTitle:(char *)title;
87 - (char *)browseForFileInDirectory:(char *)dir title:(char *)title
88 saving:(int)saving;
89 - (int)presentDialogWithType:(int)type title:(char *)title message:(char *)msg
90 buttons:(char *)btns textField:(char *)txtfield;
91 - (void)addMenuWithTag:(int)tag parent:(int)parentTag name:(char *)name
92 atIndex:(int)index;
93 - (void)addMenuItemWithTag:(int)tag parent:(int)parentTag name:(char *)name
94 tip:(char *)tip icon:(char *)icon
95 keyEquivalent:(int)key modifiers:(int)mods
96 action:(NSString *)action atIndex:(int)index;
97 - (void)removeMenuItemWithTag:(int)tag;
98 - (void)enableMenuItemWithTag:(int)tag state:(int)enabled;
99 - (void)showPopupMenuWithName:(char *)name atMouseLocation:(BOOL)mouse;
100 - (void)showToolbar:(int)enable flags:(int)flags;
101 - (void)createScrollbarWithIdentifier:(long)ident type:(int)type;
102 - (void)destroyScrollbarWithIdentifier:(long)ident;
103 - (void)showScrollbarWithIdentifier:(long)ident state:(int)visible;
104 - (void)setScrollbarPosition:(int)pos length:(int)len identifier:(long)ident;
105 - (void)setScrollbarThumbValue:(long)val size:(long)size max:(long)max
106 identifier:(long)ident;
107 - (BOOL)setFontWithName:(char *)name;
108 - (void)executeActionWithName:(NSString *)name;
109 - (void)setMouseShape:(int)shape;
110 - (void)setBlinkWait:(int)wait on:(int)on off:(int)off;
111 - (void)startBlink;
112 - (void)stopBlink;
113 - (void)adjustLinespace:(int)linespace;
114 - (void)activate;
116 - (int)lookupColorWithKey:(NSString *)key;
117 - (BOOL)hasSpecialKeyWithValue:(NSString *)value;
119 - (void)registerServerWithName:(NSString *)name;
120 - (BOOL)sendToServer:(NSString *)name string:(NSString *)string
121 reply:(char_u **)reply port:(int *)port expression:(BOOL)expr
122 silent:(BOOL)silent;
123 - (NSArray *)serverList;
124 - (NSString *)peekForReplyOnPort:(int)port;
125 - (NSString *)waitForReplyOnPort:(int)port;
126 - (BOOL)sendReply:(NSString *)reply toPort:(int)port;
128 @end