adapted to new interface
This commit is contained in:
parent
d8c1c535f2
commit
5b90b847f1
@ -14,20 +14,14 @@ class RectSaver : public ScreensaverPlugin {
|
|||||||
RectSaver() = default;
|
RectSaver() = default;
|
||||||
~RectSaver() = default;
|
~RectSaver() = default;
|
||||||
|
|
||||||
void setup(cairo_t* context, const cairo_rectangle_t& rect) override;
|
|
||||||
void draw_frame() override;
|
|
||||||
int fps() const override;
|
int fps() const override;
|
||||||
|
void draw_frame() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
ScreensaverPlugin* create_instance() {
|
ScreensaverPlugin* create_instance() {
|
||||||
return new RectSaver;
|
return new RectSaver;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RectSaver::setup(cairo_t* context, const cairo_rectangle_t& rect) {
|
|
||||||
ScreensaverPlugin::setup(context, rect);
|
|
||||||
make_black();
|
|
||||||
}
|
|
||||||
|
|
||||||
int RectSaver::fps() const {
|
int RectSaver::fps() const {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
@ -14,9 +14,8 @@ class Skembo : public ScreensaverPlugin {
|
|||||||
Skembo() = default;
|
Skembo() = default;
|
||||||
~Skembo() = default;
|
~Skembo() = default;
|
||||||
|
|
||||||
void setup(cairo_t* context, const cairo_rectangle_t& rect) override;
|
|
||||||
void draw_frame() override;
|
|
||||||
int fps() const override;
|
int fps() const override;
|
||||||
|
void draw_frame() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
double _hue {0};
|
double _hue {0};
|
||||||
@ -26,11 +25,6 @@ ScreensaverPlugin* create_instance() {
|
|||||||
return new Skembo;
|
return new Skembo;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Skembo::setup(cairo_t* context, const cairo_rectangle_t& rect) {
|
|
||||||
ScreensaverPlugin::setup(context, rect);
|
|
||||||
make_black();
|
|
||||||
}
|
|
||||||
|
|
||||||
int Skembo::fps() const {
|
int Skembo::fps() const {
|
||||||
return 40;
|
return 40;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user