2019-07-28 06:08:18 +00:00
|
|
|
#ifndef UTIL_H
|
|
|
|
#define UTIL_H
|
2019-07-17 05:53:51 +00:00
|
|
|
|
|
|
|
#include "Actions.h"
|
|
|
|
|
|
|
|
enum LogLevel
|
|
|
|
{
|
|
|
|
DEBUG,
|
|
|
|
INFO,
|
|
|
|
WARN,
|
|
|
|
ERROR
|
|
|
|
};
|
|
|
|
|
|
|
|
extern LogLevel global_verbosity;
|
|
|
|
|
|
|
|
void log_printf(LogLevel level, const char* format, ...);
|
|
|
|
|
|
|
|
const char* level_prefix(LogLevel level);
|
|
|
|
|
|
|
|
Direction get_direction(int x, int y);
|
|
|
|
Direction string_to_direction(std::string s);
|
|
|
|
GestureMode string_to_gesturemode(std::string s);
|
|
|
|
Action string_to_action(std::string s);
|
|
|
|
|
2019-07-28 06:08:18 +00:00
|
|
|
#endif //UTIL_H
|