/*
   client/key.h
   This file is part of the Osirion project and is distributed under
   the terms and conditions of the GNU General Public License version 2
*/

#ifndef __INCLUDED_CLIENT_KEY_H__
#define __INCLUDED_CLIENT_KEY_H__

#include <string>

namespace client {

class Key
{
public:
	Key(const char *name, unsigned int keysym, char ascii=0, const char *bind=0);
	~Key();

	inline float & pressed() { return key_pressed; }

	inline std::string const & name() const { return key_name; }

	inline std::string & bind() { return key_bind; }

	inline char ascii() const { return key_ascii; }

	inline unsigned int sym() const { return key_sym; }

private:
	unsigned int		key_sym;
	char			key_ascii;

	std::string		key_name;
	std::string		key_bind;

	float			key_pressed;
};

} // namespace client

#endif // __INCLUDED_CLIENT_KEY_H__