addToBuilderAsBlocking static method

void addToBuilderAsBlocking(
  1. ObjCProtocolBuilder builder, {
  2. bool textShouldBeginEditing_(
    1. NSText
    )?,
  3. bool textShouldEndEditing_(
    1. NSText
    )?,
  4. void textDidBeginEditing_(
    1. NSNotification
    )?,
  5. void textDidEndEditing_(
    1. NSNotification
    )?,
  6. void textDidChange_(
    1. NSNotification
    )?,
  7. bool $keepIsolateAlive = true,
})

Adds the implementation of the NSTextDelegate 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(NSText)? textShouldBeginEditing_,
  bool Function(NSText)? textShouldEndEditing_,
  void Function(objc.NSNotification)? textDidBeginEditing_,
  void Function(objc.NSNotification)? textDidEndEditing_,
  void Function(objc.NSNotification)? textDidChange_,
  bool $keepIsolateAlive = true,
}) {
  NSTextDelegate.textShouldBeginEditing_.implement(
    builder,
    textShouldBeginEditing_,
  );
  NSTextDelegate.textShouldEndEditing_.implement(
    builder,
    textShouldEndEditing_,
  );
  NSTextDelegate.textDidBeginEditing_.implementAsBlocking(
    builder,
    textDidBeginEditing_,
  );
  NSTextDelegate.textDidEndEditing_.implementAsBlocking(
    builder,
    textDidEndEditing_,
  );
  NSTextDelegate.textDidChange_.implementAsBlocking(builder, textDidChange_);
  builder.addProtocol($protocol);
}