Ctrl-C is intercepted in MacVim and sends SIGINT to Vim process.
[MacVim/jjgod.git] / MacVim.h
blobcdab0ff12c9879043027596655115bcfaed73428
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>
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;
28 @end
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
38 saving:(int)saving;
39 @end
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;
50 @end
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[];
62 enum {
63 CheckinMsgID = 1,
64 ConnectedMsgID,
65 KillTaskMsgID,
66 TaskExitedMsgID,
67 OpenVimWindowMsgID,
68 InsertTextMsgID,
69 KeyDownMsgID,
70 CmdKeyMsgID,
71 BatchDrawMsgID,
72 SelectTabMsgID,
73 CloseTabMsgID,
74 AddNewTabMsgID,
75 DraggedTabMsgID,
76 UpdateTabBarMsgID,
77 ShowTabBarMsgID,
78 HideTabBarMsgID,
79 SetTextDimensionsMsgID,
80 SetVimWindowTitleMsgID,
81 ScrollWheelMsgID,
82 MouseDownMsgID,
83 MouseUpMsgID,
84 MouseDraggedMsgID,
85 BrowseForFileMsgID,
86 BrowseForFileReplyMsgID,
87 FlushQueueMsgID,
88 UpdateInsertionPointMsgID,
89 AddMenuMsgID,
90 AddMenuItemMsgID,
91 RemoveMenuItemMsgID,
92 EnableMenuItemMsgID,
93 ExecuteMenuMsgID,
94 ShowToolbarMsgID,
95 ToggleToolbarMsgID,
96 CreateScrollbarMsgID,
97 DestroyScrollbarMsgID,
98 ShowScrollbarMsgID,
99 SetScrollbarPositionMsgID,
100 SetScrollbarThumbMsgID,
101 ScrollbarEventMsgID,
102 SetFontMsgID,
103 VimShouldCloseMsgID,
104 SetDefaultColorsMsgID,
105 ExecuteActionMsgID,
106 DropFilesMsgID,
107 DropStringMsgID,
108 ShowPopupMenuMsgID,
112 enum {
113 ClearAllDrawType = 1,
114 ClearBlockDrawType,
115 DeleteLinesDrawType,
116 ReplaceStringDrawType,
117 InsertLinesDrawType
121 // NOTE! These values must be close to zero, or the 'add menu' message might
122 // fail to distinguish type from tag.
123 enum {
124 MenuMenubarType = 0,
125 MenuPopupType,
126 MenuToolbarType
130 enum {
131 ToolbarLabelFlag = 1,
132 ToolbarIconFlag = 2,
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;
157 // vim: set ft=objc: