diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2010-05-14 01:29:05 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2010-05-14 01:41:39 +0200 |
| commit | bfd266660d69e13263e3895fb059040b65255a72 (patch) | |
| tree | 0ee0737f58307e345f9db2ebdd3de87e01febea6 /src/memory.h | |
| parent | 8ced3667a30e00bd2368d4b5417f1f07cc86d290 (diff) | |
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.h | 24 |
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 @@ | |||
| 24 | 24 | ||
| 25 | #include "mtstate.h" | 25 | #include "mtstate.h" |
| 26 | 26 | ||
| 27 | /** | ||
| 28 | * struct Memory - parsing state | ||
| 29 | * | ||
| 30 | * @btdata: logical finger state | ||
| 31 | * @same: true if the finger configuration is unchanged | ||
| 32 | * @pointing: bitmask of pointing fingers | ||
| 33 | * @pending: bitmask of tentatively moving fingers | ||
| 34 | * @moving: bitmask of moving fingers | ||
| 35 | * @ybar: vertical position on pad marking the clicking area | ||
| 36 | * @move_time: movement before this point in time is accumulated | ||
| 37 | * @dx: array of accumulated horiontal movement per finger | ||
| 38 | * @dy: array of accumulated vertical movement per finger | ||
| 39 | * | ||
| 40 | */ | ||
| 27 | struct Memory { | 41 | struct Memory { |
| 28 | unsigned btdata, pointing, moving; | 42 | unsigned btdata, same; |
| 43 | unsigned pointing, pending, moving; | ||
| 29 | int ybar; | 44 | int ybar; |
| 30 | mstime_t move_time; | 45 | mstime_t move_time; |
| 31 | int dx[DIM_FINGER], dy[DIM_FINGER]; | 46 | int dx[DIM_FINGER], dy[DIM_FINGER]; |
| 32 | |||
| 33 | |||
| 34 | |||
| 35 | }; | 47 | }; |
| 36 | 48 | ||
| 37 | void init_memory(struct Memory *mem); | 49 | void init_memory(struct Memory *mem); |
| 50 | void refresh_memory(struct Memory *m, | ||
| 51 | const struct MTState *prev_state, | ||
| 52 | const struct MTState *state, | ||
| 53 | const struct Capabilities *caps); | ||
| 38 | void output_memory(const struct Memory *m); | 54 | void output_memory(const struct Memory *m); |
| 39 | 55 | ||
| 40 | #endif | 56 | #endif |
