addToBuilderAsBlocking static method

void addToBuilderAsBlocking(
  1. ObjCProtocolBuilder builder, {
  2. bool windowShouldClose_(
    1. NSWindow
    )?,
  3. ObjCObjectBase? windowWillReturnFieldEditor_toObject_(
    1. NSWindow,
    2. ObjCObjectBase?
    )?,
  4. NSSize windowWillResize_toSize_(
    1. NSWindow,
    2. NSSize
    )?,
  5. NSRect windowWillUseStandardFrame_defaultFrame_(
    1. NSWindow,
    2. NSRect
    )?,
  6. bool windowShouldZoom_toFrame_(
    1. NSWindow,
    2. NSRect
    )?,
  7. NSUndoManager? windowWillReturnUndoManager_(
    1. NSWindow
    )?,
  8. NSRect window_willPositionSheet_usingRect_(
    1. NSWindow,
    2. NSWindow,
    3. NSRect
    )?,
  9. bool window_shouldPopUpDocumentPathMenu_(
    1. NSWindow,
    2. NSMenu
    )?,
  10. bool window_shouldDragDocumentWithEvent_from_withPasteboard_(
    1. NSWindow,
    2. NSEvent,
    3. NSPoint,
    4. NSPasteboard,
    )?,
  11. NSSize window_willUseFullScreenContentSize_(
    1. NSWindow,
    2. NSSize
    )?,
  12. NSApplicationPresentationOptions window_willUseFullScreenPresentationOptions_(
    1. NSWindow,
    2. NSApplicationPresentationOptions
    )?,
  13. NSArray? customWindowsToEnterFullScreenForWindow_(
    1. NSWindow
    )?,
  14. void window_startCustomAnimationToEnterFullScreenWithDuration_(
    1. NSWindow,
    2. DartNSTimeInterval
    )?,
  15. void windowDidFailToEnterFullScreen_(
    1. NSWindow
    )?,
  16. NSArray? customWindowsToExitFullScreenForWindow_(
    1. NSWindow
    )?,
  17. void window_startCustomAnimationToExitFullScreenWithDuration_(
    1. NSWindow,
    2. DartNSTimeInterval
    )?,
  18. NSArray? customWindowsToEnterFullScreenForWindow_onScreen_(
    1. NSWindow,
    2. NSScreen
    )?,
  19. void window_startCustomAnimationToEnterFullScreenOnScreen_withDuration_(
    1. NSWindow,
    2. NSScreen,
    3. DartNSTimeInterval
    )?,
  20. void windowDidFailToExitFullScreen_(
    1. NSWindow
    )?,
  21. NSSize window_willResizeForVersionBrowserWithMaxPreferredSize_maxAllowedSize_(
    1. NSWindow,
    2. NSSize,
    3. NSSize
    )?,
  22. void window_willEncodeRestorableState_(
    1. NSWindow,
    2. NSCoder
    )?,
  23. void window_didDecodeRestorableState_(
    1. NSWindow,
    2. NSCoder
    )?,
  24. NSArray? previewRepresentableActivityItemsForWindow_(
    1. NSWindow
    )?,
  25. NSWindow? windowForSharingRequestFromWindow_(
    1. NSWindow
    )?,
  26. void windowDidResize_(
    1. NSNotification
    )?,
  27. void windowDidExpose_(
    1. NSNotification
    )?,
  28. void windowWillMove_(
    1. NSNotification
    )?,
  29. void windowDidMove_(
    1. NSNotification
    )?,
  30. void windowDidBecomeKey_(
    1. NSNotification
    )?,
  31. void windowDidResignKey_(
    1. NSNotification
    )?,
  32. void windowDidBecomeMain_(
    1. NSNotification
    )?,
  33. void windowDidResignMain_(
    1. NSNotification
    )?,
  34. void windowWillClose_(
    1. NSNotification
    )?,
  35. void windowWillMiniaturize_(
    1. NSNotification
    )?,
  36. void windowDidMiniaturize_(
    1. NSNotification
    )?,
  37. void windowDidDeminiaturize_(
    1. NSNotification
    )?,
  38. void windowDidUpdate_(
    1. NSNotification
    )?,
  39. void windowDidChangeScreen_(
    1. NSNotification
    )?,
  40. void windowDidChangeScreenProfile_(
    1. NSNotification
    )?,
  41. void windowDidChangeBackingProperties_(
    1. NSNotification
    )?,
  42. void windowWillBeginSheet_(
    1. NSNotification
    )?,
  43. void windowDidEndSheet_(
    1. NSNotification
    )?,
  44. void windowWillStartLiveResize_(
    1. NSNotification
    )?,
  45. void windowDidEndLiveResize_(
    1. NSNotification
    )?,
  46. void windowWillEnterFullScreen_(
    1. NSNotification
    )?,
  47. void windowDidEnterFullScreen_(
    1. NSNotification
    )?,
  48. void windowWillExitFullScreen_(
    1. NSNotification
    )?,
  49. void windowDidExitFullScreen_(
    1. NSNotification
    )?,
  50. void windowWillEnterVersionBrowser_(
    1. NSNotification
    )?,
  51. void windowDidEnterVersionBrowser_(
    1. NSNotification
    )?,
  52. void windowWillExitVersionBrowser_(
    1. NSNotification
    )?,
  53. void windowDidExitVersionBrowser_(
    1. NSNotification
    )?,
  54. void windowDidChangeOcclusionState_(
    1. NSNotification
    )?,
  55. bool $keepIsolateAlive = true,
})

