Bug 1942006 - Upstream a variety of Servo-specific code from Servo's downstream fork...
[gecko.git] / widget / nsIGeckoViewBridge.idl
blobb80257f745bd762f05857d3961700be3c6f0e743
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 nsIGeckoViewEventCallback : 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 nsIGeckoViewEventFinalizer : nsISupports
21 void onFinalize();
24 [scriptable, function, uuid(73569a75-78eb-4c7f-82b9-2d4f5ccf44c3)]
25 interface nsIGeckoViewEventListener : nsISupports
27 void onEvent(in AString event,
28 [optional] in jsval data,
29 [optional] in nsIGeckoViewEventCallback callback);
32 [scriptable, uuid(e98bf792-4145-411e-b298-8219d9b03817)]
33 interface nsIGeckoViewEventDispatcher : nsISupports
35 [implicit_jscontext]
36 void dispatch(in jsval event,
37 [optional] in jsval data,
38 [optional] in nsIGeckoViewEventCallback callback,
39 [optional] in nsIGeckoViewEventFinalizer finalizer);
40 [implicit_jscontext]
41 void registerListener(in nsIGeckoViewEventListener listener,
42 in jsval events);
43 [implicit_jscontext]
44 void unregisterListener(in nsIGeckoViewEventListener listener,
45 in jsval events);
48 [scriptable, uuid(60a78a94-6117-432f-9d49-304913a931c5)]
49 interface nsIGeckoViewView : nsIGeckoViewEventDispatcher
51 [implicit_jscontext] readonly attribute jsval initData;
54 [scriptable, uuid(1beb70d3-70f3-4742-98cc-a3d301b26c0c)]
55 interface nsIGeckoViewBridge : nsIGeckoViewEventDispatcher
57 nsIGeckoViewEventDispatcher getDispatcherByName(in string name);