/*********************************************************\
		 __      __           __  __
		/ /     / / _____    / / / / ______   __     __
	   / /     / / /___  \  / / / / / ___  | / /    / /
	  / /_____/ / _____| / / / / / / /__/ / / /    / /
	 / ______  / / ___  / / / / / / _____/ / /    / /
	/ /     / / / /__/ / / / / / / |____  / |____/ /
   /_/     /_/ |______/ /_/ /_/  \_____/  \_____  /
										 ______/ /
			High Level Game Framework   /_______/

  ------------------------------------------------------

  Copyright (c) 2009 - Rodrigo Braz Monteiro.
  This file is subject to the terms of license.txt.

\*********************************************************/

#pragma once

#include "input_joystick.h"

namespace Halley {

	class InputJoystickSDL : public InputJoystick {
	public:
		~InputJoystickSDL();
		std::string getName() const;

		JoystickType getType() const {
			return JOYSTICK_GENERIC;
		}

	private:
		InputJoystickSDL(int number);
		void processEvent(const SDL_Event& event);

		SDL_Joystick* joystick;
		int index;

		friend class Input;
	};

	class InputJoystickHatSDL : public InputButtonBase {
	private:
		InputJoystickHatSDL() : InputButtonBase(4) {}

		void processEvent(const SDL_Event& event);
	
		friend class InputJoystickSDL;
	};

}
