2020-07-06 17:31:40 +00:00
|
|
|
#pragma once
|
|
|
|
#ifndef MANGOHUD_NOTIFY_H
|
|
|
|
#define MANGOHUD_NOTIFY_H
|
|
|
|
|
2020-03-23 22:51:30 +00:00
|
|
|
#include <thread>
|
2020-03-16 16:52:03 +00:00
|
|
|
#include <mutex>
|
2020-03-16 15:48:12 +00:00
|
|
|
#include "overlay_params.h"
|
|
|
|
|
2020-03-16 16:35:01 +00:00
|
|
|
struct notify_thread
|
|
|
|
{
|
2020-03-23 22:02:42 +00:00
|
|
|
int fd = -1, wd = -1;
|
2020-03-16 16:35:01 +00:00
|
|
|
overlay_params *params = nullptr;
|
|
|
|
bool quit = false;
|
2020-03-16 16:52:03 +00:00
|
|
|
std::mutex mutex;
|
2020-06-08 16:08:01 +00:00
|
|
|
std::thread thread;
|
2020-03-16 16:35:01 +00:00
|
|
|
};
|
|
|
|
|
2020-03-23 22:02:42 +00:00
|
|
|
bool start_notifier(notify_thread& nt);
|
|
|
|
void stop_notifier(notify_thread& nt);
|
2020-07-06 17:31:40 +00:00
|
|
|
|
|
|
|
#endif //MANGOHUD_NOTIFY_H
|