/*
    Copyright (c) 2007 SIEGE Development Team
    All rights reserved.

    This file is part of libSIEGE.

    This software is copyrighted work licensed under the terms of the
    2-clause BSD license. Please consult the file "license.txt" for
    details.

    If you did not recieve the file with this program, please email
    Tim Chas <darkuranium@gmail.com>.
*/

#ifndef __SIEGE_INPUT_KEYBOARD_H__
#define __SIEGE_INPUT_KEYBOARD_H__
#include "../common.h"

#ifdef __cplusplus
extern "C"
{
#endif // __cplusplus

/// \todo Create and use AList (Associative List) for this
#ifdef SG_BUILD_LIBRARY
#define SG_KEY_NUM 0x400
SGbool _sg_keyPrev[SG_KEY_NUM];
SGbool _sg_keyCurr[SG_KEY_NUM];
void* _sg_keyHandle;
#endif // SG_BUILD_LIBRARY

void SG_CALL _sg_cbKeyboardKey(SGuint key, SGbool down);
void SG_CALL _sg_cbKeyboardChar(SGdchar chr);

void SG_CALL _sgKeyboardUpdate(void);

SGbool SG_CALL _sgKeyboardInit(void);
SGbool SG_CALL _sgKeyboardDeinit(void);

void SG_CALL _sgKeyboardKeyUpdate(SGenum key, SGbool down);

SGbool SG_CALL sgKeyboardKey(SGenum key);
SGbool SG_CALL sgKeyboardKeyPress(SGenum key);
SGbool SG_CALL sgKeyboardKeyRelease(SGenum key);

// might re-add this in the future; probably not
// SGbool SG_CALL sgKeyboardCharPress(SGdchar chr);

#ifdef __cplusplus
}
#endif // __cplusplus

#endif // __SIEGE_INPUT_KEYBOARD_H__
