Wef is a Rust library for embedding WebView functionality using Chromium Embedded Framework (CEF3) with offscreen rendering support.
22 lines
509 B
C++
22 lines
509 B
C++
#include "shutdown_helper.h"
|
|
|
|
class ShutdownHelperWin : public ShutdownHelper {
|
|
public:
|
|
ShutdownHelperWin() {}
|
|
|
|
protected:
|
|
virtual void run() {
|
|
MSG msg;
|
|
while (GetMessage(&msg, nullptr, 0, 0)) {
|
|
TranslateMessage(&msg);
|
|
DispatchMessage(&msg);
|
|
}
|
|
}
|
|
|
|
virtual void quit() { PostMessage(nullptr, WM_QUIT, 0, 0); }
|
|
};
|
|
|
|
std::unique_ptr<ShutdownHelper>& ShutdownHelper::getSingleton() {
|
|
static std::unique_ptr<ShutdownHelper> instance(new ShutdownHelperWin());
|
|
return instance;
|
|
}
|