最終更新:2016-03-08 (火) 16:06:58 (2963d)  

input_mt_init_slots
Top / input_mt_init_slots

Linux 2.6.38

input_mt_init_slots() - initialize MT input slots
@dev: input device supporting MT events and finger tracking
@num_slots: number of slots used by the device
@flags: mt tasks to handle in core

This function allocates all necessary memory for MT slot handling
in the input device, prepares the ABS_MT_SLOT and
ABS_MT_TRACKING_ID events for use and sets up appropriate buffers.
Depending on the flags set, it also performs pointer emulation and
frame synchronization.

May be called repeatedly. Returns -EINVAL if attempting to
reinitialize with a different number of slots.

Linux 3.6まで

int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots);

Linux 3.7から

int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots, unsigned int flags);

flags

  • INPUT_MT_POINTER?0x0001pointer device, e.g. trackpad
    INPUT_MT_DIRECT?0x0002direct device, e.g. touchscreen
    INPUT_MT_DROP_UNUSED?0x0004drop contacts not seen in frame
    INPUT_MT_TRACK?0x0008use in-kernel tracking

定義