/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM $SRCDIR/widget/nsIBaseWindow.idl
 */

#ifndef __gen_nsIBaseWindow_h__
#define __gen_nsIBaseWindow_h__


#include "nsISupports.h"

#include "nsIPrincipal.h"

#include "nsrootidl.h"

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
// %{C++:12-15
#include "Units.h"
#include "mozilla/DimensionRequest.h"
#include "nsCOMPtr.h"
#include "nsIWidget.h"
// %}
typedef void *  nativeWindow;


/* starting interface:    nsIBaseWindow */
#define NS_IBASEWINDOW_IID_STR "ca635529-a977-4552-9b8a-66187e54d882"

#define NS_IBASEWINDOW_IID \
  {0xca635529, 0xa977, 0x4552, \
    { 0x9b, 0x8a, 0x66, 0x18, 0x7e, 0x54, 0xd8, 0x82 }}

class MOZ_BINDING(binding_to, idl, class, XPIDL_nsIBaseWindow) nsIBaseWindow : public nsISupports {
 public:

  NS_INLINE_DECL_STATIC_IID(NS_IBASEWINDOW_IID)

  /* Used by ToJSValue to check which scriptable interface is implemented. */
  using ScriptableInterfaceType = nsIBaseWindow;

  /* void destroy (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBaseWindow_destroy)
  NS_IMETHOD Destroy(void) = 0;

  /* void setPosition (in long x, in long y); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBaseWindow_setPosition)
  NS_IMETHOD SetPosition(int32_t x, int32_t y) = 0;

  /* void setPositionDesktopPix (in long x, in long y); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBaseWindow_setPositionDesktopPix)
  NS_IMETHOD SetPositionDesktopPix(int32_t x, int32_t y) = 0;

  /* void getPosition (out long x, out long y); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBaseWindow_getPosition)
  NS_IMETHOD GetPosition(int32_t *x, int32_t *y) = 0;

// %{C++:62-66
  mozilla::LayoutDeviceIntPoint GetPosition() {
    int32_t x = 0, y = 0;
    GetPosition(&x, &y);
    return mozilla::LayoutDeviceIntPoint(x, y);
  }
// %}
  /* void setSize (in long cx, in long cy, in boolean fRepaint); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBaseWindow_setSize)
  NS_IMETHOD SetSize(int32_t cx, int32_t cy, bool fRepaint) = 0;

  /* void getSize (out long cx, out long cy); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBaseWindow_getSize)
  NS_IMETHOD GetSize(int32_t *cx, int32_t *cy) = 0;

// %{C++:80-84
  mozilla::LayoutDeviceIntSize GetSize() {
    int32_t w = 0, h = 0;
    GetSize(&w, &h);
    return mozilla::LayoutDeviceIntSize(w, h);
  }
// %}
  enum {
    eRepaint MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBaseWindow_eRepaint) = 1U,
    eDelayResize MOZ_BINDING(binding_to, idl, const, XPIDL_nsIBaseWindow_eDelayResize) = 2U
  };

  /* void setPositionAndSize (in long x, in long y, in long cx, in long cy, in unsigned long flags); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBaseWindow_setPositionAndSize)
  NS_IMETHOD SetPositionAndSize(int32_t x, int32_t y, int32_t cx, int32_t cy, uint32_t flags) = 0;

  /* void getPositionAndSize (out long x, out long y, out long cx, out long cy); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBaseWindow_getPositionAndSize)
  NS_IMETHOD GetPositionAndSize(int32_t *x, int32_t *y, int32_t *cx, int32_t *cy) = 0;

// %{C++:107-111
  mozilla::LayoutDeviceIntRect GetPositionAndSize() {
    int32_t x = 0, y = 0, w = 0, h = 0;
    GetPositionAndSize(&x, &y, &w, &h);
    return mozilla::LayoutDeviceIntRect(x, y, w, h);
  }
// %}
  /* [noscript] void setDimensions (in DimensionRequest aRequest); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBaseWindow_setDimensions)
  NS_IMETHOD SetDimensions(mozilla::DimensionRequest&& aRequest) = 0;

  /* [noscript] void getDimensions (in DimensionKind aDimensionKind, out long aX, out long aY, out long aCX, out long aCY); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBaseWindow_getDimensions)
  NS_IMETHOD GetDimensions(mozilla::DimensionKind aDimensionKind, int32_t *aX, int32_t *aY, int32_t *aCX, int32_t *aCY) = 0;

// %{C++:146-150
  mozilla::LayoutDeviceIntRect GetDimensions(mozilla::DimensionKind aDimensionKind) {
    int32_t x = 0, y = 0, w = 0, h = 0;
    GetDimensions(aDimensionKind, &x, &y, &w, &h);
    return mozilla::LayoutDeviceIntRect(x, y, w, h);
  }
// %}
  /* [noscript] attribute nsIWidget parentWidget; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBaseWindow_parentWidget)
  NS_IMETHOD GetParentWidget(nsIWidget * * aParentWidget) = 0;
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIBaseWindow_parentWidget)
  NS_IMETHOD SetParentWidget(nsIWidget * aParentWidget) = 0;

  /* readonly attribute AString nativeHandle; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBaseWindow_nativeHandle)
  NS_IMETHOD GetNativeHandle(nsAString& aNativeHandle) = 0;

  /* attribute boolean visibility; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBaseWindow_visibility)
  NS_IMETHOD GetVisibility(bool *aVisibility) = 0;
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIBaseWindow_visibility)
  NS_IMETHOD SetVisibility(bool aVisibility) = 0;

  /* attribute boolean enabled; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBaseWindow_enabled)
  NS_IMETHOD GetEnabled(bool *aEnabled) = 0;
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIBaseWindow_enabled)
  NS_IMETHOD SetEnabled(bool aEnabled) = 0;

  /* [noscript] readonly attribute nsIWidget mainWidget; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBaseWindow_mainWidget)
  NS_IMETHOD GetMainWidget(nsIWidget * * aMainWidget) = 0;

// %{C++:195-199
  already_AddRefed<nsIWidget> GetMainWidget() {
    nsCOMPtr<nsIWidget> widget;
    GetMainWidget(getter_AddRefs(widget));
    return widget.forget();
  }
// %}
  /* [noscript,nostdcall,notxpcom] readonly attribute double widgetCSSToDeviceScale; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBaseWindow_widgetCSSToDeviceScale)
  virtual double GetWidgetCSSToDeviceScale() = 0;

// %{C++:214-219
  // The number of device pixels per CSS pixel used on this window's current
  // screen at the default full zoom level.
  //
  // This is the widget scale _plus_ the OS zoom scale if appropriate.
  // Implemented in AppWindow.cpp
  mozilla::CSSToLayoutDeviceScale UnscaledDevicePixelsPerCSSPixel();
// %}
  /* readonly attribute double devicePixelsPerDesktopPixel; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBaseWindow_devicePixelsPerDesktopPixel)
  NS_IMETHOD GetDevicePixelsPerDesktopPixel(double *aDevicePixelsPerDesktopPixel) = 0;

// %{C++:237-245
  mozilla::DesktopToLayoutDeviceScale DevicePixelsPerDesktopPixel() {
    double s = 1.0;
    GetDevicePixelsPerDesktopPixel(&s);
    return mozilla::DesktopToLayoutDeviceScale(s);
  }

  mozilla::CSSToDesktopScale GetUnscaledCSSToDesktopScale() {
    return UnscaledDevicePixelsPerCSSPixel() / DevicePixelsPerDesktopPixel();
  }
// %}
  /* attribute AString title; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBaseWindow_title)
  NS_IMETHOD GetTitle(nsAString& aTitle) = 0;
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIBaseWindow_title)
  NS_IMETHOD SetTitle(const nsAString& aTitle) = 0;

};


/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIBASEWINDOW \
  NS_IMETHOD Destroy(void) override; \
  NS_IMETHOD SetPosition(int32_t x, int32_t y) override; \
  NS_IMETHOD SetPositionDesktopPix(int32_t x, int32_t y) override; \
  NS_IMETHOD GetPosition(int32_t *x, int32_t *y) override; \
  NS_IMETHOD SetSize(int32_t cx, int32_t cy, bool fRepaint) override; \
  NS_IMETHOD GetSize(int32_t *cx, int32_t *cy) override; \
  NS_IMETHOD SetPositionAndSize(int32_t x, int32_t y, int32_t cx, int32_t cy, uint32_t flags) override; \
  NS_IMETHOD GetPositionAndSize(int32_t *x, int32_t *y, int32_t *cx, int32_t *cy) override; \
  NS_IMETHOD SetDimensions(mozilla::DimensionRequest&& aRequest) override; \
  NS_IMETHOD GetDimensions(mozilla::DimensionKind aDimensionKind, int32_t *aX, int32_t *aY, int32_t *aCX, int32_t *aCY) override; \
  NS_IMETHOD GetParentWidget(nsIWidget * * aParentWidget) override; \
  NS_IMETHOD SetParentWidget(nsIWidget * aParentWidget) override; \
  NS_IMETHOD GetNativeHandle(nsAString& aNativeHandle) override; \
  NS_IMETHOD GetVisibility(bool *aVisibility) override; \
  NS_IMETHOD SetVisibility(bool aVisibility) override; \
  NS_IMETHOD GetEnabled(bool *aEnabled) override; \
  NS_IMETHOD SetEnabled(bool aEnabled) override; \
  NS_IMETHOD GetMainWidget(nsIWidget * * aMainWidget) override; \
  virtual double GetWidgetCSSToDeviceScale() override; \
  NS_IMETHOD GetDevicePixelsPerDesktopPixel(double *aDevicePixelsPerDesktopPixel) override; \
  NS_IMETHOD GetTitle(nsAString& aTitle) override; \
  NS_IMETHOD SetTitle(const nsAString& aTitle) 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_NSIBASEWINDOW \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBaseWindow_destroy)\
  nsresult Destroy(void); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBaseWindow_setPosition)\
  nsresult SetPosition(int32_t x, int32_t y); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBaseWindow_setPositionDesktopPix)\
  nsresult SetPositionDesktopPix(int32_t x, int32_t y); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBaseWindow_getPosition)\
  nsresult GetPosition(int32_t *x, int32_t *y); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBaseWindow_setSize)\
  nsresult SetSize(int32_t cx, int32_t cy, bool fRepaint); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBaseWindow_getSize)\
  nsresult GetSize(int32_t *cx, int32_t *cy); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBaseWindow_setPositionAndSize)\
  nsresult SetPositionAndSize(int32_t x, int32_t y, int32_t cx, int32_t cy, uint32_t flags); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBaseWindow_getPositionAndSize)\
  nsresult GetPositionAndSize(int32_t *x, int32_t *y, int32_t *cx, int32_t *cy); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBaseWindow_setDimensions)\
  nsresult SetDimensions(mozilla::DimensionRequest&& aRequest); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIBaseWindow_getDimensions)\
  nsresult GetDimensions(mozilla::DimensionKind aDimensionKind, int32_t *aX, int32_t *aY, int32_t *aCX, int32_t *aCY); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBaseWindow_parentWidget)\
  nsresult GetParentWidget(nsIWidget * * aParentWidget); \
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIBaseWindow_parentWidget)\
  nsresult SetParentWidget(nsIWidget * aParentWidget); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBaseWindow_nativeHandle)\
  nsresult GetNativeHandle(nsAString& aNativeHandle); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBaseWindow_visibility)\
  nsresult GetVisibility(bool *aVisibility); \
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIBaseWindow_visibility)\
  nsresult SetVisibility(bool aVisibility); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBaseWindow_enabled)\
  nsresult GetEnabled(bool *aEnabled); \
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIBaseWindow_enabled)\
  nsresult SetEnabled(bool aEnabled); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBaseWindow_mainWidget)\
  nsresult GetMainWidget(nsIWidget * * aMainWidget); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBaseWindow_widgetCSSToDeviceScale)\
  double GetWidgetCSSToDeviceScale(); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBaseWindow_devicePixelsPerDesktopPixel)\
  nsresult GetDevicePixelsPerDesktopPixel(double *aDevicePixelsPerDesktopPixel); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIBaseWindow_title)\
  nsresult GetTitle(nsAString& aTitle); \
  MOZ_BINDING(binding_to, idl, setter, XPIDL_nsIBaseWindow_title)\
  nsresult SetTitle(const nsAString& aTitle); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIBASEWINDOW(_to) \
  NS_IMETHOD Destroy(void) override { return _to Destroy(); } \
  NS_IMETHOD SetPosition(int32_t x, int32_t y) override { return _to SetPosition(x, y); } \
  NS_IMETHOD SetPositionDesktopPix(int32_t x, int32_t y) override { return _to SetPositionDesktopPix(x, y); } \
  NS_IMETHOD GetPosition(int32_t *x, int32_t *y) override { return _to GetPosition(x, y); } \
  NS_IMETHOD SetSize(int32_t cx, int32_t cy, bool fRepaint) override { return _to SetSize(cx, cy, fRepaint); } \
  NS_IMETHOD GetSize(int32_t *cx, int32_t *cy) override { return _to GetSize(cx, cy); } \
  NS_IMETHOD SetPositionAndSize(int32_t x, int32_t y, int32_t cx, int32_t cy, uint32_t flags) override { return _to SetPositionAndSize(x, y, cx, cy, flags); } \
  NS_IMETHOD GetPositionAndSize(int32_t *x, int32_t *y, int32_t *cx, int32_t *cy) override { return _to GetPositionAndSize(x, y, cx, cy); } \
  NS_IMETHOD SetDimensions(mozilla::DimensionRequest&& aRequest) override { return _to SetDimensions(aRequest); } \
  NS_IMETHOD GetDimensions(mozilla::DimensionKind aDimensionKind, int32_t *aX, int32_t *aY, int32_t *aCX, int32_t *aCY) override { return _to GetDimensions(aDimensionKind, aX, aY, aCX, aCY); } \
  NS_IMETHOD GetParentWidget(nsIWidget * * aParentWidget) override { return _to GetParentWidget(aParentWidget); } \
  NS_IMETHOD SetParentWidget(nsIWidget * aParentWidget) override { return _to SetParentWidget(aParentWidget); } \
  NS_IMETHOD GetNativeHandle(nsAString& aNativeHandle) override { return _to GetNativeHandle(aNativeHandle); } \
  NS_IMETHOD GetVisibility(bool *aVisibility) override { return _to GetVisibility(aVisibility); } \
  NS_IMETHOD SetVisibility(bool aVisibility) override { return _to SetVisibility(aVisibility); } \
  NS_IMETHOD GetEnabled(bool *aEnabled) override { return _to GetEnabled(aEnabled); } \
  NS_IMETHOD SetEnabled(bool aEnabled) override { return _to SetEnabled(aEnabled); } \
  NS_IMETHOD GetMainWidget(nsIWidget * * aMainWidget) override { return _to GetMainWidget(aMainWidget); } \
  virtual double GetWidgetCSSToDeviceScale() override { return _to GetWidgetCSSToDeviceScale(); } \
  NS_IMETHOD GetDevicePixelsPerDesktopPixel(double *aDevicePixelsPerDesktopPixel) override { return _to GetDevicePixelsPerDesktopPixel(aDevicePixelsPerDesktopPixel); } \
  NS_IMETHOD GetTitle(nsAString& aTitle) override { return _to GetTitle(aTitle); } \
  NS_IMETHOD SetTitle(const nsAString& aTitle) override { return _to SetTitle(aTitle); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIBASEWINDOW(_to) \
  NS_IMETHOD Destroy(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Destroy(); } \
  NS_IMETHOD SetPosition(int32_t x, int32_t y) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPosition(x, y); } \
  NS_IMETHOD SetPositionDesktopPix(int32_t x, int32_t y) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPositionDesktopPix(x, y); } \
  NS_IMETHOD GetPosition(int32_t *x, int32_t *y) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPosition(x, y); } \
  NS_IMETHOD SetSize(int32_t cx, int32_t cy, bool fRepaint) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSize(cx, cy, fRepaint); } \
  NS_IMETHOD GetSize(int32_t *cx, int32_t *cy) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSize(cx, cy); } \
  NS_IMETHOD SetPositionAndSize(int32_t x, int32_t y, int32_t cx, int32_t cy, uint32_t flags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPositionAndSize(x, y, cx, cy, flags); } \
  NS_IMETHOD GetPositionAndSize(int32_t *x, int32_t *y, int32_t *cx, int32_t *cy) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPositionAndSize(x, y, cx, cy); } \
  NS_IMETHOD SetDimensions(mozilla::DimensionRequest&& aRequest) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDimensions(aRequest); } \
  NS_IMETHOD GetDimensions(mozilla::DimensionKind aDimensionKind, int32_t *aX, int32_t *aY, int32_t *aCX, int32_t *aCY) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDimensions(aDimensionKind, aX, aY, aCX, aCY); } \
  NS_IMETHOD GetParentWidget(nsIWidget * * aParentWidget) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParentWidget(aParentWidget); } \
  NS_IMETHOD SetParentWidget(nsIWidget * aParentWidget) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetParentWidget(aParentWidget); } \
  NS_IMETHOD GetNativeHandle(nsAString& aNativeHandle) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNativeHandle(aNativeHandle); } \
  NS_IMETHOD GetVisibility(bool *aVisibility) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVisibility(aVisibility); } \
  NS_IMETHOD SetVisibility(bool aVisibility) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetVisibility(aVisibility); } \
  NS_IMETHOD GetEnabled(bool *aEnabled) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEnabled(aEnabled); } \
  NS_IMETHOD SetEnabled(bool aEnabled) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetEnabled(aEnabled); } \
  NS_IMETHOD GetMainWidget(nsIWidget * * aMainWidget) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMainWidget(aMainWidget); } \
  virtual double GetWidgetCSSToDeviceScale() override; \
  NS_IMETHOD GetDevicePixelsPerDesktopPixel(double *aDevicePixelsPerDesktopPixel) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDevicePixelsPerDesktopPixel(aDevicePixelsPerDesktopPixel); } \
  NS_IMETHOD GetTitle(nsAString& aTitle) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTitle(aTitle); } \
  NS_IMETHOD SetTitle(const nsAString& aTitle) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTitle(aTitle); } 


#endif /* __gen_nsIBaseWindow_h__ */
