mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 14:53:52 +00:00
Handle Quit event more gracefully
This commit is contained in:
19
PortabilityLayer/AppEventHandler.h
Normal file
19
PortabilityLayer/AppEventHandler.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
namespace PortabilityLayer
|
||||
{
|
||||
struct IAppEventHandler
|
||||
{
|
||||
virtual void OnQuit() = 0;
|
||||
};
|
||||
|
||||
class AppEventHandler
|
||||
{
|
||||
public:
|
||||
static IAppEventHandler *GetInstance();
|
||||
static void SetInstance(IAppEventHandler *instance);
|
||||
|
||||
private:
|
||||
static IAppEventHandler *ms_instance;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user