Backed out changeset f1426851ae30 (bug 1844755) for causing failures on test_printpre...
[gecko.git] / widget / android / nsIAndroidBridge.idl
blobb30ed60d7702b0dbac65fbb4f74c300684b26144
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "nsISupports.idl"
7 interface mozIDOMWindowProxy;
9 [scriptable, uuid(e64c39b8-b8ec-477d-aef5-89d517ff9219)]
10 interface nsIAndroidEventCallback : nsISupports
12 [implicit_jscontext]
13 void onSuccess([optional] in jsval data);
14 [implicit_jscontext]
15 void onError([optional] in jsval data);
18 [scriptable, function, uuid(819ee2db-d3b8-46dd-a476-40f89c49133c)]
19 interface nsIAndroidEventFinalizer : nsISupports
21 void onFinalize();
24 [scriptable, function, uuid(73569a75-78eb-4c7f-82b9-2d4f5ccf44c3)]
25 interface nsIAndroidEventListener : nsISupports
27 void onEvent(in AString event,
28 [optional] in jsval data,
29 [optional] in nsIAndroidEventCallback callback);
32 [scriptable, uuid(e98bf792-4145-411e-b298-8219d9b03817)]
33 interface nsIAndroidEventDispatcher : nsISupports
35 [implicit_jscontext]
36 void dispatch(in jsval event,
37 [optional] in jsval data,
38 [optional] in nsIAndroidEventCallback callback,
39 [optional] in nsIAndroidEventFinalizer finalizer);
40 [implicit_jscontext]
41 void registerListener(in nsIAndroidEventListener listener,
42 in jsval events);
43 [implicit_jscontext]
44 void unregisterListener(in nsIAndroidEventListener listener,
45 in jsval events);
48 [scriptable, uuid(60a78a94-6117-432f-9d49-304913a931c5)]
49 interface nsIAndroidView : nsIAndroidEventDispatcher
51 [implicit_jscontext] readonly attribute jsval initData;
54 [scriptable, uuid(1beb70d3-70f3-4742-98cc-a3d301b26c0c)]
55 interface nsIAndroidBridge : nsIAndroidEventDispatcher
57 nsIAndroidEventDispatcher getDispatcherByName(in string name);