APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.glass.ui.monocle

pack-priv Class LinuxTouchTransform

extends Object
Class Inheritance
Imports
java.util.Arrays

Handles conversion between raw axis values received from Linux input devices and screen pixel values. By default input values are mapped form the device input range to the screen dimensions. The device input range can be overriden in using system properties of the form: monocle.input.PRODUCT_ID.KEY=VALUE PRODUCT_ID is the product descriptor received from udev KEY is one of minX, minY, maxX, maxY or flipXY flipXY is a boolean value; the others are integers.

Field Summary

Modifier and TypeField and Description
private int[]
private LinuxInputDevice
private boolean
private int[]
private int[]
private double[]
private double[]

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv int

Returns:

an axis number (e.g. Input.ABS_X)
getAxis
(LinuxEventBuffer
A LinuxEventBuffer containing a raw event line
buffer
)

Gets the transformed axis number of the current event in the buffer provided.

pack-priv int

Returns:

a transformed value in screen space
getValue
(LinuxEventBuffer
A LinuxEventBuffer containing a raw event line
buffer
)

Gets the transformed pixel coordinate of the current event in the buffer provided.

private void
initTransform(int axis, int index)

private int
transform(int index, int value)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

axesback to summary
private int[] axes
deviceback to summary
private LinuxInputDevice device
flipXYback to summary
private boolean flipXY
maxsback to summary
private int[] maxs
minsback to summary
private int[] mins
scalarsback to summary
private double[] scalars
translatesback to summary
private double[] translates

Constructor Detail

LinuxTouchTransformback to summary
pack-priv LinuxTouchTransform(LinuxInputDevice device)

Method Detail

getAxisback to summary
pack-priv int getAxis(LinuxEventBuffer buffer)

Gets the transformed axis number of the current event in the buffer provided.

Parameters
buffer:LinuxEventBuffer

A LinuxEventBuffer containing a raw event line

Returns:int

an axis number (e.g. Input.ABS_X)

getValueback to summary
pack-priv int getValue(LinuxEventBuffer buffer)

Gets the transformed pixel coordinate of the current event in the buffer provided.

Parameters
buffer:LinuxEventBuffer

A LinuxEventBuffer containing a raw event line

Returns:int

a transformed value in screen space

initTransformback to summary
private void initTransform(int axis, int index)
transformback to summary
private int transform(int index, int value)