aboutsummaryrefslogtreecommitdiff
path: root/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Callbacks.java
blob: c6b14c14944df9460f6630257a2734aa8d46cd06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
// 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 was generated using
//     mojo/tools/generate_java_callback_interfaces.py

package org.chromium.mojo.bindings;

/**
 * Contains a generic interface for callbacks.
 */
public interface Callbacks {

    /**
     * A generic callback.
     */
    interface Callback0 {
        /**
         * Call the callback.
         */
        public void call();
    }

    /**
     * A generic 1-argument callback.
     *
     * @param <T1> the type of argument 1.
     */
    interface Callback1<T1> {
        /**
         * Call the callback.
         */
        public void call(T1 arg1);
    }

    /**
     * A generic 2-argument callback.
     *
     * @param <T1> the type of argument 1.
      * @param <T2> the type of argument 2.
     */
    interface Callback2<T1, T2> {
        /**
         * Call the callback.
         */
        public void call(T1 arg1, T2 arg2);
    }

    /**
     * A generic 3-argument callback.
     *
     * @param <T1> the type of argument 1.
      * @param <T2> the type of argument 2.
      * @param <T3> the type of argument 3.
     */
    interface Callback3<T1, T2, T3> {
        /**
         * Call the callback.
         */
        public void call(T1 arg1, T2 arg2, T3 arg3);
    }

    /**
     * A generic 4-argument callback.
     *
     * @param <T1> the type of argument 1.
      * @param <T2> the type of argument 2.
      * @param <T3> the type of argument 3.
      * @param <T4> the type of argument 4.
     */
    interface Callback4<T1, T2, T3, T4> {
        /**
         * Call the callback.
         */
        public void call(T1 arg1, T2 arg2, T3 arg3, T4 arg4);
    }

    /**
     * A generic 5-argument callback.
     *
     * @param <T1> the type of argument 1.
      * @param <T2> the type of argument 2.
      * @param <T3> the type of argument 3.
      * @param <T4> the type of argument 4.
      * @param <T5> the type of argument 5.
     */
    interface Callback5<T1, T2, T3, T4, T5> {
        /**
         * Call the callback.
         */
        public void call(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5);
    }

    /**
     * A generic 6-argument callback.
     *
     * @param <T1> the type of argument 1.
      * @param <T2> the type of argument 2.
      * @param <T3> the type of argument 3.
      * @param <T4> the type of argument 4.
      * @param <T5> the type of argument 5.
      * @param <T6> the type of argument 6.
     */
    interface Callback6<T1, T2, T3, T4, T5, T6> {
        /**
         * Call the callback.
         */
        public void call(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6);
    }

    /**
     * A generic 7-argument callback.
     *
     * @param <T1> the type of argument 1.
      * @param <T2> the type of argument 2.
      * @param <T3> the type of argument 3.
      * @param <T4> the type of argument 4.
      * @param <T5> the type of argument 5.
      * @param <T6> the type of argument 6.
      * @param <T7> the type of argument 7.
     */
    interface Callback7<T1, T2, T3, T4, T5, T6, T7> {
        /**
         * Call the callback.
         */
        public void call(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7);
    }

}