Adds the implementation of the NSWindowDelegate protocol to an existing objc.ObjCProtocolBuilder. All methods that can be implemented as blocking listeners will be.

Note: You cannot call this method after you have called builder.build.

Implementation

static void addToBuilderAsBlocking(
  objc.ObjCProtocolBuilder builder, {
  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,
}) {
  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_
      .implementAsBlocking(
        builder,
        window_startCustomAnimationToEnterFullScreenWithDuration_,
      );
  NSWindowDelegate.windowDidFailToEnterFullScreen_.implementAsBlocking(
    builder,
    windowDidFailToEnterFullScreen_,
  );
  NSWindowDelegate.customWindowsToExitFullScreenForWindow_.implement(
    builder,
    customWindowsToExitFullScreenForWindow_,
  );
  NSWindowDelegate.window_startCustomAnimationToExitFullScreenWithDuration_
      .implementAsBlocking(
        builder,
        window_startCustomAnimationToExitFullScreenWithDuration_,
      );
  NSWindowDelegate.customWindowsToEnterFullScreenForWindow_onScreen_
      .implement(builder, customWindowsToEnterFullScreenForWindow_onScreen_);
  NSWindowDelegate
      .window_startCustomAnimationToEnterFullScreenOnScreen_withDuration_
      .implementAsBlocking(
        builder,
        window_startCustomAnimationToEnterFullScreenOnScreen_withDuration_,
      );
  NSWindowDelegate.windowDidFailToExitFullScreen_.implementAsBlocking(
    builder,
    windowDidFailToExitFullScreen_,
  );
  NSWindowDelegate
      .window_willResizeForVersionBrowserWithMaxPreferredSize_maxAllowedSize_
      .implement(
        builder,
        window_willResizeForVersionBrowserWithMaxPreferredSize_maxAllowedSize_,
      );
  NSWindowDelegate.window_willEncodeRestorableState_.implementAsBlocking(
    builder,
    window_willEncodeRestorableState_,
  );
  NSWindowDelegate.window_didDecodeRestorableState_.implementAsBlocking(
    builder,
    window_didDecodeRestorableState_,
  );
  NSWindowDelegate.previewRepresentableActivityItemsForWindow_.implement(
    builder,
    previewRepresentableActivityItemsForWindow_,
  );
  NSWindowDelegate.windowForSharingRequestFromWindow_.implement(
    builder,
    windowForSharingRequestFromWindow_,
  );
  NSWindowDelegate.windowDidResize_.implementAsBlocking(
    builder,
    windowDidResize_,
  );
  NSWindowDelegate.windowDidExpose_.implementAsBlocking(
    builder,
    windowDidExpose_,
  );
  NSWindowDelegate.windowWillMove_.implementAsBlocking(
    builder,
    windowWillMove_,
  );
  NSWindowDelegate.windowDidMove_.implementAsBlocking(
    builder,
    windowDidMove_,
  );
  NSWindowDelegate.windowDidBecomeKey_.implementAsBlocking(
    builder,
    windowDidBecomeKey_,
  );
  NSWindowDelegate.windowDidResignKey_.implementAsBlocking(
    builder,
    windowDidResignKey_,
  );
  NSWindowDelegate.windowDidBecomeMain_.implementAsBlocking(
    builder,
    windowDidBecomeMain_,
  );
  NSWindowDelegate.windowDidResignMain_.implementAsBlocking(
    builder,
    windowDidResignMain_,
  );
  NSWindowDelegate.windowWillClose_.implementAsBlocking(
    builder,
    windowWillClose_,
  );
  NSWindowDelegate.windowWillMiniaturize_.implementAsBlocking(
    builder,
    windowWillMiniaturize_,
  );
  NSWindowDelegate.windowDidMiniaturize_.implementAsBlocking(
    builder,
    windowDidMiniaturize_,
  );
  NSWindowDelegate.windowDidDeminiaturize_.implementAsBlocking(
    builder,
    windowDidDeminiaturize_,
  );
  NSWindowDelegate.windowDidUpdate_.implementAsBlocking(
    builder,
    windowDidUpdate_,
  );
  NSWindowDelegate.windowDidChangeScreen_.implementAsBlocking(
    builder,
    windowDidChangeScreen_,
  );
  NSWindowDelegate.windowDidChangeScreenProfile_.implementAsBlocking(
    builder,
    windowDidChangeScreenProfile_,
  );
  NSWindowDelegate.windowDidChangeBackingProperties_.implementAsBlocking(
    builder,
    windowDidChangeBackingProperties_,
  );
  NSWindowDelegate.windowWillBeginSheet_.implementAsBlocking(
    builder,
    windowWillBeginSheet_,
  );
  NSWindowDelegate.windowDidEndSheet_.implementAsBlocking(
    builder,
    windowDidEndSheet_,
  );
  NSWindowDelegate.windowWillStartLiveResize_.implementAsBlocking(
    builder,
    windowWillStartLiveResize_,
  );
  NSWindowDelegate.windowDidEndLiveResize_.implementAsBlocking(
    builder,
    windowDidEndLiveResize_,
  );
  NSWindowDelegate.windowWillEnterFullScreen_.implementAsBlocking(
    builder,
    windowWillEnterFullScreen_,
  );
  NSWindowDelegate.windowDidEnterFullScreen_.implementAsBlocking(
    builder,
    windowDidEnterFullScreen_,
  );
  NSWindowDelegate.windowWillExitFullScreen_.implementAsBlocking(
    builder,
    windowWillExitFullScreen_,
  );
  NSWindowDelegate.windowDidExitFullScreen_.implementAsBlocking(
    builder,
    windowDidExitFullScreen_,
  );
  NSWindowDelegate.windowWillEnterVersionBrowser_.implementAsBlocking(
    builder,
    windowWillEnterVersionBrowser_,
  );
  NSWindowDelegate.windowDidEnterVersionBrowser_.implementAsBlocking(
    builder,
    windowDidEnterVersionBrowser_,
  );
  NSWindowDelegate.windowWillExitVersionBrowser_.implementAsBlocking(
    builder,
    windowWillExitVersionBrowser_,
  );
  NSWindowDelegate.windowDidExitVersionBrowser_.implementAsBlocking(
    builder,
    windowDidExitVersionBrowser_,
  );
  NSWindowDelegate.windowDidChangeOcclusionState_.implementAsBlocking(
    builder,
    windowDidChangeOcclusionState_,
  );
  builder.addProtocol($protocol);
}