From 4cbaaae7c55e71d2d4db591029394812077eb844 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 25 Mar 2025 13:13:02 +0530 Subject: Add web.history for history navigation --- src/utils.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/utils.hpp') 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 &fetcher) { \ + fetch_##NAME = fetcher; \ + } \ + std::function fetch_##NAME = []() { return -1; }; -- cgit v1.3.1