Commit a27e2168 authored by spiiroin's avatar spiiroin

[touch] Add handler for multitouch protocol A and B. JB#33644

The existing touch screen input event handling in mce is implemented in
several places and in general does handle differences between A and B
protocols in robust manner - and assumes that there will be only one
touch/mouse input device available.

Implement logic for tracking touch input state / double tap detection in
a manner that allows the code to be re-used for several input devices
when/if needed.
parent 43d1f6de
......@@ -898,6 +898,14 @@ modules/usbmode.pic.o:\
mce-log.h\
mce.h\
multitouch.o:\
multitouch.c\
multitouch.h\
multitouch.pic.o:\
multitouch.c\
multitouch.h\
powerkey.o:\
powerkey.c\
builtin-gconf.h\
......
......@@ -291,6 +291,7 @@ MCE_CORE += mce-command-line.c
MCE_CORE += mce-conf.c
MCE_CORE += datapipe.c
MCE_CORE += mce-modules.c
MCE_CORE += multitouch.c
MCE_CORE += mce-io.c
MCE_CORE += mce-lib.c
MCE_CORE += evdev.c
......@@ -575,6 +576,8 @@ NORMALIZE_USES_SPC =\
modules/radiostates.h\
modules/sensor-gestures.c\
modules/usbmode.c\
multitouch.c\
multitouch.h\
ofono-dbus-names.h\
powerkey.c\
powerkey.h\
......
This diff is collapsed.
/**
* @file multitouch.h
*
* Mode Control Entity - Tracking for evdev based multitouch devices
*
* <p>
*
* Copyright (C) 2015 Jolla Ltd.
*
* <p>
*
* @author Simo Piiroinen <simo.piiroinen@jollamobile.com>
*
* mce is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.
*
* mce is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with mce. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MCE_MULTITOUCH_H_
# define MCE_MULTITOUCH_H_
# include <linux/input.h>
# include <stdbool.h>
typedef struct mt_state_t mt_state_t;
mt_state_t *mt_state_create (bool protocol_b);
void mt_state_delete (mt_state_t *self);
bool mt_state_handle_event (mt_state_t *self, const struct input_event *ev);
bool mt_state_touching (const mt_state_t *self);
#endif /* MCE_MULTITOUCH_H_ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment