Allow on_input to veto/force system controls (including reset line)
[lsnes.git] / include / library / recentfiles.hpp
blob9606c3307bf299ec0fd91a72b19c1af81077413d
1 #ifndef _library__recentfiles__hpp__included__
2 #define _library__recentfiles__hpp__included__
4 #include <string>
5 #include <cstdlib>
6 #include <list>
8 class recent_files
10 public:
11 struct hook
13 virtual ~hook();
14 virtual void operator()() = 0;
16 recent_files(const std::string& cfgfile, size_t maxcount);
17 void add(const std::string& file);
18 void add_hook(hook& h);
19 void remove_hook(hook& h);
20 std::list<std::string> get();
21 private:
22 std::string cfgfile;
23 size_t maxcount;
24 std::list<hook*> hooks;
27 #endif