// // Created by xemon on 17.11.22. // #ifndef UVEOS_ON_NATION_USERBUTTONSINTERFACE_H #define UVEOS_ON_NATION_USERBUTTONSINTERFACE_H #include "UserInputButtonEvent.h" #include "stdbool.h" typedef bool (*userButtonsNextEventCall)(void *env, tUserInputButtonEvent *event, uint32_t timeout); typedef bool (*userButtonsCall)(void *env); typedef struct { void *env; userButtonsNextEventCall getNextEvent; userButtonsCall clear; } tUserButtonsInterface; #define UserButtons_GetNext(ENV, EVENT, TIMEOUT) (ENV)->getNextEvent((ENV)->env,EVENT,TIMEOUT) #define UserButtons_Clear(ENV) (ENV)->clear((ENV)->env) #endif //UVEOS_ON_NATION_USERBUTTONSINTERFACE_H