addToBuilderAsBlocking static method

void addToBuilderAsBlocking(
  1. ObjCProtocolBuilder builder, {
  2. NSToolbarItem? toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar_(
    1. NSToolbar,
    2. DartNSToolbarItemIdentifier,
    3. bool
    )?,
  3. NSArray toolbarDefaultItemIdentifiers_(
    1. NSToolbar
    )?,
  4. NSArray toolbarAllowedItemIdentifiers_(
    1. NSToolbar
    )?,
  5. NSArray toolbarSelectableItemIdentifiers_(
    1. NSToolbar
    )?,
  6. NSSet toolbarImmovableItemIdentifiers_(
    1. NSToolbar
    )?,
  7. bool toolbar_itemIdentifier_canBeInsertedAtIndex_(
    1. NSToolbar,
    2. DartNSToolbarItemIdentifier,
    3. DartNSInteger
    )?,
  8. void toolbarWillAddItem_(
    1. NSNotification
    )?,
  9. void toolbarDidRemoveItem_(
    1. NSNotification
    )?,
  10. bool $keepIsolateAlive = true,
})

Adds the implementation of the NSToolbarDelegate 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, {
  NSToolbarItem? Function(NSToolbar, DartNSToolbarItemIdentifier, bool)?
  toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar_,
  objc.NSArray Function(NSToolbar)? toolbarDefaultItemIdentifiers_,
  objc.NSArray Function(NSToolbar)? toolbarAllowedItemIdentifiers_,
  objc.NSArray Function(NSToolbar)? toolbarSelectableItemIdentifiers_,
  objc.NSSet Function(NSToolbar)? toolbarImmovableItemIdentifiers_,
  bool Function(NSToolbar, DartNSToolbarItemIdentifier, DartNSInteger)?
  toolbar_itemIdentifier_canBeInsertedAtIndex_,
  void Function(objc.NSNotification)? toolbarWillAddItem_,
  void Function(objc.NSNotification)? toolbarDidRemoveItem_,
  bool $keepIsolateAlive = true,
}) {
  NSToolbarDelegate.toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar_
      .implement(
        builder,
        toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar_,
      );
  NSToolbarDelegate.toolbarDefaultItemIdentifiers_.implement(
    builder,
    toolbarDefaultItemIdentifiers_,
  );
  NSToolbarDelegate.toolbarAllowedItemIdentifiers_.implement(
    builder,
    toolbarAllowedItemIdentifiers_,
  );
  NSToolbarDelegate.toolbarSelectableItemIdentifiers_.implement(
    builder,
    toolbarSelectableItemIdentifiers_,
  );
  NSToolbarDelegate.toolbarImmovableItemIdentifiers_.implement(
    builder,
    toolbarImmovableItemIdentifiers_,
  );
  NSToolbarDelegate.toolbar_itemIdentifier_canBeInsertedAtIndex_.implement(
    builder,
    toolbar_itemIdentifier_canBeInsertedAtIndex_,
  );
  NSToolbarDelegate.toolbarWillAddItem_.implementAsBlocking(
    builder,
    toolbarWillAddItem_,
  );
  NSToolbarDelegate.toolbarDidRemoveItem_.implementAsBlocking(
    builder,
    toolbarDidRemoveItem_,
  );
  builder.addProtocol($protocol);
}