diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2010-04-10 23:11:59 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2010-04-15 06:10:07 +0200 |
| commit | 223ba8b1b753e12a4826bacab282ab8dc7ba8689 (patch) | |
| tree | 4e169a4c36b24fee41fe2f20a6039aa88e82e15f /src | |
| parent | 2cf55b491c571d49b0ce22549c08f47ffc451a69 (diff) | |
Introduce Memory
Add the Memory structure to hold the multitouch parsing state.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src')
| -rw-r--r-- | src/memory.c | 26 | ||||
| -rw-r--r-- | src/memory.h | 32 | ||||
| -rw-r--r-- | src/mtouch.c | 1 | ||||
| -rw-r--r-- | src/mtouch.h | 2 |
4 files changed, 61 insertions, 0 deletions
diff --git a/src/memory.c b/src/memory.c new file mode 100644 index 0000000..6b502d8 --- /dev/null +++ b/src/memory.c | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | /*************************************************************************** | ||
| 2 | * | ||
| 3 | * Multitouch X driver | ||
| 4 | * Copyright (C) 2008 Henrik Rydberg <rydberg@euromail.se> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 19 | * | ||
| 20 | **************************************************************************/ | ||
| 21 | |||
| 22 | #include "memory.h" | ||
| 23 | |||
| 24 | void init_memory(struct Memory *mem) | ||
| 25 | { | ||
| 26 | } | ||
diff --git a/src/memory.h b/src/memory.h new file mode 100644 index 0000000..46dd312 --- /dev/null +++ b/src/memory.h | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | /*************************************************************************** | ||
| 2 | * | ||
| 3 | * Multitouch X driver | ||
| 4 | * Copyright (C) 2008 Henrik Rydberg <rydberg@euromail.se> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 19 | * | ||
| 20 | **************************************************************************/ | ||
| 21 | |||
| 22 | #ifndef MEMORY_H | ||
| 23 | #define MEMORY_H | ||
| 24 | |||
| 25 | #include "mtstate.h" | ||
| 26 | |||
| 27 | struct Memory { | ||
| 28 | }; | ||
| 29 | |||
| 30 | void init_memory(struct Memory *mem); | ||
| 31 | |||
| 32 | #endif | ||
diff --git a/src/mtouch.c b/src/mtouch.c index f5acd71..44b4376 100644 --- a/src/mtouch.c +++ b/src/mtouch.c | |||
| @@ -38,6 +38,7 @@ int open_mtouch(struct MTouch *mt, int fd) | |||
| 38 | init_hwstate(&mt->hs); | 38 | init_hwstate(&mt->hs); |
| 39 | init_mtstate(&mt->prev_state); | 39 | init_mtstate(&mt->prev_state); |
| 40 | init_mtstate(&mt->state); | 40 | init_mtstate(&mt->state); |
| 41 | init_memory(&mt->mem); | ||
| 41 | SYSCALL(rc = ioctl(fd, EVIOCGRAB, (pointer)1)); | 42 | SYSCALL(rc = ioctl(fd, EVIOCGRAB, (pointer)1)); |
| 42 | return rc; | 43 | return rc; |
| 43 | } | 44 | } |
diff --git a/src/mtouch.h b/src/mtouch.h index 28a637b..4004b4d 100644 --- a/src/mtouch.h +++ b/src/mtouch.h | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | #include "hwdata.h" | 27 | #include "hwdata.h" |
| 28 | #include "hwstate.h" | 28 | #include "hwstate.h" |
| 29 | #include "mtstate.h" | 29 | #include "mtstate.h" |
| 30 | #include "memory.h" | ||
| 30 | 31 | ||
| 31 | struct MTouch { | 32 | struct MTouch { |
| 32 | struct Capabilities caps; | 33 | struct Capabilities caps; |
| @@ -34,6 +35,7 @@ struct MTouch { | |||
| 34 | struct HWData hw; | 35 | struct HWData hw; |
| 35 | struct HWState hs; | 36 | struct HWState hs; |
| 36 | struct MTState prev_state, state; | 37 | struct MTState prev_state, state; |
| 38 | struct Memory mem; | ||
| 37 | }; | 39 | }; |
| 38 | 40 | ||
| 39 | int configure_mtouch(struct MTouch *mt, int fd); | 41 | int configure_mtouch(struct MTouch *mt, int fd); |
