Files
GameJam-polytech/src/input.h
T
2023-01-22 13:09:38 +01:00

21 lines
502 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_pollKeyDown(SDL_Scancode);
void input_pollKeyUp(SDL_Scancode);
//user facing
void input_listenKeyDown(SDL_Scancode code, keyEvent_t);
void input_removeKeyDownListener(SDL_Scancode code, keyEvent_t handler);
void input_listenKeyUp(SDL_Scancode code, keyEvent_t);
void input_removeKeyUpListener(SDL_Scancode code, keyEvent_t handler);
#endif