Single thread + inputs
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
#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
|
||||
|
||||
Reference in New Issue
Block a user