|
168 | 168 | // Vim. These can be sent in processInput:data: and in processCommandQueue:. |
169 | 169 | // |
170 | 170 |
|
171 | | -// NOTE! This array must be updated whenever the enum below changes! |
172 | | -extern char *MessageStrings[]; |
| 171 | +extern const char * const MMVimMsgIDStrings[]; |
| 172 | + |
| 173 | +#define FOREACH_MMVimMsgID(MSG) \ |
| 174 | + MSG(NullMsgID) \ |
| 175 | + MSG(OpenWindowMsgID) \ |
| 176 | + MSG(KeyDownMsgID) \ |
| 177 | + MSG(BatchDrawMsgID) \ |
| 178 | + MSG(SelectTabMsgID) \ |
| 179 | + MSG(CloseTabMsgID) \ |
| 180 | + MSG(AddNewTabMsgID) \ |
| 181 | + MSG(DraggedTabMsgID) \ |
| 182 | + MSG(UpdateTabBarMsgID) \ |
| 183 | + MSG(ShowTabBarMsgID) \ |
| 184 | + MSG(HideTabBarMsgID) \ |
| 185 | + MSG(SetTextRowsMsgID) \ |
| 186 | + MSG(SetTextColumnsMsgID) \ |
| 187 | + MSG(SetTextDimensionsMsgID) \ |
| 188 | + MSG(SetTextDimensionsNoResizeWindowMsgID) \ |
| 189 | + MSG(LiveResizeMsgID) \ |
| 190 | + MSG(SetTextDimensionsReplyMsgID) \ |
| 191 | + MSG(ResizeViewMsgID) \ |
| 192 | + MSG(SetWindowTitleMsgID) \ |
| 193 | + MSG(ScrollWheelMsgID) \ |
| 194 | + MSG(MouseDownMsgID) \ |
| 195 | + MSG(MouseUpMsgID) \ |
| 196 | + MSG(MouseDraggedMsgID) \ |
| 197 | + MSG(FlushQueueMsgID) \ |
| 198 | + MSG(AddMenuMsgID) \ |
| 199 | + MSG(AddMenuItemMsgID) \ |
| 200 | + MSG(RemoveMenuItemMsgID) \ |
| 201 | + MSG(EnableMenuItemMsgID) \ |
| 202 | + MSG(ExecuteMenuMsgID) \ |
| 203 | + MSG(ShowToolbarMsgID) \ |
| 204 | + MSG(ToggleToolbarMsgID) \ |
| 205 | + MSG(CreateScrollbarMsgID) \ |
| 206 | + MSG(DestroyScrollbarMsgID) \ |
| 207 | + MSG(ShowScrollbarMsgID) \ |
| 208 | + MSG(SetScrollbarPositionMsgID) \ |
| 209 | + MSG(SetScrollbarThumbMsgID) \ |
| 210 | + MSG(ScrollbarEventMsgID) \ |
| 211 | + MSG(SetFontMsgID) \ |
| 212 | + MSG(SetWideFontMsgID) \ |
| 213 | + MSG(VimShouldCloseMsgID) \ |
| 214 | + MSG(SetDefaultColorsMsgID) \ |
| 215 | + MSG(ExecuteActionMsgID) \ |
| 216 | + MSG(DropFilesMsgID) \ |
| 217 | + MSG(DropStringMsgID) \ |
| 218 | + MSG(ShowPopupMenuMsgID) \ |
| 219 | + MSG(GotFocusMsgID) \ |
| 220 | + MSG(LostFocusMsgID) \ |
| 221 | + MSG(MouseMovedMsgID) \ |
| 222 | + MSG(SetMouseShapeMsgID) \ |
| 223 | + MSG(AdjustLinespaceMsgID) \ |
| 224 | + MSG(AdjustColumnspaceMsgID) \ |
| 225 | + MSG(ActivateMsgID) \ |
| 226 | + MSG(SetServerNameMsgID) \ |
| 227 | + MSG(EnterFullScreenMsgID) \ |
| 228 | + MSG(LeaveFullScreenMsgID) \ |
| 229 | + MSG(SetBuffersModifiedMsgID) \ |
| 230 | + MSG(AddInputMsgID) \ |
| 231 | + MSG(SetPreEditPositionMsgID) \ |
| 232 | + MSG(TerminateNowMsgID) \ |
| 233 | + MSG(XcodeModMsgID) \ |
| 234 | + MSG(EnableAntialiasMsgID) \ |
| 235 | + MSG(DisableAntialiasMsgID) \ |
| 236 | + MSG(SetVimStateMsgID) \ |
| 237 | + MSG(SetDocumentFilenameMsgID) \ |
| 238 | + MSG(OpenWithArgumentsMsgID) \ |
| 239 | + MSG(CloseWindowMsgID) \ |
| 240 | + MSG(SetFullScreenColorMsgID) \ |
| 241 | + MSG(ShowFindReplaceDialogMsgID) \ |
| 242 | + MSG(FindReplaceMsgID) \ |
| 243 | + MSG(UseSelectionForFindMsgID) \ |
| 244 | + MSG(ActivateKeyScriptMsgID) \ |
| 245 | + MSG(DeactivateKeyScriptMsgID) \ |
| 246 | + MSG(EnableImControlMsgID) \ |
| 247 | + MSG(DisableImControlMsgID) \ |
| 248 | + MSG(ActivatedImMsgID) \ |
| 249 | + MSG(DeactivatedImMsgID) \ |
| 250 | + MSG(BrowseForFileMsgID) \ |
| 251 | + MSG(ShowDialogMsgID) \ |
| 252 | + MSG(SetMarkedTextMsgID) \ |
| 253 | + MSG(ZoomMsgID) \ |
| 254 | + MSG(SetWindowPositionMsgID) \ |
| 255 | + MSG(DeleteSignMsgID) \ |
| 256 | + MSG(SetTooltipMsgID) \ |
| 257 | + MSG(SetTooltipDelayMsgID) \ |
| 258 | + MSG(GestureMsgID) \ |
| 259 | + MSG(AddToMRUMsgID) \ |
| 260 | + MSG(BackingPropertiesChangedMsgID) \ |
| 261 | + MSG(SetBlurRadiusMsgID) \ |
| 262 | + MSG(EnableLigaturesMsgID) \ |
| 263 | + MSG(DisableLigaturesMsgID) \ |
| 264 | + MSG(EnableThinStrokesMsgID) \ |
| 265 | + MSG(DisableThinStrokesMsgID) \ |
| 266 | + MSG(LastMsgID) \ |
173 | 267 |
|
174 | 268 | enum { |
175 | | - OpenWindowMsgID = 1, // NOTE: FIRST IN ENUM MUST BE 1 |
176 | | - KeyDownMsgID, |
177 | | - BatchDrawMsgID, |
178 | | - SelectTabMsgID, |
179 | | - CloseTabMsgID, |
180 | | - AddNewTabMsgID, |
181 | | - DraggedTabMsgID, |
182 | | - UpdateTabBarMsgID, |
183 | | - ShowTabBarMsgID, |
184 | | - HideTabBarMsgID, |
185 | | - SetTextRowsMsgID, |
186 | | - SetTextColumnsMsgID, |
187 | | - SetTextDimensionsMsgID, |
188 | | - SetTextDimensionsNoResizeWindowMsgID, |
189 | | - LiveResizeMsgID, |
190 | | - SetTextDimensionsReplyMsgID, |
191 | | - ResizeViewMsgID, |
192 | | - SetWindowTitleMsgID, |
193 | | - ScrollWheelMsgID, |
194 | | - MouseDownMsgID, |
195 | | - MouseUpMsgID, |
196 | | - MouseDraggedMsgID, |
197 | | - FlushQueueMsgID, |
198 | | - AddMenuMsgID, |
199 | | - AddMenuItemMsgID, |
200 | | - RemoveMenuItemMsgID, |
201 | | - EnableMenuItemMsgID, |
202 | | - ExecuteMenuMsgID, |
203 | | - ShowToolbarMsgID, |
204 | | - ToggleToolbarMsgID, |
205 | | - CreateScrollbarMsgID, |
206 | | - DestroyScrollbarMsgID, |
207 | | - ShowScrollbarMsgID, |
208 | | - SetScrollbarPositionMsgID, |
209 | | - SetScrollbarThumbMsgID, |
210 | | - ScrollbarEventMsgID, |
211 | | - SetFontMsgID, |
212 | | - SetWideFontMsgID, |
213 | | - VimShouldCloseMsgID, |
214 | | - SetDefaultColorsMsgID, |
215 | | - ExecuteActionMsgID, |
216 | | - DropFilesMsgID, |
217 | | - DropStringMsgID, |
218 | | - ShowPopupMenuMsgID, |
219 | | - GotFocusMsgID, |
220 | | - LostFocusMsgID, |
221 | | - MouseMovedMsgID, |
222 | | - SetMouseShapeMsgID, |
223 | | - AdjustLinespaceMsgID, |
224 | | - AdjustColumnspaceMsgID, |
225 | | - ActivateMsgID, |
226 | | - SetServerNameMsgID, |
227 | | - EnterFullScreenMsgID, |
228 | | - LeaveFullScreenMsgID, |
229 | | - SetBuffersModifiedMsgID, |
230 | | - AddInputMsgID, |
231 | | - SetPreEditPositionMsgID, |
232 | | - TerminateNowMsgID, |
233 | | - XcodeModMsgID, |
234 | | - EnableAntialiasMsgID, |
235 | | - DisableAntialiasMsgID, |
236 | | - SetVimStateMsgID, |
237 | | - SetDocumentFilenameMsgID, |
238 | | - OpenWithArgumentsMsgID, |
239 | | - CloseWindowMsgID, |
240 | | - SetFullScreenColorMsgID, |
241 | | - ShowFindReplaceDialogMsgID, |
242 | | - FindReplaceMsgID, |
243 | | - UseSelectionForFindMsgID, |
244 | | - ActivateKeyScriptMsgID, |
245 | | - DeactivateKeyScriptMsgID, |
246 | | - EnableImControlMsgID, |
247 | | - DisableImControlMsgID, |
248 | | - ActivatedImMsgID, |
249 | | - DeactivatedImMsgID, |
250 | | - BrowseForFileMsgID, |
251 | | - ShowDialogMsgID, |
252 | | - SetMarkedTextMsgID, |
253 | | - ZoomMsgID, |
254 | | - SetWindowPositionMsgID, |
255 | | - DeleteSignMsgID, |
256 | | - SetTooltipMsgID, |
257 | | - SetTooltipDelayMsgID, |
258 | | - GestureMsgID, |
259 | | - AddToMRUMsgID, |
260 | | - BackingPropertiesChangedMsgID, |
261 | | - SetBlurRadiusMsgID, |
262 | | - EnableLigaturesMsgID, |
263 | | - DisableLigaturesMsgID, |
264 | | - EnableThinStrokesMsgID, |
265 | | - DisableThinStrokesMsgID, |
266 | | - LastMsgID // NOTE: MUST BE LAST MESSAGE IN ENUM! |
| 269 | +#define ENUM_ENTRY(X) X, |
| 270 | + FOREACH_MMVimMsgID(ENUM_ENTRY) |
| 271 | +#undef ENUM_ENTRY |
267 | 272 | }; |
268 | 273 |
|
269 | 274 |
|
|
0 commit comments