You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
407 B

#ifndef DISPATCHER_H_
#define DISPATCHER_H_
#include <gtkmm.h>
#include <mutex>
#include <vector>
class Dispatcher {
private:
std::vector<std::function<void()>> functions;
std::mutex functions_mutex;
Glib::Dispatcher dispatcher;
sigc::connection connection;
public:
Dispatcher();
~Dispatcher();
void push(std::function<void()> &&function);
void disconnect();
};
#endif /* DISPATCHER_H_ */