Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/widget/nsIStandaloneNativeMenu.idl
*/
#ifndef __gen_nsIStandaloneNativeMenu_h__
#define __gen_nsIStandaloneNativeMenu_h__
#include "nsISupports.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
namespace mozilla {
namespace dom {
class Element; /* webidl Element */
} // namespace dom
} // namespace mozilla
/* starting interface: nsIStandaloneNativeMenu */
#define NS_ISTANDALONENATIVEMENU_IID_STR "7f7201eb-510c-4cef-bdf0-04a15a7a4a8c"
#define NS_ISTANDALONENATIVEMENU_IID \
{0x7f7201eb, 0x510c, 0x4cef, \
{ 0xbd, 0xf0, 0x04, 0xa1, 0x5a, 0x7a, 0x4a, 0x8c }}
class NS_NO_VTABLE nsIStandaloneNativeMenu : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISTANDALONENATIVEMENU_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIStandaloneNativeMenu;
/* void init (in Element aElement); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Init(mozilla::dom::Element *aElement) = 0;
/* boolean menuWillOpen (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MenuWillOpen(bool *_retval) = 0;
/* void activateNativeMenuItemAt (in AString anIndexString); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ActivateNativeMenuItemAt(const nsAString& anIndexString) = 0;
/* void forceUpdateNativeMenuAt (in AString anIndexString); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ForceUpdateNativeMenuAt(const nsAString& anIndexString) = 0;
/* void dump (); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Dump(void) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIStandaloneNativeMenu, NS_ISTANDALONENATIVEMENU_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSISTANDALONENATIVEMENU \
NS_IMETHOD Init(mozilla::dom::Element *aElement) override; \
NS_IMETHOD MenuWillOpen(bool *_retval) override; \
NS_IMETHOD ActivateNativeMenuItemAt(const nsAString& anIndexString) override; \
NS_IMETHOD ForceUpdateNativeMenuAt(const nsAString& anIndexString) override; \
NS_IMETHOD Dump(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_NSISTANDALONENATIVEMENU \
nsresult Init(mozilla::dom::Element *aElement); \
nsresult MenuWillOpen(bool *_retval); \
nsresult ActivateNativeMenuItemAt(const nsAString& anIndexString); \
nsresult ForceUpdateNativeMenuAt(const nsAString& anIndexString); \
nsresult Dump(void);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSISTANDALONENATIVEMENU(_to) \
NS_IMETHOD Init(mozilla::dom::Element *aElement) override { return _to Init(aElement); } \
NS_IMETHOD MenuWillOpen(bool *_retval) override { return _to MenuWillOpen(_retval); } \
NS_IMETHOD ActivateNativeMenuItemAt(const nsAString& anIndexString) override { return _to ActivateNativeMenuItemAt(anIndexString); } \
NS_IMETHOD ForceUpdateNativeMenuAt(const nsAString& anIndexString) override { return _to ForceUpdateNativeMenuAt(anIndexString); } \
NS_IMETHOD Dump(void) override { return _to Dump(); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSISTANDALONENATIVEMENU(_to) \
NS_IMETHOD Init(mozilla::dom::Element *aElement) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aElement); } \
NS_IMETHOD MenuWillOpen(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MenuWillOpen(_retval); } \
NS_IMETHOD ActivateNativeMenuItemAt(const nsAString& anIndexString) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ActivateNativeMenuItemAt(anIndexString); } \
NS_IMETHOD ForceUpdateNativeMenuAt(const nsAString& anIndexString) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ForceUpdateNativeMenuAt(anIndexString); } \
NS_IMETHOD Dump(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Dump(); }
#endif /* __gen_nsIStandaloneNativeMenu_h__ */