Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/widget/android/nsIAndroidBridge.idl
*/
#ifndef __gen_nsIAndroidBridge_h__
#define __gen_nsIAndroidBridge_h__
#include "nsISupports.h"
#include "js/Value.h"
#include "js/GCAnnotations.h"
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class mozIDOMWindowProxy; /* forward declaration */
/* starting interface: nsIAndroidEventCallback */
#define NS_IANDROIDEVENTCALLBACK_IID_STR "e64c39b8-b8ec-477d-aef5-89d517ff9219"
#define NS_IANDROIDEVENTCALLBACK_IID \
{0xe64c39b8, 0xb8ec, 0x477d, \
{ 0xae, 0xf5, 0x89, 0xd5, 0x17, 0xff, 0x92, 0x19 }}
class NS_NO_VTABLE nsIAndroidEventCallback : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IANDROIDEVENTCALLBACK_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIAndroidEventCallback;
/* [implicit_jscontext] void onSuccess ([optional] in jsval data); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnSuccess(JS::Handle<JS::Value> data, JSContext* cx) = 0;
/* [implicit_jscontext] void onError ([optional] in jsval data); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnError(JS::Handle<JS::Value> data, JSContext* cx) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIAndroidEventCallback, NS_IANDROIDEVENTCALLBACK_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIANDROIDEVENTCALLBACK \
NS_IMETHOD OnSuccess(JS::Handle<JS::Value> data, JSContext* cx) override; \
NS_IMETHOD OnError(JS::Handle<JS::Value> data, JSContext* cx) override;
/* Use this macro when declaring the members of this interface when the
class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIANDROIDEVENTCALLBACK \
nsresult OnSuccess(JS::Handle<JS::Value> data, JSContext* cx); \
nsresult OnError(JS::Handle<JS::Value> data, JSContext* cx);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIANDROIDEVENTCALLBACK(_to) \
NS_IMETHOD OnSuccess(JS::Handle<JS::Value> data, JSContext* cx) override { return _to OnSuccess(data, cx); } \
NS_IMETHOD OnError(JS::Handle<JS::Value> data, JSContext* cx) override { return _to OnError(data, cx); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIANDROIDEVENTCALLBACK(_to) \
NS_IMETHOD OnSuccess(JS::Handle<JS::Value> data, JSContext* cx) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnSuccess(data, cx); } \
NS_IMETHOD OnError(JS::Handle<JS::Value> data, JSContext* cx) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnError(data, cx); }
/* starting interface: nsIAndroidEventFinalizer */
#define NS_IANDROIDEVENTFINALIZER_IID_STR "819ee2db-d3b8-46dd-a476-40f89c49133c"
#define NS_IANDROIDEVENTFINALIZER_IID \
{0x819ee2db, 0xd3b8, 0x46dd, \
{ 0xa4, 0x76, 0x40, 0xf8, 0x9c, 0x49, 0x13, 0x3c }}
class NS_NO_VTABLE nsIAndroidEventFinalizer : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IANDROIDEVENTFINALIZER_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIAndroidEventFinalizer;
/* void onFinalize (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnFinalize(void) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIAndroidEventFinalizer, NS_IANDROIDEVENTFINALIZER_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIANDROIDEVENTFINALIZER \
NS_IMETHOD OnFinalize(void) override;
/* Use this macro when declaring the members of this interface when the
class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIANDROIDEVENTFINALIZER \
nsresult OnFinalize(void);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIANDROIDEVENTFINALIZER(_to) \
NS_IMETHOD OnFinalize(void) override { return _to OnFinalize(); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIANDROIDEVENTFINALIZER(_to) \
NS_IMETHOD OnFinalize(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnFinalize(); }
/* starting interface: nsIAndroidEventListener */
#define NS_IANDROIDEVENTLISTENER_IID_STR "73569a75-78eb-4c7f-82b9-2d4f5ccf44c3"
#define NS_IANDROIDEVENTLISTENER_IID \
{0x73569a75, 0x78eb, 0x4c7f, \
{ 0x82, 0xb9, 0x2d, 0x4f, 0x5c, 0xcf, 0x44, 0xc3 }}
class NS_NO_VTABLE nsIAndroidEventListener : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IANDROIDEVENTLISTENER_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIAndroidEventListener;
/* void onEvent (in AString event, [optional] in jsval data, [optional] in nsIAndroidEventCallback callback); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnEvent(const nsAString& event, JS::Handle<JS::Value> data, nsIAndroidEventCallback *callback) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIAndroidEventListener, NS_IANDROIDEVENTLISTENER_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIANDROIDEVENTLISTENER \
NS_IMETHOD OnEvent(const nsAString& event, JS::Handle<JS::Value> data, nsIAndroidEventCallback *callback) override;
/* Use this macro when declaring the members of this interface when the
class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIANDROIDEVENTLISTENER \
nsresult OnEvent(const nsAString& event, JS::Handle<JS::Value> data, nsIAndroidEventCallback *callback);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIANDROIDEVENTLISTENER(_to) \
NS_IMETHOD OnEvent(const nsAString& event, JS::Handle<JS::Value> data, nsIAndroidEventCallback *callback) override { return _to OnEvent(event, data, callback); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIANDROIDEVENTLISTENER(_to) \
NS_IMETHOD OnEvent(const nsAString& event, JS::Handle<JS::Value> data, nsIAndroidEventCallback *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnEvent(event, data, callback); }
/* starting interface: nsIAndroidEventDispatcher */
#define NS_IANDROIDEVENTDISPATCHER_IID_STR "e98bf792-4145-411e-b298-8219d9b03817"
#define NS_IANDROIDEVENTDISPATCHER_IID \
{0xe98bf792, 0x4145, 0x411e, \
{ 0xb2, 0x98, 0x82, 0x19, 0xd9, 0xb0, 0x38, 0x17 }}
class NS_NO_VTABLE nsIAndroidEventDispatcher : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IANDROIDEVENTDISPATCHER_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIAndroidEventDispatcher;
/* [implicit_jscontext] void dispatch (in jsval event, [optional] in jsval data, [optional] in nsIAndroidEventCallback callback, [optional] in nsIAndroidEventFinalizer finalizer); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Dispatch(JS::Handle<JS::Value> event, JS::Handle<JS::Value> data, nsIAndroidEventCallback *callback, nsIAndroidEventFinalizer *finalizer, JSContext* cx) = 0;
/* [implicit_jscontext] void registerListener (in nsIAndroidEventListener listener, in jsval events); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RegisterListener(nsIAndroidEventListener *listener, JS::Handle<JS::Value> events, JSContext* cx) = 0;
/* [implicit_jscontext] void unregisterListener (in nsIAndroidEventListener listener, in jsval events); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD UnregisterListener(nsIAndroidEventListener *listener, JS::Handle<JS::Value> events, JSContext* cx) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIAndroidEventDispatcher, NS_IANDROIDEVENTDISPATCHER_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIANDROIDEVENTDISPATCHER \
NS_IMETHOD Dispatch(JS::Handle<JS::Value> event, JS::Handle<JS::Value> data, nsIAndroidEventCallback *callback, nsIAndroidEventFinalizer *finalizer, JSContext* cx) override; \
NS_IMETHOD RegisterListener(nsIAndroidEventListener *listener, JS::Handle<JS::Value> events, JSContext* cx) override; \
NS_IMETHOD UnregisterListener(nsIAndroidEventListener *listener, JS::Handle<JS::Value> events, JSContext* cx) override;
/* Use this macro when declaring the members of this interface when the
class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIANDROIDEVENTDISPATCHER \
nsresult Dispatch(JS::Handle<JS::Value> event, JS::Handle<JS::Value> data, nsIAndroidEventCallback *callback, nsIAndroidEventFinalizer *finalizer, JSContext* cx); \
nsresult RegisterListener(nsIAndroidEventListener *listener, JS::Handle<JS::Value> events, JSContext* cx); \
nsresult UnregisterListener(nsIAndroidEventListener *listener, JS::Handle<JS::Value> events, JSContext* cx);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIANDROIDEVENTDISPATCHER(_to) \
NS_IMETHOD Dispatch(JS::Handle<JS::Value> event, JS::Handle<JS::Value> data, nsIAndroidEventCallback *callback, nsIAndroidEventFinalizer *finalizer, JSContext* cx) override { return _to Dispatch(event, data, callback, finalizer, cx); } \
NS_IMETHOD RegisterListener(nsIAndroidEventListener *listener, JS::Handle<JS::Value> events, JSContext* cx) override { return _to RegisterListener(listener, events, cx); } \
NS_IMETHOD UnregisterListener(nsIAndroidEventListener *listener, JS::Handle<JS::Value> events, JSContext* cx) override { return _to UnregisterListener(listener, events, cx); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIANDROIDEVENTDISPATCHER(_to) \
NS_IMETHOD Dispatch(JS::Handle<JS::Value> event, JS::Handle<JS::Value> data, nsIAndroidEventCallback *callback, nsIAndroidEventFinalizer *finalizer, JSContext* cx) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Dispatch(event, data, callback, finalizer, cx); } \
NS_IMETHOD RegisterListener(nsIAndroidEventListener *listener, JS::Handle<JS::Value> events, JSContext* cx) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterListener(listener, events, cx); } \
NS_IMETHOD UnregisterListener(nsIAndroidEventListener *listener, JS::Handle<JS::Value> events, JSContext* cx) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterListener(listener, events, cx); }
/* starting interface: nsIAndroidView */
#define NS_IANDROIDVIEW_IID_STR "60a78a94-6117-432f-9d49-304913a931c5"
#define NS_IANDROIDVIEW_IID \
{0x60a78a94, 0x6117, 0x432f, \
{ 0x9d, 0x49, 0x30, 0x49, 0x13, 0xa9, 0x31, 0xc5 }}
class NS_NO_VTABLE nsIAndroidView : public nsIAndroidEventDispatcher {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IANDROIDVIEW_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIAndroidView;
/* [implicit_jscontext] readonly attribute jsval initData; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetInitData(JSContext* cx, JS::MutableHandle<JS::Value> aInitData) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIAndroidView, NS_IANDROIDVIEW_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIANDROIDVIEW \
NS_IMETHOD GetInitData(JSContext* cx, JS::MutableHandle<JS::Value> aInitData) override;
/* Use this macro when declaring the members of this interface when the
class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIANDROIDVIEW \
nsresult GetInitData(JSContext* cx, JS::MutableHandle<JS::Value> aInitData);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIANDROIDVIEW(_to) \
NS_IMETHOD GetInitData(JSContext* cx, JS::MutableHandle<JS::Value> aInitData) override { return _to GetInitData(cx, aInitData); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIANDROIDVIEW(_to) \
NS_IMETHOD GetInitData(JSContext* cx, JS::MutableHandle<JS::Value> aInitData) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInitData(cx, aInitData); }
/* starting interface: nsIAndroidBridge */
#define NS_IANDROIDBRIDGE_IID_STR "1beb70d3-70f3-4742-98cc-a3d301b26c0c"
#define NS_IANDROIDBRIDGE_IID \
{0x1beb70d3, 0x70f3, 0x4742, \
{ 0x98, 0xcc, 0xa3, 0xd3, 0x01, 0xb2, 0x6c, 0x0c }}
class NS_NO_VTABLE nsIAndroidBridge : public nsIAndroidEventDispatcher {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IANDROIDBRIDGE_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIAndroidBridge;
/* nsIAndroidEventDispatcher getDispatcherByName (in string name); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDispatcherByName(const char * name, nsIAndroidEventDispatcher **_retval) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIAndroidBridge, NS_IANDROIDBRIDGE_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIANDROIDBRIDGE \
NS_IMETHOD GetDispatcherByName(const char * name, nsIAndroidEventDispatcher **_retval) override;
/* Use this macro when declaring the members of this interface when the
class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIANDROIDBRIDGE \
nsresult GetDispatcherByName(const char * name, nsIAndroidEventDispatcher **_retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIANDROIDBRIDGE(_to) \
NS_IMETHOD GetDispatcherByName(const char * name, nsIAndroidEventDispatcher **_retval) override { return _to GetDispatcherByName(name, _retval); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIANDROIDBRIDGE(_to) \
NS_IMETHOD GetDispatcherByName(const char * name, nsIAndroidEventDispatcher **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDispatcherByName(name, _retval); }
#endif /* __gen_nsIAndroidBridge_h__ */