Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/widget/nsIWindowsUIUtils.idl
*/
#ifndef __gen_nsIWindowsUIUtils_h__
#define __gen_nsIWindowsUIUtils_h__
#include "nsISupports.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 */
class imgIContainer; /* forward declaration */
/* starting interface: nsIWindowsUIUtils */
#define NS_IWINDOWSUIUTILS_IID_STR "aa8a0ecf-96a1-418c-b80e-f24ae18bbedc"
#define NS_IWINDOWSUIUTILS_IID \
{0xaa8a0ecf, 0x96a1, 0x418c, \
{ 0xb8, 0x0e, 0xf2, 0x4a, 0xe1, 0x8b, 0xbe, 0xdc }}
class NS_NO_VTABLE nsIWindowsUIUtils : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWINDOWSUIUTILS_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIWindowsUIUtils;
/* readonly attribute long systemSmallIconSize; */
NS_IMETHOD GetSystemSmallIconSize(int32_t *aSystemSmallIconSize) = 0;
/* readonly attribute long systemLargeIconSize; */
NS_IMETHOD GetSystemLargeIconSize(int32_t *aSystemLargeIconSize) = 0;
/* void setWindowIcon (in mozIDOMWindowProxy aWindow, in imgIContainer aSmallIcon, in imgIContainer aLargeIcon); */
NS_IMETHOD SetWindowIcon(mozIDOMWindowProxy *aWindow, imgIContainer *aSmallIcon, imgIContainer *aLargeIcon) = 0;
/* void setWindowIconFromExe (in mozIDOMWindowProxy aWindow, in AString aExe, in unsigned short aIndex); */
NS_IMETHOD SetWindowIconFromExe(mozIDOMWindowProxy *aWindow, const nsAString& aExe, uint16_t aIndex) = 0;
/* void setWindowIconNoData (in mozIDOMWindowProxy aWindow); */
NS_IMETHOD SetWindowIconNoData(mozIDOMWindowProxy *aWindow) = 0;
/* readonly attribute boolean inWin10TabletMode; */
NS_IMETHOD GetInWin10TabletMode(bool *aInWin10TabletMode) = 0;
/* readonly attribute boolean inWin11TabletMode; */
NS_IMETHOD GetInWin11TabletMode(bool *aInWin11TabletMode) = 0;
/* void shareUrl (in AString shareTitle, in AString urlToShare); */
NS_IMETHOD ShareUrl(const nsAString& shareTitle, const nsAString& urlToShare) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIWindowsUIUtils, NS_IWINDOWSUIUTILS_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIWINDOWSUIUTILS \
NS_IMETHOD GetSystemSmallIconSize(int32_t *aSystemSmallIconSize) override; \
NS_IMETHOD GetSystemLargeIconSize(int32_t *aSystemLargeIconSize) override; \
NS_IMETHOD SetWindowIcon(mozIDOMWindowProxy *aWindow, imgIContainer *aSmallIcon, imgIContainer *aLargeIcon) override; \
NS_IMETHOD SetWindowIconFromExe(mozIDOMWindowProxy *aWindow, const nsAString& aExe, uint16_t aIndex) override; \
NS_IMETHOD SetWindowIconNoData(mozIDOMWindowProxy *aWindow) override; \
NS_IMETHOD GetInWin10TabletMode(bool *aInWin10TabletMode) override; \
NS_IMETHOD GetInWin11TabletMode(bool *aInWin11TabletMode) override; \
NS_IMETHOD ShareUrl(const nsAString& shareTitle, const nsAString& urlToShare) 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_NSIWINDOWSUIUTILS \
nsresult GetSystemSmallIconSize(int32_t *aSystemSmallIconSize); \
nsresult GetSystemLargeIconSize(int32_t *aSystemLargeIconSize); \
nsresult SetWindowIcon(mozIDOMWindowProxy *aWindow, imgIContainer *aSmallIcon, imgIContainer *aLargeIcon); \
nsresult SetWindowIconFromExe(mozIDOMWindowProxy *aWindow, const nsAString& aExe, uint16_t aIndex); \
nsresult SetWindowIconNoData(mozIDOMWindowProxy *aWindow); \
nsresult GetInWin10TabletMode(bool *aInWin10TabletMode); \
nsresult GetInWin11TabletMode(bool *aInWin11TabletMode); \
nsresult ShareUrl(const nsAString& shareTitle, const nsAString& urlToShare);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIWINDOWSUIUTILS(_to) \
NS_IMETHOD GetSystemSmallIconSize(int32_t *aSystemSmallIconSize) override { return _to GetSystemSmallIconSize(aSystemSmallIconSize); } \
NS_IMETHOD GetSystemLargeIconSize(int32_t *aSystemLargeIconSize) override { return _to GetSystemLargeIconSize(aSystemLargeIconSize); } \
NS_IMETHOD SetWindowIcon(mozIDOMWindowProxy *aWindow, imgIContainer *aSmallIcon, imgIContainer *aLargeIcon) override { return _to SetWindowIcon(aWindow, aSmallIcon, aLargeIcon); } \
NS_IMETHOD SetWindowIconFromExe(mozIDOMWindowProxy *aWindow, const nsAString& aExe, uint16_t aIndex) override { return _to SetWindowIconFromExe(aWindow, aExe, aIndex); } \
NS_IMETHOD SetWindowIconNoData(mozIDOMWindowProxy *aWindow) override { return _to SetWindowIconNoData(aWindow); } \
NS_IMETHOD GetInWin10TabletMode(bool *aInWin10TabletMode) override { return _to GetInWin10TabletMode(aInWin10TabletMode); } \
NS_IMETHOD GetInWin11TabletMode(bool *aInWin11TabletMode) override { return _to GetInWin11TabletMode(aInWin11TabletMode); } \
NS_IMETHOD ShareUrl(const nsAString& shareTitle, const nsAString& urlToShare) override { return _to ShareUrl(shareTitle, urlToShare); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIWINDOWSUIUTILS(_to) \
NS_IMETHOD GetSystemSmallIconSize(int32_t *aSystemSmallIconSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSystemSmallIconSize(aSystemSmallIconSize); } \
NS_IMETHOD GetSystemLargeIconSize(int32_t *aSystemLargeIconSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSystemLargeIconSize(aSystemLargeIconSize); } \
NS_IMETHOD SetWindowIcon(mozIDOMWindowProxy *aWindow, imgIContainer *aSmallIcon, imgIContainer *aLargeIcon) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWindowIcon(aWindow, aSmallIcon, aLargeIcon); } \
NS_IMETHOD SetWindowIconFromExe(mozIDOMWindowProxy *aWindow, const nsAString& aExe, uint16_t aIndex) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWindowIconFromExe(aWindow, aExe, aIndex); } \
NS_IMETHOD SetWindowIconNoData(mozIDOMWindowProxy *aWindow) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWindowIconNoData(aWindow); } \
NS_IMETHOD GetInWin10TabletMode(bool *aInWin10TabletMode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInWin10TabletMode(aInWin10TabletMode); } \
NS_IMETHOD GetInWin11TabletMode(bool *aInWin11TabletMode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInWin11TabletMode(aInWin11TabletMode); } \
NS_IMETHOD ShareUrl(const nsAString& shareTitle, const nsAString& urlToShare) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ShareUrl(shareTitle, urlToShare); }
#endif /* __gen_nsIWindowsUIUtils_h__ */