aboutsummaryrefslogtreecommitdiffstats
path: root/src/memory.h
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-05-14 01:29:05 +0200
committerHenrik Rydberg <rydberg@euromail.se>2010-05-14 01:41:39 +0200
commitbfd266660d69e13263e3895fb059040b65255a72 (patch)
tree0ee0737f58307e345f9db2ebdd3de87e01febea6 /src/memory.h
parent8ced3667a30e00bd2368d4b5417f1f07cc86d290 (diff)
downloadxorg-input-kobomultitouch-bfd266660d69e13263e3895fb059040b65255a72.tar.gz
xorg-input-kobomultitouch-bfd266660d69e13263e3895fb059040b65255a72.tar.bz2
xorg-input-kobomultitouch-bfd266660d69e13263e3895fb059040b65255a72.zip
janitor: Split gesture code into memory refresh and parse
Split the gesture code into a lexical part, which updates the filtered motion state, and a parsing part, which translates the motion state to gestures. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src/memory.h')
-rw-r--r--src/memory.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/memory.h b/src/memory.h
index 23d2ce6..9810b81 100644
--- a/src/memory.h
+++ b/src/memory.h
@@ -24,17 +24,33 @@
#include "mtstate.h"
+/**
+ * struct Memory - parsing state
+ *
+ * @btdata: logical finger state
+ * @same: true if the finger configuration is unchanged
+ * @pointing: bitmask of pointing fingers
+ * @pending: bitmask of tentatively moving fingers
+ * @moving: bitmask of moving fingers
+ * @ybar: vertical position on pad marking the clicking area
+ * @move_time: movement before this point in time is accumulated
+ * @dx: array of accumulated horiontal movement per finger
+ * @dy: array of accumulated vertical movement per finger
+ *
+ */
struct Memory {
- unsigned btdata, pointing, moving;
+ unsigned btdata, same;
+ unsigned pointing, pending, moving;
int ybar;
mstime_t move_time;
int dx[DIM_FINGER], dy[DIM_FINGER];
-
-
-
};
void init_memory(struct Memory *mem);
+void refresh_memory(struct Memory *m,
+ const struct MTState *prev_state,
+ const struct MTState *state,
+ const struct Capabilities *caps);
void output_memory(const struct Memory *m);
#endif