Changed File and Window menus to follow Apple HIG more closely.
[MacVim/jjgod.git] / MacVim.h
blob187ab7af9d12c186a8a1bd4091eac083c8d345fd
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.
9 */
11 #import <Cocoa/Cocoa.h>
14 #define MM_USE_DO 1
15 #define MM_DELAY_SEND_IN_PROCESS_CMD_QUEUE 1
19 #if MM_USE_DO
21 @protocol MMBackendProtocol
22 - (oneway void)processInput:(int)msgid data:(in NSData *)data;
23 - (BOOL)checkForModifiedBuffers;
24 - (oneway void)setBrowseForFileString:(in bycopy NSString *)string;
25 @end
27 @protocol MMFrontendProtocol
28 - (oneway void)processCommandQueue:(in NSArray *)queue;
29 - (oneway void)showSavePanelForDirectory:(in bycopy NSString *)dir
30 title:(in bycopy NSString *)title
31 saving:(int)saving;
32 @end
34 @protocol MMAppProtocol
35 - (byref id <MMFrontendProtocol>)connectBackend:
36 (byref in id <MMBackendProtocol>)backend;
37 @end
39 #endif
42 // NOTE! This array must be updated whenever the enum below changes!
43 extern char *MessageStrings[];
45 enum {
46 CheckinMsgID = 1,
47 ConnectedMsgID,
48 KillTaskMsgID,
49 TaskExitedMsgID,
50 OpenVimWindowMsgID,
51 InsertTextMsgID,
52 KeyDownMsgID,
53 CmdKeyMsgID,
54 BatchDrawMsgID,
55 SelectTabMsgID,
56 CloseTabMsgID,
57 AddNewTabMsgID,
58 DraggedTabMsgID,
59 UpdateTabBarMsgID,
60 ShowTabBarMsgID,
61 HideTabBarMsgID,
62 SetTextDimensionsMsgID,
63 SetVimWindowTitleMsgID,
64 ScrollWheelMsgID,
65 MouseDownMsgID,
66 MouseUpMsgID,
67 MouseDraggedMsgID,
68 BrowseForFileMsgID,
69 BrowseForFileReplyMsgID,
70 FlushQueueMsgID,
71 UpdateInsertionPointMsgID,
72 AddMenuMsgID,
73 AddMenuItemMsgID,
74 RemoveMenuItemMsgID,
75 EnableMenuItemMsgID,
76 ExecuteMenuMsgID,
77 ShowToolbarMsgID,
78 #if !MM_USE_DO
79 TaskShouldTerminateMsgID,
80 TerminateReplyYesMsgID,
81 TerminateReplyNoMsgID,
82 #endif
83 CreateScrollbarMsgID,
84 DestroyScrollbarMsgID,
85 ShowScrollbarMsgID,
86 SetScrollbarPositionMsgID,
87 SetScrollbarThumbMsgID,
88 ScrollbarEventMsgID,
89 SetFontMsgID,
90 VimShouldCloseMsgID,
91 SetDefaultColorsMsgID,
92 ExecuteActionMsgID,
96 enum {
97 ClearAllDrawType = 1,
98 ClearBlockDrawType,
99 DeleteLinesDrawType,
100 ReplaceStringDrawType,
101 InsertLinesDrawType
105 // NOTE! These values must be close to zero, or the 'add menu' message might
106 // fail to distinguish type from tag.
107 enum {
108 MenuMenubarType = 0,
109 MenuPopupType,
110 MenuToolbarType
114 enum {
115 ToolbarLabelFlag = 1,
116 ToolbarIconFlag = 2,
117 ToolbarSizeRegularFlag = 4
121 @interface NSPortMessage (MacVim)
123 + (BOOL)sendMessage:(int)msgid withSendPort:(NSPort *)sendPort
124 receivePort:(NSPort *)receivePort components:(NSArray *)components
125 wait:(BOOL)wait;
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;
136 @end
138 // vim: set ft=objc: