Convert NSAttributedString to NSString in insertText:
[MacVim/jjgod.git] / MMBackend.h
blob75630e0a32811327cc754d41b63fd68176001fd1
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"
15 // If disabled, all input is dropped if input is already being processed. (If
16 // enabled, same thing happens at the moment actually. So this is pretty
17 // useless.)
18 #define MM_USE_INPUT_QUEUE 0
23 @interface MMBackend : NSObject <MMBackendProtocol> {
24 NSMutableArray *queue;
25 NSMutableData *drawData;
26 NSConnection *connection;
27 id frontendProxy;
28 NSDictionary *colorDict;
29 NSDictionary *sysColorDict;
30 BOOL inputReceived;
31 BOOL tabBarVisible;
32 int backgroundColor;
33 int foregroundColor;
34 int specialColor;
35 int defaultBackgroundColor;
36 int defaultForegroundColor;
37 NSDate *lastFlushDate;
38 id dialogReturn;
39 NSTimer *blinkTimer;
40 int blinkState;
41 NSTimeInterval blinkWaitInterval;
42 NSTimeInterval blinkOnInterval;
43 NSTimeInterval blinkOffInterval;
44 BOOL inProcessInput;
45 #if MM_USE_INPUT_QUEUE
46 NSMutableArray *inputQueue;
47 #endif
50 + (MMBackend *)sharedInstance;
52 - (void)setBackgroundColor:(int)color;
53 - (void)setForegroundColor:(int)color;
54 - (void)setSpecialColor:(int)color;
55 - (void)setDefaultColorsBackground:(int)bg foreground:(int)fg;
57 - (BOOL)checkin;
58 - (BOOL)openVimWindow;
59 - (void)clearAll;
60 - (void)clearBlockFromRow:(int)row1 column:(int)col1
61 toRow:(int)row2 column:(int)col2;
62 - (void)deleteLinesFromRow:(int)row count:(int)count
63 scrollBottom:(int)bottom left:(int)left right:(int)right;
64 - (void)replaceString:(char*)s length:(int)len row:(int)row column:(int)col
65 flags:(int)flags;
66 - (void)insertLinesFromRow:(int)row count:(int)count
67 scrollBottom:(int)bottom left:(int)left right:(int)right;
68 - (void)drawCursorAtRow:(int)row column:(int)col shape:(int)shape
69 fraction:(int)percent color:(int)color;
70 - (void)flushQueue:(BOOL)force;
71 - (BOOL)waitForInput:(int)milliseconds;
72 - (void)exit;
73 - (void)selectTab:(int)index;
74 - (void)updateTabBar;
75 - (BOOL)tabBarVisible;
76 - (void)showTabBar:(BOOL)enable;
77 - (void)setRows:(int)rows columns:(int)cols;
78 - (void)setVimWindowTitle:(char *)title;
79 - (char *)browseForFileInDirectory:(char *)dir title:(char *)title
80 saving:(int)saving;
81 - (int)presentDialogWithType:(int)type title:(char *)title message:(char *)msg
82 buttons:(char *)btns textField:(char *)txtfield;
83 - (void)addMenuWithTag:(int)tag parent:(int)parentTag name:(char *)name
84 atIndex:(int)index;
85 - (void)addMenuItemWithTag:(int)tag parent:(int)parentTag name:(char *)name
86 tip:(char *)tip icon:(char *)icon
87 keyEquivalent:(int)key modifiers:(int)mods
88 action:(NSString *)action atIndex:(int)index;
89 - (void)removeMenuItemWithTag:(int)tag;
90 - (void)enableMenuItemWithTag:(int)tag state:(int)enabled;
91 - (void)showPopupMenuWithName:(char *)name atMouseLocation:(BOOL)mouse;
92 - (void)showToolbar:(int)enable flags:(int)flags;
93 - (void)createScrollbarWithIdentifier:(long)ident type:(int)type;
94 - (void)destroyScrollbarWithIdentifier:(long)ident;
95 - (void)showScrollbarWithIdentifier:(long)ident state:(int)visible;
96 - (void)setScrollbarPosition:(int)pos length:(int)len identifier:(long)ident;
97 - (void)setScrollbarThumbValue:(long)val size:(long)size max:(long)max
98 identifier:(long)ident;
99 - (BOOL)setFontWithName:(char *)name;
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;
106 - (int)lookupColorWithKey:(NSString *)key;
107 - (BOOL)hasSpecialKeyWithValue:(NSString *)value;
109 @end