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.
11 #import <Foundation/Foundation.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
18 #define MM_USE_INPUT_QUEUE 0
23 @interface MMBackend
: NSObject
<MMBackendProtocol
> {
24 NSMutableArray
*queue
;
25 NSMutableData
*drawData
;
26 NSConnection
*connection
;
28 NSDictionary
*colorDict
;
29 NSDictionary
*sysColorDict
;
35 int defaultBackgroundColor
;
36 int defaultForegroundColor
;
37 NSDate
*lastFlushDate
;
41 NSTimeInterval blinkWaitInterval
;
42 NSTimeInterval blinkOnInterval
;
43 NSTimeInterval blinkOffInterval
;
45 #if MM_USE_INPUT_QUEUE
46 NSMutableArray
*inputQueue
;
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 - (NSString
*)macVimConnectionName
;
59 - (BOOL
)openVimWindow
;
61 - (void)clearBlockFromRow
:(int)row1 column
:(int)col1
62 toRow
:(int)row2 column
:(int)col2
;
63 - (void)deleteLinesFromRow
:(int)row count
:(int)count
64 scrollBottom
:(int)bottom left
:(int)left right
:(int)right
;
65 - (void)replaceString
:(char*)s length
:(int)len row
:(int)row column
:(int)col
67 - (void)insertLinesFromRow
:(int)row count
:(int)count
68 scrollBottom
:(int)bottom left
:(int)left right
:(int)right
;
69 - (void)drawCursorAtRow
:(int)row column
:(int)col shape
:(int)shape
70 fraction
:(int)percent color
:(int)color
;
71 - (void)flushQueue
:(BOOL
)force
;
72 - (BOOL
)waitForInput
:(int)milliseconds
;
74 - (void)selectTab
:(int)index
;
76 - (BOOL
)tabBarVisible
;
77 - (void)showTabBar
:(BOOL
)enable
;
78 - (void)setRows
:(int)rows columns
:(int)cols
;
79 - (void)setVimWindowTitle
:(char *)title
;
80 - (char *)browseForFileInDirectory
:(char *)dir title
:(char *)title
82 - (int)presentDialogWithType
:(int)type title
:(char *)title message
:(char *)msg
83 buttons
:(char *)btns textField
:(char *)txtfield
;
84 - (void)addMenuWithTag
:(int)tag parent
:(int)parentTag name
:(char *)name
86 - (void)addMenuItemWithTag
:(int)tag parent
:(int)parentTag name
:(char *)name
87 tip
:(char *)tip icon
:(char *)icon
88 keyEquivalent
:(int)key modifiers
:(int)mods
89 action
:(NSString
*)action atIndex
:(int)index
;
90 - (void)removeMenuItemWithTag
:(int)tag
;
91 - (void)enableMenuItemWithTag
:(int)tag state
:(int)enabled
;
92 - (void)showPopupMenuWithName
:(char *)name atMouseLocation
:(BOOL
)mouse
;
93 - (void)showToolbar
:(int)enable flags
:(int)flags
;
94 - (void)createScrollbarWithIdentifier
:(long)ident type
:(int)type
;
95 - (void)destroyScrollbarWithIdentifier
:(long)ident
;
96 - (void)showScrollbarWithIdentifier
:(long)ident state
:(int)visible
;
97 - (void)setScrollbarPosition
:(int)pos length
:(int)len identifier
:(long)ident
;
98 - (void)setScrollbarThumbValue
:(long)val size
:(long)size max
:(long)max
99 identifier
:(long)ident
;
100 - (BOOL
)setFontWithName
:(char *)name
;
101 - (void)executeActionWithName
:(NSString
*)name
;
102 - (void)setMouseShape
:(int)shape
;
103 - (void)setBlinkWait
:(int)wait on
:(int)on off
:(int)off
;
106 - (void)adjustLinespace
:(int)linespace
;
109 - (int)lookupColorWithKey
:(NSString
*)key
;
110 - (BOOL
)hasSpecialKeyWithValue
:(NSString
*)value
;