'\" t .\" Title: input_mt_assign_slots .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Input Subsystem .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "INPUT_MT_ASSIGN_SLOT" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Input Subsystem" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" input_mt_assign_slots \- perform a best\-match assignment .SH "SYNOPSIS" .HP \w'int\ input_mt_assign_slots('u .BI "int input_mt_assign_slots(struct\ input_dev\ *\ " "dev" ", int\ *\ " "slots" ", const\ struct\ input_mt_pos\ *\ " "pos" ", int\ " "num_pos" ", int\ " "dmax" ");" .SH "ARGUMENTS" .PP \fIdev\fR .RS 4 input device with allocated MT slots .RE .PP \fIslots\fR .RS 4 the slot assignment to be filled .RE .PP \fIpos\fR .RS 4 the position array to match .RE .PP \fInum_pos\fR .RS 4 number of positions .RE .PP \fIdmax\fR .RS 4 maximum ABS_MT_POSITION displacement (zero for infinite) .RE .SH "DESCRIPTION" .PP Performs a best match against the current contacts and returns the slot assignment list\&. New contacts are assigned to unused slots\&. .PP The assignments are balanced so that all coordinate displacements are below the euclidian distance dmax\&. If no such assignment can be found, some contacts are assigned to unused slots\&. .PP Returns zero on success, or negative error in case of failure\&. .SH "COPYRIGHT" .br