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 <Cocoa/Cocoa.h>
17 // This is the protocol MMBackend implements.
19 // Only processInput:data: is allowed to cause state changes in Vim; all other
20 // messages should only read the Vim state.
22 @protocol MMBackendProtocol
23 - (oneway
void)processInput
:(int)msgid data
:(in NSData
*)data
;
24 - (BOOL
)checkForModifiedBuffers
;
25 - (oneway
void)setBrowseForFileString
:(in bycopy NSString
*)string
;
26 - (BOOL
)starRegisterToPasteboard
:(byref NSPasteboard
*)pboard
;
27 - (BOOL
)starRegisterFromPasteboard
:(byref NSPasteboard
*)pboard
;
32 // This is the protocol MMVimController implements.
34 @protocol MMFrontendProtocol
35 - (oneway
void)processCommandQueue
:(in NSArray
*)queue
;
36 - (oneway
void)showSavePanelForDirectory
:(in bycopy NSString
*)dir
37 title
:(in bycopy NSString
*)title
43 // This is the protocol MMAppController implements.
45 // It handles connections between MacVim and Vim.
47 @protocol MMAppProtocol
48 - (byref id
<MMFrontendProtocol
>)connectBackend
:
49 (byref in id
<MMBackendProtocol
>)backend pid
:(int)pid
;
55 // The following enum lists all messages that are passed between MacVim and
56 // Vim. These can be sent in processInput:data: and in processCommandQueue:.
59 // NOTE! This array must be updated whenever the enum below changes!
60 extern char *MessageStrings
[];
79 SetTextDimensionsMsgID
,
80 SetVimWindowTitleMsgID
,
86 BrowseForFileReplyMsgID
,
88 UpdateInsertionPointMsgID
,
97 DestroyScrollbarMsgID
,
99 SetScrollbarPositionMsgID
,
100 SetScrollbarThumbMsgID
,
104 SetDefaultColorsMsgID
,
113 ClearAllDrawType
= 1,
116 ReplaceStringDrawType
,
121 // NOTE! These values must be close to zero, or the 'add menu' message might
122 // fail to distinguish type from tag.
131 ToolbarLabelFlag
= 1,
133 ToolbarSizeRegularFlag
= 4
137 // NSUserDefaults keys
138 extern NSString
*MMNoWindowKey
;
139 extern NSString
*MMTabMinWidthKey
;
140 extern NSString
*MMTabMaxWidthKey
;
141 extern NSString
*MMTabOptimumWidthKey
;
142 extern NSString
*MMStatuslineOffKey
;
143 extern NSString
*MMTextInsetLeftKey
;
144 extern NSString
*MMTextInsetRightKey
;
145 extern NSString
*MMTextInsetTopKey
;
146 extern NSString
*MMTextInsetBottomKey
;
147 extern NSString
*MMTerminateAfterLastWindowClosedKey
;
148 extern NSString
*MMTypesetterKey
;
149 extern NSString
*MMCellWidthMultiplierKey
;
150 extern NSString
*MMBaselineOffsetKey
;
151 extern NSString
*MMTranslateCtrlClickKey
;
152 extern NSString
*MMTopLeftPointKey
;