implement static method
NSWindowDelegate
implement({
- bool windowShouldClose_()?,
- ObjCObjectBase? windowWillReturnFieldEditor_toObject_(
- NSWindow,
- ObjCObjectBase?
- NSSize windowWillResize_toSize_()?,
- NSRect windowWillUseStandardFrame_defaultFrame_()?,
- bool windowShouldZoom_toFrame_()?,
- NSUndoManager? windowWillReturnUndoManager_()?,
- NSRect window_willPositionSheet_usingRect_()?,
- bool window_shouldPopUpDocumentPathMenu_()?,
- bool window_shouldDragDocumentWithEvent_from_withPasteboard_()?,
- NSSize window_willUseFullScreenContentSize_()?,
- NSApplicationPresentationOptions window_willUseFullScreenPresentationOptions_()?,
- NSArray? customWindowsToEnterFullScreenForWindow_()?,
- void window_startCustomAnimationToEnterFullScreenWithDuration_()?,
- void windowDidFailToEnterFullScreen_()?,
- NSArray? customWindowsToExitFullScreenForWindow_()?,
- void window_startCustomAnimationToExitFullScreenWithDuration_()?,
- NSArray? customWindowsToEnterFullScreenForWindow_onScreen_()?,
- void window_startCustomAnimationToEnterFullScreenOnScreen_withDuration_()?,
- void windowDidFailToExitFullScreen_()?,
- NSSize window_willResizeForVersionBrowserWithMaxPreferredSize_maxAllowedSize_()?,
- void window_willEncodeRestorableState_(
- NSWindow,
- NSCoder
- void window_didDecodeRestorableState_(
- NSWindow,
- NSCoder
- NSArray? previewRepresentableActivityItemsForWindow_()?,
- NSWindow? windowForSharingRequestFromWindow_()?,
- void windowDidResize_(
- NSNotification
- void windowDidExpose_(
- NSNotification
- void windowWillMove_(
- NSNotification
- void windowDidMove_(
- NSNotification
- void windowDidBecomeKey_(
- NSNotification
- void windowDidResignKey_(
- NSNotification
- void windowDidBecomeMain_(
- NSNotification
- void windowDidResignMain_(
- NSNotification
- void windowWillClose_(
- NSNotification
- void windowWillMiniaturize_(
- NSNotification
- void windowDidMiniaturize_(
- NSNotification
- void windowDidDeminiaturize_(
- NSNotification
- void windowDidUpdate_(
- NSNotification
- void windowDidChangeScreen_(
- NSNotification
- void windowDidChangeScreenProfile_(
- NSNotification
- void windowDidChangeBackingProperties_(
- NSNotification
- void windowWillBeginSheet_(
- NSNotification
- void windowDidEndSheet_(
- NSNotification
- void windowWillStartLiveResize_(
- NSNotification
- void windowDidEndLiveResize_(
- NSNotification
- void windowWillEnterFullScreen_(
- NSNotification
- void windowDidEnterFullScreen_(
- NSNotification
- void windowWillExitFullScreen_(
- NSNotification
- void windowDidExitFullScreen_(
- NSNotification
- void windowWillEnterVersionBrowser_(
- NSNotification
- void windowDidEnterVersionBrowser_(
- NSNotification
- void windowWillExitVersionBrowser_(
- NSNotification
- void windowDidExitVersionBrowser_(
- NSNotification
- void windowDidChangeOcclusionState_(
- NSNotification
- bool $keepIsolateAlive = true,
Builds an object that implements the NSWindowDelegate protocol. To implement
multiple protocols, use addToBuilder or objc.ObjCProtocolBuilder directly.
If $keepIsolateAlive is true, this protocol will keep this isolate
alive until it is garbage collected by both Dart and ObjC.
Implementation
static NSWindowDelegate implement({
bool Function(NSWindow)? windowShouldClose_,
objc.ObjCObjectBase? Function(NSWindow, objc.ObjCObjectBase?)?
windowWillReturnFieldEditor_toObject_,
NSSize Function(NSWindow, NSSize)? windowWillResize_toSize_,
NSRect Function(NSWindow, NSRect)? windowWillUseStandardFrame_defaultFrame_,
bool Function(NSWindow, NSRect)? windowShouldZoom_toFrame_,
NSUndoManager? Function(NSWindow)? windowWillReturnUndoManager_,
NSRect Function(NSWindow, NSWindow, NSRect)?
window_willPositionSheet_usingRect_,
bool Function(NSWindow, NSMenu)? window_shouldPopUpDocumentPathMenu_,
bool Function(NSWindow, NSEvent, NSPoint, NSPasteboard)?
window_shouldDragDocumentWithEvent_from_withPasteboard_,
NSSize Function(NSWindow, NSSize)? window_willUseFullScreenContentSize_,
NSApplicationPresentationOptions Function(
NSWindow,
NSApplicationPresentationOptions,
)?
window_willUseFullScreenPresentationOptions_,
objc.NSArray? Function(NSWindow)? customWindowsToEnterFullScreenForWindow_,
void Function(NSWindow, DartNSTimeInterval)?
window_startCustomAnimationToEnterFullScreenWithDuration_,
void Function(NSWindow)? windowDidFailToEnterFullScreen_,
objc.NSArray? Function(NSWindow)? customWindowsToExitFullScreenForWindow_,
void Function(NSWindow, DartNSTimeInterval)?
window_startCustomAnimationToExitFullScreenWithDuration_,
objc.NSArray? Function(NSWindow, NSScreen)?
customWindowsToEnterFullScreenForWindow_onScreen_,
void Function(NSWindow, NSScreen, DartNSTimeInterval)?
window_startCustomAnimationToEnterFullScreenOnScreen_withDuration_,
void Function(NSWindow)? windowDidFailToExitFullScreen_,
NSSize Function(NSWindow, NSSize, NSSize)?
window_willResizeForVersionBrowserWithMaxPreferredSize_maxAllowedSize_,
void Function(NSWindow, objc.NSCoder)? window_willEncodeRestorableState_,
void Function(NSWindow, objc.NSCoder)? window_didDecodeRestorableState_,
objc.NSArray? Function(NSWindow)?
previewRepresentableActivityItemsForWindow_,
NSWindow? Function(NSWindow)? windowForSharingRequestFromWindow_,
void Function(objc.NSNotification)? windowDidResize_,
void Function(objc.NSNotification)? windowDidExpose_,
void Function(objc.NSNotification)? windowWillMove_,
void Function(objc.NSNotification)? windowDidMove_,
void Function(objc.NSNotification)? windowDidBecomeKey_,
void Function(objc.NSNotification)? windowDidResignKey_,
void Function(objc.NSNotification)? windowDidBecomeMain_,
void Function(objc.NSNotification)? windowDidResignMain_,
void Function(objc.NSNotification)? windowWillClose_,
void Function(objc.NSNotification)? windowWillMiniaturize_,
void Function(objc.NSNotification)? windowDidMiniaturize_,
void Function(objc.NSNotification)? windowDidDeminiaturize_,
void Function(objc.NSNotification)? windowDidUpdate_,
void Function(objc.NSNotification)? windowDidChangeScreen_,
void Function(objc.NSNotification)? windowDidChangeScreenProfile_,
void Function(objc.NSNotification)? windowDidChangeBackingProperties_,
void Function(objc.NSNotification)? windowWillBeginSheet_,
void Function(objc.NSNotification)? windowDidEndSheet_,
void Function(objc.NSNotification)? windowWillStartLiveResize_,
void Function(objc.NSNotification)? windowDidEndLiveResize_,
void Function(objc.NSNotification)? windowWillEnterFullScreen_,
void Function(objc.NSNotification)? windowDidEnterFullScreen_,
void Function(objc.NSNotification)? windowWillExitFullScreen_,
void Function(objc.NSNotification)? windowDidExitFullScreen_,
void Function(objc.NSNotification)? windowWillEnterVersionBrowser_,
void Function(objc.NSNotification)? windowDidEnterVersionBrowser_,
void Function(objc.NSNotification)? windowWillExitVersionBrowser_,
void Function(objc.NSNotification)? windowDidExitVersionBrowser_,
void Function(objc.NSNotification)? windowDidChangeOcclusionState_,
bool $keepIsolateAlive = true,
}) {
final builder = objc.ObjCProtocolBuilder(debugName: 'NSWindowDelegate');
NSWindowDelegate.windowShouldClose_.implement(builder, windowShouldClose_);
NSWindowDelegate.windowWillReturnFieldEditor_toObject_.implement(
builder,
windowWillReturnFieldEditor_toObject_,
);
NSWindowDelegate.windowWillResize_toSize_.implement(
builder,
windowWillResize_toSize_,
);
NSWindowDelegate.windowWillUseStandardFrame_defaultFrame_.implement(
builder,
windowWillUseStandardFrame_defaultFrame_,
);
NSWindowDelegate.windowShouldZoom_toFrame_.implement(
builder,
windowShouldZoom_toFrame_,
);
NSWindowDelegate.windowWillReturnUndoManager_.implement(
builder,
windowWillReturnUndoManager_,
);
NSWindowDelegate.window_willPositionSheet_usingRect_.implement(
builder,
window_willPositionSheet_usingRect_,
);
NSWindowDelegate.window_shouldPopUpDocumentPathMenu_.implement(
builder,
window_shouldPopUpDocumentPathMenu_,
);
NSWindowDelegate.window_shouldDragDocumentWithEvent_from_withPasteboard_
.implement(
builder,
window_shouldDragDocumentWithEvent_from_withPasteboard_,
);
NSWindowDelegate.window_willUseFullScreenContentSize_.implement(
builder,
window_willUseFullScreenContentSize_,
);
NSWindowDelegate.window_willUseFullScreenPresentationOptions_.implement(
builder,
window_willUseFullScreenPresentationOptions_,
);
NSWindowDelegate.customWindowsToEnterFullScreenForWindow_.implement(
builder,
customWindowsToEnterFullScreenForWindow_,
);
NSWindowDelegate.window_startCustomAnimationToEnterFullScreenWithDuration_
.implement(
builder,
window_startCustomAnimationToEnterFullScreenWithDuration_,
);
NSWindowDelegate.windowDidFailToEnterFullScreen_.implement(
builder,
windowDidFailToEnterFullScreen_,
);
NSWindowDelegate.customWindowsToExitFullScreenForWindow_.implement(
builder,
customWindowsToExitFullScreenForWindow_,
);
NSWindowDelegate.window_startCustomAnimationToExitFullScreenWithDuration_
.implement(
builder,
window_startCustomAnimationToExitFullScreenWithDuration_,
);
NSWindowDelegate.customWindowsToEnterFullScreenForWindow_onScreen_
.implement(builder, customWindowsToEnterFullScreenForWindow_onScreen_);
NSWindowDelegate
.window_startCustomAnimationToEnterFullScreenOnScreen_withDuration_
.implement(
builder,
window_startCustomAnimationToEnterFullScreenOnScreen_withDuration_,
);
NSWindowDelegate.windowDidFailToExitFullScreen_.implement(
builder,
windowDidFailToExitFullScreen_,
);
NSWindowDelegate
.window_willResizeForVersionBrowserWithMaxPreferredSize_maxAllowedSize_
.implement(
builder,
window_willResizeForVersionBrowserWithMaxPreferredSize_maxAllowedSize_,
);
NSWindowDelegate.window_willEncodeRestorableState_.implement(
builder,
window_willEncodeRestorableState_,
);
NSWindowDelegate.window_didDecodeRestorableState_.implement(
builder,
window_didDecodeRestorableState_,
);
NSWindowDelegate.previewRepresentableActivityItemsForWindow_.implement(
builder,
previewRepresentableActivityItemsForWindow_,
);
NSWindowDelegate.windowForSharingRequestFromWindow_.implement(
builder,
windowForSharingRequestFromWindow_,
);
NSWindowDelegate.windowDidResize_.implement(builder, windowDidResize_);
NSWindowDelegate.windowDidExpose_.implement(builder, windowDidExpose_);
NSWindowDelegate.windowWillMove_.implement(builder, windowWillMove_);
NSWindowDelegate.windowDidMove_.implement(builder, windowDidMove_);
NSWindowDelegate.windowDidBecomeKey_.implement(
builder,
windowDidBecomeKey_,
);
NSWindowDelegate.windowDidResignKey_.implement(
builder,
windowDidResignKey_,
);
NSWindowDelegate.windowDidBecomeMain_.implement(
builder,
windowDidBecomeMain_,
);
NSWindowDelegate.windowDidResignMain_.implement(
builder,
windowDidResignMain_,
);
NSWindowDelegate.windowWillClose_.implement(builder, windowWillClose_);
NSWindowDelegate.windowWillMiniaturize_.implement(
builder,
windowWillMiniaturize_,
);
NSWindowDelegate.windowDidMiniaturize_.implement(
builder,
windowDidMiniaturize_,
);
NSWindowDelegate.windowDidDeminiaturize_.implement(
builder,
windowDidDeminiaturize_,
);
NSWindowDelegate.windowDidUpdate_.implement(builder, windowDidUpdate_);
NSWindowDelegate.windowDidChangeScreen_.implement(
builder,
windowDidChangeScreen_,
);
NSWindowDelegate.windowDidChangeScreenProfile_.implement(
builder,
windowDidChangeScreenProfile_,
);
NSWindowDelegate.windowDidChangeBackingProperties_.implement(
builder,
windowDidChangeBackingProperties_,
);
NSWindowDelegate.windowWillBeginSheet_.implement(
builder,
windowWillBeginSheet_,
);
NSWindowDelegate.windowDidEndSheet_.implement(builder, windowDidEndSheet_);
NSWindowDelegate.windowWillStartLiveResize_.implement(
builder,
windowWillStartLiveResize_,
);
NSWindowDelegate.windowDidEndLiveResize_.implement(
builder,
windowDidEndLiveResize_,
);
NSWindowDelegate.windowWillEnterFullScreen_.implement(
builder,
windowWillEnterFullScreen_,
);
NSWindowDelegate.windowDidEnterFullScreen_.implement(
builder,
windowDidEnterFullScreen_,
);
NSWindowDelegate.windowWillExitFullScreen_.implement(
builder,
windowWillExitFullScreen_,
);
NSWindowDelegate.windowDidExitFullScreen_.implement(
builder,
windowDidExitFullScreen_,
);
NSWindowDelegate.windowWillEnterVersionBrowser_.implement(
builder,
windowWillEnterVersionBrowser_,
);
NSWindowDelegate.windowDidEnterVersionBrowser_.implement(
builder,
windowDidEnterVersionBrowser_,
);
NSWindowDelegate.windowWillExitVersionBrowser_.implement(
builder,
windowWillExitVersionBrowser_,
);
NSWindowDelegate.windowDidExitVersionBrowser_.implement(
builder,
windowDidExitVersionBrowser_,
);
NSWindowDelegate.windowDidChangeOcclusionState_.implement(
builder,
windowDidChangeOcclusionState_,
);
builder.addProtocol($protocol);
return NSWindowDelegate.castFrom(
builder.build(keepIsolateAlive: $keepIsolateAlive),
);
}