diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-03-25 13:13:02 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-03-25 18:20:18 +0530 |
| commit | 4cbaaae7c55e71d2d4db591029394812077eb844 (patch) | |
| tree | 23574a00f4790332e9aafb4fd86fbc046c0ed85a /src/utils.hpp | |
| parent | 346c16b4e2ea26f47e0e370a490b7794492a9ebb (diff) | |
| download | null-browser-4cbaaae7c55e71d2d4db591029394812077eb844.tar.gz null-browser-4cbaaae7c55e71d2d4db591029394812077eb844.zip | |
Add web.history for history navigation
Diffstat (limited to 'src/utils.hpp')
| -rw-r--r-- | src/utils.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils.hpp b/src/utils.hpp index d5d4fc5..eace39e 100644 --- a/src/utils.hpp +++ b/src/utils.hpp @@ -10,3 +10,9 @@ #define DEFINE_GETTER(METHOD, EXPR) \ decltype(auto) METHOD() { return EXPR; } + +#define DEFINE_FETCHER(TYPE, NAME) \ + void set_##NAME##_fetcher(const std::function<TYPE> &fetcher) { \ + fetch_##NAME = fetcher; \ + } \ + std::function<qsizetype()> fetch_##NAME = []() { return -1; }; |
