A weird game.
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.
turings-tarpit/watcher.hpp

21 lines
520 B

#pragma once
#include <efsw/efsw.hpp>
#include <git2.h>
#include <string> // for operator+, to_string
class UpdateListener : public efsw::FileWatchListener {
public:
bool changes = false;
git_repository* repo = nullptr;
UpdateListener(git_repository *r) : repo(r) {};
void handleFileAction(efsw::WatchID watchid,
const std::string& dir,
const std::string& filename,
efsw::Action action,
std::string oldFilename) override;
void reset_state();
};