fixed interface, reorganized to put all of class declaration and implementation in cpp file
This commit is contained in:
parent
c5da8561fe
commit
395b10f31b
@ -7,6 +7,21 @@
|
||||
//
|
||||
|
||||
#include "RectSaver.hpp"
|
||||
#include <libscscreensaver.hpp>
|
||||
|
||||
class RectSaver : public ScreensaverPlugin {
|
||||
public:
|
||||
RectSaver() = default;
|
||||
~RectSaver() = default;
|
||||
|
||||
void setup(cairo_t* context, const cairo_rectangle_t& rect) override;
|
||||
void draw_frame() override;
|
||||
int fps() const override;
|
||||
};
|
||||
|
||||
ScreensaverPlugin* create_instance() {
|
||||
return new RectSaver;
|
||||
}
|
||||
|
||||
void RectSaver::setup(cairo_t* context, const cairo_rectangle_t& rect) {
|
||||
ScreensaverPlugin::setup(context, rect);
|
||||
|
@ -9,16 +9,10 @@
|
||||
#ifndef _RectSaver_H_
|
||||
#define _RectSaver_H_
|
||||
|
||||
#include "ScreensaverPlugin.hpp"
|
||||
class ScreensaverPlugin;
|
||||
|
||||
class RectSaver : public ScreensaverPlugin {
|
||||
public:
|
||||
RectSaver() = default;
|
||||
~RectSaver() = default;
|
||||
|
||||
void setup(cairo_t* context, const cairo_rectangle_t& rect) override;
|
||||
void draw_frame() override;
|
||||
int fps() const override;
|
||||
};
|
||||
extern "C" {
|
||||
ScreensaverPlugin* create_instance();
|
||||
}
|
||||
|
||||
#endif // _RectSaver_H_
|
||||
|
Loading…
x
Reference in New Issue
Block a user