Flutter Engine
FlutterAppDelegate.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef FLUTTER_FLUTTERAPPDELEGATE_H_
6 #define FLUTTER_FLUTTERAPPDELEGATE_H_
7 
8 #import <Cocoa/Cocoa.h>
9 
10 #import "FlutterMacros.h"
11 
12 /**
13  * `NSApplicationDelegate` subclass for simple apps that want default behavior.
14  *
15  * This class implements the following behaviors:
16  * * Updates the application name of items in the application menu to match the name in
17  * the app's Info.plist, assuming it is set to APP_NAME initially. |applicationMenu| must be
18  * set before the application finishes launching for this to take effect.
19  * * Updates the main Flutter window's title to match the name in the app's Info.plist.
20  * |mainFlutterWindow| must be set before the application finishes launching for this to take
21  * effect.
22  *
23  * App delegates for Flutter applications are *not* required to inherit from
24  * this class. Developers of custom app delegate classes should copy and paste
25  * code as necessary from FlutterAppDelegate.mm.
26  */
28 @interface FlutterAppDelegate : NSObject <NSApplicationDelegate>
29 
30 /**
31  * The application menu in the menu bar.
32  */
33 @property(weak, nonatomic) IBOutlet NSMenu* applicationMenu;
34 
35 /**
36  * The primary application window containg a FlutterViewController. This is primarily intended
37  * for use in single-window applications.
38  */
39 @property(weak, nonatomic) IBOutlet NSWindow* mainFlutterWindow;
40 
41 @end
42 
43 #endif // FLUTTER_FLUTTERAPPDELEGATE_H_
IBOutlet NSWindow * mainFlutterWindow
IBOutlet NSMenu * applicationMenu
#define FLUTTER_EXPORT