|
|
|
@ -68,7 +68,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
- (void)performClose:(id)sender |
|
|
|
- (void)performClose:(id _Nullable )sender |
|
|
|
{ |
|
|
|
if([[self delegate] respondsToSelector:@selector(windowShouldClose:)]) |
|
|
|
{ |
|
|
|
@ -147,7 +147,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
-(void) applyMenu:(AvnMenu *)menu |
|
|
|
-(void) applyMenu:(AvnMenu *_Nullable)menu |
|
|
|
{ |
|
|
|
if(menu == nullptr) |
|
|
|
{ |
|
|
|
@ -157,7 +157,7 @@ |
|
|
|
_menu = menu; |
|
|
|
} |
|
|
|
|
|
|
|
-(CLASS_NAME*) initWithParent: (WindowBaseImpl*) parent contentRect: (NSRect)contentRect styleMask: (NSWindowStyleMask)styleMask; |
|
|
|
-(CLASS_NAME*_Nonnull) initWithParent: (WindowBaseImpl*_Nonnull) parent contentRect: (NSRect)contentRect styleMask: (NSWindowStyleMask)styleMask; |
|
|
|
{ |
|
|
|
// https://jameshfisher.com/2020/07/10/why-is-the-contentrect-of-my-nswindow-ignored/ |
|
|
|
// create nswindow with specific contentRect, otherwise we wont be able to resize the window |
|
|
|
@ -183,7 +183,7 @@ |
|
|
|
return self; |
|
|
|
} |
|
|
|
|
|
|
|
- (BOOL)windowShouldClose:(NSWindow *)sender |
|
|
|
- (BOOL)windowShouldClose:(NSWindow *_Nonnull)sender |
|
|
|
{ |
|
|
|
auto window = dynamic_cast<WindowImpl*>(_parent.getRaw()); |
|
|
|
|
|
|
|
@ -195,14 +195,14 @@ |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
- (void)windowDidChangeBackingProperties:(NSNotification *)notification |
|
|
|
- (void)windowDidChangeBackingProperties:(NSNotification *_Nonnull)notification |
|
|
|
{ |
|
|
|
[self backingScaleFactor]; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- (void)windowWillClose:(NSNotification *)notification |
|
|
|
- (void)windowWillClose:(NSNotification *_Nonnull)notification |
|
|
|
{ |
|
|
|
_closed = true; |
|
|
|
if(_parent) |
|
|
|
@ -274,12 +274,12 @@ |
|
|
|
[super becomeKeyWindow]; |
|
|
|
} |
|
|
|
|
|
|
|
- (void)windowDidBecomeKey:(NSNotification *)notification |
|
|
|
- (void)windowDidBecomeKey:(NSNotification *_Nonnull)notification |
|
|
|
{ |
|
|
|
_parent->BringToFront(); |
|
|
|
} |
|
|
|
|
|
|
|
- (void)windowDidMiniaturize:(NSNotification *)notification |
|
|
|
- (void)windowDidMiniaturize:(NSNotification *_Nonnull)notification |
|
|
|
{ |
|
|
|
auto parent = dynamic_cast<IWindowStateChanged*>(_parent.operator->()); |
|
|
|
|
|
|
|
@ -289,7 +289,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
- (void)windowDidDeminiaturize:(NSNotification *)notification |
|
|
|
- (void)windowDidDeminiaturize:(NSNotification *_Nonnull)notification |
|
|
|
{ |
|
|
|
auto parent = dynamic_cast<IWindowStateChanged*>(_parent.operator->()); |
|
|
|
|
|
|
|
@ -299,7 +299,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
- (void)windowDidResize:(NSNotification *)notification |
|
|
|
- (void)windowDidResize:(NSNotification *_Nonnull)notification |
|
|
|
{ |
|
|
|
auto parent = dynamic_cast<IWindowStateChanged*>(_parent.operator->()); |
|
|
|
|
|
|
|
@ -309,7 +309,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
- (void)windowWillExitFullScreen:(NSNotification *)notification |
|
|
|
- (void)windowWillExitFullScreen:(NSNotification *_Nonnull)notification |
|
|
|
{ |
|
|
|
auto parent = dynamic_cast<IWindowStateChanged*>(_parent.operator->()); |
|
|
|
|
|
|
|
@ -319,7 +319,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
- (void)windowDidExitFullScreen:(NSNotification *)notification |
|
|
|
- (void)windowDidExitFullScreen:(NSNotification *_Nonnull)notification |
|
|
|
{ |
|
|
|
auto parent = dynamic_cast<IWindowStateChanged*>(_parent.operator->()); |
|
|
|
|
|
|
|
@ -342,7 +342,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
- (void)windowWillEnterFullScreen:(NSNotification *)notification |
|
|
|
- (void)windowWillEnterFullScreen:(NSNotification *_Nonnull)notification |
|
|
|
{ |
|
|
|
auto parent = dynamic_cast<IWindowStateChanged*>(_parent.operator->()); |
|
|
|
|
|
|
|
@ -352,7 +352,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
- (void)windowDidEnterFullScreen:(NSNotification *)notification |
|
|
|
- (void)windowDidEnterFullScreen:(NSNotification *_Nonnull)notification |
|
|
|
{ |
|
|
|
auto parent = dynamic_cast<IWindowStateChanged*>(_parent.operator->()); |
|
|
|
|
|
|
|
@ -363,7 +363,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
- (BOOL)windowShouldZoom:(NSWindow *)window toFrame:(NSRect)newFrame |
|
|
|
- (BOOL)windowShouldZoom:(NSWindow *_Nonnull)window toFrame:(NSRect)newFrame |
|
|
|
{ |
|
|
|
return true; |
|
|
|
} |
|
|
|
@ -380,7 +380,7 @@ |
|
|
|
[super resignKeyWindow]; |
|
|
|
} |
|
|
|
|
|
|
|
- (void)windowDidMove:(NSNotification *)notification |
|
|
|
- (void)windowDidMove:(NSNotification *_Nonnull)notification |
|
|
|
{ |
|
|
|
AvnPoint position; |
|
|
|
|
|
|
|
@ -412,7 +412,7 @@ |
|
|
|
return pt; |
|
|
|
} |
|
|
|
|
|
|
|
- (void)sendEvent:(NSEvent *)event |
|
|
|
- (void)sendEvent:(NSEvent *_Nonnull)event |
|
|
|
{ |
|
|
|
[super sendEvent:event]; |
|
|
|
|
|
|
|
|