summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoawindow.h
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-05-13 16:40:19 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-06-05 00:03:51 +0200
commitdf2e029a06f065c82dacc28ec885b4307260b6fb (patch)
tree7c1c8f334c9036c0b5438c944fce1b205b962293 /src/plugins/platforms/cocoa/qcocoawindow.h
parentc7d80486dee44c096ba993cbda8f69612441a264 (diff)
macOS: Clean up headers
The headers are now C++ clean and can be used outside of Objective-C code. All includes of Objective-C frameworks have been moved to the implementation files. Header guards have been added in the few places they were missing. All includes are now done via #include, instead of sometimes using the #import variant. Change-Id: Ibb0a9c0bcfefbda4347737212e40e300a3184982 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoawindow.h')
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.h b/src/plugins/platforms/cocoa/qcocoawindow.h
index 4688598da7..e4debd669d 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.h
+++ b/src/plugins/platforms/cocoa/qcocoawindow.h
@@ -40,8 +40,6 @@
#ifndef QCOCOAWINDOW_H
#define QCOCOAWINDOW_H
-#include <AppKit/AppKit.h>
-
#include <qpa/qplatformwindow.h>
#include <QRect>
#include <QPointer>
@@ -56,6 +54,15 @@
#include <MoltenVK/mvk_vulkan.h>
#endif
+Q_FORWARD_DECLARE_OBJC_CLASS(NSWindow);
+Q_FORWARD_DECLARE_OBJC_CLASS(NSView);
+Q_FORWARD_DECLARE_OBJC_CLASS(NSCursor);
+
+#if !defined(__OBJC__)
+using NSInteger = long;
+using NSUInteger = unsigned long;
+#endif
+
QT_BEGIN_NAMESPACE
#ifndef QT_NO_DEBUG_STREAM
@@ -262,7 +269,7 @@ public: // for QNSView
static const int NoAlertRequest;
NSInteger m_alertRequest;
- id monitor;
+ NSObject *m_monitor;
bool m_drawContentBorderGradient;
int m_topContentBorderThickness;