Added connection to event tracking mode so that live resize works for DO.
[MacVim/jjgod.git] / MMBackend.h
blob5e28c6b525e2a649f8506ebf8272710fb3c0fe3b
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"
16 @interface MMBackend : NSObject
17 #if MM_USE_DO
18 <MMBackendProtocol>
19 #endif
21 NSMutableArray *queue;
22 NSMutableData *drawData;
23 #if MM_USE_DO
24 NSConnection *connection;
25 id frontendProxy;
26 #else
27 NSPort *sendPort;
28 NSPort *receivePort;
29 NSData *replyData;
30 #endif
31 NSDictionary *colorDict;
32 BOOL inputReceived;
33 BOOL receivedKillTaskMsg;
34 BOOL tabBarVisible;
35 int backgroundColor;
36 int foregroundColor;
37 int defaultBackgroundColor;
38 int defaultForegroundColor;
41 + (MMBackend *)sharedInstance;
43 - (void)setBackgroundColor:(int)color;
44 - (void)setForegroundColor:(int)color;
45 - (void)setDefaultColorsBackground:(int)bg foreground:(int)fg;
47 - (BOOL)checkin;
48 - (BOOL)openVimWindowWithRows:(int)rows columns:(int)cols;
49 - (void)clearAll;
50 - (void)clearBlockFromRow:(int)row1 column:(int)col1
51 toRow:(int)row2 column:(int)col2;
52 - (void)deleteLinesFromRow:(int)row count:(int)count
53 scrollBottom:(int)bottom left:(int)left right:(int)right;
54 - (void)replaceString:(char*)s length:(int)len row:(int)row column:(int)col
55 flags:(int)flags;
56 - (void)insertLinesFromRow:(int)row count:(int)count
57 scrollBottom:(int)bottom left:(int)left right:(int)right;
58 - (void)flush;
59 - (void)flushQueue;
60 - (BOOL)waitForInput:(int)milliseconds;
61 - (void)exit;
62 - (void)selectTab:(int)index;
63 - (void)updateTabBar;
64 - (BOOL)tabBarVisible;
65 - (void)showTabBar:(BOOL)enable;
66 - (void)setRows:(int)rows columns:(int)cols;
67 - (void)setVimWindowTitle:(char *)title;
68 - (char *)browseForFileInDirectory:(char *)dir title:(char *)title
69 saving:(int)saving;
70 - (void)updateInsertionPoint;
71 - (void)addMenuWithTag:(int)tag parent:(int)parentTag name:(char *)name
72 atIndex:(int)index;
73 - (void)addMenuItemWithTag:(int)tag parent:(int)parentTag name:(char *)name
74 tip:(char *)tip icon:(char *)icon atIndex:(int)index;
75 - (void)removeMenuItemWithTag:(int)tag;
76 - (void)enableMenuItemWithTag:(int)tag state:(int)enabled;
77 - (void)showToolbar:(int)enable flags:(int)flags;
78 - (void)createScrollbarWithIdentifier:(long)ident type:(int)type;
79 - (void)destroyScrollbarWithIdentifier:(long)ident;
80 - (void)showScrollbarWithIdentifier:(long)ident state:(int)visible;
81 - (void)setScrollbarPosition:(int)pos length:(int)len identifier:(long)ident;
82 - (void)setScrollbarThumbValue:(long)val size:(long)size max:(long)max
83 identifier:(long)ident;
84 - (BOOL)setFontWithName:(char *)name;
86 - (int)lookupColorWithKey:(NSString *)key;
88 @end
91 // vim: set ft=objc: