addToBuilderAsBlocking static method

void addToBuilderAsBlocking(
  1. ObjCProtocolBuilder builder, {
  2. void textStorage_willProcessEditing_range_changeInLength_(
    1. NSTextStorage,
    2. NSTextStorageEditActions,
    3. NSRange,
    4. DartNSInteger,
    )?,
  3. void textStorage_didProcessEditing_range_changeInLength_(
    1. NSTextStorage,
    2. NSTextStorageEditActions,
    3. NSRange,
    4. DartNSInteger,
    )?,
  4. bool $keepIsolateAlive = true,
})

Adds the implementation of the NSTextStorageDelegate 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, {
  void Function(
    NSTextStorage,
    NSTextStorageEditActions,
    NSRange,
    DartNSInteger,
  )?
  textStorage_willProcessEditing_range_changeInLength_,
  void Function(
    NSTextStorage,
    NSTextStorageEditActions,
    NSRange,
    DartNSInteger,
  )?
  textStorage_didProcessEditing_range_changeInLength_,
  bool $keepIsolateAlive = true,
}) {
  NSTextStorageDelegate.textStorage_willProcessEditing_range_changeInLength_
      .implementAsBlocking(
        builder,
        textStorage_willProcessEditing_range_changeInLength_,
      );
  NSTextStorageDelegate.textStorage_didProcessEditing_range_changeInLength_
      .implementAsBlocking(
        builder,
        textStorage_didProcessEditing_range_changeInLength_,
      );
  builder.addProtocol($protocol);
}