namespace Components
{
	class Renderer : public Component
	{
	public:
		typedef void(Callback)();
		typedef void(BackendCallback)(IDirect3DDevice9*);

		Renderer();
		~Renderer();
		const char* GetName() { return "Renderer"; };

		static int Width();
		static int Height();

		static void Once(Callback* callback);
		static void OnFrame(Callback* callback);
		static void OnBackendFrame(BackendCallback* callback);

	private:
		static void FrameStub();
		static void FrameHandler();

		static void BackendFrameStub();
		static void BackendFrameHandler();

		static wink::signal<wink::slot<Callback>> FrameSignal;
		static wink::signal<wink::slot<Callback>> FrameOnceSignal;
		static wink::signal<wink::slot<BackendCallback>> BackendFrameSignal;
		static Utils::Hook DrawFrameHook;
	};
}
