/*****************************************************************************
 * $LastChangedDate: 2009-11-07 22:56:33 -0500 (Sat, 07 Nov 2009) $
 * @file
 * @author  Jim E. Brooks  http://www.palomino3d.org
 * @brief   Keyboard device (Singleton).
 * @remarks device_keyboard and device_mouse are identical.
 *//*
 * LEGAL:   COPYRIGHT (C) 2009 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
 *****************************************************************************/

#ifndef INPUT_DEVICE_KEYBOARD_HH
#define INPUT_DEVICE_KEYBOARD_HH 1

#define GET_KEYBOARD_DEVICE() (input::KeyboardDevice::GetInstance())

#include "input/event_keyboard.hh"
#include "input/device.hh"

namespace input {

////////////////////////////////////////////////////////////////////////////////
/// @brief Keyboard device (Singleton).
///
/// This is a special singleton that instantiates a system-specific derivative of itself.
///
class KeyboardDevice : public Device<KeyboardEvent>
{
PREVENT_COPYING(KeyboardDevice)
protected:
                    KeyboardDevice( void );
    virtual         ~KeyboardDevice();

//------------------------------------------------------------------------------
// Interface:
public:
    CLASS_METHOD KeyboardDevice& GetInstance( void );  // creates system-specific derivative

// (inherits Device interface [device.hh])

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

private:
    CLASS_VAR KeyboardDevice* msInstance;  ///< Singleton
};

} // namespace input

#endif // INPUT_DEVICE_KEYBOARD_HH
