aboutsummaryrefslogtreecommitdiffstats
path: root/src/hwdata.h
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-05-14 01:10:17 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-05-14 01:41:39 +0200
commit2b271ed5348daec2bcf90b83da47781e2d8b964c (patch)
tree1828f251cf4b7d4f6a66a6af67c2681998f2483e /src/hwdata.h
parentf02210172efc6bfc05c4598c14e1268d2828097e (diff)
downloadxorg-input-kobomultitouch-2b271ed5348daec2bcf90b83da47781e2d8b964c.tar.gz
xorg-input-kobomultitouch-2b271ed5348daec2bcf90b83da47781e2d8b964c.tar.bz2
xorg-input-kobomultitouch-2b271ed5348daec2bcf90b83da47781e2d8b964c.zip
janitor: Move min/max and dist functions up to common.h
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src/hwdata.h')
-rw-r--r--src/hwdata.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/hwdata.h b/src/hwdata.h
index 15a9fcb..5dd99cf 100644
--- a/src/hwdata.h
+++ b/src/hwdata.h
@@ -81,4 +81,11 @@ void init_hwdata(struct HWData *hw);
int read_hwdata(struct HWData *hw, const struct input_event* ev);
void output_hwdata(const struct HWData *hw);
+static inline int finger_dist2(const struct FingerData *a,
+ const struct FingerData *b)
+{
+ return dist2(a->position_x - b->position_x,
+ a->position_y - b->position_y);
+}
+
#endif