/* * DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/widget/nsIScreenManager.idl */ #ifndef __gen_nsIScreenManager_h__ #define __gen_nsIScreenManager_h__ #include "nsISupports.h" #include "nsIScreen.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 // %{C++:10-10 #include "nsCOMPtr.h" // %} /* starting interface: nsIScreenManager */ #define NS_ISCREENMANAGER_IID_STR "e8a96e60-6b61-4a14-bacc-53891604b502" #define NS_ISCREENMANAGER_IID \ {0xe8a96e60, 0x6b61, 0x4a14, \ { 0xba, 0xcc, 0x53, 0x89, 0x16, 0x04, 0xb5, 0x02 }} class MOZ_BINDING(binding_to, idl, class, XPIDL_nsIScreenManager) nsIScreenManager : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_ISCREENMANAGER_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIScreenManager; /* nsIScreen screenForRect (in long left, in long top, in long width, in long height); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIScreenManager_screenForRect) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ScreenForRect(int32_t left, int32_t top, int32_t width, int32_t height, nsIScreen **_retval) = 0; // %{C++:23-27 already_AddRefed ScreenForRect(const mozilla::DesktopIntRect& aRect) { nsCOMPtr screen; ScreenForRect(aRect.x, aRect.y, aRect.width, aRect.height, getter_AddRefs(screen)); return screen.forget(); } // %} /* readonly attribute nsIScreen primaryScreen; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIScreenManager_primaryScreen) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetPrimaryScreen(nsIScreen **aPrimaryScreen) = 0; /* readonly attribute int64_t totalScreenPixels; */ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIScreenManager_totalScreenPixels) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetTotalScreenPixels(int64_t *aTotalScreenPixels) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSISCREENMANAGER \ NS_IMETHOD ScreenForRect(int32_t left, int32_t top, int32_t width, int32_t height, nsIScreen **_retval) override; \ NS_IMETHOD GetPrimaryScreen(nsIScreen **aPrimaryScreen) override; \ NS_IMETHOD GetTotalScreenPixels(int64_t *aTotalScreenPixels) 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_NSISCREENMANAGER \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIScreenManager_screenForRect)\ nsresult ScreenForRect(int32_t left, int32_t top, int32_t width, int32_t height, nsIScreen **_retval); \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIScreenManager_primaryScreen)\ nsresult GetPrimaryScreen(nsIScreen **aPrimaryScreen); \ MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIScreenManager_totalScreenPixels)\ nsresult GetTotalScreenPixels(int64_t *aTotalScreenPixels); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSISCREENMANAGER(_to) \ NS_IMETHOD ScreenForRect(int32_t left, int32_t top, int32_t width, int32_t height, nsIScreen **_retval) override { return _to ScreenForRect(left, top, width, height, _retval); } \ NS_IMETHOD GetPrimaryScreen(nsIScreen **aPrimaryScreen) override { return _to GetPrimaryScreen(aPrimaryScreen); } \ NS_IMETHOD GetTotalScreenPixels(int64_t *aTotalScreenPixels) override { return _to GetTotalScreenPixels(aTotalScreenPixels); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSISCREENMANAGER(_to) \ NS_IMETHOD ScreenForRect(int32_t left, int32_t top, int32_t width, int32_t height, nsIScreen **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ScreenForRect(left, top, width, height, _retval); } \ NS_IMETHOD GetPrimaryScreen(nsIScreen **aPrimaryScreen) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrimaryScreen(aPrimaryScreen); } \ NS_IMETHOD GetTotalScreenPixels(int64_t *aTotalScreenPixels) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTotalScreenPixels(aTotalScreenPixels); } #endif /* __gen_nsIScreenManager_h__ */