mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-04 23:59:52 +08:00

This update allows the application shutdown to be cancelled. It implements the shouldQuit function, which can prevent the application from quitting if it returns false. Additional checks have been added to ensure cleanup and quit processes are performed only if required. The darwin delegate and linux and windows applications were modified to include this new functionality.
15 lines
312 B
Objective-C
15 lines
312 B
Objective-C
//go:build darwin
|
|
|
|
#ifndef appdelegate_h
|
|
#define appdelegate_h
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
@interface AppDelegate : NSObject <NSApplicationDelegate>
|
|
@property bool shouldTerminateWhenLastWindowClosed;
|
|
@property bool shuttingDown;
|
|
- (BOOL)applicationSupportsSecureRestorableState:(NSApplication *)app;
|
|
@end
|
|
|
|
#endif
|