new interface with less pure virtual methods
This commit is contained in:
parent
d0d8e28dd8
commit
9804b09fb1
@ -11,6 +11,11 @@
|
|||||||
void ScreensaverPlugin::setup(cairo_t* context, const cairo_rectangle_t& rect) {
|
void ScreensaverPlugin::setup(cairo_t* context, const cairo_rectangle_t& rect) {
|
||||||
_c = context;
|
_c = context;
|
||||||
_r = rect;
|
_r = rect;
|
||||||
|
make_black();
|
||||||
|
}
|
||||||
|
|
||||||
|
int ScreensaverPlugin::fps() const {
|
||||||
|
return 30;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreensaverPlugin::make_black() {
|
void ScreensaverPlugin::make_black() {
|
||||||
|
@ -17,9 +17,10 @@ class ScreensaverPlugin {
|
|||||||
ScreensaverPlugin() = default;
|
ScreensaverPlugin() = default;
|
||||||
virtual ~ScreensaverPlugin() = default;
|
virtual ~ScreensaverPlugin() = default;
|
||||||
|
|
||||||
virtual void setup(cairo_t* context, const cairo_rectangle_t& rect) = 0;
|
virtual void setup(cairo_t* context, const cairo_rectangle_t& rect);
|
||||||
|
virtual int fps() const;
|
||||||
|
|
||||||
virtual void draw_frame() = 0;
|
virtual void draw_frame() = 0;
|
||||||
virtual int fps() const = 0;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
cairo_t* _c {nullptr};
|
cairo_t* _c {nullptr};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user