feat: created skeleton input module

This commit is contained in:
Sara 2024-09-20 12:35:45 +02:00
parent 0d6e1ba96d
commit 4151c3429a

32
src/core/input.h Normal file
View 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