Guard against re-entrant calls to process input
[MacVim.git] / src / MacVim / MMAppController.h
blob9eabe982a3acf0982d2bc1c3be0ac811e1a76d7a
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>
12 #import "MacVim.h"
15 @class MMWindowController;
16 @class MMVimController;
19 @interface MMAppController : NSObject <MMAppProtocol> {
20 NSConnection *connection;
21 NSMutableArray *vimControllers;
22 NSString *openSelectionString;
23 ATSFontContainerRef fontContainerRef;
24 NSMutableDictionary *pidArguments;
25 NSMenu *defaultMainMenu;
26 NSMenuItem *appMenuItemTemplate;
27 NSMenuItem *recentFilesMenuItem;
28 NSMutableArray *cachedVimControllers;
29 int preloadPid;
30 BOOL shouldActivateWhenNextWindowOpens;
31 int numChildProcesses;
33 NSMutableDictionary *inputQueues;
34 int processingFlag;
36 #if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_4)
37 FSEventStreamRef fsEventStream;
38 #endif
40 #ifdef MM_ENABLE_PLUGINS
41 NSMenuItem *plugInMenuItem;
42 #endif
45 + (MMAppController *)sharedInstance;
46 - (NSMenu *)defaultMainMenu;
47 - (NSMenuItem *)appMenuItemTemplate;
48 - (MMVimController *)keyVimController;
49 - (void)removeVimController:(id)controller;
50 - (void)windowControllerWillOpen:(MMWindowController *)windowController;
51 - (void)setMainMenu:(NSMenu *)mainMenu;
52 - (NSArray *)filterOpenFiles:(NSArray *)filenames;
53 - (BOOL)openFiles:(NSArray *)filenames withArguments:(NSDictionary *)args;
56 #ifdef MM_ENABLE_PLUGINS
57 - (void)addItemToPlugInMenu:(NSMenuItem *)item;
58 - (void)removeItemFromPlugInMenu:(NSMenuItem *)item;
59 #endif
61 - (IBAction)newWindow:(id)sender;
62 - (IBAction)newWindowAndActivate:(id)sender;
63 - (IBAction)fileOpen:(id)sender;
64 - (IBAction)selectNextWindow:(id)sender;
65 - (IBAction)selectPreviousWindow:(id)sender;
66 - (IBAction)orderFrontPreferencePanel:(id)sender;
67 - (IBAction)openWebsite:(id)sender;
68 - (IBAction)showVimHelp:(id)sender;
69 - (IBAction)zoomAll:(id)sender;
71 @end