#ifndef CONTROLS_H
#define CONTROLS_H

#include <list>
#include <algorithm>
using namespace std;

///Auxiliary structure to holds mouse press buttons and mouse position
struct Mouse
{
private:
	float prevPos[2];
	float pos[2];

public:
	enum { LEFT,MIDDLE,RIGHT };

	void setPosX( int posX );
	void setPosY( int posY );
	void setPos( int posX, int posY );

	int getPosX(void);
	int getPosY(void);

	int getPrevPosX(void);
	int getPrevPosY(void);

	int getDiffX(void);
	int getDiffY(void);

	void clearDiffX(void);
	void clearDiffY(void);
	void clearDiff(void);



	int wheel;	//wheel offset
	bool pressedButtons[3];

	Mouse(void);
};

///Auxiliary structure to holds key press buttons
class Keyboard
{
	list<unsigned int> pressedKeys;

public:
	void clear(void);
	unsigned int isPressed( unsigned int key);	/**< Returns the number of 'key' in vector */ 
	void pressKey( unsigned int key);
	void releaseKey( unsigned int key);

	Keyboard(void);
};

#endif