aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/event/Combiner.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-03-20 08:32:36 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-03-20 08:32:36 +0000
commit83372e75e4fc030e77de470e08cf7012436c759a (patch)
tree88ef7e0ca857758c6c2ca80260234004211e7365 /java/src/com/android/inputmethod/event/Combiner.java
parentf64a9d8fd6d764adc002e854246385e682821c2c (diff)
parentf2bb15b0ab212e1ef45be2d2ea6610cfa9c9f15c (diff)
downloadlatinime-83372e75e4fc030e77de470e08cf7012436c759a.tar.gz
latinime-83372e75e4fc030e77de470e08cf7012436c759a.tar.xz
latinime-83372e75e4fc030e77de470e08cf7012436c759a.zip
Merge "[CB09] Pass events through the combiner chain"
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);
}