mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
21 lines
404 B
C
21 lines
404 B
C
|
|
#pragma once
|
||
|
|
#include "pch.h"
|
||
|
|
#include "common/interop/shared_constants.h"
|
||
|
|
|
||
|
|
class NativeEventWaiter
|
||
|
|
{
|
||
|
|
static const int timeout = 1000;
|
||
|
|
|
||
|
|
HANDLE event_handle;
|
||
|
|
std::function<void()> action;
|
||
|
|
std::atomic<bool> aborting;
|
||
|
|
|
||
|
|
void run();
|
||
|
|
std::thread running_thread;
|
||
|
|
|
||
|
|
public:
|
||
|
|
|
||
|
|
NativeEventWaiter(const std::wstring& event_name, std::function<void()> action);
|
||
|
|
~NativeEventWaiter();
|
||
|
|
};
|