#ifndef _INPUT_MT_H #define _INPUT_MT_H /* * Input Multitouch Library * * Copyright (c) 2010 Henrik Rydberg * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published by * the Free Software Foundation. */ #include /** * struct trk_coord - contact coordinate * @x: horizontal coordinate * @y: vertical coordinate */ struct trk_coord { int x; int y; }; int input_mt_create_slots_new(struct input_dev *dev, unsigned int num_slots); int input_mt_assign_slots_by_coord(struct input_dev *dev, int *slots, const struct trk_coord *coords, int num_coords); void input_mt_sync_slot_complement(struct input_dev *dev, const int *slots, int num_slots); void input_mt_report_state(struct input_dev *dev, bool active); void input_mt_report_emulation(struct input_dev *dev); static inline int input_mt_get_value(const struct input_mt_slot *slot, unsigned code) { return slot->abs[code - ABS_MT_FIRST]; } static inline bool input_mt_get_state(struct input_dev *dev, int slot) { return dev->mt && input_mt_get_value(&dev->mt[slot], ABS_MT_TRACKING_ID) >= 0; } static inline void input_abs_set_res(struct input_dev *dev, unsigned int axis, int val) { dev->absres[axis] = val; } #endif