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 @interface MMBackend
: NSObject
<MMBackendProtocol
> {
16 NSMutableArray
*queue
;
17 NSMutableData
*drawData
;
18 NSConnection
*connection
;
20 NSDictionary
*colorDict
;
26 int defaultBackgroundColor
;
27 int defaultForegroundColor
;
28 NSDate
*lastFlushDate
;
32 NSTimeInterval blinkWaitInterval
;
33 NSTimeInterval blinkOnInterval
;
34 NSTimeInterval blinkOffInterval
;
37 + (MMBackend
*)sharedInstance
;
39 - (void)setBackgroundColor
:(int)color
;
40 - (void)setForegroundColor
:(int)color
;
41 - (void)setSpecialColor
:(int)color
;
42 - (void)setDefaultColorsBackground
:(int)bg foreground
:(int)fg
;
45 - (BOOL
)openVimWindow
;
47 - (void)clearBlockFromRow
:(int)row1 column
:(int)col1
48 toRow
:(int)row2 column
:(int)col2
;
49 - (void)deleteLinesFromRow
:(int)row count
:(int)count
50 scrollBottom
:(int)bottom left
:(int)left right
:(int)right
;
51 - (void)replaceString
:(char*)s length
:(int)len row
:(int)row column
:(int)col
53 - (void)insertLinesFromRow
:(int)row count
:(int)count
54 scrollBottom
:(int)bottom left
:(int)left right
:(int)right
;
55 - (void)drawCursorAtRow
:(int)row column
:(int)col shape
:(int)shape
56 fraction
:(int)percent color
:(int)color
;
57 - (void)flushQueue
:(BOOL
)force
;
58 - (BOOL
)waitForInput
:(int)milliseconds
;
60 - (void)selectTab
:(int)index
;
62 - (BOOL
)tabBarVisible
;
63 - (void)showTabBar
:(BOOL
)enable
;
64 - (void)setRows
:(int)rows columns
:(int)cols
;
65 - (void)setVimWindowTitle
:(char *)title
;
66 - (char *)browseForFileInDirectory
:(char *)dir title
:(char *)title
68 - (int)presentDialogWithType
:(int)type title
:(char *)title message
:(char *)msg
69 buttons
:(char *)btns textField
:(char *)txtfield
;
70 - (void)addMenuWithTag
:(int)tag parent
:(int)parentTag name
:(char *)name
72 - (void)addMenuItemWithTag
:(int)tag parent
:(int)parentTag name
:(char *)name
73 tip
:(char *)tip icon
:(char *)icon
74 keyEquivalent
:(int)key modifiers
:(int)mods
75 action
:(NSString
*)action atIndex
:(int)index
;
76 - (void)removeMenuItemWithTag
:(int)tag
;
77 - (void)enableMenuItemWithTag
:(int)tag state
:(int)enabled
;
78 - (void)showPopupMenuWithName
:(char *)name atMouseLocation
:(BOOL
)mouse
;
79 - (void)showToolbar
:(int)enable flags
:(int)flags
;
80 - (void)createScrollbarWithIdentifier
:(long)ident type
:(int)type
;
81 - (void)destroyScrollbarWithIdentifier
:(long)ident
;
82 - (void)showScrollbarWithIdentifier
:(long)ident state
:(int)visible
;
83 - (void)setScrollbarPosition
:(int)pos length
:(int)len identifier
:(long)ident
;
84 - (void)setScrollbarThumbValue
:(long)val size
:(long)size max
:(long)max
85 identifier
:(long)ident
;
86 - (BOOL
)setFontWithName
:(char *)name
;
87 - (void)executeActionWithName
:(NSString
*)name
;
88 - (void)setMouseShape
:(int)shape
;
89 - (void)setBlinkWait
:(int)wait on
:(int)on off
:(int)off
;
93 - (int)lookupColorWithKey
:(NSString
*)key
;