macOS: Make QCocoaNSWindow header file slightly more readable
Change-Id: I09ac42af476feb1d561a77f68999a2754a2e252e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
4ac47689fa
commit
b619a9eada
@ -47,17 +47,23 @@
|
|||||||
#include <AppKit/AppKit.h>
|
#include <AppKit/AppKit.h>
|
||||||
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QCocoaWindow)
|
QT_FORWARD_DECLARE_CLASS(QCocoaWindow)
|
||||||
|
Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QNSWindowHelper));
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
@interface NSWindow (FullScreenProperty)
|
@interface NSWindow (FullScreenProperty)
|
||||||
@property(readonly) BOOL qt_fullScreen;
|
@property(readonly) BOOL qt_fullScreen;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@class QT_MANGLE_NAMESPACE(QNSWindowHelper);
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
@protocol QNSWindowProtocol
|
@protocol QNSWindowProtocol
|
||||||
|
|
||||||
@property (nonatomic, readonly) QT_MANGLE_NAMESPACE(QNSWindowHelper) *helper;
|
@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;
|
- (void)superSendEvent:(NSEvent *)theEvent;
|
||||||
- (void)closeAndRelease;
|
- (void)closeAndRelease;
|
||||||
|
|
||||||
@ -65,6 +71,8 @@ QT_FORWARD_DECLARE_CLASS(QCocoaWindow)
|
|||||||
|
|
||||||
typedef NSWindow<QNSWindowProtocol> QCocoaNSWindow;
|
typedef NSWindow<QNSWindowProtocol> QCocoaNSWindow;
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
@interface QT_MANGLE_NAMESPACE(QNSWindowHelper) : NSObject
|
@interface QT_MANGLE_NAMESPACE(QNSWindowHelper) : NSObject
|
||||||
{
|
{
|
||||||
QCocoaNSWindow *_window;
|
QCocoaNSWindow *_window;
|
||||||
@ -87,38 +95,26 @@ typedef NSWindow<QNSWindowProtocol> QCocoaNSWindow;
|
|||||||
|
|
||||||
QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSWindowHelper);
|
QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSWindowHelper);
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
@interface QT_MANGLE_NAMESPACE(QNSWindow) : NSWindow<QNSWindowProtocol>
|
@interface QT_MANGLE_NAMESPACE(QNSWindow) : NSWindow<QNSWindowProtocol>
|
||||||
{
|
{
|
||||||
QNSWindowHelper *_helper;
|
QNSWindowHelper *_helper;
|
||||||
}
|
}
|
||||||
|
|
||||||
@property (nonatomic, readonly) QNSWindowHelper *helper;
|
|
||||||
|
|
||||||
- (id)initWithContentRect:(NSRect)contentRect
|
|
||||||
screen:(NSScreen*)screen
|
|
||||||
styleMask:(NSUInteger)windowStyle
|
|
||||||
qPlatformWindow:(QCocoaWindow *)qpw;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSWindow);
|
QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSWindow);
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
@interface QT_MANGLE_NAMESPACE(QNSPanel) : NSPanel<QNSWindowProtocol>
|
@interface QT_MANGLE_NAMESPACE(QNSPanel) : NSPanel<QNSWindowProtocol>
|
||||||
{
|
{
|
||||||
QNSWindowHelper *_helper;
|
QNSWindowHelper *_helper;
|
||||||
}
|
}
|
||||||
|
|
||||||
@property (nonatomic, readonly) QNSWindowHelper *helper;
|
|
||||||
|
|
||||||
- (id)initWithContentRect:(NSRect)contentRect
|
|
||||||
screen:(NSScreen*)screen
|
|
||||||
styleMask:(NSUInteger)windowStyle
|
|
||||||
qPlatformWindow:(QCocoaWindow *)qpw;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSPanel);
|
QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSPanel);
|
||||||
|
|
||||||
@class QT_MANGLE_NAMESPACE(QNSWindowDelegate);
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
#endif // QNSWINDOW_H
|
#endif // QNSWINDOW_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user