#include <limits.h>
#include <linux/input.h>
+#include <vector>
+
#include "base/basictypes.h"
+#include "ui/events/ozone/evdev/event_device_util.h"
#include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
-#define EVDEV_LONG_BITS (CHAR_BIT * sizeof(long))
-#define EVDEV_BITS_TO_LONGS(x) (((x) + EVDEV_LONG_BITS - 1) / EVDEV_LONG_BITS)
+// ABS_MT_SLOT isn't valid options for EVIOCGMTSLOTS ioctl.
+#define EVDEV_ABS_MT_COUNT (ABS_MAX - ABS_MT_SLOT - 1)
namespace ui {
// Properties of absolute axes.
int32 GetAbsMinimum(unsigned int code) const;
int32 GetAbsMaximum(unsigned int code) const;
+ int32 GetSlotValue(unsigned int code, unsigned int slot) const;
// Check input device properties.
bool HasProp(unsigned int code) const;
bool IsMappedToScreen() const;
private:
+ // Return the slot vector in |slot_values_| for |code|.
+ const std::vector<int32_t>& GetMtSlotsForCode(int code) const;
+
unsigned long ev_bits_[EVDEV_BITS_TO_LONGS(EV_CNT)];
unsigned long key_bits_[EVDEV_BITS_TO_LONGS(KEY_CNT)];
unsigned long rel_bits_[EVDEV_BITS_TO_LONGS(REL_CNT)];
struct input_absinfo abs_info_[ABS_CNT];
+ // Store the values for the multi-touch properties for each slot.
+ std::vector<int32_t> slot_values_[EVDEV_ABS_MT_COUNT];
+
DISALLOW_COPY_AND_ASSIGN(EventDeviceInfo);
};