summaryrefslogtreecommitdiff
path: root/src/grail-api.c
Commit message (Collapse)AuthorAgeFilesLines
* Allow replay of device data through grailHenrik Rydberg2011-04-041-10/+56
| | | | | | | | | | | This patch adds replay capabilities to grail. If the specified device points to a valid evemu file, the device properties will be extracted from that file instead. Any appended event data will be replayed in realtime when calling grail_pull_mtdev(). In practise, grail_gesture may be executed with a test file. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Also send EV_KEY through utouch-frameChase Douglas2011-04-041-1/+1
| | | | | | | | | To support semi-mt devices, buttons need to be scanned for touch count information. This patch adds EV_KEY to the set of event types sent through utouch-frame. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Skip events selectivelyHenrik Rydberg2011-03-141-7/+40
| | | | | | | | | Buffer all events as planned, but strip the stream of all events involved with pointer and MT, rather than bluntly removing all events. In practise, this means button and switch events are let through, undistorted although possibly slightly delayed. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Wait for the right number of fingers before gesture timeoutHenrik Rydberg2011-03-141-1/+3
| | | | | | | | | A client listening only for multi-finger gestures will not get the chance to recognize unless there is a gesture timeout. This patch waits until the drag hold time has passed before releasing the touch. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Introduce gesture timeoutsHenrik Rydberg2011-03-141-127/+46
| | | | | | | | | The timeout of a gesture is integral to the gesture type. This patch introduces timeout per gesture type, potentially enabling more control over gesture timing aspects. The timeout logic replaces the recently added recognition state. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Add in time boundaries for recognitionChase Douglas2011-03-141-18/+136
| | | | | | | | | | | | | | | | | | | | | 50 ms: Minimum time waiting for touch configuration to settle before flushing touch events to X. We don't want a two finger gesture triggering X events for the first finger before the second finger lands. 200 ms: Maximum time for touches to begin a gesture. If no gesture is found within this time period, the events are flushed to X. If after 50 ms there are no possible gestures for the number of active touches, the events are immediately flushed to X. If events are flushed to X, no more gesture recognition is possible until all touches are lifted. Likewise, if any gesture is recognized, no events may be flushed to X until all touches are lifted. [rydberg@euromail.se: this patch is severely restrictive and not final] Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Remove pointer emulationChase Douglas2011-03-141-150/+15
| | | | | | | | With the assumption that X will be handle to handle the gesture cases correctly, remove the pointer emulation Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Small compilation warning fixesChase Douglas2011-03-141-3/+1
| | | | | | | Found by using -Wall -Werror Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Replace touch logic with utouch frame engineHenrik Rydberg2011-01-021-122/+158
| | | | | | | | | | | The original grail uses an internal touch framework and exports some touch information as extended attributes to gesture events. This was never quite the intention, but rather to expose gestures and touches on a similar footing, such that grail can be input agnostic. This patch starts off by replacing the internal touch framework with the utouch-frame engine. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Prepare for queued event handlingHenrik Rydberg2011-01-021-11/+14
| | | | | | | | | The current grail operates via callbacks. In order to make grail work as a pipe, where input and output can be controlled externally, add the missing event queue for gestures, and align the code to simplify a switch. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Use a unified pointer emulation modelHenrik Rydberg2010-11-171-4/+56
| | | | | | | | | | | | | | | The existing kernel MT devices together use a handful of different pointer emulation strategies, each with its own subtlety. This creates a problem for grail, which needs to rebuild pointer emulation during gesture recognition; relying on the correct pointer information to be available at the right time becomes almost impossible. This patch implements a common pointer emulation model for grail, following a strategy recently discussed on LKML. This resolves the problems stemming from different emulation strategies, and results in a common pointer emulation experience for all devices. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Report touch down on one-finger entryHenrik Rydberg2010-10-181-3/+3
| | | | | | | | | | | | | The current code mistakenly set the pointer logic based on the single variable, which is false at the entry to one-finger mode, but true immediately afterwards. This leads to grail sometimes failing to emit the proper emulation sequence, resulting in a missed touch in X. This patch corrects the logic such that the pointer is based directly on one-finger mode, thereby solving the problem. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Add tap emulationHenrik Rydberg2010-09-211-3/+17
| | | | | | | | | | | Touchscreens always emit a button event when touching the screen. Trackpads, however, are considered hovering while touching the pad, and instead uses taps to emits button events, which is traditionally implemented elsewhere, and thus leaves a functionality discrepancy. This patch adds tap emulation to grail, utilizing gesture engine. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Split pointer status and report statusHenrik Rydberg2010-09-211-3/+28
| | | | | | | Separate out reporting of the touch state, such that reporting can be deferred. Does not introduce any logic changes. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* bug: Only report position change eventsHenrik Rydberg2010-09-211-2/+8
| | | | | | | This bug was introduced in v1.0.11. Only report events when the pointer position is actually changing. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Reorganize input event emulation codeHenrik Rydberg2010-09-211-34/+23
| | | | | | | | | Inject the emulated events into the event buffer instead, and move the pointer logic into the emulation handler. Introduces no logical changes, but reveals the bug in the position event frequency. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Move input event filter from tail side to head sideHenrik Rydberg2010-09-211-12/+3
| | | | | | | | There is no need to buffer events that will be ignored later on, so move the event filter to the upstream side. This also allows the event buffer to be used for injected events. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Simplify book-keeping of active gesturesHenrik Rydberg2010-09-211-4/+5
| | | | | | | | | The current frame computation returns the event types to filter, which is less useful than knowing what gesture types are active in the frame. Add the active gesture types to the frame struct and simplify usage. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Only emit abs events when motion is activeHenrik Rydberg2010-09-101-2/+9
| | | | | | | | | | | | | This bug was hidden behind the motion inhibit during tapping, but resurfaced when tapping from resting finger was introduced. With this patch, pointer movement is inhibited also when lifting fingers from the surface. Ideally, tapping should be treated as a transient event, which would allow zero pointer event also _before_ the tap, but presently unity seems to depend on the initial pointer movement as a touch-down event. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Correct abs event handlingHenrik Rydberg2010-08-261-20/+47
| | | | | | | | | | The current code lets abs events through during one-finger drags, and tapping does not work properly due to abs events not always being present during taps. Track the pointer position and emit abs events only if no gestures are in effect, and only if not explicitly filtered. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Make grail implementation visible to all local filesHenrik Rydberg2010-08-191-9/+1
| | | | Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Simplify touch machineryHenrik Rydberg2010-08-191-21/+25
| | | | | | | | | | To be able to model touch information uniformly across all supported devices, the semantics of the touch attributes has to be treated explicitly. Drop the generic touch property array and replace it by an actual structure. In addition, the touch-engine abstraction turned out to not be needed, so drop it as well. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Repackaged to utouch-grail v1.0.8v1.0.8Henrik Rydberg2010-08-121-10/+3
| | | | Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* the bug fix, raw materialHenrik Rydberg2010-08-121-3/+10
|
* janitor: conformant argument order in apiHenrik Rydberg2010-08-111-2/+2
| | | | Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Count the extra touch event and mask additional abs eventsHenrik Rydberg2010-08-101-0/+4
| | | | | | | Not counting the BTN_TOUCH event implied not emitting the sync event, which confused evdev. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Filter kernel touch and tap buttonsHenrik Rydberg2010-08-101-1/+27
| | | | | | Reinsert BTN_TOUCH depending on the drag gesture Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* always send pointer movement gesturesHenrik Rydberg2010-08-101-2/+12
| | | | | | | Always send drag events for one-finger touches, but only filter the ABS_X/Y events if grail_filter_abs_events() is set to true. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* Update README and copyright in all filesHenrik Rydberg2010-08-061-0/+22
| | | | | | Add the author to the copyright, courtesy of Canonical Ltd. Signed-off-by: Henrik Rydberg <rydberg@bitmath.org>
* initial bzr repo at rev 27Henrik Rydberg2010-08-061-0/+115