aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/event/Combiner.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-03-18 11:09:41 +0900
committerJean Chalard <jchalard@google.com>2014-03-20 16:59:29 +0900
commitf2bb15b0ab212e1ef45be2d2ea6610cfa9c9f15c (patch)
treece85ba137ea3f8b9b681d5e000241eddad78967d /java/src/com/android/inputmethod/event/Combiner.java
parent7ede642df417c0f732573f639970b138f0bee18c (diff)
downloadlatinime-f2bb15b0ab212e1ef45be2d2ea6610cfa9c9f15c.tar.gz
latinime-f2bb15b0ab212e1ef45be2d2ea6610cfa9c9f15c.tar.xz
latinime-f2bb15b0ab212e1ef45be2d2ea6610cfa9c9f15c.zip
[CB09] Pass events through the combiner chain
Bug: 13406701 Change-Id: I4696f145478afdd132314b7d3c148c3a9ca11c9c
Diffstat (limited to 'java/src/com/android/inputmethod/event/Combiner.java')
-rw-r--r--java/src/com/android/inputmethod/event/Combiner.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/event/Combiner.java b/java/src/com/android/inputmethod/event/Combiner.java
index ab6b70c04..c3869a299 100644
--- a/java/src/com/android/inputmethod/event/Combiner.java
+++ b/java/src/com/android/inputmethod/event/Combiner.java
@@ -16,14 +16,22 @@
package com.android.inputmethod.event;
+import java.util.ArrayList;
+
/**
- * A generic interface for combiners.
+ * A generic interface for combiners. Combiners are objects that transform chains of input events
+ * into committable strings and manage feedback to show to the user on the combining state.
*/
public interface Combiner {
/**
- * Combine an event with the existing state and return the new event.
+ * Process an event, possibly combining it with the existing state and return the new event.
+ *
+ * If this event does not result in any new event getting passed down the chain, this method
+ * returns null. It may also modify the previous event list if appropriate.
+ *
+ * @param previousEvents the previous events in this composition.
* @param event the event to combine with the existing state.
* @return the resulting event.
*/
- Event combine(Event event);
+ Event processEvent(ArrayList<Event> previousEvents, Event event);
}