iw4x-client/src/Components/Modules/Renderer.hpp
momo5502 8cef16017e Use wink-signals
boost.signals sadly requires way too many dependencies, libsigc++ requires too much configuration and all the other libs I tested mostly required constexpr as callbacks (due to passing callbacks via template list), which doesn't server this purpose, so wink-signals seems just about right for what we do.
2016-02-11 11:26:41 +01:00

25 lines
434 B
C++

namespace Components
{
class Renderer : public Component
{
public:
typedef void(Callback)();
Renderer();
~Renderer();
const char* GetName() { return "Renderer"; };
static int Width();
static int Height();
static void OnFrame(Callback* callback);
private:
static void FrameHook();
static void FrameHandler();
static wink::signal<wink::slot<Callback>> FrameSignal;
static Utils::Hook DrawFrameHook;
};
}