Removed some warning logs
[MacVim/jjgod.git] / MacVim.h
blob7d3f0a528ed82125dd637a82e62c8d21edc475ac
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 // Enable to use experimental 'enc' support.
15 #define MM_ENABLE_CONV 0
20 // This is the protocol MMBackend implements.
22 // Only processInput:data: is allowed to cause state changes in Vim; all other
23 // messages should only read the Vim state. (Note that setDialogReturn: is an
24 // exception to this rule; there really is no other way to deal with dialogs
25 // since they work with callbacks, so we cannot wait for them to return.)
27 // Be careful with messages with return type other than 'oneway void' -- there
28 // is a reply timeout set in MMAppController, if a message fails to get a
29 // response within the given timeout an exception will be thrown. Use
30 // @try/@catch/@finally to deal with timeouts.
32 @protocol MMBackendProtocol
33 - (oneway void)processInput:(int)msgid data:(in NSData *)data;
34 - (oneway void)processInputAndData:(in NSArray *)messages;
35 - (BOOL)checkForModifiedBuffers;
36 - (oneway void)setDialogReturn:(in bycopy id)obj;
37 - (BOOL)starRegisterToPasteboard:(byref NSPasteboard *)pboard;
38 - (NSString *)evaluateExpression:(in bycopy NSString *)expr;
39 @end
43 // This is the protocol MMVimController implements.
45 @protocol MMFrontendProtocol
46 - (oneway void)processCommandQueue:(in NSArray *)queue;
47 - (oneway void)showSavePanelForDirectory:(in bycopy NSString *)dir
48 title:(in bycopy NSString *)title
49 saving:(int)saving;
50 - (oneway void)presentDialogWithStyle:(int)style
51 message:(in bycopy NSString *)message
52 informativeText:(in bycopy NSString *)text
53 buttonTitles:(in bycopy NSArray *)buttonTitles
54 textFieldString:(in bycopy NSString *)textFieldString;
55 @end
59 // This is the protocol MMAppController implements.
61 // It handles connections between MacVim and Vim.
63 @protocol MMAppProtocol
64 - (byref id <MMFrontendProtocol>)connectBackend:
65 (byref in id <MMBackendProtocol>)backend pid:(int)pid;
66 - (NSArray *)serverList;
67 @end
72 // The following enum lists all messages that are passed between MacVim and
73 // Vim. These can be sent in processInput:data: and in processCommandQueue:.
76 // NOTE! This array must be updated whenever the enum below changes!
77 extern char *MessageStrings[];
79 enum {
80 OpenVimWindowMsgID = 1,
81 InsertTextMsgID,
82 KeyDownMsgID,
83 CmdKeyMsgID,
84 BatchDrawMsgID,
85 SelectTabMsgID,
86 CloseTabMsgID,
87 AddNewTabMsgID,
88 DraggedTabMsgID,
89 UpdateTabBarMsgID,
90 ShowTabBarMsgID,
91 HideTabBarMsgID,
92 SetTextDimensionsMsgID,
93 SetVimWindowTitleMsgID,
94 ScrollWheelMsgID,
95 MouseDownMsgID,
96 MouseUpMsgID,
97 MouseDraggedMsgID,
98 FlushQueueMsgID,
99 AddMenuMsgID,
100 AddMenuItemMsgID,
101 RemoveMenuItemMsgID,
102 EnableMenuItemMsgID,
103 ExecuteMenuMsgID,
104 ShowToolbarMsgID,
105 ToggleToolbarMsgID,
106 CreateScrollbarMsgID,
107 DestroyScrollbarMsgID,
108 ShowScrollbarMsgID,
109 SetScrollbarPositionMsgID,
110 SetScrollbarThumbMsgID,
111 ScrollbarEventMsgID,
112 SetFontMsgID,
113 VimShouldCloseMsgID,
114 SetDefaultColorsMsgID,
115 ExecuteActionMsgID,
116 DropFilesMsgID,
117 DropStringMsgID,
118 ShowPopupMenuMsgID,
119 GotFocusMsgID,
120 LostFocusMsgID,
121 MouseMovedMsgID,
122 SetMouseShapeMsgID,
123 AdjustLinespaceMsgID,
124 ActivateMsgID,
125 ServerAddInputMsgID,
129 enum {
130 ClearAllDrawType = 1,
131 ClearBlockDrawType,
132 DeleteLinesDrawType,
133 ReplaceStringDrawType,
134 InsertLinesDrawType,
135 DrawCursorDrawType
138 enum {
139 MMInsertionPointBlock,
140 MMInsertionPointHorizontal,
141 MMInsertionPointVertical,
142 MMInsertionPointHollow,
146 // NOTE! These values must be close to zero, or the 'add menu' message might
147 // fail to distinguish type from tag.
148 enum {
149 MenuMenubarType = 0,
150 MenuPopupType,
151 MenuToolbarType
155 enum {
156 ToolbarLabelFlag = 1,
157 ToolbarIconFlag = 2,
158 ToolbarSizeRegularFlag = 4
162 // NSUserDefaults keys
163 extern NSString *MMNoWindowKey;
164 extern NSString *MMTabMinWidthKey;
165 extern NSString *MMTabMaxWidthKey;
166 extern NSString *MMTabOptimumWidthKey;
167 extern NSString *MMTextInsetLeftKey;
168 extern NSString *MMTextInsetRightKey;
169 extern NSString *MMTextInsetTopKey;
170 extern NSString *MMTextInsetBottomKey;
171 extern NSString *MMTerminateAfterLastWindowClosedKey;
172 extern NSString *MMTypesetterKey;
173 extern NSString *MMCellWidthMultiplierKey;
174 extern NSString *MMBaselineOffsetKey;
175 extern NSString *MMTranslateCtrlClickKey;
176 extern NSString *MMTopLeftPointKey;
177 extern NSString *MMOpenFilesInTabsKey;
182 // vim: set ft=objc: