diff --git a/src/ScreensaverPlugin.hpp b/src/ScreensaverPlugin.hpp index 65ac60f..a414309 100644 --- a/src/ScreensaverPlugin.hpp +++ b/src/ScreensaverPlugin.hpp @@ -10,6 +10,7 @@ #define _ScreensaverPlugin_H_ #include +#include class ScreensaverPlugin { public: @@ -22,9 +23,13 @@ class ScreensaverPlugin { virtual void update() = 0; // advance state for next frame virtual void render() = 0; // draw next frame + void config(const nlohmann::json& data) { _j = data; } + const nlohmann::json& config() const { return _j; } + protected: cairo_t* _c {nullptr}; cairo_rectangle_t _r {}; + nlohmann::json _j {}; void make_black(); cairo_rectangle_t random_rect();