Index: mojo/bindings/java/src/org/chromium/mojo/bindings/Callbacks.java |
diff --git a/mojo/bindings/java/src/org/chromium/mojo/bindings/Callbacks.java b/mojo/bindings/java/src/org/chromium/mojo/bindings/Callbacks.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7c316dc175726067cfe262214278c3b916a53582 |
--- /dev/null |
+++ b/mojo/bindings/java/src/org/chromium/mojo/bindings/Callbacks.java |
@@ -0,0 +1,122 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// This file has been generated using |
+// mojo/tools/generate_java_callback_interfaces.py |
+ |
+package org.chromium.mojo.bindings; |
+ |
+/** |
+ * Contain generic interface for callbacks. |
+ */ |
+public interface Callbacks { |
+ |
+ /** |
+ * A generic 1 argument(s) callback. |
+ * |
+ * @param <T1> the type of the 1 argument. |
+ */ |
+ interface Callback1<T1> { |
+ /** |
+ * Call the callback. |
+ */ |
+ public void call(T1 t1); |
+ } |
+ |
+ /** |
+ * A generic 2 argument(s) callback. |
+ * |
+ * @param <T1> the type of the 1 argument. |
+ * @param <T2> the type of the 2 argument. |
+ */ |
+ interface Callback2<T1, T2> { |
+ /** |
+ * Call the callback. |
+ */ |
+ public void call(T1 t1, T2 t2); |
+ } |
+ |
+ /** |
+ * A generic 3 argument(s) callback. |
+ * |
+ * @param <T1> the type of the 1 argument. |
+ * @param <T2> the type of the 2 argument. |
+ * @param <T3> the type of the 3 argument. |
+ */ |
+ interface Callback3<T1, T2, T3> { |
+ /** |
+ * Call the callback. |
+ */ |
+ public void call(T1 t1, T2 t2, T3 t3); |
+ } |
+ |
+ /** |
+ * A generic 4 argument(s) callback. |
+ * |
+ * @param <T1> the type of the 1 argument. |
+ * @param <T2> the type of the 2 argument. |
+ * @param <T3> the type of the 3 argument. |
+ * @param <T4> the type of the 4 argument. |
+ */ |
+ interface Callback4<T1, T2, T3, T4> { |
+ /** |
+ * Call the callback. |
+ */ |
+ public void call(T1 t1, T2 t2, T3 t3, T4 t4); |
+ } |
+ |
+ /** |
+ * A generic 5 argument(s) callback. |
+ * |
+ * @param <T1> the type of the 1 argument. |
+ * @param <T2> the type of the 2 argument. |
+ * @param <T3> the type of the 3 argument. |
+ * @param <T4> the type of the 4 argument. |
+ * @param <T5> the type of the 5 argument. |
+ */ |
+ interface Callback5<T1, T2, T3, T4, T5> { |
+ /** |
+ * Call the callback. |
+ */ |
+ public void call(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5); |
+ } |
+ |
+ /** |
+ * A generic 6 argument(s) callback. |
+ * |
+ * @param <T1> the type of the 1 argument. |
+ * @param <T2> the type of the 2 argument. |
+ * @param <T3> the type of the 3 argument. |
+ * @param <T4> the type of the 4 argument. |
+ * @param <T5> the type of the 5 argument. |
+ * @param <T6> the type of the 6 argument. |
+ */ |
+ interface Callback6<T1, T2, T3, T4, T5, T6> { |
+ /** |
+ * Call the callback. |
+ */ |
+ public void call(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6); |
+ } |
+ |
+ /** |
+ * A generic 7 argument(s) callback. |
+ * |
+ * @param <T1> the type of the 1 argument. |
+ * @param <T2> the type of the 2 argument. |
+ * @param <T3> the type of the 3 argument. |
+ * @param <T4> the type of the 4 argument. |
+ * @param <T5> the type of the 5 argument. |
+ * @param <T6> the type of the 6 argument. |
+ * @param <T7> the type of the 7 argument. |
+ */ |
+ interface Callback7<T1, T2, T3, T4, T5, T6, T7> { |
+ /** |
+ * Call the callback. |
+ */ |
+ public void call(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7); |
rmcilroy
2014/06/05 12:10:26
nit - t1->arg1, etc.
|
+ } |
+ |
+ |
+} |
+ |