feat: created skeleton input module
This commit is contained in:
parent
0d6e1ba96d
commit
4151c3429a
32
src/core/input.h
Normal file
32
src/core/input.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
#ifndef INPUT_H
|
||||
#define INPUT_H
|
||||
|
||||
#include "stdbool.h"
|
||||
|
||||
typedef enum InputListenerType {
|
||||
INPUT_LISTENER_INT,
|
||||
INPUT_LISTENER_BOOL,
|
||||
INPUT_LISTENER_FLOAT,
|
||||
} InputListenerType;
|
||||
|
||||
typedef void(*IntListener)(int);
|
||||
typedef void(*BoolListener)(bool);
|
||||
typedef void(*FloatListener)(float);
|
||||
|
||||
typedef struct InputListener {
|
||||
void *object;
|
||||
InputListenerType type;
|
||||
union {
|
||||
IntListener int_listener;
|
||||
BoolListener bool_listener;
|
||||
FloatListener float_listener;
|
||||
};
|
||||
} InputListener;
|
||||
|
||||
void InitInputSubmodule();
|
||||
void CleanInputSubmodule();
|
||||
|
||||
void AddListener();
|
||||
void RemoveListener();
|
||||
|
||||
#endif // !INPUT_H
|
Loading…
Reference in a new issue