ext-input
ext-input defines how a touch screen talks to a script, without knowing which chip is behind it.
Baremetal\Input\Touch: the interface a touch driver implements.point()reads the point touched now,events()turns on the events.Pressed,Moved,ReleasedandGesture: the events a touch device raises on the event bus of ext-events. They share the abstract baseTouchEvent, with the coordinates$xand$y.GestureType: the enum of the gestures a controller can recognise (swipes, tap, double tap, long press).- A small C API (
bm_input.h) for the driver authors.
The coordinates are the ones of the screen, so a driver applies the orientation of the panel before it raises an event. There is one finger: the events describe a single point.
ext-input needs ext-events 1.1 or later and nothing else: no bus, no pin and no platform code. Events work in the
event-driven runtime.
See Events for the PHP side and C API for touch drivers for the driver side.