Lephisto/src/input.h
2013-12-27 13:30:20 +00:00

26 lines
568 B
C

#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);