/*
	Copyright (C) 2025 Mark Tyler

	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 3 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program in the file COPYING.
*/

#ifndef PIZOR_MAIN_H_
#define PIZOR_MAIN_H_

#include <mtgin_sdl.h>

#include "pizor_be.h"



// Functions return: 0 = success, NULL = fail; unless otherwise stated.



#ifdef __cplusplus
extern "C" {
#endif

// C API



#ifdef __cplusplus
}

// C++ API

class Mainwindow;



class Mainwindow
{
public:
	explicit Mainwindow ( CommandLine & cline );

	int start ();

private:
	void fps_change ( int delta );
	void fps_rate ( int fps );
	void mouse_click_event ( SDL_Event const * event );
	void mouse_motion_event ( SDL_Event const * event );
	void mouse_event ( int button, SDL_Event const * event );
	void key_down_event ( SDL_Event const * event );
	void toggle_fullscreen ();

/// ----------------------------------------------------------------------------

	enum
	{
		BORDER_RED	= 0,
		BORDER_GREEN	= 0,
		BORDER_BLUE	= 100,
	};

	CommandLine	& m_cline;

	PixelZoo	m_zoo;

	mtGin::App	m_gin;
	mtGin::Window	m_window;

	int		m_fps = FPS_DEFAULT;
};



#endif		// C++ API



#endif		// PIZOR_MAIN_H_

