summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2015-09-02 10:57:48 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2015-09-02 10:57:48 +0200
commit265053e2a4394b20d82aa1170ec3a9901f437d81 (patch)
tree022440b6bc0d1ad36e36429573ec17e589fb791c /src/axis.h
parentd9656cc86505b6f2bba57e04a4c99430a945a70d (diff)
Adds some comments, as well as minor code improvements.
Diffstat (limited to 'src/axis.h')
-rw-r--r--src/axis.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/axis.h b/src/axis.h
index 6d4f7f5..d2200de 100644
--- a/src/axis.h
+++ b/src/axis.h
@@ -12,8 +12,27 @@ enum relabsd_axis
RELABSD_UNKNOWN
};
-enum relabsd_axis relabsd_axis_name_to_enum (char * const name);
+/*
+ * Returns the relabsd_axis whose name is 'name', according to the configuration
+ * file syntax.
+ * RELABSD_UNKNOWN is returned for any name that didn't match any other
+ * possibility.
+ **/
+enum relabsd_axis relabsd_axis_name_to_enum (const char * const name);
+
+/*
+ * Gives an string representation of an relabsd_axis.
+ * "??" is returned for RELABSD_UNKNOWN.
+ * Returned values should be coherent with the configuration file syntax.
+ **/
char * relabsd_axis_enum_to_name (enum relabsd_axis const e);
+
+/*
+ * Gives the relabsd_axis and EV_ABS event code equivalent to an EV_REL event
+ * code.
+ * If the returned relabsd_axis is RELABSD_UNKNOWN, no value is inserted into
+ * 'abs_code'.
+ **/
enum relabsd_axis relabsd_axis_convert_evdev_rel
(
unsigned int const rel_code,