#pragma once
#if USE(GLIB)
#include <wtf/Function.h>
#endif
#if PLATFORM(MAC)
OBJC_CLASS NSScreen;
OBJC_CLASS NSWindow;
#ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
typedef struct CGRect NSRect;
typedef struct CGPoint NSPoint;
#else
typedef struct _NSRect NSRect;
typedef struct _NSPoint NSPoint;
#endif
#endif
#if PLATFORM(IOS)
OBJC_CLASS UIScreen;
#endif
#if USE(CG)
typedef struct CGColorSpace *CGColorSpaceRef;
#endif
namespace WebCore {
class FloatRect;
class FloatSize;
class Widget;
using PlatformDisplayID = uint32_t;
int screenDepth(Widget*);
int screenDepthPerComponent(Widget*);
bool screenIsMonochrome(Widget*);
bool screenHasInvertedColors();
#if USE(GLIB)
double screenDPI();
void setScreenDPIObserverHandler(Function<void()>&&, void*);
#endif
FloatRect screenRect(Widget*);
FloatRect screenAvailableRect(Widget*);
WEBCORE_EXPORT bool screenSupportsExtendedColor(Widget* = nullptr);
#if USE(CG)
WEBCORE_EXPORT CGColorSpaceRef screenColorSpace(Widget* = nullptr);
#endif
#if PLATFORM(MAC)
NSScreen *screen(NSWindow *);
NSScreen *screen(PlatformDisplayID);
WEBCORE_EXPORT FloatRect toUserSpace(const NSRect&, NSWindow *destination);
WEBCORE_EXPORT NSRect toDeviceSpace(const FloatRect&, NSWindow *source);
NSPoint flipScreenPoint(const NSPoint&, NSScreen *);
#endif
#if PLATFORM(IOS)
float screenPPIFactor();
WEBCORE_EXPORT FloatSize screenSize();
WEBCORE_EXPORT FloatSize availableScreenSize();
WEBCORE_EXPORT float screenScaleFactor(UIScreen * = nullptr);
#endif
}