gpui-component/crates/wef/cpp/shutdown_helper_mac.mm
Sunli b70b229370
wef: Added a new WebView component named "Wef" based on CEF. (#877)
Wef is a Rust library for embedding WebView functionality using Chromium
Embedded Framework (CEF3) with offscreen rendering support.
2025-06-17 18:57:44 +08:00

22 lines
414 B
Text

#include "shutdown_helper.h"
#import <AppKit/AppKit.h>
class ShutdownHelperMac : public ShutdownHelper {
public:
ShutdownHelperMac() {}
protected:
virtual void run() {
[NSApp run];
}
virtual void quit() {
[NSApp stop:nil];
}
};
std::unique_ptr<ShutdownHelper>& ShutdownHelper::getSingleton() {
static std::unique_ptr<ShutdownHelper> instance(new ShutdownHelperMac());
return instance;
}