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>
15 #define MM_DELAY_SEND_IN_PROCESS_CMD_QUEUE 1
21 @protocol MMBackendProtocol
22 - (oneway
void)processInput
:(int)msgid data
:(in NSData
*)data
;
23 - (BOOL
)checkForModifiedBuffers
;
24 - (oneway
void)setBrowseForFileString
:(in bycopy NSString
*)string
;
27 @protocol MMFrontendProtocol
28 - (oneway
void)processCommandQueue
:(in NSArray
*)queue
;
29 - (oneway
void)showSavePanelForDirectory
:(in bycopy NSString
*)dir
30 title
:(in bycopy NSString
*)title
34 @protocol MMAppProtocol
35 - (byref id
<MMFrontendProtocol
>)connectBackend
:
36 (byref in id
<MMBackendProtocol
>)backend
;
42 // NOTE! This array must be updated whenever the enum below changes!
43 extern char *MessageStrings
[];
62 SetTextDimensionsMsgID
,
63 SetVimWindowTitleMsgID
,
69 BrowseForFileReplyMsgID
,
71 UpdateInsertionPointMsgID
,
79 TaskShouldTerminateMsgID
,
80 TerminateReplyYesMsgID
,
81 TerminateReplyNoMsgID
,
84 DestroyScrollbarMsgID
,
86 SetScrollbarPositionMsgID
,
87 SetScrollbarThumbMsgID
,
91 SetDefaultColorsMsgID
,
100 ReplaceStringDrawType
,
105 // NOTE! These values must be close to zero, or the 'add menu' message might
106 // fail to distinguish type from tag.
115 ToolbarLabelFlag
= 1,
117 ToolbarSizeRegularFlag
= 4
121 @interface
NSPortMessage (MacVim
)
123 + (BOOL
)sendMessage
:(int)msgid withSendPort
:(NSPort
*)sendPort
124 receivePort
:(NSPort
*)receivePort components
:(NSArray
*)components
126 + (BOOL
)sendMessage
:(int)msgid withSendPort
:(NSPort
*)sendPort
127 receivePort
:(NSPort
*)receivePort data
:(NSData
*)data wait
:(BOOL
)wait
;
128 + (BOOL
)sendMessage
:(int)msgid withSendPort
:(NSPort
*)sendPort
129 receivePort
:(NSPort
*)receivePort wait
:(BOOL
)wait
;
130 + (BOOL
)sendMessage
:(int)msgid withSendPort
:(NSPort
*)sendPort
131 components
:(NSArray
*)components wait
:(BOOL
)wait
;
132 + (BOOL
)sendMessage
:(int)msgid withSendPort
:(NSPort
*)sendPort
133 data
:(NSData
*)data wait
:(BOOL
)wait
;
134 + (BOOL
)sendMessage
:(int)msgid withSendPort
:(NSPort
*)sendPort wait
:(BOOL
)wait
;