9#include <qpa/qplatformintegration.h>
10#include <QtCore/private/qcore_mac_p.h>
12#include <CoreGraphics/CoreGraphics.h>
13#include <CoreVideo/CoreVideo.h>
32 int depth()
const override {
return m_depth; }
65 static void initializeScreens();
66 static void updateScreens();
67 static void cleanupScreens();
70 static CGDisplayReconfigurationCallBack s_displayReconfigurationCallBack;
72 static void add(CGDirectDisplayID displayId);
74 void update(CGDirectDisplayID displayId);
77 bool isOnline()
const;
78 bool isMirroring()
const;
80 CGDirectDisplayID m_displayId = kCGNullDirectDisplay;
81 CGDirectDisplayID displayId()
const {
return m_displayId; }
84 QRect m_availableGeometry;
85 qreal m_refreshRate = 0;
92 qreal m_devicePixelRatio = 0;
94 CVDisplayLinkRef m_displayLink =
nullptr;
95 dispatch_source_t m_displayLinkSource =
nullptr;
103#ifndef QT_NO_DEBUG_STREAM
112#define qt_displayId QT_MANGLE_NAMESPACE(qt_displayId)
114@interface NSScreen (QtExtras)
115@property(readonly) CGDirectDisplayID qt_displayId;
qreal refreshRate() const override
Reimplement this function in subclass to return the vertical refresh rate of the screen,...
QRect availableGeometry() const override
Reimplement in subclass to return the pixel geometry of the available space This normally is the desk...
QColorSpace colorSpace() const override
static CGPoint mapToNative(const QPointF &pos, QCocoaScreen *screen=QCocoaScreen::primaryScreen())
friend QDebug operator<<(QDebug debug, const QCocoaScreen *screen)
static NSScreen * nativeScreenForDisplayId(CGDirectDisplayID displayId)
QSizeF physicalSize() const override
Reimplement this function in subclass to return the physical size of the screen, in millimeters.
QImage::Format format() const override
Reimplement in subclass to return the image format which corresponds to the screen format.
QPixmap grabWindow(WId window, int x, int y, int width, int height) const override
static QCocoaScreen * get(NSScreen *nsScreen)
QDpi logicalBaseDpi() const override
Reimplement to return the base logical DPI for the platform.
void deliverUpdateRequests()
bool isRunningDisplayLink() const
int depth() const override
Reimplement in subclass to return current depth of the screen.
qreal devicePixelRatio() const override
Reimplement this function in subclass to return the device pixel ratio for the screen.
QPlatformScreen::SubpixelAntialiasingType subpixelAntialiasingTypeHint() const override
Returns a hint about this screen's subpixel layout structure.
static QCocoaScreen * primaryScreen()
The screen used as a reference for global window geometry.
static QPointF mapFromNative(CGPoint pos, QCocoaScreen *screen=QCocoaScreen::primaryScreen())
QPlatformCursor * cursor() const override
Reimplement this function in subclass to return the cursor of the screen.
QRect geometry() const override
Reimplement in subclass to return the pixel geometry of the screen.
QString name() const override
QList< QPlatformScreen * > virtualSiblings() const override
Returns a list of all the platform screens that are part of the same virtual desktop.
QWindow * topLevelAt(const QPoint &point) const override
Return the given top level window for a given position.
NSScreen * nativeScreen() const
The QColorSpace class provides a color space abstraction.
Format
The following image formats are available in Qt.
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
QDebug operator<<(QDebug debug, const QCocoaScreen *screen)
#define Q_FORWARD_DECLARE_OBJC_CLASS(classname)
QPair< qreal, qreal > QDpi
GLint GLint GLint GLint GLint x
[0]
GLint GLsizei GLsizei height