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>
18 @interface MMBackend
: NSObject
<MMBackendProtocol
, MMVimServerProtocol
,
19 MMVimClientProtocol
> {
20 NSMutableArray
*outputQueue
;
21 NSMutableArray
*inputQueue
;
22 NSMutableData
*drawData
;
23 NSConnection
*connection
;
25 NSDictionary
*colorDict
;
26 NSDictionary
*sysColorDict
;
27 NSDictionary
*actionDict
;
30 unsigned backgroundColor
;
31 unsigned foregroundColor
;
32 unsigned specialColor
;
33 unsigned defaultBackgroundColor
;
34 unsigned defaultForegroundColor
;
35 NSDate
*lastFlushDate
;
39 NSTimeInterval blinkWaitInterval
;
40 NSTimeInterval blinkOnInterval
;
41 NSTimeInterval blinkOffInterval
;
42 NSMutableDictionary
*connectionNameDict
;
43 NSMutableDictionary
*clientProxyDict
;
44 NSMutableDictionary
*serverReplyDict
;
45 NSString
*alternateServerName
;
46 ATSFontContainerRef fontContainerRef
;
51 + (MMBackend
*)sharedInstance
;
53 - (void)setBackgroundColor
:(int)color
;
54 - (void)setForegroundColor
:(int)color
;
55 - (void)setSpecialColor
:(int)color
;
56 - (void)setDefaultColorsBackground
:(int)bg foreground
:(int)fg
;
57 - (NSConnection
*)connection
;
58 - (NSDictionary
*)actionDict
;
61 - (BOOL
)openVimWindow
;
63 - (void)clearBlockFromRow
:(int)row1 column
:(int)col1
64 toRow
:(int)row2 column
:(int)col2
;
65 - (void)deleteLinesFromRow
:(int)row count
:(int)count
66 scrollBottom
:(int)bottom left
:(int)left right
:(int)right
;
67 - (void)drawString
:(char*)s length
:(int)len row
:(int)row column
:(int)col
68 cells
:(int)cells flags
:(int)flags
;
69 - (void)insertLinesFromRow
:(int)row count
:(int)count
70 scrollBottom
:(int)bottom left
:(int)left right
:(int)right
;
71 - (void)drawCursorAtRow
:(int)row column
:(int)col shape
:(int)shape
72 fraction
:(int)percent color
:(int)color
;
74 - (void)flushQueue
:(BOOL
)force
;
75 - (BOOL
)waitForInput
:(int)milliseconds
;
77 - (void)selectTab
:(int)index
;
79 - (BOOL
)tabBarVisible
;
80 - (void)showTabBar
:(BOOL
)enable
;
81 - (void)setRows
:(int)rows columns
:(int)cols
;
82 - (void)setWindowTitle
:(char *)title
;
83 - (char *)browseForFileInDirectory
:(char *)dir title
:(char *)title
85 - (int)presentDialogWithType
:(int)type title
:(char *)title message
:(char *)msg
86 buttons
:(char *)btns textField
:(char *)txtfield
;
87 - (void)addMenuWithTag
:(int)tag parent
:(int)parentTag name
:(char *)name
89 - (void)addMenuItemWithTag
:(int)tag parent
:(int)parentTag name
:(char *)name
90 tip
:(char *)tip icon
:(char *)icon
91 keyEquivalent
:(int)key modifiers
:(int)mods
92 action
:(char *)action isAlternate
:(int)isAlt
94 - (void)removeMenuItemWithTag
:(int)tag
;
95 - (void)enableMenuItemWithTag
:(int)tag state
:(int)enabled
;
96 - (void)showPopupMenuWithName
:(char *)name atMouseLocation
:(BOOL
)mouse
;
97 - (void)showToolbar
:(int)enable flags
:(int)flags
;
98 - (void)createScrollbarWithIdentifier
:(long)ident type
:(int)type
;
99 - (void)destroyScrollbarWithIdentifier
:(long)ident
;
100 - (void)showScrollbarWithIdentifier
:(long)ident state
:(int)visible
;
101 - (void)setScrollbarPosition
:(int)pos length
:(int)len identifier
:(long)ident
;
102 - (void)setScrollbarThumbValue
:(long)val size
:(long)size max
:(long)max
103 identifier
:(long)ident
;
104 - (void)setFont
:(NSFont
*)font
;
105 - (void)setWideFont
:(NSFont
*)font
;
106 - (void)executeActionWithName
:(NSString
*)name
;
107 - (void)setMouseShape
:(int)shape
;
108 - (void)setBlinkWait
:(int)wait on
:(int)on off
:(int)off
;
111 - (void)adjustLinespace
:(int)linespace
;
113 - (void)setPreEditRow
:(int)row column
:(int)col
;
115 - (int)lookupColorWithKey
:(NSString
*)key
;
116 - (BOOL
)hasSpecialKeyWithValue
:(NSString
*)value
;
118 - (void)enterFullscreen
:(int)fuoptions background
:(int)bg
;
119 - (void)leaveFullscreen
;
121 - (void)setAntialias
:(BOOL
)antialias
;
123 - (void)updateModifiedFlag
;
125 - (void)registerServerWithName
:(NSString
*)name
;
126 - (BOOL
)sendToServer
:(NSString
*)name string
:(NSString
*)string
127 reply
:(char_u
**)reply port
:(int *)port expression
:(BOOL
)expr
129 - (NSArray
*)serverList
;
130 - (NSString
*)peekForReplyOnPort
:(int)port
;
131 - (NSString
*)waitForReplyOnPort
:(int)port
;
132 - (BOOL
)sendReply
:(NSString
*)reply toPort
:(int)port
;