Extract file menu binding and Win32 splash helper
This commit is contained in:
30
src/platform_windows/windows_splash.h
Normal file
30
src/platform_windows/windows_splash.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <windows.h>
|
||||
#include <atomic>
|
||||
#include <thread>
|
||||
|
||||
namespace pp::platform::windows {
|
||||
|
||||
class SplashScreen final
|
||||
{
|
||||
public:
|
||||
explicit SplashScreen(HINSTANCE hInst);
|
||||
~SplashScreen();
|
||||
|
||||
SplashScreen(const SplashScreen&) = delete;
|
||||
SplashScreen& operator=(const SplashScreen&) = delete;
|
||||
SplashScreen(SplashScreen&&) = delete;
|
||||
SplashScreen& operator=(SplashScreen&&) = delete;
|
||||
|
||||
void dismiss();
|
||||
|
||||
private:
|
||||
void thread_main();
|
||||
|
||||
HINSTANCE hInst_{};
|
||||
std::atomic<HWND> dialog_{};
|
||||
std::jthread thread_;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user