| summaryrefslogtreecommitdiff |
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2015-09-01 22:48:51 +0200 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2015-09-01 22:48:51 +0200 |
| commit | 1af58bb8886673ac115f019094853fa763e79187 (patch) | |
| tree | c2ab030898e74288f82c557287272546a990e932 /src/config.h | |
Initial commit.
Diffstat (limited to 'src/config.h')
| -rw-r--r-- | src/config.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h new file mode 100644 index 0000000..ffdfebb --- /dev/null +++ b/src/config.h @@ -0,0 +1,49 @@ +#ifndef RELABSD_CONFIG_H +#define RELABSD_CONFIG_H + +#include <libevdev/libevdev.h> + +#include "axis.h" + +struct relabsd_config_axis +{ + int min; + int max; + int fuzz; + int flat; + int resolution; +}; + +/* + * There are no relabsd_config_free function so be careful about using dynamic + * memory for input_file or device_name. + */ +struct relabsd_config +{ + char * input_file; + char * device_name; + struct relabsd_config_axis axis[6]; +}; + +int relabsd_config_parse +( + struct relabsd_config * const conf, + int const argc, + char ** const argv +); + +int relabsd_config_allows +( + const struct relabsd_config * const conf, + enum relabsd_axis const axis, + int const value +); + +void relabsd_config_get_absinfo +( + const struct relabsd_config * const conf, + enum relabsd_axis const axis, + struct input_absinfo * const absinfo +); + +#endif |


