/*
 * GcDisplayExtraInfo.h
 *
 *  Created on: 25/ago/2020
 *      Author: chessaa
 */

#ifndef GCDISPLAYEXTRAINFO_H_
#define GCDISPLAYEXTRAINFO_H_

class GcDisplayExtraInfo;

class GcDisplayExtraInfoHandler
{
public:
	GcDisplayExtraInfoHandler()
	{
	}


	virtual ~GcDisplayExtraInfoHandler()
	{
	}

	virtual void displayExtraInfo(GcDisplayExtraInfo& )=0;
};

class GcDisplayExtraInfo
{
public:
	typedef void (*handler_t)(GcDisplayExtraInfo& d, void* cookie);

	static GcDisplayExtraInfo& instance();

	void addVideoFrameHandler(handler_t handler, void* cookie=0);
	void addVideoFrameHandler(GcDisplayExtraInfoHandler& handler);

	void print_error_c(int col, int row, const char* fmt, ...);

	void print(int x, int y, const char* fmt, ...);
	void print_c(int col, int row, const char* fmt, ...);

	void phy_print(int x, int y, const char* fmt, ...);
	void phy_print_c(int col, int row, const char* fmt, ...);

	void phy_print_small(int x, int y, const char* fmt, ...);
	void phy_print_small_dbg(int x, int y, const char* fmt, ...);

	void* opaqueFramebuffer();
	void* opaquePhysicalFramebuffer();

	void color_print(int color, int x, int y, const char* fmt, ...);
	void color_print_c(int color, int col, int row, const char* fmt, ...);

private:
	GcDisplayExtraInfo();

	GcDisplayExtraInfo(const GcDisplayExtraInfo&);
	void operator=(const GcDisplayExtraInfo&);
};


#endif /* GCDISPLAYEXTRAINFO_H_ */
