#pragma once
#include <SDL/SDL.h>

#define KMOD_ALL 0xffff /**< Comfort thing SDL is lacking. */

/* Input types. */
typedef enum {
  KEYBIND_NULL,
  KEYBIND_KEYBOARD,
  KEYBIND_JAXIS,
  KEYBIND_JBUTTON
} KeybindType;

/* Set input. */
void input_setDefault(void);
void input_setKeybind(char* keybind, KeybindType type, int key, SDLMod mod, int reverse);
int  input_getKeybind(char* keybind, KeybindType* type, SDLMod* mod,  int* reverse);

/* Handle the events. */
void input_handle(SDL_Event* event);

/* Init/Exit. */
void input_init(void);
void input_exit(void);