/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2008.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: src/sgx/input/input_keys.cpp

*/

#include "sgx/core/core.hpp"
#include "sgx/input/input.hpp"

//
// Application of data from the platform-specific loop
//
void 
CSGXInputManager::applyKeyboardKeyUp(const tKey &key)
{
	m_pDeviceKeyboard->m_Key[key].applyButtonUp();
}

void 
CSGXInputManager::applyKeyboardKeyDown(const tKey &key)
{
	m_pDeviceKeyboard->m_Key[key].applyButtonDown();
}

void 
CSGXInputManager::applyKeyboardPressed(const tKey &key)
{
	m_pDeviceKeyboard->m_Key[key].applyButtonPressed();
}

void 
CSGXInputManager::applyKeyboardReleased(const tKey &key)
{
	m_pDeviceKeyboard->m_Key[key].applyButtonReleased();
}

//
// Cross-platform query functions
//
tBOOL
CSGXInputManager::isKeyboardKeyUp(const tKey &key)
{
    return m_Keyboard.m_Key[key].m_bIsUp;
}

tBOOL
CSGXInputManager::isKeyboardKeyDown(const tKey &key)
{
    return m_Keyboard.m_Key[key].m_bIsDown;
}

tBOOL
CSGXInputManager::isKeyboardKeyPressed(const tKey &key)
{
    return m_Keyboard.m_Key[key].m_bPressed;
}

tBOOL
CSGXInputManager::isKeyboardKeyReleased(const tKey &key)
{
    return m_Keyboard.m_Key[key].m_bReleased;
}
