diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-09-25 14:11:00 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-09-26 12:28:35 +0000 |
commit | 4b6c1448047362b8c38d265e6414f0e3e59b8d37 (patch) | |
tree | f52164a1f1d795fd43778409a39d0ab4b2962e5a /src/plugins/platforms/cocoa/qnswindow.h | |
parent | bec9afba6e9f977f923357a53c60f8d88e0e6cd6 (diff) |
Revert "Revert "macOS: Deduplicate QNSWindow/QNSPanel code""
This reverts commit 3ad8295451aa30a212eb6efe6330b5bfccd9f599.
The fix for the issue was landed in 5.10 as 1be1ed014b1deacb51fef4,
and will be merged into dev as a followup.
Change-Id: Id7773d1cc2caecbe358aadd9ade427a9c1eed9ef
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qnswindow.h')
-rw-r--r-- | src/plugins/platforms/cocoa/qnswindow.h | 50 |
1 files changed, 7 insertions, 43 deletions
diff --git a/src/plugins/platforms/cocoa/qnswindow.h b/src/plugins/platforms/cocoa/qnswindow.h index b13b6d42a9..ac9cbb978f 100644 --- a/src/plugins/platforms/cocoa/qnswindow.h +++ b/src/plugins/platforms/cocoa/qnswindow.h @@ -47,62 +47,26 @@ #include <AppKit/AppKit.h> QT_FORWARD_DECLARE_CLASS(QCocoaWindow) -Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QNSWindowHelper)); - -// ------------------------------------------------------------------------- @interface NSWindow (FullScreenProperty) @property(readonly) BOOL qt_fullScreen; @end -// ------------------------------------------------------------------------- - @protocol QNSWindowProtocol - -@property (nonatomic, readonly) QT_MANGLE_NAMESPACE(QNSWindowHelper) *helper; - -- (id)initWithContentRect:(NSRect)contentRect screen:(NSScreen*)screen - styleMask:(NSUInteger)windowStyle qPlatformWindow:(QCocoaWindow *)qpw; - -- (void)superSendEvent:(NSEvent *)theEvent; +@optional +- (BOOL)canBecomeKeyWindow; +- (void)sendEvent:(NSEvent*)theEvent; - (void)closeAndRelease; - -@end - -typedef NSWindow<QNSWindowProtocol> QCocoaNSWindow; - -// ------------------------------------------------------------------------- - -@interface QT_MANGLE_NAMESPACE(QNSWindowHelper) : NSObject -{ - QPointer<QCocoaWindow> _platformWindow; -} - -@property (nonatomic, readonly) QCocoaNSWindow *window; +- (void)dealloc; @property (nonatomic, readonly) QCocoaWindow *platformWindow; - -- (id)initWithNSWindow:(QCocoaNSWindow *)window platformWindow:(QCocoaWindow *)platformWindow; -- (void)handleWindowEvent:(NSEvent *)theEvent; -- (void)detachFromPlatformWindow; - @end -QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSWindowHelper); - -// ------------------------------------------------------------------------- - -@interface QT_MANGLE_NAMESPACE(QNSWindow) : NSWindow<QNSWindowProtocol> -@end +typedef NSWindow<QNSWindowProtocol> QCocoaNSWindow; +@interface QT_MANGLE_NAMESPACE(QNSWindow) : NSWindow<QNSWindowProtocol> @end QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSWindow); -// ------------------------------------------------------------------------- - -@interface QT_MANGLE_NAMESPACE(QNSPanel) : NSPanel<QNSWindowProtocol> -@end - +@interface QT_MANGLE_NAMESPACE(QNSPanel) : NSPanel<QNSWindowProtocol> @end QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSPanel); -// ------------------------------------------------------------------------- - #endif // QNSWINDOW_H |