17 lines
318 B
C
17 lines
318 B
C
#ifndef __INPUT_H__
|
|
#define __INPUT_H__
|
|
|
|
#include <SDL2/SDL_scancode.h>
|
|
|
|
typedef void(*keyEvent_t)(void);
|
|
|
|
//renderer facing
|
|
void input_init(void);
|
|
void input_poll(SDL_Scancode);
|
|
|
|
//user facing
|
|
void input_listen(SDL_Scancode code, keyEvent_t);
|
|
void input_removeListener(SDL_Scancode code, keyEvent_t handler);
|
|
|
|
#endif
|