Wef is a Rust library for embedding WebView functionality using Chromium Embedded Framework (CEF3) with offscreen rendering support.
22 lines
414 B
Text
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;
|
|
}
|